diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml new file mode 100644 index 00000000..0de11f97 --- /dev/null +++ b/.github/workflows/conventional-commits.yml @@ -0,0 +1,45 @@ +name: Conventional Commits + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + validate: + name: Validate commits + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + coverage: none + + - name: Install composer dependencies + uses: ramsey/composer-install@v4 + + - name: Validate every commit in the PR + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + set -euo pipefail + failed=0 + tmp=$(mktemp) + while IFS= read -r sha; do + git log -1 --format=%B "$sha" > "$tmp" + if ! vendor/bin/captainhook hook:commit-msg \ + --configuration=captainhook.json \ + --bootstrap=vendor/autoload.php \ + "$tmp"; then + subject=$(git log -1 --format=%s "$sha") + echo "::error::Commit $sha does not follow Conventional Commits: $subject" + failed=1 + fi + done < <(git rev-list "$BASE_SHA..$HEAD_SHA") + exit "$failed" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index a4ebb3e4..0631c236 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -14,7 +14,7 @@ jobs: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v2.5.0 + uses: dependabot/fetch-metadata@v3.1.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index c1d41dd7..0853ffc7 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -22,7 +22,7 @@ jobs: coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d8d83354 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + workflow_dispatch: + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + release: + name: Semantic Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v6 + with: + extra_plugins: | + @semantic-release/changelog + @semantic-release/git + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 158efd7f..3692c477 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,16 +17,17 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.3, 8.2] - laravel: [11.*, 10.*] + php: [8.4, 8.3, 8.2] + laravel: [12.*, 11.*] stability: [prefer-lowest, prefer-stable] - # include: - # - laravel: 11.* - # testbench: 9.* - # carbon: ^2.63 - # - laravel: 10.* - # testbench: 8.* - # carbon: ^2.63 + include: + - laravel: 12.* + testbench: 10.* + - laravel: 11.* + testbench: 9.* + exclude: + - laravel: 12.* + php: 8.2 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -48,8 +49,9 @@ jobs: - name: Install dependencies run: | - composer install --no-interaction - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer require "illuminate/contracts:${{ matrix.laravel }}" --no-update --no-interaction + composer require --dev "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-update --no-interaction + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --with-all-dependencies - name: List Installed Dependencies run: composer show -D diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml deleted file mode 100644 index 3470fd01..00000000 --- a/.github/workflows/update-changelog.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: 'Update Changelog' - -on: - release: - types: [released] - -permissions: - contents: write - -jobs: - update: - runs-on: ubuntu-latest - timeout-minutes: 5 - - steps: - - name: Checkout code - uses: actions/checkout@v6 - with: - ref: main - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.name }} - release-notes: ${{ github.event.release.body }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v7 - with: - branch: main - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 00000000..692c09d2 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,21 @@ +{ + "branches": ["main", { "name": "beta", "prerelease": true }, { "name": "alpha", "prerelease": true }], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogTitle": "# Changelog\n\nAll notable changes to `Bagisto Visual` will be documented in this file." + } + ], + [ + "@semantic-release/git", + { + "assets": ["CHANGELOG.md"], + "message": "chore(release): ${nextRelease.version} [skip ci]" + } + ], + "@semantic-release/github" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index f12c43c6..97078261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,26 +2,29 @@ All notable changes to `Bagisto Visual` will be documented in this file. -## v2.0.0-alpha.3 - 2026-01-09 +# [2.0.0-alpha.5](https://github.com/bagistoplus/visual/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2026-05-04) -### Features - -- Add Typography and TypographyPresets setting types with visual editor support -- Add subfolder support and editor attributes to block and section generation commands -- Add min, max, and step methods to Number setting class -- Persist current template and selected block across page reloads ### Bug Fixes -- Resolve critical bugs in theme generation command +* forward encrypted session cookie to preview sub-request to prevent CSRF mismatch on database session driver ([9ae8a6c](https://github.com/bagistoplus/visual/commit/9ae8a6c39b0735ed1071b63020f4819cf7828d90)) +* lazy-load Theme::$settings to prevent uninitialized property error in Livewire updates ([17cf477](https://github.com/bagistoplus/visual/commit/17cf47722c98d933fab74b72133fadb671b80199)) +* refresh parent of repeated block on child reorder ([a9f175b](https://github.com/bagistoplus/visual/commit/a9f175bbfc61997b1b31055c0ff8c2435f6a1aa3)) +* use regionId instead of regionName in block filter ([75e6f68](https://github.com/bagistoplus/visual/commit/75e6f6876d8b606b210de62656ce4e31370c724a)) -### Documentation -- Add Spacing setting type documentation - -### Testing +### Features -- Add tests for frontend code +* add data-morph-ignore support to morphdom handler ([05218ee](https://github.com/bagistoplus/visual/commit/05218ee161778b9adc29ed1208fa548acc0e523c)) +* add discoverPresetsIn method ([ef45f05](https://github.com/bagistoplus/visual/commit/ef45f05c8e02d75579f5c056e6efe146d906c92e)) +* add font weight and style support for typography presets based on selected font ([df048ea](https://github.com/bagistoplus/visual/commit/df048eae0ae3885365d088d5e940b75a28348d53)) +* add inline rename support for typography presets ([6fce38b](https://github.com/bagistoplus/visual/commit/6fce38b91f48b2124af7de76608847763e2dde50)) +* add isResponsiveValue and getResponsiveValue utilities to Visual ([a9ec37f](https://github.com/bagistoplus/visual/commit/a9ec37f002146ec21eb71fe5fedf2c968f719e10)) +* add section alias for block in SimpleSection ([0007a28](https://github.com/bagistoplus/visual/commit/0007a28b1bb1f4a527dff1b8ee854721ef48817a)) +* add shared Events interface for cross-package Livewire events ([916e7df](https://github.com/bagistoplus/visual/commit/916e7dfa5f63c4d1878f63d7ae0c53dcd75c16d6)) +* allow 'auto' value in SpacingValue properties ([74af973](https://github.com/bagistoplus/visual/commit/74af97357ecc3d77e644d91112db98996aebade6)) +* discover theme presets from provider ([fad128f](https://github.com/bagistoplus/visual/commit/fad128fd04c588115b4ac4262338dad8690d2c72)) +* merge positions field in mergeUpdates ([19c5030](https://github.com/bagistoplus/visual/commit/19c5030d53afc8041f97bf49224abf00398250e6)) ## v2.0.0-alpha.2 - 2025-12-30 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 531a1096..13e1adc5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,11 +48,30 @@ If you’re fixing a bug: ### 5. Commit with a Clear Message +All commits must follow the [Conventional Commits](https://www.conventionalcommits.org) specification. The `commit-msg` git hook (installed automatically by Composer through CaptainHook) validates the message format locally, and a GitHub Actions workflow re-validates every commit on every pull request. + ```bash git add . -git commit -m "Fix: correct section layout misalignment" +git commit -m "fix: correct section layout misalignment" ``` +#### Allowed types + +| Type | Use for | +| --- | --- | +| `feat` | New user-facing feature | +| `fix` | Bug fix | +| `refactor` | Code change that neither adds a feature nor fixes a bug | +| `perf` | Performance improvement | +| `style` | Formatting, whitespace, missing semicolons (no logic change) | +| `test` | Adding or correcting tests | +| `docs` | Documentation only | +| `build` | Build system or external dependencies | +| `ci` | CI configuration and workflows | +| `chore` | Other changes that do not modify source or tests | + +A scope is optional and uses kebab-case (e.g. `feat(editor): ...`). Breaking changes use a `!` after the type/scope or a `BREAKING CHANGE:` footer, and trigger a major version bump on the next release. + ### 6. Submit a Pull Request Go to the main repo and submit your pull request from your fork. diff --git a/captainhook.json b/captainhook.json new file mode 100644 index 00000000..15ecb1e2 --- /dev/null +++ b/captainhook.json @@ -0,0 +1,66 @@ +{ + "pre-commit": { + "enabled": true, + "actions": [ + { + "action": "vendor/bin/pint --test", + "conditions": [ + { + "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType", + "args": ["php"] + } + ] + }, + { + "action": "composer analyse", + "conditions": [ + { + "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType", + "args": ["php"] + } + ] + }, + { + "action": "composer test", + "conditions": [ + { + "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType", + "args": ["php"] + } + ] + } + ] + }, + "commit-msg": { + "enabled": true, + "actions": [ + { + "action": "\\Ramsey\\CaptainHook\\ValidateConventionalCommit", + "options": { + "config": { + "typeCase": "kebab", + "types": [ + "feat", + "fix", + "refactor", + "chore", + "test", + "docs", + "perf", + "ci", + "build", + "style" + ], + "scopeRequired": false, + "scopeCase": "kebab", + "descriptionCase": null, + "descriptionEndMark": null, + "bodyRequired": false, + "bodyWrapWidth": 0, + "requiredFooters": [] + } + } + } + ] + } +} diff --git a/composer.json b/composer.json index 7200f861..7d5e2768 100644 --- a/composer.json +++ b/composer.json @@ -25,33 +25,34 @@ "require": { "php": "^8.2", "andreiio/blade-remix-icon": "^3.6", + "bagistoplus/couleur": "^0.2.0", "blade-ui-kit/blade-heroicons": "^2.4", "blade-ui-kit/blade-icons": "^1.7", - "craftile/laravel": "^0.5", + "craftile/laravel": "^0.6", "illuminate/contracts": "^11.0||^12.0", "mallardduck/blade-lucide-icons": "^1.23", - "matthieumastadenis/couleur": "^0.1.2", "mews/purifier": "^3.4", "spatie/browsershot": "^3.61||^5.0", "spatie/once": "^3.1", "symfony/filesystem": "^6.4" }, "require-dev": { - "archielite/laravel-facade-docblock-generator": "^1.0", - "bagisto/bagisto": "^2.3", - "calebdw/larastan-livewire": "^1.1", - "larastan/larastan": "^2.9", + "bagisto/bagisto": "^2.3||^2.4", + "calebdw/larastan-livewire": "^2.5", + "captainhook/captainhook": "^5.25", + "larastan/larastan": "^3.9", "laravel/pint": "^1.14", "livewire/livewire": "^3.6", "mockery/mockery": "^1.6", - "nunomaduro/collision": "^8.1.1||^7.10.0", - "orchestra/testbench": "^9.0.0||^8.22.0", - "pestphp/pest": "^2.34", - "pestphp/pest-plugin-arch": "^2.7", - "pestphp/pest-plugin-laravel": "^2.3", + "nunomaduro/collision": "^8.1.1||^9.0", + "orchestra/testbench": "^9.0.0||^10.0.0", + "pestphp/pest": "^2.34||^3.8||^4.3", + "pestphp/pest-plugin-arch": "^2.7||^3.0||^4.0", + "pestphp/pest-plugin-laravel": "^2.3||^3.0||^4.0", "phpstan/extension-installer": "^1.3", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.3" + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "ramsey/conventional-commits": "^1.6" }, "autoload": { "files": [ @@ -68,14 +69,17 @@ } }, "scripts": { - "post-autoload-dump": "@composer run prepare", + "post-autoload-dump": [ + "@composer run prepare", + "@composer run captainhook:install" + ], + "captainhook:install": "@php -r \"if (is_dir('.git') && is_file('vendor/bin/captainhook')) { passthru('vendor/bin/captainhook install -f -s --quiet'); }\"", "clear": "@php vendor/bin/testbench package:purge-skeleton --ansi", "prepare": "@php vendor/bin/testbench package:discover --ansi", "build": [ "@composer run prepare", "@php vendor/bin/testbench workbench:build --ansi" ], - "ide-helper": "@php vendor/bin/testbench facade-docblock:generate src/Facades", "start": [ "Composer\\Config::disableProcessTimeout", "@composer run build", diff --git a/docs/core-concepts/presets.md b/docs/core-concepts/presets.md index 71a50827..4b980d46 100644 --- a/docs/core-concepts/presets.md +++ b/docs/core-concepts/presets.md @@ -444,6 +444,30 @@ your-theme/ └── ClassicFooter.php ``` +### Registering Standalone Presets + +Bagisto Visual automatically discovers standalone preset classes from: + +- `app/Visual/Presets` +- `packages///src/Presets` + +For other locations, you can manually register presets in a service provider: + +#### Discover a directory + +Use `discoverPresetsIn()` to auto-discover all preset classes in a directory. The method requires two parameters: +- The directory path containing your preset classes +- The base namespace for those presets (defaults to `'App\\Presets'`) + +```php +Visual::discoverPresetsIn( + base_path('modules/Shared/Presets'), + 'Modules\\Shared\\Presets' +); +``` + +This will automatically discover and register all preset classes in the specified directory, matching the namespace structure to the folder structure. + ### When to Use Standalone Preset Classes | Use Standalone Classes When | Use Inline presets() Method When | diff --git a/package-lock.json b/package-lock.json index c408c0f7..7e2a264b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,387 +5,62 @@ "packages": { "": { "devDependencies": { - "@ark-ui/vue": "^5.25.1", - "@craftile/editor": "^1.0.3", - "@craftile/plugin-common-properties": "^1.0.3", - "@craftile/preview-client": "^1.0.3", - "@craftile/preview-client-html": "^1.0.3", - "@craftile/types": "^1.0.3", - "@iconify-json/bi": "^1.2.6", + "@ark-ui/vue": "^5.36.2", + "@craftile/editor": "^1.0.6", + "@craftile/plugin-common-properties": "^1.0.6", + "@craftile/preview-client": "^1.0.6", + "@craftile/preview-client-html": "^1.0.6", + "@craftile/types": "^1.0.6", + "@iconify-json/bi": "^1.2.7", "@iconify-json/heroicons": "^1.2.3", - "@iconify-json/lucide": "^1.2.68", + "@iconify-json/lucide": "^1.2.105", "@iconify-json/mdi": "^1.2.3", - "@iconify-json/ri": "^1.2.5", + "@iconify-json/ri": "^1.2.10", "@red-asuka/vitepress-plugin-tabs": "^0.0.4", "@tailwindcss/typography": "^0.5.19", - "@tailwindcss/vite": "^4.1.16", - "@tiptap/extension-bold": "^3.6.2", - "@tiptap/extension-bullet-list": "^3.6.2", - "@tiptap/extension-document": "^3.6.2", - "@tiptap/extension-heading": "^3.6.2", - "@tiptap/extension-italic": "^3.6.2", - "@tiptap/extension-list-item": "^3.6.2", - "@tiptap/extension-ordered-list": "^3.6.2", - "@tiptap/extension-paragraph": "^3.6.2", - "@tiptap/extension-text": "^3.6.2", - "@tiptap/extension-underline": "^3.6.2", - "@tiptap/pm": "^3.6.2", - "@tiptap/vue-3": "^3.6.2", - "@types/node": "^24.6.2", + "@tailwindcss/vite": "^4.2.4", + "@tiptap/extension-bold": "^3.22.5", + "@tiptap/extension-bullet-list": "^3.22.5", + "@tiptap/extension-document": "^3.22.5", + "@tiptap/extension-heading": "^3.22.5", + "@tiptap/extension-italic": "^3.22.5", + "@tiptap/extension-list-item": "^3.22.5", + "@tiptap/extension-ordered-list": "^3.22.5", + "@tiptap/extension-paragraph": "^3.22.5", + "@tiptap/extension-text": "^3.22.5", + "@tiptap/extension-underline": "^3.22.5", + "@tiptap/pm": "^3.22.5", + "@tiptap/vue-3": "^3.22.5", + "@types/node": "^25.6.0", "@types/nprogress": "^0.2.3", "@vitejs/plugin-vue": "^6.0.1", - "@vitest/ui": "^4.0.16", - "@vue/test-utils": "^2.4.6", + "@vitest/ui": "^4.1.5", + "@vue/test-utils": "^2.4.10", "@vueuse/core": "^14.1.0", - "@zag-js/file-upload": "^1.25.0", - "@zag-js/vue": "^1.25.0", - "feed": "^5.1.0", - "happy-dom": "^20.0.11", - "jsdom": "^27.4.0", - "laravel-vite-plugin": "^2.0.1", - "morphdom": "^2.7.7", + "@zag-js/file-upload": "^1.40.0", + "@zag-js/vue": "^1.40.0", + "feed": "^5.2.1", + "happy-dom": "^20.9.0", + "jsdom": "^29.1.1", + "laravel-vite-plugin": "^3.1.0", + "morphdom": "^2.7.8", "nprogress": "^0.2.0", - "perfect-debounce": "^2.0.0", - "postcss-prefixwrap": "^1.57.0", - "puppeteer": "^24.23.0", + "perfect-debounce": "^2.1.0", + "postcss-prefixwrap": "^1.57.2", + "puppeteer": "^24.42.0", "tailwindcss": "^4.1.16", - "unplugin-auto-import": "^20.3.0", - "unplugin-icons": "^22.4.2", - "unplugin-vue-components": "^29.1.0", + "unplugin-auto-import": "^21.0.0", + "unplugin-icons": "^23.0.1", + "unplugin-vue-components": "^32.0.0", "unplugin-vue-macros": "^2.14.5", - "vite": "^7.1.11", - "vitepress": "^2.0.0-alpha.15", - "vitepress-plugin-llms": "^1.9.3", - "vitest": "^4.0.16", + "vite": "^8.0.10", + "vitepress": "^2.0.0-alpha.17", + "vitepress-plugin-llms": "^1.12.1", + "vitest": "^4.1.5", "vue": "^3.5.25", "vue3-tabs-component": "^1.3.7" } }, - "node_modules/@acemir/cssom": { - "version": "0.9.30", - "resolved": "https://registry.npmjs.org/@acemir/cssom/-/cssom-0.9.30.tgz", - "integrity": "sha512-9CnlMCI0LmCIq0olalQqdWrJHPzm0/tw3gzOA9zJSgvFX7Xau3D24mAGa4BtwxwY69nsuJW6kQqqCzf/mEcQgg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@ai-sdk/gateway": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-2.0.27.tgz", - "integrity": "sha512-8hbezMsGa0crSt7/DKjkYL1UbbJJW/UFxTfhmf5qcIeYeeWG4dTNmm+DWbUdIsTaWvp59KC4eeC9gYXBbTHd7w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "2.0.1", - "@ai-sdk/provider-utils": "3.0.20", - "@vercel/oidc": "3.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, - "node_modules/@ai-sdk/provider": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-2.0.1.tgz", - "integrity": "sha512-KCUwswvsC5VsW2PWFqF8eJgSCu5Ysj7m1TxiHTVA6g7k360bk0RNQENT8KTMAYEs+8fWPD3Uu4dEmzGHc+jGng==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@ai-sdk/provider-utils": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-3.0.20.tgz", - "integrity": "sha512-iXHVe0apM2zUEzauqJwqmpC37A5rihrStAih5Ks+JE32iTe4LZ58y17UGBjpQQTCRw9YxMeo2UFLxLpBluyvLQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider": "2.0.1", - "@standard-schema/spec": "^1.0.0", - "eventsource-parser": "^3.0.6" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, - "node_modules/@ai-sdk/react": { - "version": "2.0.123", - "resolved": "https://registry.npmjs.org/@ai-sdk/react/-/react-2.0.123.tgz", - "integrity": "sha512-exaEvHAsDdR0wgzF3l0BmC9U1nPLnkPK2CCnX3BP4RDj/PySZvPXjry3AOz1Ayb8KSPZgWklVRzxsQxrOYQJxA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/provider-utils": "3.0.20", - "ai": "5.0.121", - "swr": "^2.2.5", - "throttleit": "2.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "react": "^18 || ~19.0.1 || ~19.1.2 || ^19.2.1", - "zod": "^3.25.76 || ^4.1.8" - }, - "peerDependenciesMeta": { - "zod": { - "optional": true - } - } - }, - "node_modules/@algolia/abtesting": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.12.3.tgz", - "integrity": "sha512-0SpSdnME0RCS6UHSs9XD3ox4bMcCg1JTmjAJ3AU6rcTlX54CZOAEPc2as8uSghX6wfKGT0HWes4TeUpjJMg6FQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/autocomplete-core": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.19.2.tgz", - "integrity": "sha512-mKv7RyuAzXvwmq+0XRK8HqZXt9iZ5Kkm2huLjgn5JoCPtDy+oh9yxUMfDDaVCw0oyzZ1isdJBc7l9nuCyyR7Nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/autocomplete-plugin-algolia-insights": "1.19.2", - "@algolia/autocomplete-shared": "1.19.2" - } - }, - "node_modules/@algolia/autocomplete-plugin-algolia-insights": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.19.2.tgz", - "integrity": "sha512-TjxbcC/r4vwmnZaPwrHtkXNeqvlpdyR+oR9Wi2XyfORkiGkLTVhX2j+O9SaCCINbKoDfc+c2PB8NjfOnz7+oKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/autocomplete-shared": "1.19.2" - }, - "peerDependencies": { - "search-insights": ">= 1 < 3" - } - }, - "node_modules/@algolia/autocomplete-shared": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.19.2.tgz", - "integrity": "sha512-jEazxZTVD2nLrC+wYlVHQgpBoBB5KPStrJxLzsIFl6Kqd1AlG9sIAGl39V5tECLpIQzB3Qa2T6ZPJ1ChkwMK/w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@algolia/client-search": ">= 4.9.1 < 6", - "algoliasearch": ">= 4.9.1 < 6" - } - }, - "node_modules/@algolia/client-abtesting": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.46.3.tgz", - "integrity": "sha512-i2C8sBcl3EKXuCd5nlGohW+pZ9pY3P3JKJ2OYqsbCPg6wURiR32hNDiDvDq7/dqJ7KWWwC2snxJhokZzGlckgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-analytics": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.46.3.tgz", - "integrity": "sha512-uFmD7m3LOym1SAURHeiqupHT9jui+9HK0lAiIvm077gXEscOM5KKXM4rg/ICzQ3UDHLZEA0Lb5TglWsXnieE6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-common": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.46.3.tgz", - "integrity": "sha512-SN+yK840nXa+2+mF72hrDfGd8+B7eBjF8TK/8KoRMdjlAkO/P3o3vtpjKRKI/Sk4L8kYYkB/avW8l+cwR+O1Ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-insights": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.46.3.tgz", - "integrity": "sha512-5ic1liG0VucNPi6gKCWh5bEUGWQfyEmVeXiNKS+rOSppg7B7nKH0PEEJOFXBbHmgK5aPfNNZINiKcyUoH4XsFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-personalization": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.46.3.tgz", - "integrity": "sha512-f4HNitgTip8tntKgluYBTc1LWSOkbNCdxZvRA3rRBZnEAYSvLe7jpE+AxRep6RY+prSWwMtyeCFhA/F1Um+TuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-query-suggestions": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.46.3.tgz", - "integrity": "sha512-/AaVqah2aYyJj7Cazu5QRkgcV3HF3lkBJo5TRkgqQ26xR4iHNRbLF2YsWJfJpJEFghlTF2HOCh7IgzaUCnM+8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/client-search": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.46.3.tgz", - "integrity": "sha512-hfpCIukPuwkrlwsYfJEWdU5R5bduBHEq2uuPcqmgPgNq5MSjmiNIzRuzxGZZgiBKcre6gZT00DR7G1AFn//wiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/ingestion": { - "version": "1.46.3", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.46.3.tgz", - "integrity": "sha512-ChVzNkCzAVxKozTnTgPWCG69WQLjzW7X6OqD91zUh8U38ZhPEX/t3qGhXs+M9ZNaHcJ7xToMB3jywNwONhpLGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/monitoring": { - "version": "1.46.3", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.46.3.tgz", - "integrity": "sha512-MZa+Z5iPmVMxVAQ0aq4HpGsja5utSLEMcOuY01X8D46vvMrSPkP8DnlDFtu1PgJ0RwyIGqqx7v+ClFo6iRJ6bA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/recommend": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.46.3.tgz", - "integrity": "sha512-cr3atJRJBKgAKZl/Oxo4sig6Se0+ukbyIOOluPV5H+ZAXVcxuMoXQgwQ1M5UHPnCnEsZ4uBXhBmilRgUQpUegw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-browser-xhr": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.46.3.tgz", - "integrity": "sha512-/Ku9GImJf2SKoRM2S3e03MjCVaWJCP5olih4k54DRhNDdmxBkd3nsWuUXvDElY3Ucw/arBYGs5SYz79SoS5APw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-fetch": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.46.3.tgz", - "integrity": "sha512-Uw+SPy/zpfwbH1AxQaeOWvWVzPEcO0XbtLbbSz0HPcEIiBGWyfa9LUCxD5UferbDjrSQNVimmzl3FaWi4u8Ykw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@algolia/requester-node-http": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.46.3.tgz", - "integrity": "sha512-4No9iTjr1GZ0JWsFbQJj9aZBnmKyY1sTxOoEud9+SGe3U6iAulF0A0lI4cWi/F/Gcfg8V3jkaddcqSQKDnE45w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/client-common": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, "node_modules/@antfu/install-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz", @@ -400,167 +75,127 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/@antfu/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-TMilPqXyii1AsiEii6l6ubRzbo76p6oshUSYPaKsmXDavyMLqjzVDkcp3pHp5ELMUNJHATcEOGxKTTsX9yYhGg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, "node_modules/@ark-ui/vue": { - "version": "5.25.1", - "resolved": "https://registry.npmjs.org/@ark-ui/vue/-/vue-5.25.1.tgz", - "integrity": "sha512-jGeruiOBpdU2CGaEpI2PUKl+SErH30FjZSB7wHb3/4lBk9phXyUWm7jDowMluCU3RFJ1NlanaIgYseyXfbUl+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@internationalized/date": "3.9.0", - "@zag-js/accordion": "1.24.2", - "@zag-js/anatomy": "1.24.2", - "@zag-js/angle-slider": "1.24.2", - "@zag-js/async-list": "1.24.2", - "@zag-js/auto-resize": "1.24.2", - "@zag-js/avatar": "1.24.2", - "@zag-js/bottom-sheet": "1.24.2", - "@zag-js/carousel": "1.24.2", - "@zag-js/checkbox": "1.24.2", - "@zag-js/clipboard": "1.24.2", - "@zag-js/collapsible": "1.24.2", - "@zag-js/collection": "1.24.2", - "@zag-js/color-picker": "1.24.2", - "@zag-js/color-utils": "1.24.2", - "@zag-js/combobox": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/date-picker": "1.24.2", - "@zag-js/date-utils": "1.24.2", - "@zag-js/dialog": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/editable": "1.24.2", - "@zag-js/file-upload": "1.24.2", - "@zag-js/file-utils": "1.24.2", - "@zag-js/floating-panel": "1.24.2", - "@zag-js/focus-trap": "1.24.2", - "@zag-js/highlight-word": "1.24.2", - "@zag-js/hover-card": "1.24.2", - "@zag-js/i18n-utils": "1.24.2", - "@zag-js/json-tree-utils": "1.24.2", - "@zag-js/listbox": "1.24.2", - "@zag-js/menu": "1.24.2", - "@zag-js/number-input": "1.24.2", - "@zag-js/pagination": "1.24.2", - "@zag-js/password-input": "1.24.2", - "@zag-js/pin-input": "1.24.2", - "@zag-js/popover": "1.24.2", - "@zag-js/presence": "1.24.2", - "@zag-js/progress": "1.24.2", - "@zag-js/qr-code": "1.24.2", - "@zag-js/radio-group": "1.24.2", - "@zag-js/rating-group": "1.24.2", - "@zag-js/scroll-area": "1.24.2", - "@zag-js/select": "1.24.2", - "@zag-js/signature-pad": "1.24.2", - "@zag-js/slider": "1.24.2", - "@zag-js/splitter": "1.24.2", - "@zag-js/steps": "1.24.2", - "@zag-js/switch": "1.24.2", - "@zag-js/tabs": "1.24.2", - "@zag-js/tags-input": "1.24.2", - "@zag-js/timer": "1.24.2", - "@zag-js/toast": "1.24.2", - "@zag-js/toggle": "1.24.2", - "@zag-js/toggle-group": "1.24.2", - "@zag-js/tooltip": "1.24.2", - "@zag-js/tour": "1.24.2", - "@zag-js/tree-view": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2", - "@zag-js/vue": "1.24.2" + "version": "5.36.2", + "resolved": "https://registry.npmjs.org/@ark-ui/vue/-/vue-5.36.2.tgz", + "integrity": "sha512-GI22MHnEvcSeLyIdNPYz1DR7ktogpXRWQRMLdf9D1j4hG6FK7O0Z6vUwegghY0Dc4n3ar9IQY7OU8Bp+AjhgdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@internationalized/date": "3.12.0", + "@zag-js/accordion": "1.40.0", + "@zag-js/anatomy": "1.40.0", + "@zag-js/angle-slider": "1.40.0", + "@zag-js/async-list": "1.40.0", + "@zag-js/auto-resize": "1.40.0", + "@zag-js/avatar": "1.40.0", + "@zag-js/carousel": "1.40.0", + "@zag-js/cascade-select": "1.40.0", + "@zag-js/checkbox": "1.40.0", + "@zag-js/clipboard": "1.40.0", + "@zag-js/collapsible": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/color-picker": "1.40.0", + "@zag-js/color-utils": "1.40.0", + "@zag-js/combobox": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/date-input": "1.40.0", + "@zag-js/date-picker": "1.40.0", + "@zag-js/date-utils": "1.40.0", + "@zag-js/dialog": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/drawer": "1.40.0", + "@zag-js/editable": "1.40.0", + "@zag-js/file-upload": "1.40.0", + "@zag-js/file-utils": "1.40.0", + "@zag-js/floating-panel": "1.40.0", + "@zag-js/focus-trap": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/highlight-word": "1.40.0", + "@zag-js/hover-card": "1.40.0", + "@zag-js/i18n-utils": "1.40.0", + "@zag-js/image-cropper": "1.40.0", + "@zag-js/json-tree-utils": "1.40.0", + "@zag-js/listbox": "1.40.0", + "@zag-js/marquee": "1.40.0", + "@zag-js/menu": "1.40.0", + "@zag-js/navigation-menu": "1.40.0", + "@zag-js/number-input": "1.40.0", + "@zag-js/pagination": "1.40.0", + "@zag-js/password-input": "1.40.0", + "@zag-js/pin-input": "1.40.0", + "@zag-js/popover": "1.40.0", + "@zag-js/presence": "1.40.0", + "@zag-js/progress": "1.40.0", + "@zag-js/qr-code": "1.40.0", + "@zag-js/radio-group": "1.40.0", + "@zag-js/rating-group": "1.40.0", + "@zag-js/scroll-area": "1.40.0", + "@zag-js/select": "1.40.0", + "@zag-js/signature-pad": "1.40.0", + "@zag-js/slider": "1.40.0", + "@zag-js/splitter": "1.40.0", + "@zag-js/steps": "1.40.0", + "@zag-js/switch": "1.40.0", + "@zag-js/tabs": "1.40.0", + "@zag-js/tags-input": "1.40.0", + "@zag-js/timer": "1.40.0", + "@zag-js/toast": "1.40.0", + "@zag-js/toggle": "1.40.0", + "@zag-js/toggle-group": "1.40.0", + "@zag-js/tooltip": "1.40.0", + "@zag-js/tour": "1.40.0", + "@zag-js/tree-view": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0", + "@zag-js/vue": "1.40.0" }, "peerDependencies": { "vue": ">=3.5.0" } }, - "node_modules/@ark-ui/vue/node_modules/@zag-js/file-upload": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/file-upload/-/file-upload-1.24.2.tgz", - "integrity": "sha512-hQHTwbAXDYOjLatRDcoLY8nrxDrctiIMWnzQmbz/53PYbfH5i93KGM7SvUwWX1Zvfwp5IVwpkLA7ARWGNqDOUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/file-utils": "1.24.2", - "@zag-js/i18n-utils": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" - } - }, - "node_modules/@ark-ui/vue/node_modules/@zag-js/vue": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/vue/-/vue-1.24.2.tgz", - "integrity": "sha512-fUZ8/PX6EnLFQxpH/i2rh8quSxsOnlotlG7sTCKUW2phExof5HSdwHbfVLLOWuHqfqH/h5ky6gcEgjwF7wXQQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/core": "1.24.2", - "@zag-js/store": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" - }, - "peerDependencies": { - "vue": ">=3.0.0" - } - }, "node_modules/@asamuzakjp/css-color": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-4.1.1.tgz", - "integrity": "sha512-B0Hv6G3gWGMn0xKJ0txEi/jM5iFpT3MfDxmhZFb4W047GvytCf1DHQ1D69W3zHI4yWe2aTZAA0JnbMZ7Xc8DuQ==", + "version": "5.1.11", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", + "integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==", "dev": true, "license": "MIT", "dependencies": { - "@csstools/css-calc": "^2.1.4", - "@csstools/css-color-parser": "^3.1.0", - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4", - "lru-cache": "^11.2.4" - } - }, - "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", - "dev": true, - "license": "BlueOak-1.0.0", + "@asamuzakjp/generational-cache": "^1.0.1", + "@csstools/css-calc": "^3.2.0", + "@csstools/css-color-parser": "^4.1.0", + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" + }, "engines": { - "node": "20 || >=22" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "6.7.6", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-6.7.6.tgz", - "integrity": "sha512-hBaJER6A9MpdG3WgdlOolHmbOYvSk46y7IQN/1+iqiCuUu6iWdQrs9DGKF8ocqsEqWujWf/V7b7vaDgiUmIvUg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz", + "integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==", "dev": true, "license": "MIT", "dependencies": { + "@asamuzakjp/generational-cache": "^1.0.1", "@asamuzakjp/nwsapi": "^2.3.9", "bidi-js": "^1.0.3", - "css-tree": "^3.1.0", - "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.2.4" + "css-tree": "^3.2.1", + "is-potential-custom-element-name": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, - "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "node_modules/@asamuzakjp/generational-cache": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz", + "integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "engines": { - "node": "20 || >=22" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/@asamuzakjp/nwsapi": { @@ -606,13 +241,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", + "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -622,9 +257,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "dev": true, "license": "MIT", "dependencies": { @@ -635,53 +270,66 @@ "node": ">=6.9.0" } }, + "node_modules/@bramus/specificity": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", + "integrity": "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "css-tree": "^3.0.0" + }, + "bin": { + "specificity": "bin/cli.js" + } + }, "node_modules/@craftile/core": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/core/-/core-1.0.3.tgz", - "integrity": "sha512-cMkeE6ZkVQjR5vhiMLadfujSLV3nOIhWgnuMWzMbmyDadveKimKBJnDOBL8ILQXUiPT7CPMwEBpIVTdY6bAarg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/core/-/core-1.0.6.tgz", + "integrity": "sha512-Ux+BAwIqnDBWfGu5TFk4cq0QYQJuC2tKG+bDtrMPDFBTbObKR5tnXvLMH3UxMsao5kMnCfdeXNWeALg/GD4M/g==", "dev": true, "license": "MIT", "dependencies": { - "@craftile/event-bus": "1.0.3", - "@craftile/types": "1.0.3" + "@craftile/event-bus": "1.0.6", + "@craftile/types": "1.0.6" }, "peerDependencies": { "vue": "^3.0.0" } }, "node_modules/@craftile/editor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/editor/-/editor-1.0.3.tgz", - "integrity": "sha512-315Zp+Z9YM6nSuJy/K+wBl1DghQdjDPypwTQrEULjNWu5QnQIbAAxejOVfPtltreMMovwjMhJR6ruJARMKrZiQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/editor/-/editor-1.0.6.tgz", + "integrity": "sha512-gUGQxxKbHWDZ/cSEwWw5F6zD1EwxmRtnZKVJIF+sd2SjgJzqQe72N0czhdUgDGbvkZUCDTVwbSho5zLuafUXJg==", "dev": true, "license": "MIT", "dependencies": { - "@craftile/core": "1.0.3", - "@craftile/event-bus": "1.0.3", - "@craftile/messenger": "1.0.3", - "@craftile/types": "1.0.3", + "@craftile/core": "1.0.6", + "@craftile/event-bus": "1.0.6", + "@craftile/messenger": "1.0.6", + "@craftile/types": "1.0.6", "vue": "^3.5.17", "vue-draggable-plus": "^0.6.0" } }, "node_modules/@craftile/event-bus": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/event-bus/-/event-bus-1.0.3.tgz", - "integrity": "sha512-Vm/c7n/jFKQthvJ7tjzkShcXzlVIen/QVLD/i1YlbHyg5OTPI0h7pD/Tfe0fcYqrAZBxy9COJTlRsnTlIRTRWA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/event-bus/-/event-bus-1.0.6.tgz", + "integrity": "sha512-4y6qLH+pr1wjbWQyI21z02bKrS1Zl2G+9Oz0erCa0hH523aZHlJ/yb9LZnnWovWBd6rzn7SXzlPMMPOAygzbTg==", "dev": true, "license": "MIT" }, "node_modules/@craftile/messenger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/messenger/-/messenger-1.0.3.tgz", - "integrity": "sha512-ZcLOZkFzW5eB5DoanU4+lZpPiHXiFfoAr7apBgbne6Hl/CCNY4IMGwE1j5ykjkXvHcZ59LFv17JfYYqkXcplmg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/messenger/-/messenger-1.0.6.tgz", + "integrity": "sha512-U2LRhLJkVi4zocRak8p3XZiWFDRDzlwG81OvgAN6Ia8uNgkIrKFy3hTsU3JY+P5f+qrczGCKUt1ij3Rh4MoVsA==", "dev": true, "license": "MIT" }, "node_modules/@craftile/plugin-common-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/plugin-common-properties/-/plugin-common-properties-1.0.3.tgz", - "integrity": "sha512-cV9Zzbu/xkgCVDzTKoVWJuJ2P2ctNS4syOnjWZdxBE9Ce/MXIWOyoKATrkXy26eekBkKTwTDlhkIQpRtNZSF8Q==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/plugin-common-properties/-/plugin-common-properties-1.0.6.tgz", + "integrity": "sha512-IcxibobhqRAAs+2VstOCoWK5tz+L5yQ+M5jSQaEAhE52t8D11fE2CBDBXqOmRBzKddE9qRWyQR8yxWei0Hf50Q==", "dev": true, "license": "MIT", "peerDependencies": { @@ -689,30 +337,30 @@ } }, "node_modules/@craftile/preview-client": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/preview-client/-/preview-client-1.0.3.tgz", - "integrity": "sha512-Me0PoKTehLOK/qOb8LDJeYYOBwSOJpjN+5tdH3qRhll8Y11XUBrOvHxH94OD+D46+uDXafI/+hcGdSwoYFuZ7w==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/preview-client/-/preview-client-1.0.6.tgz", + "integrity": "sha512-/7pb47FBDdNZpjiImYnweljmjE9t80MT1TLZDOlFZMTdkH5zIHznSQeQ0dpHXAp9ADgofkeTTUijFC+X5sGQpA==", "dev": true, "license": "MIT" }, "node_modules/@craftile/preview-client-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/preview-client-html/-/preview-client-html-1.0.3.tgz", - "integrity": "sha512-9VaUA1+5bhBVRkOLVGTvvGNCvRspAjjR2rL73angiRahXJIgjqpDewFwh8F/Tv4FE0Z2qk+31ilh1Iaeonp25g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/preview-client-html/-/preview-client-html-1.0.6.tgz", + "integrity": "sha512-xY/IVKqjMPRbma3XaiOORKmyKK+muNLI+nzswBVoL292o36zJVELdrTwl+vV/vosxx/JSsMN5ERkHkBt7kQ40A==", "dev": true, "license": "MIT" }, "node_modules/@craftile/types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@craftile/types/-/types-1.0.3.tgz", - "integrity": "sha512-Hi432Azt3YeUKy0b2k+N73Qt4+RMiew2ZVn63gSYrOh4UzRl8B/Y3NMTwZli6KZlJTN7ZeAxujty6O440a5wFA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@craftile/types/-/types-1.0.6.tgz", + "integrity": "sha512-/zHGXMC2bP/F+RQjz+birI/CbjKCVEcKz/2pljgpODNQ32igWpmmOI6qW98a1I6NdH1WpHzfbEMGPAl0fRD+Yg==", "dev": true, "license": "MIT" }, "node_modules/@csstools/color-helpers": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", - "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.0.2.tgz", + "integrity": "sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==", "dev": true, "funding": [ { @@ -726,13 +374,13 @@ ], "license": "MIT-0", "engines": { - "node": ">=18" + "node": ">=20.19.0" } }, "node_modules/@csstools/css-calc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", - "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.0.tgz", + "integrity": "sha512-bR9e6o2BDB12jzN/gIbjHa5wLJ4UjD1CB9pM7ehlc0ddk6EBz+yYS1EV2MF55/HUxrHcB/hehAyt5vhsA3hx7w==", "dev": true, "funding": [ { @@ -746,17 +394,17 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" } }, "node_modules/@csstools/css-color-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", - "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.0.tgz", + "integrity": "sha512-U0KhLYmy2GVj6q4T3WaAe6NPuFYCPQoE3b0dRGxejWDgcPp8TP7S5rVdM5ZrFaqu4N67X8YaPBw14dQSYx3IyQ==", "dev": true, "funding": [ { @@ -770,21 +418,21 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^5.1.0", - "@csstools/css-calc": "^2.1.4" + "@csstools/color-helpers": "^6.0.2", + "@csstools/css-calc": "^3.2.0" }, "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-parser-algorithms": "^4.0.0", + "@csstools/css-tokenizer": "^4.0.0" } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", - "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", + "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", "dev": true, "funding": [ { @@ -798,16 +446,16 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.4" + "@csstools/css-tokenizer": "^4.0.0" } }, "node_modules/@csstools/css-syntax-patches-for-csstree": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.22.tgz", - "integrity": "sha512-qBcx6zYlhleiFfdtzkRgwNC7VVoAwfK76Vmsw5t+PbvtdknO9StgRk7ROvq9so1iqbdW4uLIDAsXRsTfUrIoOw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.3.tgz", + "integrity": "sha512-SH60bMfrRCJF3morcdk57WklujF4Jr/EsQUzqkarfHXEFcAR1gg7fS/chAE922Sehgzc1/+Tz5H3Ypa1HiEKrg==", "dev": true, "funding": [ { @@ -820,14 +468,19 @@ } ], "license": "MIT-0", - "engines": { - "node": ">=18" + "peerDependencies": { + "css-tree": "^3.2.1" + }, + "peerDependenciesMeta": { + "css-tree": { + "optional": true + } } }, "node_modules/@csstools/css-tokenizer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", - "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", + "integrity": "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==", "dev": true, "funding": [ { @@ -841,113 +494,46 @@ ], "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20.19.0" } }, - "node_modules/@docsearch/core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@docsearch/core/-/core-4.4.0.tgz", - "integrity": "sha512-kiwNo5KEndOnrf5Kq/e5+D9NBMCFgNsDoRpKQJ9o/xnSlheh6b8AXppMuuUVVdAUIhIfQFk/07VLjjk/fYyKmw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": ">= 16.8.0 < 20.0.0", - "react": ">= 16.8.0 < 20.0.0", - "react-dom": ">= 16.8.0 < 20.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - } - } - }, - "node_modules/@docsearch/css": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.4.0.tgz", - "integrity": "sha512-e9vPgtih6fkawakmYo0Y6V4BKBmDV7Ykudn7ADWXUs5b6pmtBRwDbpSG/WiaUG63G28OkJDEnsMvgIAnZgGwYw==", + "node_modules/@docsearch/css": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-4.6.3.tgz", + "integrity": "sha512-nlOwcXcsNAptQl4vlL4MA78qNJKO0Qlds5GuBjCoePgkebTXLSf8Qt1oyZ3YBshYupKXG9VRGEsk1zr23d+bzQ==", "dev": true, "license": "MIT" }, "node_modules/@docsearch/js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-4.4.0.tgz", - "integrity": "sha512-vCiKzjYD54bugUIMZA6YzuLDilkD3TNH/kfbvqsnzxiLTMu8F13psD+hdMSEOn7j+dFJOaf49fZ+gwr+rXctMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@docsearch/react": "4.4.0", - "htm": "3.1.1" - } - }, - "node_modules/@docsearch/react": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-4.4.0.tgz", - "integrity": "sha512-z12zeg1mV7WD4Ag4pKSuGukETJLaucVFwszDXL/qLaEgRqxEaVacO9SR1qqnCXvZztlvz2rt7cMqryi/7sKfjA==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-4.6.3.tgz", + "integrity": "sha512-qUIX2b4Apew3tv4F0qhmgShsl/Lfw4m6mqv/5/5dWNxwTcDdLMp2s3YwZ+NMGh3IKCg0pBaXm7Q5VdyU5Rj+cQ==", "dev": true, - "license": "MIT", - "dependencies": { - "@ai-sdk/react": "^2.0.30", - "@algolia/autocomplete-core": "1.19.2", - "@docsearch/core": "4.4.0", - "@docsearch/css": "4.4.0", - "ai": "^5.0.30", - "algoliasearch": "^5.28.0", - "marked": "^16.3.0", - "zod": "^4.1.8" - }, - "peerDependencies": { - "@types/react": ">= 16.8.0 < 20.0.0", - "react": ">= 16.8.0 < 20.0.0", - "react-dom": ">= 16.8.0 < 20.0.0", - "search-insights": ">= 1 < 3" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "search-insights": { - "optional": true - } - } + "license": "MIT" }, - "node_modules/@docsearch/react/node_modules/zod": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", - "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", + "node_modules/@docsearch/sidepanel-js": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/@docsearch/sidepanel-js/-/sidepanel-js-4.6.3.tgz", + "integrity": "sha512-grGSmvXzG0if+mrzdIKykvpIAuEQ9u0sEJ2eLRRCaQfJvsWqh2C2/aY04bIzWvDh7myi5rvl8D+tUNsVrjYQ3A==", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } + "license": "MIT" }, "node_modules/@emnapi/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", - "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.1.0", + "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", - "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "dev": true, "license": "MIT", "optional": true, @@ -956,9 +542,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", - "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "dev": true, "license": "MIT", "optional": true, @@ -967,9 +553,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", - "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", "cpu": [ "ppc64" ], @@ -985,9 +571,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", - "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", "cpu": [ "arm" ], @@ -1003,9 +589,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", - "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", "cpu": [ "arm64" ], @@ -1021,9 +607,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", - "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", "cpu": [ "x64" ], @@ -1039,9 +625,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", - "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", "cpu": [ "arm64" ], @@ -1057,9 +643,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", - "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", "cpu": [ "x64" ], @@ -1075,9 +661,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", - "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", "cpu": [ "arm64" ], @@ -1093,9 +679,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", - "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", "cpu": [ "x64" ], @@ -1111,9 +697,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", - "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", "cpu": [ "arm" ], @@ -1129,9 +715,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", - "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", "cpu": [ "arm64" ], @@ -1147,9 +733,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", - "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", "cpu": [ "ia32" ], @@ -1165,9 +751,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", - "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", "cpu": [ "loong64" ], @@ -1183,9 +769,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", - "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", "cpu": [ "mips64el" ], @@ -1201,9 +787,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", - "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", "cpu": [ "ppc64" ], @@ -1219,9 +805,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", - "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", "cpu": [ "riscv64" ], @@ -1237,9 +823,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", - "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", "cpu": [ "s390x" ], @@ -1255,9 +841,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", - "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", "cpu": [ "x64" ], @@ -1273,9 +859,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", - "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", "cpu": [ "arm64" ], @@ -1291,9 +877,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", - "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", "cpu": [ "x64" ], @@ -1309,9 +895,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", - "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", "cpu": [ "arm64" ], @@ -1327,9 +913,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", - "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", "cpu": [ "x64" ], @@ -1345,9 +931,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", - "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", "cpu": [ "arm64" ], @@ -1363,9 +949,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", - "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", "cpu": [ "x64" ], @@ -1381,9 +967,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", - "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", "cpu": [ "arm64" ], @@ -1399,9 +985,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", - "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", "cpu": [ "ia32" ], @@ -1417,9 +1003,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", - "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", "cpu": [ "x64" ], @@ -1435,55 +1021,55 @@ } }, "node_modules/@exodus/bytes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.8.0.tgz", - "integrity": "sha512-8JPn18Bcp8Uo1T82gR8lh2guEOa5KKU/IEKvvdp0sgmi7coPBWf1Doi1EXsGZb2ehc8ym/StJCjffYV+ne7sXQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.0.tgz", + "integrity": "sha512-UY0nlA+feH81UGSHv92sLEPLCeZFjXOuHhrIo0HQydScuQc8s0A7kL/UdgwgDq8g8ilksmuoF35YVTNphV2aBQ==", "dev": true, "license": "MIT", "engines": { "node": "^20.19.0 || ^22.12.0 || >=24.0.0" }, "peerDependencies": { - "@exodus/crypto": "^1.0.0-rc.4" + "@noble/hashes": "^1.8.0 || ^2.0.0" }, "peerDependenciesMeta": { - "@exodus/crypto": { + "@noble/hashes": { "optional": true } } }, "node_modules/@floating-ui/core": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", - "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.5.tgz", + "integrity": "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ==", "dev": true, "license": "MIT", "dependencies": { - "@floating-ui/utils": "^0.2.10" + "@floating-ui/utils": "^0.2.11" } }, "node_modules/@floating-ui/dom": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", - "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.6.tgz", + "integrity": "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ==", "dev": true, "license": "MIT", "dependencies": { - "@floating-ui/core": "^1.7.3", - "@floating-ui/utils": "^0.2.10" + "@floating-ui/core": "^1.7.5", + "@floating-ui/utils": "^0.2.11" } }, "node_modules/@floating-ui/utils": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", - "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.11.tgz", + "integrity": "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==", "dev": true, "license": "MIT" }, "node_modules/@iconify-json/bi": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@iconify-json/bi/-/bi-1.2.6.tgz", - "integrity": "sha512-fWfLr1/+DJDe8+rIUXxMwvmWBZFlxRtM59sYnrezJ2xX87QKyXVw3QuforJ4kF2Orrz85J+JTRG6305vaJ7flA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@iconify-json/bi/-/bi-1.2.7.tgz", + "integrity": "sha512-IPz8WNxmLkH1I9msl+0Q4OnmjjvP4uU0Z61a4i4sqonB6vKSbMGUWuGn8/YuuszlReVj8rf+3gNv5JU8Xoljyg==", "dev": true, "license": "MIT", "dependencies": { @@ -1501,9 +1087,9 @@ } }, "node_modules/@iconify-json/lucide": { - "version": "1.2.68", - "resolved": "https://registry.npmjs.org/@iconify-json/lucide/-/lucide-1.2.68.tgz", - "integrity": "sha512-lR5xNJdn2CT0iR7lM25G4SewBO4G2hbr3fTWOc3AE9BspflEcneh02E3l9TBaCU/JOHozTJevWLrxBGypD7Tng==", + "version": "1.2.105", + "resolved": "https://registry.npmjs.org/@iconify-json/lucide/-/lucide-1.2.105.tgz", + "integrity": "sha512-tbE+cGEixWcRFtW8xkzX1HaGRqp7CDhZb01uPBh7PnRoxXzVET9E73rHOXDdsLKUGoTuYGZKhhX6oirvoy5NDg==", "dev": true, "license": "ISC", "dependencies": { @@ -1521,9 +1107,9 @@ } }, "node_modules/@iconify-json/ri": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.2.5.tgz", - "integrity": "sha512-kWGimOXMZrlYusjBKKXYOWcKhbOHusFsmrmRGmjS7rH0BpML5A9/fy8KHZqFOwZfC4M6amObQYbh8BqO5cMC3w==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.2.10.tgz", + "integrity": "sha512-WWMhoncVVM+Xmu9T5fgu2lhYRrKTEWhKk3Com0KiM111EeEsRLiASjpsFKnC/SrB6covhUp95r2mH8tGxhgd5Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1531,9 +1117,9 @@ } }, "node_modules/@iconify-json/simple-icons": { - "version": "1.2.66", - "resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.66.tgz", - "integrity": "sha512-D1OnnXwiQXFkVMw5M+Bt8mPsXeMkQyGmMdrmN7lsQlKMUkfLOp6JWhnUJ92po51WXT046aF/zzqSmkKqg08p4Q==", + "version": "1.2.80", + "resolved": "https://registry.npmjs.org/@iconify-json/simple-icons/-/simple-icons-1.2.80.tgz", + "integrity": "sha512-iglncJJ6X/dVuzFDU32MrHwwo4RBwivGf108dgyYg+HKS78ifx0h7sTenpDZMVT+UhdS6CSgZcvY/SvRXlIEUg==", "dev": true, "license": "CC0-1.0", "dependencies": { @@ -1548,26 +1134,21 @@ "license": "MIT" }, "node_modules/@iconify/utils": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.0.2.tgz", - "integrity": "sha512-EfJS0rLfVuRuJRn4psJHtK2A9TqVnkxPpHY6lYHiB9+8eSuudsxbwMiavocG45ujOo6FJ+CIRlRnlOGinzkaGQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.1.tgz", + "integrity": "sha512-MwzoDtw9rO1x+qfgLTV/IVXsHDBqeYZoMIQC8SfxfYSlaSUG+oWiAcoiB1yajAda6mqblm4/1/w2E8tRu7a7Tw==", "dev": true, "license": "MIT", "dependencies": { "@antfu/install-pkg": "^1.1.0", - "@antfu/utils": "^9.2.0", "@iconify/types": "^2.0.0", - "debug": "^4.4.1", - "globals": "^15.15.0", - "kolorist": "^1.8.0", - "local-pkg": "^1.1.1", - "mlly": "^1.7.4" + "mlly": "^1.8.2" } }, "node_modules/@internationalized/date": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.9.0.tgz", - "integrity": "sha512-yaN3brAnHRD+4KyyOsJyk49XUvj2wtbNACSqg0bz3u8t2VuzhC8Q5dfRnrSxjnnbDb+ienBnkn1TzQfE154vyg==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.12.0.tgz", + "integrity": "sha512-/PyIMzK29jtXaGU23qTvNZxvBXRtKbNnGDFD+PY6CZw/Y8Ex8pFUzkuCJCG9aOqmShjqhS9mPqP6Dk5onQY8rQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1584,29 +1165,6 @@ "@swc/helpers": "^0.5.0" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1786,10 +1344,22 @@ "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "dev": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "engines": { "node": ">=8.0.0" } }, + "node_modules/@oxc-project/types": { + "version": "0.127.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.127.0.tgz", + "integrity": "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@oxc-resolver/binding-darwin-arm64": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-4.2.0.tgz", @@ -1966,9 +1536,9 @@ "license": "MIT" }, "node_modules/@puppeteer/browsers": { - "version": "2.10.10", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.10.tgz", - "integrity": "sha512-3ZG500+ZeLql8rE0hjfhkycJjDj0pI/btEh3L9IkWUYcOrgP0xCNRq3HbtbqOPbvDhFaAWD88pDFtlLv8ns8gA==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.13.0.tgz", + "integrity": "sha512-46BZJYJjc/WwmKjsvDFykHtXrtomsCIrwYQPOP7VfMJoZY2bsDF9oROBABR3paDjDcmkUye1Pb1BqdcdiipaWA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1976,8 +1546,8 @@ "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", - "semver": "^7.7.2", - "tar-fs": "^3.1.0", + "semver": "^7.7.4", + "tar-fs": "^3.1.1", "yargs": "^17.7.2" }, "bin": { @@ -2011,38 +1581,10 @@ "markdown-it-container": "^3.0.0" } }, - "node_modules/@remirror/core-constants": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-3.0.0.tgz", - "integrity": "sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-beta.29", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.29.tgz", - "integrity": "sha512-NIJgOsMjbxAXvoGq/X0gD7VPMQ8j9g0BiDaNjVNVjvl+iKXxL3Jre0v31RmBYeLEmkbj2s02v8vFTbUXi5XS2Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz", - "integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz", - "integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==", "cpu": [ "arm64" ], @@ -2051,12 +1593,15 @@ "optional": true, "os": [ "android" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz", - "integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==", "cpu": [ "arm64" ], @@ -2065,12 +1610,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz", - "integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==", "cpu": [ "x64" ], @@ -2079,166 +1627,223 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz", - "integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==", "cpu": [ - "arm64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "freebsd" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz", - "integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.17.tgz", + "integrity": "sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==", "cpu": [ - "x64" + "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "freebsd" - ] + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz", - "integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==", "cpu": [ - "arm" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz", - "integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==", "cpu": [ - "arm" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz", - "integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==", "cpu": [ - "arm64" + "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz", - "integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==", "cpu": [ - "arm64" + "s390x" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz", - "integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==", "cpu": [ - "loong64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz", - "integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==", "cpu": [ - "ppc64" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz", - "integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==", "cpu": [ - "riscv64" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" - ] + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz", - "integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==", + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.17.tgz", + "integrity": "sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==", "cpu": [ - "riscv64" + "wasm32" ], "dev": true, "license": "MIT", "optional": true, - "os": [ - "linux" - ] + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz", - "integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==", + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-gUmyzBl3SPMa6hrqFUth9sVfcLBlYsbMzBx5PlexMroZStgzGqlZ26pYG89rBb45Mnia+oil6YAIFeEWGWhoZA==", "cpu": [ - "s390x" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" - ] + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz", - "integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==", "cpu": [ "x64" ], @@ -2246,27 +1851,37 @@ "license": "MIT", "optional": true, "os": [ - "linux" - ] + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz", - "integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==", + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.13.tgz", + "integrity": "sha512-3ngTAv6F/Py35BsYbeeLeecvhMKdsKm4AoOETVhAA+Qc8nrA2I0kF7oa93mE9qnIurngOSpMnQ0x2nQY2FPviA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", "cpu": [ - "x64" + "arm" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" + "android" ] }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz", - "integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==", + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", "cpu": [ "arm64" ], @@ -2274,13 +1889,13 @@ "license": "MIT", "optional": true, "os": [ - "openharmony" + "android" ] }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz", - "integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==", + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", "cpu": [ "arm64" ], @@ -2288,41 +1903,41 @@ "license": "MIT", "optional": true, "os": [ - "win32" + "darwin" ] }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz", - "integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==", + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", "cpu": [ - "ia32" + "x64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "win32" + "darwin" ] }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz", - "integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==", + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", "cpu": [ - "x64" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "win32" + "freebsd" ] }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz", - "integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==", + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", "cpu": [ "x64" ], @@ -2330,80 +1945,346 @@ "license": "MIT", "optional": true, "os": [ - "win32" + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" ] }, "node_modules/@shikijs/core": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.21.0.tgz", - "integrity": "sha512-AXSQu/2n1UIQekY8euBJlvFYZIw0PHY63jUzGbrOma4wPxzznJXTXkri+QcHeBNaFxiiOljKxxJkVSoB3PjbyA==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.23.0.tgz", + "integrity": "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.21.0", + "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "node_modules/@shikijs/engine-javascript": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.21.0.tgz", - "integrity": "sha512-ATwv86xlbmfD9n9gKRiwuPpWgPENAWCLwYCGz9ugTJlsO2kOzhOkvoyV/UD+tJ0uT7YRyD530x6ugNSffmvIiQ==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.23.0.tgz", + "integrity": "sha512-aHt9eiGFobmWR5uqJUViySI1bHMqrAgamWE1TYSUoftkAeCCAiGawPMwM+VCadylQtF4V3VNOZ5LmfItH5f3yA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.21.0", + "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.4" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.21.0.tgz", - "integrity": "sha512-OYknTCct6qiwpQDqDdf3iedRdzj6hFlOPv5hMvI+hkWfCKs5mlJ4TXziBG9nyabLwGulrUjHiCq3xCspSzErYQ==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.21.0", + "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.21.0.tgz", - "integrity": "sha512-g6mn5m+Y6GBJ4wxmBYqalK9Sp0CFkUqfNzUy2pJglUginz6ZpWbaWjDB4fbQ/8SHzFjYbtU6Ddlp1pc+PPNDVA==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.21.0" + "@shikijs/types": "3.23.0" } }, "node_modules/@shikijs/themes": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.21.0.tgz", - "integrity": "sha512-BAE4cr9EDiZyYzwIHEk7JTBJ9CzlPuM4PchfcA5ao1dWXb25nv6hYsoDiBq2aZK9E3dlt3WB78uI96UESD+8Mw==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.21.0" + "@shikijs/types": "3.23.0" } }, "node_modules/@shikijs/transformers": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-3.21.0.tgz", - "integrity": "sha512-CZwvCWWIiRRiFk9/JKzdEooakAP8mQDtBOQ1TKiCaS2E1bYtyBCOkUzS8akO34/7ufICQ29oeSfkb3tT5KtrhA==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-3.23.0.tgz", + "integrity": "sha512-F9msZVxdF+krQNSdQ4V+Ja5QemeAoTQ2jxt7nJCwhDsdF1JWS3KxIQXA3lQbyKwS3J61oHRUSv4jYWv3CkaKTQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "3.21.0", - "@shikijs/types": "3.21.0" + "@shikijs/core": "3.23.0", + "@shikijs/types": "3.23.0" } }, "node_modules/@shikijs/types": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.21.0.tgz", - "integrity": "sha512-zGrWOxZ0/+0ovPY7PvBU2gIS9tmhSUUt30jAcNV0Bq0gb2S98gwfjIs1vxlmH5zM7/4YxLamT6ChlqqAJmPPjA==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2426,9 +2307,9 @@ "license": "MIT" }, "node_modules/@swc/helpers": { - "version": "0.5.17", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", - "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.21.tgz", + "integrity": "sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2436,49 +2317,49 @@ } }, "node_modules/@tailwindcss/node": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.16.tgz", - "integrity": "sha512-BX5iaSsloNuvKNHRN3k2RcCuTEgASTo77mofW0vmeHkfrDWaoFAFvNHpEgtu0eqyypcyiBkDWzSMxJhp3AUVcw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.2.4.tgz", + "integrity": "sha512-Ai7+yQPxz3ddrDQzFfBKdHEVBg0w3Zl83jnjuwxnZOsnH9pGn93QHQtpU0p/8rYWxvbFZHneni6p1BSLK4DkGA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "enhanced-resolve": "^5.18.3", + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.19.0", "jiti": "^2.6.1", - "lightningcss": "1.30.2", - "magic-string": "^0.30.19", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", "source-map-js": "^1.2.1", - "tailwindcss": "4.1.16" + "tailwindcss": "4.2.4" } }, "node_modules/@tailwindcss/oxide": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.16.tgz", - "integrity": "sha512-2OSv52FRuhdlgyOQqgtQHuCgXnS8nFSYRp2tJ+4WZXKgTxqPy7SMSls8c3mPT5pkZ17SBToGM5LHEJBO7miEdg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.2.4.tgz", + "integrity": "sha512-9El/iI069DKDSXwTvB9J4BwdO5JhRrOweGaK25taBAvBXyXqJAX+Jqdvs8r8gKpsI/1m0LeJLyQYTf/WLrBT1Q==", "dev": true, "license": "MIT", "engines": { - "node": ">= 10" + "node": ">= 20" }, "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.16", - "@tailwindcss/oxide-darwin-arm64": "4.1.16", - "@tailwindcss/oxide-darwin-x64": "4.1.16", - "@tailwindcss/oxide-freebsd-x64": "4.1.16", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.16", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.16", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.16", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.16", - "@tailwindcss/oxide-linux-x64-musl": "4.1.16", - "@tailwindcss/oxide-wasm32-wasi": "4.1.16", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.16", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.16" + "@tailwindcss/oxide-android-arm64": "4.2.4", + "@tailwindcss/oxide-darwin-arm64": "4.2.4", + "@tailwindcss/oxide-darwin-x64": "4.2.4", + "@tailwindcss/oxide-freebsd-x64": "4.2.4", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.4", + "@tailwindcss/oxide-linux-arm64-gnu": "4.2.4", + "@tailwindcss/oxide-linux-arm64-musl": "4.2.4", + "@tailwindcss/oxide-linux-x64-gnu": "4.2.4", + "@tailwindcss/oxide-linux-x64-musl": "4.2.4", + "@tailwindcss/oxide-wasm32-wasi": "4.2.4", + "@tailwindcss/oxide-win32-arm64-msvc": "4.2.4", + "@tailwindcss/oxide-win32-x64-msvc": "4.2.4" } }, "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.16.tgz", - "integrity": "sha512-8+ctzkjHgwDJ5caq9IqRSgsP70xhdhJvm+oueS/yhD5ixLhqTw9fSL1OurzMUhBwE5zK26FXLCz2f/RtkISqHA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.2.4.tgz", + "integrity": "sha512-e7MOr1SAn9U8KlZzPi1ZXGZHeC5anY36qjNwmZv9pOJ8E4Q6jmD1vyEHkQFmNOIN7twGPEMXRHmitN4zCMN03g==", "cpu": [ "arm64" ], @@ -2489,13 +2370,13 @@ "android" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.16.tgz", - "integrity": "sha512-C3oZy5042v2FOALBZtY0JTDnGNdS6w7DxL/odvSny17ORUnaRKhyTse8xYi3yKGyfnTUOdavRCdmc8QqJYwFKA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.2.4.tgz", + "integrity": "sha512-tSC/Kbqpz/5/o/C2sG7QvOxAKqyd10bq+ypZNf+9Fi2TvbVbv1zNpcEptcsU7DPROaSbVgUXmrzKhurFvo5eDg==", "cpu": [ "arm64" ], @@ -2506,13 +2387,13 @@ "darwin" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.16.tgz", - "integrity": "sha512-vjrl/1Ub9+JwU6BP0emgipGjowzYZMjbWCDqwA2Z4vCa+HBSpP4v6U2ddejcHsolsYxwL5r4bPNoamlV0xDdLg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.2.4.tgz", + "integrity": "sha512-yPyUXn3yO/ufR6+Kzv0t4fCg2qNr90jxXc5QqBpjlPNd0NqyDXcmQb/6weunH/MEDXW5dhyEi+agTDiqa3WsGg==", "cpu": [ "x64" ], @@ -2523,13 +2404,13 @@ "darwin" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.16.tgz", - "integrity": "sha512-TSMpPYpQLm+aR1wW5rKuUuEruc/oOX3C7H0BTnPDn7W/eMw8W+MRMpiypKMkXZfwH8wqPIRKppuZoedTtNj2tg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.2.4.tgz", + "integrity": "sha512-BoMIB4vMQtZsXdGLVc2z+P9DbETkiopogfWZKbWwM8b/1Vinbs4YcUwo+kM/KeLkX3Ygrf4/PsRndKaYhS8Eiw==", "cpu": [ "x64" ], @@ -2540,13 +2421,13 @@ "freebsd" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.16.tgz", - "integrity": "sha512-p0GGfRg/w0sdsFKBjMYvvKIiKy/LNWLWgV/plR4lUgrsxFAoQBFrXkZ4C0w8IOXfslB9vHK/JGASWD2IefIpvw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.2.4.tgz", + "integrity": "sha512-7pIHBLTHYRAlS7V22JNuTh33yLH4VElwKtB3bwchK/UaKUPpQ0lPQiOWcbm4V3WP2I6fNIJ23vABIvoy2izdwA==", "cpu": [ "arm" ], @@ -2557,13 +2438,13 @@ "linux" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.16.tgz", - "integrity": "sha512-DoixyMmTNO19rwRPdqviTrG1rYzpxgyYJl8RgQvdAQUzxC1ToLRqtNJpU/ATURSKgIg6uerPw2feW0aS8SNr/w==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.2.4.tgz", + "integrity": "sha512-+E4wxJ0ZGOzSH325reXTWB48l42i93kQqMvDyz5gqfRzRZ7faNhnmvlV4EPGJU3QJM/3Ab5jhJ5pCRUsKn6OQw==", "cpu": [ "arm64" ], @@ -2574,13 +2455,13 @@ "linux" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.16.tgz", - "integrity": "sha512-H81UXMa9hJhWhaAUca6bU2wm5RRFpuHImrwXBUvPbYb+3jo32I9VIwpOX6hms0fPmA6f2pGVlybO6qU8pF4fzQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.2.4.tgz", + "integrity": "sha512-bBADEGAbo4ASnppIziaQJelekCxdMaxisrk+fB7Thit72IBnALp9K6ffA2G4ruj90G9XRS2VQ6q2bCKbfFV82g==", "cpu": [ "arm64" ], @@ -2591,13 +2472,13 @@ "linux" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.16.tgz", - "integrity": "sha512-ZGHQxDtFC2/ruo7t99Qo2TTIvOERULPl5l0K1g0oK6b5PGqjYMga+FcY1wIUnrUxY56h28FxybtDEla+ICOyew==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.4.tgz", + "integrity": "sha512-7Mx25E4WTfnht0TVRTyC00j3i0M+EeFe7wguMDTlX4mRxafznw0CA8WJkFjWYH5BlgELd1kSjuU2JiPnNZbJDA==", "cpu": [ "x64" ], @@ -2608,13 +2489,13 @@ "linux" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.16.tgz", - "integrity": "sha512-Oi1tAaa0rcKf1Og9MzKeINZzMLPbhxvm7rno5/zuP1WYmpiG0bEHq4AcRUiG2165/WUzvxkW4XDYCscZWbTLZw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.2.4.tgz", + "integrity": "sha512-2wwJRF7nyhOR0hhHoChc04xngV3iS+akccHTGtz965FwF0up4b2lOdo6kI1EbDaEXKgvcrFBYcYQQ/rrnWFVfA==", "cpu": [ "x64" ], @@ -2625,13 +2506,13 @@ "linux" ], "engines": { - "node": ">= 10" + "node": ">= 20" } }, "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.16.tgz", - "integrity": "sha512-B01u/b8LteGRwucIBmCQ07FVXLzImWESAIMcUU6nvFt/tYsQ6IHz8DmZ5KtvmwxD+iTYBtM1xwoGXswnlu9v0Q==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.2.4.tgz", + "integrity": "sha512-FQsqApeor8Fo6gUEklzmaa9994orJZZDBAlQpK2Mq+DslRKFJeD6AjHpBQ0kZFQohVr8o85PPh8eOy86VlSCmw==", "bundleDependencies": [ "@napi-rs/wasm-runtime", "@emnapi/core", @@ -2647,143 +2528,83 @@ "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.5.0", - "@emnapi/runtime": "^1.5.0", + "@emnapi/core": "^1.8.1", + "@emnapi/runtime": "^1.8.1", "@emnapi/wasi-threads": "^1.1.0", - "@napi-rs/wasm-runtime": "^1.0.7", + "@napi-rs/wasm-runtime": "^1.1.1", "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.4.0" + "tslib": "^2.8.1" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.5.0", + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.2.4.tgz", + "integrity": "sha512-L9BXqxC4ToVgwMFqj3pmZRqyHEztulpUJzCxUtLjobMCzTPsGt1Fa9enKbOpY2iIyVtaHNeNvAK8ERP/64sqGQ==", + "cpu": [ + "arm64" + ], "dev": true, - "inBundle": true, "license": "MIT", "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.1.0", - "tslib": "^2.4.0" + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" } }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.5.0", + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.2.4.tgz", + "integrity": "sha512-ESlKG0EpVJQwRjXDDa9rLvhEAh0mhP1sF7sap9dNZT0yyl9SAG6T7gdP09EH0vIv0UNTlo6jPWyujD6559fZvw==", + "cpu": [ + "x64" + ], "dev": true, - "inBundle": true, "license": "MIT", "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" } }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.1.0", + "node_modules/@tailwindcss/typography": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", + "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==", "dev": true, - "inBundle": true, "license": "MIT", - "optional": true, "dependencies": { - "tslib": "^2.4.0" + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" } }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { - "version": "1.0.7", - "dev": true, - "inBundle": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.5.0", - "@emnapi/runtime": "^1.5.0", - "@tybys/wasm-util": "^0.10.1" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { - "version": "0.10.1", - "dev": true, - "inBundle": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { - "version": "2.8.1", - "dev": true, - "inBundle": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.16.tgz", - "integrity": "sha512-zX+Q8sSkGj6HKRTMJXuPvOcP8XfYON24zJBRPlszcH1Np7xuHXhWn8qfFjIujVzvH3BHU+16jBXwgpl20i+v9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.16.tgz", - "integrity": "sha512-m5dDFJUEejbFqP+UXVstd4W/wnxA4F61q8SoL+mqTypId2T2ZpuxosNSgowiCnLp2+Z+rivdU0AqpfgiD7yCBg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/typography": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", - "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==", + "node_modules/@tailwindcss/vite": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.2.4.tgz", + "integrity": "sha512-pCvohwOCspk3ZFn6eJzrrX3g4n2JY73H6MmYC87XfGPyTty4YsCjYTMArRZm/zOI8dIt3+EcrLHAFPe5A4bgtw==", "dev": true, "license": "MIT", "dependencies": { - "postcss-selector-parser": "6.0.10" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" - } - }, - "node_modules/@tailwindcss/vite": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.16.tgz", - "integrity": "sha512-bbguNBcDxsRmi9nnlWJxhfDWamY3lmcyACHcdO1crxfzuLpOhHLLtEIN/nCbbAtj5rchUgQD17QVAKi1f7IsKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tailwindcss/node": "4.1.16", - "@tailwindcss/oxide": "4.1.16", - "tailwindcss": "4.1.16" + "@tailwindcss/node": "4.2.4", + "@tailwindcss/oxide": "4.2.4", + "tailwindcss": "4.2.4" }, "peerDependencies": { - "vite": "^5.2.0 || ^6 || ^7" + "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "node_modules/@tiptap/core": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.6.2.tgz", - "integrity": "sha512-XKZYrCVFsyQGF6dXQR73YR222l/76wkKfZ+2/4LCrem5qtcOarmv5pYxjUBG8mRuBPskTTBImSFTeQltJIUNCg==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.22.5.tgz", + "integrity": "sha512-L1lhWz6ujGny8LduTJ7MBWYhzigwOvfUJUrJ7IzOJSuy3+OAzisdGDD1GV7LEO/hU0Hr2Mkm1wajRIHExvS9HQ==", "dev": true, "license": "MIT", "peer": true, @@ -2792,13 +2613,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^3.6.2" + "@tiptap/pm": "3.22.5" } }, "node_modules/@tiptap/extension-bold": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.6.2.tgz", - "integrity": "sha512-Q9KO8CCPCAXYqHzIw8b/ookVmrfqfCg2cyh9h9Hvw6nhO4LOOnJMcGVmWsrpFItbwCGMafI5iY9SbSj7RpCyuw==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.22.5.tgz", + "integrity": "sha512-l/uDtpJISiFFyfctvnODNWBN/XPZI1jVZRacTRDDnSn8+x6KQ7G2qgFYueU7KvVJGDFVT39Iio56mcFRG/Pozg==", "dev": true, "license": "MIT", "funding": { @@ -2806,13 +2627,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-bubble-menu": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-3.6.2.tgz", - "integrity": "sha512-OF5CxCmYExcXZjcectwAeujSeDZ4IltPy+SsqBZLbQRDts9PQhzv5azGDvYdL2eMMkT3yhO2gWkXxSHMxI3O6w==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-3.22.5.tgz", + "integrity": "sha512-yrNlFQQJY5MmhBpmD8tnmaSmyUQrEvgyPKa3bzVeWEhDSG1CW4A0ZSMx3hrA9yFO0HWfw3IJmvSCycEZQBalpQ==", "dev": true, "license": "MIT", "optional": true, @@ -2824,14 +2645,14 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2", - "@tiptap/pm": "^3.6.2" + "@tiptap/core": "3.22.5", + "@tiptap/pm": "3.22.5" } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.6.2.tgz", - "integrity": "sha512-Y5Uhir+za7xMm6RAe592aNNlLvCayVSQt2HfSckOr+c/v/Zd2bFUHv0ef6l/nUzUhDBs32Bg9SvfWx/yyMyNEw==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.22.5.tgz", + "integrity": "sha512-cf54fG9AybU8NgPMv1TOcoqAkELeRc/VpnSCt/rIJZphWQx9nsFmrtkrlCatrIcCaGtNZYwlHlMnC5LVVMu0uA==", "dev": true, "license": "MIT", "funding": { @@ -2839,13 +2660,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.6.2" + "@tiptap/extension-list": "3.22.5" } }, "node_modules/@tiptap/extension-document": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.6.2.tgz", - "integrity": "sha512-4qg3KWL3aO1M7hfDpZR6/vSo7Cfqr3McyGUfqb/BXqYDW1DwT8jJkDTcHrGU7WUKRlWgoyPyzM8pZiGlP0uQHg==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.22.5.tgz", + "integrity": "sha512-8NJERd+pCtvSuEP4C4WMGYmRRCV12ePZL7bC+QUdFlbdXg+kNZS0zZ7hh879tYA0Kidbi8rWWD1Tx+H2ezkmMw==", "dev": true, "license": "MIT", "funding": { @@ -2853,13 +2674,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-floating-menu": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-3.6.2.tgz", - "integrity": "sha512-ym7YMKGY3QhFUKUS6JYOwtdi8s2PeGmOhu7TwI9/U0LmGbELeKJBJl2BP1yB+Sjpv25pVL++CwJQ6dsrjDlZ8g==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-3.22.5.tgz", + "integrity": "sha512-dhem4sTPhyQgQ+pFp2Oud4k4FSQz9PVMgeQAC9288SmGwxBkJNveDAw6sKTMrumqDvwkJrtslXIupq9TZYQnzg==", "dev": true, "license": "MIT", "optional": true, @@ -2869,14 +2690,14 @@ }, "peerDependencies": { "@floating-ui/dom": "^1.0.0", - "@tiptap/core": "^3.6.2", - "@tiptap/pm": "^3.6.2" + "@tiptap/core": "3.22.5", + "@tiptap/pm": "3.22.5" } }, "node_modules/@tiptap/extension-heading": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.6.2.tgz", - "integrity": "sha512-JQ2yjwXGAiwGc+MhS1mULBr354MHfmWqVDQLRg8ey6LkdXggTDDJ1Ni3GrUS7B5YcA/ICdhr4krXaQpNkT5Syw==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.22.5.tgz", + "integrity": "sha512-hjyEG4947PAhMBfP1G6B0QAh6+y9mp2C5BQmNjprA05/lQzDAT7KFZzNh8ZVp3ol6aICKq/N1gFOW9Dc/9FUOw==", "dev": true, "license": "MIT", "funding": { @@ -2884,13 +2705,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-italic": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.6.2.tgz", - "integrity": "sha512-46zYKqM3o9w1A2G9hWr0ERGbJpqIncoH45XIfLdAI6ZldZVVf+NeXMGwjOPf4+03cZ5/emk3MRTnVp9vF4ToIg==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.22.5.tgz", + "integrity": "sha512-4T8baSiLkeIymTgEwirxDFt5YgYofkP3m1+MGYdGy2HKcOK+1vpvlPhEO1X5qtZngtJW5S4+njKjinRg52A4PA==", "dev": true, "license": "MIT", "funding": { @@ -2898,13 +2719,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-list": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.6.2.tgz", - "integrity": "sha512-ZLaEHGVq4eL26hZZFE9e7RArk2rEjcVstN/YTRTKElTnLaf58kLTKN3nlgy1PWGwzfWGUuXURBuEBLaq5l6djg==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.22.5.tgz", + "integrity": "sha512-cVO3ZHCgxAWZ4zrFSs81FO2nyCk1wb2EHkpLpW98FzbJLkN9rDkazhW99P3HRWy/CvUldOT+8ecI1YrQtBojMg==", "dev": true, "license": "MIT", "peer": true, @@ -2913,14 +2734,14 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2", - "@tiptap/pm": "^3.6.2" + "@tiptap/core": "3.22.5", + "@tiptap/pm": "3.22.5" } }, "node_modules/@tiptap/extension-list-item": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.6.2.tgz", - "integrity": "sha512-ma/D2GKylpNB04FfNI3tDMY+C9nz7Yk85H21YTIGv8QL5KlDK97L6orydmx6IVRc2nNMZQVitBIEKDOXcczX9w==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.22.5.tgz", + "integrity": "sha512-W7uTmyKLhlsvuTPLv+8WwnsY+mlikBFIoLSvVcBaFt4MwpsZ+DeB6KQg02Y7tbtaAnG7rXu9Fvw2QORh2P728A==", "dev": true, "license": "MIT", "funding": { @@ -2928,13 +2749,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.6.2" + "@tiptap/extension-list": "3.22.5" } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.6.2.tgz", - "integrity": "sha512-KdJ5MLIw19N+XiqQ2COXGtaq9TzUbtlLE5dgYCJQ2EumeZKIGELvUnHjrnIB9gH/gRlMs+hprLTh23xVUDJovg==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.22.5.tgz", + "integrity": "sha512-OXdh4k4CNrukwiSdWdEQ49uvgnqvR0Z9aNSP4HI5/kZQ/Te1NtRtYCpUrzWyO/7CtjcCisXHti0o9C/TV8YMbQ==", "dev": true, "license": "MIT", "funding": { @@ -2942,13 +2763,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.6.2" + "@tiptap/extension-list": "3.22.5" } }, "node_modules/@tiptap/extension-paragraph": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.6.2.tgz", - "integrity": "sha512-jeJWj2xKib3392iHQEcB7wYZ30dUgXuwqpCTwtN9eANor+Zvv6CpDKBs1R2al6BYFbIJCgKeTulqxce0yoC80g==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.22.5.tgz", + "integrity": "sha512-52KCto4+XKpnBWpIufspWLyq4UWxAWC72ANPdGuIhbi72NRTabiTbTVN40uwGSPkyakeESG0/vKdWJCVvB4f0g==", "dev": true, "license": "MIT", "funding": { @@ -2956,13 +2777,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-text": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.6.2.tgz", - "integrity": "sha512-fFSUEv1H3lM92yr6jZdELk0gog8rPTK5hTf08kP8RsY8pA80Br1ADVenejrMV4UNTmT1JWTXGBGhMqfQFHUvAQ==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.22.5.tgz", + "integrity": "sha512-bzpDOdAEo1JeoVZDIyV0oY0jGXkEG+AzF70SzHoRSjOvFDtKWunyXf9eO1OnOr2/fmMcckT2qwUBNBMQplWBzw==", "dev": true, "license": "MIT", "funding": { @@ -2970,13 +2791,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/extension-underline": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.6.2.tgz", - "integrity": "sha512-IrG6vjxTMI2EeyhZCtx0sNTEu83PsAvzIh4vxmG1fUi/RYokks+sFbgGMuq0jtO96iVNEszlpAC/vaqfxFJwew==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.22.5.tgz", + "integrity": "sha512-9ut09rJD0iEbS6sk7yd2j6IwuFDLTNmDEGTDLodvqAfi+bq7ddsTDv0YviXoZaA9sdHAdTEVr2ITy2m6WK5jpA==", "dev": true, "license": "MIT", "funding": { @@ -2984,32 +2805,26 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.6.2" + "@tiptap/core": "3.22.5" } }, "node_modules/@tiptap/pm": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.6.2.tgz", - "integrity": "sha512-g+NXjqjbj6NfHOMl22uNWVYIu8oCq7RFfbnpohPMsSKJLaHYE8mJR++7T6P5R9FoqhIFdwizg1jTpwRU5CHqXQ==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.22.5.tgz", + "integrity": "sha512-Cr9Mv4igxvI2tKMiahw48sZxva3PfDzypErH8IB82N+9qa9n9ygVMt0BOaDg53hLKxEEVeYr2S/wCcJIVFgBTw==", "dev": true, "license": "MIT", "dependencies": { "prosemirror-changeset": "^2.3.0", - "prosemirror-collab": "^1.3.1", "prosemirror-commands": "^1.6.2", "prosemirror-dropcursor": "^1.8.1", "prosemirror-gapcursor": "^1.3.2", "prosemirror-history": "^1.4.1", - "prosemirror-inputrules": "^1.4.0", "prosemirror-keymap": "^1.2.2", - "prosemirror-markdown": "^1.13.1", - "prosemirror-menu": "^1.2.4", "prosemirror-model": "^1.24.1", - "prosemirror-schema-basic": "^1.2.3", "prosemirror-schema-list": "^1.5.0", "prosemirror-state": "^1.4.3", "prosemirror-tables": "^1.6.4", - "prosemirror-trailing-node": "^3.0.0", "prosemirror-transform": "^1.10.2", "prosemirror-view": "^1.38.1" }, @@ -3019,9 +2834,9 @@ } }, "node_modules/@tiptap/vue-3": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-3.6.2.tgz", - "integrity": "sha512-/FRAzj3S6NeHY2J8cLT5JxIVs5Pud16DE/BfP04GDdfpGLpYmAGvt+bJN1H4LIRy9LcB3BxS5N+sGZH5HgHt8A==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@tiptap/vue-3/-/vue-3-3.22.5.tgz", + "integrity": "sha512-xwSXPwDjauIVktMXBMaNaSgFyq3O1sXcX1vWyHyyCFlq4+8ekq4uXbjkD6y6IhZyr/AQoRYnjgosus+apGyGuA==", "dev": true, "license": "MIT", "funding": { @@ -3029,13 +2844,13 @@ "url": "https://github.com/sponsors/ueberdosis" }, "optionalDependencies": { - "@tiptap/extension-bubble-menu": "^3.6.2", - "@tiptap/extension-floating-menu": "^3.6.2" + "@tiptap/extension-bubble-menu": "^3.22.5", + "@tiptap/extension-floating-menu": "^3.22.5" }, "peerDependencies": { "@floating-ui/dom": "^1.0.0", - "@tiptap/core": "^3.6.2", - "@tiptap/pm": "^3.6.2", + "@tiptap/core": "3.22.5", + "@tiptap/pm": "3.22.5", "vue": "^3.0.0" } }, @@ -3145,13 +2960,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.6.2.tgz", - "integrity": "sha512-d2L25Y4j+W3ZlNAeMKcy7yDsK425ibcAOO2t7aPTz6gNMH0z2GThtwENCDc0d/Pw9wgyRqE5Px1wkV7naz8ang==", + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.13.0" + "undici-types": "~7.19.0" } }, "node_modules/@types/nprogress": { @@ -3189,6 +3004,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -3207,59 +3032,49 @@ "dev": true, "license": "ISC" }, - "node_modules/@vercel/oidc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@vercel/oidc/-/oidc-3.1.0.tgz", - "integrity": "sha512-Fw28YZpRnA3cAHHDlkt7xQHiJ0fcL+NRcIqsocZQUSmbzeIKRpwttJjik5ZGanXP+vlA4SbTg+AbA3bP363l+w==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 20" - } - }, "node_modules/@vitejs/plugin-vue": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz", - "integrity": "sha512-+MaE752hU0wfPFJEUAIxqw18+20euHHdxVtMvbFcOEpjEyfqXH/5DCoTHiVJ0J29EhTJdoTkjEv5YBKU9dnoTw==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.6.tgz", + "integrity": "sha512-u9HHgfrq3AjXlysn0eINFnWQOJQLO9WN6VprZ8FXl7A2bYisv3Hui9Ij+7QZ41F/WYWarHjwBbXtD7dKg3uxbg==", "dev": true, "license": "MIT", "dependencies": { - "@rolldown/pluginutils": "1.0.0-beta.29" + "@rolldown/pluginutils": "1.0.0-rc.13" }, "engines": { "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "vue": "^3.2.25" } }, "node_modules/@vitest/expect": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.16.tgz", - "integrity": "sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.5.tgz", + "integrity": "sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==", "dev": true, "license": "MIT", "dependencies": { - "@standard-schema/spec": "^1.0.0", + "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.16", - "@vitest/utils": "4.0.16", - "chai": "^6.2.1", - "tinyrainbow": "^3.0.3" + "@vitest/spy": "4.1.5", + "@vitest/utils": "4.1.5", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/mocker": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.16.tgz", - "integrity": "sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.5.tgz", + "integrity": "sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.0.16", + "@vitest/spy": "4.1.5", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -3268,7 +3083,7 @@ }, "peerDependencies": { "msw": "^2.4.9", - "vite": "^6.0.0 || ^7.0.0-0" + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "msw": { @@ -3290,26 +3105,26 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.16.tgz", - "integrity": "sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.5.tgz", + "integrity": "sha512-7I3q6l5qr03dVfMX2wCo9FxwSJbPdwKjy2uu/YPpU3wfHvIL4QHwVRp57OfGrDFeUJ8/8QdfBKIV12FTtLn00g==", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^3.0.3" + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/runner": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.16.tgz", - "integrity": "sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.5.tgz", + "integrity": "sha512-2D+o7Pr82IEO46YPpoA/YU0neeyr6FTerQb5Ro7BUnBuv6NQtT/kmVnczngiMEBhzgqz2UZYl5gArejsyERDSQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.0.16", + "@vitest/utils": "4.1.5", "pathe": "^2.0.3" }, "funding": { @@ -3317,13 +3132,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.16.tgz", - "integrity": "sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.5.tgz", + "integrity": "sha512-zypXEt4KH/XgKGPUz4eC2AvErYx0My5hfL8oDb1HzGFpEk1P62bxSohdyOmvz+d9UJwanI68MKwr2EquOaOgMQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.16", + "@vitest/pretty-format": "4.1.5", + "@vitest/utils": "4.1.5", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -3332,9 +3148,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.16.tgz", - "integrity": "sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.5.tgz", + "integrity": "sha512-2lNOsh6+R2Idnf1TCZqSwYlKN2E/iDlD8sgU59kYVl+OMDmvldO1VDk39smRfpUNwYpNRVn3w4YfuC7KfbBnkQ==", "dev": true, "license": "MIT", "funding": { @@ -3342,36 +3158,37 @@ } }, "node_modules/@vitest/ui": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.16.tgz", - "integrity": "sha512-rkoPH+RqWopVxDnCBE/ysIdfQ2A7j1eDmW8tCxxrR9nnFBa9jKf86VgsSAzxBd1x+ny0GC4JgiD3SNfRHv3pOg==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.5.tgz", + "integrity": "sha512-3Z9HNFiV0IF1fk0JPiK+7kE1GcaIPefQQIBYur6PM5yFIq6agys3uqP/0t966e1wXfmjbRCHDe7qW236Xjwnag==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.0.16", + "@vitest/utils": "4.1.5", "fflate": "^0.8.2", - "flatted": "^3.3.3", + "flatted": "^3.4.2", "pathe": "^2.0.3", "sirv": "^3.0.2", "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.0.3" + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.0.16" + "vitest": "4.1.5" } }, "node_modules/@vitest/utils": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.16.tgz", - "integrity": "sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.5.tgz", + "integrity": "sha512-76wdkrmfXfqGjueGgnb45ITPyUi1ycZ4IHgC2bhPDUfWHklY/q3MdLOAB+TF1e6xfl8NxNY0ZYaPCFNWSsw3Ug==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.16", - "tinyrainbow": "^3.0.3" + "@vitest/pretty-format": "4.1.5", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -4192,57 +4009,70 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.25.tgz", - "integrity": "sha512-vay5/oQJdsNHmliWoZfHPoVZZRmnSWhug0BYT34njkYTPqClh3DNWLkZNJBVSjsNMrg0CCrBfoKkjZQPM/QVUw==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.33.tgz", + "integrity": "sha512-3PZLQwFw4Za3TC8t0FvTy3wI16Kt+pmwcgNZca4Pj9iWL2E72a/gZlpBtAJvEdDMdCxdG/qq0C7PN0bsJuv0Rw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@vue/shared": "3.5.25", - "entities": "^4.5.0", + "@babel/parser": "^7.29.2", + "@vue/shared": "3.5.33", + "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, + "node_modules/@vue/compiler-core/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/@vue/compiler-dom": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.25.tgz", - "integrity": "sha512-4We0OAcMZsKgYoGlMjzYvaoErltdFI2/25wqanuTu+S4gismOTRTBPi4IASOjxWdzIwrYSjnqONfKvuqkXzE2Q==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.33.tgz", + "integrity": "sha512-PXq0yrfCLzzL07rbXO4awtXY1Z06LG2eu6Adg3RJFa/j3Cii217XxxLXG22N330gw7GmALCY0Z8RgXEviwgpjA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/compiler-core": "3.5.33", + "@vue/shared": "3.5.33" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.25.tgz", - "integrity": "sha512-PUgKp2rn8fFsI++lF2sO7gwO2d9Yj57Utr5yEsDf3GNaQcowCLKL7sf+LvVFvtJDXUp/03+dC6f2+LCv5aK1ag==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.33.tgz", + "integrity": "sha512-UTUvRO9cY+rROrx/pvN9P5Z7FgA6QGfokUCfhQE4EnmUj3rVnK+CHI0LsEO1pg+I7//iRYMUfcNcCPe7tg0CoA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@vue/compiler-core": "3.5.25", - "@vue/compiler-dom": "3.5.25", - "@vue/compiler-ssr": "3.5.25", - "@vue/shared": "3.5.25", + "@babel/parser": "^7.29.2", + "@vue/compiler-core": "3.5.33", + "@vue/compiler-dom": "3.5.33", + "@vue/compiler-ssr": "3.5.33", + "@vue/shared": "3.5.33", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", - "postcss": "^8.5.6", + "postcss": "^8.5.10", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.25.tgz", - "integrity": "sha512-ritPSKLBcParnsKYi+GNtbdbrIE1mtuFEJ4U1sWeuOMlIziK5GtOL85t5RhsNy4uWIXPgk+OUdpnXiTdzn8o3A==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.33.tgz", + "integrity": "sha512-IErjYdnj1qIupG5xxiVIYiiRvDhGWV4zuh/RCrwfYpuL+HWQzeU6lCk/nF9r7olWMnjKxCAkOctT2qFWFkzb1A==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/compiler-dom": "3.5.33", + "@vue/shared": "3.5.33" } }, "node_modules/@vue/compiler-vue2": { @@ -4318,81 +4148,91 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.25.tgz", - "integrity": "sha512-5xfAypCQepv4Jog1U4zn8cZIcbKKFka3AgWHEFQeK65OW+Ys4XybP6z2kKgws4YB43KGpqp5D/K3go2UPPunLA==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.33.tgz", + "integrity": "sha512-p8UfIqyIhb0rYGlSgSBV+lPhF2iUSBcRy7enhTmPqKWadHy9kcOFYF1AejYBP9P+avnd3OBbD49DU4pLWX/94A==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.5.25" + "@vue/shared": "3.5.33" } }, "node_modules/@vue/runtime-core": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.25.tgz", - "integrity": "sha512-Z751v203YWwYzy460bzsYQISDfPjHTl+6Zzwo/a3CsAf+0ccEjQ8c+0CdX1WsumRTHeywvyUFtW6KvNukT/smA==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.33.tgz", + "integrity": "sha512-UpFF45RI9//a7rvq7RdOQblb4tup7hHG9QsmIrxkFQLzQ7R8/iNQ5LE15NhLZ1/WcHMU2b47u6P33CPUelHyIQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/reactivity": "3.5.33", + "@vue/shared": "3.5.33" } }, "node_modules/@vue/runtime-dom": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.25.tgz", - "integrity": "sha512-a4WrkYFbb19i9pjkz38zJBg8wa/rboNERq3+hRRb0dHiJh13c+6kAbgqCPfMaJ2gg4weWD3APZswASOfmKwamA==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.33.tgz", + "integrity": "sha512-IOxMsAOwquhfITgmOgaPYl7/j8gKUxUFoflRc+u4LxyD3+783xne8vNta1PONVCvCV9A0w7hkyEepINDqfO0tw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.25", - "@vue/runtime-core": "3.5.25", - "@vue/shared": "3.5.25", - "csstype": "^3.1.3" + "@vue/reactivity": "3.5.33", + "@vue/runtime-core": "3.5.33", + "@vue/shared": "3.5.33", + "csstype": "^3.2.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.25.tgz", - "integrity": "sha512-UJaXR54vMG61i8XNIzTSf2Q7MOqZHpp8+x3XLGtE3+fL+nQd+k7O5+X3D/uWrnQXOdMw5VPih+Uremcw+u1woQ==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.33.tgz", + "integrity": "sha512-0xylq/8/h44lVG0pZFknv1XIdEgymq2E9n59uTWJBG+dIgiT0TMCSsxrN7nO16Z0MU0MPjFcguBbZV8Itk52Hw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/compiler-ssr": "3.5.33", + "@vue/shared": "3.5.33" }, "peerDependencies": { - "vue": "3.5.25" + "vue": "3.5.33" } }, "node_modules/@vue/shared": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.25.tgz", - "integrity": "sha512-AbOPdQQnAnzs58H2FrrDxYj/TJfmeS2jdfEEhgiKINy+bnOANmVizIEgq1r+C5zsbs6l1CCQxtcj71rwNQ4jWg==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.33.tgz", + "integrity": "sha512-5vR2QIlmaLG77Ygd4pMP6+SGQ5yox9VhtnbDWTy9DzMzdmeLxZ1QqxrywEZ9sa1AVubfIJyaCG3ytyWU81ufcQ==", "dev": true, "license": "MIT" }, "node_modules/@vue/test-utils": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.4.6.tgz", - "integrity": "sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.4.10.tgz", + "integrity": "sha512-SmoZ5EA1kYiAFs9NkYdiFFQF+cSnUwnvlYEbY+DogWQZUiqOm/Y29eSbc5T6yi75SgSF9863SBeXniIEoPajCA==", "dev": true, "license": "MIT", "dependencies": { "js-beautify": "^1.14.9", - "vue-component-type-helpers": "^2.0.0" + "vue-component-type-helpers": "^3.0.0" + }, + "peerDependencies": { + "@vue/compiler-dom": "3.x", + "@vue/server-renderer": "3.x", + "vue": "3.x" + }, + "peerDependenciesMeta": { + "@vue/server-renderer": { + "optional": true + } } }, "node_modules/@vueuse/core": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.1.0.tgz", - "integrity": "sha512-rgBinKs07hAYyPF834mDTigH7BtPqvZ3Pryuzt1SD/lg5wEcWqvwzXXYGEDb2/cP0Sj5zSvHl3WkmMELr5kfWw==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.2.1.tgz", + "integrity": "sha512-3vwDzV+GDUNpdegRY6kzpLm4Igptq+GA0QkJ3W61Iv27YWwW/ufSlOfgQIpN6FZRMG0mkaz4gglJRtq5SeJyIQ==", "dev": true, "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.21", - "@vueuse/metadata": "14.1.0", - "@vueuse/shared": "14.1.0" + "@vueuse/metadata": "14.2.1", + "@vueuse/shared": "14.2.1" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -4402,14 +4242,14 @@ } }, "node_modules/@vueuse/integrations": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-14.1.0.tgz", - "integrity": "sha512-eNQPdisnO9SvdydTIXnTE7c29yOsJBD/xkwEyQLdhDC/LKbqrFpXHb3uS//7NcIrQO3fWVuvMGp8dbK6mNEMCA==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-14.2.1.tgz", + "integrity": "sha512-2LIUpBi/67PoXJGqSDQUF0pgQWpNHh7beiA+KG2AbybcNm+pTGWT6oPGlBgUoDWmYwfeQqM/uzOHqcILpKL7nA==", "dev": true, "license": "MIT", "dependencies": { - "@vueuse/core": "14.1.0", - "@vueuse/shared": "14.1.0" + "@vueuse/core": "14.2.1", + "@vueuse/shared": "14.2.1" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -4419,7 +4259,7 @@ "axios": "^1", "change-case": "^5", "drauu": "^0.4", - "focus-trap": "^7", + "focus-trap": "^7 || ^8", "fuse.js": "^7", "idb-keyval": "^6", "jwt-decode": "^4", @@ -4469,9 +4309,9 @@ } }, "node_modules/@vueuse/metadata": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.1.0.tgz", - "integrity": "sha512-7hK4g015rWn2PhKcZ99NyT+ZD9sbwm7SGvp7k+k+rKGWnLjS/oQozoIZzWfCewSUeBmnJkIb+CNr7Zc/EyRnnA==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.2.1.tgz", + "integrity": "sha512-1ButlVtj5Sb/HDtIy1HFr1VqCP4G6Ypqt5MAo0lCgjokrk2mvQKsK2uuy0vqu/Ks+sHfuHo0B9Y9jn9xKdjZsw==", "dev": true, "license": "MIT", "funding": { @@ -4479,9 +4319,9 @@ } }, "node_modules/@vueuse/shared": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.1.0.tgz", - "integrity": "sha512-EcKxtYvn6gx1F8z9J5/rsg3+lTQnvOruQd8fUecW99DCK04BkWD7z5KQ/wTAx+DazyoEE9dJt/zV8OIEQbM6kw==", + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.2.1.tgz", + "integrity": "sha512-shTJncjV9JTI4oVNyF1FQonetYAiTBd+Qj7cY89SWbXSkx7gyhrgtEdF2ZAVWS1S3SHlaROO6F2IesJxQEkZBw==", "dev": true, "license": "MIT", "funding": { @@ -4492,250 +4332,274 @@ } }, "node_modules/@zag-js/accordion": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/accordion/-/accordion-1.24.2.tgz", - "integrity": "sha512-sGNhbWR85oAiMyQLk+dliRhNQGP59T56M1gAkQ7bwJJZ7l++hFEQpYcr/FbAHJshXWpvUKm0wV18wHR/56Y30w==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/accordion/-/accordion-1.40.0.tgz", + "integrity": "sha512-YDdyvZJ6fr92RZazyXQq+juT3ZA0ubjDISptb5YPgMoTPdnjKNiICPpMeCeVj1ncYRDkHXrOdChS/5CtuX/K6g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/anatomy": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/anatomy/-/anatomy-1.24.2.tgz", - "integrity": "sha512-qWmxopxVHMjP9UGoUdxqKtrot8MaU0UvoJWh0O03b9eOPgLwMydkcwuGAc8s3x6GDREu3D3GvcRgrQ5JteITjg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/anatomy/-/anatomy-1.40.0.tgz", + "integrity": "sha512-oiB4uAaV//L38JluLVPtOHO3xvqambrfrXVOoq4kmNrBv1LLlCmFvrXA2HOR9lakn4ExK27XSUrKhUN7YlKjfQ==", "dev": true, "license": "MIT" }, "node_modules/@zag-js/angle-slider": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/angle-slider/-/angle-slider-1.24.2.tgz", - "integrity": "sha512-QPBWxji84sEyB519uU+n07IkowvDaLSpon1oDQvNc3wFKz35F5IAXQo85pDQPPDAzEHG4oJ2W3cXPRWmkVuTrg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/angle-slider/-/angle-slider-1.40.0.tgz", + "integrity": "sha512-6X6bOBoCyYG0/lFY0Y+AXJZZG6CeYQiWkcMXvegxCC2zxthodqOVzkVOASW+6rzLjn2bru+V5O9RMjNgmCumKg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/rect-utils": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/rect-utils": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/aria-hidden": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/aria-hidden/-/aria-hidden-1.24.2.tgz", - "integrity": "sha512-btbVDdfHq2wcvV2KmpBlkKN+36XIMkXTIy7zvQniBQ/V6X5WGKBaXGvllqrLLaJVU2HmnhM/IYUBQW4H0BLWBA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/aria-hidden/-/aria-hidden-1.40.0.tgz", + "integrity": "sha512-lNWujEIlfGKwMQIcgfXuOZSsJD2avrgPsQHrXNVF9mkXygjLFcIRKz2pEexTSCqFh/HuUZJ6rG4pM/hJ/BiVCw==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.40.0" + } }, "node_modules/@zag-js/async-list": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/async-list/-/async-list-1.24.2.tgz", - "integrity": "sha512-W2720aU4ANdhcrFtOQX+AVYFSxxuH+TT8kAPtIZtnd6ffOTuiR8j8PV7U45gC5KUvixIBQ+oot11m/n3YVilUw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/async-list/-/async-list-1.40.0.tgz", + "integrity": "sha512-hLGUTtwRFl6FIdYxSIYSeLQjJeG4isKpdmGCUvtWNnKr7ayf1yAkkSwX10SdBMWOCldbtvKCZXumKvP6dDwNvw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/core": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/core": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/auto-resize": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/auto-resize/-/auto-resize-1.24.2.tgz", - "integrity": "sha512-oOzFY+4mif6PXpVMR+db8+b33C8uplAkiuDwZhNEaQDj97S4kxySlQkFovbmY55DYAlBRguaQKXjn0pboqwIqA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/auto-resize/-/auto-resize-1.40.0.tgz", + "integrity": "sha512-eZC+AGKUip7UMu41/ApeT1wCIgn2fmo63FJeGAdMMD8E9M8M7QLsfISMIoieNNGBAYWhSyqELQ3jPgkUf6xReA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2" + "@zag-js/dom-query": "1.40.0" } }, "node_modules/@zag-js/avatar": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/avatar/-/avatar-1.24.2.tgz", - "integrity": "sha512-qSqJQLjscmWCMPosWKoTwSdFL6/hHyLeBAL4iyLcVby5Y7tz4o3u5zjkcLGPoZTH1DxicwEDBaTkONHvMthaLw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/avatar/-/avatar-1.40.0.tgz", + "integrity": "sha512-DayZDsNXbipT+1GUkX29tVhO4hZonDnidwE3SjEQv9Ic9vCdnwP95+B0FPEuaca03F5ZXFqVXjnPmRVbRMyDYQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/bottom-sheet": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/bottom-sheet/-/bottom-sheet-1.24.2.tgz", - "integrity": "sha512-T1nWvpNUvzE29ODZhkjsZCE4yHzkWQ7dNohrDMvMOc7jNlxUOy0SRd4LuiT4ioAg2FUvMZrfcTBBVagc9kv9SQ==", + "node_modules/@zag-js/carousel": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/carousel/-/carousel-1.40.0.tgz", + "integrity": "sha512-9svWc2jjvUP8iQ0afuu/ZAI75PuPLm4qB7h+10rmDrAgUPn7fwUBVzyATKubJPdtmaYQQvTTIiZU2B8mV88oGg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/aria-hidden": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-trap": "1.24.2", - "@zag-js/remove-scroll": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/scroll-snap": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/carousel": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/carousel/-/carousel-1.24.2.tgz", - "integrity": "sha512-gQYZ4+UyCk1vXYYkIBGHWxAZNQBlV1/e1XdQTT1CApKmUAjNwDWf91fcQ733mB9n7MEDTS/vtgGtWQFQNVVh1g==", + "node_modules/@zag-js/cascade-select": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/cascade-select/-/cascade-select-1.40.0.tgz", + "integrity": "sha512-0fkE0Fd2VQ4QsaWXHdgQxHWiaef3UWW0l6Jd47frtMNnrvg5t5Xfqowa7c2S23hcduOUfz2WC0xEuGXnO4UVDQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/scroll-snap": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/rect-utils": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/checkbox": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/checkbox/-/checkbox-1.24.2.tgz", - "integrity": "sha512-+ibuzfVW9Nx84r04cd1SxdI3P19/bnexmMzw7zZu/17pSvO4u5v6HSKi24ARVv15sw1ujjcfHd1qlDmtWZFyJg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/checkbox/-/checkbox-1.40.0.tgz", + "integrity": "sha512-oFCgnkOjrUDejB1wEp5s3cyJ+uFe/GoI3+wqNyckqOtcdKL1MBxy193GYVdj0LDfuCNrk8V0aIJGTdusCD2b4A==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-visible": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/clipboard": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/clipboard/-/clipboard-1.24.2.tgz", - "integrity": "sha512-3E8c3IJubkJGxGJRAB7nmoFGLxM6LiaANz0JH4WxOt7lIu+5jxIxzLVRGAQI3/Vtn1Qxm34+Ffqqw2PW/J+6qA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/clipboard/-/clipboard-1.40.0.tgz", + "integrity": "sha512-QbFhJMwwUxTKcbWyb9ZrKgAp13U4+IzfHSLhPxbDVSQ15mIrjIkjW68gS6ElzhRDwGr1qawkZVApsqcToUqSaQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/collapsible": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/collapsible/-/collapsible-1.24.2.tgz", - "integrity": "sha512-nmMRljiM2AfcmGW04dgPOQjjuteGj4wbaURJiN8uyFnDKavUZH7BIT8knu8iA59Nj8m6UctDIcasRreUd6smxA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/collapsible/-/collapsible-1.40.0.tgz", + "integrity": "sha512-xDLY4j9D3gdoTirkwzMaCtelfCjnMhBzPyY6c/mh4oPvD3RB6dr3V3kI80i3yxHaUUeDCIUm/XAxK0InPsRBug==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/collection": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/collection/-/collection-1.24.2.tgz", - "integrity": "sha512-vqNnn9nAmz5lz8pHhvjNdCrPHj76aZpoaRFe7DQdcnwlrbNjASUKPiN4lG5ZgspOMnQqZ0teR4fyjaCa+cH+xQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/collection/-/collection-1.40.0.tgz", + "integrity": "sha512-+3o1nvbcA9Kz2hDDFf8Kngpd+of33S4TS5Tb9KvrHlU5ieQdvEUtc7/pWG2aCTkGpmgda+j91akB6ZB8+oVkvA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/utils": "1.24.2" + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/color-picker": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/color-picker/-/color-picker-1.24.2.tgz", - "integrity": "sha512-FKK4tNATGKjAfwpxqgAyM8uecZa1ebTP8HSLc2c02hL5C7VUEcMrGP7SYBT/eOYXME1iHIA01R6ArmIzVhVdvQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/color-picker/-/color-picker-1.40.0.tgz", + "integrity": "sha512-lT93xd1BlNBbitl2RxST8ARYE6q/HZD5a0QhMIT1RbndB8F4e9j/NxkStgE9f0QqgpC/rO+nKHLoR+H1xs/EkA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/color-utils": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/color-utils": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/color-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/color-utils/-/color-utils-1.24.2.tgz", - "integrity": "sha512-p/mkEA7lAH9YFyAHIEAbCXJW0cUkJNDXcq8OAkx/pq+mL+dDPLgjN4GKfb+Hhur+n/e2Jd6UTYEDmCEFUgC3fg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/color-utils/-/color-utils-1.40.0.tgz", + "integrity": "sha512-PZihcGheb5bn0/cEUwozjJjPoKkEwlJNpTA5mUxj/+sOElLaZM+zY2AnGYeMl6w5zIyZZUDoJMIT5rcb5sN87g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/utils": "1.24.2" + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/combobox": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/combobox/-/combobox-1.24.2.tgz", - "integrity": "sha512-o/jkby5ry4IUAm8GT04RbMdd3r8xk7RTAdnNRdvv4R8ZJtaDDL+wJVFq5ITeFhtnvmAl3GD+Isn2kJ3fut0fHQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/combobox/-/combobox-1.40.0.tgz", + "integrity": "sha512-5IVCDrB8m7XrKBu28j7bIRE5KiyKJLPDZB3AJ+PLJyL69D+9z1anhLDmkUYcPseyCasszLKzIejby+kYQJgHlA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/aria-hidden": "1.24.2", - "@zag-js/collection": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/live-region": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/core": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.24.2.tgz", - "integrity": "sha512-LBJBNpaEixfIKLjyfcuudTdtnVJmj60iLK9flI3D7BeziU/nGu3CsNxh0miLCR2Sdl7jFEseyGrK7HLhTaRMLw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.40.0.tgz", + "integrity": "sha512-0YcqCh7TmhSonkbKM/7NWolxlaQgvvXgqedocW9oeRYiDJIpBZyRqnHPoGAS2XwbBPkCnrqSosxSF5yBjhZpgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.40.0", + "@zag-js/utils": "1.40.0" + } + }, + "node_modules/@zag-js/date-input": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/date-input/-/date-input-1.40.0.tgz", + "integrity": "sha512-/VU8g3dugggC5xW2OJW1KONWzPkEbK/yLA0lPxymW/Uo0ixh2mKJUVTOTqDFWf1b0vzLX2XlYoLL+I2ryUyPvA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/date-utils": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/live-region": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" + }, + "peerDependencies": { + "@internationalized/date": ">=3.0.0" } }, "node_modules/@zag-js/date-picker": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/date-picker/-/date-picker-1.24.2.tgz", - "integrity": "sha512-8vpztt7RwrreqXdV4vwotQ0susaqQfOmqdMh++j31UMsvmRinNiFo75hL7/5AvPwpBnt9lmtWZYBw2WY5DFnQQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/date-picker/-/date-picker-1.40.0.tgz", + "integrity": "sha512-Nm3aSKn/5tGOZk8rIddLyBk+oeE0zr/ZsJuuTc3rysd04owVy1UhmUh6X9CqfTJtwTDpUZe+orHaIvKlE3Rd0w==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/date-utils": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/live-region": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/date-utils": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/live-region": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" }, "peerDependencies": { "@internationalized/date": ">=3.0.0" } }, "node_modules/@zag-js/date-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/date-utils/-/date-utils-1.24.2.tgz", - "integrity": "sha512-wtrbE4LTs8h+9U9mqJPFg+RqdRofTISwMCY1nD1gApCwMdp9Gov9me0CcV+JshXgOEBSsFoZXt8fvSINN0gs+A==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/date-utils/-/date-utils-1.40.0.tgz", + "integrity": "sha512-nuB1QM3X7yY0k2JiZbHHm6wigY+Cl1QK6sRlh+C7mOyzEKnNEqNSVIqgSionCtWO6zAZh1R8Znp5ZeCdbbc27w==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4743,557 +4607,555 @@ } }, "node_modules/@zag-js/dialog": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/dialog/-/dialog-1.24.2.tgz", - "integrity": "sha512-70dvyikN/f3qqhI9mGB23oMGeTmjjZmhy5ZXDCwNL1ZmZ0SnGB3QdsHEa/DDyoXC2qSO8XhOUgEp3hNukXujXA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/dialog/-/dialog-1.40.0.tgz", + "integrity": "sha512-1FHxR7/Kuu+9K2dxH7dKlSckCZ26n5ec79qWr0aMSSs2DF+ypQf5GUlaS6z2UqroZvIoJCvABVMm9OMko/qxlA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/aria-hidden": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-trap": "1.24.2", - "@zag-js/remove-scroll": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/aria-hidden": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-trap": "1.40.0", + "@zag-js/remove-scroll": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/dismissable": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/dismissable/-/dismissable-1.24.2.tgz", - "integrity": "sha512-POmhCyjm8cRIThuK3icXjt9ic3OrYjN3N0jQ7uT5xAitX5eyGR+Tb7Mdf5J1R6iuX19t0t6ova+h3XIx6YDWHQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/dismissable/-/dismissable-1.40.0.tgz", + "integrity": "sha512-bBkFvPg/zbYn31ZgEfx8not6s2Ekx7zU2sO8tGXb8rYPnHBfGDYEzVQansUStJn0Atzw+y7XR7B3G3u5AFQJKw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2", - "@zag-js/interact-outside": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/dom-query": "1.40.0", + "@zag-js/interact-outside": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/dom-query": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.24.2.tgz", - "integrity": "sha512-CrjxXni9S9sxuz64uveHDGsvXcZPuN8ydg5+UFZh0MTXCCpS2nFdSWJ1ZN4uyak+X0CdyIEvvbzdxmEhBi33dQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.40.0.tgz", + "integrity": "sha512-4J3EO2gHpZ1VZiGLuMlH6G1Tsp4gKB8PPt2yKeNQWYGEXyrHUXrvMhRUzv7Z4/2I1s1tnxlFG4F8ovB3kTpz/Q==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/types": "1.24.2" + "@zag-js/types": "1.40.0" } }, - "node_modules/@zag-js/editable": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/editable/-/editable-1.24.2.tgz", - "integrity": "sha512-ZSvBcVi3OMuChGj6IGCnX7QoF9UVAhdHelKp3q2/qfWq6ykwFUtO8erYBkEFmkdGqRqdlnbtidBRBoh0e9dLdg==", + "node_modules/@zag-js/drawer": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/drawer/-/drawer-1.40.0.tgz", + "integrity": "sha512-N2OR5ZYuTsWkYYmwsNgmL+wfuM3qUxB8GAfo53AWvOh07QUVz1Dvh1WP4km5L6Tkz4UBQZACu8T/ZLyeZ+PdWg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/interact-outside": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/aria-hidden": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-trap": "1.40.0", + "@zag-js/remove-scroll": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/file-upload": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/file-upload/-/file-upload-1.25.0.tgz", - "integrity": "sha512-HxGEPTkpq4v/d54oWMZbyTxE170jaagskiEqbIXpgD220PsQAgShr7OWexUqMwU7y58on1ijqTE6jBEZyOnAqA==", + "node_modules/@zag-js/editable": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/editable/-/editable-1.40.0.tgz", + "integrity": "sha512-X23wOg42BPvFWfJQi3yd8HiL8xtisrpL5ouFEzba56SQIxWZHDRpeWoqXqyLODq2/z2+SsZ0wV3laRD3ZH0C2g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.25.0", - "@zag-js/core": "1.25.0", - "@zag-js/dom-query": "1.25.0", - "@zag-js/file-utils": "1.25.0", - "@zag-js/i18n-utils": "1.25.0", - "@zag-js/types": "1.25.0", - "@zag-js/utils": "1.25.0" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/interact-outside": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/anatomy": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/anatomy/-/anatomy-1.25.0.tgz", - "integrity": "sha512-U0qIFaG9xY67cokCIAcFLPGWkst61SW6AxZ76rjh/nJyYmvRG1CQDkvc5EXX9o6pjKqUd0/nSlbQc1GBcwaEtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/core": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.25.0.tgz", - "integrity": "sha512-B3ZBqabQV+QdtHCi1t5D+Ekh7RJ2X01hfjFjU3AsXbW0LiHAzcAhT/lLjrItwZZyhI4pIer33MlI5DNPeXhD2g==", + "node_modules/@zag-js/file-upload": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/file-upload/-/file-upload-1.40.0.tgz", + "integrity": "sha512-hUZlJYjSGk7SAflTmQIjZv6M+icujaHS6I+dik2LM48rLWwNa/GYTNx+uY4zJLd9oW1eEj+6NcCYZpPWzKku4Q==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.25.0", - "@zag-js/utils": "1.25.0" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/file-utils": "1.40.0", + "@zag-js/i18n-utils": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/dom-query": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.25.0.tgz", - "integrity": "sha512-XN3kc9zQPWR0LiLoz+U/DZzSjheTdHpBvtXykvgSqNNNsU5DcSOH60hydzLYcIf/1++/aua2SG6vajZHpSxHtg==", + "node_modules/@zag-js/file-utils": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/file-utils/-/file-utils-1.40.0.tgz", + "integrity": "sha512-BGny4rafiBQ5TPCBXfzbH7lSyFdnoix7brq/+FllKpDqpWPQz0tIsgSZueF/Z8GPTrAkwMKOFI99P7OVhAhRig==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/types": "1.25.0" + "@zag-js/i18n-utils": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/file-utils": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/file-utils/-/file-utils-1.25.0.tgz", - "integrity": "sha512-VCyftEzP4C1FoHcqX+7f64JBWOzpADO8K1kttV6cOR77Gu6AkeX8v0MH6d/kzdgUrTVZnW6a/azyVzLFKcepBA==", + "node_modules/@zag-js/floating-panel": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/floating-panel/-/floating-panel-1.40.0.tgz", + "integrity": "sha512-e2QXwapCbjLJnU+MAz06CoByj4XJ3sdSBgWF+PSe2X2T8dd/FkZUnaDPaX0yyfyTWKzBbyRRNyon2LMAs8ndHw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/i18n-utils": "1.25.0" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/rect-utils": "1.40.0", + "@zag-js/store": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/i18n-utils": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/i18n-utils/-/i18n-utils-1.25.0.tgz", - "integrity": "sha512-W/P9kmWhJSios5QcQDXgnsshIAaTEifoRqEsin7hVnFE9olDUDAC4IfwDfP3I3muJ7BTTst4GatIh9eCbG/qWQ==", + "node_modules/@zag-js/focus-trap": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/focus-trap/-/focus-trap-1.40.0.tgz", + "integrity": "sha512-Q6W+DU7pix5rtRwoDnYzTYMkUV2kMWrFV0/EdNN3spFSvnUSkDWRmcNpzf+56AuCNeqsAZxaLJpsHLZkcT2xrw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.25.0" + "@zag-js/dom-query": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/types": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.25.0.tgz", - "integrity": "sha512-EmgettGQcHtZUp0I+XDSknpsbfsreYVD1U0XC0N0Xnpamn9elAC0ESbmP8bisjrGoN07m5ky4QjSMkkQotu1SQ==", + "node_modules/@zag-js/focus-visible": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-1.40.0.tgz", + "integrity": "sha512-63byl/kLVzDYlnHFma4HKEKrqB1Vx2zg0sBmUSENPyh+Ia1xhEVVC5vu6GX7nu4t/8QRy3Jn0q7T5og81FGb1A==", "dev": true, "license": "MIT", "dependencies": { - "csstype": "3.1.3" + "@zag-js/dom-query": "1.40.0" } }, - "node_modules/@zag-js/file-upload/node_modules/@zag-js/utils": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.25.0.tgz", - "integrity": "sha512-Mfrsr1N+FfsTNBRLk8YKSUFTusoo/8kjZFFrbHEs7KQQHPB/TOJDEjGwzZCxjwtiqt8geBsUdMbsitHkXzEnnw==", + "node_modules/@zag-js/highlight-word": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/highlight-word/-/highlight-word-1.40.0.tgz", + "integrity": "sha512-+aeVn3S5NPG6Tk4Sanl0VZk/0atjnF7Xy7POPs1HD5SBui29/6i3vn3bUBNXJXrnhUoNrUhuySVYVhgkffcQ7w==", "dev": true, "license": "MIT" }, - "node_modules/@zag-js/file-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/file-utils/-/file-utils-1.24.2.tgz", - "integrity": "sha512-feQ9nMOZwuGae2VXyFGbqzb5DEej2Eo498o2KZVHmyA216vVx1ZOQpTsVrrvJV8KRxS6ULoKZNGe5QuHfwBWYg==", + "node_modules/@zag-js/hover-card": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/hover-card/-/hover-card-1.40.0.tgz", + "integrity": "sha512-lkuLaikPLBIOnR0X75kSXdDYgv3ritAsn4TF1eGs12iYnZVX4PTL3J39tVNm9QrEXZ+iKcA1D2cUXNhEteCTyA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/i18n-utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/floating-panel": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/floating-panel/-/floating-panel-1.24.2.tgz", - "integrity": "sha512-pI+YQGsJwGn4lTHx67qVLgeLotP87F5PQToUv6t1CsuVJkmL6fxP3vQNflMSL7XNAX06jVCaug7RW7V+SehHIg==", + "node_modules/@zag-js/i18n-utils": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/i18n-utils/-/i18n-utils-1.40.0.tgz", + "integrity": "sha512-8D3ki9V81gMKZvtRfNVoHCBDVYjr+WJLBvdfSv3cdOsVM2/E8//xAfYbYzl5Fdmeny3H71fxBNqOX05GN4K6OA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/rect-utils": "1.24.2", - "@zag-js/store": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/dom-query": "1.40.0" } }, - "node_modules/@zag-js/focus-trap": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/focus-trap/-/focus-trap-1.24.2.tgz", - "integrity": "sha512-ztqxOaB7Z8zOZH4HvHnMpKREhrTAcJICRmHgwx1Dfq5SqymlMBnFD0zwS/F0mlbZqzz9eV9yYLAd1Xy54OdeGw==", + "node_modules/@zag-js/image-cropper": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/image-cropper/-/image-cropper-1.40.0.tgz", + "integrity": "sha512-bpTCaiUXM0Mh6ddoJ1fA1B/YXp5Fc8LA0hg8CuEByDwGRVKPJ0KotL6QXMF6cEJZ1fcHF3Lcmpbj5Xotfkr4mA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/focus-visible": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-1.24.2.tgz", - "integrity": "sha512-/A8CEy+2w0xCTIbDuCB4nfdBxgVQYP6oaFb1zmYXmf8HWFlSXDxuUXb1oXrA3vaoNG/X8sJJilpacYdV1dVhxg==", + "node_modules/@zag-js/interact-outside": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/interact-outside/-/interact-outside-1.40.0.tgz", + "integrity": "sha512-Fws+O4uD9vS0I5KVcf3U2tNjLKvqlv+RExFbTywckDLOCJ145M/pMQWTr1FHil04jk5PFyM1iGfsbom8tozHpQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2" + "@zag-js/dom-query": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/highlight-word": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/highlight-word/-/highlight-word-1.24.2.tgz", - "integrity": "sha512-5aBL0vp8zQ/v2bNOL9SBMxpwM95Sn/TascpceOG3HU66NfqaJmStg38+UvZNIl51QuKZ4Uo6gauNJkbnYcc+hg==", + "node_modules/@zag-js/json-tree-utils": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/json-tree-utils/-/json-tree-utils-1.40.0.tgz", + "integrity": "sha512-7zEzU59Gz76nV7n3l70uMB5yAOOQMmt1PTAni6S97uw7/6KzPktsEWBcw7ocC4IIA42PKdT7akpq721H0vthbA==", "dev": true, "license": "MIT" }, - "node_modules/@zag-js/hover-card": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/hover-card/-/hover-card-1.24.2.tgz", - "integrity": "sha512-qfdLbprSKr3aiBW3guG7lmCGZ2PuJP99if4dl7TZ3BA/zisr3s2YgZOX2bfmHVtpCjeuhrEE0RPqLZ0iqXFrLQ==", + "node_modules/@zag-js/listbox": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/listbox/-/listbox-1.40.0.tgz", + "integrity": "sha512-zB33y+dk6/e0ZTs3wun2KsuPaH/wygOuD8scnH2a2Y/W9a2P1rq503Kgm5d5kVXBKQLxOBwievWJ8Blajv8LnA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/i18n-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/i18n-utils/-/i18n-utils-1.24.2.tgz", - "integrity": "sha512-4Y9w7WDJpfy17SI3Ey9h3FZ448KsfqmFu7BshsWWCPJTGAPvkomZurpiU6CHc1sk+v2YKvUKqnJ2jj9aUu4PGw==", + "node_modules/@zag-js/live-region": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/live-region/-/live-region-1.40.0.tgz", + "integrity": "sha512-i1Dx02KGcQOAZGNhkFe8kz26gYJcn7KsT/M1UovjS9RTbl9diY8ShiyfIAhqruoaHQyqsHMRh/f7Idu45HdiDA==", "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.24.2" - } + "license": "MIT" }, - "node_modules/@zag-js/interact-outside": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/interact-outside/-/interact-outside-1.24.2.tgz", - "integrity": "sha512-/DH1b58szQgTqz3fL+cbg51X94DohahPkuCgiGs6wdPK3JwMFlPJHkmU3SDUXQJTpwLOsDIqMVq9sO4jo7fiGg==", + "node_modules/@zag-js/marquee": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/marquee/-/marquee-1.40.0.tgz", + "integrity": "sha512-XfvAwSNYXV3fEIRc44a9sAsoJoLKt+CWbpSPgQBpiFPpWh0rZ8frUZCslevTzBB3ifIWoSg+svDHQOGsDa8wGA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/json-tree-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/json-tree-utils/-/json-tree-utils-1.24.2.tgz", - "integrity": "sha512-SFHBmOujTIlG2uVUOaywme2G1N8ych9RJGrUh2CBwRaIIGjc8La9GSMJcx4qIm0UtvMx7I18O2Cx29Zvrc3Bmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/listbox": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/listbox/-/listbox-1.24.2.tgz", - "integrity": "sha512-RjXxLfBJ52Kod7vqmsMFOimWD4wV+90dzs6itehnAPxtpIVS5hlXM9USCnDda97DQuyL4Ke2j7+NRJ/ikkgSpg==", + "node_modules/@zag-js/menu": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/menu/-/menu-1.40.0.tgz", + "integrity": "sha512-FRBqwsOjxBi0eSwqwrOw2td1rd0Xxl0f41J2lGc8E7z+2PabbBcJ/poqSiEn8YoaCT4mAWNjt4QQU/Pe1bRJ/g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/collection": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-visible": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/rect-utils": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, - "node_modules/@zag-js/live-region": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/live-region/-/live-region-1.24.2.tgz", - "integrity": "sha512-X5gp7m5/o7VeQ8hI2ffi9nEVkdCDcCw5wtSx9gFww6WeD6HJMkY/4HbTdi7ALvGVg9gNIMr5F9zrrzpvgc9DXg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/menu": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/menu/-/menu-1.24.2.tgz", - "integrity": "sha512-vBsFMcEoXfSyN+v1LlLtP2x4aRabLo41/e7ATWjCL41vYSSEyX0dxkpKh5pvJUZebO2SVoQPJ91WGhBCCW9GPQ==", + "node_modules/@zag-js/navigation-menu": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/navigation-menu/-/navigation-menu-1.40.0.tgz", + "integrity": "sha512-aJkEGYH8P9NfsQOjxMzxuF4YrrV2N1GQj6Y5Ow19MKuLh42o35bUhwoGsYjFbxgEcImabINtZJqtAPAkOdJXmQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/rect-utils": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/number-input": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/number-input/-/number-input-1.24.2.tgz", - "integrity": "sha512-FkgT0cvkDdT2UmDoKtgEkGeJTMV7PhYSwVfnm4mIf4/f6rzSngbQWDw1pUgeQgtQkwyHnONWX9KcUT4bMSe1Zw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/number-input/-/number-input-1.40.0.tgz", + "integrity": "sha512-WffdeqSOpsKmgPzBkNZl9nAolQPlyl9dIabaPguGgXdYtZW/OGCGj8jCYqyEu4VL3kDPPVVQRWEqC/XzwzVCRg==", "dev": true, "license": "MIT", "dependencies": { "@internationalized/number": "3.6.5", - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/pagination": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/pagination/-/pagination-1.24.2.tgz", - "integrity": "sha512-ULWw+RyOiJ/2OTCo6STxTwlSXoGbQp2cvNDF0gs6G+hukqlITlNWM0cPpgsRYfuFrtb6B6Lw0C1Z3JYbd8uj5Q==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/pagination/-/pagination-1.40.0.tgz", + "integrity": "sha512-Ykotky0A/7rswb6BfOD9aXL1EssKwUYfBRbdWGe52uhVc7dGagMSTUDRVeNhVsP/MEdtwqys7urvDbAlEqq+GA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/password-input": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/password-input/-/password-input-1.24.2.tgz", - "integrity": "sha512-O/mu3oIp3H5TPG7CKfGhvlYRfoHXQA7d65feKd/iyPAnq6U6/nFYMmrrsLnEZ8FUSXYNGRTZnL5eFUKfph7WRA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/password-input/-/password-input-1.40.0.tgz", + "integrity": "sha512-mD4tbA4m82oV+0NbJ+P00Q4Gwz+zf1kZEZ3Z48ohICfK/WO1KhCgviY7vu/7bCMnRiD3dbi+nEeym8Kb29wRHw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/pin-input": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/pin-input/-/pin-input-1.24.2.tgz", - "integrity": "sha512-SQ8StSG/XrWbZetYuSmUWpmEphSKfmYAUZ5SItE4fd61Q1UbrahUDANU6pKhz01sLTIpga0Mjld6avod07qXCw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/pin-input/-/pin-input-1.40.0.tgz", + "integrity": "sha512-iJIXDJC+9DUx+A3sRdTmHV7vPZXCw9O6le3R0lKf/8kQOgj7FKjbVw2SkUMAoOZ0u5J7Zwg2oZc7ddt1pwUk9w==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/popover": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/popover/-/popover-1.24.2.tgz", - "integrity": "sha512-BBMBxjMTfeDHCg0wg8ohStk6MPTrmCa0PuOSNDeK0Mr/0i0Vv0EjsSiXuu5Wt1LS237XV1BIaLxt322dW+RfVg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/popover/-/popover-1.40.0.tgz", + "integrity": "sha512-bjvOep1YNlsvIYGh/rPsFCHjH2cCt2aKsVLyRvzTT1jhGZJvBdQKQBJjSuG5Nh4y1PUqtrrz69ZMWRrJGQ3rNg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/aria-hidden": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-trap": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/remove-scroll": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/aria-hidden": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-trap": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/remove-scroll": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/popper": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/popper/-/popper-1.24.2.tgz", - "integrity": "sha512-rimqYBOcM5Aj0AntZFIS2hXv96/QnVASIhFx4GoaiHd3DxadMdJVZ3EsKC1JSNveFEjS/0z7IuuAATTF5x61kQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/popper/-/popper-1.40.0.tgz", + "integrity": "sha512-rCkgqgwlpgMwcnuSVrZK2xXl1Mvptpuw3cZy6rC2C5F3yE1GmWohdts5VkeQNro+sd/xHTdVovOqY6cU9Htj1w==", "dev": true, "license": "MIT", "dependencies": { - "@floating-ui/dom": "1.7.4", - "@zag-js/dom-query": "1.24.2", - "@zag-js/utils": "1.24.2" + "@floating-ui/dom": "^1.7.6", + "@zag-js/dom-query": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/presence": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/presence/-/presence-1.24.2.tgz", - "integrity": "sha512-aA1P3pe07cLHnGmMpVyAoBY/e38IQYvqFv3cjLT8B8KVUacjXKnv8AhJf4D/60+XzyZCv79HcTwcFU6EGUrVng==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/presence/-/presence-1.40.0.tgz", + "integrity": "sha512-P0bAuzEIDuMglE1xfmW5xTuSBlWjNZ8nOGXoIksKOKb+b+jy2Vys6WjZjKipV/jop4u85wfzKchcPc3C+cXuog==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2" + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0" } }, "node_modules/@zag-js/progress": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/progress/-/progress-1.24.2.tgz", - "integrity": "sha512-8A8Cy7b+EOYxoR0tVXa0RiNBVNVcVtWP875QrA5D1/Hj4KnAkj3W3Ee5NOicpRKkORCELHRy5fRcDTUzbsjeRQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/progress/-/progress-1.40.0.tgz", + "integrity": "sha512-V61a5CHEs8suevQVS+/1ENj1RDVYNOUUTawK6uriCA6Ol59xe30DmF+eV6Y9miM7L/pN3YjZRq9uEDJMXXK32g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/qr-code": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/qr-code/-/qr-code-1.24.2.tgz", - "integrity": "sha512-CCdZ2Wch1inyR5dLb7Kh8QqnlzY28R2Elv19W+O2Yvkdbkp16widXGXPoHMt9tIWqaMhXwIXkNEp1JmoiGnfhg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/qr-code/-/qr-code-1.40.0.tgz", + "integrity": "sha512-xD37tVrQ46CeqVLqkSm61kURoJ4Z/uOFcB8z7Hu3UX+1OFTfkhgrns6iLUneoRjO3hsqQaTaVkxVOQeLYWb+wA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2", + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0", "proxy-memoize": "3.0.1", "uqr": "0.1.2" } }, "node_modules/@zag-js/radio-group": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/radio-group/-/radio-group-1.24.2.tgz", - "integrity": "sha512-ffPeO+P4RvNoGoM1ZsBoiIwJ4zKXbhm8QuHMdKRl34A4TzipzHC2ppAq1cIZ7q+ZubefH0QtZbsvmz1pAo0Z3w==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/radio-group/-/radio-group-1.40.0.tgz", + "integrity": "sha512-sFJCdyOKzQC9hylSP19R71yv44by/C78D9EHfsxQJtvOgDv9E+h13NNX4n9wWyubC20xftlxkja8sNT5NfJKUw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-visible": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/rating-group": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/rating-group/-/rating-group-1.24.2.tgz", - "integrity": "sha512-ZpKayCuPX7ysiZWv+JlNIWnPtflSJlJ5C9lHozTtFqCvyELp5ZAtoO5EQN5cM+aVJe2RNgNsMQf37Fmdv4XaiA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/rating-group/-/rating-group-1.40.0.tgz", + "integrity": "sha512-UMBI3xAMcm7otpAczMGPEA7jC1hvV8NhnZ4mN3oftJB0bc1winoXxJdCkrXN58TTNWrGNSRzjtm048G+HPCdpw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/rect-utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/rect-utils/-/rect-utils-1.24.2.tgz", - "integrity": "sha512-Iuk/diClriGtYL2PGhProuZhb7SWJ+8IdyaOUP3fgeLORKEQsLcM0bYp1pUO5K5rf/ZnlzGBnkb3/ewkkO/kFA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/rect-utils/-/rect-utils-1.40.0.tgz", + "integrity": "sha512-ikgLuE4rLlACm4mGLp6Ga8sJA44uFwohA1nVmb95sQ+VIyx2naf91CEF7SMrZVEwFKHaHpxdKVQSZLRjJqO/dw==", "dev": true, "license": "MIT" }, "node_modules/@zag-js/remove-scroll": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/remove-scroll/-/remove-scroll-1.24.2.tgz", - "integrity": "sha512-PLXXBw3NxVAfm7MbNnM0TVlv70Kn+xYFEbKxUBWhD0d/qoqsKJV/xS7N4yO5QPZg9UgXMvtRDtINGWoJvyuAlw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/remove-scroll/-/remove-scroll-1.40.0.tgz", + "integrity": "sha512-f6EgODnJMRtkbgdJCgyllND8jui+RtPrCZy6JYhhOg7KQ+bFfV36KzWQMty38ZdOyrh23UUO7MJ3WGcFXPvk3g==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2" + "@zag-js/dom-query": "1.40.0" } }, "node_modules/@zag-js/scroll-area": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/scroll-area/-/scroll-area-1.24.2.tgz", - "integrity": "sha512-upT0IorrklcUwsQSzR9UPMYnqP4lbRTUMT0vJtKpKXboPOUL7Fj8mBffQnL6vNBfD9CAMUBV/hPS6SzUFe71og==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/scroll-area/-/scroll-area-1.40.0.tgz", + "integrity": "sha512-7EtWETRIn8dY7xqAeMOlnEuzhOrtc65mN/0YvT3XYcBz/CzmHzyZTmos3UXBJGnKHSGj61aEpP9g3RK+x/w63A==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/scroll-snap": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/scroll-snap/-/scroll-snap-1.24.2.tgz", - "integrity": "sha512-NPJIOEALQYetbaulHvGjnwlbewmmrEvfP/CcB6I5/YrMJDN73nJi+f1vSymdw4uhxBnKDLnxmPkb+oOpyI0Ceg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/scroll-snap/-/scroll-snap-1.40.0.tgz", + "integrity": "sha512-XtjeOd+pwGX0+K7NvsQncrKwV8CTSzHfVVJrdQ+MweiWBpGNeAh43ySN4L+KSTgtnUiZbuwBIxlKK0tX+WupgQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/dom-query": "1.24.2" + "@zag-js/dom-query": "1.40.0" } }, "node_modules/@zag-js/select": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/select/-/select-1.24.2.tgz", - "integrity": "sha512-1HSr+2XlymRUgtchTTD7c/+Shwiloei7BIzcEXQvYaUzVMTc6yjs2fSpemF76SX0KwiqlNSY5++HV3R1Szkvpg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/select/-/select-1.40.0.tgz", + "integrity": "sha512-auMI9SvocVvKHNWF2DobyQN6+1k3OO6UsQTdkofvbHxX7maosy8ZXA6k1r9Ndt4qLUu7CbdAAQ+qJ4VkgJyvxA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/collection": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/signature-pad": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/signature-pad/-/signature-pad-1.24.2.tgz", - "integrity": "sha512-NMb+g6wj06JvW1dES0Rk4Q1PNQQM1Y11MGW+rRX1KMsP8ieH6DdS5BvofOvNhxQ6+/Y8p+XWD0tGxudOTU2j/Q==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/signature-pad/-/signature-pad-1.40.0.tgz", + "integrity": "sha512-L0LTxcpdckaGdDDXcQCr4AG+J9xUHH+lsenH7NG4ZI7rSr4nRmHMdDH0GR7nBa6MMdPIIimjWIE/TwZ1OuHzCQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2", - "perfect-freehand": "^1.2.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0", + "perfect-freehand": "^1.2.3" } }, "node_modules/@zag-js/slider": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/slider/-/slider-1.24.2.tgz", - "integrity": "sha512-QxdSIRW96lPT/zJS/1pr2aj1rGujXBZ2ypUyb6JYZizFG55cZtmJqjJaZ81jU251peLuTdhug34C52vAvXyFZA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/slider/-/slider-1.40.0.tgz", + "integrity": "sha512-xZGycm+ghGFG3kTYq8g0t1Av1moxg45WiFz5E3bRgP7YU9beSTaFZI8h6f65NiC5P3YuwA0RoYxA46GH22qoZg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/splitter": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/splitter/-/splitter-1.24.2.tgz", - "integrity": "sha512-EQchsOU4cFOFlBZ3Zql0rmAbUumu/mw0CAg7sjNNUPIDJ7NAOpZSwKtsnfT8pDWeOVIAxTLrlALWW6uY2g4UyQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/splitter/-/splitter-1.40.0.tgz", + "integrity": "sha512-64KNKwlIjyUIjp7i/whDCpREiSFrNI/cF7MpBJvBGRPUWq8NpNxMGKWD+vBCV+JC61QF9xg/NgNoigFycS9sYw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/steps": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/steps/-/steps-1.24.2.tgz", - "integrity": "sha512-nunbmsl4WTkZw6955xeWo9D6XORt1ay2tDsUYHyTJ3rUCeh11Itzmwi7IrJTTSeMtbokYgnF5uoYFHj/pSc7fQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/steps/-/steps-1.40.0.tgz", + "integrity": "sha512-5sVFzcIYubCn1nJSQIx9WWNlJuFoOJMpkD/ZMwNp0LzpnmnspsCOmdnQUWEftMQ1KdwZ+qNgfo/+kHclb9cBjg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/store": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/store/-/store-1.24.2.tgz", - "integrity": "sha512-PZViq7LD4y+6iEB/0tvbqywoEccNXGy6jcOGIg5lwdY0CiPulPMeoLFi0+Etx1/Wom398NqlzecPqT4ZbICYMQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/store/-/store-1.40.0.tgz", + "integrity": "sha512-EmgYIdbNZ4TN4Qht/jugY4UVkaWx69l8P1qiX23U4YwqNLq10tyOJmcXWbvsrprU1dGb24B+xq0WBm/RIjw4WA==", "dev": true, "license": "MIT", "dependencies": { @@ -5301,238 +5163,190 @@ } }, "node_modules/@zag-js/switch": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/switch/-/switch-1.24.2.tgz", - "integrity": "sha512-NRyWy43Npzjwc15flHRB6eVqKPeu7uw4pjdfmTjhj87185ZM/VYDEQHC6G+teXvl+4LW19QV9aDcTAzg1g5bbg==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/switch/-/switch-1.40.0.tgz", + "integrity": "sha512-hUH3AF79ndSFZxt7Plw7mVZV0QlM0kFqKwrAGBEOE77P3rKpOsMJ3wWgMb3w6nwlxGQsbwmMgAFvYUslLpM4Lg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-visible": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/tabs": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/tabs/-/tabs-1.24.2.tgz", - "integrity": "sha512-UCVfUSDlIk+EAL0kgDkWZAj55PSRUXVAhuqqlDnB8t3GO9UsvmxG93US7wEQglpYBydyPqUpDpmpNUs16egd/Q==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/tabs/-/tabs-1.40.0.tgz", + "integrity": "sha512-xqfPC2nQ6Bn4nqy1L+1CVcQcg/Z7K2q753OvsX2C8Wtu+7tF//HyMbOpF6fGikqlLkUzCkvjkqDjdOXcfWN9ZQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/tags-input": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/tags-input/-/tags-input-1.24.2.tgz", - "integrity": "sha512-zl9DffAvHdTY11Qdm4rowG5TMNLCreJ/dOqj4nTxoLV2xYAzVAgejgxKzv0jbB11/GiuT6omcslVcoCh5w/hRw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/tags-input/-/tags-input-1.40.0.tgz", + "integrity": "sha512-3cB7nPlUvzZNZwQw5AaTuxwcRn1n2qkDCjLEb2NEwtmI+YxHbK3k1MtXjTccjcYjU8cAkv+jaeyZPs6KFKQcHA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/auto-resize": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/interact-outside": "1.24.2", - "@zag-js/live-region": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/auto-resize": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/interact-outside": "1.40.0", + "@zag-js/live-region": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/timer": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/timer/-/timer-1.24.2.tgz", - "integrity": "sha512-Hp7cMGZ7UE04VtBWprINZFSX578pyoyiHLLIgSPm9pbUkywVmjL14oKmO64fnOqrdwXSkTnumxo8O0X2P4reoA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/timer/-/timer-1.40.0.tgz", + "integrity": "sha512-Rvet226fhUtZnItjHpUYV7MH0uEFZfXT9PSRrX5jdiU4/P0eWKbirwi//AVeqcWFexXvw6ajYSfQN7EVyr2x4w==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/toast": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/toast/-/toast-1.24.2.tgz", - "integrity": "sha512-mH9iVrAr8asJZNNSWsrCSmtCfzn/aC64fVU610B/pHOiDY6HN0ANYmC+TgSZ29a3Jlts1OTZiKsygWyBuJQ3Og==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/toast/-/toast-1.40.0.tgz", + "integrity": "sha512-EDH43zdiH4Bz30cE6YI9g//qXGOOfWObM3dFLG8I0q/cJRf7/6jO82rwZAHPwfOSfKhUDxStirD8F6eoY6BWXA==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/toggle": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/toggle/-/toggle-1.24.2.tgz", - "integrity": "sha512-sD8/di9RP4cISkp5tml5qJKTmZSCBOHIP/4gwnm2eVeUaT4LOqqH1dRFZWv/3FIQ719xcIo6LX8we2vKYxYCCw==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/toggle/-/toggle-1.40.0.tgz", + "integrity": "sha512-DW7682lzTP2eDlMvrS7tUX3zAm7ufrrKr7VDiX8BB6oXBRETXrVIxCYNuoIdqjwXebdjAoxaCiUZEreRVucYQg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/toggle-group": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/toggle-group/-/toggle-group-1.24.2.tgz", - "integrity": "sha512-71idkWYohYONDD/8FSr/VR3mjFrsTGtsJXBEIGEUfQpgorr+11ryaHbKqq2EMMRLnHs+oyzwegW+laOyvoj0bA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/toggle-group/-/toggle-group-1.40.0.tgz", + "integrity": "sha512-+JKcnfEbdQnr5p7uRvYLdivhUsM6iio71UC10tK74nXYRnYm0/Uvxg3oQzvbNTq9WdcU/DIh3gZVZ2Vex9nBnQ==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/tooltip": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/tooltip/-/tooltip-1.24.2.tgz", - "integrity": "sha512-GYjoZkCR9UMPutaJa24LnUrZSWnFfXbuiLoUPlp8Xg+HkVSM25zOe7IgiNgvXqf9shp7dE0AaVnXiuDjjdDm1w==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/tooltip/-/tooltip-1.40.0.tgz", + "integrity": "sha512-pyrvit+nB8dIwVNTGBRlHPsh7yMJGAxxM1zfY7HOTJqF+n6+6xYTQ4gQ/Ocy1Q7I5kO88+m16naEh0qLFiTZww==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-visible": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-visible": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/tour": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/tour/-/tour-1.24.2.tgz", - "integrity": "sha512-lsgTr+A+/AK1ct6CPRAFNBQy/PypkVtBmQSsPXkTcwdWWvd8lYp6uuyHapXABLLrfqSWQI7rHokhr7QknCN90A==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/tour/-/tour-1.40.0.tgz", + "integrity": "sha512-VczYGFQM9xsSbfy5N0NP91GdKxbYvfPCDAguD+WQSs1umEIgAAozSKPUdV3NNCX5Pq6B1F3dBxi6gYPdNqrAHg==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dismissable": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/focus-trap": "1.24.2", - "@zag-js/interact-outside": "1.24.2", - "@zag-js/popper": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dismissable": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/focus-trap": "1.40.0", + "@zag-js/interact-outside": "1.40.0", + "@zag-js/popper": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/tree-view": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/tree-view/-/tree-view-1.24.2.tgz", - "integrity": "sha512-96P8uOTLKTwO3RzGd5X9ZEVy9JBrIoM5RptiMrk2yqN97HdzXint59A06whCBe7wlQVkJyJK58R0fOKDxjTQaQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/tree-view/-/tree-view-1.40.0.tgz", + "integrity": "sha512-v/20ekjbM+HXDEkpHAz6k8WpoZRmZmdCApDIkIgXVHPRQk+kwAiiIPY20ZDG+DjRu7Lh0MUdQavdZtGj6Ihwkw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/anatomy": "1.24.2", - "@zag-js/collection": "1.24.2", - "@zag-js/core": "1.24.2", - "@zag-js/dom-query": "1.24.2", - "@zag-js/types": "1.24.2", - "@zag-js/utils": "1.24.2" + "@zag-js/anatomy": "1.40.0", + "@zag-js/collection": "1.40.0", + "@zag-js/core": "1.40.0", + "@zag-js/dom-query": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" } }, "node_modules/@zag-js/types": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.24.2.tgz", - "integrity": "sha512-sXL8JHx8yrj8qGwCl/EhydaHoCCEfYwbg1rPWcCwqrpkvhic0KEZAJZMUhcU4dLdx+Oajbv2QeFz6Fk5U2Nn5A==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.40.0.tgz", + "integrity": "sha512-LVvxEyqFv/u9SEe5xdivvG2vYb9cCmbkD+5r6s+IGljpDLaRgv4BYyxEh40ri1ai070tL08ZKmoLfx2/xfvY/A==", "dev": true, "license": "MIT", "dependencies": { - "csstype": "3.1.3" + "csstype": "3.2.3" } }, "node_modules/@zag-js/utils": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.24.2.tgz", - "integrity": "sha512-3U8aYXjktpDmQV4M7nAOj7E4x1XSifG7PrbHqJbTYRm7/EPbwCQEEDPckkkWBmj4UrvltbkXPi6nzcP4Qpw5bA==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.40.0.tgz", + "integrity": "sha512-XUpqDtXfHe7CySjOhLPLj9H8rxbiFUJAGgmBzNdpsGPP4wx12cpOXrpSjRXZ2kMwooMPz/P7RPDBteto8sqhAQ==", "dev": true, "license": "MIT" }, "node_modules/@zag-js/vue": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/vue/-/vue-1.25.0.tgz", - "integrity": "sha512-Yh5w+BCZjHrcDIVvxhDvUieUYHRr9D6jX22Jyv14XNv0uAGnBxQ1XBMwdzoKa6TIaB2hsYnrclOPXvxjL+cQvQ==", + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@zag-js/vue/-/vue-1.40.0.tgz", + "integrity": "sha512-sUkJfuESY42yNnSXszpkz4PCreW0rvEWir1s01zhow1rDi7WCNO1P7Jc9VrS5goVyzqsfInedUX2nzOO7XV5Iw==", "dev": true, "license": "MIT", "dependencies": { - "@zag-js/core": "1.25.0", - "@zag-js/store": "1.25.0", - "@zag-js/types": "1.25.0", - "@zag-js/utils": "1.25.0" + "@zag-js/core": "1.40.0", + "@zag-js/store": "1.40.0", + "@zag-js/types": "1.40.0", + "@zag-js/utils": "1.40.0" }, "peerDependencies": { "vue": ">=3.0.0" } }, - "node_modules/@zag-js/vue/node_modules/@zag-js/core": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.25.0.tgz", - "integrity": "sha512-B3ZBqabQV+QdtHCi1t5D+Ekh7RJ2X01hfjFjU3AsXbW0LiHAzcAhT/lLjrItwZZyhI4pIer33MlI5DNPeXhD2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.25.0", - "@zag-js/utils": "1.25.0" - } - }, - "node_modules/@zag-js/vue/node_modules/@zag-js/dom-query": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.25.0.tgz", - "integrity": "sha512-XN3kc9zQPWR0LiLoz+U/DZzSjheTdHpBvtXykvgSqNNNsU5DcSOH60hydzLYcIf/1++/aua2SG6vajZHpSxHtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/types": "1.25.0" - } - }, - "node_modules/@zag-js/vue/node_modules/@zag-js/store": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/store/-/store-1.25.0.tgz", - "integrity": "sha512-i2mmHkrBK5cCNh45EKfG3nAumH/H/DHXspMWoO3xMaGL6dMi2hdJ6EN4GnJESPWj4ptC1kEdeFuJ835mdaJp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "proxy-compare": "3.0.1" - } - }, - "node_modules/@zag-js/vue/node_modules/@zag-js/types": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.25.0.tgz", - "integrity": "sha512-EmgettGQcHtZUp0I+XDSknpsbfsreYVD1U0XC0N0Xnpamn9elAC0ESbmP8bisjrGoN07m5ky4QjSMkkQotu1SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "3.1.3" - } - }, - "node_modules/@zag-js/vue/node_modules/@zag-js/utils": { - "version": "1.25.0", - "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.25.0.tgz", - "integrity": "sha512-Mfrsr1N+FfsTNBRLk8YKSUFTusoo/8kjZFFrbHEs7KQQHPB/TOJDEjGwzZCxjwtiqt8geBsUdMbsitHkXzEnnw==", - "dev": true, - "license": "MIT" - }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -5544,9 +5358,9 @@ } }, "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", "bin": { @@ -5566,51 +5380,6 @@ "node": ">= 14" } }, - "node_modules/ai": { - "version": "5.0.121", - "resolved": "https://registry.npmjs.org/ai/-/ai-5.0.121.tgz", - "integrity": "sha512-3iYPdARKGLryC/7OA9RgBUaym1gynvWS7UPy8NwoRNCKP52lshldtHB5xcEfVviw7liWH2zJlW9yEzsDglcIEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@ai-sdk/gateway": "2.0.27", - "@ai-sdk/provider": "2.0.1", - "@ai-sdk/provider-utils": "3.0.20", - "@opentelemetry/api": "1.9.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "zod": "^3.25.76 || ^4.1.8" - } - }, - "node_modules/algoliasearch": { - "version": "5.46.3", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.46.3.tgz", - "integrity": "sha512-n/NdPglzmkcNYZfIT3Fo8pnDR/lKiK1kZ1Yaa315UoLyHymADhWw15+bzN5gBxrCA8KyeNu0JJD6mLtTov43lQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@algolia/abtesting": "1.12.3", - "@algolia/client-abtesting": "5.46.3", - "@algolia/client-analytics": "5.46.3", - "@algolia/client-common": "5.46.3", - "@algolia/client-insights": "5.46.3", - "@algolia/client-personalization": "5.46.3", - "@algolia/client-query-suggestions": "5.46.3", - "@algolia/client-search": "5.46.3", - "@algolia/ingestion": "1.46.3", - "@algolia/monitoring": "1.46.3", - "@algolia/recommend": "5.46.3", - "@algolia/requester-browser-xhr": "5.46.3", - "@algolia/requester-fetch": "5.46.3", - "@algolia/requester-node-http": "5.46.3" - }, - "engines": { - "node": ">= 14.0.0" - } - }, "node_modules/alien-signals": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-0.2.2.tgz", @@ -5644,33 +5413,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -5733,9 +5475,9 @@ } }, "node_modules/b4a": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", - "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz", + "integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==", "dev": true, "license": "Apache-2.0", "peerDependencies": { @@ -5766,19 +5508,26 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz", - "integrity": "sha512-b3N5eTW1g7vXkw+0CXh/HazGTcO5KYuu/RCNaJbDMPI6LHDi+7qe8EmxKUVe1sUbY2KZOVZFyj62x0OEz9qyAA==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz", + "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "peerDependencies": { + "bare-abort-controller": "*" + }, + "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + } + } }, "node_modules/bare-fs": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.4.5.tgz", - "integrity": "sha512-TCtu93KGLu6/aiGWzMr12TmSRS6nKdfhAnzTQRbXoSWxkbb9eRd53jQ51jG7g1gYjjtto3hbBrrhzg6djcgiKg==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz", + "integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==", "dev": true, "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", @@ -5799,12 +5548,11 @@ } }, "node_modules/bare-os": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.2.tgz", - "integrity": "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.0.tgz", + "integrity": "sha512-JTjuZyNIDpw+GytMO4a6TK1VXdVKKJr6DRxEHasyuYyShV2deuiHJK/ahGZlebc+SG0/wJCB9XK8gprBGDFi/Q==", "dev": true, "license": "Apache-2.0", - "optional": true, "engines": { "bare": ">=1.14.0" } @@ -5815,26 +5563,29 @@ "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", "dev": true, "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-os": "^3.0.1" } }, "node_modules/bare-stream": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.7.0.tgz", - "integrity": "sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz", + "integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==", "dev": true, "license": "Apache-2.0", - "optional": true, "dependencies": { - "streamx": "^2.21.0" + "streamx": "^2.25.0", + "teex": "^1.0.1" }, "peerDependencies": { + "bare-abort-controller": "*", "bare-buffer": "*", "bare-events": "*" }, "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + }, "bare-buffer": { "optional": true }, @@ -5844,20 +5595,19 @@ } }, "node_modules/bare-url": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.2.2.tgz", - "integrity": "sha512-g+ueNGKkrjMazDG3elZO1pNs3HY5+mMmOet1jtKyhOaCnkLzitxf26z7hoAEkDNgdNmnc1KIlt/dw6Po6xZMpA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.2.tgz", + "integrity": "sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A==", "dev": true, "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-path": "^3.0.0" } }, "node_modules/basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", + "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==", "dev": true, "license": "MIT", "engines": { @@ -5874,19 +5624,6 @@ "require-from-string": "^2.0.2" } }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/birpc": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz", @@ -5898,28 +5635,15 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -5995,34 +5719,25 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" } }, "node_modules/chromium-bidi": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-9.1.0.tgz", - "integrity": "sha512-rlUzQ4WzIAWdIbY/viPShhZU2n21CxDUgazXVbw4Hu1MwaeUSEksSeM6DqPgpRjCLXRk702AVRxJxoOz0dw4OA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-14.0.0.tgz", + "integrity": "sha512-9gYlLtS6tStdRWzrtXaTMnqcM4dudNegMXJxkR0I/CXObHalYeYcAMPrL19eroNZHtJ8DQmu1E+ZNOYu/IXMXw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6107,6 +5822,13 @@ "proto-list": "~1.2.1" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, "node_modules/copy-anything": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz", @@ -6150,13 +5872,6 @@ } } }, - "node_modules/crelt": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", - "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", - "dev": true, - "license": "MIT" - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -6173,14 +5888,14 @@ } }, "node_modules/css-tree": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", - "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", + "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", "dev": true, "license": "MIT", "dependencies": { - "mdn-data": "2.12.2", - "source-map-js": "^1.0.1" + "mdn-data": "2.27.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" @@ -6199,36 +5914,10 @@ "node": ">=4" } }, - "node_modules/cssstyle": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-5.3.7.tgz", - "integrity": "sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@asamuzakjp/css-color": "^4.1.1", - "@csstools/css-syntax-patches-for-csstree": "^1.0.21", - "css-tree": "^3.1.0", - "lru-cache": "^11.2.4" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/cssstyle/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "dev": true, "license": "MIT" }, @@ -6243,27 +5932,27 @@ } }, "node_modules/data-urls": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-6.0.0.tgz", - "integrity": "sha512-BnBS08aLUM+DKamupXs3w2tJJoqU+AkaE/+6vQxi/G/DPmIZFJJp9Dkb1kM03AZx8ADehDUZgsNxju3mPXZYIA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", + "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", "dev": true, "license": "MIT", "dependencies": { - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^15.0.0" + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.0" }, "engines": { - "node": ">=20" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/data-urls/node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", + "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/de-indent": { @@ -6313,9 +6002,9 @@ } }, "node_modules/defu": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", - "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", + "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", "dev": true, "license": "MIT" }, @@ -6369,9 +6058,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1508733", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1508733.tgz", - "integrity": "sha512-QJ1R5gtck6nDcdM+nlsaJXcelPEI7ZxSMw1ujHpO1c4+9l+Nue5qlebi9xO1Z2MGr92bFOQTW7/rrheh5hHxDg==", + "version": "0.0.1595872", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1595872.tgz", + "integrity": "sha512-kRfgp8vWVjBu/fbYCiVFiOqsCk3CrMKEo3WbgGT2NXK2dG7vawWPBljixajVgGK9II8rDO9G0oD0zLt3I1daRg==", "dev": true, "license": "BSD-3-Clause" }, @@ -6383,15 +6072,15 @@ "license": "MIT" }, "node_modules/editorconfig": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz", - "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.7.tgz", + "integrity": "sha512-e0GOtq/aTQhVdNyDU9e02+wz9oDDM+SIOQxWME2QRjzRX5yyLAuHDE+0aE8vHb9XRC8XD37eO2u57+F09JqFhw==", "dev": true, "license": "MIT", "dependencies": { "@one-ini/wasm": "0.1.1", "commander": "^10.0.0", - "minimatch": "9.0.1", + "minimatch": "^9.0.1", "semver": "^7.5.3" }, "bin": { @@ -6401,22 +6090,6 @@ "node": ">=14" } }, - "node_modules/editorconfig/node_modules/minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -6435,14 +6108,14 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", - "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.0.tgz", + "integrity": "sha512-otxSQPw4lkOZWkHpB3zaEQs6gWYEsmX4xQF68ElXC/TWvGxGMSGOvoNbaLXm6/cS/fSfHtsEdw90y20PCd+sCA==", "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "tapable": "^2.3.3" }, "engines": { "node": ">=10.13.0" @@ -6482,16 +6155,16 @@ } }, "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", + "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, "node_modules/esbuild": { - "version": "0.25.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", - "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -6504,32 +6177,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.10", - "@esbuild/android-arm": "0.25.10", - "@esbuild/android-arm64": "0.25.10", - "@esbuild/android-x64": "0.25.10", - "@esbuild/darwin-arm64": "0.25.10", - "@esbuild/darwin-x64": "0.25.10", - "@esbuild/freebsd-arm64": "0.25.10", - "@esbuild/freebsd-x64": "0.25.10", - "@esbuild/linux-arm": "0.25.10", - "@esbuild/linux-arm64": "0.25.10", - "@esbuild/linux-ia32": "0.25.10", - "@esbuild/linux-loong64": "0.25.10", - "@esbuild/linux-mips64el": "0.25.10", - "@esbuild/linux-ppc64": "0.25.10", - "@esbuild/linux-riscv64": "0.25.10", - "@esbuild/linux-s390x": "0.25.10", - "@esbuild/linux-x64": "0.25.10", - "@esbuild/netbsd-arm64": "0.25.10", - "@esbuild/netbsd-x64": "0.25.10", - "@esbuild/openbsd-arm64": "0.25.10", - "@esbuild/openbsd-x64": "0.25.10", - "@esbuild/openharmony-arm64": "0.25.10", - "@esbuild/sunos-x64": "0.25.10", - "@esbuild/win32-arm64": "0.25.10", - "@esbuild/win32-ia32": "0.25.10", - "@esbuild/win32-x64": "0.25.10" + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" } }, "node_modules/escalade": { @@ -6542,19 +6215,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/escodegen": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", @@ -6628,16 +6288,6 @@ "bare-events": "^2.7.0" } }, - "node_modules/eventsource-parser": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", - "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/expect-type": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", @@ -6746,9 +6396,9 @@ } }, "node_modules/feed": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/feed/-/feed-5.1.0.tgz", - "integrity": "sha512-qGNhgYygnefSkAHHrNHqC7p3R8J0/xQDS/cYUud8er/qD9EFGWyCdUDfULHTJQN1d3H3WprzVwMc9MfB4J50Wg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/feed/-/feed-5.2.1.tgz", + "integrity": "sha512-jTynzYPWs9ALjro0GW8j7sv9y7cJBeOdD4Y88kVqYy/eyusIX3g+499JiTDIlD9Ge/unebx57T4Uzo6vpYvMtA==", "dev": true, "license": "MIT", "dependencies": { @@ -6766,30 +6416,17 @@ "dev": true, "license": "MIT" }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, "node_modules/focus-trap": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.8.0.tgz", - "integrity": "sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-8.1.0.tgz", + "integrity": "sha512-T65crff26CKV2CZ3csg5y05r+560srp0b8EbAif35euW58hzklVf/Gb4Q+/HCtB8e9III3QFEyk5BWV5XJuOyw==", "dev": true, "license": "MIT", "dependencies": { @@ -6899,32 +6536,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -6973,37 +6584,36 @@ } }, "node_modules/happy-dom": { - "version": "20.0.11", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.0.11.tgz", - "integrity": "sha512-QsCdAUHAmiDeKeaNojb1OHOPF7NjcWPBR7obdu3NwH2a/oyQaLg5d0aaCy/9My6CdPChYF07dvz5chaXBGaD4g==", + "version": "20.9.0", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.9.0.tgz", + "integrity": "sha512-GZZ9mKe8r646NUAf/zemnGbjYh4Bt8/MqASJY+pSm5ZDtc3YQox+4gsLI7yi1hba6o+eCsGxpHn5+iEVn31/FQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "^20.0.0", + "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", - "whatwg-mimetype": "^3.0.0" + "@types/ws": "^8.18.1", + "entities": "^7.0.1", + "whatwg-mimetype": "^3.0.0", + "ws": "^8.18.3" }, "engines": { "node": ">=20.0.0" } }, - "node_modules/happy-dom/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "node_modules/happy-dom/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/happy-dom/node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, "node_modules/hast-util-to-html": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", @@ -7059,13 +6669,6 @@ "dev": true, "license": "MIT" }, - "node_modules/htm": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz", - "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/html-encoding-sniffer": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", @@ -7143,9 +6746,9 @@ "license": "ISC" }, "node_modules/ip-address": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", - "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.1.tgz", + "integrity": "sha512-1FMu8/N15Ck1BL551Jf42NYIoin2unWjLQ2Fze/DXryJRl5twqtwNHlO39qERGbIOcKYWHdgRryhOC+NG4eaLw==", "dev": true, "license": "MIT", "engines": { @@ -7159,19 +6762,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -7182,16 +6772,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7202,29 +6782,6 @@ "node": ">=8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -7344,35 +6901,36 @@ } }, "node_modules/jsdom": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-27.4.0.tgz", - "integrity": "sha512-mjzqwWRD9Y1J1KUi7W97Gja1bwOOM5Ug0EZ6UDK3xS7j7mndrkwozHtSblfomlzyB4NepioNt+B2sOSzczVgtQ==", + "version": "29.1.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", + "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==", "dev": true, "license": "MIT", "dependencies": { - "@acemir/cssom": "^0.9.28", - "@asamuzakjp/dom-selector": "^6.7.6", - "@exodus/bytes": "^1.6.0", - "cssstyle": "^5.3.4", - "data-urls": "^6.0.0", + "@asamuzakjp/css-color": "^5.1.11", + "@asamuzakjp/dom-selector": "^7.1.1", + "@bramus/specificity": "^2.4.2", + "@csstools/css-syntax-patches-for-csstree": "^1.1.3", + "@exodus/bytes": "^1.15.0", + "css-tree": "^3.2.1", + "data-urls": "^7.0.0", "decimal.js": "^10.6.0", "html-encoding-sniffer": "^6.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.6", "is-potential-custom-element-name": "^1.0.1", - "parse5": "^8.0.0", + "lru-cache": "^11.3.5", + "parse5": "^8.0.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^6.0.0", + "tough-cookie": "^6.0.1", + "undici": "^7.25.0", "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^8.0.0", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^15.1.0", - "ws": "^8.18.3", + "webidl-conversions": "^8.0.1", + "whatwg-mimetype": "^5.0.0", + "whatwg-url": "^16.0.1", "xml-name-validator": "^5.0.0" }, "engines": { - "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + "node": "^20.19.0 || ^22.13.0 || >=24.0.0" }, "peerDependencies": { "canvas": "^3.0.0" @@ -7384,13 +6942,13 @@ } }, "node_modules/jsdom/node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", + "integrity": "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/json-parse-even-better-errors": { @@ -7400,13 +6958,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true, - "license": "(AFL-2.1 OR BSD-3-Clause)" - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -7417,21 +6968,15 @@ "node": ">=0.10.0" } }, - "node_modules/kolorist": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", - "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", - "dev": true, - "license": "MIT" - }, "node_modules/laravel-vite-plugin": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-2.0.1.tgz", - "integrity": "sha512-zQuvzWfUKQu9oNVi1o0RZAJCwhGsdhx4NEOyrVQwJHaWDseGP9tl7XUPLY2T8Cj6+IrZ6lmyxlR1KC8unf3RLA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-3.1.0.tgz", + "integrity": "sha512-Fzocl+X4eQ9jOi0RwdphYRGkUbPJ3ky1pTAST5Ot18cS2gw6d2vldK2eCrlKDVjtibCjCx5qptYDlA0373n7qg==", "dev": true, "license": "MIT", "dependencies": { "picocolors": "^1.0.0", + "tinyglobby": "^0.2.12", "vite-plugin-full-reload": "^1.1.0" }, "bin": { @@ -7441,13 +6986,19 @@ "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { - "vite": "^7.0.0" + "fontaine": "^0.5.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "fontaine": { + "optional": true + } } }, "node_modules/lightningcss": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", - "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -7461,23 +7012,23 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-android-arm64": "1.30.2", - "lightningcss-darwin-arm64": "1.30.2", - "lightningcss-darwin-x64": "1.30.2", - "lightningcss-freebsd-x64": "1.30.2", - "lightningcss-linux-arm-gnueabihf": "1.30.2", - "lightningcss-linux-arm64-gnu": "1.30.2", - "lightningcss-linux-arm64-musl": "1.30.2", - "lightningcss-linux-x64-gnu": "1.30.2", - "lightningcss-linux-x64-musl": "1.30.2", - "lightningcss-win32-arm64-msvc": "1.30.2", - "lightningcss-win32-x64-msvc": "1.30.2" + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" } }, "node_modules/lightningcss-android-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", - "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", "cpu": [ "arm64" ], @@ -7496,9 +7047,9 @@ } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", - "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", "cpu": [ "arm64" ], @@ -7517,9 +7068,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", - "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", "cpu": [ "x64" ], @@ -7538,9 +7089,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", - "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", "cpu": [ "x64" ], @@ -7559,9 +7110,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", - "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", "cpu": [ "arm" ], @@ -7580,9 +7131,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", - "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", "cpu": [ "arm64" ], @@ -7601,9 +7152,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", - "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", "cpu": [ "arm64" ], @@ -7622,9 +7173,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", - "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", "cpu": [ "x64" ], @@ -7643,9 +7194,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", - "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", "cpu": [ "x64" ], @@ -7664,9 +7215,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", - "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", "cpu": [ "arm64" ], @@ -7685,9 +7236,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", - "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", "cpu": [ "x64" ], @@ -7752,13 +7303,13 @@ } }, "node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "version": "11.3.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.5.tgz", + "integrity": "sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { - "node": ">=12" + "node": "20 || >=22" } }, "node_modules/magic-string": { @@ -7851,23 +7402,10 @@ "node": ">=6" } }, - "node_modules/marked": { - "version": "16.4.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", - "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", - "dev": true, - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 20" - } - }, "node_modules/mdast-util-from-markdown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", - "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz", + "integrity": "sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -7995,9 +7533,9 @@ } }, "node_modules/mdn-data": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", - "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", + "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", "dev": true, "license": "CC0-1.0" }, @@ -8502,13 +8040,13 @@ } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -8542,16 +8080,16 @@ "license": "MIT" }, "node_modules/mlly": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", - "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", + "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.15.0", + "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" } }, "node_modules/mlly/node_modules/confbox": { @@ -8574,9 +8112,9 @@ } }, "node_modules/morphdom": { - "version": "2.7.7", - "resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.7.7.tgz", - "integrity": "sha512-04GmsiBcalrSCNmzfo+UjU8tt3PhZJKzcOy+r1FlGA7/zri8wre3I1WkYN9PT3sIeIKfW9bpyElA+VzOg2E24g==", + "version": "2.7.8", + "resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.7.8.tgz", + "integrity": "sha512-D/fR4xgGUyVRbdMGU6Nejea1RFzYxYtyurG4Fbv2Fi/daKlWKuXGLOdXtl+3eIwL110cI2hz1ZojGICjjFLgTg==", "dev": true, "license": "MIT" }, @@ -8624,9 +8162,9 @@ } }, "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", + "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==", "dev": true, "license": "MIT", "engines": { @@ -8649,16 +8187,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/nprogress": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", @@ -8688,21 +8216,21 @@ } }, "node_modules/oniguruma-parser": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz", - "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", + "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", "dev": true, "license": "MIT" }, "node_modules/oniguruma-to-es": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.4.tgz", - "integrity": "sha512-3VhUGN3w2eYxnTzHn+ikMI+fp/96KoRSVK9/kMTcFqj1NRDh2IhQCKvYxDnWePKRXY/AqH+Fuiyb7VHSzBjHfA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", + "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", "dev": true, "license": "MIT", "dependencies": { - "oniguruma-parser": "^0.12.1", - "regex": "^6.0.1", + "oniguruma-parser": "^0.12.2", + "regex": "^6.1.0", "regex-recursion": "^6.0.2" } }, @@ -8778,9 +8306,9 @@ "license": "BlueOak-1.0.0" }, "node_modules/package-manager-detector": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.3.0.tgz", - "integrity": "sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.6.0.tgz", + "integrity": "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==", "dev": true, "license": "MIT" }, @@ -8817,26 +8345,26 @@ } }, "node_modules/parse5": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.0.tgz", - "integrity": "sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", + "integrity": "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw==", "dev": true, "license": "MIT", "dependencies": { - "entities": "^6.0.0" + "entities": "^8.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/parse5/node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-8.0.0.tgz", + "integrity": "sha512-zwfzJecQ/Uej6tusMqwAqU/6KL2XaB2VZ2Jg54Je6ahNBGNH6Ek6g3jjNCF0fG9EWQKGZNddNjU5F1ZQn/sBnA==", "dev": true, "license": "BSD-2-Clause", "engines": { - "node": ">=0.12" + "node": ">=20.19.0" }, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" @@ -8884,15 +8412,11 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } + "license": "MIT" }, "node_modules/pathe": { "version": "2.0.3", @@ -8909,16 +8433,16 @@ "license": "MIT" }, "node_modules/perfect-debounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.0.0.tgz", - "integrity": "sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz", + "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==", "dev": true, "license": "MIT" }, "node_modules/perfect-freehand": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/perfect-freehand/-/perfect-freehand-1.2.2.tgz", - "integrity": "sha512-eh31l019WICQ03pkF3FSzHxB8n07ItqIQ++G5UV8JX0zVOXzgTGCqnRR0jJ2h9U8/2uW4W4mtGJELt9kEV0CFQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/perfect-freehand/-/perfect-freehand-1.2.3.tgz", + "integrity": "sha512-bHZSfqDHGNlPpgH2yxXgPHlQSPpEbo+qg7li0M78J9vNAi2yjwLeA4x79BEQhX44lEWpCLSFCeRZwpw0niiXPA==", "dev": true, "license": "MIT" }, @@ -8930,9 +8454,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "engines": { @@ -8955,9 +8479,9 @@ } }, "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "version": "8.5.13", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.13.tgz", + "integrity": "sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==", "dev": true, "funding": [ { @@ -8984,9 +8508,9 @@ } }, "node_modules/postcss-prefixwrap": { - "version": "1.57.0", - "resolved": "https://registry.npmjs.org/postcss-prefixwrap/-/postcss-prefixwrap-1.57.0.tgz", - "integrity": "sha512-G1QMBJ30CbWCzfiwAv4HEkRG3Q6b4TEEglw/YsGH/wCc6rMklRkRH5DVDCqL8kqIX/q9/bwHnbeMfzLt5kL0Bw==", + "version": "1.57.2", + "resolved": "https://registry.npmjs.org/postcss-prefixwrap/-/postcss-prefixwrap-1.57.2.tgz", + "integrity": "sha512-HKfOJJCFUtZiUu6CaWmxb6JxYZetn8McOuFUa0t4CJ0ZtcxCPlD8COSPu6804xNc4WPBu34BI0h96wkONLd9lQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -9051,16 +8575,6 @@ "prosemirror-transform": "^1.0.0" } }, - "node_modules/prosemirror-collab": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz", - "integrity": "sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0" - } - }, "node_modules/prosemirror-commands": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.1.tgz", @@ -9099,9 +8613,9 @@ } }, "node_modules/prosemirror-history": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.4.1.tgz", - "integrity": "sha512-2JZD8z2JviJrboD9cPuX/Sv/1ChFng+xh2tChQ2X4bB2HeK+rra/bmJ3xGntCcjhOqIzSDG6Id7e8RJ9QPXLEQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz", + "integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==", "dev": true, "license": "MIT", "dependencies": { @@ -9111,17 +8625,6 @@ "rope-sequence": "^1.3.0" } }, - "node_modules/prosemirror-inputrules": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.0.tgz", - "integrity": "sha512-K0xJRCmt+uSw7xesnHmcn72yBGTbY45vm8gXI4LZXbx2Z0jwh5aF9xrGQgrVPu0WbyFVFF3E/o9VhJYz6SQWnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - } - }, "node_modules/prosemirror-keymap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz", @@ -9133,121 +8636,44 @@ "w3c-keyname": "^2.2.0" } }, - "node_modules/prosemirror-markdown": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.2.tgz", - "integrity": "sha512-FPD9rHPdA9fqzNmIIDhhnYQ6WgNoSWX9StUZ8LEKapaXU9i6XgykaHKhp6XMyXlOWetmaFgGDS/nu/w9/vUc5g==", + "node_modules/prosemirror-model": { + "version": "1.25.3", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.3.tgz", + "integrity": "sha512-dY2HdaNXlARknJbrManZ1WyUtos+AP97AmvqdOQtWtrrC5g4mohVX5DTi9rXNFSk09eczLq9GuNTtq3EfMeMGA==", "dev": true, "license": "MIT", "dependencies": { - "@types/markdown-it": "^14.0.0", - "markdown-it": "^14.0.0", - "prosemirror-model": "^1.25.0" + "orderedmap": "^2.0.0" } }, - "node_modules/prosemirror-markdown/node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "node_modules/prosemirror-schema-list": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", + "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", "dev": true, "license": "MIT", "dependencies": { - "uc.micro": "^2.0.0" + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.7.3" } }, - "node_modules/prosemirror-markdown/node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "node_modules/prosemirror-state": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.3.tgz", + "integrity": "sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==", "dev": true, "license": "MIT", "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0", + "prosemirror-view": "^1.27.0" } }, - "node_modules/prosemirror-markdown/node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true, - "license": "MIT" - }, - "node_modules/prosemirror-markdown/node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true, - "license": "MIT" - }, - "node_modules/prosemirror-menu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.2.5.tgz", - "integrity": "sha512-qwXzynnpBIeg1D7BAtjOusR+81xCp53j7iWu/IargiRZqRjGIlQuu1f3jFi+ehrHhWMLoyOQTSRx/IWZJqOYtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "crelt": "^1.0.0", - "prosemirror-commands": "^1.0.0", - "prosemirror-history": "^1.0.0", - "prosemirror-state": "^1.0.0" - } - }, - "node_modules/prosemirror-model": { - "version": "1.25.3", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.3.tgz", - "integrity": "sha512-dY2HdaNXlARknJbrManZ1WyUtos+AP97AmvqdOQtWtrrC5g4mohVX5DTi9rXNFSk09eczLq9GuNTtq3EfMeMGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "orderedmap": "^2.0.0" - } - }, - "node_modules/prosemirror-schema-basic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.4.tgz", - "integrity": "sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.25.0" - } - }, - "node_modules/prosemirror-schema-list": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", - "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.7.3" - } - }, - "node_modules/prosemirror-state": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.3.tgz", - "integrity": "sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.27.0" - } - }, - "node_modules/prosemirror-tables": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.1.tgz", - "integrity": "sha512-DAgDoUYHCcc6tOGpLVPSU1k84kCUWTWnfWX3UDy2Delv4ryH0KqTD6RBI6k4yi9j9I8gl3j8MkPpRD/vWPZbug==", + "node_modules/prosemirror-tables": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.1.tgz", + "integrity": "sha512-DAgDoUYHCcc6tOGpLVPSU1k84kCUWTWnfWX3UDy2Delv4ryH0KqTD6RBI6k4yi9j9I8gl3j8MkPpRD/vWPZbug==", "dev": true, "license": "MIT", "dependencies": { @@ -9258,22 +8684,6 @@ "prosemirror-view": "^1.39.1" } }, - "node_modules/prosemirror-trailing-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz", - "integrity": "sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@remirror/core-constants": "3.0.0", - "escape-string-regexp": "^4.0.0" - }, - "peerDependencies": { - "prosemirror-model": "^1.22.1", - "prosemirror-state": "^1.4.2", - "prosemirror-view": "^1.33.8" - } - }, "node_modules/prosemirror-transform": { "version": "1.10.4", "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.4.tgz", @@ -9323,6 +8733,16 @@ "node": ">= 14" } }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/proxy-compare": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-3.0.1.tgz", @@ -9348,9 +8768,9 @@ } }, "node_modules/pump": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", - "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", "dev": true, "license": "MIT", "dependencies": { @@ -9379,19 +8799,19 @@ } }, "node_modules/puppeteer": { - "version": "24.23.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.23.0.tgz", - "integrity": "sha512-BVR1Lg8sJGKXY79JARdIssFWK2F6e1j+RyuJP66w4CUmpaXjENicmA3nNpUXA8lcTdDjAndtP+oNdni3T/qQqA==", + "version": "24.42.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-24.42.0.tgz", + "integrity": "sha512-94MoPfFp2eY3eYIMdINkez4IOP5TMHntlZbVx06fHlQTtiQiYgaY0L2Zzfod8PVUkPqP7m3Qlre2v8YS8cudPA==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.10.10", - "chromium-bidi": "9.1.0", + "@puppeteer/browsers": "2.13.0", + "chromium-bidi": "14.0.0", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1508733", - "puppeteer-core": "24.23.0", - "typed-query-selector": "^2.12.0" + "devtools-protocol": "0.0.1595872", + "puppeteer-core": "24.42.0", + "typed-query-selector": "^2.12.1" }, "bin": { "puppeteer": "lib/cjs/puppeteer/node/cli.js" @@ -9401,19 +8821,19 @@ } }, "node_modules/puppeteer-core": { - "version": "24.23.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.23.0.tgz", - "integrity": "sha512-yl25C59gb14sOdIiSnJ08XiPP+O2RjuyZmEG+RjYmCXO7au0jcLf7fRiyii96dXGUBW7Zwei/mVKfxMx/POeFw==", + "version": "24.42.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-24.42.0.tgz", + "integrity": "sha512-T4zXokk/izH01fYPhyyev1A4piWiOKrYq7CUFpdoYQxmOnXoV6YjUabmfIjCYkNspSoAXIxRid3Tw+Vg0fthYg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "2.10.10", - "chromium-bidi": "9.1.0", + "@puppeteer/browsers": "2.13.0", + "chromium-bidi": "14.0.0", "debug": "^4.4.3", - "devtools-protocol": "0.0.1508733", - "typed-query-selector": "^2.12.0", - "webdriver-bidi-protocol": "0.3.6", - "ws": "^8.18.3" + "devtools-protocol": "0.0.1595872", + "typed-query-selector": "^2.12.1", + "webdriver-bidi-protocol": "0.4.1", + "ws": "^8.19.0" }, "engines": { "node": ">=18" @@ -9436,41 +8856,18 @@ ], "license": "MIT" }, - "node_modules/react": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", - "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/readdirp/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">= 20.19.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/regex": { @@ -9604,10 +9001,51 @@ "dev": true, "license": "MIT" }, + "node_modules/rolldown": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.17.tgz", + "integrity": "sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.127.0", + "@rolldown/pluginutils": "1.0.0-rc.17" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-x64": "1.0.0-rc.17", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.17", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.17", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.17", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.17", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.17", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.17", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.17" + } + }, + "node_modules/rolldown/node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.17.tgz", + "integrity": "sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==", + "dev": true, + "license": "MIT" + }, "node_modules/rollup": { - "version": "4.52.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", - "integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==", + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9621,28 +9059,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.52.3", - "@rollup/rollup-android-arm64": "4.52.3", - "@rollup/rollup-darwin-arm64": "4.52.3", - "@rollup/rollup-darwin-x64": "4.52.3", - "@rollup/rollup-freebsd-arm64": "4.52.3", - "@rollup/rollup-freebsd-x64": "4.52.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.52.3", - "@rollup/rollup-linux-arm-musleabihf": "4.52.3", - "@rollup/rollup-linux-arm64-gnu": "4.52.3", - "@rollup/rollup-linux-arm64-musl": "4.52.3", - "@rollup/rollup-linux-loong64-gnu": "4.52.3", - "@rollup/rollup-linux-ppc64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-gnu": "4.52.3", - "@rollup/rollup-linux-riscv64-musl": "4.52.3", - "@rollup/rollup-linux-s390x-gnu": "4.52.3", - "@rollup/rollup-linux-x64-gnu": "4.52.3", - "@rollup/rollup-linux-x64-musl": "4.52.3", - "@rollup/rollup-openharmony-arm64": "4.52.3", - "@rollup/rollup-win32-arm64-msvc": "4.52.3", - "@rollup/rollup-win32-ia32-msvc": "4.52.3", - "@rollup/rollup-win32-x64-gnu": "4.52.3", - "@rollup/rollup-win32-x64-msvc": "4.52.3", + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", "fsevents": "~2.3.2" } }, @@ -9680,14 +9121,6 @@ "dev": true, "license": "MIT" }, - "node_modules/search-insights": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", - "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", @@ -9703,9 +9136,9 @@ } }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, "license": "ISC", "bin": { @@ -9739,18 +9172,18 @@ } }, "node_modules/shiki": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.21.0.tgz", - "integrity": "sha512-N65B/3bqL/TI2crrXr+4UivctrAGEjmsib5rPMMPpFp1xAx/w03v8WZ9RDDFYteXoEgY7qZ4HGgl5KBIu1153w==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.23.0.tgz", + "integrity": "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "3.21.0", - "@shikijs/engine-javascript": "3.21.0", - "@shikijs/engine-oniguruma": "3.21.0", - "@shikijs/langs": "3.21.0", - "@shikijs/themes": "3.21.0", - "@shikijs/types": "3.21.0", + "@shikijs/core": "3.23.0", + "@shikijs/engine-javascript": "3.23.0", + "@shikijs/engine-oniguruma": "3.23.0", + "@shikijs/langs": "3.23.0", + "@shikijs/themes": "3.23.0", + "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } @@ -9802,13 +9235,13 @@ } }, "node_modules/socks": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", - "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz", + "integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==", "dev": true, "license": "MIT", "dependencies": { - "ip-address": "^10.0.1", + "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -9888,16 +9321,16 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", - "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", + "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", "dev": true, "license": "MIT" }, "node_modules/streamx": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", - "integrity": "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.25.0.tgz", + "integrity": "sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==", "dev": true, "license": "MIT", "dependencies": { @@ -10022,20 +9455,6 @@ "node": ">=16" } }, - "node_modules/swr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/swr/-/swr-2.3.8.tgz", - "integrity": "sha512-gaCPRVoMq8WGDcWj9p4YWzCMPHzE0WNl6W8ADIx9c3JBEIdMkJGMzW+uzXvxHMltwcYACr9jP+32H8/hgwMR7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "dequal": "^2.0.3", - "use-sync-external-store": "^1.6.0" - }, - "peerDependencies": { - "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -10051,16 +9470,16 @@ "license": "MIT" }, "node_modules/tailwindcss": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.16.tgz", - "integrity": "sha512-pONL5awpaQX4LN5eiv7moSiSPd/DLDzKVRJz8Q9PgzmAdd1R4307GQS2ZpfiN7ZmekdQrfhZZiSE5jkLR4WNaA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.2.4.tgz", + "integrity": "sha512-HhKppgO81FQof5m6TEnuBWCZGgfRAWbaeOaGT00KOy/Pf/j6oUihdvBpA7ltCeAvZpFhW3j0PTclkxsd4IXYDA==", "dev": true, "license": "MIT" }, "node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", "dev": true, "license": "MIT", "engines": { @@ -10072,9 +9491,9 @@ } }, "node_modules/tar-fs": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", - "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.2.tgz", + "integrity": "sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==", "dev": true, "license": "MIT", "dependencies": { @@ -10087,38 +9506,36 @@ } }, "node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz", + "integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==", "dev": true, "license": "MIT", "dependencies": { "b4a": "^1.6.4", + "bare-fs": "^4.5.5", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, - "node_modules/text-decoder": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", - "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "node_modules/teex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", + "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "b4a": "^1.6.4" + "streamx": "^2.12.5" } }, - "node_modules/throttleit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-2.1.0.tgz", - "integrity": "sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==", + "node_modules/text-decoder": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz", + "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" } }, "node_modules/tinybench": { @@ -10139,14 +9556,14 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -10156,9 +9573,9 @@ } }, "node_modules/tinyrainbow": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", - "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", "dev": true, "license": "MIT", "engines": { @@ -10166,42 +9583,29 @@ } }, "node_modules/tldts": { - "version": "7.0.19", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.19.tgz", - "integrity": "sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA==", + "version": "7.0.29", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.0.29.tgz", + "integrity": "sha512-JIXCerhudr/N6OWLwLF1HVsTTUo7ry6qHa5eWZEkiMuxsIiAACL55tGLfqfHfoH7QaMQUW8fngD7u7TxWexYQg==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^7.0.19" + "tldts-core": "^7.0.29" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "7.0.19", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.19.tgz", - "integrity": "sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A==", + "version": "7.0.29", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.0.29.tgz", + "integrity": "sha512-W99NuU7b1DcG3uJ3v9k9VztCH3WialNbBkBft5wCs8V8mexu0XQqaZEYb9l9RNNzK8+3EJ9PKWB0/RUtTQ/o+Q==", "dev": true, "license": "MIT" }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tokenx": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tokenx/-/tokenx-1.1.0.tgz", - "integrity": "sha512-KCjtiC2niPwTSuz4ktM82Ki5bjqBwYpssiHDsGr5BpejN/B3ksacRvrsdoxljdMIh2nCX78alnDkeemBmYUmTA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tokenx/-/tokenx-1.3.0.tgz", + "integrity": "sha512-NLdXTEZkKiO0gZuLtMoZKjCXTREXeZZt8nnnNeyoXtNZAfG/GKGSbQtLU5STspc0rMSwcA+UJfWZkbNU01iKmQ==", "dev": true, "license": "MIT" }, @@ -10216,9 +9620,9 @@ } }, "node_modules/tough-cookie": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.0.tgz", - "integrity": "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz", + "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -10281,9 +9685,9 @@ "license": "0BSD" }, "node_modules/typed-query-selector": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", - "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz", + "integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==", "dev": true, "license": "MIT" }, @@ -10295,9 +9699,9 @@ "license": "MIT" }, "node_modules/ufo": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", - "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", + "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", "dev": true, "license": "MIT" }, @@ -10317,10 +9721,20 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/undici": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", + "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, "node_modules/undici-types": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.13.0.tgz", - "integrity": "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ==", + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", "dev": true, "license": "MIT" }, @@ -10345,17 +9759,17 @@ } }, "node_modules/unimport": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/unimport/-/unimport-5.5.0.tgz", - "integrity": "sha512-/JpWMG9s1nBSlXJAQ8EREFTFy3oy6USFd8T6AoBaw1q2GGcF4R9yp3ofg32UODZlYEO5VD0EWE1RpI9XDWyPYg==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-5.7.0.tgz", + "integrity": "sha512-njnL6sp8lEA8QQbZrt+52p/g4X0rw3bnGGmUcJnt1jeG8+iiqO779aGz0PirCtydAIVcuTBRlJ52F0u46z309Q==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.15.0", + "acorn": "^8.16.0", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "local-pkg": "^1.1.2", - "magic-string": "^0.30.19", + "magic-string": "^0.30.21", "mlly": "^1.8.0", "pathe": "^2.0.3", "picomatch": "^4.0.3", @@ -10363,8 +9777,8 @@ "scule": "^1.3.0", "strip-literal": "^3.1.0", "tinyglobby": "^0.2.15", - "unplugin": "^2.3.10", - "unplugin-utils": "^0.3.0" + "unplugin": "^2.3.11", + "unplugin-utils": "^0.3.1" }, "engines": { "node": ">=18.12.0" @@ -10452,9 +9866,9 @@ } }, "node_modules/unist-util-visit": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", - "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", + "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", "dev": true, "license": "MIT", "dependencies": { @@ -10499,21 +9913,21 @@ } }, "node_modules/unplugin-auto-import": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-20.3.0.tgz", - "integrity": "sha512-RcSEQiVv7g0mLMMXibYVKk8mpteKxvyffGuDKqZZiFr7Oq3PB1HwgHdK5O7H4AzbhzHoVKG0NnMnsk/1HIVYzQ==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-21.0.0.tgz", + "integrity": "sha512-vWuC8SwqJmxZFYwPojhOhOXDb5xFhNNcEVb9K/RFkyk/3VnfaOjzitWN7v+8DEKpMjSsY2AEGXNgt6I0yQrhRQ==", "dev": true, "license": "MIT", "dependencies": { "local-pkg": "^1.1.2", "magic-string": "^0.30.21", "picomatch": "^4.0.3", - "unimport": "^5.5.0", + "unimport": "^5.6.0", "unplugin": "^2.3.11", "unplugin-utils": "^0.3.1" }, "engines": { - "node": ">=14" + "node": ">=20.19.0" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -10531,178 +9945,650 @@ } } }, - "node_modules/unplugin-icons": { - "version": "22.4.2", - "resolved": "https://registry.npmjs.org/unplugin-icons/-/unplugin-icons-22.4.2.tgz", - "integrity": "sha512-Yv15405unO67Chme0Slk0JRA/H2AiAZLK5t7ebt8/ZpTDlBfM4d4En2qD3MX2rzOSkIteQ0syIm3q8MSofeoBA==", + "node_modules/unplugin-icons": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/unplugin-icons/-/unplugin-icons-23.0.1.tgz", + "integrity": "sha512-rv0XEJepajKzDLvRUWASM8K+8+/CCfZn2jtogXqg6RIp7kpatRc/aFrVJn8ANQA09e++lPEEv9yX8cC9enc+QQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^1.1.0", + "@iconify/utils": "^3.1.0", + "local-pkg": "^1.1.2", + "obug": "^2.1.1", + "unplugin": "^2.3.11" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@svgr/core": ">=7.0.0", + "@svgx/core": "^1.0.1", + "@vue/compiler-sfc": "^3.0.2", + "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "@svgr/core": { + "optional": true + }, + "@svgx/core": { + "optional": true + }, + "@vue/compiler-sfc": { + "optional": true + }, + "svelte": { + "optional": true + } + } + }, + "node_modules/unplugin-utils": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.1.tgz", + "integrity": "sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==", + "dev": true, + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/unplugin-vue-components": { + "version": "32.0.0", + "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-32.0.0.tgz", + "integrity": "sha512-uLdccgS7mf3pv1bCCP20y/hm+u1eOjAmygVkh+Oa70MPkzgl1eQv1L0CwdHNM3gscO8/GDMGIET98Ja47CBbZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^5.0.0", + "local-pkg": "^1.1.2", + "magic-string": "^0.30.21", + "mlly": "^1.8.2", + "obug": "^2.1.1", + "picomatch": "^4.0.3", + "tinyglobby": "^0.2.15", + "unplugin": "^3.0.0", + "unplugin-utils": "^0.3.1" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@nuxt/kit": "^3.2.2 || ^4.0.0", + "vue": "^3.0.0" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + } + } + }, + "node_modules/unplugin-vue-components/node_modules/unplugin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.0.0.tgz", + "integrity": "sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "picomatch": "^4.0.3", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/unplugin-vue-define-options": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/unplugin-vue-define-options/-/unplugin-vue-define-options-1.5.5.tgz", + "integrity": "sha512-V50sWbpoADsjyVgovxewoLo2IDW0zfgHJbKiAl2EdZT8OL3g3h1Mz3QKoAAu09i8+LnkDatIEQMgBVeHHxWXNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue-macros/common": "1.16.1", + "ast-walker-scope": "^0.6.2", + "unplugin": "^1.16.1" + }, + "engines": { + "node": ">=16.14.0" + } + }, + "node_modules/unplugin-vue-define-options/node_modules/unplugin": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", + "integrity": "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/unplugin-vue-macros": { + "version": "2.14.5", + "resolved": "https://registry.npmjs.org/unplugin-vue-macros/-/unplugin-vue-macros-2.14.5.tgz", + "integrity": "sha512-jlZhsr26/wreKBrkX6BM21Mpm9DbS6H2H0aMrd3gu/wabA3YWUj/t+zqZD5Y5yShaTKO/03yJjb5BfPck9mPtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue-macros/better-define": "1.11.4", + "@vue-macros/boolean-prop": "0.5.5", + "@vue-macros/chain-call": "0.4.5", + "@vue-macros/common": "1.16.1", + "@vue-macros/config": "0.6.1", + "@vue-macros/define-emit": "0.5.4", + "@vue-macros/define-models": "1.3.5", + "@vue-macros/define-prop": "0.6.5", + "@vue-macros/define-props": "4.0.6", + "@vue-macros/define-props-refs": "1.3.5", + "@vue-macros/define-render": "1.6.6", + "@vue-macros/define-slots": "1.2.6", + "@vue-macros/define-stylex": "0.2.3", + "@vue-macros/devtools": "0.4.1", + "@vue-macros/export-expose": "0.3.5", + "@vue-macros/export-props": "0.6.5", + "@vue-macros/export-render": "0.3.5", + "@vue-macros/hoist-static": "1.7.0", + "@vue-macros/jsx-directive": "0.10.6", + "@vue-macros/named-template": "0.5.5", + "@vue-macros/reactivity-transform": "1.1.6", + "@vue-macros/script-lang": "0.2.5", + "@vue-macros/setup-block": "0.4.5", + "@vue-macros/setup-component": "0.18.5", + "@vue-macros/setup-sfc": "0.18.5", + "@vue-macros/short-bind": "1.1.5", + "@vue-macros/short-emits": "1.6.5", + "@vue-macros/short-vmodel": "1.5.5", + "@vue-macros/volar": "0.30.15", + "unplugin": "^1.16.1", + "unplugin-combine": "^1.2.0", + "unplugin-vue-define-options": "1.5.5" + }, + "engines": { + "node": ">=16.14.0" + }, + "peerDependencies": { + "vue": "^2.7.0 || ^3.2.25" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@antfu/install-pkg": "^1.1.0", - "@iconify/utils": "^3.0.2", - "debug": "^4.4.3", - "local-pkg": "^1.1.2", - "unplugin": "^2.3.10" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - }, - "peerDependencies": { - "@svgr/core": ">=7.0.0", - "@svgx/core": "^1.0.1", - "@vue/compiler-sfc": "^3.0.2 || ^2.7.0", - "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0", - "vue-template-compiler": "^2.6.12", - "vue-template-es2015-compiler": "^1.9.0" - }, - "peerDependenciesMeta": { - "@svgr/core": { - "optional": true - }, - "@svgx/core": { - "optional": true - }, - "@vue/compiler-sfc": { - "optional": true - }, - "svelte": { - "optional": true - }, - "vue-template-compiler": { - "optional": true - }, - "vue-template-es2015-compiler": { - "optional": true - } + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, - "node_modules/unplugin-utils": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.3.1.tgz", - "integrity": "sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog==", + "node_modules/unplugin-vue-macros/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "pathe": "^2.0.3", - "picomatch": "^4.0.3" - }, + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, "engines": { - "node": ">=20.19.0" - }, - "funding": { - "url": "https://github.com/sponsors/sxzz" + "node": ">=18" } }, - "node_modules/unplugin-vue-components": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-29.1.0.tgz", - "integrity": "sha512-z/9ACPXth199s9aCTCdKZAhe5QGOpvzJYP+Hkd0GN1/PpAmsu+W3UlRY3BJAewPqQxh5xi56+Og6mfiCV1Jzpg==", + "node_modules/unplugin-vue-macros/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "chokidar": "^3.6.0", - "debug": "^4.4.3", - "local-pkg": "^1.1.2", - "magic-string": "^0.30.19", - "mlly": "^1.8.0", - "tinyglobby": "^0.2.15", - "unplugin": "^2.3.10", - "unplugin-utils": "^0.3.0" - }, + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - }, - "peerDependencies": { - "@babel/parser": "^7.15.8", - "@nuxt/kit": "^3.2.2 || ^4.0.0", - "vue": "2 || 3" - }, - "peerDependenciesMeta": { - "@babel/parser": { - "optional": true - }, - "@nuxt/kit": { - "optional": true - } + "node": ">=18" } }, - "node_modules/unplugin-vue-define-options": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/unplugin-vue-define-options/-/unplugin-vue-define-options-1.5.5.tgz", - "integrity": "sha512-V50sWbpoADsjyVgovxewoLo2IDW0zfgHJbKiAl2EdZT8OL3g3h1Mz3QKoAAu09i8+LnkDatIEQMgBVeHHxWXNg==", + "node_modules/unplugin-vue-macros/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vue-macros/common": "1.16.1", - "ast-walker-scope": "^0.6.2", - "unplugin": "^1.16.1" - }, + "optional": true, + "os": [ + "sunos" + ], + "peer": true, "engines": { - "node": ">=16.14.0" + "node": ">=18" } }, - "node_modules/unplugin-vue-define-options/node_modules/unplugin": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", - "integrity": "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==", + "node_modules/unplugin-vue-macros/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "acorn": "^8.14.0", - "webpack-virtual-modules": "^0.6.2" - }, + "optional": true, + "os": [ + "win32" + ], + "peer": true, "engines": { - "node": ">=14.0.0" + "node": ">=18" } }, - "node_modules/unplugin-vue-macros": { - "version": "2.14.5", - "resolved": "https://registry.npmjs.org/unplugin-vue-macros/-/unplugin-vue-macros-2.14.5.tgz", - "integrity": "sha512-jlZhsr26/wreKBrkX6BM21Mpm9DbS6H2H0aMrd3gu/wabA3YWUj/t+zqZD5Y5yShaTKO/03yJjb5BfPck9mPtw==", + "node_modules/unplugin-vue-macros/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vue-macros/better-define": "1.11.4", - "@vue-macros/boolean-prop": "0.5.5", - "@vue-macros/chain-call": "0.4.5", - "@vue-macros/common": "1.16.1", - "@vue-macros/config": "0.6.1", - "@vue-macros/define-emit": "0.5.4", - "@vue-macros/define-models": "1.3.5", - "@vue-macros/define-prop": "0.6.5", - "@vue-macros/define-props": "4.0.6", - "@vue-macros/define-props-refs": "1.3.5", - "@vue-macros/define-render": "1.6.6", - "@vue-macros/define-slots": "1.2.6", - "@vue-macros/define-stylex": "0.2.3", - "@vue-macros/devtools": "0.4.1", - "@vue-macros/export-expose": "0.3.5", - "@vue-macros/export-props": "0.6.5", - "@vue-macros/export-render": "0.3.5", - "@vue-macros/hoist-static": "1.7.0", - "@vue-macros/jsx-directive": "0.10.6", - "@vue-macros/named-template": "0.5.5", - "@vue-macros/reactivity-transform": "1.1.6", - "@vue-macros/script-lang": "0.2.5", - "@vue-macros/setup-block": "0.4.5", - "@vue-macros/setup-component": "0.18.5", - "@vue-macros/setup-sfc": "0.18.5", - "@vue-macros/short-bind": "1.1.5", - "@vue-macros/short-emits": "1.6.5", - "@vue-macros/short-vmodel": "1.5.5", - "@vue-macros/volar": "0.30.15", - "unplugin": "^1.16.1", - "unplugin-combine": "^1.2.0", - "unplugin-vue-define-options": "1.5.5" - }, + "optional": true, + "os": [ + "win32" + ], + "peer": true, "engines": { - "node": ">=16.14.0" - }, - "peerDependencies": { - "vue": "^2.7.0 || ^3.2.25" + "node": ">=18" + } + }, + "node_modules/unplugin-vue-macros/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" } }, "node_modules/unplugin-vue-macros/node_modules/@vue-macros/devtools": { @@ -10727,6 +10613,50 @@ } } }, + "node_modules/unplugin-vue-macros/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, "node_modules/unplugin-vue-macros/node_modules/unplugin": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", @@ -10787,9 +10717,9 @@ } }, "node_modules/unplugin-vue-macros/node_modules/vite": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", - "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", "dev": true, "license": "MIT", "optional": true, @@ -10870,16 +10800,6 @@ "dev": true, "license": "MIT" }, - "node_modules/use-sync-external-store": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", - "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -10918,18 +10838,17 @@ } }, "node_modules/vite": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", - "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", + "version": "8.0.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.10.tgz", + "integrity": "sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "^0.27.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.10", + "rolldown": "1.0.0-rc.17", + "tinyglobby": "^0.2.16" }, "bin": { "vite": "bin/vite.js" @@ -10945,9 +10864,10 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.1.0", + "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", - "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", @@ -10960,13 +10880,16 @@ "@types/node": { "optional": true }, - "jiti": { + "@vitejs/devtools": { "optional": true }, - "less": { + "esbuild": { "optional": true }, - "lightningcss": { + "jiti": { + "optional": true + }, + "less": { "optional": true }, "sass": { @@ -10984,42 +10907,199 @@ "terser": { "optional": true }, - "tsx": { + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-full-reload": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", + "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "node_modules/vite-plugin-full-reload/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitepress": { + "version": "2.0.0-alpha.17", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-2.0.0-alpha.17.tgz", + "integrity": "sha512-Z3VPUpwk/bHYqt1uMVOOK1/4xFiWQov1GNc2FvMdz6kvje4JRXEOngVI9C+bi5jeedMSHiA4dwKkff1NCvbZ9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@docsearch/css": "^4.5.3", + "@docsearch/js": "^4.5.3", + "@docsearch/sidepanel-js": "^4.5.3", + "@iconify-json/simple-icons": "^1.2.69", + "@shikijs/core": "^3.22.0", + "@shikijs/transformers": "^3.22.0", + "@shikijs/types": "^3.22.0", + "@types/markdown-it": "^14.1.2", + "@vitejs/plugin-vue": "^6.0.4", + "@vue/devtools-api": "^8.0.5", + "@vue/shared": "^3.5.27", + "@vueuse/core": "^14.2.0", + "@vueuse/integrations": "^14.2.0", + "focus-trap": "^8.0.0", + "mark.js": "8.11.1", + "minisearch": "^7.2.0", + "shiki": "^3.22.0", + "vite": "^7.3.1", + "vue": "^3.5.27" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4", + "oxc-minify": "*", + "postcss": "^8" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "oxc-minify": { "optional": true }, - "yaml": { + "postcss": { "optional": true } } }, - "node_modules/vite-plugin-full-reload": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.2.0.tgz", - "integrity": "sha512-kz18NW79x0IHbxRSHm0jttP4zoO9P9gXh+n6UTwlNKnviTTEpOlum6oS9SmecrTtSr+muHEn5TUuC75UovQzcA==", + "node_modules/vitepress-plugin-llms": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.12.1.tgz", + "integrity": "sha512-mUbjxXbNCWIxTZPuxh1smbjRpU1j5Bw5sXKoWeU/kfWCyALE92HyiAXhOgNVAB8QOLCuXticf3Qwsj/YlWROlw==", "dev": true, "license": "MIT", "dependencies": { - "picocolors": "^1.0.0", - "picomatch": "^2.3.1" + "gray-matter": "^4.0.3", + "markdown-it": "^14.1.0", + "markdown-title": "^1.0.2", + "mdast-util-from-markdown": "^2.0.3", + "millify": "^6.1.0", + "minimatch": "^10.2.5", + "path-to-regexp": "^6.3.0", + "picocolors": "^1.1.1", + "pretty-bytes": "^7.1.0", + "remark": "^15.0.1", + "remark-frontmatter": "^5.0.0", + "tokenx": "^1.3.0", + "unist-util-remove": "^4.0.0", + "unist-util-visit": "^5.1.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/okineadev" } }, - "node_modules/vite-plugin-full-reload/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/vitepress-plugin-llms/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.6" + "node": "18 || 20 || >=22" + } + }, + "node_modules/vitepress-plugin-llms/node_modules/brace-expansion": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/vitepress-plugin-llms/node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/vitepress-plugin-llms/node_modules/markdown-it": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/vitepress-plugin-llms/node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, + "license": "MIT" + }, + "node_modules/vitepress-plugin-llms/node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/vite/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", - "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "node_modules/vitepress-plugin-llms/node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/vitepress/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", "cpu": [ "ppc64" ], @@ -11033,10 +11113,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/android-arm": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", - "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "node_modules/vitepress/node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", "cpu": [ "arm" ], @@ -11050,10 +11130,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/android-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", - "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "node_modules/vitepress/node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", "cpu": [ "arm64" ], @@ -11067,10 +11147,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/android-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", - "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "node_modules/vitepress/node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", "cpu": [ "x64" ], @@ -11084,10 +11164,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", - "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "node_modules/vitepress/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", "cpu": [ "arm64" ], @@ -11101,10 +11181,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/darwin-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", - "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "node_modules/vitepress/node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", "cpu": [ "x64" ], @@ -11118,10 +11198,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", - "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "node_modules/vitepress/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", "cpu": [ "arm64" ], @@ -11135,10 +11215,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", - "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "node_modules/vitepress/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", "cpu": [ "x64" ], @@ -11152,10 +11232,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-arm": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", - "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "node_modules/vitepress/node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", "cpu": [ "arm" ], @@ -11169,10 +11249,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", - "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "node_modules/vitepress/node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", "cpu": [ "arm64" ], @@ -11186,10 +11266,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-ia32": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", - "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "node_modules/vitepress/node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", "cpu": [ "ia32" ], @@ -11203,10 +11283,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-loong64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", - "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "node_modules/vitepress/node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", "cpu": [ "loong64" ], @@ -11220,10 +11300,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", - "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "node_modules/vitepress/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", "cpu": [ "mips64el" ], @@ -11237,10 +11317,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", - "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "node_modules/vitepress/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", "cpu": [ "ppc64" ], @@ -11254,10 +11334,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", - "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "node_modules/vitepress/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", "cpu": [ "riscv64" ], @@ -11271,10 +11351,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-s390x": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", - "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "node_modules/vitepress/node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", "cpu": [ "s390x" ], @@ -11288,10 +11368,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/linux-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", - "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "node_modules/vitepress/node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", "cpu": [ "x64" ], @@ -11305,10 +11385,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", - "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "node_modules/vitepress/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", "cpu": [ "arm64" ], @@ -11322,10 +11402,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", - "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "node_modules/vitepress/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", "cpu": [ "x64" ], @@ -11339,10 +11419,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", - "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "node_modules/vitepress/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", "cpu": [ "arm64" ], @@ -11356,10 +11436,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", - "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "node_modules/vitepress/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", "cpu": [ "x64" ], @@ -11373,10 +11453,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", - "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "node_modules/vitepress/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", "cpu": [ "arm64" ], @@ -11390,10 +11470,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/sunos-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", - "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "node_modules/vitepress/node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", "cpu": [ "x64" ], @@ -11407,10 +11487,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/win32-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", - "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "node_modules/vitepress/node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", "cpu": [ "arm64" ], @@ -11424,10 +11504,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/win32-ia32": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", - "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "node_modules/vitepress/node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", "cpu": [ "ia32" ], @@ -11441,10 +11521,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/@esbuild/win32-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", - "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "node_modules/vitepress/node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", "cpu": [ "x64" ], @@ -11458,10 +11538,10 @@ "node": ">=18" } }, - "node_modules/vite/node_modules/esbuild": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", - "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "node_modules/vitepress/node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -11472,190 +11552,135 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.2", - "@esbuild/android-arm": "0.27.2", - "@esbuild/android-arm64": "0.27.2", - "@esbuild/android-x64": "0.27.2", - "@esbuild/darwin-arm64": "0.27.2", - "@esbuild/darwin-x64": "0.27.2", - "@esbuild/freebsd-arm64": "0.27.2", - "@esbuild/freebsd-x64": "0.27.2", - "@esbuild/linux-arm": "0.27.2", - "@esbuild/linux-arm64": "0.27.2", - "@esbuild/linux-ia32": "0.27.2", - "@esbuild/linux-loong64": "0.27.2", - "@esbuild/linux-mips64el": "0.27.2", - "@esbuild/linux-ppc64": "0.27.2", - "@esbuild/linux-riscv64": "0.27.2", - "@esbuild/linux-s390x": "0.27.2", - "@esbuild/linux-x64": "0.27.2", - "@esbuild/netbsd-arm64": "0.27.2", - "@esbuild/netbsd-x64": "0.27.2", - "@esbuild/openbsd-arm64": "0.27.2", - "@esbuild/openbsd-x64": "0.27.2", - "@esbuild/openharmony-arm64": "0.27.2", - "@esbuild/sunos-x64": "0.27.2", - "@esbuild/win32-arm64": "0.27.2", - "@esbuild/win32-ia32": "0.27.2", - "@esbuild/win32-x64": "0.27.2" - } - }, - "node_modules/vitepress": { - "version": "2.0.0-alpha.15", - "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-2.0.0-alpha.15.tgz", - "integrity": "sha512-jhjSYd10Z6RZiKOa7jy0xMVf5NB5oSc/lS3bD/QoUc6V8PrvQR5JhC9104NEt6+oTGY/ftieVWxY9v7YI+1IjA==", + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/vitepress/node_modules/vite": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.2.tgz", + "integrity": "sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==", "dev": true, "license": "MIT", "dependencies": { - "@docsearch/css": "^4.3.2", - "@docsearch/js": "^4.3.2", - "@iconify-json/simple-icons": "^1.2.59", - "@shikijs/core": "^3.15.0", - "@shikijs/transformers": "^3.15.0", - "@shikijs/types": "^3.15.0", - "@types/markdown-it": "^14.1.2", - "@vitejs/plugin-vue": "^6.0.1", - "@vue/devtools-api": "^8.0.5", - "@vue/shared": "^3.5.24", - "@vueuse/core": "^14.0.0", - "@vueuse/integrations": "^14.0.0", - "focus-trap": "^7.6.6", - "mark.js": "8.11.1", - "minisearch": "^7.2.0", - "shiki": "^3.15.0", - "vite": "^7.2.2", - "vue": "^3.5.24" + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { - "vitepress": "bin/vitepress.js" + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" }, "peerDependencies": { - "markdown-it-mathjax3": "^4", - "oxc-minify": "*", - "postcss": "^8" + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { - "markdown-it-mathjax3": { + "@types/node": { "optional": true }, - "oxc-minify": { + "jiti": { "optional": true }, - "postcss": { + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { "optional": true } } }, - "node_modules/vitepress-plugin-llms": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.9.3.tgz", - "integrity": "sha512-iU6LQVGS35urNGW/RXHTtt9gj6kprV9ptJDX7ZiC+kgFtqiBMDo2bdXh2YG+KUGU3geKZWkWZcurhnrNCmofsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "gray-matter": "^4.0.3", - "markdown-it": "^14.1.0", - "markdown-title": "^1.0.2", - "mdast-util-from-markdown": "^2.0.2", - "millify": "^6.1.0", - "minimatch": "^10.0.3", - "path-to-regexp": "^8.3.0", - "picocolors": "^1.1.1", - "pretty-bytes": "^7.0.1", - "remark": "^15.0.1", - "remark-frontmatter": "^5.0.0", - "tokenx": "^1.1.0", - "unist-util-remove": "^4.0.0", - "unist-util-visit": "^5.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/okineadev" - } - }, - "node_modules/vitepress-plugin-llms/node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/vitepress-plugin-llms/node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/vitepress-plugin-llms/node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true, - "license": "MIT" - }, - "node_modules/vitepress-plugin-llms/node_modules/minimatch": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", - "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", - "dev": true, - "license": "ISC", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/vitepress-plugin-llms/node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true, - "license": "MIT" - }, "node_modules/vitest": { - "version": "4.0.16", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.16.tgz", - "integrity": "sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.5.tgz", + "integrity": "sha512-9Xx1v3/ih3m9hN+SbfkUyy0JAs72ap3r7joc87XL6jwF0jGg6mFBvQ1SrwaX+h8BlkX6Hz9shdd1uo6AF+ZGpg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.0.16", - "@vitest/mocker": "4.0.16", - "@vitest/pretty-format": "4.0.16", - "@vitest/runner": "4.0.16", - "@vitest/snapshot": "4.0.16", - "@vitest/spy": "4.0.16", - "@vitest/utils": "4.0.16", - "es-module-lexer": "^1.7.0", - "expect-type": "^1.2.2", + "@vitest/expect": "4.1.5", + "@vitest/mocker": "4.1.5", + "@vitest/pretty-format": "4.1.5", + "@vitest/runner": "4.1.5", + "@vitest/snapshot": "4.1.5", + "@vitest/spy": "4.1.5", + "@vitest/utils": "4.1.5", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", - "std-env": "^3.10.0", + "std-env": "^4.0.0-rc.1", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.0.3", - "vite": "^6.0.0 || ^7.0.0", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", "why-is-node-running": "^2.3.0" }, "bin": { @@ -11671,12 +11696,15 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.16", - "@vitest/browser-preview": "4.0.16", - "@vitest/browser-webdriverio": "4.0.16", - "@vitest/ui": "4.0.16", + "@vitest/browser-playwright": "4.1.5", + "@vitest/browser-preview": "4.1.5", + "@vitest/browser-webdriverio": "4.1.5", + "@vitest/coverage-istanbul": "4.1.5", + "@vitest/coverage-v8": "4.1.5", + "@vitest/ui": "4.1.5", "happy-dom": "*", - "jsdom": "*" + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "@edge-runtime/vm": { @@ -11697,6 +11725,12 @@ "@vitest/browser-webdriverio": { "optional": true }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, "@vitest/ui": { "optional": true }, @@ -11705,21 +11739,24 @@ }, "jsdom": { "optional": true + }, + "vite": { + "optional": false } } }, "node_modules/vue": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.25.tgz", - "integrity": "sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==", + "version": "3.5.33", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.33.tgz", + "integrity": "sha512-1AgChhx5w3ALgT4oK3acm2Es/7jyZhWSVUfs3rOBlGQC0rjEDkS7G4lWlJJGGNQD+BV3reCwbQrOe1mPNwKHBQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.25", - "@vue/compiler-sfc": "3.5.25", - "@vue/runtime-dom": "3.5.25", - "@vue/server-renderer": "3.5.25", - "@vue/shared": "3.5.25" + "@vue/compiler-dom": "3.5.33", + "@vue/compiler-sfc": "3.5.33", + "@vue/runtime-dom": "3.5.33", + "@vue/server-renderer": "3.5.33", + "@vue/shared": "3.5.33" }, "peerDependencies": { "typescript": "*" @@ -11731,9 +11768,9 @@ } }, "node_modules/vue-component-type-helpers": { - "version": "2.2.12", - "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-2.2.12.tgz", - "integrity": "sha512-YbGqHZ5/eW4SnkPNR44mKVc6ZKQoRs/Rux1sxC6rdwXb4qpbOSYfDr9DsTHolOTGmIKgM9j141mZbBeg05R1pw==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-3.2.7.tgz", + "integrity": "sha512-+gPp5YGmhfsj1IN+xUo7y0fb4clfnOiiUA39y07yW1VzCRjzVgwLbtmdWlghh7mXrPsEaYc7rrIir/HT6C8vYQ==", "dev": true, "license": "MIT" }, @@ -11786,9 +11823,9 @@ } }, "node_modules/webdriver-bidi-protocol": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.3.6.tgz", - "integrity": "sha512-mlGndEOA9yK9YAbvtxaPTqdi/kaCWYYfwrZvGzcmkr/3lWM+tQj53BxtpVd6qbC6+E5OnHXgCcAhre6AkXzxjA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.1.tgz", + "integrity": "sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw==", "dev": true, "license": "Apache-2.0" }, @@ -11820,17 +11857,18 @@ } }, "node_modules/whatwg-url": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-15.1.0.tgz", - "integrity": "sha512-2ytDk0kiEj/yu90JOAp44PVPUkO9+jVhyf+SybKlRHSDlvOOZhdPIrr7xTH64l4WixO2cP+wQIcgujkGBPPz6g==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", + "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==", "dev": true, "license": "MIT", "dependencies": { + "@exodus/bytes": "^1.11.0", "tr46": "^6.0.0", - "webidl-conversions": "^8.0.0" + "webidl-conversions": "^8.0.1" }, "engines": { - "node": ">=20" + "node": "^20.19.0 || ^22.12.0 || >=24.0.0" } }, "node_modules/which": { @@ -11911,9 +11949,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", + "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 20c1c352..d67b0c3e 100644 --- a/package.json +++ b/package.json @@ -14,58 +14,58 @@ "test:run": "vitest run" }, "devDependencies": { - "@ark-ui/vue": "^5.25.1", - "@craftile/editor": "^1.0.3", - "@craftile/plugin-common-properties": "^1.0.3", - "@craftile/preview-client": "^1.0.3", - "@craftile/preview-client-html": "^1.0.3", - "@craftile/types": "^1.0.3", - "@iconify-json/bi": "^1.2.6", + "@ark-ui/vue": "^5.36.2", + "@craftile/editor": "^1.0.6", + "@craftile/plugin-common-properties": "^1.0.6", + "@craftile/preview-client": "^1.0.6", + "@craftile/preview-client-html": "^1.0.6", + "@craftile/types": "^1.0.6", + "@iconify-json/bi": "^1.2.7", "@iconify-json/heroicons": "^1.2.3", - "@iconify-json/lucide": "^1.2.68", + "@iconify-json/lucide": "^1.2.105", "@iconify-json/mdi": "^1.2.3", - "@iconify-json/ri": "^1.2.5", + "@iconify-json/ri": "^1.2.10", "@red-asuka/vitepress-plugin-tabs": "^0.0.4", "@tailwindcss/typography": "^0.5.19", - "@tailwindcss/vite": "^4.1.16", - "@tiptap/extension-bold": "^3.6.2", - "@tiptap/extension-bullet-list": "^3.6.2", - "@tiptap/extension-document": "^3.6.2", - "@tiptap/extension-heading": "^3.6.2", - "@tiptap/extension-italic": "^3.6.2", - "@tiptap/extension-list-item": "^3.6.2", - "@tiptap/extension-ordered-list": "^3.6.2", - "@tiptap/extension-paragraph": "^3.6.2", - "@tiptap/extension-text": "^3.6.2", - "@tiptap/extension-underline": "^3.6.2", - "@tiptap/pm": "^3.6.2", - "@tiptap/vue-3": "^3.6.2", - "@types/node": "^24.6.2", + "@tailwindcss/vite": "^4.2.4", + "@tiptap/extension-bold": "^3.22.5", + "@tiptap/extension-bullet-list": "^3.22.5", + "@tiptap/extension-document": "^3.22.5", + "@tiptap/extension-heading": "^3.22.5", + "@tiptap/extension-italic": "^3.22.5", + "@tiptap/extension-list-item": "^3.22.5", + "@tiptap/extension-ordered-list": "^3.22.5", + "@tiptap/extension-paragraph": "^3.22.5", + "@tiptap/extension-text": "^3.22.5", + "@tiptap/extension-underline": "^3.22.5", + "@tiptap/pm": "^3.22.5", + "@tiptap/vue-3": "^3.22.5", + "@types/node": "^25.6.0", "@types/nprogress": "^0.2.3", "@vitejs/plugin-vue": "^6.0.1", - "@vitest/ui": "^4.0.16", - "@vue/test-utils": "^2.4.6", + "@vitest/ui": "^4.1.5", + "@vue/test-utils": "^2.4.10", "@vueuse/core": "^14.1.0", - "@zag-js/file-upload": "^1.25.0", - "@zag-js/vue": "^1.25.0", - "feed": "^5.1.0", - "happy-dom": "^20.0.11", - "jsdom": "^27.4.0", - "laravel-vite-plugin": "^2.0.1", - "morphdom": "^2.7.7", + "@zag-js/file-upload": "^1.40.0", + "@zag-js/vue": "^1.40.0", + "feed": "^5.2.1", + "happy-dom": "^20.9.0", + "jsdom": "^29.1.1", + "laravel-vite-plugin": "^3.1.0", + "morphdom": "^2.7.8", "nprogress": "^0.2.0", - "perfect-debounce": "^2.0.0", - "postcss-prefixwrap": "^1.57.0", - "puppeteer": "^24.23.0", + "perfect-debounce": "^2.1.0", + "postcss-prefixwrap": "^1.57.2", + "puppeteer": "^24.42.0", "tailwindcss": "^4.1.16", - "unplugin-auto-import": "^20.3.0", - "unplugin-icons": "^22.4.2", - "unplugin-vue-components": "^29.1.0", + "unplugin-auto-import": "^21.0.0", + "unplugin-icons": "^23.0.1", + "unplugin-vue-components": "^32.0.0", "unplugin-vue-macros": "^2.14.5", - "vite": "^7.1.11", - "vitepress": "^2.0.0-alpha.15", - "vitepress-plugin-llms": "^1.9.3", - "vitest": "^4.0.16", + "vite": "^8.0.10", + "vitepress": "^2.0.0-alpha.17", + "vitepress-plugin-llms": "^1.12.1", + "vitest": "^4.1.5", "vue": "^3.5.25", "vue3-tabs-component": "^1.3.7" } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2c0a60fd..babdddac 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -14,6 +14,10 @@ parameters: tmpDir: build/phpstan checkOctaneCompatibility: true checkModelProperties: true + configDirectories: + - config + viewDirectories: + - resources/views treatPhpDocTypesAsCertain: false universalObjectCratesClasses: - BagistoPlus\Visual\Sections\Concerns\SettingsValues diff --git a/public/vendor/bagistoplus/visual/admin/assets/admin-BgkT9tVx.css b/public/vendor/bagistoplus/visual/admin/assets/admin-BgkT9tVx.css deleted file mode 100644 index 7ae0af0c..00000000 --- a/public/vendor/bagistoplus/visual/admin/assets/admin-BgkT9tVx.css +++ /dev/null @@ -1 +0,0 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-3xl:48rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-semibold:600;--font-weight-bold:700}}@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-y-0{inset-block:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-8{margin-top:calc(var(--spacing)*8)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.flex{display:flex}.h-full{height:100%}.w-\[360px\]{width:360px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-xs{max-width:var(--container-xs)}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-white{background-color:var(--color-white)}.bg-cover{background-size:cover}.bg-no-repeat{background-repeat:no-repeat}.px-5{padding-inline:calc(var(--spacing)*5)}.py-2{padding-block:calc(var(--spacing)*2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-800{color:var(--color-gray-800)}.text-white{color:var(--color-white)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media not all and (min-width:40rem){.max-sm\:hidden{display:none}.max-sm\:flex-wrap{flex-wrap:wrap}.max-sm\:p-4{padding:calc(var(--spacing)*4)}}@media(min-width:40rem){.sm\:hidden{display:none}.sm\:min-h-\[16rem\]{min-height:16rem}.sm\:px-8{padding-inline:calc(var(--spacing)*8)}.sm\:pb-8{padding-bottom:calc(var(--spacing)*8)}}@media(min-width:48rem){.md\:pt-8{padding-top:calc(var(--spacing)*8)}}.dark\:border-gray-600:where(.dark,.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\:text-blue-300:where(.dark,.dark *){color:var(--color-blue-300)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-white:where(.dark,.dark *){color:var(--color-white)}}.bagisto-visual-icon{background-color:currentColor;width:24px;height:24px;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' viewBox='0 0 24 24'%0A%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5zm0 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6zm12 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6z' /%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' viewBox='0 0 24 24'%0A%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5zm0 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6zm12 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6z' /%3E%3C/svg%3E")}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/public/vendor/bagistoplus/visual/admin/assets/admin-DriZwGDV.css b/public/vendor/bagistoplus/visual/admin/assets/admin-DriZwGDV.css new file mode 100644 index 00000000..cff328b5 --- /dev/null +++ b/public/vendor/bagistoplus/visual/admin/assets/admin-DriZwGDV.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-3xl:48rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-semibold:600;--font-weight-bold:700}}@layer utilities{.absolute{position:absolute}.relative{position:relative}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.flex{display:flex}.h-full{height:100%}.w-\[360px\]{width:360px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-xs{max-width:var(--container-xs)}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-white{background-color:var(--color-white)}.bg-cover{background-size:cover}.bg-no-repeat{background-repeat:no-repeat}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-800{color:var(--color-gray-800)}.text-white{color:var(--color-white)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@media not all and (width>=40rem){.max-sm\:hidden{display:none}.max-sm\:flex-wrap{flex-wrap:wrap}.max-sm\:p-4{padding:calc(var(--spacing) * 4)}}@media (width>=40rem){.sm\:hidden{display:none}.sm\:min-h-\[16rem\]{min-height:16rem}.sm\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\:pb-8{padding-bottom:calc(var(--spacing) * 8)}}@media (width>=48rem){.md\:pt-8{padding-top:calc(var(--spacing) * 8)}}.dark\:border-gray-600:where(.dark,.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\:text-blue-300:where(.dark,.dark *){color:var(--color-blue-300)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-white:where(.dark,.dark *){color:var(--color-white)}}.bagisto-visual-icon{background-color:currentColor;width:24px;height:24px;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' viewBox='0 0 24 24'%0A%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5zm0 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6zm12 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6z' /%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' viewBox='0 0 24 24'%0A%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5zm0 8a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6zm12 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-6z' /%3E%3C/svg%3E")}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/public/vendor/bagistoplus/visual/admin/assets/default_theme_preview-BkZ1bWrW.png b/public/vendor/bagistoplus/visual/admin/assets/default_theme_preview-BkZ1bWrW.png deleted file mode 100644 index 7d63d221..00000000 Binary files a/public/vendor/bagistoplus/visual/admin/assets/default_theme_preview-BkZ1bWrW.png and /dev/null differ diff --git a/public/vendor/bagistoplus/visual/admin/assets/index-D_7XvK2G.js b/public/vendor/bagistoplus/visual/admin/assets/index-D_7XvK2G.js new file mode 100644 index 00000000..e69de29b diff --git a/public/vendor/bagistoplus/visual/admin/assets/index-l0sNRNKZ.js b/public/vendor/bagistoplus/visual/admin/assets/index-l0sNRNKZ.js deleted file mode 100644 index 8b137891..00000000 --- a/public/vendor/bagistoplus/visual/admin/assets/index-l0sNRNKZ.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public/vendor/bagistoplus/visual/admin/assets/logo-B5JQEkd6.svg b/public/vendor/bagistoplus/visual/admin/assets/logo-B5JQEkd6.svg deleted file mode 100644 index 3eaacaec..00000000 --- a/public/vendor/bagistoplus/visual/admin/assets/logo-B5JQEkd6.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - \ No newline at end of file diff --git a/public/vendor/bagistoplus/visual/admin/manifest.json b/public/vendor/bagistoplus/visual/admin/manifest.json index 66d54432..548125e5 100644 --- a/public/vendor/bagistoplus/visual/admin/manifest.json +++ b/public/vendor/bagistoplus/visual/admin/manifest.json @@ -1,23 +1,15 @@ { "resources/assets/admin/css/admin.css": { - "file": "assets/admin-BgkT9tVx.css", - "src": "resources/assets/admin/css/admin.css", - "isEntry": true, + "file": "assets/admin-DriZwGDV.css", "name": "admin", "names": [ "admin.css" - ] - }, - "resources/assets/admin/images/default_theme_preview.png": { - "file": "assets/default_theme_preview-BkZ1bWrW.png", - "src": "resources/assets/admin/images/default_theme_preview.png" - }, - "resources/assets/admin/images/logo.svg": { - "file": "assets/logo-B5JQEkd6.svg", - "src": "resources/assets/admin/images/logo.svg" + ], + "src": "resources/assets/admin/css/admin.css", + "isEntry": true }, "resources/assets/admin/ts/index.ts": { - "file": "assets/index-l0sNRNKZ.js", + "file": "assets/index-D_7XvK2G.js", "name": "index", "src": "resources/assets/admin/ts/index.ts", "isEntry": true diff --git a/public/vendor/bagistoplus/visual/editor/assets/index-Ba6OF_gp.css b/public/vendor/bagistoplus/visual/editor/assets/index-Ba6OF_gp.css deleted file mode 100644 index fffaf1df..00000000 --- a/public/vendor/bagistoplus/visual/editor/assets/index-Ba6OF_gp.css +++ /dev/null @@ -1 +0,0 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{.__craftile,.__craftile :host{--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-green-400:oklch(79.2% .209 151.711);--color-blue-50:oklch(97% .014 254.604);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--animate-fade-in:fadeIn .25s ease-out;--animate-fade-out:fadeOut .25s ease-out}}@layer base,components;@layer utilities{.__craftile .pointer-events-none{pointer-events:none}.__craftile .absolute{position:absolute}.__craftile .fixed{position:fixed}.__craftile .relative{position:relative}.__craftile .inset-0{inset:calc(var(--spacing)*0)}.__craftile .inset-1{inset:calc(var(--spacing)*1)}.__craftile .-top-2{top:calc(var(--spacing)*-2)}.__craftile .-top-6{top:calc(var(--spacing)*-6)}.__craftile .top-0{top:calc(var(--spacing)*0)}.__craftile .top-1\/2{top:50%}.__craftile .top-2{top:calc(var(--spacing)*2)}.__craftile .top-2\.5{top:calc(var(--spacing)*2.5)}.__craftile .top-4{top:calc(var(--spacing)*4)}.__craftile .top-14{top:calc(var(--spacing)*14)}.__craftile .-right-2{right:calc(var(--spacing)*-2)}.__craftile .right-0{right:calc(var(--spacing)*0)}.__craftile .right-1{right:calc(var(--spacing)*1)}.__craftile .right-2{right:calc(var(--spacing)*2)}.__craftile .right-4{right:calc(var(--spacing)*4)}.__craftile .bottom-0{bottom:calc(var(--spacing)*0)}.__craftile .left-3{left:calc(var(--spacing)*3)}.__craftile .left-14{left:calc(var(--spacing)*14)}.__craftile .\!z-10{z-index:10!important}.__craftile .\!z-20{z-index:20!important}.__craftile .z-10{z-index:10}.__craftile .z-50{z-index:50}.__craftile .z-\[100\]{z-index:100}.__craftile .col-span-3{grid-column:span 3/span 3}.__craftile .col-start-1{grid-column-start:1}.__craftile .col-start-2{grid-column-start:2}.__craftile .row-span-3{grid-row:span 3/span 3}.__craftile .row-start-1{grid-row-start:1}.__craftile .row-start-2{grid-row-start:2}.__craftile .row-start-3{grid-row-start:3}.__craftile .mx-2{margin-inline:calc(var(--spacing)*2)}.__craftile .my-2{margin-block:calc(var(--spacing)*2)}.__craftile .ms-2{margin-inline-start:calc(var(--spacing)*2)}.__craftile .prose{color:var(--tw-prose-body);max-width:65ch}.__craftile .prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.__craftile .prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.__craftile .prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.__craftile .prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.__craftile .prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.__craftile .prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.__craftile .prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.__craftile .prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.__craftile .prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.__craftile .prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.__craftile .prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.__craftile .prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.__craftile .prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.__craftile .prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.__craftile .prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.__craftile .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.__craftile .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.__craftile .prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.__craftile .prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.__craftile .prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.__craftile .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.__craftile .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.__craftile .prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.__craftile .prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.__craftile .prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.__craftile .prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.__craftile .prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.__craftile .prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.__craftile .prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.__craftile .prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.__craftile .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.__craftile .prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.__craftile .prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.__craftile .prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.__craftile .prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.__craftile .prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.__craftile .prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.__craftile .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.__craftile .prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.__craftile .prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.__craftile .prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.__craftile .prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.__craftile .prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.__craftile .prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.__craftile .prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.__craftile .prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.__craftile .prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.__craftile .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.__craftile .prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.__craftile .prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.__craftile .prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.__craftile .prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.__craftile .prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.__craftile .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.__craftile .prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.__craftile .prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.__craftile .prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.__craftile .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.__craftile .prose-sm{font-size:.875rem;line-height:1.71429}.__craftile .prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.__craftile .prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em;font-size:1.28571em;line-height:1.55556}.__craftile .prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.11111em}.__craftile .prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.8em;font-size:2.14286em;line-height:1.2}.__craftile .prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.6em;margin-bottom:.8em;font-size:1.42857em;line-height:1.4}.__craftile .prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.55556em;margin-bottom:.444444em;font-size:1.28571em;line-height:1.55556}.__craftile .prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.42857em;margin-bottom:.571429em;line-height:1.42857}.__craftile .prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.142857em;padding-inline-end:.357143em;padding-bottom:.142857em;border-radius:.3125rem;padding-inline-start:.357143em;font-size:.857143em}.__craftile .prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em}.__craftile .prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.__craftile .prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.__craftile .prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;border-radius:.25rem;margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em;font-size:.857143em;line-height:1.66667}.__craftile .prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em;padding-inline-start:1.57143em}.__craftile .prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;margin-bottom:.285714em}.__craftile .prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.428571em}.__craftile .prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.__craftile .prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.__craftile .prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.__craftile .prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.__craftile .prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.__craftile .prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;padding-inline-start:1.57143em}.__craftile .prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.85714em;margin-bottom:2.85714em}.__craftile .prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em;line-height:1.5}.__craftile .prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.__craftile .prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.__craftile .prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;font-size:.857143em;line-height:1.33333}.__craftile .prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.__craftile .-mt-1{margin-top:calc(var(--spacing)*-1)}.__craftile .mt-1{margin-top:calc(var(--spacing)*1)}.__craftile .mt-2{margin-top:calc(var(--spacing)*2)}.__craftile .mt-4{margin-top:calc(var(--spacing)*4)}.__craftile .mr-1{margin-right:calc(var(--spacing)*1)}.__craftile .mb-1{margin-bottom:calc(var(--spacing)*1)}.__craftile .mb-4{margin-bottom:calc(var(--spacing)*4)}.__craftile .mb-px{margin-bottom:1px}.__craftile .ml-1{margin-left:calc(var(--spacing)*1)}.__craftile .ml-auto{margin-left:auto}.__craftile .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .hidden{display:none}.__craftile .inline{display:inline}.__craftile .inline-block{display:inline-block}.__craftile .inline-flex{display:inline-flex}.__craftile .aspect-square{aspect-ratio:1}.__craftile .h-1{height:calc(var(--spacing)*1)}.__craftile .h-2{height:calc(var(--spacing)*2)}.__craftile .h-2\.5{height:calc(var(--spacing)*2.5)}.__craftile .h-3{height:calc(var(--spacing)*3)}.__craftile .h-4{height:calc(var(--spacing)*4)}.__craftile .h-5{height:calc(var(--spacing)*5)}.__craftile .h-6{height:calc(var(--spacing)*6)}.__craftile .h-7{height:calc(var(--spacing)*7)}.__craftile .h-8{height:calc(var(--spacing)*8)}.__craftile .h-9{height:calc(var(--spacing)*9)}.__craftile .h-10{height:calc(var(--spacing)*10)}.__craftile .h-12{height:calc(var(--spacing)*12)}.__craftile .h-20{height:calc(var(--spacing)*20)}.__craftile .h-32{height:calc(var(--spacing)*32)}.__craftile .h-36{height:calc(var(--spacing)*36)}.__craftile .h-full{height:100%}.__craftile .max-h-80{max-height:calc(var(--spacing)*80)}.__craftile .max-h-96{max-height:calc(var(--spacing)*96)}.__craftile .max-h-\[360px\]{max-height:360px}.__craftile .min-h-0{min-height:calc(var(--spacing)*0)}.__craftile .min-h-20{min-height:calc(var(--spacing)*20)}.__craftile .min-h-24{min-height:calc(var(--spacing)*24)}.__craftile .w-0{width:calc(var(--spacing)*0)}.__craftile .w-2\.5{width:calc(var(--spacing)*2.5)}.__craftile .w-3{width:calc(var(--spacing)*3)}.__craftile .w-4{width:calc(var(--spacing)*4)}.__craftile .w-5{width:calc(var(--spacing)*5)}.__craftile .w-6{width:calc(var(--spacing)*6)}.__craftile .w-7{width:calc(var(--spacing)*7)}.__craftile .w-8{width:calc(var(--spacing)*8)}.__craftile .w-56{width:calc(var(--spacing)*56)}.__craftile .w-60{width:calc(var(--spacing)*60)}.__craftile .w-64{width:calc(var(--spacing)*64)}.__craftile .w-75{width:calc(var(--spacing)*75)}.__craftile .w-\[var\(--reference-width\)\]{width:var(--reference-width)}.__craftile .w-full{width:100%}.__craftile .w-sm{width:var(--container-sm)}.__craftile .max-w-full{max-width:100%}.__craftile .\!min-w-auto{min-width:auto!important}.__craftile .min-w-0{min-width:calc(var(--spacing)*0)}.__craftile .min-w-8{min-width:calc(var(--spacing)*8)}.__craftile .min-w-10{min-width:calc(var(--spacing)*10)}.__craftile .min-w-32{min-width:calc(var(--spacing)*32)}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.__craftile .rotate-90{rotate:90deg}.__craftile .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.__craftile .animate-spin{animation:var(--animate-spin)}.__craftile .cursor-crosshair{cursor:crosshair}.__craftile .cursor-default{cursor:default}.__craftile .cursor-move{cursor:move}.__craftile .cursor-pointer{cursor:pointer}.__craftile .touch-none{touch-action:none}.__craftile .appearance-none{appearance:none}.__craftile .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.__craftile .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.__craftile .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.__craftile .grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.__craftile .flex-col{flex-direction:column}.__craftile .items-center{align-items:center}.__craftile .items-stretch{align-items:stretch}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .justify-end{justify-content:flex-end}.__craftile .justify-start{justify-content:flex-start}.__craftile .gap-0\.5{gap:calc(var(--spacing)*.5)}.__craftile .gap-1{gap:calc(var(--spacing)*1)}.__craftile .gap-1\.5{gap:calc(var(--spacing)*1.5)}.__craftile .gap-2{gap:calc(var(--spacing)*2)}.__craftile .gap-3{gap:calc(var(--spacing)*3)}.__craftile .gap-4{gap:calc(var(--spacing)*4)}.__craftile :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.__craftile :where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}.__craftile :where(.divide-zinc-200>:not(:last-child)){border-color:var(--color-zinc-200)}.__craftile .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.__craftile .overflow-hidden{overflow:hidden}.__craftile .overflow-y-auto{overflow-y:auto}.__craftile .overflow-y-hidden{overflow-y:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .rounded-sm{border-radius:var(--radius-sm)}.__craftile .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.__craftile .rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.__craftile .rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-2{border-style:var(--tw-border-style);border-width:2px}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.__craftile .border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-dashed{--tw-border-style:dashed;border-style:dashed}.__craftile .border-none{--tw-border-style:none;border-style:none}.__craftile .border-blue-300{border-color:var(--color-blue-300)}.__craftile .border-blue-400{border-color:var(--color-blue-400)}.__craftile .border-blue-500{border-color:var(--color-blue-500)}.__craftile .border-gray-300{border-color:var(--color-gray-300)}.__craftile .border-neutral-200{border-color:var(--color-neutral-200)}.__craftile .border-red-200{border-color:var(--color-red-200)}.__craftile .border-white{border-color:var(--color-white)}.__craftile .border-zinc-200{border-color:var(--color-zinc-200)}.__craftile .border-zinc-300{border-color:var(--color-zinc-300)}.__craftile .bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.__craftile .bg-blue-50{background-color:var(--color-blue-50)}.__craftile .bg-blue-500{background-color:var(--color-blue-500)}.__craftile .bg-gray-50{background-color:var(--color-gray-50)}.__craftile .bg-gray-100{background-color:var(--color-gray-100)}.__craftile .bg-neutral-100{background-color:var(--color-neutral-100)}.__craftile .bg-neutral-200{background-color:var(--color-neutral-200)}.__craftile .bg-transparent{background-color:#0000}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .bg-zinc-50\/50{background-color:#fafafa80}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-zinc-50\/50{background-color:color-mix(in oklab,var(--color-zinc-50)50%,transparent)}}.__craftile .bg-zinc-100{background-color:var(--color-zinc-100)}.__craftile .bg-zinc-200{background-color:var(--color-zinc-200)}.__craftile .bg-zinc-300{background-color:var(--color-zinc-300)}.__craftile .bg-zinc-700\/30{background-color:#3f3f464d}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-zinc-700\/30{background-color:color-mix(in oklab,var(--color-zinc-700)30%,transparent)}}.__craftile .bg-none{background-image:none}.__craftile .object-cover{object-fit:cover}.__craftile .object-center{object-position:center}.__craftile .p-0\.5{padding:calc(var(--spacing)*.5)}.__craftile .p-1{padding:calc(var(--spacing)*1)}.__craftile .p-2{padding:calc(var(--spacing)*2)}.__craftile .p-3{padding:calc(var(--spacing)*3)}.__craftile .p-4{padding:calc(var(--spacing)*4)}.__craftile .p-px{padding:1px}.__craftile .px-0\.5{padding-inline:calc(var(--spacing)*.5)}.__craftile .px-2{padding-inline:calc(var(--spacing)*2)}.__craftile .px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.__craftile .px-3{padding-inline:calc(var(--spacing)*3)}.__craftile .px-4{padding-inline:calc(var(--spacing)*4)}.__craftile .py-1{padding-block:calc(var(--spacing)*1)}.__craftile .py-1\.5{padding-block:calc(var(--spacing)*1.5)}.__craftile .py-2{padding-block:calc(var(--spacing)*2)}.__craftile .py-2\.5{padding-block:calc(var(--spacing)*2.5)}.__craftile .py-3{padding-block:calc(var(--spacing)*3)}.__craftile .py-6{padding-block:calc(var(--spacing)*6)}.__craftile .pt-2{padding-top:calc(var(--spacing)*2)}.__craftile .pt-4{padding-top:calc(var(--spacing)*4)}.__craftile .pr-3{padding-right:calc(var(--spacing)*3)}.__craftile .pl-1{padding-left:calc(var(--spacing)*1)}.__craftile .pl-2{padding-left:calc(var(--spacing)*2)}.__craftile .pl-9{padding-left:calc(var(--spacing)*9)}.__craftile .text-center{text-align:center}.__craftile .text-left{text-align:left}.__craftile .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.__craftile .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.__craftile .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.__craftile .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.__craftile .text-blue-400{color:var(--color-blue-400)}.__craftile .text-blue-500{color:var(--color-blue-500)}.__craftile .text-blue-600{color:var(--color-blue-600)}.__craftile .text-gray-400{color:var(--color-gray-400)}.__craftile .text-gray-500{color:var(--color-gray-500)}.__craftile .text-gray-600{color:var(--color-gray-600)}.__craftile .text-gray-700{color:var(--color-gray-700)}.__craftile .text-gray-900{color:var(--color-gray-900)}.__craftile .text-green-400{color:var(--color-green-400)}.__craftile .text-neutral-700{color:var(--color-neutral-700)}.__craftile .text-red-400{color:var(--color-red-400)}.__craftile .text-red-600{color:var(--color-red-600)}.__craftile .text-white{color:var(--color-white)}.__craftile .text-zinc-200{color:var(--color-zinc-200)}.__craftile .text-zinc-400{color:var(--color-zinc-400)}.__craftile .text-zinc-500{color:var(--color-zinc-500)}.__craftile .text-zinc-600{color:var(--color-zinc-600)}.__craftile .text-zinc-700{color:var(--color-zinc-700)}.__craftile .capitalize{text-transform:capitalize}.__craftile .lowercase{text-transform:lowercase}.__craftile .uppercase{text-transform:uppercase}.__craftile .italic{font-style:italic}.__craftile .underline{text-decoration-line:underline}.__craftile .opacity-0{opacity:0}.__craftile .opacity-25{opacity:.25}.__craftile .opacity-75{opacity:.75}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .ring-blue-500{--tw-ring-color:var(--color-blue-500)}.__craftile .outline-0{outline-style:var(--tw-outline-style);outline-width:0}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .duration-200{--tw-duration:.2s;transition-duration:.2s}.__craftile .forced-color-adjust-none{forced-color-adjust:none}.__craftile .prose-gray{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733)}.__craftile .outline-none{--tw-outline-style:none;outline-style:none}.__craftile .select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.__craftile .group-hover\:block:is(:where(.group):hover *){display:block}.__craftile .group-hover\:flex:is(:where(.group):hover *){display:flex}.__craftile .group-hover\:bg-neutral-900\/10:is(:where(.group):hover *){background-color:#1717171a}@supports (color:color-mix(in lab,red,red)){.__craftile .group-hover\:bg-neutral-900\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-neutral-900)10%,transparent)}}.__craftile .group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.__craftile .first\:border-t:first-child{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .focus-within\:shadow:focus-within{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-within\:ring:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-within\:ring-zinc-700:focus-within{--tw-ring-color:var(--color-zinc-700)}@media(hover:hover){.__craftile .hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.__craftile .hover\:border-red-300:hover{border-color:var(--color-red-300)}.__craftile .hover\:border-red-400:hover{border-color:var(--color-red-400)}.__craftile .hover\:border-zinc-400:hover{border-color:var(--color-zinc-400)}.__craftile .hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.__craftile .hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.__craftile .hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.__craftile .hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.__craftile .hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.__craftile .hover\:bg-neutral-100:hover{background-color:var(--color-neutral-100)}.__craftile .hover\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.__craftile .hover\:bg-neutral-300:hover{background-color:var(--color-neutral-300)}.__craftile .hover\:bg-red-50:hover{background-color:var(--color-red-50)}.__craftile .hover\:bg-zinc-50:hover{background-color:var(--color-zinc-50)}.__craftile .hover\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.__craftile .hover\:bg-zinc-200:hover{background-color:var(--color-zinc-200)}.__craftile .hover\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.__craftile .hover\:text-blue-800:hover{color:var(--color-blue-800)}.__craftile .hover\:text-gray-800:hover{color:var(--color-gray-800)}.__craftile .hover\:text-red-600:hover{color:var(--color-red-600)}.__craftile .hover\:text-red-700:hover{color:var(--color-red-700)}}.__craftile .focus\:border-transparent:focus{border-color:#0000}.__craftile .focus\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\:ring-zinc-700:focus{--tw-ring-color:var(--color-zinc-700)}.__craftile .focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .active\:cursor-grabbing:active{cursor:grabbing}.__craftile .data-\[state\=closed\]\:hidden[data-state=closed]{display:none}.__craftile .data-\[state\=closed\]\:animate-fade-out[data-state=closed]{animation:var(--animate-fade-out)}.__craftile .data-\[state\=open\]\:rotate-180[data-state=open]{rotate:180deg}.__craftile .data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:var(--animate-fade-in)}.__craftile .\[\&\>button\]\:rounded-md>button{border-radius:var(--radius-md)}.__craftile .\[\&\>button\]\:p-1>button{padding:calc(var(--spacing)*1)}.__craftile .\[\&\>button\:hover\]\:bg-zinc-300>button:hover{background-color:var(--color-zinc-300)}.__craftile .\[\&\>div\]\:max-h-48>div{max-height:calc(var(--spacing)*48)}.__craftile .\[\&\>div\]\:overflow-y-auto>div{overflow-y:auto}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#nprogress{pointer-events:none}#nprogress .bar{background:#3b82f6;position:fixed;z-index:99999;top:54px;left:0;width:100%;height:2px}#nprogress .peg{display:none;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3b82f6,0 0 5px #3b82f6;opacity:1} diff --git a/public/vendor/bagistoplus/visual/editor/assets/index-D6kDlnWA.js b/public/vendor/bagistoplus/visual/editor/assets/index-D6kDlnWA.js new file mode 100644 index 00000000..81e713a4 --- /dev/null +++ b/public/vendor/bagistoplus/visual/editor/assets/index-D6kDlnWA.js @@ -0,0 +1,129 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));function u(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var d={},f=[],p=()=>{},m=()=>!1,h=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),g=e=>e.startsWith(`onUpdate:`),_=Object.assign,v=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},y=Object.prototype.hasOwnProperty,b=(e,t)=>y.call(e,t),x=Array.isArray,S=e=>oe(e)===`[object Map]`,C=e=>oe(e)===`[object Set]`,ee=e=>oe(e)===`[object Date]`,te=e=>oe(e)===`[object RegExp]`,w=e=>typeof e==`function`,T=e=>typeof e==`string`,ne=e=>typeof e==`symbol`,re=e=>typeof e==`object`&&!!e,ie=e=>(re(e)||w(e))&&w(e.then)&&w(e.catch),ae=Object.prototype.toString,oe=e=>ae.call(e),se=e=>oe(e).slice(8,-1),ce=e=>oe(e)===`[object Object]`,le=e=>T(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ue=u(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),de=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},fe=/-\w/g,pe=de(e=>e.replace(fe,e=>e.slice(1).toUpperCase())),me=/\B([A-Z])/g,he=de(e=>e.replace(me,`-$1`).toLowerCase()),ge=de(e=>e.charAt(0).toUpperCase()+e.slice(1)),_e=de(e=>e?`on${ge(e)}`:``),ve=(e,t)=>!Object.is(e,t),ye=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},xe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Se=e=>{let t=T(e)?Number(e):NaN;return isNaN(t)?e:t},Ce,we=()=>Ce||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},Te=u(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function Ee(e){if(x(e)){let t={};for(let n=0;n{if(e){let n=e.split(Oe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ke(e){let t=``;if(T(e))t=e;else if(x(e))for(let n=0;nNe(e,t))}var Fe=e=>!!(e&&e.__v_isRef===!0),E=e=>T(e)?e:e==null?``:x(e)||re(e)&&(e.toString===ae||!w(e.toString))?Fe(e)?E(e.value):JSON.stringify(e,Ie,2):String(e),Ie=(e,t)=>Fe(t)?Ie(e,t.value):S(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Le(t,r)+` =>`]=n,e),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Le(e))}:ne(t)?Le(t):re(t)&&!x(t)&&!ce(t)?String(t):t,Le=(e,t=``)=>ne(e)?`Symbol(${e.description??t})`:e;function Re(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var ze,Be=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ze,!e&&ze&&(this.index=(ze.scopes||=[]).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(ze===this)ze=this.prevScope;else{let e=ze;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Je){let e=Je;for(Je=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;qe;){let t=qe;for(qe=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Qe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $e(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),nt(r),aee(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function et(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(tt(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function tt(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ut)||(e.globalVersion=ut,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!et(e))))return;e.flags|=2;let t=e.dep,n=Ue,r=at;Ue=e,at=!0;try{Qe(e);let n=e.fn(e._value);(t.version===0||ve(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Ue=n,at=r,$e(e),e.flags&=-3}}function nt(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)nt(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function aee(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function rt(e,t){e.effect instanceof Ge&&(e=e.effect.fn);let n=new Ge(e);t&&_(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function it(e){e.effect.stop()}var at=!0,ot=[];function st(){ot.push(at),at=!1}function ct(){let e=ot.pop();at=e===void 0?!0:e}function lt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Ue;Ue=void 0;try{t()}finally{Ue=e}}}var ut=0,oee=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},dt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ue||!at||Ue===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ue)t=this.activeLink=new oee(Ue,this),Ue.deps?(t.prevDep=Ue.depsTail,Ue.depsTail.nextDep=t,Ue.depsTail=t):Ue.deps=Ue.depsTail=t,ft(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Ue.depsTail,t.nextDep=void 0,Ue.depsTail.nextDep=t,Ue.depsTail=t,Ue.deps===t&&(Ue.deps=e)}return t}trigger(e){this.version++,ut++,this.notify(e)}notify(e){Xe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ze()}}};function ft(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ft(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var pt=new WeakMap,mt=Symbol(``),ht=Symbol(``),gt=Symbol(``);function _t(e,t,n){if(at&&Ue){let t=pt.get(e);t||pt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new dt),r.map=t,r.key=n),r.track()}}function vt(e,t,n,r,i,a){let o=pt.get(e);if(!o){ut++;return}let s=e=>{e&&e.trigger()};if(Xe(),t===`clear`)o.forEach(s);else{let i=x(e),a=i&&le(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===gt||!ne(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(gt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(mt)),S(e)&&s(o.get(ht)));break;case`delete`:i||(s(o.get(mt)),S(e)&&s(o.get(ht)));break;case`set`:S(e)&&s(o.get(mt));break}}Ze()}function see(e,t){let n=pt.get(e);return n&&n.get(t)}function yt(e){let t=cn(e);return t===e?t:(_t(t,`iterate`,gt),on(e)?t:t.map(ln))}function bt(e){return _t(e=cn(e),`iterate`,gt),e}function xt(e,t){return an(e)?un(rn(e)?ln(t):t):ln(t)}var St={__proto__:null,[Symbol.iterator](){return Ct(this,Symbol.iterator,e=>xt(this,e))},concat(...e){return yt(this).concat(...e.map(e=>x(e)?yt(e):e))},entries(){return Ct(this,`entries`,e=>(e[1]=xt(this,e[1]),e))},every(e,t){return wt(this,`every`,e,t,void 0,arguments)},filter(e,t){return wt(this,`filter`,e,t,e=>e.map(e=>xt(this,e)),arguments)},find(e,t){return wt(this,`find`,e,t,e=>xt(this,e),arguments)},findIndex(e,t){return wt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return wt(this,`findLast`,e,t,e=>xt(this,e),arguments)},findLastIndex(e,t){return wt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return wt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Et(this,`includes`,e)},indexOf(...e){return Et(this,`indexOf`,e)},join(e){return yt(this).join(e)},lastIndexOf(...e){return Et(this,`lastIndexOf`,e)},map(e,t){return wt(this,`map`,e,t,void 0,arguments)},pop(){return Dt(this,`pop`)},push(...e){return Dt(this,`push`,e)},reduce(e,...t){return Tt(this,`reduce`,e,t)},reduceRight(e,...t){return Tt(this,`reduceRight`,e,t)},shift(){return Dt(this,`shift`)},some(e,t){return wt(this,`some`,e,t,void 0,arguments)},splice(...e){return Dt(this,`splice`,e)},toReversed(){return yt(this).toReversed()},toSorted(e){return yt(this).toSorted(e)},toSpliced(...e){return yt(this).toSpliced(...e)},unshift(...e){return Dt(this,`unshift`,e)},values(){return Ct(this,`values`,e=>xt(this,e))}};function Ct(e,t,n){let r=bt(e),i=r[t]();return r!==e&&!on(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var cee=Array.prototype;function wt(e,t,n,r,i,a){let o=bt(e),s=o!==e&&!on(e),c=o[t];if(c!==cee[t]){let t=c.apply(e,a);return s?ln(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,xt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Tt(e,t,n,r){let i=bt(e),a=i!==e&&!on(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=xt(e,t)),n.call(this,t,xt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?xt(e,c):c}function Et(e,t,n){let r=cn(e);_t(r,`iterate`,gt);let i=r[t](...n);return(i===-1||i===!1)&&sn(n[0])?(n[0]=cn(n[0]),r[t](...n)):i}function Dt(e,t,n=[]){st(),Xe();let r=cn(e)[t].apply(e,n);return Ze(),ct(),r}var lee=u(`__proto__,__v_isRef,__isVue`),Ot=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(ne));function kt(e){ne(e)||(e=String(e));let t=cn(this);return _t(t,`has`,e),t.hasOwnProperty(e)}var At=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Xt:Yt:i?Jt:qt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=x(e);if(!r){let e;if(a&&(e=St[t]))return e;if(t===`hasOwnProperty`)return kt}let o=Reflect.get(e,t,dn(e)?e:n);if((ne(t)?Ot.has(t):lee(t))||(r||_t(e,`get`,t),i))return o;if(dn(o)){let e=a&&le(t)?o:o.value;return r&&re(e)?tn(e):e}return re(o)?r?tn(o):$t(o):o}},jt=class extends At{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=x(e)&&le(t);if(!this._isShallow){let e=an(i);if(!on(n)&&!an(n)&&(i=cn(i),n=cn(n)),!a&&dn(i)&&!dn(n))return e||(i.value=n),!0}let o=a?Number(t)e,Rt=e=>Reflect.getPrototypeOf(e);function zt(e,t,n){return function(...r){let i=this.__v_raw,a=cn(i),o=S(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?Lt:t?un:ln;return!t&&_t(a,`iterate`,c?ht:mt),_(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function Bt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Vt(e,t){let n={get(n){let r=this.__v_raw,i=cn(r),a=cn(n);e||(ve(n,a)&&_t(i,`get`,n),_t(i,`get`,a));let{has:o}=Rt(i),s=t?Lt:e?un:ln;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&_t(cn(t),`iterate`,mt),t.size},has(t){let n=this.__v_raw,r=cn(n),i=cn(t);return e||(ve(t,i)&&_t(r,`has`,t),_t(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=cn(a),s=t?Lt:e?un:ln;return!e&&_t(o,`iterate`,mt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return _(n,e?{add:Bt(`add`),set:Bt(`set`),delete:Bt(`delete`),clear:Bt(`clear`)}:{add(e){let n=cn(this),r=Rt(n),i=cn(e),a=!t&&!on(e)&&!an(e)?i:e;return r.has.call(n,a)||ve(e,a)&&r.has.call(n,e)||ve(i,a)&&r.has.call(n,i)||(n.add(a),vt(n,`add`,a,a)),this},set(e,n){!t&&!on(n)&&!an(n)&&(n=cn(n));let r=cn(this),{has:i,get:a}=Rt(r),o=i.call(r,e);o||=(e=cn(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?ve(n,s)&&vt(r,`set`,e,n,s):vt(r,`add`,e,n),this},delete(e){let t=cn(this),{has:n,get:r}=Rt(t),i=n.call(t,e);i||=(e=cn(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&vt(t,`delete`,e,void 0,a),o},clear(){let e=cn(this),t=e.size!==0,n=e.clear();return t&&vt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=zt(r,e,t)}),n}function Ht(e,t){let n=Vt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(b(n,r)&&r in t?n:t,r,i)}var Ut={get:Ht(!1,!1)},Wt={get:Ht(!1,!0)},Gt={get:Ht(!0,!1)},Kt={get:Ht(!0,!0)},qt=new WeakMap,Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap;function Zt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Qt(e){return e.__v_skip||!Object.isExtensible(e)?0:Zt(se(e))}function $t(e){return an(e)?e:nn(e,!1,Nt,Ut,qt)}function en(e){return nn(e,!1,Ft,Wt,Jt)}function tn(e){return nn(e,!0,Pt,Gt,Yt)}function uee(e){return nn(e,!0,It,Kt,Xt)}function nn(e,t,n,r,i){if(!re(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Qt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function rn(e){return an(e)?rn(e.__v_raw):!!(e&&e.__v_isReactive)}function an(e){return!!(e&&e.__v_isReadonly)}function on(e){return!!(e&&e.__v_isShallow)}function sn(e){return e?!!e.__v_raw:!1}function cn(e){let t=e&&e.__v_raw;return t?cn(t):e}function D(e){return!b(e,`__v_skip`)&&Object.isExtensible(e)&&be(e,`__v_skip`,!0),e}var ln=e=>re(e)?$t(e):e,un=e=>re(e)?tn(e):e;function dn(e){return e?e.__v_isRef===!0:!1}function O(e){return pn(e,!1)}function fn(e){return pn(e,!0)}function pn(e,t){return dn(e)?e:new dee(e,t)}var dee=class{constructor(e,t){this.dep=new dt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:cn(e),this._value=t?e:ln(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||on(e)||an(e);e=n?e:cn(e),ve(e,t)&&(this._rawValue=e,this._value=n?e:ln(e),this.dep.trigger())}};function fee(e){e.dep&&e.dep.trigger()}function k(e){return dn(e)?e.value:e}function A(e){return w(e)?e():k(e)}var mn={get:(e,t,n)=>t===`__v_raw`?e:k(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return dn(i)&&!dn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function hn(e){return rn(e)?e:new Proxy(e,mn)}var gn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new dt,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function _n(e){return new gn(e)}function vn(e){let t=x(e)?Array(e.length):{};for(let n in e)t[n]=xn(e,n);return t}var yn=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=ne(t)?t:String(t),this._raw=cn(e);let r=!0,i=e;if(!x(e)||ne(this._key)||!le(this._key))do r=!sn(i)||on(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=k(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&dn(this._raw[this._key])){let t=this._object[this._key];if(dn(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return see(this._raw,this._key)}},bn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function pee(e,t,n){return dn(e)?e:w(e)?new bn(e):re(e)&&arguments.length>1?xn(e,t,n):O(e)}function xn(e,t,n){return new yn(e,t,n)}var mee=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new dt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ut-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ue!==this)return Ye(this,!0),!0}get value(){let e=this.dep.track();return tt(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function hee(e,t,n=!1){let r,i;return w(e)?r=e:(r=e.get,i=e.set),new mee(r,i,n)}var gee={GET:`get`,HAS:`has`,ITERATE:`iterate`},_ee={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},Sn={},Cn=new WeakMap,wn=void 0;function vee(){return wn}function Tn(e,t=!1,n=wn){if(n){let t=Cn.get(n);t||Cn.set(n,t=[]),t.push(e)}}function yee(e,t,n=d){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:on(e)||i===!1||i===0?En(e,1):En(e),u,f,m,h,g=!1,_=!1;if(dn(e)?(f=()=>e.value,g=on(e)):rn(e)?(f=()=>l(e),g=!0):x(e)?(_=!0,g=e.some(e=>rn(e)||on(e)),f=()=>e.map(e=>{if(dn(e))return e.value;if(rn(e))return l(e);if(w(e))return c?c(e,2):e()})):f=w(e)?t?c?()=>c(e,2):e:()=>{if(m){st();try{m()}finally{ct()}}let t=wn;wn=u;try{return c?c(e,3,[h]):e(h)}finally{wn=t}}:p,t&&i){let e=f,t=i===!0?1/0:i;f=()=>En(e(),t)}let y=He(),b=()=>{u.stop(),y&&y.active&&v(y.effects,u)};if(a&&t){let e=t;t=(...t)=>{e(...t),b()}}let S=_?Array(e.length).fill(Sn):Sn,C=e=>{if(!(!(u.flags&1)||!u.dirty&&!e))if(t){let e=u.run();if(i||g||(_?e.some((e,t)=>ve(e,S[t])):ve(e,S))){m&&m();let n=wn;wn=u;try{let n=[e,S===Sn?void 0:_&&S[0]===Sn?[]:S,h];S=e,c?c(t,3,n):t(...n)}finally{wn=n}}}else u.run()};return s&&s(C),u=new Ge(f),u.scheduler=o?()=>o(C,!1):C,h=e=>Tn(e,!1,u),m=u.onStop=()=>{let e=Cn.get(u);if(e){if(c)c(e,4);else for(let t of e)t();Cn.delete(u)}},t?r?C(!0):S=u.run():o?o(C.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function En(e,t=1/0,n){if(t<=0||!re(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,dn(e))En(e.value,t,n);else if(x(e))for(let r=0;r{En(e,t,n)});else if(ce(e)){for(let r in e)En(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&En(e[r],t,n)}return e}var Dn=[];function bee(e){Dn.push(e)}function xee(){Dn.pop()}function See(e,t){}var Cee={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},wee={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function On(e,t,n,r){try{return r?e(...r):e()}catch(e){An(e,t,n)}}function kn(e,t,n,r){if(w(e)){let i=On(e,t,n,r);return i&&ie(i)&&i.catch(e=>{An(e,t,n)}),i}if(x(e)){let i=[];for(let a=0;a>>1,i=Mn[r],a=Kn(i);a=Kn(n)?Mn.push(e):Mn.splice(Bn(t),0,e),e.flags|=1,Hn()}}function Hn(){Rn||=Ln.then(qn)}function Un(e){x(e)?Pn.push(...e):Fn&&e.id===-1?Fn.splice(In+1,0,e):e.flags&1||(Pn.push(e),e.flags|=1),Hn()}function Wn(e,t,n=Nn+1){for(;nKn(e)-Kn(t));if(Pn.length=0,Fn){Fn.push(...e);return}for(Fn=e,In=0;Ine.id==null?e.flags&2?-1:1/0:e.id;function qn(e){try{for(Nn=0;NnJn.emit(e,...t)),Yn=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{Xn(e,t)}),setTimeout(()=>{Jn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Yn=[])},3e3)):Yn=[]}var Zn=null,Qn=null;function $n(e){let t=Zn;return Zn=e,Qn=e&&e.type.__scopeId||null,t}function er(e){Qn=e}function tr(){Qn=null}var nr=e=>j;function j(e,t=Zn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Ao(-1);let i=$n(t),a;try{a=e(...n)}finally{$n(i),r._d&&Ao(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function rr(e,t){if(Zn===null)return e;let n=as(Zn),r=e.dirs||=[];for(let e=0;e1)return n&&w(t)?t.call(r&&r.proxy):t}}function sr(){return!!(Ko()||va)}var cr=Symbol.for(`v-scx`),lr=()=>or(cr);function ur(e,t){return mr(e,null,t)}function dr(e,t){return mr(e,null,{flush:`post`})}function fr(e,t){return mr(e,null,{flush:`sync`})}function pr(e,t,n){return mr(e,t,n)}function mr(e,t,n=d){let{immediate:r,deep:i,flush:a,once:o}=n,s=_({},n),c=t&&r||!t&&a!==`post`,l;if(Qo){if(a===`sync`){let e=lr();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=p,e.resume=p,e.pause=p,e}}let u=Go;s.call=(e,t,n)=>kn(e,u,t,n);let f=!1;a===`post`?s.scheduler=e=>{Za(e,u&&u.suspense)}:a!==`sync`&&(f=!0,s.scheduler=(e,t)=>{t?e():Vn(e)}),s.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let m=yee(e,t,s);return Qo&&(l?l.push(m):c&&m()),m}function hr(e,t,n){let r=this.proxy,i=T(e)?e.includes(`.`)?gr(r,e):()=>r[e]:e.bind(r,r),a;w(t)?a=t:(a=t.handler,n=t);let o=Yo(this),s=mr(i,a.bind(r),n);return o(),s}function gr(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,br=e=>e&&(e.disabled||e.disabled===``),Tee=e=>e&&(e.defer||e.defer===``),xr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Sr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Cr=(e,t)=>{let n=e&&e.to;return T(n)?t?t(n):null:n},Eee={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=br(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=br(e.props),r=e.target=Cr(e.props,m),a=Dr(r,e,h,p);r&&(o!==`svg`&&xr(r)?o=`svg`:o!==`mathml`&&Sr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Er(e,!1)))},S=e=>{let t=()=>{_r.get(e)===t&&(_r.delete(e),br(e.props)&&(b(e,_(e.el)||n,e.anchor),Er(e,!0)),x(e))};_r.set(e,t),Za(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Tee(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Er(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=_r.get(e);if(u){u.flags|=8,_r.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=br(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||xr(p)?o=`svg`:(o===`mathml`||Sr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),io(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=Cr(t.props,m);e&&wr(t,e,null,l,0)}else g&&wr(t,p,h,l,1);Er(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!br(f),m=_r.get(e);if(m&&(m.flags|=8,_r.delete(e),p=!1),d&&(i(l),i(u)),a&&i(c),o&16)for(let e=0;e{e.isMounted=!0}),ki(()=>{e.isUnmounting=!0}),e}var jr=[Function,Array],Mr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:jr,onEnter:jr,onAfterEnter:jr,onEnterCancelled:jr,onBeforeLeave:jr,onLeave:jr,onAfterLeave:jr,onLeaveCancelled:jr,onBeforeAppear:jr,onAppear:jr,onAfterAppear:jr,onAppearCancelled:jr},Nr=e=>{let t=e.subTree;return t.component?Nr(t.component):t},Oee={name:`BaseTransition`,props:Mr,setup(e,{slots:t}){let n=Ko(),r=Ar();return()=>{let i=t.default&&Vr(t.default(),!0),a=i&&i.length?Pr(i):n.subTree?V():void 0;if(!a)return;let o=cn(e),{mode:s}=o;if(r.isLeaving)return Rr(a);let c=zr(a);if(!c)return Rr(a);let l=Lr(c,o,r,n,e=>l=e);c.type!==wo&&Br(c,l);let u=n.subTree&&zr(n.subTree);if(u&&u.type!==wo&&!No(u,c)&&Nr(n).type!==wo){let e=Lr(u,o,r,n);if(Br(u,e),s===`out-in`&&c.type!==wo)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},Rr(a);s===`in-out`&&c.type!==wo?e.delayLeave=(e,t,n)=>{let i=Ir(r,u);i[String(u.key)]=u,e[Or]=()=>{t(),e[Or]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function Pr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==wo){t=n;break}}return t}var Fr=Oee;function Ir(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Lr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),S=Ir(n,e),C=(e,t)=>{e&&kn(e,r,9,t)},ee=(e,t)=>{let n=t[1];C(e,t),x(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},te={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=g||c;else return;t[Or]&&t[Or](!0);let i=S[b];i&&No(e,i)&&i.el[Or]&&i.el[Or](),C(r,[t])},enter(t){if(S[b]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=_||l,i=v||u,o=y||d;else return;let s=!1;t[kr]=e=>{s||(s=!0,C(e?o:i,[t]),te.delayedLeave&&te.delayedLeave(),t[kr]=void 0)};let c=t[kr].bind(null,!1);r?ee(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[kr]&&t[kr](!0),n.isUnmounting)return r();C(f,[t]);let a=!1;t[Or]=n=>{a||(a=!0,r(),C(n?h:m,[t]),t[Or]=void 0,S[i]===e&&delete S[i])};let o=t[Or].bind(null,!1);S[i]=e,p?ee(p,[t,o]):o()},clone(e){let a=Lr(e,t,n,r,i);return i&&i(a),a}};return te}function Rr(e){if(hi(e))return e=zo(e),e.children=null,e}function zr(e){if(!hi(e))return yr(e.type)&&e.children?Pr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&w(n.default))return n.default()}}function Br(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Br(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vr(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;en.value,set:e=>n.value=e})}return n}function Gr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Kr=new WeakMap;function qr(e,t,n,r,i=!1){if(x(e)){e.forEach((e,a)=>qr(e,t&&(x(t)?t[a]:t),n,r,i));return}if(fi(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&qr(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?as(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===d?s.refs={}:s.refs,f=s.setupState,p=cn(f),h=f===d?m:e=>Gr(u,e)?!1:b(p,e),g=(e,t)=>!(t&&Gr(u,t));if(l!=null&&l!==c){if(Jr(t),T(l))u[l]=null,h(l)&&(f[l]=null);else if(dn(l)){let e=t;g(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(w(c))On(c,s,12,[o,u]);else{let t=T(c),r=dn(c);if(t||r){let s=()=>{if(e.f){let n=t?h(c)?f[c]:u[c]:g(c)||!e.k?c.value:u[e.k];if(i)x(n)&&v(n,a);else if(x(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],h(c)&&(f[c]=u[c]);else{let t=[a];g(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,h(c)&&(f[c]=o)):r&&(g(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),Kr.delete(e)};t.id=-1,Kr.set(e,t),Za(t,n)}else Jr(e),s()}}}function Jr(e){let t=Kr.get(e);t&&(t.flags|=8,Kr.delete(e))}var Yr=!1,Xr=()=>{Yr||=(console.error(`Hydration completed but contains mismatches.`),!0)},Zr=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,kee=e=>e.namespaceURI.includes(`MathML`),Qr=e=>{if(e.nodeType===1){if(Zr(e))return`svg`;if(kee(e))return`mathml`}},$r=e=>e.nodeType===8;function ei(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:s,insert:c,createComment:l}}=e,u=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),Gn(),t._vnode=e;return}d(t.firstChild,e,null,null,null),Gn(),t._vnode=e},d=(n,r,s,l,u,h=!1)=>{h||=!!r.dynamicChildren;let b=$r(n)&&n.data===`[`,x=()=>g(n,r,s,l,u,b),{type:S,ref:C,shapeFlag:ee,patchFlag:te}=r,w=n.nodeType;r.el=n,te===-2&&(h=!1,r.dynamicChildren=null);let T=null;switch(S){case Co:w===3?(n.data!==r.children&&(Xr(),n.data=r.children),T=a(n)):r.children===``?(c(r.el=i(``),o(n),n),T=n):T=x();break;case wo:y(n)?(T=a(n),v(r.el=n.content.firstChild,n,s)):T=w!==8||b?x():a(n);break;case To:if(b&&(n=a(n),w=n.nodeType),w===1||w===3){T=n;let e=!r.children.length;for(let t=0;t{o||=!!t.dynamicChildren;let{type:c,props:l,patchFlag:u,shapeFlag:d,dirs:f,transition:m}=t,g=c===`input`||c===`option`;if(g||u!==-1){f&&ir(t,null,n,`created`);let c=!1;if(y(e)){c=ro(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(c){let e=r.getAttribute(`class`);e&&(r.$cls=e),m.beforeEnter(r)}v(r,e,n),t.el=e=r}if(d&16&&!(l&&(l.innerHTML||l.textContent))){let r=p(e.firstChild,t,e,n,i,a,o);for(;r;){ri(e,1)||Xr();let t=r;r=r.nextSibling,s(t)}}else if(d&8){let n=t.children;n[0]===` +`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` +`)&&(ri(e,0)||Xr(),e.textContent=t.children)}if(l){if(g||!o||u&48){let t=e.tagName.includes(`-`);for(let i in l)(g&&(i.endsWith(`value`)||i===`indeterminate`)||h(i)&&!ue(i)||i[0]===`.`||t&&!ue(i))&&r(e,i,null,l[i],void 0,n)}else if(l.onClick)r(e,`onClick`,null,l.onClick,void 0,n);else if(u&4&&rn(l.style))for(let e in l.style)l.style[e]}let _;(_=l&&l.onVnodeBeforeMount)&&Uo(_,n,t),f&&ir(t,null,n,`beforeMount`),((_=l&&l.onVnodeMounted)||f||c)&&bo(()=>{_&&Uo(_,n,t),c&&m.enter(e),f&&ir(t,null,n,`mounted`)},i)}return e.nextSibling},p=(e,t,r,o,s,l,u)=>{u||=!!t.dynamicChildren;let f=t.children,p=f.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=o(e),f=p(a(e),t,d,n,r,i,s);return f&&$r(f)&&f.data===`]`?a(t.anchor=f):(Xr(),c(t.anchor=l(`]`),d,f),f)},g=(e,t,r,i,c,l)=>{if(ri(e.parentElement,1)||Xr(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)s(n);else break}}let u=a(e),d=o(e);return s(e),n(null,t,d,u,r,i,Qr(d),c),r&&(r.vnode.el=t.el,Ma(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&$r(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[u,d]}var ti=`data-allow-mismatch`,ni={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function ri(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ti);)e=e.parentElement;let n=e&&e.getAttribute(ti);if(n==null)return!1;if(n===``)return!0;{let e=n.split(`,`);return t===0&&e.includes(`children`)?!0:e.includes(ni[t])}}var ii=we().requestIdleCallback||(e=>setTimeout(e,1)),ai=we().cancelIdleCallback||(e=>clearTimeout(e)),oi=(e=1e4)=>t=>{let n=ii(t,{timeout:e});return()=>ai(n)};function si(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(si(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},li=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},ui=(e=[])=>(t,n)=>{T(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function di(e,t){if($r(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if($r(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var fi=e=>!!e.type.__asyncLoader;function pi(e){w(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return M({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||=[]).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>di(e,t));n&&(t.bum||=[]).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=Go;if(Ur(e),u)return()=>mi(u,e);let t=t=>{l=null,An(t,e,13,!r)};if(s&&e.suspense||Qo)return p().then(t=>()=>mi(t,e)).catch(e=>(t(e),()=>r?z(r,{error:e}):null));let a=O(!1),c=O(),d=O(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&hi(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return mi(u,e);if(c.value&&r)return z(r,{error:c.value});if(n&&!d.value)return mi(n,e)}}})}function mi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=z(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var hi=e=>e.type.__isKeepAlive,gi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Ko(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),Za(()=>{a.isDeactivated=!1,a.a&&ye(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Uo(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;so(t.m),so(t.a),l(e,f,null,1,s),Za(()=>{t.da&&ye(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Uo(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){xi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=ss(fi(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!No(t,o))?p(t):o&&xi(o),i.delete(e),a.delete(e)}pr(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>_i(e,t)),t&&m(e=>!_i(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(lo(n.subTree.type)?Za(()=>{i.set(g,Si(n.subTree))},n.subTree.suspense):i.set(g,Si(n.subTree)))};return Ei(_),Oi(_),ki(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=Si(t);if(e.type===i.type&&e.key===i.key){xi(i);let e=i.component.da;e&&Za(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!Mo(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=Si(r);if(s.type===wo)return o=null,s;let c=s.type,l=ss(fi(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!_i(u,l))||d&&l&&_i(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=zo(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&Br(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,lo(r.type)?r:s}}};function _i(e,t){return x(e)?e.some(e=>_i(e,t)):T(e)?e.split(`,`).includes(t):te(e)?(e.lastIndex=0,e.test(t)):!1}function vi(e,t){bi(e,`a`,t)}function yi(e,t){bi(e,`da`,t)}function bi(e,t,n=Go){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Ci(t,r,n),n){let e=n.parent;for(;e&&e.parent;)hi(e.parent.vnode)&&Aee(r,t,n,e),e=e.parent}}function Aee(e,t,n,r){let i=Ci(t,e,r,!0);Ai(()=>{v(r[t],i)},n)}function xi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Si(e){return e.shapeFlag&128?e.ssContent:e}function Ci(e,t,n=Go,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{st();let i=Yo(n),a=kn(t,n,e,r);return i(),ct(),a};return r?i.unshift(a):i.push(a),a}}var wi=e=>(t,n=Go)=>{(!Qo||e===`sp`)&&Ci(e,(...e)=>t(...e),n)},Ti=wi(`bm`),Ei=wi(`m`),Di=wi(`bu`),Oi=wi(`u`),ki=wi(`bum`),Ai=wi(`um`),ji=wi(`sp`),Mi=wi(`rtg`),Ni=wi(`rtc`);function Pi(e,t=Go){Ci(`ec`,e,t)}var Fi=`components`,jee=`directives`;function Ii(e,t){return zi(Fi,e,!0,t)||e}var Li=Symbol.for(`v-ndc`);function Ri(e){return T(e)?zi(Fi,e,!1)||e:e||Li}function Mee(e){return zi(jee,e)}function zi(e,t,n=!0,r=!1){let i=Zn||Go;if(i){let n=i.type;if(e===Fi){let e=ss(n,!1);if(e&&(e===t||e===pe(t)||e===ge(pe(t))))return n}let a=Bi(i[e]||n[e],t)||Bi(i.appContext[e],t);return!a&&r?n:a}}function Bi(e,t){return e&&(e[t]||e[pe(t)]||e[ge(pe(t))])}function Vi(e,t,n,r){let i,a=n&&n[r],o=x(e);if(o||T(e)){let n=o&&rn(e),r=!1,s=!1;n&&(r=!on(e),s=an(e),e=bt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function N(e,t,n={},r,i){if(Zn.ce||Zn.parent&&fi(Zn.parent)&&Zn.parent.ce){let e=Object.keys(n).length>0;return t!==`default`&&(n.name=t),F(),L(P,null,[z(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),F();let o=a&&Hi(a(n)),s=n.key||o&&o.key,c=L(P,{key:(s&&!ne(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function Hi(e){return e.some(e=>Mo(e)?!(e.type===wo||e.type===P&&!Hi(e.children)):!0)?e:null}function Pee(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:_e(r)]=e[r];return n}var Ui=e=>e?Zo(e)?as(e):Ui(e.parent):null,Wi=_(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ui(e.parent),$root:e=>Ui(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>aa(e),$forceUpdate:e=>e.f||=()=>{Vn(e.update)},$nextTick:e=>e.n||=zn.bind(e.proxy),$watch:e=>hr.bind(e)}),Gi=(e,t)=>e!==d&&!e.__isScriptSetup&&b(e,t),Ki={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(Gi(r,t))return o[t]=1,r[t];else if(i!==d&&b(i,t))return o[t]=2,i[t];else if(b(a,t))return o[t]=3,a[t];else if(n!==d&&b(n,t))return o[t]=4,n[t];else ea&&(o[t]=0)}let l=Wi[t],u,f;if(l)return t===`$attrs`&&_t(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==d&&b(n,t))return o[t]=4,n[t];if(f=c.config.globalProperties,b(f,t))return f[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return Gi(i,t)?(i[t]=n,!0):r!==d&&b(r,t)?(r[t]=n,!0):b(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==d&&s[0]!==`$`&&b(e,s)||Gi(t,s)||b(a,s)||b(r,s)||b(Wi,s)||b(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?b(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},Fee=_({},Ki,{get(e,t){if(t!==Symbol.unscopables)return Ki.get(e,t,e)},has(e,t){return t[0]!==`_`&&!Te(t)}});function Iee(){return null}function Lee(){return null}function Ree(e){}function zee(e){}function Bee(){return null}function Vee(){}function Hee(e,t){return null}function qi(){return Ji(`useSlots`).slots}function Uee(){return Ji(`useAttrs`).attrs}function Ji(e){let t=Ko();return t.setupContext||=is(t)}function Yi(e){return x(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Xi(e,t){let n=Yi(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?x(r)||w(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Zi(e,t){return!e||!t?e||t:x(e)&&x(t)?e.concat(t):_({},Yi(e),Yi(t))}function Qi(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function $i(e){let t=Ko(),n=Qo,r=e();Xo(),n&&Jo(!1);let i=()=>{Yo(t),n&&Jo(!0)},a=()=>{Ko()!==t&&t.scope.off(),Xo(),n&&Jo(!1)};return ie(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var ea=!0;function ta(e){let t=aa(e),n=e.proxy,r=e.ctx;ea=!1,t.beforeCreate&&ra(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:m,updated:h,activated:g,deactivated:_,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:S,render:C,renderTracked:ee,renderTriggered:te,errorCaptured:T,serverPrefetch:ne,expose:ie,inheritAttrs:ae,components:oe,directives:se,filters:ce}=t;if(l&&na(l,r,null),o)for(let e in o){let t=o[e];w(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);re(t)&&(e.data=$t(t))}if(ea=!0,a)for(let e in a){let t=a[e],i=U({get:w(t)?t.bind(n,n):w(t.get)?t.get.bind(n,n):p,set:!w(t)&&w(t.set)?t.set.bind(n):p});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)ia(s[e],r,n,e);if(c){let e=w(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{ar(t,e[t])})}u&&ra(u,e,`c`);function le(e,t){x(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(le(Ti,d),le(Ei,f),le(Di,m),le(Oi,h),le(vi,g),le(yi,_),le(Pi,T),le(Ni,ee),le(Mi,te),le(ki,y),le(Ai,S),le(ji,ne),x(ie))if(ie.length){let t=e.exposed||={};ie.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};C&&e.render===p&&(e.render=C),ae!=null&&(e.inheritAttrs=ae),oe&&(e.components=oe),se&&(e.directives=se),ne&&Ur(e)}function na(e,t,n=p){x(e)&&(e=ua(e));for(let n in e){let r=e[n],i;i=re(r)?`default`in r?or(r.from||n,r.default,!0):or(r.from||n):or(r),dn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function ra(e,t,n){kn(x(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ia(e,t,n,r){let i=r.includes(`.`)?gr(n,r):()=>n[r];if(T(e)){let n=t[e];w(n)&&pr(i,n)}else if(w(e))pr(i,e.bind(n));else if(re(e))if(x(e))e.forEach(e=>ia(e,t,n,r));else{let r=w(e.handler)?e.handler.bind(n):t[e.handler];w(r)&&pr(i,r,e)}}function aa(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>oa(c,e,o,!0)),oa(c,t,o)),re(t)&&a.set(t,c),c}function oa(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&oa(e,a,n,!0),i&&i.forEach(t=>oa(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=sa[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var sa={data:ca,props:pa,emits:pa,methods:fa,computed:fa,beforeCreate:da,created:da,beforeMount:da,mounted:da,beforeUpdate:da,updated:da,beforeDestroy:da,beforeUnmount:da,destroyed:da,unmounted:da,activated:da,deactivated:da,errorCaptured:da,serverPrefetch:da,components:fa,directives:fa,watch:ma,provide:ca,inject:la};function ca(e,t){return t?e?function(){return _(w(e)?e.call(this,this):e,w(t)?t.call(this,this):t)}:t:e}function la(e,t){return fa(ua(e),ua(t))}function ua(e){if(x(e)){let t={};for(let n=0;n{let c,l=d,u;return fr(()=>{let t=e[i];ve(c,t)&&(c=t,s())}),{get(){return o(),n.get?n.get(c):c},set(e){let o=n.set?n.set(e):e;if(!ve(o,c)&&!(l!==d&&ve(e,l)))return;let f=r.vnode.props;f&&(t in f||i in f||a in f)&&(`onUpdate:${t}`in f||`onUpdate:${i}`in f||`onUpdate:${a}`in f)||(c=e,s()),r.emit(`update:${t}`,o),ve(e,o)&&ve(e,l)&&!ve(o,u)&&s(),l=e,u=o}}});return s[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?o||d:s,done:!1}:{done:!0}}}},s}var ba=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${pe(t)}Modifiers`]||e[`${he(t)}Modifiers`];function xa(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||d,i=n,a=t.startsWith(`update:`),o=a&&ba(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>T(e)?e.trim():e)),o.number&&(i=n.map(xe)));let s,c=r[s=_e(t)]||r[s=_e(pe(t))];!c&&a&&(c=r[s=_e(he(t))]),c&&kn(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,kn(l,e,6,i)}}var Sa=new WeakMap;function Ca(e,t,n=!1){let r=n?Sa:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!w(e)){let r=e=>{let n=Ca(e,t,!0);n&&(s=!0,_(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(re(e)&&r.set(e,null),null):(x(a)?a.forEach(e=>o[e]=null):_(o,a),re(e)&&r.set(e,o),o)}function wa(e,t){return!e||!h(t)?!1:(t=t.slice(2).replace(/Once$/,``),b(e,t[0].toLowerCase()+t.slice(1))||b(e,he(t))||b(e,t))}function Ta(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,_=$n(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Bo(l.call(t,e,u,d,p,f,m)),y=s}else{let e=t;v=Bo(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),y=t.props?s:Da(s)}}catch(t){Eo.length=0,An(t,e,1),v=z(wo)}let b=v;if(y&&h!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(g)&&(y=Oa(y,a)),b=zo(b,y,!1,!0))}return n.dirs&&(b=zo(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Br(b,n.transition),v=b,$n(_),v}function Ea(e,t=!0){let n;for(let t=0;t{let t;for(let n in e)(n===`class`||n===`style`||h(n))&&((t||={})[n]=e[n]);return t},Oa=(e,t)=>{let n={};for(let r in e)(!g(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ka(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Aa(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Na),Fa=e=>Object.getPrototypeOf(e)===Na;function Ia(e,t,n,r=!1){let i={},a=Pa();e.propsDefaults=Object.create(null),Ra(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:en(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function La(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=cn(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{c=!0;let[n,r]=Va(e,t,!0);_(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return re(e)&&r.set(e,f),f;if(x(a))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Wa=e=>x(e)?e.map(Bo):[Bo(e)],Ga=(e,t,n)=>{if(t._n)return t;let r=j((...e)=>Wa(t(...e)),n);return r._c=!1,r},Ka=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Ua(n))continue;let i=e[n];if(w(i))t[n]=Ga(n,i,r);else if(i!=null){let e=Wa(i);t[n]=()=>e}}},qa=(e,t)=>{let n=Wa(t);e.slots.default=()=>n},Ja=(e,t,n)=>{for(let r in t)(n||!Ua(r))&&(e[r]=t[r])},Ya=(e,t,n)=>{let r=e.slots=Pa();if(e.vnode.shapeFlag&32){let e=t._;e?(Ja(r,t,n),n&&be(r,`_`,e,!0)):Ka(t,r)}else t&&qa(e,t)},Xa=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=d;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:Ja(i,t,n):(a=!t.$stable,Ka(t,i)),o=t}else t&&(qa(e,t),o={default:1});if(a)for(let e in i)!Ua(e)&&o[e]==null&&delete i[e]},Za=bo;function Qa(e){return eo(e)}function $a(e){return eo(e,ei)}function eo(e,t){let n=we();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:m,nextSibling:h,setScopeId:g=p,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!No(e,t)&&(r=Se(e),ge(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Co:y(e,t,n,r);break;case wo:b(e,t,n,r);break;case To:e??x(t,n,r,o);break;case P:ae(e,t,n,r,i,a,o,s,c);break;default:d&1?ee(e,t,n,r,i,a,o,s,c):d&6?oe(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,Ee)}u!=null&&i?qr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&qr(e.ref,null,a,e,!0)},y=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},b=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=h(e),r(e,n,i),e=a;r(t,n,i)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),i(e),e=n;i(t)},ee=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ne(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&T(e.children,f,null,i,s,to(e,c),l,d),_&&ir(e,null,i,`created`),w(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!ue(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Uo(p,i,e)}_&&ir(e,null,i,`beforeMount`);let v=ro(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Za(()=>{try{p&&Uo(p,i,e),v&&g.enter(f),_&&ir(e,null,i,`mounted`)}finally{}},s)},w=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let c=t.el=e.el,{patchFlag:l,dynamicChildren:f,dirs:p}=t;l|=e.patchFlag&16;let m=e.props||d,h=t.props||d,g;if(n&&no(n,!1),(g=h.onVnodeBeforeUpdate)&&Uo(g,n,t,e),p&&ir(t,e,n,`beforeUpdate`),n&&no(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&u(c,``),f?re(e.dynamicChildren,f,c,n,r,to(t,i),o):s||fe(e,t,c,null,n,r,to(t,i),o,!1),l>0){if(l&16)ie(c,m,h,n,i);else if(l&2&&m.class!==h.class&&a(c,`class`,null,h.class,i),l&4&&a(c,`style`,m.style,h.style,i),l&8){let e=t.dynamicProps;for(let t=0;t{g&&Uo(g,n,t,e),p&&ir(t,e,n,`updated`)},r)},re=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==d)for(let o in t)!ue(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(ue(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},ae=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),T(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(re(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&io(e,t,!0)):fe(e,t,n,f,a,o,c,l,u)},oe=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):se(t,n,r,i,a,o,c):ce(e,t,c)},se=(e,t,n,r,i,a,o)=>{let s=e.component=Wo(e,r,i);if(hi(e)&&(s.ctx.renderer=Ee),$o(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,le,o),!e.el){let r=s.subTree=z(wo);b(null,r,t,n),e.placeholder=r.el}}else le(s,e,t,n,i,a,o)},ce=(e,t,n)=>{let r=t.component=e.component;if(ka(e,t,n))if(r.asyncDep&&!r.asyncResolved){de(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},le=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=oo(e);if(n){t&&(t.el=c.el,de(e,t,o)),n.asyncDep.then(()=>{Za(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;no(e,!1),t?(t.el=c.el,de(e,t,o)):t=c,n&&ye(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Uo(d,s,t,c),no(e,!0);let f=Ta(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),Se(p),e,i,a),t.el=f.el,u===null&&Ma(e,f.el),r&&Za(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Za(()=>Uo(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=fi(t);if(no(e,!1),l&&ye(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Uo(o,d,t),no(e,!0),s&&Oe){let t=()=>{e.subTree=Ta(e),Oe(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Ta(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Za(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Za(()=>Uo(o,d,e),i)}(t.shapeFlag&256||d&&fi(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Za(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ge(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Vn(u),no(e,!0),l()},de=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,La(e,t.props,r,n),Xa(e,t.children,n),st(),Wn(e),ct()},fe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){me(l,f,n,r,i,a,o,s,c);return}else if(p&256){pe(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&xe(l,i,a),f!==l&&u(n,f)):d&16?m&16?me(l,f,n,r,i,a,o,s,c):xe(l,i,a,!0):(d&8&&u(n,``),m&16&&T(f,n,r,i,a,o,s,c))},pe=(e,t,n,r,i,a,o,s,c)=>{e||=f,t||=f;let l=e.length,u=t.length,d=Math.min(l,u),p;for(p=0;pu?xe(e,i,a,!0,!1,d):T(t,n,r,i,a,o,s,c,d)},me=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,p=u-1;for(;l<=d&&l<=p;){let r=e[l],u=t[l]=c?Vo(t[l]):Bo(t[l]);if(No(r,u))v(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=p;){let r=e[d],l=t[p]=c?Vo(t[p]):Bo(t[p]);if(No(r,l))v(r,l,n,null,i,a,o,s,c);else break;d--,p--}if(l>d){if(l<=p){let e=p+1,d=ep)for(;l<=d;)ge(e[l],i,a,!0),l++;else{let m=l,h=l,g=new Map;for(l=h;l<=p;l++){let e=t[l]=c?Vo(t[l]):Bo(t[l]);e.key!=null&&g.set(e.key,l)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(l=0;l=b){ge(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&No(r,t[_])){u=_;break}u===void 0?ge(r,i,a,!0):(C[u-h]=l+1,u>=S?S=u:x=!0,v(r,t[u],n,null,i,a,o,s,c),y++)}let ee=x?ao(C):f;for(_=ee.length-1,l=b-1;l>=0;l--){let e=h+l,d=t[e],f=t[e+1],p=e+1{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){he(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,Ee);return}if(c===P){r(s,t,n);for(let e=0;el.enter(s),o);else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{s._isLeaving&&s[Or](!0),a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}else r(s,t,n)},ge=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(st(),qr(s,null,n,e,!0),ct()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!fi(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Uo(_,t,e),u&6)be(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&ir(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Ee,r):l&&!l.hasOnce&&(a!==P||d>0&&d&64)?xe(l,t,n,!1,!0):(a===P&&d&384||!i&&u&16)&&xe(c,t,n),r&&_e(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Za(()=>{_&&Uo(_,t,e),h&&ir(e,null,t,`unmounted`),v&&(e.el=null)},n)},_e=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===P){ve(n,r);return}if(t===To){C(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},ve=(e,t)=>{let n;for(;e!==t;)n=h(e),i(e),e=n;i(t)},be=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;so(c),so(l),r&&ye(r),i.stop(),a&&(a.flags|=8,ge(o,e,t,n)),s&&Za(s,t),Za(()=>{e.isUnmounted=!0},t)},xe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return Se(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[vr];return n?h(n):t},Ce=!1,Te=(e,t,n)=>{let r;e==null?t._vnode&&(ge(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,Ce||=(Ce=!0,Wn(r),Gn(),!1)},Ee={p:v,um:ge,m:he,r:_e,mt:se,mc:T,pc:fe,pbc:re,n:Se,o:e},De,Oe;return t&&([De,Oe]=t(Ee)),{render:Te,hydrate:De,createApp:_a(Te,De)}}function to({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function no({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ro(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function io(e,t,n=!1){let r=e.children,i=t.children;if(x(r)&&x(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function oo(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:oo(t)}function so(e){if(e)for(let t=0;te.__isSuspense,uo=0,fo={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)mo(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}ho(e,t,n,r,i,o,s,c,l)}},hydrate:_o,normalize:vo};function po(e,t){let n=e.props&&e.props[t];w(n)&&n()}function mo(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=go(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(po(e,`onPending`),po(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),xo(f,e.ssFallback)):f.resolve(!1,!0)}function ho(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,No(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),xo(d,p)))):(d.pendingId=uo++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),xo(d,p))):m&&No(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&No(m,f))c(m,f,n,r,i,d,a,o,s),xo(d,f);else if(po(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=uo++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function go(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=So(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?Se(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:uo++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;x.isHydrating?x.isHydrating=!1:e||(g=i&&o.transition&&o.transition.mode===`out-in`,g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b?m(i):a,0),Un(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i)),p(i,l,x,!0),!g&&d&&r.ssFallback&&Za(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)),x.isFallbackMountPending=!1,xo(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){y.effects.push(...c),S=!0;break}y=y.parent}!S&&!g&&Un(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),po(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;po(t,`onFallback`);let o=m(n),l=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),xo(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{An(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;Xo(),e.asyncResolved=!0;let{vnode:s}=e;es(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),Ma(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function _o(e,t,n,r,i,a,o,s,c){let l=t.suspense=go(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function vo(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=yo(r?n.default:n),e.ssFallback=r?yo(n.fallback):z(wo)}function yo(e){let t;if(w(e)){let n=ko&&e._c;n&&(e._d=!1,F()),e=e(),n&&(e._d=!0,t=Do,Oo())}return x(e)&&(e=Ea(e)),e=Bo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function bo(e,t){t&&t.pendingBranch?x(e)?t.effects.push(...e):t.effects.push(e):Un(e)}function xo(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,Ma(r,i))}function So(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var P=Symbol.for(`v-fgt`),Co=Symbol.for(`v-txt`),wo=Symbol.for(`v-cmt`),To=Symbol.for(`v-stc`),Eo=[],Do=null;function F(e=!1){Eo.push(Do=e?null:[])}function Oo(){Eo.pop(),Do=Eo[Eo.length-1]||null}var ko=1;function Ao(e,t=!1){ko+=e,e<0&&Do&&t&&(Do.hasOnce=!0)}function jo(e){return e.dynamicChildren=ko>0?Do||f:null,Oo(),ko>0&&Do&&Do.push(e),e}function I(e,t,n,r,i,a){return jo(R(e,t,n,r,i,a,!0))}function L(e,t,n,r,i){return jo(z(e,t,n,r,i,!0))}function Mo(e){return e?e.__v_isVNode===!0:!1}function No(e,t){return e.type===t.type&&e.key===t.key}function Po(e){}var Fo=({key:e})=>e??null,Io=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:T(e)||dn(e)||w(e)?{i:Zn,r:e,k:t,f:!!n}:e);function R(e,t=null,n=null,r=0,i=null,a=e===P?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Fo(t),ref:t&&Io(t),scopeId:Qn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Zn};return s?(Ho(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=T(n)?8:16),ko>0&&!o&&Do&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Do.push(c),c}var z=Lo;function Lo(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Li)&&(e=wo),Mo(e)){let r=zo(e,t,!0);return n&&Ho(r,n),ko>0&&!a&&Do&&(r.shapeFlag&6?Do[Do.indexOf(e)]=r:Do.push(r)),r.patchFlag=-2,r}if(Zee(e)&&(e=e.__vccOpts),t){t=Ro(t);let{class:e,style:n}=t;e&&!T(e)&&(t.class=ke(e)),re(n)&&(sn(n)&&!x(n)&&(n=_({},n)),t.style=Ee(n))}let o=T(e)?1:lo(e)?128:yr(e)?64:re(e)?4:w(e)?2:0;return R(e,t,n,r,i,o,a,!0)}function Ro(e){return e?sn(e)||Fa(e)?_({},e):e:null}function zo(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?H(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Fo(l),ref:t&&t.ref?n&&a?x(a)?a.concat(Io(t)):[a,Io(t)]:Io(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==P?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zo(e.ssContent),ssFallback:e.ssFallback&&zo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Br(u,c.clone(u)),u}function B(e=` `,t=0){return z(Co,null,e,t)}function Wee(e,t){let n=z(To,null,e);return n.staticCount=t,n}function V(e=``,t=!1){return t?(F(),L(wo,null,e)):z(wo,null,e)}function Bo(e){return e==null||typeof e==`boolean`?z(wo):x(e)?z(P,null,e.slice()):Mo(e)?Vo(e):z(Co,null,String(e))}function Vo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zo(e)}function Ho(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(x(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ho(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Fa(t)?t._ctx=Zn:r===3&&Zn&&(Zn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else w(t)?(t={default:t,_ctx:Zn},n=32):(t=String(t),r&64?(n=16,t=[B(t)]):n=8);e.children=t,e.shapeFlag|=n}function H(...e){let t={};for(let n=0;nGo||Zn,qo,Jo;{let e=we(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};qo=t(`__VUE_INSTANCE_SETTERS__`,e=>Go=e),Jo=t(`__VUE_SSR_SETTERS__`,e=>Qo=e)}var Yo=e=>{let t=Go;return qo(e),e.scope.on(),()=>{e.scope.off(),qo(t)}},Xo=()=>{Go&&Go.scope.off(),qo(null)};function Zo(e){return e.vnode.shapeFlag&4}var Qo=!1;function $o(e,t=!1,n=!1){t&&Jo(t);let{props:r,children:i}=e.vnode,a=Zo(e);Ia(e,r,a,t),Ya(e,i,n||t);let o=a?qee(e,t):void 0;return t&&Jo(!1),o}function qee(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ki);let{setup:r}=n;if(r){st();let n=e.setupContext=r.length>1?is(e):null,i=Yo(e),a=On(r,e,0,[e.props,n]),o=ie(a);if(ct(),i(),(o||e.sp)&&!fi(e)&&Ur(e),o){if(a.then(Xo,Xo),t)return a.then(n=>{es(e,n,t)}).catch(t=>{An(t,e,0)});e.asyncDep=a}else es(e,a,t)}else rs(e,t)}function es(e,t,n){w(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:re(t)&&(e.setupState=hn(t)),rs(e,n)}var ts,ns;function Jee(e){ts=e,ns=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Fee))}}var Yee=()=>!ts;function rs(e,t,n){let r=e.type;if(!e.render){if(!t&&ts&&!r.render){let t=r.template||aa(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=_(_({isCustomElement:n,delimiters:a},i),o);r.render=ts(t,s)}}e.render=r.render||p,ns&&ns(e)}{let t=Yo(e);st();try{ta(e)}finally{ct(),t()}}}var Xee={get(e,t){return _t(e,`get`,``),e[t]}};function is(e){return{attrs:new Proxy(e.attrs,Xee),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function as(e){return e.exposed?e.exposeProxy||=new Proxy(hn(D(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wi)return Wi[n](e)},has(e,t){return t in e||t in Wi}}):e.proxy}function ss(e,t=!0){return w(e)?e.displayName||e.name:e.name||t&&e.__name}function Zee(e){return w(e)&&`__vccOpts`in e}var U=(e,t)=>hee(e,t,Qo);function cs(e,t,n){try{Ao(-1);let r=arguments.length;return r===2?re(t)&&!x(t)?Mo(t)?z(e,null,[t]):z(e,t):z(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Mo(n)&&(n=[n]),z(e,t,n))}finally{Ao(1)}}function Qee(){return;function e(t,n,r){let i=t[r];if(x(i)&&i.includes(n)||re(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function $ee(e,t,n,r){let i=n[r];if(i&&ls(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function ls(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&Do&&Do.push(e),!0}var us=`3.5.33`,ete=p,tte=wee,nte=Jn,rte=Xn,ite={createComponentInstance:Wo,setupComponent:$o,renderComponentRoot:Ta,setCurrentRenderingInstance:$n,isVNode:Mo,normalizeVNode:Bo,getComponentPublicInstance:as,ensureValidVNode:Hi,pushWarningContext:bee,popWarningContext:xee},ds=void 0,fs=typeof window<`u`&&window.trustedTypes;if(fs)try{ds=fs.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ps=ds?e=>ds.createHTML(e):e=>e,ate=`http://www.w3.org/2000/svg`,ote=`http://www.w3.org/1998/Math/MathML`,ms=typeof document<`u`?document:null,hs=ms&&ms.createElement(`template`),gs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ms.createElementNS(ate,e):t===`mathml`?ms.createElementNS(ote,e):n?ms.createElement(e,{is:n}):ms.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ms.createTextNode(e),createComment:e=>ms.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ms.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{hs.innerHTML=ps(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=hs.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},_s=`transition`,vs=`animation`,ys=Symbol(`_vtc`),bs={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xs=_({},Mr,bs),ste=(e=>(e.displayName=`Transition`,e.props=xs,e))((e,{slots:t})=>cs(Fr,ws(e),t)),Ss=(e,t=[])=>{x(e)?e.forEach(e=>e(...t)):e&&e(...t)},Cs=e=>e?x(e)?e.some(e=>e.length>1):e.length>1:!1;function ws(e){let t={};for(let n in e)n in bs||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=cte(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:ee=y,onAppearCancelled:te=b}=t,w=(e,t,n,r)=>{e._enterCancelled=r,Ds(e,t?u:s),Ds(e,t?l:o),n&&n()},T=(e,t)=>{e._isLeaving=!1,Ds(e,d),Ds(e,p),Ds(e,f),t&&t()},ne=e=>(t,n)=>{let i=e?ee:y,o=()=>w(t,e,n);Ss(i,[t,o]),Os(()=>{Ds(t,e?c:a),Es(t,e?u:s),Cs(i)||ks(t,r,h,o)})};return _(t,{onBeforeEnter(e){Ss(v,[e]),Es(e,a),Es(e,o)},onBeforeAppear(e){Ss(C,[e]),Es(e,c),Es(e,l)},onEnter:ne(!1),onAppear:ne(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>T(e,t);Es(e,d),e._enterCancelled?(Es(e,f),Ns(e)):(Ns(e),Es(e,f)),Os(()=>{e._isLeaving&&(Ds(e,d),Es(e,p),Cs(x)||ks(e,r,g,n))}),Ss(x,[e,n])},onEnterCancelled(e){w(e,!1,void 0,!0),Ss(b,[e])},onAppearCancelled(e){w(e,!0,void 0,!0),Ss(te,[e])},onLeaveCancelled(e){T(e),Ss(S,[e])}})}function cte(e){if(e==null)return null;if(re(e))return[Ts(e.enter),Ts(e.leave)];{let t=Ts(e);return[t,t]}}function Ts(e){return Se(e)}function Es(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[ys]||(e[ys]=new Set)).add(t)}function Ds(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[ys];n&&(n.delete(t),n.size||(e[ys]=void 0))}function Os(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var lte=0;function ks(e,t,n,r){let i=e._endId=++lte,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=As(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${_s}Delay`),a=r(`${_s}Duration`),o=js(i,a),s=r(`${vs}Delay`),c=r(`${vs}Duration`),l=js(s,c),u=null,d=0,f=0;t===_s?o>0&&(u=_s,d=o,f=a.length):t===vs?l>0&&(u=vs,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?_s:vs:null,f=u?u===_s?a.length:c.length:0);let p=u===_s&&/\b(?:transform|all)(?:,|$)/.test(r(`${_s}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function js(e,t){for(;e.lengthMs(t)+Ms(e[n])))}function Ms(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ns(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ps(e,t,n){let r=e[ys];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Fs=Symbol(`_vod`),Is=Symbol(`_vsh`),Ls={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Fs]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Rs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Rs(e,!0),r.enter(e)):r.leave(e,()=>{Rs(e,!1)}):Rs(e,t))},beforeUnmount(e,{value:t}){Rs(e,t)}};function Rs(e,t){e.style.display=t?e[Fs]:`none`,e[Is]=!t}function zs(){Ls.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var Bs=Symbol(``);function Vs(e){let t=Ko();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>Us(e,n))},r=()=>{let r=e(t.proxy);t.ce?Us(t.ce,r):Hs(t.subTree,r),n(r)};Di(()=>{Un(r)}),Ei(()=>{pr(r,p,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Ai(()=>e.disconnect())})}function Hs(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Hs(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Us(e.el,t);else if(e.type===P)e.children.forEach(e=>Hs(e,t));else if(e.type===To){let{el:n,anchor:r}=e;for(;n&&(Us(n,t),n!==r);)n=n.nextSibling}}function Us(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Re(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[Bs]=r}}var Ws=/(?:^|;)\s*display\s*:/;function Gs(e,t,n){let r=e.style,i=T(n),a=!1;if(n&&!i){if(t)if(T(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??qs(r,t,``)}else for(let e in t)n[e]??qs(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?qs(r,i,``):ute(e,i,!T(t)&&t?t[i]:void 0,o)||qs(r,i,o)}}else if(i){if(t!==n){let e=r[Bs];e&&(n+=`;`+e),r.cssText=n,a=Ws.test(n)}}else t&&e.removeAttribute(`style`);Fs in e&&(e[Fs]=a?r.display:``,e[Is]&&(r.display=`none`))}var Ks=/\s*!important$/;function qs(e,t,n){if(x(n))n.forEach(n=>qs(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Xs(e,t);Ks.test(n)?e.setProperty(he(r),n.replace(Ks,``),`important`):e[r]=n}}var Js=[`Webkit`,`Moz`,`ms`],Ys={};function Xs(e,t){let n=Ys[t];if(n)return n;let r=pe(t);if(r!==`filter`&&r in e)return Ys[t]=r;r=ge(r);for(let n=0;nic||=(ac.then(()=>ic=0),Date.now());function sc(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;kn(cc(e,n.value),t,5,[e])};return n.value=e,n.attached=oc(),n}function cc(e,t){if(x(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var lc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,uc=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ps(e,r,o):t===`style`?Gs(e,n,r):h(t)?g(t)||fte(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):dc(e,t,r,o))?($s(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Qs(e,t,r,o,a,t!==`value`)):e._isVueCE&&(fc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!T(r)))?$s(e,pe(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Qs(e,t,r,o))};function dc(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&lc(t)&&w(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return lc(t)&&T(n)?!1:t in e}function fc(e,t){let n=e._def.props;if(!n)return!1;let r=pe(t);return Array.isArray(n)?n.some(e=>pe(e)===r):Object.keys(n).some(e=>pe(e)===r)}var pc={};function mc(e,t,n){let r=M(e,t);ce(r)&&(r=_({},r,t));class i extends _c{constructor(e){super(r,e,n)}}return i.def=r,i}var hc=((e,t)=>mc(e,t,sl)),gc=typeof HTMLElement<`u`?HTMLElement:class{},_c=class e extends gc{constructor(e,t={},n=ol){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==ol?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(_({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,zn(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!x(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Se(this._props[e])),(i||=Object.create(null))[pe(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)b(this,e)||Object.defineProperty(this,e,{get:()=>k(t[e])})}_resolveProps(e){let{props:t}=e,n=x(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(pe))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):pc,r=pe(e);t&&this._numberProps&&this._numberProps[r]&&(n=Se(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===pc?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(he(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(he(e),t+``):t||this.removeAttribute(he(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),il(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=z(this._def,_(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,ce(t[0])?_({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),he(e)!==e&&t(he(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e))({name:`TransitionGroup`,props:_({},xs,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Ko(),r=Ar(),i,a;return Oi(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ac(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Ec),i.forEach(Dc);let r=i.filter(Oc);Ns(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Es(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Cc]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Cc]=null,Ds(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=cn(e),s=ws(o),c=o.tag||P;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=As(r);return a.removeChild(r),o}var jc=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return x(t)?e=>ye(t,e):t};function Mc(e){e.target.composing=!0}function Nc(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Pc=Symbol(`_assign`);function Fc(e,t,n){return t&&(e=e.trim()),n&&(e=xe(e)),e}var Ic={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Pc]=jc(i);let a=r||i.props&&i.props.type===`number`;ec(e,t?`change`:`input`,t=>{t.target.composing||e[Pc](Fc(e.value,n,a))}),(n||a)&&ec(e,`change`,()=>{e.value=Fc(e.value,n,a)}),t||(ec(e,`compositionstart`,Mc),ec(e,`compositionend`,Nc),ec(e,`change`,Nc))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Pc]=jc(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?xe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Lc={deep:!0,created(e,t,n){e[Pc]=jc(n),ec(e,`change`,()=>{let t=e._modelValue,n=Hc(e),r=e.checked,i=e[Pc];if(x(t)){let e=Pe(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(C(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Uc(e,r))})},mounted:Rc,beforeUpdate(e,t,n){e[Pc]=jc(n),Rc(e,t,n)}};function Rc(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(x(t))i=Pe(t,r.props.value)>-1;else if(C(t))i=t.has(r.props.value);else{if(t===n)return;i=Ne(t,Uc(e,!0))}e.checked!==i&&(e.checked=i)}var zc={created(e,{value:t},n){e.checked=Ne(t,n.props.value),e[Pc]=jc(n),ec(e,`change`,()=>{e[Pc](Hc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Pc]=jc(r),t!==n&&(e.checked=Ne(t,r.props.value))}},Bc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=C(t);ec(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?xe(Hc(e)):Hc(e));e[Pc](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,zn(()=>{e._assigning=!1})}),e[Pc]=jc(r)},mounted(e,{value:t}){Vc(e,t)},beforeUpdate(e,t,n){e[Pc]=jc(n)},updated(e,{value:t}){e._assigning||Vc(e,t)}};function Vc(e,t){let n=e.multiple,r=x(t);if(!(n&&!r&&!C(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):a.selected=Pe(t,o)>-1}else a.selected=t.has(o);else if(Ne(Hc(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Hc(e){return`_value`in e?e._value:e.value}function Uc(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Wc={created(e,t,n){Kc(e,t,n,null,`created`)},mounted(e,t,n){Kc(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Kc(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Kc(e,t,n,r,`updated`)}};function Gc(e,t){switch(e){case`SELECT`:return Bc;case`TEXTAREA`:return Ic;default:switch(t){case`checkbox`:return Lc;case`radio`:return zc;default:return Ic}}}function Kc(e,t,n,r,i){let a=Gc(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function qc(){Ic.getSSRProps=({value:e})=>({value:e}),zc.getSSRProps=({value:e},t)=>{if(t.props&&Ne(t.props.value,e))return{checked:!0}},Lc.getSSRProps=({value:e},t)=>{if(x(e)){if(t.props&&Pe(e,t.props.value)>-1)return{checked:!0}}else if(C(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Wc.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=Gc(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var Jc=[`ctrl`,`shift`,`alt`,`meta`],Yc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Jc.some(n=>e[`${n}Key`]&&!t.includes(n))},Xc=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=he(n.key);if(t.some(e=>e===r||Zc[e]===r))return e(n)}))},$c=_({patchProp:uc},gs),el,tl=!1;function nl(){return el||=Qa($c)}function rl(){return el=tl?el:$a($c),tl=!0,el}var il=((...e)=>{nl().render(...e)}),al=((...e)=>{rl().hydrate(...e)}),ol=((...e)=>{let t=nl().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=ll(e);if(!r)return;let i=t._component;!w(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,cl(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),sl=((...e)=>{let t=rl().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=ll(e);if(t)return n(t,!0,cl(t))},t});function cl(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function ll(e){return T(e)?document.querySelector(e):e}var ul=!1,dl=()=>{ul||(ul=!0,qc(),zs())},fl=s({BaseTransition:()=>Fr,BaseTransitionPropsValidators:()=>Mr,Comment:()=>wo,DeprecationTypes:()=>null,EffectScope:()=>Be,ErrorCodes:()=>Cee,ErrorTypeStrings:()=>tte,Fragment:()=>P,KeepAlive:()=>gi,ReactiveEffect:()=>Ge,Static:()=>To,Suspense:()=>fo,Teleport:()=>Tr,Text:()=>Co,TrackOpTypes:()=>gee,Transition:()=>ste,TransitionGroup:()=>Tc,TriggerOpTypes:()=>_ee,VueElement:()=>_c,assertNumber:()=>See,callWithAsyncErrorHandling:()=>kn,callWithErrorHandling:()=>On,camelize:()=>pe,capitalize:()=>ge,cloneVNode:()=>zo,compatUtils:()=>null,compile:()=>pl,computed:()=>U,createApp:()=>ol,createBlock:()=>L,createCommentVNode:()=>V,createElementBlock:()=>I,createElementVNode:()=>R,createHydrationRenderer:()=>$a,createPropsRestProxy:()=>Qi,createRenderer:()=>Qa,createSSRApp:()=>sl,createSlots:()=>Nee,createStaticVNode:()=>Wee,createTextVNode:()=>B,createVNode:()=>z,customRef:()=>_n,defineAsyncComponent:()=>pi,defineComponent:()=>M,defineCustomElement:()=>mc,defineEmits:()=>Lee,defineExpose:()=>Ree,defineModel:()=>Vee,defineOptions:()=>zee,defineProps:()=>Iee,defineSSRCustomElement:()=>hc,defineSlots:()=>Bee,devtools:()=>nte,effect:()=>rt,effectScope:()=>Ve,getCurrentInstance:()=>Ko,getCurrentScope:()=>He,getCurrentWatcher:()=>vee,getTransitionRawChildren:()=>Vr,guardReactiveProps:()=>Ro,h:()=>cs,handleError:()=>An,hasInjectionContext:()=>sr,hydrate:()=>al,hydrateOnIdle:()=>oi,hydrateOnInteraction:()=>ui,hydrateOnMediaQuery:()=>li,hydrateOnVisible:()=>ci,initCustomFormatter:()=>Qee,initDirectivesForSSR:()=>dl,inject:()=>or,isMemoSame:()=>ls,isProxy:()=>sn,isReactive:()=>rn,isReadonly:()=>an,isRef:()=>dn,isRuntimeOnly:()=>Yee,isShallow:()=>on,isVNode:()=>Mo,markRaw:()=>D,mergeDefaults:()=>Xi,mergeModels:()=>Zi,mergeProps:()=>H,nextTick:()=>zn,nodeOps:()=>gs,normalizeClass:()=>ke,normalizeProps:()=>Ae,normalizeStyle:()=>Ee,onActivated:()=>vi,onBeforeMount:()=>Ti,onBeforeUnmount:()=>ki,onBeforeUpdate:()=>Di,onDeactivated:()=>yi,onErrorCaptured:()=>Pi,onMounted:()=>Ei,onRenderTracked:()=>Ni,onRenderTriggered:()=>Mi,onScopeDispose:()=>iee,onServerPrefetch:()=>ji,onUnmounted:()=>Ai,onUpdated:()=>Oi,onWatcherCleanup:()=>Tn,openBlock:()=>F,patchProp:()=>uc,popScopeId:()=>tr,provide:()=>ar,proxyRefs:()=>hn,pushScopeId:()=>er,queuePostFlushCb:()=>Un,reactive:()=>$t,readonly:()=>tn,ref:()=>O,registerRuntimeCompiler:()=>Jee,render:()=>il,renderList:()=>Vi,renderSlot:()=>N,resolveComponent:()=>Ii,resolveDirective:()=>Mee,resolveDynamicComponent:()=>Ri,resolveFilter:()=>null,resolveTransitionHooks:()=>Lr,setBlockTracking:()=>Ao,setDevtoolsHook:()=>rte,setTransitionHooks:()=>Br,shallowReactive:()=>en,shallowReadonly:()=>uee,shallowRef:()=>fn,ssrContextKey:()=>cr,ssrUtils:()=>ite,stop:()=>it,toDisplayString:()=>E,toHandlerKey:()=>_e,toHandlers:()=>Pee,toRaw:()=>cn,toRef:()=>pee,toRefs:()=>vn,toValue:()=>A,transformVNodeArgs:()=>Po,triggerRef:()=>fee,unref:()=>k,useAttrs:()=>Uee,useCssModule:()=>bc,useCssVars:()=>Vs,useHost:()=>vc,useId:()=>Hr,useModel:()=>ya,useSSRContext:()=>lr,useShadowRoot:()=>yc,useSlots:()=>qi,useTemplateRef:()=>Wr,useTransitionState:()=>Ar,vModelCheckbox:()=>Lc,vModelDynamic:()=>Wc,vModelRadio:()=>zc,vModelSelect:()=>Bc,vModelText:()=>Ic,vShow:()=>Ls,version:()=>us,warn:()=>ete,watch:()=>pr,watchEffect:()=>ur,watchPostEffect:()=>dr,watchSyncEffect:()=>fr,withAsyncContext:()=>$i,withCtx:()=>j,withDefaults:()=>Hee,withDirectives:()=>rr,withKeys:()=>Qc,withMemo:()=>$ee,withModifiers:()=>Xc,withScopeId:()=>nr}),pl=()=>{},ml=Symbol.for(`craftile-editor`),hl=e=>{let t=Symbol(e);return[e=>ar(t,e),e=>or(t,e),t]};function gl(e){return e==null?[]:Array.isArray(e)?e:[e]}var _l=e=>e[0],vl=e=>e[e.length-1],yl=(e,t)=>e.indexOf(t)!==-1,bl=(e,...t)=>e.concat(t),xl=(e,...t)=>e.filter(e=>!t.includes(e)),Sl=(e,t)=>yl(e,t)?xl(e,t):bl(e,t);function Cl(e,t,n={}){let{step:r=1,loop:i=!0}=n,a=t+r,o=e.length,s=o-1;return t===-1?r>0?0:s:a<0?i?s:0:a>=o?i?0:t>o?o:t:a}function wl(e,t,n={}){return e[Cl(e,t,n)]}function Tl(e,t,n={}){let{step:r=1,loop:i=!0}=n;return Cl(e,t,{step:-r,loop:i})}function El(e,t,n={}){return e[Tl(e,t,n)]}var Dl=e=>e?.constructor.name===`Array`,Ol=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(Dl(e)&&Dl(t))return Ol(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;tArray.isArray(e),jl=e=>typeof e==`object`&&!!e,Ml=e=>jl(e)&&!Al(e),Nl=e=>typeof e==`string`,Pl=e=>typeof e==`function`,Fl=e=>e==null,Il=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ll=e=>Object.prototype.toString.call(e),Rl=Function.prototype.toString,zl=Rl.call(Object),Bl=e=>{if(!jl(e)||Ll(e)!=`[object Object]`||hte(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Il(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Rl.call(n)==zl},pte=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,mte=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,hte=e=>pte(e)||mte(e),Vl=(e,...t)=>(typeof e==`function`?e(...t):e)??void 0,Hl=e=>e,gte=()=>{},Ul=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},Wl=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Gl(e){if(!Bl(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=Gl(t))}return n}function _te(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function Kl(e,t){let n=performance.now(),r;function i(a){if(a-n>=t){e();return}r=requestAnimationFrame(i)}return r=requestAnimationFrame(i),()=>cancelAnimationFrame(r)}function ql(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function Jl(e,t){if(e==null)throw Error(t())}function vte(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(`, `)}`)}var yte=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),Yl=()=>{},Xl=e=>typeof e==`object`&&!!e,bte=2147483647,Zl=e=>e?``:void 0,Ql=e=>e?`true`:void 0,xte=1,Ste=9,Cte=11,$l=e=>Xl(e)&&e.nodeType===xte&&typeof e.nodeName==`string`,eu=e=>Xl(e)&&e.nodeType===Ste,wte=e=>Xl(e)&&e===e.window,tu=e=>$l(e)?e.localName||``:`#document`;function Tte(e){return[`html`,`body`,`#document`].includes(tu(e))}var Ete=e=>Xl(e)&&e.nodeType!==void 0,nu=e=>Ete(e)&&e.nodeType===Cte&&`host`in e,Dte=e=>$l(e)&&e.localName===`input`,ru=e=>!!e?.matches(`a[href]`),Ote=e=>$l(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function iu(e){return e?lu(e.getRootNode())===e:!1}var kte=/(textarea|select)/;function au(e){if(e==null||!$l(e))return!1;try{return Dte(e)&&e.selectionStart!=null||kte.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function ou(e,t){if(!e||!t||!$l(e)||!$l(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&nu(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function su(e){return eu(e)?e:wte(e)?e.document:e?.ownerDocument??document}function Ate(e){return su(e).documentElement}function cu(e){return nu(e)?cu(e.host):eu(e)?e.defaultView??window:$l(e)?e.ownerDocument?.defaultView??window:window}function lu(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function jte(e){if(tu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||nu(e)&&e.host||Ate(e);return nu(t)?t.host:t}var uu=new WeakMap;function du(e){return uu.has(e)||uu.set(e,cu(e).getComputedStyle(e)),uu.get(e)}var fu=()=>typeof document<`u`;function Mte(){return navigator.userAgentData?.platform??navigator.platform}function Nte(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var pu=e=>fu()&&e.test(Mte()),mu=e=>fu()&&e.test(Nte()),Pte=e=>fu()&&e.test(navigator.vendor),hu=()=>fu()&&!!navigator.maxTouchPoints,Fte=()=>pu(/^iPhone/i),Ite=()=>pu(/^iPad/i)||_u()&&navigator.maxTouchPoints>1,gu=()=>Fte()||Ite(),Lte=()=>_u()||gu(),_u=()=>pu(/^Mac/i),vu=()=>Lte()&&Pte(/apple/i),Rte=()=>mu(/Firefox/i),zte=()=>mu(/Android/i);function Bte(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function yu(e){return Bte(e)?.[0]??e.target}function bu(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=Vte(e);return n||r}function xu(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function Su(e){return qte(e).isComposing||e.keyCode===229}function Vte(e){return _u()?e.metaKey:e.ctrlKey}function Hte(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Ute(e){return e.pointerType===``&&e.isTrusted?!0:zte()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var Cu=e=>e.button===0,wu=e=>e.button===2||_u()&&e.ctrlKey&&e.button===0,Wte=e=>e.ctrlKey||e.altKey||e.metaKey,Gte=e=>`touches`in e&&e.touches.length>0,Kte={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},Tu={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function Eu(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=Kte[i]??i,n===`rtl`&&r===`horizontal`&&i in Tu&&(i=Tu[i]),i}function qte(e){return e.nativeEvent??e}function Du(e,t=`client`){let n=Gte(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ou=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function Jte(e){return Yte(e)?e.form:e.closest(`form`)}function Yte(e){return e.matches(`textarea, input, select, button`)}function Xte(e,t){if(!e)return;let n=Jte(e),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function Zte(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(cu(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function Qte(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[Xte(e,r),Zte(e,n)];return()=>i.forEach(e=>e?.())}var ku=e=>$l(e)&&e.tagName===`IFRAME`,$te=e=>!Number.isNaN(parseInt(e.getAttribute(`tabindex`)||`0`,10)),ene=e=>parseInt(e.getAttribute(`tabindex`)||`0`,10)<0,Au=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,ju=(e,t=!1)=>{if(!e)return[];let n=Array.from(e.querySelectorAll(Au));(t==1||t==`if-empty`&&n.length===0)&&$l(e)&&Mu(e)&&n.unshift(e);let r=n.filter(Mu);return r.forEach((e,t)=>{if(ku(e)&&e.contentDocument){let n=e.contentDocument.body;r.splice(t,1,...ju(n))}}),r};function Mu(e){return!e||e.closest(`[inert]`)?!1:e.matches(Au)&&Ote(e)}function Nu(e,t){if(!e)return[];let n=Array.from(e.querySelectorAll(Au)),r=n.filter(Pu);return t&&Pu(e)&&r.unshift(e),r.forEach((e,t)=>{if(ku(e)&&e.contentDocument){let n=e.contentDocument.body,i=Nu(n);r.splice(t,1,...i)}}),!r.length&&t?n:r}function Pu(e){return e!=null&&e.tabIndex>0?!0:Mu(e)&&!ene(e)}function Fu(e,t){let n=Nu(e,t);return[n[0]||null,n[n.length-1]||null]}function tne(e,t){let n=Nu(e),r=e?.ownerDocument||document,i=t??lu(r);return i&&n[n.indexOf(i)+1]||null}function Iu(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||au(e))&&!$te(e)?0:e.tabIndex}function Lu(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=null;if(a||=typeof n==`function`?n():n,a||=t?.querySelector(`[data-autofocus],[autofocus]`),!a){let e=Nu(t);a=r?e.filter(r)[0]:e[0]}return a||t||void 0}function Ru(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=Fu(t);return!(iu(n)&&e.shiftKey||iu(r)&&!e.shiftKey||!n&&!r)}function zu(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function Bu(e){let t,n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}function nne(e,t,n){let r=Bu(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function rne(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function Vu(e,t){let{defer:n}=t,r=n?Bu:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(rne(n,t))})),()=>{i.forEach(e=>e?.())}}function Hu(e){let t=()=>{let t=cu(e);e.dispatchEvent(new t.MouseEvent(`click`))};Rte()?nne(e,`keyup`,t):queueMicrotask(t)}function Uu(e){let t=jte(e);return Tte(t)?su(t).body:$l(t)&&Gu(t)?t:Uu(t)}function Wu(e,t=[]){let n=Uu(e),r=n===e.ownerDocument.body,i=cu(n);return r?t.concat(i,i.visualViewport||[],Gu(n)?n:[]):t.concat(n,Wu(n,[]))}var ine=/auto|scroll|overlay|hidden|clip/,ane=new Set([`inline`,`contents`]);function Gu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cu(e).getComputedStyle(e);return ine.test(t+r+n)&&!ane.has(i)}function one(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Ku(e,t){let{rootEl:n,...r}=t||{};!e||!n||!Gu(n)||!one(n)||e.scrollIntoView(r)}function sne(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i}=t,a=e?.ownerDocument||document,o=a.body;function s(t){if(t.key!==`Tab`)return;let a=null,[s,c]=Fu(e,!0),l=tne(o,n),u=!s&&!c;t.shiftKey&&iu(l)?(i?.(),a=c):t.shiftKey&&(iu(s)||u)?a=n:!t.shiftKey&&iu(n)?(i?.(),a=s):!t.shiftKey&&(iu(c)||u)&&(a=l),a&&(t.preventDefault(),typeof r==`function`?r(a):a.focus())}return Ou(a,`keydown`,s,!0)}function cne(e,t){let{defer:n,triggerElement:r,...i}=t,a=n?Bu:e=>e(),o=[];return o.push(a(()=>{let t=typeof e==`function`?e():e,n=typeof r==`function`?r():r;o.push(sne(t,{triggerElement:n,...i}))})),()=>{o.forEach(e=>e?.())}}function qu(e,t){return Array.from(e?.querySelectorAll(t)??[])}var Ju=e=>e.id;function Yu(e,t,n=Ju){return e.find(e=>n(e)===t)}function Xu(e,t,n=Ju){let r=Yu(e,t,n);return r?e.indexOf(r):-1}function Zu(e,t,n=!0){let r=Xu(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function Qu(e,t,n=!0){let r=Xu(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function $u(e,t){let{onEntry:n,measure:r,box:i=`border-box`}=t,a=(Array.isArray(e)?e:[e]).filter($l),o=cu(a[0]),s=e=>{n({rects:a.map(e=>r(e)),entries:e})};s([]);let c=new o.ResizeObserver(s);return a.forEach(e=>c.observe(e,{box:i})),()=>c.disconnect()}var ed=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),td=e=>ed(e.dataset?.valuetext??e.textContent??``),nd=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function rd(e,t,n,r=Ju){let i=n?Xu(e,n,r):-1,a=n?yte(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>nd(td(e),t))}function id(e,t){if(!e)return Yl;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)}}function ad(e,t,n){if(!e)return Yl;let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)}}function od(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=rd(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var sd=Object.assign(od,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:cd});function cd(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var ld={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function ud(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(Error(`Promise aborted`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function dd(e,t){let{timeout:n,rootNode:r}=t,i=cu(r),a=su(r),o=new i.AbortController;return ud(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}var fd=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),pd=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,md=e=>{let t={},n;for(;n=pd.exec(e);)t[n[1]]=n[2];return t},hd=(e,t)=>{if(Nl(e)){if(Nl(t))return`${e};${t}`;e=md(e)}else Nl(t)&&(t=md(t));return Object.assign({},e??{},t??{})};function gd(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=Ul(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=fd(t[e],n[e]);continue}if(e===`style`){t[e]=hd(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function _d(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function vd(e){return e}function yd(){return{guards:_d(),createMachine:e=>e,choose:e=>function({choose:t}){return t(e)?.actions}}}var bd=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(bd||{}),xd=`__init__`;function Sd(e){let t=()=>e.getRootNode?.()??document,n=()=>su(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>lu(t()),isActiveElement:iu,getById:e=>t().getElementById(e)}}function Cd(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var wd=()=>e=>Array.from(new Set(e));function Td(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Ed={htmlFor:`for`,className:`class`,onDoubleClick:`onDblclick`,onChange:`onInput`,onFocus:`onFocusin`,onBlur:`onFocusout`,defaultValue:`value`,defaultChecked:`checked`},Dd=`viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit`.split(`,`);function Od(e){return e in Ed?Ed[e]:e.startsWith(`on`)?`on${Td(e.substr(2))}`:Dd.includes(e)?e:e.toLowerCase()}var kd=Cd(e=>{let t={};for(let n in e){let r=e[n];n===`children`?typeof r==`string`&&(t.innerHTML=r):t[Od(n)]=e[n]}return t});function Ad(e){let t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=fn(t),i=U(()=>e().value!==void 0);return{initial:t,ref:fn(i.value?e().value:r.value),get(){return i.value?e().value:r.value},set(t){let a=i.value?e().value:r.value,o=Pl(t)?t(a):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:o,prev:a}),i.value||(r.value=o),n(o,a)||e().onChange?.(o,a)},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Ad.cleanup=e=>{Ai(()=>e())},Ad.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function jd(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var Md=(e,t)=>{pr(()=>[...e.map(e=>e())],(e,n)=>{let r=!1;for(let t=0;t{let{id:e,ids:n,getRootNode:r}=A(t);return Sd({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=Pd(U(()=>e.props?.({props:Gl(A(t)),get scope(){return n.value}})??A(t))),a=e.context?.({prop:i,bindable:Ad,get scope(){return n.value},flush:Fd,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a[e]?.get()},set(e,t){a[e]?.set(t)},initial(e){return a[e]?.initial},hash(e){let t=a[e]?.get();return a[e]?.hash(t)}},s=new Map,c=null,l={current:null},u={current:{type:``}},d=()=>({...u.current,current(){return u.current},previous(){return l.current}}),f=()=>({...b,matches(...e){let t=b.get();return e.includes(t)},hasTag(t){let n=b.get();return!!e.states[n]?.tags?.includes(t)}}),p=jd(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:S,action:h,guard:g,track:Md,refs:p,computed:y,flush:Fd,get scope(){return n.value},choose:v}),h=t=>{let n=Pl(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||ql(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>Pl(t)?t(m()):e.implementations?.guards?.[t](m()),_=t=>{let n=Pl(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||ql(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>gl(e).find(e=>{let t=!e.guard;return Nl(e.guard)?t=!!g(e.guard):Pl(e.guard)&&(t=e.guard(m())),t}),y=t=>{Jl(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:d(),prop:i,refs:p,get scope(){return n.value},computed:y})},b=Ad(()=>({defaultValue:e.initialState({prop:i}),onChange(t,n){n&&(s.get(n)?.(),s.delete(n)),n&&h(e.states[n]?.exit),h(c?.actions);let r=_(e.states[t]?.effects);if(r&&s.set(t,r),n===xd){h(e.entry);let t=_(e.effects);t&&s.set(xd,t)}h(e.states[t]?.entry)}})),x=bd.NotStarted;Ei(()=>{let e=x===bd.Started;x=bd.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,xd)}),ki(()=>{x=bd.Stopped,r(`unmounting...`);let t=s.values();for(let e of t)e?.();s=new Map,h(e.exit)});let S=t=>{if(x!==bd.Started)return;l.current=u.current,u.current=t;let n=b.get(),i=v(e.states[n].on?.[t.type]??e.on?.[t.type]);if(!i)return;c=i;let a=i.target??n;r(`transition`,t.type,i.target||n,`(${i.actions})`);let o=a!==n;o?b.set(a):i.reenter&&!o?b.invoke(n,n):h(i.actions)};return e.watch?.(m()),{state:f(),send:S,context:o,prop:i,get scope(){return n.value},refs:p,computed:y,event:d(),getStatus:()=>x}}function Pd(e){return function(t){return e.value[t]}}var Fd=e=>{zn().then(()=>{e()})},Id=M({name:`Dynamic`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=Ld(n.default()),[r,...i]=e;if(Object.keys(t).length>0){delete r.props?.ref;let n=gd(t,r.props??{}),a=zo(r,n);for(let e in n)e.startsWith(`on`)&&(a.props||={},a.props[e]=n[e]);return e.length===1?a:[a,...i]}return e}}});function Ld(e){return e?e.flatMap(e=>e.type===P?Ld(e.children):[e]):[]}var Rd=`br, hr, img, input, area, textarea`.split(`, `),zd=e=>typeof e==`string`&&Rd.includes(e),Bd=e=>M({name:`Polymorphic`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>cs(Id,n,r):()=>cs(e,n,zd(e)?void 0:r.default?.())}});function Vd(){let e=new Map;return new Proxy(Bd,{apply(e,t,n){return Bd(n[0])},get(t,n){return e.has(n)||e.set(n,Bd(n)),e.get(n)}})}var W=Vd();function Hd(e){let t=A(e);return t?.$el??t}var Ud=e=>Object.prototype.hasOwnProperty.call(e,`nodeName`)&&typeof e.nodeName==`string`;function G(){let e=Ko(),t=O(),n=U(()=>[`#text`,`#comment`].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Hd(t)),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(n){t.value=n,!(Ud(n)||!n)&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}var Wd=(e,t=[])=>({parts:(...n)=>{if(Kd(t))return Wd(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>Wd(e,[...t,...n]),omit:(...n)=>Wd(e,t.filter(e=>!n.includes(e))),rename:e=>Wd(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${Gd(e)}"][data-part="${Gd(n)}"]`,`& [data-scope="${Gd(e)}"][data-part="${Gd(n)}"]`].join(`, `),attrs:{"data-scope":Gd(e),"data-part":Gd(n)}}}),{})}),Gd=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),Kd=e=>e.length===0,[lne,qd]=hl(`EnvironmentContext`),Jd=U(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Yd=U(()=>({dir:`ltr`,locale:`en-US`})),[une,Xd]=hl(`LocaleContext`),Zd=e=>{let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},Qd=[`top`,`right`,`bottom`,`left`],$d=Math.min,ef=Math.max,tf=Math.round,nf=Math.floor,rf=e=>({x:e,y:e}),af={left:`right`,right:`left`,bottom:`top`,top:`bottom`},of={start:`end`,end:`start`};function sf(e,t,n){return ef(e,$d(t,n))}function cf(e,t){return typeof e==`function`?e(t):e}function lf(e){return e.split(`-`)[0]}function uf(e){return e.split(`-`)[1]}function df(e){return e===`x`?`y`:`x`}function ff(e){return e===`y`?`height`:`width`}var pf=new Set([`top`,`bottom`]);function mf(e){return pf.has(lf(e))?`y`:`x`}function hf(e){return df(mf(e))}function gf(e,t,n){n===void 0&&(n=!1);let r=uf(e),i=hf(e),a=ff(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Tf(o)),[o,Tf(o)]}function _f(e){let t=Tf(e);return[vf(e),t,vf(t)]}function vf(e){return e.replace(/start|end/g,e=>of[e])}var yf=[`left`,`right`],bf=[`right`,`left`],xf=[`top`,`bottom`],Sf=[`bottom`,`top`];function Cf(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bf:yf:t?yf:bf;case`left`:case`right`:return t?xf:Sf;default:return[]}}function wf(e,t,n,r){let i=uf(e),a=Cf(lf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vf)))),a}function Tf(e){return e.replace(/left|right|bottom|top/g,e=>af[e])}function Ef(e){return{top:0,right:0,bottom:0,left:0,...e}}function Df(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ef(e)}function Of(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kf(e,t,n){let{reference:r,floating:i}=e,a=mf(t),o=hf(t),s=ff(o),c=lf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(uf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var Af=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=kf(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=cf(e,t)||{};if(l==null)return{};let d=Df(u),f={x:n,y:r},p=hf(i),m=ff(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let ee=b/2-x/2,te=C/2-h[m]/2-1,w=$d(d[_],te),T=$d(d[v],te),ne=w,re=C-h[m]-T,ie=C/2-h[m]/2+ee,ae=sf(ne,ie,re),oe=!c.arrow&&uf(i)!=null&&ie!==ae&&a.reference[m]/2-(iee<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==mf(t))||te.every(e=>mf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:te},reset:{placement:t}};let n=te.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=te.filter(e=>{if(x){let t=mf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Pf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ff(e){return Qd.some(t=>e[t]>=0)}var If=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=cf(e,t);switch(r){case`referenceHidden`:{let e=Pf(await jf(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ff(e)}}}case`escaped`:{let e=Pf(await jf(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ff(e)}}}default:return{}}}}},Lf=new Set([`left`,`top`]);async function Rf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lf(n),s=uf(n),c=mf(n)===`y`,l=Lf.has(o)?-1:1,u=a&&c?-1:1,d=cf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var zf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Rf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Bf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=cf(e,t),l={x:n,y:r},u=await jf(t,c),d=mf(lf(i)),f=df(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=sf(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=sf(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Vf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=cf(e,t),u={x:n,y:r},d=mf(i),f=df(d),p=u[f],m=u[d],h=cf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Lf.has(lf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Hf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=cf(e,t),u=await jf(t,l),d=lf(i),f=uf(i),p=mf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=$d(h-u[g],v),x=$d(m-u[_],y),S=!t.middlewareData.shift,C=b,ee=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ee=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=ef(u.left,0),t=ef(u.right,0),n=ef(u.top,0),r=ef(u.bottom,0);p?ee=m-2*(e!==0||t!==0?e+t:ef(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:ef(u.top,u.bottom))}await c({...t,availableWidth:ee,availableHeight:C});let te=await o.getDimensions(s.floating);return m!==te.width||h!==te.height?{reset:{rects:!0}}:{}}}};function Uf(){return typeof window<`u`}function Wf(e){return qf(e)?(e.nodeName||``).toLowerCase():`#document`}function Gf(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kf(e){return((qf(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function qf(e){return Uf()?e instanceof Node||e instanceof Gf(e).Node:!1}function Jf(e){return Uf()?e instanceof Element||e instanceof Gf(e).Element:!1}function Yf(e){return Uf()?e instanceof HTMLElement||e instanceof Gf(e).HTMLElement:!1}function Xf(e){return!Uf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Gf(e).ShadowRoot}var Zf=new Set([`inline`,`contents`]);function Qf(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=dp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Zf.has(i)}var $f=new Set([`table`,`td`,`th`]);function ep(e){return $f.has(Wf(e))}var tp=[`:popover-open`,`:modal`];function np(e){return tp.some(t=>{try{return e.matches(t)}catch{return!1}})}var rp=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ip=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],ap=[`paint`,`layout`,`strict`,`content`];function op(e){let t=cp(),n=Jf(e)?dp(e):e;return rp.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ip.some(e=>(n.willChange||``).includes(e))||ap.some(e=>(n.contain||``).includes(e))}function sp(e){let t=pp(e);for(;Yf(t)&&!up(t);){if(op(t))return t;if(np(t))return null;t=pp(t)}return null}function cp(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var lp=new Set([`html`,`body`,`#document`]);function up(e){return lp.has(Wf(e))}function dp(e){return Gf(e).getComputedStyle(e)}function fp(e){return Jf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pp(e){if(Wf(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Xf(e)&&e.host||Kf(e);return Xf(t)?t.host:t}function mp(e){let t=pp(e);return up(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yf(t)&&Qf(t)?t:mp(t)}function hp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=mp(e),i=r===e.ownerDocument?.body,a=Gf(r);if(i){let e=gp(a);return t.concat(a,a.visualViewport||[],Qf(r)?r:[],e&&n?hp(e):[])}return t.concat(r,hp(r,[],n))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _p(e){let t=dp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Yf(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=tf(n)!==a||tf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vp(e){return Jf(e)?e:e.contextElement}function yp(e){let t=vp(e);if(!Yf(t))return rf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_p(t),o=(a?tf(n.width):n.width)/r,s=(a?tf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var bp=rf(0);function xp(e){let t=Gf(e);return!cp()||!t.visualViewport?bp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gf(e)?!1:t}function Cp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vp(e),o=rf(1);t&&(r?Jf(r)&&(o=yp(r)):o=yp(e));let s=Sp(a,n,r)?xp(a):rf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Gf(a),t=r&&Jf(r)?Gf(r):r,n=e,i=gp(n);for(;i&&r&&t!==n;){let e=yp(i),t=i.getBoundingClientRect(),r=dp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Gf(i),i=gp(n)}}return Of({width:u,height:d,x:c,y:l})}function wp(e,t){let n=fp(e).scrollLeft;return t?t.left+n:Cp(Kf(e)).left+n}function Tp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wp(e,n),y:n.top+t.scrollTop}}function Ep(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Kf(r),s=t?np(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=rf(1),u=rf(0),d=Yf(r);if((d||!d&&!a)&&((Wf(r)!==`body`||Qf(o))&&(c=fp(r)),Yf(r))){let e=Cp(r);l=yp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Tp(o,c):rf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Dp(e){return Array.from(e.getClientRects())}function Op(e){let t=Kf(e),n=fp(e),r=e.ownerDocument.body,i=ef(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ef(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wp(e),s=-n.scrollTop;return dp(r).direction===`rtl`&&(o+=ef(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var kp=25;function Ap(e,t){let n=Gf(e),r=Kf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=cp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=wp(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=kp&&(a-=o)}else l<=kp&&(a+=l);return{width:a,height:o,x:s,y:c}}var jp=new Set([`absolute`,`fixed`]);function Mp(e,t){let n=Cp(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Yf(e)?yp(e):rf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Np(e,t,n){let r;if(t===`viewport`)r=Ap(e,n);else if(t===`document`)r=Op(Kf(e));else if(Jf(t))r=Mp(t,n);else{let n=xp(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Of(r)}function Pp(e,t){let n=pp(e);return n===t||!Jf(n)||up(n)?!1:dp(n).position===`fixed`||Pp(n,t)}function Fp(e,t){let n=t.get(e);if(n)return n;let r=hp(e,[],!1).filter(e=>Jf(e)&&Wf(e)!==`body`),i=null,a=dp(e).position===`fixed`,o=a?pp(e):e;for(;Jf(o)&&!up(o);){let t=dp(o),n=op(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&jp.has(i.position)||Qf(o)&&!n&&Pp(e,o))?r=r.filter(e=>e!==o):i=t,o=pp(o)}return t.set(e,r),r}function Ip(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?np(t)?[]:Fp(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Np(t,n,i);return e.top=ef(r.top,e.top),e.right=$d(r.right,e.right),e.bottom=$d(r.bottom,e.bottom),e.left=ef(r.left,e.left),e},Np(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Lp(e){let{width:t,height:n}=_p(e);return{width:t,height:n}}function Rp(e,t,n){let r=Yf(t),i=Kf(t),a=n===`fixed`,o=Cp(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=rf(0);function l(){c.x=wp(i)}if(r||!r&&!a)if((Wf(t)!==`body`||Qf(i))&&(s=fp(t)),r){let e=Cp(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Tp(i,s):rf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function zp(e){return dp(e).position===`static`}function Bp(e,t){if(!Yf(e)||dp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Kf(e)===n&&(n=n.ownerDocument.body),n}function Vp(e,t){let n=Gf(e);if(np(e))return n;if(!Yf(e)){let t=pp(e);for(;t&&!up(t);){if(Jf(t)&&!zp(t))return t;t=pp(t)}return n}let r=Bp(e,t);for(;r&&ep(r)&&zp(r);)r=Bp(r,t);return r&&up(r)&&zp(r)&&!op(r)?n:r||sp(e)||n}var Hp=async function(e){let t=this.getOffsetParent||Vp,n=this.getDimensions,r=await n(e.floating);return{reference:Rp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Up(e){return dp(e).direction===`rtl`}var Wp={convertOffsetParentRelativeRectToViewportRelativeRect:Ep,getDocumentElement:Kf,getClippingRect:Ip,getOffsetParent:Vp,getElementRects:Hp,getClientRects:Dp,getDimensions:Lp,getScale:yp,isElement:Jf,isRTL:Up};function Gp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kp(e,t){let n=null,r,i=Kf(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=nf(d),h=nf(i.clientWidth-(u+f)),g=nf(i.clientHeight-(d+p)),_=nf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ef(0,$d(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Gp(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function qp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vp(e),u=i||a?[...l?hp(l):[],...hp(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Kp(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Cp(e):null;c&&g();function g(){let t=Cp(e);h&&!Gp(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Jp=zf,Yp=Bf,Xp=Nf,Zp=Hf,Qp=If,$p=Mf,em=Vf,tm=(e,t,n)=>{let r=new Map,i={platform:Wp,...n},a={...i.platform,_c:r};return Af(e,t,{...i,platform:a})};function nm(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function rm(e){if(!e)return nm();let{x:t,y:n,width:r,height:i}=e;return nm(t,n,r,i)}function im(e,t){return{contextElement:$l(e)?e:void 0,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?rm(r):n.getBoundingClientRect()}}}var am=e=>({variable:e,reference:`var(${e})`}),om={arrowSize:am(`--arrow-size`),arrowSizeHalf:am(`--arrow-size-half`),arrowBg:am(`--arrow-background`),transformOrigin:am(`--transform-origin`),arrowOffset:am(`--arrow-offset`)},sm=e=>e===`top`||e===`bottom`?`y`:`x`;function cm(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=sm(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,ee=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(om.transformOrigin.variable,ee?C:S),{data:{transformOrigin:ee?C:S}}}}}var lm={name:`rects`,fn({rects:e}){return{data:e}}},um=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${om.arrowOffset.reference})`}),{}}}};function dm(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function fm(e){return e.split(`-`)[0]}var pm={strategy:`absolute`,placement:`bottom`,listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function mm(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function hm(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function gm(e,t,n){return $p({element:e||t.createElement(`div`),padding:n.arrowPadding})}function _m(e,t){if(!Fl(t.offset??t.gutter))return Jp(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=dm(n),s=o?void 0:t.shift;return Gl({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function vm(e){if(!e.flip)return;let t=hm(e.boundary);return Xp({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function ym(e){if(!e.slide&&!e.overlap)return;let t=hm(e.boundary);return Yp({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:em()})}function bm(e){return Zp({padding:e.overflowPadding,apply({elements:e,rects:t,availableHeight:n,availableWidth:r}){let i=e.floating,a=Math.round(t.reference.width),o=Math.round(t.reference.height);r=Math.floor(r),n=Math.floor(n),i.style.setProperty(`--reference-width`,`${a}px`),i.style.setProperty(`--reference-height`,`${o}px`),i.style.setProperty(`--available-width`,`${r}px`),i.style.setProperty(`--available-height`,`${n}px`)}})}function xm(e){if(e.hideWhenDetached)return Qp({strategy:`referenceHidden`,boundary:hm(e.boundary)??`clippingAncestors`})}function Sm(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Cm(e,t,n={}){let r=im(e,n.getAnchorRect);if(!t||!r)return;let i=Object.assign({},pm,n),a=t.querySelector(`[data-part=arrow]`),o=[_m(a,i),vm(i),ym(i),gm(a,t.ownerDocument,i),um(a),cm({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),bm(i),xm(i),lm],{placement:s,strategy:c,onComplete:l,onPositioned:u}=i,d=async()=>{if(!r||!t)return;let e=await tm(r,t,{placement:s,middleware:o,strategy:c});l?.(e),u?.({placed:!0});let n=cu(t),a=mm(n,e.x),d=mm(n,e.y);t.style.setProperty(`--x`,`${a}px`),t.style.setProperty(`--y`,`${d}px`),i.hideWhenDetached&&(e.middlewareData.hide?.referenceHidden?(t.style.setProperty(`visibility`,`hidden`),t.style.setProperty(`pointer-events`,`none`)):(t.style.removeProperty(`visibility`),t.style.removeProperty(`pointer-events`)));let f=t.firstElementChild;if(f){let e=du(f);t.style.setProperty(`--z-index`,e.zIndex)}},f=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:d,floatingElement:t}),u?.({placed:!0})):await d()},p=Sm(i.listeners),m=i.listeners?qp(r,t,f,p):gte;return f(),()=>{m?.(),u?.({placed:!1})}}function wm(e,t,n={}){let{defer:r,...i}=n,a=r?Bu:e=>e(),o=[];return o.push(a(()=>{let n=typeof e==`function`?e():e,r=typeof t==`function`?t():t;o.push(Cm(n,r,i))})),()=>{o.forEach(e=>e?.())}}var Tm={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function Em(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:om.arrowSize.reference,height:om.arrowSize.reference,[om.arrowSizeHalf.variable]:`calc(${om.arrowSize.reference} / 2)`,[om.arrowOffset.variable]:`calc(${om.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Tm[t.split(`-`)[0]]:void 0,background:om.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}function Dm(e){let t={each(t){for(let n=0;n{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Om(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var km=`pointerdown.outside`,Am=`focus.outside`;function jm(e){for(let t of e)if($l(t)&&Mu(t))return!0;return!1}var Mm=e=>`clientY`in e;function Nm(e,t){if(!Mm(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Pm(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Fm(e,t){if(!t||!Mm(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return Pm({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Im(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o}=t;if(!e)return;let s=su(e),c=cu(e),l=Dm(c),u=Om(c);function d(t,r){if(!$l(r)||!r.isConnected||ou(e,r)||Nm(e,t))return!1;let i=s.querySelector(`[aria-controls="${e.id}"]`);return i&&Fm(t,Uu(i))||Fm(t,Uu(e))?!1:!n?.(r)}let f=new Set,p=nu(e?.getRootNode());function m(t){function n(n){let r=o&&!hu()?Bu:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=p?c[0]:yu(t);if(!(!e||!d(t,n))){if(i||a){let t=Ul(i,a);e.addEventListener(km,t,{once:!0})}Rm(e,km,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:wu(s),focusable:jm(c),target:n}})}})}t.pointerType===`touch`?(f.forEach(e=>e()),f.add(Ou(s,`click`,n,{once:!0})),f.add(u.addEventListener(`click`,n,{once:!0})),f.add(l.addEventListener(`click`,n,{once:!0}))):n()}let h=new Set,g=setTimeout(()=>{h.add(Ou(s,`pointerdown`,m,!0)),h.add(u.addEventListener(`pointerdown`,m,!0)),h.add(l.addEventListener(`pointerdown`,m,!0))},0);function _(t){(o?Bu:e=>e())(()=>{let n=yu(t);if(!(!e||!d(t,n))){if(r||a){let t=Ul(r,a);e.addEventListener(Am,t,{once:!0})}Rm(e,Am,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:Mu(n),target:n}})}})}return hu()||(h.add(Ou(s,`focusin`,_,!0)),h.add(u.addEventListener(`focusin`,_,!0)),h.add(l.addEventListener(`focusin`,_,!0))),()=>{clearTimeout(g),f.forEach(e=>e()),h.forEach(e=>e())}}function Lm(e,t){let{defer:n}=t,r=n?Bu:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Im(n,t))})),()=>{i.forEach(e=>e?.())}}function Rm(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function zm(e,t){return Ou(su(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Bm=`layer:request-dismiss`,Vm={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(e=>ou(e.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ou(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(tVm.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty(`--layer-index`,`${t}`),e.node.removeAttribute(`data-nested`),e.node.removeAttribute(`data-has-nested`),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute(`data-nested`,e.type);let n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute(`data-has-nested`,e.type),e.node.style.setProperty(`--nested-layer-count`,`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];Um(e,Bm,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Hm(e,Bm,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Hm(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function Um(e,t,n){e.addEventListener(t,n,{once:!0})}var Wm;function Gm(){Vm.layers.forEach(({node:e})=>{e.style.pointerEvents=Vm.isBelowPointerBlockingLayer(e)?`none`:`auto`})}function Km(e){e.style.pointerEvents=``}function qm(e,t){let n=su(e),r=[];return Vm.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Wm=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents=`none`,n.body.setAttribute(`data-inert`,``)})),t?.forEach(e=>{let[t,n]=dd(()=>{let t=e();return $l(t)?t:null},{timeout:1e3});t.then(e=>r.push(id(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Vm.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Wm,n.body.removeAttribute(`data-inert`),n.body.style.length===0&&n.body.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Jm(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){ql("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`}=t,l={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i};Vm.add(l),Gm();function u(n){let i=yu(n.detail.originalEvent);Vm.isBelowPointerBlockingLayer(e)||Vm.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function d(e){let n=yu(e.detail.originalEvent);Vm.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function f(n){Vm.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function p(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter($l);return a&&i.push(...a),i.some(e=>ou(e,n))||Vm.isInNestedLayer(e,n)}let m=[a?qm(e,t.persistentElements):void 0,zm(e,f),Lm(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Vm.remove(e),Gm(),Km(e),m.forEach(e=>e?.())}}function Ym(e,t){let{defer:n}=t,r=n?Bu:e=>e(),i=[];return i.push(r(()=>{let n=Pl(e)?e():e;i.push(Jm(n,t))})),()=>{i.forEach(e=>e?.())}}function Xm(e,t={}){let{defer:n}=t,r=n?Bu:e=>e(),i=[];return i.push(r(()=>{let t=Pl(e)?e():e;if(!t){ql("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Vm.addBranch(t),i.push(()=>{Vm.removeBranch(t)})})),()=>{i.forEach(e=>e?.())}}var[Zm,Qm]=hl(`RenderStrategyProps`);function $m(e){return!(e.metaKey||!_u()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var eh=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function th(e,t,n){let r=n?yu(n):null,i=cu(r);return e=e||r instanceof i.HTMLInputElement&&!eh.has(r?.type)||r instanceof i.HTMLTextAreaElement||r instanceof i.HTMLElement&&r.isContentEditable,!(e&&t===`keyboard`&&n instanceof i.KeyboardEvent&&!Reflect.has(sh,n.key))}var nh=null,rh=new Set,ih=new Map,ah=!1,oh=!1,sh={Tab:!0,Escape:!0};function ch(e,t){for(let n of rh)n(e,t)}function lh(e){ah=!0,$m(e)&&(nh=`keyboard`,ch(`keyboard`,e))}function uh(e){nh=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(ah=!0,ch(`pointer`,e))}function dh(e){Ute(e)&&(ah=!0,nh=`virtual`)}function fh(e){let t=yu(e);t===cu(t)||t===su(t)||(!ah&&!oh&&(nh=`virtual`,ch(`virtual`,e)),ah=!1,oh=!1)}function ph(){ah=!1,oh=!0}function mh(e){if(typeof window>`u`||ih.get(cu(e)))return;let t=cu(e),n=su(e),r=t.HTMLElement.prototype.focus;function i(){nh=`virtual`,ch(`virtual`,null),ah=!0,r.apply(this,arguments)}Object.defineProperty(t.HTMLElement.prototype,`focus`,{configurable:!0,value:i}),n.addEventListener(`keydown`,lh,!0),n.addEventListener(`keyup`,lh,!0),n.addEventListener(`click`,dh,!0),t.addEventListener(`focus`,fh,!0),t.addEventListener(`blur`,ph,!1),typeof t.PointerEvent<`u`?(n.addEventListener(`pointerdown`,uh,!0),n.addEventListener(`pointermove`,uh,!0),n.addEventListener(`pointerup`,uh,!0)):(n.addEventListener(`mousedown`,uh,!0),n.addEventListener(`mousemove`,uh,!0),n.addEventListener(`mouseup`,uh,!0)),t.addEventListener(`beforeunload`,()=>{hh(e)},{once:!0}),ih.set(t,{focus:r})}var hh=(e,t)=>{let n=cu(e),r=su(e);ih.has(n)&&(n.HTMLElement.prototype.focus=ih.get(n).focus,r.removeEventListener(`keydown`,lh,!0),r.removeEventListener(`keyup`,lh,!0),r.removeEventListener(`click`,dh,!0),n.removeEventListener(`focus`,fh,!0),n.removeEventListener(`blur`,ph,!1),typeof n.PointerEvent<`u`?(r.removeEventListener(`pointerdown`,uh,!0),r.removeEventListener(`pointermove`,uh,!0),r.removeEventListener(`pointerup`,uh,!0)):(r.removeEventListener(`mousedown`,uh,!0),r.removeEventListener(`mousemove`,uh,!0),r.removeEventListener(`mouseup`,uh,!0)),ih.delete(n))};function gh(){return nh===`keyboard`}function _h(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;mh(i),r?.({isFocusVisible:n||gh(),modality:nh});let a=(e,n)=>{th(!!t,e,n)&&r?.({isFocusVisible:gh(),modality:e})};return rh.add(a),()=>{rh.delete(a)}}var[vh,yh]=hl(`FieldContext`),bh=Object.defineProperty,xh=(e,t,n)=>t in e?bh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sh=(e,t,n)=>xh(e,typeof t==`symbol`?t:t+``,n),Ch={itemToValue(e){return typeof e==`string`?e:Ml(e)&&Il(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:Ml(e)&&Il(e,`label`)?e.label:Ch.itemToValue(e)},isItemDisabled(e){return Ml(e)&&Il(e,`disabled`)?!!e.disabled:!1}},wh=class e{constructor(t){this.options=t,Sh(this,`items`),Sh(this,`indexMap`,null),Sh(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),Sh(this,`isEqual`,e=>kl(this.items,e.items)),Sh(this,`setItems`,e=>this.copy(e)),Sh(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),Sh(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),Sh(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),Sh(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),Sh(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),Sh(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),Sh(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??Ch.itemToValue(e)),Sh(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??Ch.isItemDisabled(e)),Sh(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??Ch.itemToString(e)),Sh(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),Sh(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),Sh(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),Sh(this,`has`,e=>this.indexOf(e)!==-1),Sh(this,`hasItem`,e=>e==null?!1:this.has(this.getItemValue(e))),Sh(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),Sh(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),Sh(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),Sh(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),Sh(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),Sh(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),Sh(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),Sh(this,`insert`,(e,...t)=>this.copy(Eh(this.items,e,...t))),Sh(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Eh(this.items,n,...t))}),Sh(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Eh(this.items,n+1,...t))}),Sh(this,`prepend`,(...e)=>this.copy(Eh(this.items,0,...e))),Sh(this,`append`,(...e)=>this.copy(Eh(this.items,this.items.length,...e))),Sh(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),Sh(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n==null?!1:!t.includes(n)}))}),Sh(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(Dh(this.items,[n],t))}),Sh(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Dh(this.items,r,n))}),Sh(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Dh(this.items,r,n+1))}),Sh(this,`reorder`,(e,t)=>this.copy(Dh(this.items,[e],t))),Sh(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return nr)}),Sh(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),Sh(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),Sh(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),Sh(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},Th=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function Eh(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Dh(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>enew wh(e),[kh,Ah]=hl(`PresenceContext`);function jh(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var Mh={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`clearInitial`,`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},clearInitial:({context:e})=>{e.set(`initial`,!1)},invokeOnExitComplete:({prop:e})=>{e(`onExitComplete`)?.()},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,du(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});Bu(()=>{let r=Nh(t.get(`styles`));e.set(`unmountAnimationName`,r),r===`none`||r===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{Bu(()=>{e.set(`prevAnimationName`,Nh(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{let r=t.get(`node`);if(!r)return;let i=n=>{(n.composedPath?.()?.[0]??n.target)===r&&e.set(`prevAnimationName`,Nh(t.get(`styles`)))},a=i=>{let a=Nh(t.get(`styles`));yu(i)===r&&a===e.get(`unmountAnimationName`)&&n({type:`UNMOUNT`,src:`animationend`})};r.addEventListener(`animationstart`,i),r.addEventListener(`animationcancel`,a),r.addEventListener(`animationend`,a);let o=id(r,{animationFillMode:`forwards`});return()=>{r.removeEventListener(`animationstart`,i),r.removeEventListener(`animationcancel`,a),r.removeEventListener(`animationend`,a),zu(()=>o())}}}}};function Nh(e){return e?.animationName||`none`}wd()([`onExitComplete`,`present`,`immediate`]);var Ph=(e,t)=>{let n=O(!1),r=O(null),i=Nd(Mh,U(()=>({present:A(e).present,onExitComplete:()=>t?.(`exitComplete`)}))),a=U(()=>jh(i));return pr(()=>a.value.present,()=>{a.value.present&&(n.value=!0)}),pr(r,()=>{if(r.value){let e=r.value.$el?r.value.$el:r.value;e&&a.value.setNode(e)}}),U(()=>{let t=A(e);return{present:a.value.present,unmounted:!a.value.present&&!n.value&&t.lazyMount||t?.unmountOnExit&&!a.value?.present&&n.value,presenceProps:{ref:r,hidden:!a.value.present,"data-state":a.value.skip&&t.skipAnimationOnMount?void 0:t?.present?`open`:`closed`}}})},[Fh,Ih]=hl(`SelectContext`),Lh=M({__name:`select-clear-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Rh=M({__name:`select-content`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=Ah(),r=U(()=>gd(t.value.getContentProps(),n.value.presenceProps));return G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zh=M({__name:`select-context`,setup(e){let t=Ih();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Bh=M({__name:`select-control`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Vh={key:0,value:``},Hh=[`value`,`disabled`],Uh=M({__name:`select-hidden-select`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=yh();return G(),(e,r)=>(F(),L(k(W).select,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getHiddenSelectProps()),{default:j(()=>[k(t).value.length===0?(F(),I(`option`,Vh)):V(``,!0),(F(!0),I(P,null,Vi(k(t).collection.items,e=>(F(),I(`option`,{key:e.value,value:k(t).collection.getItemValue(e),disabled:k(t).collection.getItemDisabled(e)},E(k(t).collection.stringifyItem(e))+` > `,9,Hh))),128))]),_:1},16,[`aria-describedby`]))}}),Wh=M({__name:`select-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Gh,Kh]=hl(`SelectItemContext`),qh=M({__name:`select-item-context`,setup(e){let t=Kh();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[Jh,Yh]=hl(`SelectItemGroupPropsContext`),Xh=M({__name:`select-item-group-label`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=Yh();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemGroupLabelProps({htmlFor:k(n).id}),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Zh=M({__name:`select-item-group`,props:{id:{},asChild:{type:Boolean}},setup(e){let t=e,n=Ih(),r=Hr(),i=t.id??r;return Jh({id:i}),G(),(e,t)=>(F(),L(k(W).div,H(k(n).getItemGroupProps({id:k(i)}),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Qh,$h]=hl(`SelectItemPropsContext`),eg=M({__name:`select-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=$h();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),tg=M({__name:`select-item-text`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=$h();return G(),(e,r)=>(F(),L(k(W).span,H(k(t).getItemTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ng=M({__name:`select-item`,props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=Ih();return Qh(t),Gh(U(()=>n.value.getItemState(t))),G(),(e,r)=>(F(),L(k(W).div,H(k(n).getItemProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),rg=M({__name:`select-label`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ig=M({__name:`select-list`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getListProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ag=M({__name:`select-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=Ih(),n=Qm(),r=Ph(U(()=>({...n.value,present:t.value.open})));return kh(r),G(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),og=M({__name:`select-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return Fh(n),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),sg=Wd(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`).build(),cg=e=>new wh(e);cg.empty=()=>new wh({items:[]});var lg=e=>e.ids?.root??`select:${e.id}`,ug=e=>e.ids?.content??`select:${e.id}:content`,dg=e=>e.ids?.trigger??`select:${e.id}:trigger`,fg=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,pg=e=>e.ids?.label??`select:${e.id}:label`,mg=e=>e.ids?.control??`select:${e.id}:control`,hg=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,gg=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,_g=e=>e.ids?.positioner??`select:${e.id}:positioner`,vg=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,yg=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,bg=e=>e.getById(gg(e)),xg=e=>e.getById(ug(e)),Sg=e=>e.getById(dg(e)),Cg=e=>e.getById(fg(e)),wg=e=>e.getById(_g(e)),Tg=(e,t)=>t==null?null:e.getById(hg(e,t));function Eg(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=r(`disabled`)||n.get(`fieldsetDisabled`),l=!!r(`invalid`),u=!!r(`required`),d=!!r(`readOnly`),f=r(`composite`),p=r(`collection`),m=a.hasTag(`open`),h=a.matches(`focused`),g=n.get(`highlightedValue`),_=n.get(`highlightedItem`),v=n.get(`selectedItems`),y=n.get(`currentPlacement`),b=o(`isTypingAhead`),x=o(`isInteractive`),S=g?hg(i,g):void 0;function C(e){let t=p.getItemDisabled(e.item),r=p.getItemValue(e.item);return Jl(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(c||t),highlighted:g===r,selected:n.get(`value`).includes(r)}}let ee=Em({...r(`positioning`),placement:y});return{open:m,focused:h,empty:n.get(`value`).length===0,highlightedItem:_,highlightedValue:g,selectedItems:v,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:p,multiple:!!r(`multiple`),disabled:!!c,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){Sg(i)?.focus({preventScroll:!0})},setOpen(e){a.hasTag(`open`)!==e&&s({type:e?`OPEN`:`CLOSE`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:p.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:C,getRootProps(){return t.element({...sg.root.attrs,dir:r(`dir`),id:lg(i),"data-invalid":Zl(l),"data-readonly":Zl(d)})},getLabelProps(){return t.label({dir:r(`dir`),id:pg(i),...sg.label.attrs,"data-disabled":Zl(c),"data-invalid":Zl(l),"data-readonly":Zl(d),"data-required":Zl(u),htmlFor:gg(i),onClick(e){e.defaultPrevented||c||Sg(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...sg.control.attrs,dir:r(`dir`),id:mg(i),"data-state":m?`open`:`closed`,"data-focus":Zl(h),"data-disabled":Zl(c),"data-invalid":Zl(l)})},getValueTextProps(){return t.element({...sg.valueText.attrs,dir:r(`dir`),"data-disabled":Zl(c),"data-invalid":Zl(l),"data-focus":Zl(h)})},getTriggerProps(){return t.button({id:dg(i),disabled:c,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":ug(i),"aria-expanded":m,"aria-haspopup":`listbox`,"data-state":m?`open`:`closed`,"aria-invalid":l,"aria-labelledby":pg(i),...sg.trigger.attrs,"data-disabled":Zl(c),"data-invalid":Zl(l),"data-readonly":Zl(d),"data-placement":y,"data-placeholder-shown":Zl(!o(`hasSelectedItems`)),onClick(e){x&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!x)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(b?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[Eu(e,{dir:r(`dir`),orientation:`vertical`})];if(t){t(e),e.preventDefault();return}sd.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...sg.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":m?`open`:`closed`,"data-disabled":Zl(c),"data-invalid":Zl(l),"data-readonly":Zl(d)})},getItemProps(n){let a=C(n);return t.element({id:hg(i,a.value),role:`option`,...sg.item.attrs,dir:r(`dir`),"data-value":a.value,"aria-selected":a.selected,"data-state":a.selected?`checked`:`unchecked`,"data-highlighted":Zl(a.highlighted),"data-disabled":Zl(a.disabled),"aria-disabled":Ql(a.disabled),onPointerMove(e){a.disabled||e.pointerType!==`mouse`||a.value!==g&&s({type:`ITEM.POINTER_MOVE`,value:a.value})},onClick(e){e.defaultPrevented||a.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:a.value})},onPointerLeave(t){a.disabled||n.persistFocus||t.pointerType!==`mouse`||!e.event.previous()?.type.includes(`POINTER`)||s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=C(e);return t.element({...sg.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":Zl(n.disabled),"data-highlighted":Zl(n.highlighted)})},getItemIndicatorProps(e){let n=C(e);return t.element({"aria-hidden":!0,...sg.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...sg.itemGroupLabel.attrs,id:yg(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...sg.itemGroup.attrs,"data-disabled":Zl(c),id:vg(i,n),"aria-labelledby":yg(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...sg.clearTrigger.attrs,id:fg(i),type:`button`,"aria-label":`Clear value`,"data-invalid":Zl(l),disabled:c,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0];return t.select({name:r(`name`),form:r(`form`),disabled:c,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:gg(i),defaultValue:a,style:ld,tabIndex:-1,onFocus(){Sg(i)?.focus({preventScroll:!0})},"aria-labelledby":pg(i)})},getPositionerProps(){return t.element({...sg.positioner.attrs,dir:r(`dir`),id:_g(i),style:ee.floating})},getContentProps(){return t.element({hidden:!m,dir:r(`dir`),id:ug(i),role:f?`listbox`:`dialog`,...sg.content.attrs,"data-state":m?`open`:`closed`,"data-placement":y,"data-activedescendant":S,"aria-activedescendant":f?S:void 0,"aria-multiselectable":r(`multiple`)&&f?!0:void 0,"aria-labelledby":pg(i),tabIndex:0,onKeyDown(e){if(!x||!ou(e.currentTarget,yu(e)))return;if(e.key===`Tab`&&!Ru(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){b?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[Eu(e)];if(n){n(e),e.preventDefault();return}au(yu(e))||sd.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...sg.list.attrs,tabIndex:0,role:f?void 0:`listbox`,"aria-labelledby":dg(i),"aria-activedescendant":f?void 0:S,"aria-multiselectable":!f&&r(`multiple`)?!0:void 0})}}}var{and:Dg,not:Og,or:kg}=_d(),Ag={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??cg.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:kl,onChange(t){let n=e(`collection`).findMany(t);return e(`onValueChange`)?.({value:t,items:n})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{let t=e(`value`)??e(`defaultValue`)??[];return{defaultValue:e(`collection`).findMany(t)}})}},refs(){return{typeahead:{...sd.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||!!t.get(`fieldsetDisabled`),isInteractive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),valueAsString:({context:e,prop:t})=>t(`collection`).stringifyItems(e.get(`selectedItems`))},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},entry:[`syncSelectElement`],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncCollection`])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`]},"CLEAR.CLICK":{actions:[`clearSelectedItems`,`focusTriggerEl`]}},effects:[`trackFormControlState`],states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{target:`open`,actions:[`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`,`highlightFirstSelectedItem`]}],"TRIGGER.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{guard:`isTriggerArrowUpEvent`,target:`open`,actions:[`setInitialFocus`,`highlightComputedLastItem`]},{guard:kg(`isTriggerArrowDownEvent`,`isTriggerEnterEvent`),target:`open`,actions:[`setInitialFocus`,`highlightComputedFirstItem`]},{target:`open`,actions:[`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}],"TRIGGER.BLUR":{target:`idle`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightFirstSelectedItem`]}],"TRIGGER.ENTER":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_UP":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedLastItem`]}],"TRIGGER.ARROW_DOWN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_LEFT":[{guard:Dg(Og(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:Og(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:Dg(Og(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:Og(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:Og(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:Og(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:Og(`multiple`),actions:[`selectMatchingItem`]}}},open:{tags:[`open`],exit:[`scrollContentToTop`],effects:[`trackDismissableElement`,`computePlacement`,`scrollToHighlightedItem`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`focused`,actions:[`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`clearHighlightedItem`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`restoreFocus`,target:`focused`,actions:[`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"ITEM.CLICK":[{guard:Dg(`closeOnSelect`,`isOpenControlled`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{actions:[`selectHighlightedItem`]}],"CONTENT.HOME":{actions:[`highlightFirstItem`]},"CONTENT.END":{actions:[`highlightLastItem`]},"CONTENT.ARROW_DOWN":[{guard:Dg(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:Dg(`hasHighlightedItem`,`loop`,`isFirstItemHighlighted`),actions:[`highlightLastItem`]},{guard:`hasHighlightedItem`,actions:[`highlightPreviousItem`]},{actions:[`highlightLastItem`]}],"CONTENT.TYPEAHEAD":{actions:[`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{loop:({prop:e})=>!!e(`loopFocus`),multiple:({prop:e})=>!!e(`multiple`),hasSelectedItems:({computed:e})=>!!e(`hasSelectedItems`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e(`closeOnSelect`)),restoreFocus:({event:e})=>jg(e),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.CLICK`,isTriggerEnterEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ENTER`,isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_UP`,isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_DOWN`},effects:{trackFormControlState({context:e,scope:t}){return Qte(bg(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>xg(e),i=!0;return Ym(r,{type:`listbox`,defer:!0,exclude:[Sg(e),Cg(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),wm(()=>Sg(n),()=>wg(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:r}){let i=i=>{let a=e.get(`highlightedValue`);if(a==null||r.current().type.includes(`POINTER`))return;let o=xg(n),s=t(`scrollToIndexFn`);if(s){let e=t(`collection`).indexOf(a);s?.({index:e,immediate:i,getElement:()=>Tg(n,a)});return}Ku(Tg(n,a),{rootEl:o,block:`nearest`})};return Bu(()=>i(!0)),Vu(()=>xg(n),{defer:!0,attributes:[`data-activedescendant`],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){wm(Sg(n),()=>wg(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){Bu(()=>{Lu({root:xg(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){jg(e)&&Bu(()=>{Sg(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r==null||!t(`collection`).has(r)||(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?Sl(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let r=t(`collection`).sort(e.get(`value`))[0];e.set(`highlightedValue`,r)},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?Sl(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>Tg(t,n)})}else xg(t)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){let r=bg(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`)){r.selectedIndex=-1;return}for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=n.findMany(e.get(`value`));e.set(`selectedItems`,i)},syncSelectedItems({context:e,prop:t}){let n=t(`collection`),r=e.get(`selectedItems`),i=e.get(`value`).map(e=>r.find(t=>n.getItemValue(t)===e)||n.find(e));e.set(`selectedItems`,i)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=bg(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(n)})}}}};function jg(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}wd()(`closeOnSelect.collection.composite.defaultHighlightedValue.defaultOpen.defaultValue.deselectable.dir.disabled.form.getRootNode.highlightedValue.id.ids.invalid.loopFocus.multiple.name.onFocusOutside.onHighlightChange.onInteractOutside.onOpenChange.onPointerDownOutside.onSelect.onValueChange.open.positioning.readOnly.required.scrollToIndexFn.value`.split(`.`)),wd()([`item`,`persistFocus`]),wd()([`id`]),wd()([`htmlFor`]);var Mg=(e,t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=yh(),o=Nd(Ag,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,hiddenSelect:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,value:o.modelValue,getRootNode:r?.value.getRootNode,...Zd(o),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onHighlightChange:e=>{t?.(`highlightChange`,e),t?.(`update:highlightedValue`,e.highlightedValue),o.onHighlightChange?.(e)},onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),o.onOpenChange?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),o.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),o.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),o.onPointerDownOutside?.(e)},onSelect(e){t?.(`select`,e),o.onSelect?.(e)}}}));return U(()=>Eg(o,kd))},Ng=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:Lh,Content:Rh,Context:zh,Control:Bh,HiddenSelect:Uh,Indicator:Wh,Item:ng,ItemContext:qh,ItemGroup:Zh,ItemGroupLabel:Xh,ItemIndicator:eg,ItemText:tg,Label:rg,List:ig,Positioner:ag,Root:M({__name:`select-root`,props:Xi({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:[`focusOutside`,`highlightChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`select`,`valueChange`,`update:modelValue`,`update:open`,`update:highlightedValue`],setup(e,{emit:t}){let n=e,r=Mg(n,t);return Fh(r),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:og,Trigger:M({__name:`select-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=Ih();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueText:M({__name:`select-value-text`,props:{placeholder:{},asChild:{type:Boolean}},setup(e){let t=e,n=Ih(),r=qi();return G(),(e,i)=>(F(),L(k(W).span,H(k(n).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(r.default?.()||k(n).valueAsString||t.placeholder),1)])]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),[Pg,Fg]=hl(`TooltipContext`),Ig=M({__name:`tooltip-arrow-tip`,props:{asChild:{type:Boolean}},setup(e){let t=Fg();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowTipProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Lg=M({__name:`tooltip-arrow`,props:{asChild:{type:Boolean}},setup(e){let t=Fg();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Rg=M({__name:`tooltip-content`,props:{asChild:{type:Boolean}},setup(e){let t=Fg(),n=Ah(),r=U(()=>gd(t.value.getContentProps(),n.value.presenceProps));return G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zg=M({__name:`tooltip-context`,setup(e){let t=Fg();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Bg=M({__name:`tooltip-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=Fg(),n=Qm(),r=Ph(U(()=>({...n.value,present:t.value.open})));return kh(r),G(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Vg=M({__name:`tooltip-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){let t=e;return Pg(U(()=>t.value)),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),Hg=Wd(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build(),Ug=e=>e.ids?.trigger??`tooltip:${e.id}:trigger`,dne=e=>e.ids?.content??`tooltip:${e.id}:content`,fne=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,Wg=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,Gg=e=>e.getById(Ug(e)),Kg=e=>e.getById(Wg(e)),qg=_te({id:null});function pne(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=Ug(a),f=dne(a),p=o(`disabled`),m=Em({...o(`positioning`),placement:r.get(`currentPlacement`)});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(){return t.button({...Hg.trigger.attrs,id:d,dir:o(`dir`),"data-expanded":Zl(u),"data-state":u?`open`:`closed`,"aria-describedby":u?f:void 0,onClick(e){e.defaultPrevented||p||o(`closeOnClick`)&&i({type:`close`,src:`trigger.click`})},onFocus(e){queueMicrotask(()=>{e.defaultPrevented||p||s.src!==`trigger.pointerdown`&&gh()&&i({type:`open`,src:`trigger.focus`})})},onBlur(e){e.defaultPrevented||p||c===qg.get(`id`)&&i({type:`close`,src:`trigger.blur`})},onPointerDown(e){e.defaultPrevented||p||Cu(e)&&o(`closeOnPointerDown`)&&c===qg.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`})},onPointerMove(e){e.defaultPrevented||p||e.pointerType!==`touch`&&i({type:`pointer.move`})},onPointerLeave(){p||i({type:`pointer.leave`})},onPointerCancel(){p||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:fne(a),...Hg.arrow.attrs,dir:o(`dir`),style:m.arrow})},getArrowTipProps(){return t.element({...Hg.arrowTip.attrs,dir:o(`dir`),style:m.arrowTip})},getPositionerProps(){return t.element({id:Wg(a),...Hg.positioner.attrs,dir:o(`dir`),style:m.floating})},getContentProps(){return t.element({...Hg.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,role:l?void 0:`tooltip`,id:l?void 0:f,"data-placement":r.get(`currentPlacement`),onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:mne,not:Jg}=_d(),hne={initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{id:`x`,openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:mne(`noVisibleTooltip`,Jg(`hasPointerMoveOpened`)),target:`opening`},{guard:Jg(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>qg.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===qg.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{qg.set(`id`,e(`id`))},clearGlobalId:({prop:e})=>{e(`id`)===qg.get(`id`)&&qg.set(`id`,null)},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>t.type===`positioning.set`?wm(Gg(r),()=>Kg(r),{...n(`positioning`),...t.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}}):void 0,toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,!0)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,!1)}},effects:{trackFocusVisible:({scope:e})=>_h({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),wm(Gg(n),()=>Kg(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>Ou(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n})=>{if(!t(`closeOnScroll`))return;let r=Gg(n);if(!r)return;let i=Wu(r).map(t=>Ou(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{i.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=qg.subscribe(()=>{qg.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?Ou(document,`keydown`,t=>{Su(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t})=>{let n=setTimeout(()=>{e({type:`after.openDelay`})},t(`openDelay`));return()=>clearTimeout(n)},waitForCloseDelay:({send:e,prop:t})=>{let n=setTimeout(()=>{e({type:`after.closeDelay`})},t(`closeDelay`));return()=>clearTimeout(n)}}}};wd()([`aria-label`,`closeDelay`,`closeOnEscape`,`closeOnPointerDown`,`closeOnScroll`,`closeOnClick`,`dir`,`disabled`,`getRootNode`,`id`,`ids`,`interactive`,`onOpenChange`,`defaultOpen`,`open`,`openDelay`,`positioning`]);var gne=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(hne,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...Zd(a),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)}}}));return U(()=>pne(a,kd))},Yg=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Lg,ArrowTip:Ig,Content:Rg,Context:zg,Positioner:Bg,Root:M({__name:`tooltip-root`,props:Xi({"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnClick:void 0,closeOnEscape:void 0,closeOnPointerDown:void 0,closeOnScroll:void 0,defaultOpen:void 0,disabled:void 0,interactive:void 0,open:void 0}),emits:[`openChange`,`update:open`],setup(e,{emit:t}){let n=e;return Pg(gne(n,t)),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),RootProvider:Vg,Trigger:M({__name:`tooltip-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=Fg();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`}));function Xg(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&`_default`in e}function Zg(e,t){return Xg(e)?(t===`fit`&&(t=`_default`),e[t]===void 0?e._default:e[t]):e}function _ne(e,t,n){let r=Xg(e)?{...e}:{_default:e};return t===`fit`&&(t=`_default`),r[t]=n,r}function vne(e,t){return!Xg(e)||t===`fit`||t===`_default`?!1:t in e}function yne(e,t){if(t===`_default`||t===`fit`)return e;let{[t]:n,...r}=e;return r}function Qg(e){return e&&typeof e==`object`&&(e.setup||e.render||e.__vccOpts||e.name||e.__v_skip)}function $g(e){return typeof e==`string`}function e_(e){return typeof e==`function`&&!Qg(e)}function bne(e){return`field`in e&&`operator`in e}function xne(e){return`and`in e||`or`in e}function Sne(e,t,n){let{field:r,operator:i,value:a}=e,o=t?.[r];switch(n&&Xg(o)&&(o=Zg(o,n)),i){case`equals`:return o===a;case`not_equals`:return o!==a;case`in`:return Array.isArray(a)?a.includes(o):!1;case`not_in`:return Array.isArray(a)?!a.includes(o):!0;case`contains`:return Array.isArray(o)||typeof o==`string`&&typeof a==`string`?o.includes(a):!1;case`greater_than`:{let e=Number(o),t=Number(a);return!Number.isFinite(e)||!Number.isFinite(t)?!1:e>t}case`less_than`:{let e=Number(o),t=Number(a);return!Number.isFinite(e)||!Number.isFinite(t)?!1:et_(e,t,n));if(!e||typeof e!=`object`)return!0;if(xne(e)){if(e.and)return Array.isArray(e.and)?e.and.every(e=>t_(e,t,n)):!0;if(e.or)return Array.isArray(e.or)?e.or.some(e=>t_(e,t,n)):!1}return bne(e)?Sne(e,t,n):!0}function n_(){let e=or(ml);if(!e)throw Error(`useUI must be used within a component that has access to CraftileEditor`);return{toaster:e.ui.toaster,sidebarPanels:U(()=>Array.from(e.ui.state.sidebarPanels.values()).sort((e,t)=>(e.order??0)-(t.order??0))),activeSidebarPanel:U(()=>e.ui.state.activeSidebarPanel),registerSidebarPanel:e.ui.registerSidebarPanel.bind(e.ui),removeSidebarPanel:e.ui.removeSidebarPanel.bind(e.ui),setActiveSidebarPanel:t=>{e.ui.state.activeSidebarPanel=t},headerActions:U(()=>Array.from(e.ui.state.headerActions.values()).sort((e,t)=>(e.order??0)-(t.order??0))),registerHeaderAction:e.ui.registerHeaderAction.bind(e.ui),removeHeaderAction:e.ui.removeHeaderAction.bind(e.ui),configurationPanels:U(()=>Array.from(e.ui.state.configurationPanels.values()).sort((e,t)=>(e.order??0)-(t.order??0))),registerConfigurationPanel:e.ui.registerConfigurationPanel.bind(e.ui),removeConfigurationPanel:e.ui.removeConfigurationPanel.bind(e.ui),modals:U(()=>e.ui.state.modals),openModals:U(()=>e.ui.state.openModals),openModal:e.ui.openModal.bind(e.ui),closeModal:e.ui.closeModal.bind(e.ui),propertyFields:U(()=>e.ui.state.propertyFields),registerPropertyField:e.ui.registerPropertyField.bind(e.ui),removePropertyField:e.ui.removePropertyField.bind(e.ui),keyboardShortcuts:U(()=>e.ui.state.keyboardShortcuts),registerKeyboardShortcut:e.ui.registerKeyboardShortcut.bind(e.ui),removeKeyboardShortcut:e.ui.removeKeyboardShortcut.bind(e.ui)}}function r_(){let e=or(ml);if(!e)throw Error(`useDeviceMode must be used within a component that has access to CraftileEditor`);return{currentDevice:U(()=>e.devices.state.currentDevice),currentDeviceData:U(()=>e.devices.getCurrentDeviceData()),savedCustomDevices:U(()=>e.devices.state.savedCustomDevices),devicePresets:e.devices.devicePresets,setDeviceMode:t=>e.devices.setDeviceMode(t),addCustomDevice:t=>e.devices.addCustomDevice(t),removeCustomDevice:t=>e.devices.removeCustomDevice(t),getAllDevices:()=>e.devices.getAllDevices()}}var Cne=[`type`,`disabled`],wne={key:0,class:`animate-spin h-4 w-4 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`},i_=M({__name:`Button`,props:{variant:{default:`default`},size:{default:`md`},type:{default:`button`},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},square:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(e){let t={default:`bg-white text-gray-900 hover:bg-gray-50 border border-gray-200`,primary:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/90`,accent:`bg-accent text-accent-foreground hover:bg-accent/90`,sutble:`bg-accent-foreground text-accent`,destructive:`bg-red-600 text-white hover:bg-red-700`},n={sm:`h-6 px-3 text-xs`,md:`h-8 px-4`,lg:`h-10 px-6 text-base`},r={sm:`w-6 h-6 text-xs p-0`,md:`w-8 h-8 p-0`,lg:`w-10 h-10 text-base p-0`},i=e,a=U(()=>i.disabled||i.loading);return(e,o)=>(F(),I(`button`,{class:ke([`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none cursor-pointer relative`,[t[e.variant],i.square?r[e.size]:n[e.size],e.fullWidth&&`w-full`]]),type:e.type,disabled:k(a)},[e.loading?(F(),I(`svg`,wne,[...o[0]||=[R(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),R(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`},null,-1)]])):V(``,!0),R(`span`,{class:ke([`inline-flex items-center gap-2`,{invisible:e.loading}])},[N(e.$slots,`default`)],2)],10,Cne))}}),Tne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ene(e,t){return F(),I(`svg`,Tne,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M10.5 19.5h3m-6.75 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-15a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 4.5v15a2.25 2.25 0 0 0 2.25 2.25`},null,-1)]])}var a_=D({name:`heroicons-device-tablet`,render:Ene}),Dne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function One(e,t){return F(),I(`svg`,Dne,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25`},null,-1)]])}var o_=D({name:`heroicons-computer-desktop`,render:One}),kne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ane(e,t){return F(),I(`svg`,kne,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3`},null,-1)]])}var s_=D({name:`heroicons-device-phone-mobile`,render:Ane}),jne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mne(e,t){return F(),I(`svg`,jne,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m15 15l6-6m0 0l-6-6m6 6H9a6 6 0 0 0 0 12h3`},null,-1)]])}var c_=D({name:`heroicons-arrow-uturn-right`,render:Mne}),l_=M({__name:`PropertyFieldRenderWrapper`,props:{renderFn:{type:Function},field:{},value:{},onChange:{type:Function},onBlur:{type:Function},class:{}},setup(e){let t=e,n=O(),r=()=>{if(n.value&&t.renderFn){n.value.innerHTML=``;let e=t.renderFn({field:t.field,value:t.value,onChange:t.onChange,onBlur:t.onBlur});n.value.appendChild(e)}};return Ei(()=>{r()}),pr(()=>t.value,()=>{r()}),(e,r)=>(F(),I(`div`,{ref_key:`containerRef`,ref:n,class:ke(t.class)},null,2))}}),Nne={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pne(e,t){return F(),I(`svg`,Nne,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m4.5 12.75l6 6l9-13.5`},null,-1)]])}var Fne=D({name:`heroicons-check`,render:Pne}),Ine=M({__name:`Tooltip`,props:{title:{}},setup(e){return(e,t)=>(F(),L(k(Yg).Root,{"open-delay":100,positioning:{placement:`top`}},{default:j(()=>[z(k(Yg).Trigger,null,{default:j(()=>[N(e.$slots,`default`)]),_:3}),z(k(Yg).Positioner,null,{default:j(()=>[z(k(Yg).Content,{class:`relative w-max bg-white border border-gray-300/60 rounded-md shadow-sm text-sm font-medium px-2 py-1 text-gray-700 data-[state=open]:animate-enter data-[state=closed]:animate-exit`},{default:j(()=>[z(k(Yg).Arrow,{style:{"--arrow-size":`12px`,"--arrow-background":`white`}},{default:j(()=>[z(k(Yg).ArrowTip,{class:`border-l border-t border-gray-300/60`})]),_:1}),B(` `+E(e.title),1)]),_:1})]),_:1})]),_:3}))}}),Lne={class:`relative`},Rne={class:`flex items-center justify-end gap-3 absolute right-0 top-0 z-5`},zne={key:2,class:`mb-4 p-3 bg-red-50 border border-red-200 rounded-md`},Bne={class:`text-sm text-red-600`},Vne={class:`font-mono`},Hne=M({__name:`ResponsivePropertyField`,props:{field:{},modelValue:{},currentDevice:{},availableDevices:{}},emits:[`update:modelValue`,`changeDevice`],setup(e,{emit:t}){let n=e,r=t,i={desktop:o_,tablet:a_,mobile:s_},a=e=>i[e||`desktop`]||o_,o=U(()=>n.availableDevices.find(e=>e.id===n.currentDevice)||n.availableDevices[0]),s=U(()=>vne(n.modelValue,n.currentDevice)),c=U(()=>Zg(n.modelValue,n.currentDevice)),l=e=>{r(`update:modelValue`,_ne(n.modelValue,n.currentDevice,e))},u=()=>{Xg(n.modelValue)&&r(`update:modelValue`,yne(n.modelValue,n.currentDevice))},d=e=>{let[t]=e.value;t&&t!==n.currentDevice&&r(`changeDevice`,t)},f=U(()=>Oh({items:n.availableDevices.map(e=>({label:e.label,value:e.id,icon:e.icon}))})),{propertyFields:p}=n_(),m=U(()=>p.value.get(n.field.type)?.render);return(e,t)=>{let n=c_,r=Ine,i=Fne,p=l_;return F(),I(`div`,Lne,[R(`div`,Rne,[z(r,{title:`Reset to default value`},{default:j(()=>[k(s)?(F(),I(`button`,{key:0,onClick:u,class:`hover:text-gray-600 text-gray-400 transition-colors cursor-pointer`},[z(n,{class:`w-3 h-3 rotate-180`})])):V(``,!0)]),_:1}),k(s)?(F(),L(r,{key:0,title:`Customized for this breakpoint`},{default:j(()=>[...t[0]||=[R(`div`,{class:`size-1.5 bg-green-800 rotate-45`},null,-1)]]),_:1})):V(``,!0),z(k(Ng).Root,{"model-value":[e.currentDevice],collection:k(f),onValueChange:d,positioning:{strategy:`fixed`,placement:`bottom-end`}},{default:j(()=>[z(k(Ng).Trigger,{class:`flex items-center gap-1 relative`},{default:j(()=>[(F(),L(Ri(a(k(o).icon)),{class:`w-4 h-4 text-gray-600`}))]),_:1}),(F(),L(Tr,{to:`.__craftile`},[z(k(Ng).Positioner,{class:``},{default:j(()=>[z(k(Ng).Content,{class:`bg-white border border-gray-200 rounded-lg shadow-lg p-1 min-w-[160px] z-50`},{default:j(()=>[(F(!0),I(P,null,Vi(k(f).items,e=>(F(),L(k(Ng).Item,{key:e.value,item:e,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded cursor-pointer data-[state=checked]:bg-accent/10 data-[state=checked]:text-accent`},{default:j(()=>[z(k(Ng).ItemText,{class:`flex items-center gap-2`},{default:j(()=>[(F(),L(Ri(a(e.icon)),{class:`w-4 h-4`})),B(` `+E(e.label),1)]),_:2},1024),z(k(Ng).ItemIndicator,{class:`ml-auto`},{default:j(()=>[z(i,{class:`w-4 h-4 text-accent`})]),_:1})]),_:2},1032,[`item`]))),128))]),_:1})]),_:1})]))]),_:1},8,[`model-value`,`collection`])]),R(`div`,null,[k(Qg)(k(m))||k($g)(k(m))?(F(),L(Ri(k(m)),{key:0,field:e.field,"model-value":k(c),"onUpdate:modelValue":l},null,8,[`field`,`model-value`])):k(e_)(k(m))?(F(),L(p,{key:1,"render-fn":k(m),field:e.field,value:k(c),"on-change":l},null,8,[`render-fn`,`field`,`value`])):(F(),I(`div`,zne,[R(`p`,Bne,[t[1]||=B(` Unknown field type: `,-1),R(`code`,Vne,E(e.field.type),1)])]))])])}}}),Une={key:1},Wne={key:2,class:`mb-4 p-3 bg-red-50 border border-red-200 rounded-md`},Gne={class:`text-sm text-red-600`},Kne={class:`font-mono`},qne={key:2,class:`text-[0.625rem] text-gray-500 mt-1 italic`},u_=M({__name:`PropertyField`,props:{field:{},modelValue:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{propertyFields:i}=n_(),{currentDevice:a,devicePresets:o,setDeviceMode:s}=r_(),c=U(()=>[{id:`_default`,label:`All devices`,width:0,icon:`desktop`},...o.filter(e=>e.id!==`fit`)]),l=U(()=>a.value===`fit`?`_default`:a.value),u=U(()=>i.value.get(n.field.type)?.render),d=e=>{r(`update:modelValue`,e)},f=e=>{s(e===`_default`?`fit`:e)};return(e,t)=>{let n=l_;return F(),I(`div`,null,[e.field.responsive?(F(),L(Hne,{key:0,field:e.field,"model-value":e.modelValue,"current-device":k(l),"available-devices":k(c),"onUpdate:modelValue":d,onChangeDevice:f},null,8,[`field`,`model-value`,`current-device`,`available-devices`])):(F(),I(`div`,Une,[k(Qg)(k(u))||k($g)(k(u))?(F(),L(Ri(k(u)),{key:0,field:e.field,"model-value":e.modelValue,"onUpdate:modelValue":d},null,8,[`field`,`model-value`])):k(e_)(k(u))?(F(),L(n,{key:1,"render-fn":k(u),field:e.field,value:e.modelValue,"on-change":d},null,8,[`render-fn`,`field`,`value`])):(F(),I(`div`,Wne,[R(`p`,Gne,[t[0]||=B(` Unknown field type: `,-1),R(`code`,Kne,E(e.field.type),1)])]))])),e.field.info?(F(),I(`p`,qne,E(e.field.info),1)):V(``,!0)])}}});(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.__craftile [data-scope=toast][data-part=root]{--toast-bg: #ffffff;--toast-fg: var(--color-gray-800);--toast-border: var(--color-gray-200);--toast-trigger-bg: var(--color-gray-100);--toast-trigger-border: var(--color-gray-300);min-width:22rem;max-width:26rem;display:flex;gap:.75rem;align-items:flex-start;position:relative;padding:.875rem 2.25rem .875rem 1rem;border-radius:.625rem;border:1px solid var(--toast-border);background:var(--toast-bg);color:var(--toast-fg);box-shadow:0 4px 12px #00000014,0 0 1px #0000002e;translate:var(--x) var(--y);scale:var(--scale);z-index:var(--z-index);height:var(--height);opacity:var(--opacity);will-change:translate,opacity,scale;transition:translate .4s cubic-bezier(.21,1.02,.73,1),scale .4s cubic-bezier(.21,1.02,.73,1),opacity .4s cubic-bezier(.21,1.02,.73,1),height .4s cubic-bezier(.21,1.02,.73,1),box-shadow .2s}.__craftile [data-scope=toast][data-part=root][data-state=closed]{transition:translate .4s cubic-bezier(.06,.71,.55,1),scale .4s cubic-bezier(.06,.71,.55,1),opacity .2s cubic-bezier(.06,.71,.55,1)}.__craftile [data-scope=toast][data-part=root][data-type=success],.__craftile [data-scope=toast][data-part=root][data-type=error],.__craftile [data-scope=toast][data-part=root][data-type=warning]{--toast-fg: #ffffff;--toast-border: transparent;--toast-trigger-bg: rgb(255 255 255 / .15);--toast-trigger-border: rgb(255 255 255 / .4)}.__craftile [data-scope=toast][data-part=root][data-type=success]{--toast-bg: #16a34a}.__craftile [data-scope=toast][data-part=root][data-type=error]{--toast-bg: #dc2626}.__craftile [data-scope=toast][data-part=root][data-type=warning]{--toast-bg: #ea580c}.__craftile .toast-content{flex:1 1 auto;min-width:0}.__craftile .toast-action{display:inline-flex;align-items:center;padding:.25rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem;border-radius:.3125rem;border:1px solid var(--toast-trigger-border);background:transparent;color:inherit;cursor:pointer;transition:background .15s,border-color .15s}.__craftile .toast-action:hover{background:var(--toast-trigger-bg)}.__craftile .toast-close{position:absolute;top:.5rem;inset-inline-end:.5rem;width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;color:inherit;opacity:.65;border-radius:.3125rem;background:transparent;cursor:pointer;transition:opacity .15s,background .15s}.__craftile .toast-close:hover{opacity:1;background:var(--toast-trigger-bg)}/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{.__craftile,.__craftile :host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-green-800:oklch(44.8% .119 151.328);--color-blue-500:oklch(62.3% .214 259.815);--color-slate-400:oklch(70.4% .04 256.788);--color-gray-50:var(--color-gray-50,oklch(98.5% 0 0));--color-gray-100:var(--color-gray-100,oklch(96.7% .001 286.375));--color-gray-200:var(--color-gray-200,oklch(92% .004 286.32));--color-gray-300:var(--color-gray-300,oklch(87.1% .006 286.286));--color-gray-400:var(--color-gray-400,oklch(70.5% .015 286.067));--color-gray-500:var(--color-gray-500,oklch(55.2% .016 285.938));--color-gray-600:var(--color-gray-600,oklch(44.2% .017 285.786));--color-gray-700:var(--color-gray-700,oklch(37% .013 285.805));--color-gray-800:var(--color-gray-800,oklch(37% .013 285.805));--color-gray-900:var(--color-gray-900,oklch(37% .013 285.805));--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--leading-snug:1.375;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:var(--color-primary,oklch(14.7% .004 49.25));--color-primary-foreground:var(--color-primary-foreground,oklch(98.5% 0 0));--color-secondary:var(--color-secondary,oklch(92% .004 286.32));--color-secondary-foreground:var(--color-secondary-foreground,oklch(37% .013 285.805));--color-accent:var(--color-accent,oklch(54.6% .245 262.881));--color-accent-foreground:var(--color-accent-foreground,oklch(93.2% .032 255.585));--animate-enter:enter .1s ease-out;--animate-exit:exit .1s ease-out}}@layer base{.__craftile *,.__craftile :after,.__craftile :before,.__craftile ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.__craftile ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.__craftile,.__craftile :host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}.__craftile hr{height:0;color:inherit;border-top-width:1px}.__craftile abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.__craftile h1,.__craftile h2,.__craftile h3,.__craftile h4,.__craftile h5,.__craftile h6{font-size:inherit;font-weight:inherit}.__craftile a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.__craftile b,.__craftile strong{font-weight:bolder}.__craftile code,.__craftile kbd,.__craftile samp,.__craftile pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}.__craftile small{font-size:80%}.__craftile sub,.__craftile sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.__craftile sub{bottom:-.25em}.__craftile sup{top:-.5em}.__craftile table{text-indent:0;border-color:inherit;border-collapse:collapse}.__craftile :-moz-focusring{outline:auto}.__craftile progress{vertical-align:baseline}.__craftile summary{display:list-item}.__craftile ol,.__craftile ul,.__craftile menu{list-style:none}.__craftile img,.__craftile svg,.__craftile video,.__craftile canvas,.__craftile audio,.__craftile iframe,.__craftile embed,.__craftile object{vertical-align:middle;display:block}.__craftile img,.__craftile video{max-width:100%;height:auto}.__craftile button,.__craftile input,.__craftile select,.__craftile optgroup,.__craftile textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.__craftile ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.__craftile :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.__craftile :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.__craftile ::file-selector-button{margin-inline-end:4px}.__craftile ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.__craftile ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.__craftile ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.__craftile textarea{resize:vertical}.__craftile ::-webkit-search-decoration{-webkit-appearance:none}.__craftile ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.__craftile ::-webkit-datetime-edit{display:inline-flex}.__craftile ::-webkit-datetime-edit-fields-wrapper{padding:0}.__craftile ::-webkit-datetime-edit{padding-block:0}.__craftile ::-webkit-datetime-edit-year-field{padding-block:0}.__craftile ::-webkit-datetime-edit-month-field{padding-block:0}.__craftile ::-webkit-datetime-edit-day-field{padding-block:0}.__craftile ::-webkit-datetime-edit-hour-field{padding-block:0}.__craftile ::-webkit-datetime-edit-minute-field{padding-block:0}.__craftile ::-webkit-datetime-edit-second-field{padding-block:0}.__craftile ::-webkit-datetime-edit-millisecond-field{padding-block:0}.__craftile ::-webkit-datetime-edit-meridiem-field{padding-block:0}.__craftile ::-webkit-calendar-picker-indicator{line-height:1}.__craftile :-moz-ui-invalid{box-shadow:none}.__craftile button,.__craftile input:where([type=button],[type=reset],[type=submit]){appearance:button}.__craftile ::file-selector-button{appearance:button}.__craftile ::-webkit-inner-spin-button{height:auto}.__craftile ::-webkit-outer-spin-button{height:auto}.__craftile [hidden]:where(:not([hidden=until-found])){display:none!important}.__craftile *,.__craftile :after,.__craftile :before,.__craftile ::backdrop{border-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile ::file-selector-button{border-color:var(--color-gray-200,oklch(92% .004 286.32))}}@layer components{.__craftile .ghost-block{border-radius:var(--radius-md);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:2px;border-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .ghost-block{border-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))80%,transparent)}}.__craftile .ghost-block{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .ghost-block{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))20%,transparent)}}.__craftile .ghost-block{opacity:.3}.__craftile .property-field-enter-active,.__craftile .property-field-leave-active{transition:all .2s;overflow:hidden}.__craftile .property-field-enter-from,.__craftile .property-field-leave-to{opacity:0;max-height:0}.__craftile .property-field-enter-to,.__craftile .property-field-leave-from{opacity:1;max-height:200px}}@layer utilities{.__craftile .pointer-events-auto{pointer-events:auto}.__craftile .pointer-events-none{pointer-events:none}.__craftile .invisible{visibility:hidden}.__craftile .visible{visibility:visible}.__craftile .sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.__craftile .absolute{position:absolute}.__craftile .fixed{position:fixed}.__craftile .relative{position:relative}.__craftile .static{position:static}.__craftile .inset-0{inset:calc(var(--spacing)*0)}.__craftile .-top-2{top:calc(var(--spacing)*-2)}.__craftile .-top-\\[18\\.5px\\]{top:-18.5px}.__craftile .-top-\\[19px\\]{top:-19px}.__craftile .top-0{top:calc(var(--spacing)*0)}.__craftile .top-1\\/2{top:50%}.__craftile .top-4{top:calc(var(--spacing)*4)}.__craftile .-right-2{right:calc(var(--spacing)*-2)}.__craftile .right-0{right:calc(var(--spacing)*0)}.__craftile .right-4{right:calc(var(--spacing)*4)}.__craftile .-bottom-2{bottom:calc(var(--spacing)*-2)}.__craftile .-left-2{left:calc(var(--spacing)*-2)}.__craftile .-left-\\[1px\\]{left:-1px}.__craftile .left-0{left:calc(var(--spacing)*0)}.__craftile .left-1\\/2{left:50%}.__craftile .\\!z-10{z-index:10!important}.__craftile .\\!z-\\[1100\\]{z-index:1100!important}.__craftile .z-5{z-index:5}.__craftile .z-10{z-index:10}.__craftile .z-50{z-index:50}.__craftile .z-\\[1000\\]{z-index:1000}.__craftile .container{width:100%}@media (min-width:40rem){.__craftile .container{max-width:40rem}}@media (min-width:48rem){.__craftile .container{max-width:48rem}}@media (min-width:64rem){.__craftile .container{max-width:64rem}}@media (min-width:80rem){.__craftile .container{max-width:80rem}}@media (min-width:96rem){.__craftile .container{max-width:96rem}}.__craftile .m-0{margin:calc(var(--spacing)*0)}.__craftile .mx-0{margin-inline:calc(var(--spacing)*0)}.__craftile .mx-2{margin-inline:calc(var(--spacing)*2)}.__craftile .mx-auto{margin-inline:auto}.__craftile .my-1{margin-block:calc(var(--spacing)*1)}.__craftile .my-2{margin-block:calc(var(--spacing)*2)}.__craftile .mt-0{margin-top:calc(var(--spacing)*0)}.__craftile .mt-1{margin-top:calc(var(--spacing)*1)}.__craftile .mt-2{margin-top:calc(var(--spacing)*2)}.__craftile .mt-4{margin-top:calc(var(--spacing)*4)}.__craftile .mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.__craftile .mr-1{margin-right:calc(var(--spacing)*1)}.__craftile .mb-1{margin-bottom:calc(var(--spacing)*1)}.__craftile .mb-2{margin-bottom:calc(var(--spacing)*2)}.__craftile .mb-3{margin-bottom:calc(var(--spacing)*3)}.__craftile .mb-4{margin-bottom:calc(var(--spacing)*4)}.__craftile .ml-3{margin-left:calc(var(--spacing)*3)}.__craftile .ml-auto{margin-left:auto}.__craftile .box-border{box-sizing:border-box}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .hidden{display:none}.__craftile .inline-flex{display:inline-flex}.__craftile .aspect-square{aspect-ratio:1}.__craftile .size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.__craftile .h-1\\.5{height:calc(var(--spacing)*1.5)}.__craftile .h-3{height:calc(var(--spacing)*3)}.__craftile .h-3\\.5{height:calc(var(--spacing)*3.5)}.__craftile .h-4{height:calc(var(--spacing)*4)}.__craftile .h-5{height:calc(var(--spacing)*5)}.__craftile .h-6{height:calc(var(--spacing)*6)}.__craftile .h-8{height:calc(var(--spacing)*8)}.__craftile .h-10{height:calc(var(--spacing)*10)}.__craftile .h-12{height:calc(var(--spacing)*12)}.__craftile .h-14{height:calc(var(--spacing)*14)}.__craftile .h-16{height:calc(var(--spacing)*16)}.__craftile .h-\\[2px\\]{height:2px}.__craftile .h-\\[520px\\]{height:520px}.__craftile .h-full{height:100%}.__craftile .h-px{height:1px}.__craftile .max-h-\\[90vh\\]{max-height:90vh}.__craftile .max-h-\\[calc\\(100vh-2rem\\)\\]{max-height:calc(100vh - 2rem)}.__craftile .w-0{width:calc(var(--spacing)*0)}.__craftile .w-3{width:calc(var(--spacing)*3)}.__craftile .w-3\\.5{width:calc(var(--spacing)*3.5)}.__craftile .w-4{width:calc(var(--spacing)*4)}.__craftile .w-5{width:calc(var(--spacing)*5)}.__craftile .w-6{width:calc(var(--spacing)*6)}.__craftile .w-8{width:calc(var(--spacing)*8)}.__craftile .w-10{width:calc(var(--spacing)*10)}.__craftile .w-12{width:calc(var(--spacing)*12)}.__craftile .w-14{width:calc(var(--spacing)*14)}.__craftile .w-16{width:calc(var(--spacing)*16)}.__craftile .w-60{width:calc(var(--spacing)*60)}.__craftile .w-72{width:calc(var(--spacing)*72)}.__craftile .w-75{width:calc(var(--spacing)*75)}.__craftile .w-\\[640px\\]{width:640px}.__craftile .w-full{width:100%}.__craftile .w-max{width:max-content}.__craftile .max-w-2xl{max-width:var(--container-2xl)}.__craftile .max-w-\\[120px\\]{max-width:120px}.__craftile .max-w-\\[calc\\(100vw-2rem\\)\\]{max-width:calc(100vw - 2rem)}.__craftile .max-w-full{max-width:100%}.__craftile .max-w-lg{max-width:var(--container-lg)}.__craftile .max-w-md{max-width:var(--container-md)}.__craftile .max-w-sm{max-width:var(--container-sm)}.__craftile .max-w-xl{max-width:var(--container-xl)}.__craftile .max-w-xs{max-width:var(--container-xs)}.__craftile .min-w-0{min-width:calc(var(--spacing)*0)}.__craftile .min-w-\\[160px\\]{min-width:160px}.__craftile .min-w-\\[180px\\]{min-width:180px}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .shrink-0{flex-shrink:0}.__craftile .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .rotate-45{rotate:45deg}.__craftile .rotate-90{rotate:90deg}.__craftile .rotate-180{rotate:180deg}.__craftile .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.__craftile .animate-spin{animation:var(--animate-spin)}.__craftile .cursor-grab{cursor:grab}.__craftile .cursor-pointer{cursor:pointer}.__craftile .resize{resize:both}.__craftile .flex-col{flex-direction:column}.__craftile .flex-wrap{flex-wrap:wrap}.__craftile .items-center{align-items:center}.__craftile .items-start{align-items:flex-start}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .justify-end{justify-content:flex-end}.__craftile .gap-0\\.5{gap:calc(var(--spacing)*.5)}.__craftile .gap-1{gap:calc(var(--spacing)*1)}.__craftile .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.__craftile .gap-2{gap:calc(var(--spacing)*2)}.__craftile .gap-3{gap:calc(var(--spacing)*3)}.__craftile :where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.__craftile .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.__craftile .overflow-auto{overflow:auto}.__craftile .overflow-hidden{overflow:hidden}.__craftile .overflow-y-auto{overflow-y:auto}.__craftile .overflow-y-hidden{overflow-y:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .rounded-xs{border-radius:var(--radius-xs)}.__craftile .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-0{border-style:var(--tw-border-style);border-width:0}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.__craftile .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-dashed{--tw-border-style:dashed;border-style:dashed}.__craftile .border-solid{--tw-border-style:solid;border-style:solid}.__craftile .border-\\[none\\]{border-color:none}.__craftile .border-blue-500{border-color:var(--color-blue-500)}.__craftile .border-gray-100{border-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .border-gray-200{border-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .border-gray-300\\/60{border-color:var(--color-gray-300,oklch(87.1% .006 286.286))}@supports (color:color-mix(in lab,red,red)){.__craftile .border-gray-300\\/60{border-color:color-mix(in oklab,var(--color-gray-300,oklch(87.1% .006 286.286))60%,transparent)}}.__craftile .border-red-200{border-color:var(--color-red-200)}.__craftile .border-slate-400{border-color:var(--color-slate-400)}.__craftile .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.__craftile .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.__craftile .bg-accent{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .bg-accent-foreground{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .bg-accent\\/8{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))8%,transparent)}}.__craftile .bg-accent\\/70{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-accent\\/70{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))70%,transparent)}}.__craftile .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.__craftile .bg-blue-500{background-color:var(--color-blue-500)}.__craftile .bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.__craftile .bg-blue-500\\/90{background-color:#3080ffe6}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/90{background-color:color-mix(in oklab,var(--color-blue-500)90%,transparent)}}.__craftile .bg-blue-500\\/95{background-color:#3080fff2}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/95{background-color:color-mix(in oklab,var(--color-blue-500)95%,transparent)}}.__craftile .bg-gray-50{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .bg-gray-100{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .bg-gray-200{background-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .bg-gray-800{background-color:var(--color-gray-800,oklch(37% .013 285.805))}.__craftile .bg-green-800{background-color:var(--color-green-800)}.__craftile .bg-primary{background-color:var(--color-primary,oklch(14.7% .004 49.25))}.__craftile .bg-red-50{background-color:var(--color-red-50)}.__craftile .bg-red-600{background-color:var(--color-red-600)}.__craftile .bg-secondary{background-color:var(--color-secondary,oklch(92% .004 286.32))}.__craftile .bg-transparent{background-color:#0000}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .fill-current{fill:currentColor}.__craftile .object-contain{object-fit:contain}.__craftile .p-0{padding:calc(var(--spacing)*0)}.__craftile .p-0\\.5{padding:calc(var(--spacing)*.5)}.__craftile .p-1{padding:calc(var(--spacing)*1)}.__craftile .p-1\\.5{padding:calc(var(--spacing)*1.5)}.__craftile .p-2{padding:calc(var(--spacing)*2)}.__craftile .p-3{padding:calc(var(--spacing)*3)}.__craftile .p-4{padding:calc(var(--spacing)*4)}.__craftile .p-6{padding:calc(var(--spacing)*6)}.__craftile .p-\\[2px\\]{padding:2px}.__craftile .px-1{padding-inline:calc(var(--spacing)*1)}.__craftile .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.__craftile .px-2{padding-inline:calc(var(--spacing)*2)}.__craftile .px-3{padding-inline:calc(var(--spacing)*3)}.__craftile .px-4{padding-inline:calc(var(--spacing)*4)}.__craftile .px-6{padding-inline:calc(var(--spacing)*6)}.__craftile .py-0\\.5{padding-block:calc(var(--spacing)*.5)}.__craftile .py-1{padding-block:calc(var(--spacing)*1)}.__craftile .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.__craftile .py-2{padding-block:calc(var(--spacing)*2)}.__craftile .py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.__craftile .py-3{padding-block:calc(var(--spacing)*3)}.__craftile .py-4{padding-block:calc(var(--spacing)*4)}.__craftile .py-8{padding-block:calc(var(--spacing)*8)}.__craftile .pb-1{padding-bottom:calc(var(--spacing)*1)}.__craftile .text-center{text-align:center}.__craftile .text-left{text-align:left}.__craftile .font-mono{font-family:var(--font-mono)}.__craftile .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.__craftile .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.__craftile .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .text-\\[0\\.6rem\\],.__craftile .text-\\[0\\.60rem\\]{font-size:.6rem}.__craftile .text-\\[0\\.625rem\\]{font-size:.625rem}.__craftile .text-\\[13px\\]{font-size:13px}.__craftile .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.__craftile .text-ellipsis{text-overflow:ellipsis}.__craftile .whitespace-nowrap{white-space:nowrap}.__craftile .text-accent{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .text-accent\\!{color:var(--color-accent,oklch(54.6% .245 262.881))!important}.__craftile .text-accent-foreground{color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .text-accent\\/90{color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .text-accent\\/90{color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))90%,transparent)}}.__craftile .text-gray-400{color:var(--color-gray-400,oklch(70.5% .015 286.067))}.__craftile .text-gray-500{color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .text-gray-600{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .text-gray-700{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .text-gray-900{color:var(--color-gray-900,oklch(37% .013 285.805))}.__craftile .text-primary-foreground{color:var(--color-primary-foreground,oklch(98.5% 0 0))}.__craftile .text-red-600{color:var(--color-red-600)}.__craftile .text-secondary-foreground{color:var(--color-secondary-foreground,oklch(37% .013 285.805))}.__craftile .text-white{color:var(--color-white)}.__craftile .capitalize{text-transform:capitalize}.__craftile .italic{font-style:italic}.__craftile .opacity-0{opacity:0}.__craftile .opacity-25{opacity:.25}.__craftile .opacity-75{opacity:.75}.__craftile .opacity-80{opacity:.8}.__craftile .opacity-100{opacity:1}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-black\\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.__craftile .shadow-black\\/25{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)25%,transparent)var(--tw-shadow-alpha),transparent)}}.__craftile .ring-white\\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.__craftile .ring-white\\/10{--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.__craftile .filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.__craftile .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-\\[background\\]{transition-property:background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .duration-100{--tw-duration:.1s;transition-duration:.1s}.__craftile .duration-200{--tw-duration:.2s;transition-duration:.2s}.__craftile .duration-300{--tw-duration:.3s;transition-duration:.3s}.__craftile .duration-\\[0\\.2s\\]{--tw-duration:.2s;transition-duration:.2s}.__craftile .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.__craftile .not-last\\:border-b:not(:last-child){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media (hover:hover){.__craftile .group-hover\\:flex:is(:where(.group):hover *){display:flex}.__craftile .group-hover\\:w-full:is(:where(.group):hover *){width:100%}.__craftile .group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.__craftile .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.__craftile .last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.__craftile .hover\\:bg-accent-foreground:hover{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .hover\\:bg-accent\\/90:hover{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))90%,transparent)}}.__craftile .hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.__craftile .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .hover\\:bg-primary\\/90:hover{background-color:var(--color-primary,oklch(14.7% .004 49.25))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary,oklch(14.7% .004 49.25))90%,transparent)}}.__craftile .hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.__craftile .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.__craftile .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.__craftile .hover\\:bg-secondary\\/90:hover{background-color:var(--color-secondary,oklch(92% .004 286.32))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--color-secondary,oklch(92% .004 286.32))90%,transparent)}}.__craftile .hover\\:text-accent:hover{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .hover\\:text-gray-600:hover{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .hover\\:text-gray-700:hover{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .hover\\:text-red-600:hover{color:var(--color-red-600)}.__craftile .hover\\:opacity-100:hover{opacity:1}.__craftile .hover\\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .hover\\:ring-accent\\/40:hover{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:ring-accent\\/40:hover{--tw-ring-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))40%,transparent)}}}.__craftile .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .focus-visible\\:border-transparent:focus-visible{border-color:#0000}.__craftile .focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.__craftile .focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.__craftile .active\\:cursor-grabbing:active{cursor:grabbing}@media (hover:hover){.__craftile .hover\\:enabled\\:bg-gray-500:hover:enabled{background-color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .hover\\:enabled\\:bg-red-800:hover:enabled{background-color:var(--color-red-800)}.__craftile .hover\\:enabled\\:text-gray-100:hover:enabled{color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .hover\\:enabled\\:text-red-200:hover:enabled{color:var(--color-red-200)}}.__craftile .active\\:enabled\\:bg-gray-600:active:enabled{background-color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .disabled\\:pointer-events-none:disabled{pointer-events:none}.__craftile .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.__craftile .disabled\\:text-gray-600:disabled{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .disabled\\:opacity-50:disabled{opacity:.5}.__craftile .data-selected\\:border[data-selected]{border-style:var(--tw-border-style);border-width:1px}.__craftile .data-selected\\:border-b-2[data-selected]{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.__craftile .data-selected\\:border-accent[data-selected],.__craftile .data-selected\\:border-accent\\/20[data-selected]{border-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:border-accent\\/20[data-selected]{border-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))20%,transparent)}}.__craftile .data-selected\\:bg-accent\\/10[data-selected]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:bg-accent\\/10[data-selected]{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}.__craftile .data-selected\\:bg-white[data-selected]{background-color:var(--color-white)}.__craftile .data-selected\\:text-accent[data-selected]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-selected\\:shadow[data-selected]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media (hover:hover){.__craftile .data-selected\\:hover\\:bg-accent\\/10[data-selected]:hover{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:hover\\:bg-accent\\/10[data-selected]:hover{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}}.__craftile .data-\\[disabled\\]\\:cursor-not-allowed[data-disabled]{cursor:not-allowed}.__craftile .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.__craftile .data-\\[state\\=checked\\]\\:bg-accent\\/10[data-state=checked]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-\\[state\\=checked\\]\\:bg-accent\\/10[data-state=checked]{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}.__craftile .data-\\[state\\=checked\\]\\:text-accent[data-state=checked]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=closed\\]\\:animate-exit[data-state=closed]{animation:var(--animate-exit)}.__craftile .data-\\[state\\=open\\]\\:rotate-180[data-state=open]{rotate:180deg}.__craftile .data-\\[state\\=open\\]\\:animate-enter[data-state=open]{animation:var(--animate-enter)}.__craftile .\\[\\&_svg\\]\\:h-full svg{height:100%}.__craftile .\\[\\&_svg\\]\\:w-full svg{width:100%}.__craftile .\\[\\&_svg\\]\\:fill-current svg{fill:currentColor}.__craftile .\\[\\&\\>svg\\]\\:h-4>svg{height:calc(var(--spacing)*4)}.__craftile .\\[\\&\\>svg\\]\\:w-3\\.5>svg{width:calc(var(--spacing)*3.5)}.__craftile .\\[\\&\\>svg\\]\\:w-4>svg{width:calc(var(--spacing)*4)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:0;transform:scale(.95)translateY(-10px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes exit{0%{opacity:1;transform:scale(1)translateY(0)}to{opacity:0;transform:scale(.95)translateY(-10px)}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();var d_=()=>crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+Math.random().toString(36).substr(2),f_=e=>e.id||e.name,p_=(e,t)=>t!==void 0&&t>=0&&t<=e?t:e,m_=(e,t)=>t||e.regions[0]&&f_(e.regions[0])||`main`,h_=(e,t,n,r)=>{if(t){let n=e.blocks[t];if(!n)throw Error(`Parent block not found: ${t}`);let i=p_(n.children.length,r);if(!g_(n.children,e.blocks,i))throw Error(`Cannot place at index ${i} of ${t}: not a valid slot for a dynamic child`);return{kind:`parent`,parent:n,index:i}}let i=m_(e,n);return{kind:`region`,regionId:i,index:p_(e.regions.find(e=>f_(e)===i)?.blocks.length??0,r)}},g_=(e,t,n)=>{if(n>0&&n=r&&n<=i+1},__=class{listeners=new Map;on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{this.off(e,t)}}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t){let n=r=>{t(r),this.off(e,n)};this.on(e,n)}emit(e,...t){let n=this.listeners.get(e);if(n){let r=t[0];n.forEach(t=>{try{t(r)}catch(t){console.error(`Error in event listener for '${String(e)}':`,t)}})}}removeAllListeners(e){e?this.listeners.delete(e):this.listeners.clear()}},Jne=class{schemas=new Map;patternCache=new Map;register(e,t){if(this.schemas.has(e))throw Error(`Block type '${e}' is already registered`);this.schemas.set(e,t)}registerMany(e){for(let[t,n]of Object.entries(e))this.register(t,n)}unregister(e){return this.schemas.delete(e)}get(e){return this.schemas.get(e)}has(e){return this.schemas.has(e)}getAll(){let e={};for(let[t,n]of this.schemas.entries())e[t]=n;return e}find(e){let t=[];for(let[n,r]of this.schemas.entries())e(n,r)&&t.push(n);return t}canBeChild(e,t){let n=this.get(t);return!n||!n.accepts?!1:this.get(e)?.private===!0?n.accepts.includes(e):n.accepts.some(t=>this.matchesPattern(e,t))}getTypes(){return Array.from(this.schemas.keys())}matchesPattern(e,t){if(t===`*`)return!0;if(!this.patternCache.has(t)){let e=`^`+t.replace(/\*/g,`__WILDCARD__`).replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/__WILDCARD__/g,`.*`)+`$`;this.patternCache.set(t,new RegExp(e))}return this.patternCache.get(t).test(e)}},Yne=class{history=[];currentIndex=-1;maxHistorySize;constructor(e=100){this.maxHistorySize=e}addCommand(e){this.currentIndex=this.maxHistorySize&&(this.history.shift(),this.currentIndex--),this.history.push(e),this.currentIndex++}undo(){if(!this.canUndo())return null;let e=this.history[this.currentIndex];return e.revert(),this.currentIndex--,e}redo(){if(!this.canRedo())return null;this.currentIndex++;let e=this.history[this.currentIndex];return e.apply(),e}canUndo(){return this.currentIndex>=0}canRedo(){return this.currentIndexf_(t)===e.regionId);t||(t={id:e.regionId,name:e.regionId,blocks:[]},this.page.regions.push(t)),t.blocks.splice(e.index,0,this.blockId)}this.emit(`block:insert`,{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId,index:this.actualIndex,regionId:this.regionId||f_(this.page.regions[0])})}revert(){if(this.insertedBlock){if(delete this.page.blocks[this.blockId],this.parentId){let e=this.page.blocks[this.parentId];e&&this.actualIndex!==void 0&&e.children.splice(this.actualIndex,1)}else{let e=this.regionId||f_(this.page.regions[0]),t=this.page.regions.find(t=>f_(t)===e);t&&this.actualIndex!==void 0&&t.blocks.splice(this.actualIndex,1)}this.emit(`block:remove`,{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId})}}getBlockId(){return this.blockId}getInsertedBlock(){return this.insertedBlock}buildProperties(e){let t={};if(e?.properties)for(let n of e.properties)n.default!==void 0&&(t[n.id]=n.default);return t}},v_=class{page;blockType;presetIndex;presetData;parentId;regionId;index;blockId;properties;insertedBlock;actualIndex;blocksManager;emit;createdBlockIds=[];constructor(e,t){if(this.page=e,this.blockType=t.blockType,this.presetIndex=t.presetIndex,this.presetData=t.presetData,this.parentId=t.parentId,this.regionId=t.regionId,this.index=t.index,this.blockId=d_(),this.blocksManager=t.blocksManager,this.emit=t.emit,t.presetIndex===void 0&&!t.presetData)throw Error(`Either presetIndex or presetData must be provided`);let n=this.blocksManager.get(this.blockType);if(!n)throw Error(`Block type '${this.blockType}' not found`);let r;if(t.presetData)r=t.presetData.properties;else if(t.presetIndex!==void 0){let e=n.presets?.[t.presetIndex];if(!e)throw Error(`Preset at index ${t.presetIndex} not found for block type '${this.blockType}'`);r=e.properties}this.properties=this.buildProperties(n,r)}apply(){let e=h_(this.page,this.parentId,this.regionId,this.index),t=this.blocksManager.get(this.blockType);if(this.presetData)this.insertedBlock={type:this.blockType,id:this.blockId,name:this.presetData.name||t?.meta?.name||this.blockType,semanticId:this.presetData.semanticId||this.presetData.id,properties:this.properties,children:[],parentId:void 0,static:this.presetData.static,disabled:this.presetData.disabled,repeated:this.presetData.repeated,ghost:this.presetData.ghost},this.page.blocks[this.blockId]=this.insertedBlock,this.createdBlockIds.push(this.blockId),this.presetData.children&&this.presetData.children.length>0&&(this.insertedBlock.children=this.createChildrenFromPreset(this.presetData.children,this.blockId));else if(this.presetIndex!==void 0){let e=t?.presets?.[this.presetIndex];if(!e)throw Error(`Preset at index ${this.presetIndex} not found`);this.insertedBlock={type:this.blockType,id:this.blockId,name:e.name,properties:this.properties,children:[],parentId:void 0},this.page.blocks[this.blockId]=this.insertedBlock,this.createdBlockIds.push(this.blockId),e.children&&e.children.length>0&&(this.insertedBlock.children=this.createChildrenFromPreset(e.children,this.blockId))}if(!this.insertedBlock)throw Error(`Failed to create block`);if(this.actualIndex=e.index,e.kind===`parent`)this.insertedBlock.parentId=e.parent.id,e.parent.children.splice(e.index,0,this.blockId);else{let t=this.page.regions.find(t=>f_(t)===e.regionId);t||(t={id:e.regionId,name:e.regionId,blocks:[]},this.page.regions.push(t)),t.blocks.splice(e.index,0,this.blockId)}this.emit(`block:insert`,{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId,index:this.actualIndex,regionId:this.regionId||f_(this.page.regions[0])})}revert(){if(this.insertedBlock){for(let e of this.createdBlockIds)delete this.page.blocks[e];if(this.parentId){let e=this.page.blocks[this.parentId];e&&this.actualIndex!==void 0&&e.children.splice(this.actualIndex,1)}else{let e=this.regionId||f_(this.page.regions[0]),t=this.page.regions.find(t=>f_(t)===e);t&&this.actualIndex!==void 0&&t.blocks.splice(this.actualIndex,1)}this.emit(`block:remove`,{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId})}}getBlockId(){return this.blockId}getInsertedBlock(){return this.insertedBlock}createChildrenFromPreset(e,t){let n=[];for(let r of e){let e=d_(),i=this.blocksManager.get(r.type);if(!i){console.warn(`Block type '${r.type}' not found, skipping child`);continue}let a=this.buildProperties(i,r.properties),o={type:r.type,id:e,name:r.name||i.meta?.name||r.type,semanticId:r.semanticId||r.id,properties:a,children:[],parentId:t,static:r.static,disabled:r.disabled,repeated:r.repeated,ghost:r.ghost};this.page.blocks[e]=o,this.createdBlockIds.push(e),r.children&&r.children.length>0&&(o.children=this.createChildrenFromPreset(r.children,e)),n.push(e)}return n}buildProperties(e,t){let n={};if(e?.properties)for(let t of e.properties)t.default!==void 0&&(n[t.id]=t.default);return t&&Object.assign(n,t),n}},Zne=class{page;blockId;removedBlock;originalIndex;originalParentId;regionId;emit;constructor(e,t){this.page=e,this.blockId=t.blockId,this.emit=t.emit}apply(){if(this.removedBlock=this.page.blocks[this.blockId],!this.removedBlock)throw Error(`Block not found: ${this.blockId}`);if(this.originalParentId=this.removedBlock.parentId,this.originalParentId){let e=this.page.blocks[this.originalParentId];e&&(this.originalIndex=e.children.indexOf(this.blockId),this.originalIndex!==-1&&e.children.splice(this.originalIndex,1))}else{let e=this.page.regions.find(e=>e.blocks.includes(this.blockId));e&&(this.originalIndex=e.blocks.indexOf(this.blockId),this.regionId=f_(e),e.blocks.splice(this.originalIndex,1))}delete this.page.blocks[this.blockId],this.emit(`block:remove`,{blockId:this.blockId,block:this.removedBlock,parentId:this.originalParentId})}revert(){if(!(!this.removedBlock||this.originalIndex===void 0)){if(this.page.blocks[this.blockId]=this.removedBlock,this.originalParentId){let e=this.page.blocks[this.originalParentId];e&&e.children.splice(this.originalIndex,0,this.blockId)}else if(this.regionId){let e=this.page.regions.find(e=>f_(e)===this.regionId);e&&e.blocks.splice(this.originalIndex,0,this.blockId)}this.emit(`block:insert`,{blockId:this.blockId,block:this.removedBlock,parentId:this.originalParentId,index:this.originalIndex,regionId:this.regionId})}}getBlockId(){return this.blockId}getRemovedBlock(){return this.removedBlock}},Qne=class{page;blockId;targetParentId;targetIndex;targetRegionId;blockToMove;originalParentId;originalIndex;originalRegionId;emit;constructor(e,t){this.page=e,this.blockId=t.blockId,this.targetParentId=t.targetParentId,this.targetIndex=t.targetIndex,this.targetRegionId=t.targetRegionId,this.emit=t.emit}apply(){let e=this.validateAndResolveTarget();if(this.originalParentId){let e=this.page.blocks[this.originalParentId];e&&this.originalIndex!==-1&&e.children.splice(this.originalIndex,1)}else if(this.originalRegionId){let e=this.page.regions.find(e=>f_(e)===this.originalRegionId);e&&this.originalIndex!==-1&&e.blocks.splice(this.originalIndex,1)}if(e.kind===`parent`)this.blockToMove.parentId=e.parent.id,e.parent.children.splice(e.index,0,this.blockId);else{this.blockToMove.parentId=void 0;let t=this.page.regions.find(t=>f_(t)===e.regionId);t||(t={id:e.regionId,name:e.regionId,blocks:[]},this.page.regions.push(t)),t.blocks.splice(e.index,0,this.blockId)}this.emit(`block:move`,{blockId:this.blockId,targetParentId:this.targetParentId,targetIndex:this.targetIndex,targetRegionId:this.targetRegionId,sourceParentId:this.originalParentId||null,sourceRegionId:this.originalRegionId||null,sourceIndex:this.originalIndex})}validateAndResolveTarget(){if(this.blockToMove=this.page.blocks[this.blockId],!this.blockToMove)throw Error(`Block not found: ${this.blockId}`);if(this.originalParentId=this.blockToMove.parentId,this.originalParentId){let e=this.page.blocks[this.originalParentId];this.originalIndex=e?e.children.indexOf(this.blockId):-1}else{let e=this.page.regions.find(e=>e.blocks.includes(this.blockId));e?(this.originalRegionId=f_(e),this.originalIndex=e.blocks.indexOf(this.blockId)):this.originalIndex=-1}if(this.targetParentId){let e=this.page.blocks[this.targetParentId];if(!e)throw Error(`Target parent not found: ${this.targetParentId}`);let t=this.originalParentId===this.targetParentId?e.children.filter(e=>e!==this.blockId):e.children,n=p_(t.length,this.targetIndex);if(!g_(t,this.page.blocks,n))throw Error(`Cannot place at index ${n} of ${this.targetParentId}: not a valid slot for a dynamic child`);return{kind:`parent`,parent:e,index:n}}let e=m_(this.page,this.targetRegionId),t=this.page.regions.find(t=>f_(t)===e),n=this.originalRegionId===e;return{kind:`region`,regionId:e,index:p_((t?n?t.blocks.filter(e=>e!==this.blockId):t.blocks:[]).length,this.targetIndex)}}revert(){if(!(!this.blockToMove||this.originalIndex===void 0)){if(this.blockToMove.parentId){let e=this.page.blocks[this.blockToMove.parentId];if(e){let t=e.children.indexOf(this.blockId);t!==-1&&e.children.splice(t,1)}}else{let e=this.page.regions.find(e=>e.blocks.includes(this.blockId));if(e){let t=e.blocks.indexOf(this.blockId);t!==-1&&e.blocks.splice(t,1)}}if(this.blockToMove.parentId=this.originalParentId,this.originalParentId){let e=this.page.blocks[this.originalParentId];e&&e.children.splice(this.originalIndex,0,this.blockId)}else if(this.originalRegionId){let e=this.page.regions.find(e=>f_(e)===this.originalRegionId);e&&e.blocks.splice(this.originalIndex,0,this.blockId)}this.emit(`block:move`,{blockId:this.blockId,targetParentId:this.originalParentId,targetIndex:this.originalIndex,targetRegionId:this.originalRegionId,sourceParentId:this.targetParentId||null,sourceRegionId:this.targetRegionId||null,sourceIndex:this.targetIndex||0})}}getBlockId(){return this.blockId}getTargetParentId(){return this.targetParentId}getTargetIndex(){return this.targetIndex}getTargetRegionId(){return this.targetRegionId}getSourceParentId(){return this.originalParentId||null}getSourceRegionId(){return this.originalRegionId||null}getSourceIndex(){return this.originalIndex}},$ne=class{page;blockId;targetDisabled;originalDisabled;block;emit;constructor(e,t){this.page=e,this.blockId=t.blockId,this.targetDisabled=t.disabled,this.emit=t.emit}apply(){if(this.block=this.page.blocks[this.blockId],!this.block)throw Error(`Block not found: ${this.blockId}`);this.originalDisabled=this.block.disabled,this.targetDisabled===void 0?this.block.disabled=!this.block.disabled:this.block.disabled=this.targetDisabled,this.emit(`block:toggle`,{blockId:this.blockId,disabled:this.block.disabled??!1,oldValue:this.originalDisabled})}revert(){this.block&&(this.originalDisabled===void 0?this.block.disabled=!this.block.disabled:this.block.disabled=this.originalDisabled,this.emit(`block:toggle`,{blockId:this.blockId,disabled:this.block.disabled??!1,oldValue:this.targetDisabled===void 0?!this.originalDisabled:this.targetDisabled}))}getBlockId(){return this.blockId}getOriginalDisabled(){return this.originalDisabled}getNewDisabled(){return this.block?.disabled}},ere=class{page;blockId;propertyKey;propertyValue;originalValue;block;emit;constructor(e,t){this.page=e,this.blockId=t.blockId,this.propertyKey=t.propertyKey,this.propertyValue=t.propertyValue,this.emit=t.emit}apply(){if(this.block=this.page.blocks[this.blockId],!this.block)throw Error(`Block not found: ${this.blockId}`);this.block.properties||(this.block.properties={}),this.originalValue=this.block.properties[this.propertyKey],this.block.properties[this.propertyKey]=this.propertyValue,this.emit(`block:property:set`,{blockId:this.blockId,key:this.propertyKey,value:this.propertyValue,oldValue:this.originalValue})}revert(){!this.block||!this.block.properties||(this.originalValue===void 0?delete this.block.properties[this.propertyKey]:this.block.properties[this.propertyKey]=this.originalValue,this.emit(`block:property:set`,{blockId:this.blockId,key:this.propertyKey,value:this.originalValue,oldValue:this.propertyValue}))}getBlockId(){return this.blockId}getPropertyKey(){return this.propertyKey}getPropertyValue(){return this.propertyValue}getOriginalValue(){return this.originalValue}},tre=class{page;blockId;duplicatedBlockId;duplicatedBlock;parentId;insertIndex;regionId;emit;constructor(e,t){this.page=e,this.blockId=t.blockId,this.emit=t.emit}apply(){let e=this.page.blocks[this.blockId];if(!e)throw Error(`Block not found: ${this.blockId}`);this.duplicatedBlockId=d_(),this.duplicatedBlock=this.cloneBlockWithNewIds(e,this.duplicatedBlockId,e.parentId),this.determineInsertLocation(),this.insertDuplicatedBlock(),this.emit(`block:duplicate`,{originalBlockId:this.blockId,newBlockId:this.duplicatedBlockId,newBlock:this.duplicatedBlock,parentId:this.parentId||void 0,index:this.insertIndex,regionId:this.regionId||void 0})}revert(){!this.duplicatedBlock||!this.duplicatedBlockId||this.removeDuplicatedBlock()}getBlockId(){return this.blockId}getDuplicatedBlockId(){return this.duplicatedBlockId}getDuplicatedBlock(){return this.duplicatedBlock}getParentId(){return this.parentId}getInsertIndex(){return this.insertIndex}getRegionId(){return this.regionId}cloneBlockWithNewIds(e,t,n){let r={...structuredClone(e),id:t,parentId:n,children:[]};if(e.children&&e.children.length>0)for(let n of e.children){let e=this.page.blocks[n];if(e){let n=d_();this.cloneBlockWithNewIds(e,n,t),r.children.push(n)}}return this.page.blocks[t]=r,r}determineInsertLocation(){let e=this.page.blocks[this.blockId];if(!e)throw Error(`Block not found: ${this.blockId}`);if(this.parentId=e.parentId||null,this.parentId){let e=this.page.blocks[this.parentId];if(e){let t=e.children.indexOf(this.blockId);this.insertIndex=t===-1?e.children.length:t+1}else this.insertIndex=0}else{let e=this.page.regions.find(e=>e.blocks.includes(this.blockId));if(e){let t=e.blocks.indexOf(this.blockId);this.regionId=f_(e),this.insertIndex=t+1}else this.regionId=f_(this.page.regions[0])||`main`,this.insertIndex=this.page.regions[0].blocks.length||0}}insertDuplicatedBlock(){if(this.duplicatedBlock)if(this.parentId){let e=this.page.blocks[this.parentId];if(!e)throw Error(`Parent block not found: ${this.parentId}`);e.children.splice(this.insertIndex,0,this.duplicatedBlockId)}else{let e=this.page.regions.find(e=>e.name===this.regionId);e||(e={name:this.regionId||`main`,blocks:[]},this.page.regions.push(e)),e.blocks.splice(this.insertIndex,0,this.duplicatedBlockId)}}removeDuplicatedBlock(){if(this.duplicatedBlockId){if(this.removeBlockAndChildren(this.duplicatedBlockId),this.parentId){let e=this.page.blocks[this.parentId];if(e){let t=e.children.indexOf(this.duplicatedBlockId);t!==-1&&e.children.splice(t,1)}}else if(this.page.regions){let e=this.page.regions.find(e=>e.name===this.regionId);if(e){let t=e.blocks.indexOf(this.duplicatedBlockId);t!==-1&&e.blocks.splice(t,1)}}}}removeBlockAndChildren(e){let t=this.page.blocks[e];if(t){for(let e of t.children)this.removeBlockAndChildren(e);delete this.page.blocks[e]}}},nre=class{page;blockId;newName;oldName;block;emit;constructor(e,t){if(this.page=e,this.blockId=t.blockId,this.newName=t.name,this.emit=t.emit,this.block=this.page.blocks[this.blockId],!this.block)throw Error(`Block not found: ${this.blockId}`);this.oldName=this.block.name}apply(){if(!this.block)throw Error(`Block not found: ${this.blockId}`);this.block.name=this.newName,this.emit(`block:update`,{blockId:this.blockId,block:this.block,property:`name`,value:this.newName,oldValue:this.oldName})}revert(){this.block&&(this.block.name=this.oldName,this.emit(`block:update`,{blockId:this.blockId,block:this.block,property:`name`,value:this.oldName,oldValue:this.newName}))}},y_=class extends __{page;blocksManager;historyManager;constructor(e={}){super(),this.blocksManager=e.blocksManager||new Jne,this.historyManager=new Yne,this.setPage(e.page?e.page:{blocks:{},regions:[{id:`main`,name:`main`,blocks:[]}]}),e.blockSchemas&&e.blockSchemas.length>0&&e.blockSchemas.forEach(e=>{this.blocksManager.register(e.type,e)})}insertBlock(e,t){let n=this.blocksManager.get(e);if(!n)throw Error(`Block type '${e}' is not registered`);if(t?.parentId){let n=this.page.blocks[t.parentId];if(!n)throw Error(`Parent block not found: ${t.parentId}`);if(!this.blocksManager.canBeChild(e,n.type))throw Error(`Block type '${e}' cannot be a child of '${n.type}'`)}let r=new Xne(this.page,{blockType:e,parentId:t?.parentId,regionId:t?.regionId,index:t?.index,blockSchema:n,emit:this.emit.bind(this)});return r.apply(),this.historyManager.addCommand(r),r.getBlockId()}insertBlockFromPreset(e,t,n){let r=this.blocksManager.get(e);if(!r)throw Error(`Block type '${e}' is not registered`);if(!r.presets||!r.presets[t])throw Error(`Preset at index ${t} not found for block type '${e}'`);if(n?.parentId){let t=this.page.blocks[n.parentId];if(!t)throw Error(`Parent block not found: ${n.parentId}`);if(!this.blocksManager.canBeChild(e,t.type))throw Error(`Block type '${e}' cannot be a child of '${t.type}'`)}let i=new v_(this.page,{blockType:e,presetIndex:t,parentId:n?.parentId,regionId:n?.regionId,index:n?.index,blocksManager:this.blocksManager,emit:this.emit.bind(this)});return i.apply(),this.historyManager.addCommand(i),i.getBlockId()}removeBlock(e){let t=new Zne(this.page,{blockId:e,emit:this.emit.bind(this)});t.apply(),this.historyManager.addCommand(t)}moveBlock(e,t){let n=this.page.blocks[e];if(t?.targetParentId){let e=this.page.blocks[t.targetParentId];if(!e)throw Error(`Target parent block not found: ${t.targetParentId}`);if(!this.blocksManager.canBeChild(n.type,e.type))throw Error(`Block type '${n.type}' cannot be a child of '${e.type}'`)}let r=new Qne(this.page,{blockId:e,targetParentId:t?.targetParentId,targetIndex:t?.targetIndex,targetRegionId:t?.targetRegionId,emit:this.emit.bind(this)});r.apply(),this.historyManager.addCommand(r)}toggleBlock(e,t){let n=new $ne(this.page,{blockId:e,disabled:t,emit:this.emit.bind(this)});n.apply(),this.historyManager.addCommand(n)}setBlockProperty(e,t,n){let r=new ere(this.page,{blockId:e,propertyKey:t,propertyValue:n,emit:this.emit.bind(this)});r.apply(),this.historyManager.addCommand(r)}setBlockName(e,t){let n=new nre(this.page,{blockId:e,name:t,emit:this.emit.bind(this)});n.apply(),this.historyManager.addCommand(n)}duplicateBlock(e){let t=new tre(this.page,{blockId:e,emit:this.emit.bind(this)});return t.apply(),this.historyManager.addCommand(t),t.getDuplicatedBlockId()}getBlockById(e){return this.page.blocks[e]}exportBlockAsNestedStructure(e){let t=this.page.blocks[e];if(!t)throw Error(`Block not found: ${e}`);let n={type:t.type,id:t.id,semanticId:t.semanticId,properties:structuredClone(t.properties),name:t.name,static:t.static,disabled:t.disabled,repeated:t.repeated,children:[]};return t.children&&t.children.length>0&&(n.children=t.children.map(e=>this.exportBlockAsNestedStructure(e))),n}pasteBlock(e,t){if(!this.blocksManager.get(e.type))throw Error(`Block type '${e.type}' is not registered`);if(t?.parentId){let n=this.page.blocks[t.parentId];if(!n)throw Error(`Parent block not found: ${t.parentId}`);if(!this.blocksManager.canBeChild(e.type,n.type))throw Error(`Block type '${e.type}' cannot be a child of '${n.type}'`)}let n=new v_(this.page,{blockType:e.type,presetData:e,parentId:t?.parentId,regionId:t?.regionId,index:t?.index,blocksManager:this.blocksManager,emit:this.emit.bind(this)});return n.apply(),this.historyManager.addCommand(n),n.getBlockId()}getPage(){return structuredClone(this.page)}setPage(e){let t=structuredClone(this.page);this.page=structuredClone(e),this.page.regions.length===0&&(this.page.regions=[{id:`main`,name:`main`,blocks:Object.keys(this.page.blocks)}]),this.page.regions.length===0&&(this.page.regions=[{id:`main`,name:`main`,blocks:Object.values(this.page.blocks).filter(e=>!e.parentId).map(e=>e.id)}]),this.initializeParentChildRelationships(),this.historyManager.clear(),this.emit(`page:set`,{previousPage:t,newPage:structuredClone(this.page)})}getBlocksManager(){return this.blocksManager}getBlockSchemas(){return this.blocksManager.getAll()}getBlockSchema(e){return this.blocksManager.get(e)}undo(){let e=this.historyManager.undo();return e!==null&&this.emit(`undo`,{command:e}),e!==null}redo(){let e=this.historyManager.redo();return e!==null&&this.emit(`redo`,{command:e}),e!==null}canUndo(){return this.historyManager.canUndo()}canRedo(){return this.historyManager.canRedo()}initializeParentChildRelationships(){let e=t=>{t.children&&t.children.length>0&&t.children.forEach(n=>{let r=this.page.blocks[n];r&&(r.parentId||=t.id,e(r))})};Object.values(this.page.blocks).forEach(e)}},b_=M({__name:`RenderFunctionWrapper`,props:{renderFn:{type:Function}},setup(e){let t=or(ml),n=e,r=O(),i=()=>{if(!r.value||!n.renderFn)return;r.value.innerHTML=``;let e=n.renderFn({editor:t});r.value.appendChild(e)};return Ei(()=>{i()}),pr(()=>n.renderFn,()=>{i()}),(e,t)=>(F(),I(`div`,{ref_key:`containerRef`,ref:r},null,512))}}),rre={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ire(e,t){return F(),I(`svg`,rre,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 18L18 6M6 6l12 12`},null,-1)]])}var x_=D({name:`heroicons-x-mark`,render:ire}),[S_,C_]=hl(`AccordionContext`),are=M({__name:`accordion-context`,setup(e){let t=C_();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[w_,T_]=hl(`CollapsibleContext`),ore=M({__name:`collapsible-content`,props:{asChild:{type:Boolean}},setup(e){let t=T_();return G(),(e,n)=>k(t).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getContentProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),sre=M({__name:`collapsible-context`,setup(e){let t=T_();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),cre=M({__name:`collapsible-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return w_(n),G(),(e,t)=>(F(),L(k(W).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),E_=Wd(`collapsible`).parts(`root`,`trigger`,`content`,`indicator`).build(),lre=e=>e.ids?.root??`collapsible:${e.id}`,D_=e=>e.ids?.content??`collapsible:${e.id}:content`,ure=e=>e.ids?.trigger??`collapsible:${e.id}:trigger`,O_=e=>e.getById(D_(e));function dre(e,t){let{state:n,send:r,context:i,scope:a,prop:o}=e,s=n.matches(`open`)||n.matches(`closing`),c=n.matches(`open`),{width:l,height:u}=i.get(`size`),d=!!o(`disabled`),f=!i.get(`initial`)&&c;return{disabled:d,visible:s,open:c,measureSize(){r({type:`size.measure`})},setOpen(e){n.matches(`open`)!==e&&r({type:e?`open`:`close`})},getRootProps(){return t.element({...E_.root.attrs,"data-state":c?`open`:`closed`,dir:`ltr`,id:lre(a)})},getContentProps(){return t.element({...E_.content.attrs,"data-collapsible":``,"data-state":f?void 0:c?`open`:`closed`,id:D_(a),"data-disabled":Zl(d),hidden:!s,style:{"--height":u==null?void 0:`${u}px`,"--width":l==null?void 0:`${l}px`}})},getTriggerProps(){return t.element({...E_.trigger.attrs,id:ure(a),dir:`ltr`,type:`button`,"data-state":c?`open`:`closed`,"data-disabled":Zl(d),"aria-controls":D_(a),"aria-expanded":s||!1,onClick(e){e.defaultPrevented||d||r({type:c?`close`:`open`})}})},getIndicatorProps(){return t.element({...E_.indicator.attrs,dir:`ltr`,"data-state":c?`open`:`closed`,"data-disabled":Zl(d)})}}}var fre=vd({initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`setInitial`,`computeSize`,`toggleVisibility`])})},exit:[`clearInitial`,`cleanupNode`],states:{closed:{on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`computeSize`,`invokeOnOpen`]}]}},closing:{effects:[`trackExitAnimation`],on:{"controlled.close":{target:`closed`},"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`invokeOnOpen`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnExitComplete`]},{target:`closed`,actions:[`setInitial`,`computeSize`,`invokeOnExitComplete`]}],"animation.end":{target:`closed`,actions:[`invokeOnExitComplete`,`clearInitial`]}}},open:{effects:[`trackEnterAnimation`],on:{"controlled.close":{target:`closing`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closing`,actions:[`setInitial`,`computeSize`,`invokeOnClose`]}],"size.measure":{actions:[`measureSize`]},"animation.end":{actions:[`clearInitial`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,r=Bu(()=>{let r=O_(t);if(!r)return;let i=du(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{yu(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a),n=()=>{r.removeEventListener(`animationend`,a)}});return()=>{r(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n,r=Bu(()=>{let r=O_(t);if(!r)return;let i=du(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{yu(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a);let o=id(r,{animationFillMode:`forwards`});n=()=>{r.removeEventListener(`animationend`,a),zu(()=>o())}});return()=>{r(),n?.()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set(`initial`,!0)})},clearInitial:({context:e})=>{e.set(`initial`,!1)},cleanupNode:({refs:e})=>{e.set(`stylesRef`,null)},measureSize:({context:e,scope:t})=>{let n=O_(t);if(!n)return;let{height:r,width:i}=n.getBoundingClientRect();e.set(`size`,{height:r,width:i})},computeSize:({refs:e,scope:t,context:n})=>{e.get(`cleanup`)?.();let r=Bu(()=>{let e=O_(t);if(!e)return;let r=e.hidden;e.style.animationName=`none`,e.style.animationDuration=`0s`,e.hidden=!1;let i=e.getBoundingClientRect();n.set(`size`,{height:i.height,width:i.width}),n.get(`initial`)&&(e.style.animationName=``,e.style.animationDuration=``),e.hidden=r});e.set(`cleanup`,r)},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e(`onExitComplete`)?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e(`open`)?`controlled.open`:`controlled.close`})}}}});wd()([`dir`,`disabled`,`getRootNode`,`id`,`ids`,`onExitComplete`,`onOpenChange`,`defaultOpen`,`open`]);var pre=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(fre,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...Zd(a),onExitComplete:()=>{t?.(`exitComplete`),a.onExitComplete?.()},onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)}}})),o=U(()=>dre(a,kd)),s=O(!1);return pr(()=>o.value.visible,()=>{o.value.visible&&(s.value=!0)}),U(()=>{let t=A(e);return{...o.value,unmounted:!o.value.visible&&!s.value&&t.lazyMount||t.unmountOnExit&&!o.value.visible&&s.value}})},k_=Object.freeze(Object.defineProperty({__proto__:null,Content:ore,Context:sre,Indicator:M({__name:`collapsible-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=T_();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Root:M({__name:`collapsible-root`,props:Xi({defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:[`exitComplete`,`openChange`,`update:open`],setup(e,{emit:t}){let n=pre(e,t);return w_(n),G(),(e,t)=>(F(),L(k(W).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:cre,Trigger:M({__name:`collapsible-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=T_();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),mre=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),[hre,A_]=hl(`AccordionItemPropsContext`),gre=M({__name:`accordion-item-content`,props:{asChild:{type:Boolean}},setup(e){let t=mre(),n=C_(),r=A_(),i=U(()=>{let[,e]=t(n.value.getItemContentProps(r),[`hidden`,`data-state`]);return e});return G(),(e,t)=>(F(),L(k(k_).Content,H(i.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[_re,vre]=hl(`AccordionItemContext`),yre=M({__name:`accordion-item-context`,setup(e){let t=vre();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),bre=M({__name:`accordion-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=C_(),n=A_();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),xre=M({__name:`accordion-item-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=C_(),n=A_(),r=T_(),i=U(()=>{let{"aria-controls":e,...i}=t.value.getItemTriggerProps(n);return{...i,...r.value.unmounted?{}:{"aria-controls":e}}});return G(),(e,t)=>(F(),L(k(W).button,H(i.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Sre=M({__name:`accordion-item`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=C_(),n=e,r=U(()=>t.value.getItemState(n)),i=Qm(),a=U(()=>t.value.getItemContentProps(n));return _re(r),hre(n),G(),(e,o)=>(F(),L(k(k_).Root,H(k(t).getItemProps(n),{open:r.value.expanded,"lazy-mount":k(i).lazyMount,"unmount-on-exit":k(i).unmountOnExit,ids:{content:a.value.id}}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`open`,`lazy-mount`,`unmount-on-exit`,`ids`]))}}),Cre=M({__name:`accordion-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return S_(n),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),j_=Wd(`accordion`).parts(`root`,`item`,`itemTrigger`,`itemContent`,`itemIndicator`).build(),M_=e=>e.ids?.root??`accordion:${e.id}`,wre=(e,t)=>e.ids?.item?.(t)??`accordion:${e.id}:item:${t}`,N_=(e,t)=>e.ids?.itemContent?.(t)??`accordion:${e.id}:content:${t}`,P_=(e,t)=>e.ids?.itemTrigger?.(t)??`accordion:${e.id}:trigger:${t}`,Tre=e=>e.getById(M_(e)),F_=e=>{let t=`[aria-controls][data-ownedby='${CSS.escape(M_(e))}']:not([disabled])`;return qu(Tre(e),t)},Ere=e=>_l(F_(e)),Dre=e=>vl(F_(e)),Ore=(e,t)=>Zu(F_(e),P_(e,t)),kre=(e,t)=>Qu(F_(e),P_(e,t));function Are(e,t){let{send:n,context:r,prop:i,scope:a,computed:o}=e,s=r.get(`focusedValue`),c=r.get(`value`),l=i(`multiple`);function u(e){let t=e;!l&&t.length>1&&(t=[t[0]]),n({type:`VALUE.SET`,value:t})}function d(e){return{expanded:c.includes(e.value),focused:s===e.value,disabled:!!(e.disabled??i(`disabled`))}}return{focusedValue:s,value:c,setValue:u,getItemState:d,getRootProps(){return t.element({...j_.root.attrs,dir:i(`dir`),id:M_(a),"data-orientation":i(`orientation`)})},getItemProps(e){let n=d(e);return t.element({...j_.item.attrs,dir:i(`dir`),id:wre(a,e.value),"data-state":n.expanded?`open`:`closed`,"data-focus":Zl(n.focused),"data-disabled":Zl(n.disabled),"data-orientation":i(`orientation`)})},getItemContentProps(e){let n=d(e);return t.element({...j_.itemContent.attrs,dir:i(`dir`),role:`region`,id:N_(a,e.value),"aria-labelledby":P_(a,e.value),hidden:!n.expanded,"data-state":n.expanded?`open`:`closed`,"data-disabled":Zl(n.disabled),"data-focus":Zl(n.focused),"data-orientation":i(`orientation`)})},getItemIndicatorProps(e){let n=d(e);return t.element({...j_.itemIndicator.attrs,dir:i(`dir`),"aria-hidden":!0,"data-state":n.expanded?`open`:`closed`,"data-disabled":Zl(n.disabled),"data-focus":Zl(n.focused),"data-orientation":i(`orientation`)})},getItemTriggerProps(e){let{value:r}=e,s=d(e);return t.button({...j_.itemTrigger.attrs,type:`button`,dir:i(`dir`),id:P_(a,r),"aria-controls":N_(a,r),"aria-expanded":s.expanded,disabled:s.disabled,"data-orientation":i(`orientation`),"aria-disabled":s.disabled,"data-state":s.expanded?`open`:`closed`,"data-ownedby":M_(a),onFocus(){s.disabled||n({type:`TRIGGER.FOCUS`,value:r})},onBlur(){s.disabled||n({type:`TRIGGER.BLUR`})},onClick(e){s.disabled||(vu()&&e.currentTarget.focus(),n({type:`TRIGGER.CLICK`,value:r}))},onKeyDown(e){if(e.defaultPrevented||s.disabled)return;let t={ArrowDown(){o(`isHorizontal`)||n({type:`GOTO.NEXT`,value:r})},ArrowUp(){o(`isHorizontal`)||n({type:`GOTO.PREV`,value:r})},ArrowRight(){o(`isHorizontal`)&&n({type:`GOTO.NEXT`,value:r})},ArrowLeft(){o(`isHorizontal`)&&n({type:`GOTO.PREV`,value:r})},Home(){n({type:`GOTO.FIRST`,value:r})},End(){n({type:`GOTO.LAST`,value:r})}}[Eu(e,{dir:i(`dir`),orientation:i(`orientation`)})];t&&(t(e),e.preventDefault())}})}}}var{and:jre,not:Mre}=_d(),Nre=vd({props({props:e}){return{collapsible:!1,multiple:!1,orientation:`vertical`,defaultValue:[],...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(t){e(`onFocusChange`)?.({value:t})}})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}}))}},computed:{isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`},on:{"VALUE.SET":{actions:[`setValue`]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:`focused`,actions:[`setFocusedValue`]}}},focused:{on:{"GOTO.NEXT":{actions:[`focusNextTrigger`]},"GOTO.PREV":{actions:[`focusPrevTrigger`]},"TRIGGER.CLICK":[{guard:jre(`isExpanded`,`canToggle`),actions:[`collapse`]},{guard:Mre(`isExpanded`),actions:[`expand`]}],"GOTO.FIRST":{actions:[`focusFirstTrigger`]},"GOTO.LAST":{actions:[`focusLastTrigger`]},"TRIGGER.BLUR":{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e(`collapsible`)||!!e(`multiple`),isExpanded:({context:e,event:t})=>e.get(`value`).includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let r=t(`multiple`)?xl(e.get(`value`),n.value):[];e.set(`value`,r)},expand({context:e,prop:t,event:n}){let r=t(`multiple`)?bl(e.get(`value`),n.value):[n.value];e.set(`value`,r)},focusFirstTrigger({scope:e}){Ere(e)?.focus()},focusLastTrigger({scope:e}){Dre(e)?.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get(`focusedValue`);n&&Ore(t,n)?.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get(`focusedValue`);n&&kre(t,n)?.focus()},setFocusedValue({context:e,event:t}){e.set(`focusedValue`,t.value)},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t}){e.set(`value`,t.value)},coarseValue({context:e,prop:t}){!t(`multiple`)&&e.get(`value`).length>1&&(ql(`The value of accordion should be a single value when multiple is false.`),e.set(`value`,[e.get(`value`)[0]]))}}}});wd()([`collapsible`,`dir`,`disabled`,`getRootNode`,`id`,`ids`,`multiple`,`onFocusChange`,`onValueChange`,`orientation`,`value`,`defaultValue`]),wd()([`value`,`disabled`]);var Pre=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(Nre,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,onFocusChange:e=>t?.(`focusChange`,e),value:a.modelValue,...Zd(a),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a?.onValueChange?.(e)}}}));return U(()=>Are(a,kd))},I_=Object.freeze(Object.defineProperty({__proto__:null,Context:are,Item:Sre,ItemContent:gre,ItemContext:yre,ItemIndicator:bre,ItemTrigger:xre,Root:M({__name:`accordion-root`,props:Xi({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:[`focusChange`,`valueChange`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=Pre(n,t);return S_(r),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:Cre},Symbol.toStringTag,{value:`Module`})),L_=(e,t)=>({x:e,y:t});function Fre(e){let{x:t,y:n,width:r,height:i}=e,a=t+r/2,o=n+i/2;return{x:t,y:n,width:r,height:i,minX:t,minY:n,maxX:t+r,maxY:n+i,midX:a,midY:o,center:L_(a,o)}}function Ire(e){return{top:L_(e.minX,e.minY),right:L_(e.maxX,e.minY),bottom:L_(e.maxX,e.maxY),left:L_(e.minX,e.maxY)}}function Lre(e,t){let{top:n,right:r,left:i,bottom:a}=Ire(Fre(e)),[o]=t.split(`-`);return{top:[i,n,r,a],right:[n,r,a,i],bottom:[n,i,a,r],left:[r,n,i,a]}[o]}function Rre(e,t){let{x:n,y:r}=t,i=!1;for(let t=0,a=e.length-1;tr!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}var R_=new WeakMap,z_=new WeakMap,B_={},V_=0,H_=e=>e&&(e.host||H_(e.parentNode)),zre=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=H_(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),Bre=new Set([`script`,`output`,`status`,`next-route-announcer`]),Vre=e=>Bre.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),Hre=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i}=t,a=zre(n,Array.isArray(e)?e:[e]);B_[r]||(B_[r]=new WeakMap);let o=B_[r],s=[],c=new Set,l=new Set(a),u=e=>{!e||c.has(e)||(c.add(e),u(e.parentNode))};a.forEach(u);let d=e=>{!e||l.has(e)||Array.prototype.forEach.call(e.children,e=>{if(c.has(e))d(e);else try{if(Vre(e))return;let t=e.getAttribute(i)===`true`,n=(R_.get(e)||0)+1,a=(o.get(e)||0)+1;R_.set(e,n),o.set(e,a),s.push(e),n===1&&t&&z_.set(e,!0),a===1&&e.setAttribute(r,``),t||e.setAttribute(i,`true`)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return d(n),c.clear(),V_++,()=>{s.forEach(e=>{let t=R_.get(e)-1,n=o.get(e)-1;R_.set(e,t),o.set(e,n),t||(z_.has(e)||e.removeAttribute(i),z_.delete(e)),n||e.removeAttribute(r)}),V_--,V_||(R_=new WeakMap,R_=new WeakMap,z_=new WeakMap,B_={})}},Ure=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,Wre=(e,t=Ure(e),n=`data-aria-hidden`)=>{if(t)return Hre(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`})},Gre=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function U_(e,t={}){let{defer:n=!0}=t,r=n?Gre:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(Wre(t))})),()=>{i.forEach(e=>e?.())}}var W_=M({__name:`presence`,props:Xi({immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{immediate:void 0,lazyMount:void 0,present:void 0,skipAnimationOnMount:void 0,unmountOnExit:void 0}),emits:[`exitComplete`],setup(e,{emit:t}){let n=Ph(e,t);return kh(n),G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(n).presenceProps,{"as-child":e.asChild,"data-scope":`presence`,"data-part":`root`}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[G_,K_]=hl(`DialogContext`),Kre=M({__name:`dialog-backdrop`,props:{asChild:{type:Boolean}},setup(e){let t=K_(),n=Qm();return G(),(e,r)=>(F(),L(k(W_),H(k(t).getBackdropProps(),{present:k(t).open,"lazy-mount":k(n).lazyMount,"unmount-on-exit":k(n).unmountOnExit}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`present`,`lazy-mount`,`unmount-on-exit`]))}}),qre=M({__name:`dialog-close-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=K_();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Jre=M({__name:`dialog-content`,props:{asChild:{type:Boolean}},setup(e){let t=K_(),n=Ah(),r=U(()=>gd(t.value.getContentProps(),n.value.presenceProps));return G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Yre=M({__name:`dialog-context`,setup(e){let t=K_();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Xre=M({__name:`dialog-description`,props:{asChild:{type:Boolean}},setup(e){let t=K_();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getDescriptionProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Zre=M({__name:`dialog-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=K_(),n=Qm(),r=Ph(U(()=>({...n.value,present:t.value.open})));return kh(r),G(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Qre=M({__name:`dialog-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){let t=e;return G_(U(()=>t.value)),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),$re=Object.defineProperty,eie=(e,t,n)=>t in e?$re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q_=(e,t,n)=>eie(e,typeof t==`symbol`?t:t+``,n),J_={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},tie=[],nie=class{constructor(e,t){q_(this,`trapStack`),q_(this,`config`),q_(this,`doc`),q_(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),q_(this,`listenerCleanups`,[]),q_(this,`handleFocus`,e=>{let t=yu(e),n=this.findContainerIndex(t,e)>=0;if(n||eu(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode)if(Iu(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>Iu(e)>0))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),q_(this,`handlePointerDown`,e=>{let t=yu(e);if(!(this.findContainerIndex(t,e)>=0)){if(X_(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}X_(this.config.allowOutsideClick,e)||e.preventDefault()}}),q_(this,`handleClick`,e=>{let t=yu(e);this.findContainerIndex(t,e)>=0||X_(this.config.clickOutsideDeactivates,e)||X_(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),q_(this,`handleTabKey`,e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;Y_(e)&&e.preventDefault(),this.tryFocus(n)}}),q_(this,`handleEscapeKey`,e=>{rie(e)&&X_(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),q_(this,`_mutationObserver`),q_(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),q_(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0})})}),q_(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!Mu(e)){let t=lu(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e)throw Error(`Your focus-trap needs to have at least one focusable element`);return e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),e}),q_(this,`tryFocus`,e=>{if(e!==!1&&e!==lu(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,iie(e)&&e.select()}}),q_(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),J_.deactivateTrap(this.trapStack,this);let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{Z_(()=>{if(a){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),q_(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),q_(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);return this.state.paused=!1,t?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.(),this}),q_(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),q_(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||(t===!1?!1:e)}),q_(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),q_(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),q_(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||yu(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Mu(r)&&!Pu(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=Iu(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else Y_(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||Mu(r)&&!Pu(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=Iu(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else Y_(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||tie;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(e){return Y_(e)&&!e.shiftKey},isKeyBackward(e){return Y_(e)&&e.shiftKey},...t};this.doc=n.document||su(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:t,tabbableNodes:r})=>t.contains(e)||n?.includes(t)||r.find(t=>t===e))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=Nu(e),n=ju(e),r=t.length>0?t[0]:void 0,i=t.length>0?t[t.length-1]:void 0,a=n.find(e=>Pu(e)),o=n.slice().reverse().find(e=>Pu(e)),s=!!t.find(e=>Iu(e)>0);function c(e,r=!0){let i=t.indexOf(e);return i<0?r?n.slice(n.indexOf(e)+1).find(e=>Pu(e)):n.slice(0,n.indexOf(e)).reverse().find(e=>Pu(e)):t[i+(r?1:-1)]}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}addListeners(){if(this.state.active)return J_.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Z_(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ou(this.doc,`focusin`,this.handleFocus,!0),Ou(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),Ou(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),Ou(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),Ou(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),Ou(this.doc,`keydown`,this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=lu(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Y_=e=>e.key===`Tab`,X_=(e,...t)=>typeof e==`function`?e(...t):e,rie=e=>!e.isComposing&&e.key===`Escape`,Z_=e=>setTimeout(e,0),iie=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function Q_(e,t={}){let n,r=Bu(()=>{let r=typeof e==`function`?e():e;if(r){n=new nie(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:r,...t,document:su(r)});try{n.activate()}catch{}}});return function(){n?.deactivate(),r()}}var $_=`data-scroll-lock`;function aie(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function ev(e){let t=e??document,n=t.defaultView??window,{documentElement:r,body:i}=t;if(i.hasAttribute($_))return;let a=n.innerWidth-r.clientWidth;i.setAttribute($_,``);let o=()=>ad(r,`--scrollbar-width`,`${a}px`),s=aie(r),c=[o(),gu()?(()=>{let{scrollX:e,scrollY:t,visualViewport:r}=n,o=r?.offsetLeft??0,c=r?.offsetTop??0,l=id(i,{position:`fixed`,overflow:`hidden`,top:`${-(t-Math.floor(c))}px`,left:`${-(e-Math.floor(o))}px`,right:`0`,[s]:`${a}px`});return()=>{l?.(),n.scrollTo({left:e,top:t,behavior:`instant`})}})():id(i,{overflow:`hidden`,[s]:`${a}px`})];return()=>{c.forEach(e=>e?.()),i.removeAttribute($_)}}var tv=Wd(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),nv=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,rv=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,iv=e=>e.ids?.content??`dialog:${e.id}:content`,av=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,ov=e=>e.ids?.title??`dialog:${e.id}:title`,sv=e=>e.ids?.description??`dialog:${e.id}:description`,cv=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,lv=e=>e.getById(iv(e)),oie=e=>e.getById(nv(e)),sie=e=>e.getById(rv(e)),cie=e=>e.getById(av(e)),lie=e=>e.getById(ov(e)),uie=e=>e.getById(sv(e)),die=e=>e.getById(cv(e));function fie(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},getTriggerProps(){return t.button({...tv.trigger.attrs,dir:a(`dir`),id:av(o),"aria-haspopup":`dialog`,type:`button`,"aria-expanded":c,"data-state":c?`open`:`closed`,"aria-controls":iv(o),onClick(e){e.defaultPrevented||r({type:`TOGGLE`})}})},getBackdropProps(){return t.element({...tv.backdrop.attrs,dir:a(`dir`),hidden:!c,id:rv(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...tv.positioner.attrs,dir:a(`dir`),id:nv(o),style:{pointerEvents:c?void 0:`none`}})},getContentProps(){let e=i.get(`rendered`);return t.element({...tv.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:iv(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":!0,"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:ov(o),"aria-describedby":e.description?sv(o):void 0})},getTitleProps(){return t.element({...tv.title.attrs,dir:a(`dir`),id:ov(o)})},getDescriptionProps(){return t.element({...tv.description.attrs,dir:a(`dir`),id:sv(o)})},getCloseTriggerProps(){return t.button({...tv.closeTrigger.attrs,dir:a(`dir`),id:cv(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var pie=vd({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>die(t):void 0,i=typeof e.modal==`boolean`?e.modal:!0;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`syncZIndex`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}]}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Ym(()=>lv(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),exclude:[cie(e)],onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return ev(e.getDoc())},trapFocus({scope:e,prop:t}){return t(`trapFocus`)?Q_(()=>lv(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:t(`initialFocusEl`),setReturnFocus:e=>t(`finalFocusEl`)?.()??e}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?U_(()=>[lv(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Bu(()=>{e.set(`rendered`,{title:!!lie(t),description:!!uie(t)})})},syncZIndex({scope:e}){Bu(()=>{let t=lv(e);if(!t)return;let n=du(t);[oie(e),sie(e)].forEach(e=>{e?.style.setProperty(`--z-index`,n.zIndex),e?.style.setProperty(`--layer-index`,n.getPropertyValue(`--layer-index`))})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}});wd()([`aria-label`,`closeOnEscape`,`closeOnInteractOutside`,`dir`,`finalFocusEl`,`getRootNode`,`getRootNode`,`id`,`id`,`ids`,`initialFocusEl`,`modal`,`onEscapeKeyDown`,`onFocusOutside`,`onInteractOutside`,`onOpenChange`,`onPointerDownOutside`,`onRequestDismiss`,`defaultOpen`,`open`,`persistentElements`,`preventScroll`,`restoreFocus`,`role`,`trapFocus`]);var mie=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(pie,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...Zd(e),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)},onRequestDismiss:e=>{t?.(`requestDismiss`,e),a.onRequestDismiss?.(e)}}}));return U(()=>fie(a,kd))},uv=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:Kre,CloseTrigger:qre,Content:Jre,Context:Yre,Description:Xre,Positioner:Zre,Root:M({__name:`dialog-root`,props:Xi({"aria-label":{},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},preventScroll:{type:Boolean},restoreFocus:{type:Boolean},role:{},trapFocus:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,preventScroll:void 0,restoreFocus:void 0,trapFocus:void 0}),emits:[`escapeKeyDown`,`focusOutside`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`update:open`],setup(e,{emit:t}){let n=e;return G_(mie(n,t)),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),RootProvider:Qre,Title:M({__name:`dialog-title`,props:{asChild:{type:Boolean}},setup(e){let t=K_();return G(),(e,n)=>(F(),L(k(W).h2,H(k(t).getTitleProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Trigger:M({__name:`dialog-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=K_();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),hie=M({__name:`field-context`,setup(e){let t=yh();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),gie=M({__name:`field-error-text`,props:{asChild:{type:Boolean}},setup(e){let t=yh();return G(),(e,n)=>k(t).invalid?(F(),L(k(W).span,H({key:0},k(t).getErrorTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`])):V(``,!0)}}),_ie=M({__name:`field-helper-text`,props:{asChild:{type:Boolean}},setup(e){let t=yh();return G(),(e,n)=>(F(),L(k(W).span,H(k(t).getHelperTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),vie=M({__name:`field-input`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=yh(),r=t;return G(),(e,t)=>(F(),L(k(W).input,H(k(n).getInputProps(),{"as-child":e.asChild,value:e.modelValue,onInput:t[0]||=e=>r(`update:modelValue`,e.target.value)}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`,`value`]))}}),yie=M({__name:`field-label`,props:{asChild:{type:Boolean}},setup(e){let t=yh();return G(),(e,n)=>(F(),L(k(W).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),bie=M({__name:`field-required-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=yh();return G(),(e,n)=>k(t).required?(F(),L(k(W).span,H({key:0},k(t).getRequiredIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[n[0]||=B(`*`,-1)])]),_:3},16,[`as-child`])):N(e.$slots,`fallback`,{key:1})}}),xie=M({__name:`field-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return vh(n),G(),(e,t)=>(F(),L(k(W).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),dv=Wd(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),Sie=(e={})=>{let t=qd(Jd),n=$t({hasErrorText:!1,hasHelperText:!1}),r=Hr(),i=U(()=>A(e).id??r),a=O(null),o=U(()=>A(e).ids?.control??`field::${i.value}`),s=U(()=>A(e).ids?.errorText??`field::${i.value}::error-text`),c=U(()=>A(e).ids?.helperText??`field::${i.value}::helper-text`),l=U(()=>A(e).ids?.label??`field::${i.value}::label`);Ei(()=>{let e=Hd(a);if(!e)return;let r=()=>{let e=t.value.getRootNode();n.hasErrorText=!!e.getElementById(s.value),n.hasHelperText=!!e.getElementById(c.value)};r();let i=new(t.value.getWindow()).MutationObserver(r);i.observe(e,{childList:!0,subtree:!0}),ki(()=>{i.disconnect()})});let u=()=>{let t=A(e);return{...dv.root.attrs,id:o.value,role:`group`,"data-disabled":Zl(t.disabled),"data-invalid":Zl(t.invalid),"data-readonly":Zl(t.readOnly)}},d=()=>{let t=A(e);return{...dv.label.attrs,id:l.value,"data-disabled":Zl(t.disabled),"data-invalid":Zl(t.invalid),"data-readonly":Zl(t.readOnly),"data-required":Zl(t.required),htmlFor:i.value}},f=U(()=>{let t=A(e),r=[];return n.hasErrorText&&t.invalid&&r.push(s.value),n.hasHelperText&&r.push(c.value),r}),p=()=>{let t=A(e);return{"aria-describedby":f.value.join(` `)||void 0,"aria-invalid":Ql(t.invalid),"data-invalid":Zl(t.invalid),"data-required":Zl(t.required),"data-readonly":Zl(t.readOnly),id:i.value,required:t.required,disabled:t.disabled,readOnly:t.readOnly}},m=()=>({...p(),...dv.input.attrs}),h=()=>({...p(),...dv.textarea.attrs}),g=()=>({...p(),...dv.select.attrs}),_=()=>{let t=A(e);return{id:c.value,...dv.helperText.attrs,"data-disabled":Zl(t.disabled)}},v=()=>({id:s.value,...dv.errorText.attrs,"aria-live":`polite`}),y=()=>({"aria-hidden":!0,...dv.requiredIndicator.attrs});return U(()=>{let t=A(e);return{ariaDescribedby:f.value.join(` `)||void 0,ids:{control:i.value,label:l.value,errorText:s.value,helperText:c.value},refs:{rootRef:a},disabled:t.disabled,invalid:t.invalid,readOnly:t.readOnly,required:t.required,getLabelProps:d,getRootProps:u,getInputProps:m,getTextareaProps:h,getSelectProps:g,getHelperTextProps:_,getErrorTextProps:v,getRequiredIndicatorProps:y}})},Cie=M({__name:`field-root`,props:Xi({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){let t=Sie(e);return vh(t),G(),(e,n)=>(F(),L(k(W).div,H(k(t).getRootProps(),{ref:k(t).refs.rootRef,"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),wie=M({__name:`field-select`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=yh(),r=t;return G(),(e,t)=>(F(),L(k(W).select,H(k(n).getSelectProps(),{value:e.modelValue,onChange:t[0]||=e=>r(`update:modelValue`,e.target.value),"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`value`,`as-child`]))}}),Tie=e=>{if(!e)return;let t=du(e),n=cu(e),r=su(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);Object.defineProperty(e,`value`,{...a,set(){a?.set?.apply(this,arguments),i()}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},fv=Object.freeze(Object.defineProperty({__proto__:null,Context:hie,ErrorText:gie,HelperText:_ie,Input:vie,Label:yie,RequiredIndicator:bie,Root:Cie,RootProvider:xie,Select:wie,Textarea:M({__name:`field-textarea`,props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=yh(),i=t,a=O();return Ei(()=>{let e=Hd(a);if(!e||!n.autoresize)return;let t=Tie(e);ki(()=>t?.())}),G(),(e,t)=>(F(),L(k(W).textarea,H({ref_key:`textareaRef`,ref:a},k(r).getTextareaProps(),{value:e.modelValue,onInput:t[0]||=e=>i(`update:modelValue`,e.target.value),style:n.autoresize?{resize:`none`,overflow:`hidden`}:void 0,"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`value`,`style`,`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),[pv,mv]=hl(`MenuContext`),Eie=M({__name:`menu-arrow-tip`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowTipProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Die=M({__name:`menu-arrow`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[hv,Oie]=hl(`MenuItemContext`),[gv,_v]=hl(`MenuItemPropsContext`),kie=M({__name:`menu-checkbox-item`,props:Xi({checked:{type:Boolean},value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{checked:void 0,disabled:void 0,closeOnSelect:void 0}),emits:[`update:checked`],setup(e,{emit:t}){let n=e,r=t,i=mv(),a=U(()=>({...n,type:`checkbox`,onCheckedChange:e=>r(`update:checked`,e)}));return hv(U(()=>i.value.getOptionItemState(a.value))),gv(a),G(),(e,t)=>(F(),L(k(W).div,H(k(i).getOptionItemProps(a.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Aie=M({__name:`menu-content`,props:{asChild:{type:Boolean}},setup(e){let t=mv(),n=Ah(),r=U(()=>gd(t.value.getContentProps(),n.value.presenceProps));return G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),jie=M({__name:`menu-context-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getContextTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Mie=M({__name:`menu-context`,setup(e){let t=mv();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Nie=M({__name:`menu-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Pie=M({__name:`menu-item-context`,setup(e){let t=Oie();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[vv,yv]=hl(`MenuItemGroupContext`),Fie=M({__name:`menu-item-group-label`,props:{asChild:{type:Boolean}},setup(e){let t=mv(),n=yv();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemGroupLabelProps({htmlFor:k(n).id}),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Iie=M({__name:`menu-item-group`,props:{id:{},asChild:{type:Boolean}},setup(e){let t=e,n=mv(),r=Hr(),i=t.id??r,a=U(()=>({id:i}));return vv(a),G(),(e,t)=>(F(),L(k(W).div,H(k(n).getItemGroupProps(a.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Lie=M({__name:`menu-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=mv(),n=_v();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Rie=M({__name:`menu-item-text`,props:{asChild:{type:Boolean}},setup(e){let t=mv(),n=_v();return G(),(e,r)=>(F(),L(k(W).div,H(k(t).getItemTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zie=M({__name:`menu-item`,props:Xi({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=mv(),a=U(()=>i.value.getItemState(n));return gv(U(()=>n)),hv(a),Ei(()=>{let e=i.value.addItemListener({id:a.value.id,onSelect:()=>r(`select`)});ki(()=>e?.())}),G(),(e,t)=>(F(),L(k(W).div,H(k(i).getItemProps(n),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Bie=M({__name:`menu-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=mv(),n=Qm(),r=Ph(U(()=>({...n.value,present:t.value.open})));return kh(r),G(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Vie=M({__name:`menu-radio-item-group`,props:{id:{},modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=mv(),a=Hr(),o=n.id??a,s=U(()=>({id:o,value:n.modelValue,onValueChange:e=>r(`update:modelValue`,e.value)}));return vv(s),G(),(e,t)=>(F(),L(k(W).div,H(k(i).getItemGroupProps(s.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Hie=M({__name:`menu-radio-item`,props:Xi({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),setup(e){let t=e,n=mv(),r=yv(),i=U(()=>({...t,checked:r.value.value===t.value,type:`radio`,onCheckedChange:()=>r.value.onValueChange?.({value:t.value})}));return hv(U(()=>n.value.getOptionItemState(i.value))),gv(i),G(),(e,t)=>(F(),L(k(W).div,H(k(n).getOptionItemProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[bv,xv]=hl(`MenuMachineContext`),[Sv,Uie]=hl(`MenuTriggerItemContext`),Wie=M({__name:`menu-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,{value:{machine:n,api:r}}=t,i=mv(),a=xv();return Ei(()=>{a&&(i.value.setChild(n),r.value.setParent(a))}),Sv(U(()=>i.value.getTriggerItemProps(r.value))),bv(n),pv(r),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),Cv=Wd(`menu`).parts(`arrow`,`arrowTip`,`content`,`contextTrigger`,`indicator`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`positioner`,`separator`,`trigger`,`triggerItem`).build(),wv=e=>e.ids?.trigger??`menu:${e.id}:trigger`,Tv=e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,Ev=e=>e.ids?.content??`menu:${e.id}:content`,Gie=e=>e.ids?.arrow??`menu:${e.id}:arrow`,Dv=e=>e.ids?.positioner??`menu:${e.id}:popper`,Kie=(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,Ov=(e,t)=>`${e.id}/${t}`,kv=e=>e?.dataset.value??null,Av=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,jv=e=>e.getById(Ev(e)),Mv=e=>e.getById(Dv(e)),Nv=e=>e.getById(wv(e)),qie=(e,t)=>t?e.getById(Ov(e,t)):null,Pv=e=>e.getById(Tv(e)),Fv=e=>{let t=`[role^="menuitem"][data-ownedby=${CSS.escape(Ev(e))}]:not([data-disabled])`;return qu(jv(e),t)},Jie=e=>_l(Fv(e)),Yie=e=>vl(Fv(e)),Iv=(e,t)=>t?e.id===t||e.dataset.value===t:!1,Xie=(e,t)=>{let n=Fv(e);return wl(n,n.findIndex(e=>Iv(e,t.value)),{loop:t.loop??t.loopFocus})},Zie=(e,t)=>{let n=Fv(e);return El(n,n.findIndex(e=>Iv(e,t.value)),{loop:t.loop??t.loopFocus})},Qie=(e,t)=>{let n=Fv(e),r=n.find(e=>Iv(e,t.value));return sd(n,{state:t.typeaheadState,key:t.key,activeId:r?.id??null})},Lv=e=>$l(e)&&(e.dataset.disabled===``||e.hasAttribute(`disabled`)),$ie=e=>!!e?.getAttribute(`role`)?.startsWith(`menuitem`)&&!!e?.hasAttribute(`aria-controls`),Rv=`menu:select`;function eae(e,t){if(!e)return;let n=new(cu(e)).CustomEvent(Rv,{detail:{value:t}});e.dispatchEvent(n)}function tae(e,t){let{context:n,send:r,state:i,computed:a,prop:o,scope:s}=e,c=i.hasTag(`open`),l=n.get(`isSubmenu`),u=a(`isTypingAhead`),d=o(`composite`),f=n.get(`currentPlacement`),p=n.get(`anchorPoint`),m=n.get(`highlightedValue`),h=Em({...o(`positioning`),placement:p?`bottom`:f});function g(e){return{id:Ov(s,e.value),disabled:!!e.disabled,highlighted:m===e.value}}function _(e){let t=e.valueText??e.value;return{...e,id:e.value,valueText:t}}function v(e){return{...g(_(e)),checked:!!e.checked}}function y(n){let{closeOnSelect:i,valueText:a,value:o}=n,c=g(n),l=Ov(s,o);return t.element({...Cv.item.attrs,id:l,role:`menuitem`,"aria-disabled":Ql(c.disabled),"data-disabled":Zl(c.disabled),"data-ownedby":Ev(s),"data-highlighted":Zl(c.highlighted),"data-value":o,"data-valuetext":a,onDragStart(e){e.currentTarget.matches(`a[href]`)&&e.preventDefault()},onPointerMove(e){if(c.disabled||e.pointerType!==`mouse`)return;let t=e.currentTarget;c.highlighted||r({type:`ITEM_POINTERMOVE`,id:l,target:t,closeOnSelect:i})},onPointerLeave(t){if(c.disabled||t.pointerType!==`mouse`||!e.event.previous()?.type.includes(`POINTER`))return;let n=t.currentTarget;r({type:`ITEM_POINTERLEAVE`,id:l,target:n,closeOnSelect:i})},onPointerDown(e){if(c.disabled)return;let t=e.currentTarget;r({type:`ITEM_POINTERDOWN`,target:t,id:l,closeOnSelect:i})},onClick(e){if(xu(e)||bu(e)||c.disabled)return;let t=e.currentTarget;r({type:`ITEM_CLICK`,target:t,id:l,closeOnSelect:i})}})}return{highlightedValue:m,open:c,setOpen(e){i.hasTag(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},setHighlightedValue(e){r({type:`HIGHLIGHTED.SET`,value:e})},setParent(e){r({type:`PARENT.SET`,value:e,id:e.prop(`id`)})},setChild(e){r({type:`CHILD.SET`,value:e,id:e.prop(`id`)})},reposition(e={}){r({type:`POSITIONING.SET`,options:e})},addItemListener(e){let t=s.getById(e.id);if(!t)return;let n=()=>e.onSelect?.();return t.addEventListener(Rv,n),()=>t.removeEventListener(Rv,n)},getContextTriggerProps(){return t.element({...Cv.contextTrigger.attrs,dir:o(`dir`),id:Tv(s),"data-state":c?`open`:`closed`,onPointerDown(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_START`,point:Du(e)})},onPointerCancel(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onPointerMove(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onPointerUp(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onContextMenu(e){r({type:`CONTEXT_MENU`,point:Du(e)}),e.preventDefault()},style:{WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`}})},getTriggerItemProps(e){let t=e.getTriggerProps();return gd(y({value:t.id}),t)},getTriggerProps(){return t.button({...l?Cv.triggerItem.attrs:Cv.trigger.attrs,"data-placement":n.get(`currentPlacement`),type:`button`,dir:o(`dir`),id:wv(s),"data-uid":o(`id`),"aria-haspopup":d?`menu`:`dialog`,"aria-controls":Ev(s),"aria-expanded":c||void 0,"data-state":c?`open`:`closed`,onPointerMove(e){if(e.pointerType!==`mouse`||Lv(e.currentTarget)||!l)return;let t=Du(e);r({type:`TRIGGER_POINTERMOVE`,target:e.currentTarget,point:t})},onPointerLeave(e){if(Lv(e.currentTarget)||e.pointerType!==`mouse`||!l)return;let t=Du(e);r({type:`TRIGGER_POINTERLEAVE`,target:e.currentTarget,point:t})},onPointerDown(e){Lv(e.currentTarget)||wu(e)||e.preventDefault()},onClick(e){e.defaultPrevented||Lv(e.currentTarget)||r({type:`TRIGGER_CLICK`,target:e.currentTarget})},onBlur(){r({type:`TRIGGER_BLUR`})},onFocus(){r({type:`TRIGGER_FOCUS`})},onKeyDown(e){if(e.defaultPrevented)return;let t={ArrowDown(){r({type:`ARROW_DOWN`})},ArrowUp(){r({type:`ARROW_UP`})},Enter(){r({type:`ARROW_DOWN`,src:`enter`})},Space(){r({type:`ARROW_DOWN`,src:`space`})}}[Eu(e,{orientation:`vertical`,dir:o(`dir`)})];t&&(e.preventDefault(),t(e))}})},getIndicatorProps(){return t.element({...Cv.indicator.attrs,dir:o(`dir`),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...Cv.positioner.attrs,dir:o(`dir`),id:Dv(s),style:h.floating})},getArrowProps(){return t.element({id:Gie(s),...Cv.arrow.attrs,dir:o(`dir`),style:h.arrow})},getArrowTipProps(){return t.element({...Cv.arrowTip.attrs,dir:o(`dir`),style:h.arrowTip})},getContentProps(){return t.element({...Cv.content.attrs,id:Ev(s),"aria-label":o(`aria-label`),hidden:!c,"data-state":c?`open`:`closed`,role:d?`menu`:`dialog`,tabIndex:0,dir:o(`dir`),"aria-activedescendant":a(`highlightedId`)||void 0,"aria-labelledby":wv(s),"data-placement":f,onPointerEnter(e){e.pointerType===`mouse`&&r({type:`MENU_POINTERENTER`})},onKeyDown(e){if(e.defaultPrevented||!ou(e.currentTarget,yu(e)))return;let t=yu(e);if(!(t?.closest(`[role=menu]`)===e.currentTarget||t===e.currentTarget))return;if(e.key===`Tab`&&!Ru(e)){e.preventDefault();return}let n={ArrowDown(){r({type:`ARROW_DOWN`})},ArrowUp(){r({type:`ARROW_UP`})},ArrowLeft(){r({type:`ARROW_LEFT`})},ArrowRight(){r({type:`ARROW_RIGHT`})},Enter(){r({type:`ENTER`})},Space(e){u?r({type:`TYPEAHEAD`,key:e.key}):n.Enter?.(e)},Home(){r({type:`HOME`})},End(){r({type:`END`})}},i=n[Eu(e,{dir:o(`dir`)})];if(i){i(e),e.stopPropagation(),e.preventDefault();return}o(`typeahead`)&&Hte(e)&&(Wte(e)||au(t)||(r({type:`TYPEAHEAD`,key:e.key}),e.preventDefault()))}})},getSeparatorProps(){return t.element({...Cv.separator.attrs,role:`separator`,dir:o(`dir`),"aria-orientation":`horizontal`})},getItemState:g,getItemProps:y,getOptionItemState:v,getOptionItemProps(e){let{type:n,disabled:i,closeOnSelect:a}=e,s=_(e),c=v(e);return{...y(s),...t.element({"data-type":n,...Cv.item.attrs,dir:o(`dir`),"data-value":s.value,role:`menuitem${n}`,"aria-checked":!!c.checked,"data-state":c.checked?`checked`:`unchecked`,onClick(e){if(i||xu(e)||bu(e))return;let t=e.currentTarget;r({type:`ITEM_CLICK`,target:t,option:s,closeOnSelect:a})}})}},getItemIndicatorProps(e){let n=v(Hl(e)),r=n.checked?`checked`:`unchecked`;return t.element({...Cv.itemIndicator.attrs,dir:o(`dir`),"data-disabled":Zl(n.disabled),"data-highlighted":Zl(n.highlighted),"data-state":Il(e,`checked`)?r:void 0,hidden:Il(e,`checked`)?!n.checked:void 0})},getItemTextProps(e){let n=v(Hl(e)),r=n.checked?`checked`:`unchecked`;return t.element({...Cv.itemText.attrs,dir:o(`dir`),"data-disabled":Zl(n.disabled),"data-highlighted":Zl(n.highlighted),"data-state":Il(e,`checked`)?r:void 0})},getItemGroupLabelProps(e){return t.element({...Cv.itemGroupLabel.attrs,id:Av(s,e.htmlFor),dir:o(`dir`)})},getItemGroupProps(e){return t.element({id:Kie(s,e.id),...Cv.itemGroup.attrs,dir:o(`dir`),"aria-labelledby":Av(s,e.id),role:`group`})}}}var{not:zv,and:Bv,or:nae}=_d(),rae=vd({props({props:e}){return{closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(e){Hu(e.node)},...e,positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t(`defaultHighlightedValue`)||null,value:t(`highlightedValue`),onChange(e){t(`onHighlightChange`)?.({highlightedValue:e})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(e){return`x: ${e?.x}, y: ${e?.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:{...sd.defaultOptions},positioningOverride:{}}},computed:{isRtl:({prop:e})=>e(`dir`)===`rtl`,isTypingAhead:({refs:e})=>e.get(`typeaheadState`).keysSoFar!==``,highlightedId:({context:e,scope:t,refs:n})=>Hv(n.get(`children`),e.get(`highlightedValue`),t)},watch({track:e,action:t,context:n,prop:r}){e([()=>n.get(`isSubmenu`)],()=>{t([`setSubmenuPlacement`])}),e([()=>n.hash(`anchorPoint`)],()=>{n.get(`anchorPoint`)&&t([`reposition`])}),e([()=>r(`open`)],()=>{t([`toggleVisibility`])})},on:{"PARENT.SET":{actions:[`setParentMenu`]},"CHILD.SET":{actions:[`setChildMenu`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],OPEN_AUTOFOCUS:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`highlightFirstItem`,`invokeOnOpen`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"HIGHLIGHTED.RESTORE":{actions:[`restoreHighlightedItem`]},"HIGHLIGHTED.SET":{actions:[`setHighlightedItem`]}},states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`},CONTEXT_MENU_START:{target:`opening:contextmenu`,actions:[`setAnchorPoint`]},CONTEXT_MENU:[{guard:`isOpenControlled`,actions:[`setAnchorPoint`,`invokeOnOpen`]},{target:`open`,actions:[`setAnchorPoint`,`invokeOnOpen`]}],TRIGGER_CLICK:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],TRIGGER_FOCUS:{guard:zv(`isSubmenu`),target:`closed`},TRIGGER_POINTERMOVE:{guard:`isSubmenu`,target:`opening`}}},"opening:contextmenu":{tags:[`closed`],effects:[`waitForLongPress`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`},CONTEXT_MENU_CANCEL:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"LONG_PRESS.OPEN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}]}},opening:{tags:[`closed`],effects:[`waitForOpenDelay`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`},BLUR:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TRIGGER_POINTERLEAVE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"DELAY.OPEN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}]}},closing:{tags:[`open`],effects:[`trackPointerMove`,`trackInteractOutside`,`waitForCloseDelay`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`]},MENU_POINTERENTER:{target:`open`,actions:[`clearIntentPolygon`]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`]}],"DELAY.CLOSE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`,`invokeOnClose`]}]}},closed:{tags:[`closed`],entry:[`clearHighlightedItem`,`focusTrigger`,`resumePointer`,`clearAnchorPoint`],on:{"CONTROLLED.OPEN":[{guard:nae(`isOpenAutoFocusEvent`,`isArrowDownEvent`),target:`open`,actions:[`highlightFirstItem`]},{guard:`isArrowUpEvent`,target:`open`,actions:[`highlightLastItem`]},{target:`open`}],CONTEXT_MENU_START:{target:`opening:contextmenu`,actions:[`setAnchorPoint`]},CONTEXT_MENU:[{guard:`isOpenControlled`,actions:[`setAnchorPoint`,`invokeOnOpen`]},{target:`open`,actions:[`setAnchorPoint`,`invokeOnOpen`]}],TRIGGER_CLICK:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}],TRIGGER_POINTERMOVE:{guard:`isTriggerItem`,target:`opening`},TRIGGER_BLUR:{target:`idle`},ARROW_DOWN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`highlightFirstItem`,`invokeOnOpen`]}],ARROW_UP:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`highlightLastItem`,`invokeOnOpen`]}]}},open:{tags:[`open`],effects:[`trackInteractOutside`,`trackPositioning`,`scrollToHighlightedItem`],entry:[`focusMenu`,`resumePointer`],on:{"CONTROLLED.CLOSE":[{target:`closed`,guard:`isArrowLeftEvent`,actions:[`focusParentMenu`]},{target:`closed`}],TRIGGER_CLICK:[{guard:Bv(zv(`isTriggerItem`),`isOpenControlled`),actions:[`invokeOnClose`]},{guard:zv(`isTriggerItem`),target:`closed`,actions:[`invokeOnClose`]}],CONTEXT_MENU:{actions:[`setAnchorPoint`,`focusMenu`]},ARROW_UP:{actions:[`highlightPrevItem`,`focusMenu`]},ARROW_DOWN:{actions:[`highlightNextItem`,`focusMenu`]},ARROW_LEFT:[{guard:Bv(`isSubmenu`,`isOpenControlled`),actions:[`invokeOnClose`]},{guard:`isSubmenu`,target:`closed`,actions:[`focusParentMenu`,`invokeOnClose`]}],HOME:{actions:[`highlightFirstItem`,`focusMenu`]},END:{actions:[`highlightLastItem`,`focusMenu`]},ARROW_RIGHT:{guard:`isTriggerItemHighlighted`,actions:[`openSubmenu`]},ENTER:[{guard:`isTriggerItemHighlighted`,actions:[`openSubmenu`]},{actions:[`clickHighlightedItem`]}],ITEM_POINTERMOVE:[{guard:zv(`isPointerSuspended`),actions:[`setHighlightedItem`,`focusMenu`]},{actions:[`setLastHighlightedItem`]}],ITEM_POINTERLEAVE:{guard:Bv(zv(`isPointerSuspended`),zv(`isTriggerItem`)),actions:[`clearHighlightedItem`]},ITEM_CLICK:[{guard:Bv(zv(`isTriggerItemHighlighted`),zv(`isHighlightedItemEditable`),`closeOnSelect`,`isOpenControlled`),actions:[`invokeOnSelect`,`setOptionState`,`closeRootMenu`,`invokeOnClose`]},{guard:Bv(zv(`isTriggerItemHighlighted`),zv(`isHighlightedItemEditable`),`closeOnSelect`),target:`closed`,actions:[`invokeOnSelect`,`setOptionState`,`closeRootMenu`,`invokeOnClose`]},{guard:Bv(zv(`isTriggerItemHighlighted`),zv(`isHighlightedItemEditable`)),actions:[`invokeOnSelect`,`setOptionState`]},{actions:[`setHighlightedItem`]}],TRIGGER_POINTERMOVE:{guard:`isTriggerItem`,actions:[`setIntentPolygon`]},TRIGGER_POINTERLEAVE:{target:`closing`},ITEM_POINTERDOWN:{actions:[`setHighlightedItem`]},TYPEAHEAD:{actions:[`highlightMatchedItem`]},FOCUS_MENU:{actions:[`focusMenu`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e(`closeOnSelect`)),isTriggerItem:({event:e})=>$ie(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>!!(e.target??t.getById(n(`highlightedId`)))?.hasAttribute(`aria-controls`),isSubmenu:({context:e})=>e.get(`isSubmenu`),isPointerSuspended:({context:e})=>e.get(`suspendPointer`),isHighlightedItemEditable:({scope:e,computed:t})=>au(e.getById(t(`highlightedId`))),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isArrowLeftEvent:({event:e})=>e.previousEvent?.type===`ARROW_LEFT`,isArrowUpEvent:({event:e})=>e.previousEvent?.type===`ARROW_UP`,isArrowDownEvent:({event:e})=>e.previousEvent?.type===`ARROW_DOWN`,isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type===`OPEN_AUTOFOCUS`},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:`DELAY.OPEN`})},100);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:`DELAY.CLOSE`})},300);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:`LONG_PRESS.OPEN`})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:r}){if(Pv(n))return;let i={...t(`positioning`),...r.get(`positioningOverride`)};return e.set(`currentPlacement`,i.placement),wm(Nv(n),()=>Mv(n),{...i,defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackInteractOutside({refs:e,scope:t,prop:n,context:r,send:i}){let a=()=>jv(t),o=!0;return Ym(a,{type:`menu`,defer:!0,exclude:[Nv(t)],onInteractOutside:n(`onInteractOutside`),onRequestDismiss:n(`onRequestDismiss`),onFocusOutside(e){n(`onFocusOutside`)?.(e);let r=yu(e.detail.originalEvent);if(ou(Pv(t),r)){e.preventDefault();return}},onEscapeKeyDown(t){n(`onEscapeKeyDown`)?.(t),r.get(`isSubmenu`)&&t.preventDefault(),Vv({parent:e.get(`parent`)})},onPointerDownOutside(e){n(`onPointerDownOutside`)?.(e);let r=yu(e.detail.originalEvent);if(ou(Pv(t),r)&&e.detail.contextmenu){e.preventDefault();return}o=!e.detail.focusable},onDismiss(){i({type:`CLOSE`,src:`interact-outside`,restoreFocus:o})}})},trackPointerMove({context:e,scope:t,send:n,refs:r,flush:i}){let a=r.get(`parent`);return i(()=>{a.context.set(`suspendPointer`,!0)}),Ou(t.getDoc(),`pointermove`,t=>{iae(e.get(`intentPolygon`),{x:t.clientX,y:t.clientY})||(n({type:`POINTER_MOVED_AWAY_FROM_SUBMENU`}),a.context.set(`suspendPointer`,!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){let r=()=>{e.current().type.startsWith(`ITEM_POINTER`)||Ku(t.getById(n(`highlightedId`)),{rootEl:jv(t),block:`nearest`})};return Bu(()=>r()),Vu(()=>jv(t),{defer:!0,attributes:[`aria-activedescendant`],callback:r})}},actions:{setAnchorPoint({context:e,event:t}){e.set(`anchorPoint`,e=>kl(e,t.point)?e:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get(`isSubmenu`))return;let r=t(`isRtl`)?`left-start`:`right-start`;n.set(`positioningOverride`,{placement:r,gutter:0})},reposition({context:e,scope:t,prop:n,event:r,refs:i}){let a=()=>Mv(t),o=e.get(`anchorPoint`),s=o?()=>({width:0,height:0,...o}):void 0,c={...n(`positioning`),...i.get(`positioningOverride`)};wm(Nv(t),a,{...c,defer:!0,getAnchorRect:s,...r.options??{},listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:r}=e.option;r===`radio`?n?.(!0):r===`checkbox`&&n?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:n,context:r}){let i=e.getById(t(`highlightedId`));if(!i||i.dataset.disabled)return;let a=r.get(`highlightedValue`);ru(i)?n(`navigate`)?.({value:a,node:i,href:i.href}):queueMicrotask(()=>i.click())},setIntentPolygon({context:e,scope:t,event:n}){let r=jv(t),i=e.get(`currentPlacement`);if(!r||!i)return;let a=Lre(r.getBoundingClientRect(),i);if(!a)return;let o=fm(i)===`right`?-5:5;e.set(`intentPolygon`,[{...n.point,x:n.point.x+o},...a])},clearIntentPolygon({context:e}){e.set(`intentPolygon`,null)},clearAnchorPoint({context:e}){e.set(`anchorPoint`,null)},resumePointer({refs:e,flush:t}){let n=e.get(`parent`);n&&t(()=>{n.context.set(`suspendPointer`,!1)})},setHighlightedItem({context:e,event:t}){let n=t.value||kv(t.target);e.set(`highlightedValue`,n)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},focusMenu({scope:e}){Bu(()=>{let t=jv(e);Lu({root:t,enabled:!ou(t,e.getActiveElement()),filter(e){return!e.role?.startsWith(`menuitem`)}})?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(jv(t)?queueMicrotask:Bu)(()=>{let n=Jie(t);n&&e.set(`highlightedValue`,kv(n))})},highlightLastItem({context:e,scope:t}){(jv(t)?queueMicrotask:Bu)(()=>{let n=Yie(t);n&&e.set(`highlightedValue`,kv(n))})},highlightNextItem({context:e,scope:t,event:n,prop:r}){let i=Xie(t,{loop:n.loop,value:e.get(`highlightedValue`),loopFocus:r(`loopFocus`)});e.set(`highlightedValue`,kv(i))},highlightPrevItem({context:e,scope:t,event:n,prop:r}){let i=Zie(t,{loop:n.loop,value:e.get(`highlightedValue`),loopFocus:r(`loopFocus`)});e.set(`highlightedValue`,kv(i))},invokeOnSelect({context:e,prop:t,scope:n}){let r=e.get(`highlightedValue`);r!=null&&(eae(qie(n,r),r),t(`onSelect`)?.({value:r}))},focusTrigger({scope:e,context:t,event:n}){t.get(`isSubmenu`)||t.get(`anchorPoint`)||n.restoreFocus===!1||queueMicrotask(()=>Nv(e)?.focus({preventScroll:!0}))},highlightMatchedItem({scope:e,context:t,event:n,refs:r}){let i=Qie(e,{key:n.key,value:t.get(`highlightedValue`),typeaheadState:r.get(`typeaheadState`)});i&&t.set(`highlightedValue`,kv(i))},setParentMenu({refs:e,event:t,context:n}){e.set(`parent`,t.value),n.set(`isSubmenu`,!0)},setChildMenu({refs:e,event:t}){let n=e.get(`children`);n[t.id]=t.value,e.set(`children`,n)},closeRootMenu({refs:e}){Vv({parent:e.get(`parent`)})},openSubmenu({refs:e,scope:t,computed:n}){let r=t.getById(n(`highlightedId`))?.getAttribute(`data-uid`),i=e.get(`children`);(r?i[r]:null)?.send({type:`OPEN_AUTOFOCUS`})},focusParentMenu({refs:e}){e.get(`parent`)?.send({type:`FOCUS_MENU`})},setLastHighlightedItem({context:e,event:t}){e.set(`lastHighlightedValue`,kv(t.target))},restoreHighlightedItem({context:e}){e.get(`lastHighlightedValue`)&&(e.set(`highlightedValue`,e.get(`lastHighlightedValue`)),e.set(`lastHighlightedValue`,null))},restoreParentHighlightedItem({refs:e}){e.get(`parent`)?.send({type:`HIGHLIGHTED.RESTORE`})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:t})}}}});function Vv(e){let t=e.parent;for(;t&&t.context.get(`isSubmenu`);)t=t.refs.get(`parent`);t?.send({type:`CLOSE`})}function iae(e,t){return e?Rre(e,t):!1}function Hv(e,t,n){let r=Object.keys(e).length>0;if(!t)return null;if(!r)return Ov(n,t);for(let n in e){let r=e[n],i=wv(r.scope);if(i===t)return i}return Ov(n,t)}wd()([`anchorPoint`,`aria-label`,`closeOnSelect`,`composite`,`defaultHighlightedValue`,`defaultOpen`,`dir`,`getRootNode`,`highlightedValue`,`id`,`ids`,`loopFocus`,`navigate`,`onEscapeKeyDown`,`onFocusOutside`,`onHighlightChange`,`onInteractOutside`,`onOpenChange`,`onPointerDownOutside`,`onRequestDismiss`,`onSelect`,`open`,`positioning`,`typeahead`]),wd()([`closeOnSelect`,`disabled`,`value`,`valueText`]),wd()([`htmlFor`]),wd()([`id`]),wd()([`checked`,`closeOnSelect`,`disabled`,`onCheckedChange`,`type`,`value`,`valueText`]);var aae=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(rae,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...Zd(a),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onHighlightChange:e=>{t?.(`highlightChange`,e),t?.(`update:highlightedValue`,e.highlightedValue),a.onHighlightChange?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)},onSelect:e=>{t?.(`select`,e),a.onSelect?.(e)}}}));return{api:U(()=>tae(a,kd)),machine:a}},Uv=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Die,ArrowTip:Eie,CheckboxItem:kie,Content:Aie,Context:Mie,ContextTrigger:jie,Indicator:Nie,Item:zie,ItemContext:Pie,ItemGroup:Iie,ItemGroupLabel:Fie,ItemIndicator:Lie,ItemText:Rie,Positioner:Bie,RadioItem:Hie,RadioItemGroup:Vie,Root:M({__name:`menu-root`,props:Xi({anchorPoint:{},"aria-label":{},closeOnSelect:{type:Boolean},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},highlightedValue:{},id:{},ids:{},loopFocus:{type:Boolean},navigate:{type:Function},open:{type:Boolean},positioning:{},typeahead:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,loopFocus:void 0,open:void 0,typeahead:void 0}),emits:[`escapeKeyDown`,`focusOutside`,`highlightChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`select`,`update:open`,`update:highlightedValue`],setup(e,{emit:t}){let n=e,{api:r,machine:i}=aae(n,t),a=mv(),o=xv();return Ei(()=>{o&&(a.value.setChild(i),r.value.setParent(o))}),Sv(U(()=>a.value.getTriggerItemProps(r.value))),bv(i),pv(r),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),RootProvider:Wie,Separator:M({__name:`menu-separator`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).hr,H(k(t).getSeparatorProps(),{"as-child":e.asChild}),null,16,[`as-child`]))}}),Trigger:M({__name:`menu-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=mv();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),TriggerItem:M({__name:`menu-trigger-item`,props:{asChild:{type:Boolean}},setup(e){let t=Uie();return gv(U(()=>({value:t.value?.[`data-value`]}))),G(),(e,n)=>(F(),L(k(W).div,H(k(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),[Wv,Gv]=hl(`PopoverContext`),Kv=M({__name:`popover-anchor`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getAnchorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),qv=M({__name:`popover-arrow-tip`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowTipProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Jv=M({__name:`popover-arrow`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getArrowProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Yv=M({__name:`popover-close-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Xv=M({__name:`popover-content`,props:{asChild:{type:Boolean}},setup(e){let t=Gv(),n=Ah(),r=U(()=>gd(t.value.getContentProps(),n.value.presenceProps));return G(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Zv=M({__name:`popover-context`,setup(e){let t=Gv();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Qv=M({__name:`popover-description`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getDescriptionProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),$v=M({__name:`popover-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ey=M({__name:`popover-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=Gv(),n=Qm(),r=Ph(U(()=>({...n.value,present:t.value.open})));return kh(r),G(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(W).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ty=M({__name:`popover-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){let t=e;return Wv(U(()=>t.value)),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),ny=Wd(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),ry=e=>e.ids?.anchor??`popover:${e.id}:anchor`,iy=e=>e.ids?.trigger??`popover:${e.id}:trigger`,ay=e=>e.ids?.content??`popover:${e.id}:content`,oy=e=>e.ids?.positioner??`popover:${e.id}:popper`,sy=e=>e.ids?.arrow??`popover:${e.id}:arrow`,cy=e=>e.ids?.title??`popover:${e.id}:title`,ly=e=>e.ids?.description??`popover:${e.id}:desc`,uy=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,dy=e=>e.getById(ry(e)),fy=e=>e.getById(iy(e)),py=e=>e.getById(ay(e)),my=e=>e.getById(oy(e)),hy=e=>e.getById(cy(e)),gy=e=>e.getById(ly(e));function _y(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=n.matches(`open`),l=r.get(`currentPlacement`),u=a(`currentPortalled`),d=r.get(`renderedElements`),f=Em({...o(`positioning`),placement:l});return{portalled:u,open:c,setOpen(e){n.matches(`open`)!==e&&i({type:e?`OPEN`:`CLOSE`})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:sy(s),...ny.arrow.attrs,dir:o(`dir`),style:f.arrow})},getArrowTipProps(){return t.element({...ny.arrowTip.attrs,dir:o(`dir`),style:f.arrowTip})},getAnchorProps(){return t.element({...ny.anchor.attrs,dir:o(`dir`),id:ry(s)})},getTriggerProps(){return t.button({...ny.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":l,id:iy(s),"aria-haspopup":`dialog`,"aria-expanded":c,"data-state":c?`open`:`closed`,"aria-controls":ay(s),onPointerDown(e){Cu(e)&&vu()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:`TOGGLE`})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({...ny.indicator.attrs,dir:o(`dir`),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({id:oy(s),...ny.positioner.attrs,dir:o(`dir`),style:f.floating})},getContentProps(){return t.element({...ny.content.attrs,dir:o(`dir`),id:ay(s),tabIndex:-1,role:`dialog`,hidden:!c,"data-state":c?`open`:`closed`,"data-expanded":Zl(c),"aria-labelledby":d.title?cy(s):void 0,"aria-describedby":d.description?ly(s):void 0,"data-placement":l})},getTitleProps(){return t.element({...ny.title.attrs,id:cy(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({...ny.description.attrs,id:ly(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({...ny.closeTrigger.attrs,dir:o(`dir`),id:uy(s),type:`button`,"aria-label":`close`,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var vy=vd({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}]}},open:{effects:[`trapFocus`,`preventScroll`,`hideContentBelow`,`trackPositioning`,`trackDismissableElement`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){return e.set(`currentPlacement`,t(`positioning`).placement),wm(dy(n)??fy(n),()=>my(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>py(n),i=!0;return Ym(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:fy(n),defer:!0,onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),!t(`closeOnEscape`)&&e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t}){return e(`modal`)||!e(`portalled`)?void 0:cne(()=>py(t),{triggerElement:fy(t),defer:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e(`modal`)?U_(()=>[py(t),fy(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return ev(t.getDoc())},trapFocus({prop:e,scope:t}){return e(`modal`)?Q_(()=>py(t),{initialFocus:()=>Lu({root:py(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)})}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){wm(dy(n)??fy(n),()=>my(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},checkRenderedElements({context:e,scope:t}){Bu(()=>{Object.assign(e.get(`renderedElements`),{title:!!hy(t),description:!!gy(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||Bu(()=>{Lu({root:py(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)})?.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){let n=e.restoreFocus??e.previousEvent?.restoreFocus;n!=null&&!n||Bu(()=>{fy(t)?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});wd()([`autoFocus`,`closeOnEscape`,`closeOnInteractOutside`,`dir`,`getRootNode`,`id`,`ids`,`initialFocusEl`,`modal`,`onEscapeKeyDown`,`onFocusOutside`,`onInteractOutside`,`onOpenChange`,`onPointerDownOutside`,`onRequestDismiss`,`defaultOpen`,`open`,`persistentElements`,`portalled`,`positioning`]);var yy=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(vy,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...Zd(a),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)}}}));return U(()=>_y(a,kd))},by=Object.freeze(Object.defineProperty({__proto__:null,Anchor:Kv,Arrow:Jv,ArrowTip:qv,CloseTrigger:Yv,Content:Xv,Context:Zv,Description:Qv,Indicator:$v,Positioner:ey,Root:M({__name:`popover-root`,props:Xi({autoFocus:{type:Boolean},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},portalled:{type:Boolean},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{autoFocus:void 0,closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,portalled:void 0}),emits:[`escapeKeyDown`,`focusOutside`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`update:open`],setup(e,{emit:t}){let n=e;return Wv(yy(n,t)),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>N(e.$slots,`default`)}}),RootProvider:ty,Title:M({__name:`popover-title`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getTitleProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Trigger:M({__name:`popover-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=Gv();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),[xy,Sy]=hl(`TabsContext`),oae=M({__name:`tab-content`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=Sy(),r=Qm();return G(),(e,i)=>(F(),L(k(W_),H(k(n).getContentProps(t),{present:k(n).value===t.value,"lazy-mount":k(r).lazyMount,"unmount-on-exit":k(r).unmountOnExit,immediate:!0}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`present`,`lazy-mount`,`unmount-on-exit`]))}}),sae=M({__name:`tab-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=Sy();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),cae=M({__name:`tab-list`,props:{asChild:{type:Boolean}},setup(e){let t=Sy();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getListProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),lae=M({__name:`tab-trigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=Sy();return G(),(e,r)=>(F(),L(k(W).button,H(k(n).getTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),uae=M({__name:`tabs-context`,setup(e){let t=Sy();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),dae=M({__name:`tabs-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return xy(n),Zm(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Cy=Wd(`tabs`).parts(`root`,`list`,`trigger`,`content`,`indicator`).build(),wy=e=>e.ids?.root??`tabs:${e.id}`,Ty=e=>e.ids?.list??`tabs:${e.id}:list`,Ey=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,Dy=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,Oy=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,ky=e=>e.getById(Ty(e)),Ay=(e,t)=>e.getById(Ey(e,t)),jy=(e,t)=>e.getById(Dy(e,t)),My=e=>e.getById(Oy(e)),Ny=e=>{let t=`[role=tab][data-ownedby='${CSS.escape(Ty(e))}']:not([disabled])`;return qu(ky(e),t)},Py=e=>_l(Ny(e)),Fy=e=>vl(Ny(e)),Iy=(e,t)=>Zu(Ny(e),Dy(e,t.value),t.loopFocus),Ly=(e,t)=>Qu(Ny(e),Dy(e,t.value),t.loopFocus),Ry=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),zy=(e,t)=>By(Ry(Yu(Ny(e),Dy(e,t)))),By=e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`});function Vy(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`translations`),c=n.matches(`focused`),l=a(`orientation`)===`vertical`,u=a(`orientation`)===`horizontal`,d=a(`composite`);function f(e){return{selected:i.get(`value`)===e.value,focused:i.get(`focusedValue`)===e.value,disabled:!!e.disabled}}return{value:i.get(`value`),focusedValue:i.get(`focusedValue`),setValue(e){r({type:`SET_VALUE`,value:e})},clearValue(){r({type:`CLEAR_VALUE`})},setIndicatorRect(e){r({type:`SET_INDICATOR_RECT`,id:Dy(o,e)})},syncTabIndex(){r({type:`SYNC_TAB_INDEX`})},selectNext(e){r({type:`TAB_FOCUS`,value:e,src:`selectNext`}),r({type:`ARROW_NEXT`,src:`selectNext`})},selectPrev(e){r({type:`TAB_FOCUS`,value:e,src:`selectPrev`}),r({type:`ARROW_PREV`,src:`selectPrev`})},focus(){let e=i.get(`value`);e&&jy(o,e)?.focus()},getRootProps(){return t.element({...Cy.root.attrs,id:wy(o),"data-orientation":a(`orientation`),"data-focus":Zl(c),dir:a(`dir`)})},getListProps(){return t.element({...Cy.list.attrs,id:Ty(o),role:`tablist`,dir:a(`dir`),"data-focus":Zl(c),"aria-orientation":a(`orientation`),"data-orientation":a(`orientation`),"aria-label":s?.listLabel,onKeyDown(e){if(e.defaultPrevented||Su(e)||!ou(e.currentTarget,yu(e)))return;let t={ArrowDown(){u||r({type:`ARROW_NEXT`,key:`ArrowDown`})},ArrowUp(){u||r({type:`ARROW_PREV`,key:`ArrowUp`})},ArrowLeft(){l||r({type:`ARROW_PREV`,key:`ArrowLeft`})},ArrowRight(){l||r({type:`ARROW_NEXT`,key:`ArrowRight`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[Eu(e,{dir:a(`dir`),orientation:a(`orientation`)})];if(t){e.preventDefault(),t(e);return}}})},getTriggerState:f,getTriggerProps(e){let{value:n,disabled:s}=e,c=f(e);return t.button({...Cy.trigger.attrs,role:`tab`,type:`button`,disabled:s,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":Zl(s),"aria-disabled":s,"data-value":n,"aria-selected":c.selected,"data-selected":Zl(c.selected),"data-focus":Zl(c.focused),"aria-controls":c.selected?Ey(o,n):void 0,"data-ownedby":Ty(o),"data-ssr":Zl(i.get(`ssr`)),id:Dy(o,n),tabIndex:c.selected&&d?0:-1,onFocus(){r({type:`TAB_FOCUS`,value:n})},onBlur(e){e.relatedTarget?.getAttribute(`role`)!==`tab`&&r({type:`TAB_BLUR`})},onClick(e){e.defaultPrevented||bu(e)||s||(vu()&&e.currentTarget.focus(),r({type:`TAB_CLICK`,value:n}))}})},getContentProps(e){let{value:n}=e,r=i.get(`value`)===n;return t.element({...Cy.content.attrs,dir:a(`dir`),id:Ey(o,n),tabIndex:d?0:-1,"aria-labelledby":Dy(o,n),role:`tabpanel`,"data-ownedby":Ty(o),"data-selected":Zl(r),"data-orientation":a(`orientation`),hidden:!r})},getIndicatorProps(){let e=i.get(`indicatorRect`),n=i.get(`indicatorTransition`);return t.element({id:Oy(o),...Cy.indicator.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),style:{"--transition-property":`left, right, top, bottom, width, height`,"--left":e.left,"--top":e.top,"--width":e.width,"--height":e.height,position:`absolute`,willChange:`var(--transition-property)`,transitionProperty:`var(--transition-property)`,transitionDuration:n?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[u?`left`:`top`]:u?`var(--left)`:`var(--top)`}})}}}var{createMachine:Hy}=yd(),Uy=Hy({props({props:e}){return{dir:`ltr`,orientation:`horizontal`,activationMode:`automatic`,loopFocus:!0,composite:!0,navigate(e){Hu(e.node)},defaultValue:null,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),focusedValue:t(()=>({defaultValue:e(`value`)||e(`defaultValue`),sync:!0,onChange(t){e(`onFocusChange`)?.({focusedValue:t})}})),ssr:t(()=>({defaultValue:!0})),indicatorTransition:t(()=>({defaultValue:!1})),indicatorRect:t(()=>({defaultValue:{left:`0px`,top:`0px`,width:`0px`,height:`0px`}}))}},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`)],()=>{r([`allowIndicatorTransition`,`syncIndicatorRect`,`syncTabIndex`,`navigateIfNeeded`])}),n([()=>t(`dir`),()=>t(`orientation`)],()=>{r([`syncIndicatorRect`])})},on:{SET_VALUE:{actions:[`setValue`]},CLEAR_VALUE:{actions:[`clearValue`]},SET_INDICATOR_RECT:{actions:[`setIndicatorRect`]},SYNC_TAB_INDEX:{actions:[`syncTabIndex`]}},entry:[`syncIndicatorRect`,`syncTabIndex`,`syncSsr`],exit:[`cleanupObserver`],states:{idle:{on:{TAB_FOCUS:{target:`focused`,actions:[`setFocusedValue`]},TAB_CLICK:{target:`focused`,actions:[`setFocusedValue`,`setValue`]}}},focused:{on:{TAB_CLICK:{actions:[`setFocusedValue`,`setValue`]},ARROW_PREV:[{guard:`selectOnFocus`,actions:[`focusPrevTab`,`selectFocusedTab`]},{actions:[`focusPrevTab`]}],ARROW_NEXT:[{guard:`selectOnFocus`,actions:[`focusNextTab`,`selectFocusedTab`]},{actions:[`focusNextTab`]}],HOME:[{guard:`selectOnFocus`,actions:[`focusFirstTab`,`selectFocusedTab`]},{actions:[`focusFirstTab`]}],END:[{guard:`selectOnFocus`,actions:[`focusLastTab`,`selectFocusedTab`]},{actions:[`focusLastTab`]}],TAB_FOCUS:{actions:[`setFocusedValue`]},TAB_BLUR:{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e(`activationMode`)===`automatic`},actions:{selectFocusedTab({context:e,prop:t}){Bu(()=>{let n=e.get(`focusedValue`);if(!n)return;let r=t(`deselectable`)&&e.get(`value`)===n?null:n;e.set(`value`,r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set(`focusedValue`,t.value)})},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t,prop:n}){let r=n(`deselectable`)&&e.get(`value`)===e.get(`focusedValue`);e.set(`value`,r?null:t.value)},clearValue({context:e}){e.set(`value`,null)},focusFirstTab({scope:e}){Bu(()=>{Py(e)?.focus()})},focusLastTab({scope:e}){Bu(()=>{Fy(e)?.focus()})},focusNextTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=Iy(n,{value:i,loopFocus:t(`loopFocus`)});Bu(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:r}){let i=r.value??e.get(`focusedValue`);if(!i)return;let a=Ly(n,{value:i,loopFocus:t(`loopFocus`)});Bu(()=>{t(`composite`)?a?.focus():a?.dataset.value!=null&&e.set(`focusedValue`,a.dataset.value)})},syncTabIndex({context:e,scope:t}){Bu(()=>{let n=e.get(`value`);if(!n)return;let r=Ay(t,n);r&&(ju(r).length>0?r.removeAttribute(`tabindex`):r.setAttribute(`tabindex`,`0`))})},cleanupObserver({refs:e}){let t=e.get(`indicatorCleanup`);t&&t()},allowIndicatorTransition({context:e}){e.set(`indicatorTransition`,!0)},setIndicatorRect({context:e,event:t,scope:n}){let r=t.id??e.get(`value`);if(My(n)){if(!r){e.set(`indicatorTransition`,!1);return}jy(n,r)&&(e.set(`indicatorRect`,zy(n,r)),zu(()=>{e.set(`indicatorTransition`,!1)}))}},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,refs:t,scope:n}){let r=t.get(`indicatorCleanup`);r&&r();let i=e.get(`value`);if(!i){e.set(`indicatorTransition`,!1);return}let a=jy(n,i),o=My(n);if(!a||!o)return;let s=$u([a],{measure(e){return Ry(e)},onEntry({rects:t}){let[n]=t;e.set(`indicatorRect`,By(n))}});t.set(`indicatorCleanup`,s)},navigateIfNeeded({context:e,prop:t,scope:n}){let r=e.get(`value`);if(!r)return;let i=jy(n,r);ru(i)&&t(`navigate`)?.({value:r,node:i,href:i.href})}}}});wd()([`activationMode`,`composite`,`deselectable`,`dir`,`getRootNode`,`id`,`ids`,`loopFocus`,`navigate`,`onFocusChange`,`onValueChange`,`orientation`,`translations`,`value`,`defaultValue`]),wd()([`disabled`,`value`]),wd()([`value`]);var Wy=(e={},t)=>{let n=Hr(),r=qd(Jd),i=Xd(Yd),a=Nd(Uy,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...Zd(a),onFocusChange:e=>{t?.(`focusChange`,e),a.onFocusChange?.(e)},onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a.onValueChange?.(e)}}}));return U(()=>Vy(a,kd))},Gy=Object.freeze(Object.defineProperty({__proto__:null,Content:oae,Context:uae,Indicator:sae,List:cae,Root:M({__name:`tabs-root`,props:Xi({activationMode:{},composite:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},id:{},ids:{},loopFocus:{type:Boolean},modelValue:{},navigate:{type:Function},orientation:{},translations:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{composite:void 0,deselectable:void 0,loopFocus:void 0}),emits:[`focusChange`,`valueChange`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=Wy(n,t);return xy(r),Zm(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),G(),(e,t)=>(F(),L(k(W).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:dae,Trigger:lae},Symbol.toStringTag,{value:`Module`})),Ky=Wd(`toast`).parts(`group`,`root`,`title`,`description`,`actionTrigger`,`closeTrigger`).build(),qy=e=>`toast-group:${e}`,Jy=(e,t)=>e.getById(`toast-group:${t}`),Yy=e=>`toast:${e.id}`,Xy=e=>e.getById(Yy(e)),Zy=e=>`toast:${e.id}:title`,Qy=e=>`toast:${e.id}:description`,$y=e=>`toast${e.id}:close`,eb={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function tb(e,t){return e??eb[t]??eb.DEFAULT}var nb=e=>typeof e==`string`?{left:e,right:e,bottom:e,top:e}:e;function rb(e,t){let{prop:n,computed:r,context:i}=e,{offsets:a,gap:o}=n(`store`).attrs,s=i.get(`heights`),c=nb(a),l=n(`dir`)===`rtl`,u=t.replace(`-start`,l?`-right`:`-left`).replace(`-end`,l?`-left`:`-right`),d=u.includes(`right`),f=u.includes(`left`),p={position:`fixed`,pointerEvents:r(`count`)>0?void 0:`none`,display:`flex`,flexDirection:`column`,"--gap":`${o}px`,"--first-height":`${s[0]?.height||0}px`,zIndex:bte},m=`center`;return d&&(m=`flex-end`),f&&(m=`flex-start`),p.alignItems=m,u.includes(`top`)&&(p.top=`max(env(safe-area-inset-top, 0px), ${c.top})`),u.includes(`bottom`)&&(p.bottom=`max(env(safe-area-inset-bottom, 0px), ${c.bottom})`),u.includes(`left`)||(p.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${c.right})`),u.includes(`right`)||(p.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${c.left})`),p}function ib(e,t){let{prop:n,context:r,computed:i}=e,a=n(`parent`),o=a.computed(`placement`),{gap:s}=a.prop(`store`).attrs,[c]=o.split(`-`),l=r.get(`mounted`),u=r.get(`remainingTime`),d=i(`height`),f=i(`frontmost`),p=!f,m=!n(`stacked`),h=n(`stacked`),g=n(`type`)===`loading`?2**53-1:u,_=i(`heightIndex`)*s+i(`heightBefore`),v={position:`absolute`,pointerEvents:`auto`,"--opacity":`0`,"--remove-delay":`${n(`removeDelay`)}ms`,"--duration":`${g}ms`,"--initial-height":`${d}px`,"--offset":`${_}px`,"--index":n(`index`),"--z-index":i(`zIndex`),"--lift-amount":`calc(var(--lift) * var(--gap))`,"--y":`100%`,"--x":`0`},y=e=>Object.assign(v,e);return c===`top`?y({top:`0`,"--sign":`-1`,"--y":`-100%`,"--lift":`1`}):c===`bottom`&&y({bottom:`0`,"--sign":`1`,"--y":`100%`,"--lift":`-1`}),l&&(y({"--y":`0`,"--opacity":`1`}),h&&y({"--y":`calc(var(--lift) * var(--offset))`,"--height":`var(--initial-height)`})),t||y({"--opacity":`0`,pointerEvents:`none`}),p&&m&&(y({"--base-scale":`var(--index) * 0.05 + 1`,"--y":`calc(var(--lift-amount) * var(--index))`,"--scale":`calc(-1 * var(--base-scale))`,"--height":`var(--first-height)`}),t||y({"--y":`calc(var(--sign) * 40%)`})),p&&h&&!t&&y({"--y":`calc(var(--lift) * var(--offset) + var(--lift) * -100%)`}),f&&!t&&y({"--y":`calc(var(--lift) * -100%)`}),v}function ab(e,t){let{computed:n}=e,r={position:`absolute`,inset:`0`,scale:`1 2`,pointerEvents:t?`none`:`auto`};return n(`frontmost`)&&!t&&(e=>Object.assign(r,e))({height:`calc(var(--initial-height) + 80%)`}),r}function ob(){return{position:`absolute`,left:`0`,height:`calc(var(--gap) + 2px)`,bottom:`100%`,width:`100%`}}function sb(e,t){let{context:n,prop:r,send:i,refs:a,computed:o}=e;return{getCount(){return n.get(`toasts`).length},getToasts(){return n.get(`toasts`)},getGroupProps(n={}){let{label:s=`Notifications`}=n,{hotkey:c}=r(`store`).attrs,l=c.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),u=o(`placement`),[d,f=`center`]=u.split(`-`);return t.element({...Ky.group.attrs,dir:r(`dir`),tabIndex:-1,"aria-label":`${u} ${s} ${l}`,id:qy(u),"data-placement":u,"data-side":d,"data-align":f,"aria-live":`polite`,role:`region`,style:rb(e,u),onMouseMove(){i({type:`REGION.POINTER_ENTER`,placement:u})},onMouseLeave(){i({type:`REGION.POINTER_LEAVE`,placement:u})},onFocus(e){i({type:`REGION.FOCUS`,target:e.relatedTarget})},onBlur(e){a.get(`isFocusWithin`)&&!ou(e.currentTarget,e.relatedTarget)&&queueMicrotask(()=>i({type:`REGION.BLUR`}))}})},subscribe(e){return r(`store`).subscribe(()=>e(n.get(`toasts`)))}}}var cb=vd({props({props:e}){return{dir:`ltr`,id:Wl(),...e,store:e.store}},initialState({prop:e}){return e(`store`).attrs.overlap?`overlap`:`stack`},refs(){return{lastFocusedEl:null,isFocusWithin:!1,dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:e=>e.map(e=>e.id).join(`,`)})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get(`toasts`).length,overlap:({prop:e})=>e(`store`).attrs.overlap,placement:({prop:e})=>e(`store`).attrs.placement},effects:[`subscribeToStore`,`trackDocumentVisibility`,`trackHotKeyPress`],watch({track:e,context:t,action:n}){e([()=>t.hash(`toasts`)],()=>{queueMicrotask(()=>{n([`collapsedIfEmpty`,`setDismissableBranch`])})})},exit:[`clearDismissableBranch`,`clearLastFocusedEl`],on:{"DOC.HOTKEY":{actions:[`focusRegionEl`]},"REGION.BLUR":[{guard:`isOverlapping`,target:`overlap`,actions:[`collapseToasts`,`resumeToasts`,`restoreLastFocusedEl`]},{target:`stack`,actions:[`resumeToasts`,`restoreLastFocusedEl`]}],"TOAST.REMOVE":{actions:[`removeToast`,`removeHeight`]},"TOAST.PAUSE":{actions:[`pauseToasts`]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:`isOverlapping`,target:`overlap`,actions:[`resumeToasts`,`collapseToasts`]},{actions:[`resumeToasts`]}],"REGION.OVERLAP":{target:`overlap`,actions:[`collapseToasts`]},"REGION.FOCUS":{actions:[`setLastFocusedEl`,`pauseToasts`]},"REGION.POINTER_ENTER":{actions:[`pauseToasts`]}}},overlap:{on:{"REGION.STACK":{target:`stack`,actions:[`expandToasts`]},"REGION.POINTER_ENTER":{target:`stack`,actions:[`pauseToasts`,`expandToasts`]},"REGION.FOCUS":{target:`stack`,actions:[`setLastFocusedEl`,`pauseToasts`,`expandToasts`]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e(`overlap`)},effects:{subscribeToStore({context:e,prop:t}){return t(`store`).subscribe(t=>{if(t.dismiss){e.set(`toasts`,e=>e.filter(e=>e.id!==t.id));return}e.set(`toasts`,e=>{let n=e.findIndex(e=>e.id===t.id);return n===-1?[t,...e]:[...e.slice(0,n),{...e[n],...t},...e.slice(n+1)]})})},trackHotKeyPress({prop:e,send:t}){return Ou(document,`keydown`,n=>{let{hotkey:r}=e(`store`).attrs;r.every(e=>n[e]||n.code===e)&&t({type:`DOC.HOTKEY`})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){let{pauseOnPageIdle:r}=e(`store`).attrs;if(!r)return;let i=n.getDoc();return Ou(i,`visibilitychange`,()=>{t({type:i.visibilityState===`hidden`?`PAUSE_ALL`:`RESUME_ALL`})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:r}){let i=t.get(`toasts`),a=n(`placement`),o=i.length>0;if(!o){e.get(`dismissableCleanup`)?.();return}if(o&&e.get(`dismissableCleanup`))return;let s=Xm(()=>Jy(r,a),{defer:!0});e.set(`dismissableCleanup`,s)},clearDismissableBranch({refs:e}){e.get(`dismissableCleanup`)?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{Jy(e,t(`placement`))?.focus()})},pauseToasts({prop:e}){e(`store`).pause()},resumeToasts({prop:e}){e(`store`).resume()},expandToasts({prop:e}){e(`store`).expand()},collapseToasts({prop:e}){e(`store`).collapse()},removeToast({prop:e,event:t}){e(`store`).remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set(`heights`,t=>t.filter(t=>t.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t(`overlap`)||t(`count`)>1||e({type:`REGION.OVERLAP`})},setLastFocusedEl({refs:e,event:t}){e.get(`isFocusWithin`)||!t.target||(e.set(`isFocusWithin`,!0),e.set(`lastFocusedEl`,t.target))},restoreLastFocusedEl({refs:e}){e.get(`lastFocusedEl`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))},clearLastFocusedEl({refs:e}){e.get(`lastFocusedEl`)&&(e.get(`lastFocusedEl`)?.focus({preventScroll:!0}),e.set(`lastFocusedEl`,null),e.set(`isFocusWithin`,!1))}}}});function lb(e,t){let{state:n,send:r,prop:i,scope:a,context:o,computed:s}=e,c=n.hasTag(`visible`),l=n.hasTag(`paused`),u=o.get(`mounted`),d=s(`frontmost`),f=i(`parent`).computed(`placement`),p=i(`type`),m=i(`stacked`),h=i(`title`),g=i(`description`),_=i(`action`),[v,y=`center`]=f.split(`-`);return{type:p,title:h,description:g,placement:f,visible:c,paused:l,closable:!!i(`closable`),pause(){r({type:`PAUSE`})},resume(){r({type:`RESUME`})},dismiss(){r({type:`DISMISS`,src:`programmatic`})},getRootProps(){return t.element({...Ky.root.attrs,dir:i(`dir`),id:Yy(a),"data-state":c?`open`:`closed`,"data-type":p,"data-placement":f,"data-align":y,"data-side":v,"data-mounted":Zl(u),"data-paused":Zl(l),"data-first":Zl(d),"data-sibling":Zl(!d),"data-stack":Zl(m),"data-overlap":Zl(!m),role:`status`,"aria-atomic":`true`,"aria-describedby":g?Qy(a):void 0,"aria-labelledby":h?Zy(a):void 0,tabIndex:0,style:ib(e,c),onKeyDown(e){e.defaultPrevented||e.key==`Escape`&&(r({type:`DISMISS`,src:`keyboard`}),e.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":`before`,style:ab(e,c)})},getGhostAfterProps(){return t.element({"data-ghost":`after`,style:ob()})},getTitleProps(){return t.element({...Ky.title.attrs,id:Zy(a)})},getDescriptionProps(){return t.element({...Ky.description.attrs,id:Qy(a)})},getActionTriggerProps(){return t.button({...Ky.actionTrigger.attrs,type:`button`,onClick(e){e.defaultPrevented||(_?.onClick?.(),r({type:`DISMISS`,src:`user`}))}})},getCloseTriggerProps(){return t.button({id:$y(a),...Ky.closeTrigger.attrs,type:`button`,"aria-label":`Dismiss notification`,onClick(e){e.defaultPrevented||r({type:`DISMISS`,src:`user`})}})}}}var{not:ub}=_d(),db=vd({props({props:e}){return vte(e,[`id`,`type`,`parent`,`removeDelay`],`toast`),{closable:!0,...e,duration:tb(e.duration,e.type)}},initialState({prop:e}){return e(`type`)===`loading`||e(`duration`)===1/0?`visible:persist`:`visible`},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:tb(e(`duration`),e(`type`))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{let t=e(`parent`).context.get(`toasts`),n=t.findIndex(t=>t.id===e(`id`));return t.length-n},height:({prop:e})=>e(`parent`).context.get(`heights`).find(t=>t.id===e(`id`))?.height??0,heightIndex:({prop:e})=>e(`parent`).context.get(`heights`).findIndex(t=>t.id===e(`id`)),frontmost:({prop:e})=>e(`index`)===0,heightBefore:({prop:e})=>{let t=e(`parent`).context.get(`heights`),n=t.findIndex(t=>t.id===e(`id`));return t.reduce((e,t,r)=>r>=n?e:e+t.height,0)},shouldPersist:({prop:e})=>e(`type`)===`loading`||e(`duration`)===1/0},watch({track:e,prop:t,send:n}){e([()=>t(`message`)],()=>{let e=t(`message`);e&&n({type:e,src:`programmatic`})}),e([()=>t(`type`),()=>t(`duration`)],()=>{n({type:`UPDATE`})})},on:{UPDATE:[{guard:`shouldPersist`,target:`visible:persist`,actions:[`resetCloseTimer`]},{target:`visible:updating`,actions:[`resetCloseTimer`]}],MEASURE:{actions:[`measureHeight`]}},entry:[`setMounted`,`measureHeight`,`invokeOnVisible`],effects:[`trackHeight`],states:{"visible:updating":{tags:[`visible`,`updating`],effects:[`waitForNextTick`],on:{SHOW:{target:`visible`}}},"visible:persist":{tags:[`visible`,`paused`],on:{RESUME:{guard:ub(`isLoadingType`),target:`visible`,actions:[`setCloseTimer`]},DISMISS:{target:`dismissing`}}},visible:{tags:[`visible`],effects:[`waitForDuration`],on:{DISMISS:{target:`dismissing`},PAUSE:{target:`visible:persist`,actions:[`syncRemainingTime`]}}},dismissing:{entry:[`invokeOnDismiss`],effects:[`waitForRemoveDelay`],on:{REMOVE:{target:`unmounted`,actions:[`notifyParentToRemove`]}}},unmounted:{entry:[`invokeOnUnmount`]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return Kl(()=>{t({type:`REMOVE`,src:`timer`})},e(`removeDelay`))},waitForDuration({send:e,context:t,computed:n}){if(!n(`shouldPersist`))return Kl(()=>{e({type:`DISMISS`,src:`timer`})},t.get(`remainingTime`))},waitForNextTick({send:e}){return Kl(()=>{e({type:`SHOW`,src:`timer`})},0)},trackHeight({scope:e,prop:t}){let n;return Bu(()=>{let r=Xy(e);if(!r)return;let i=new(e.getWin()).MutationObserver(()=>{let e=r.style.height;r.style.height=`auto`;let n=r.getBoundingClientRect().height;r.style.height=e;let i={id:t(`id`),height:n};fb(t(`parent`),i)});i.observe(r,{childList:!0,subtree:!0,characterData:!0}),n=()=>i.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e(`type`)===`loading`,shouldPersist:({computed:e})=>e(`shouldPersist`)},actions:{setMounted({context:e}){Bu(()=>{e.set(`mounted`,!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{let r=Xy(e);if(!r)return;let i=r.style.height;r.style.height=`auto`;let a=r.getBoundingClientRect().height;r.style.height=i,n.set(`initialHeight`,a);let o={id:t(`id`),height:a};fb(t(`parent`),o)})},setCloseTimer({refs:e}){e.set(`closeTimerStartTime`,Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set(`closeTimerStartTime`,Date.now()),e.set(`remainingTime`,tb(n(`duration`),n(`type`)))},syncRemainingTime({context:e,refs:t}){e.set(`remainingTime`,e=>{let n=t.get(`closeTimerStartTime`),r=Date.now()-n;return t.set(`lastCloseStartTimerStartTime`,Date.now()),e-r})},notifyParentToRemove({prop:e}){e(`parent`).send({type:`TOAST.REMOVE`,id:e(`id`)})},invokeOnDismiss({prop:e,event:t}){e(`onStatusChange`)?.({status:`dismissing`,src:t.src})},invokeOnUnmount({prop:e}){e(`onStatusChange`)?.({status:`unmounted`})},invokeOnVisible({prop:e}){e(`onStatusChange`)?.({status:`visible`})}}}});function fb(e,t){let{id:n,height:r}=t;e.context.set(`heights`,e=>e.find(e=>e.id===n)?e.map(e=>e.id===n?{...e,height:r}:e):[{id:n,height:r},...e])}var pb=(e,t)=>({...t,...Gl(e)});function mb(e={}){let t=pb(e,{placement:`bottom`,overlap:!1,max:24,gap:16,offsets:`1rem`,hotkey:[`altKey`,`KeyT`],removeDelay:200,pauseOnPageIdle:!0}),n=[],r=[],i=new Set,a=[],o=e=>(n.push(e),()=>{let t=n.indexOf(e);n.splice(t,1)}),s=e=>(n.forEach(t=>t(e)),e),c=e=>{if(r.length>=t.max){a.push(e);return}s(e),r.unshift(e)},l=()=>{for(;a.length>0&&r.length{let n=e.id??`toast:${Wl()}`,a=r.find(e=>e.id===n);return i.has(n)&&i.delete(n),a?r=r.map(t=>t.id===n?s({...t,...e,id:n}):t):c({id:n,duration:t.duration,removeDelay:t.removeDelay,type:`info`,...e,stacked:!t.overlap,gap:t.gap}),n},d=e=>(i.add(e),e?(n.forEach(t=>t({id:e,dismiss:!0})),r=r.filter(t=>t.id!==e),l()):(r.forEach(e=>{n.forEach(t=>t({id:e.id,dismiss:!0}))}),r=[],a=[]),e);return{attrs:t,subscribe:o,create:u,update:(e,t)=>u({id:e,...t}),remove:d,dismiss:e=>{r=e==null?r.map(e=>s({...e,message:`DISMISS`})):r.map(t=>t.id===e?s({...t,message:`DISMISS`}):t)},error:e=>u({...e,type:`error`}),success:e=>u({...e,type:`success`}),info:e=>u({...e,type:`info`}),warning:e=>u({...e,type:`warning`}),loading:e=>u({...e,type:`loading`}),getVisibleToasts:()=>r.filter(e=>!i.has(e.id)),getCount:()=>r.length,promise:(e,t,n={})=>{if(!t||!t.loading){ql(`[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified`);return}let r=u({...n,...t.loading,promise:e,type:`loading`}),i=!0,a,o=Vl(e).then(async e=>{if(a=[`resolve`,e],hb(e)&&!e.ok){i=!1;let a=Vl(t.error,`HTTP Error! status: ${e.status}`);u({...n,...a,id:r,type:`error`})}else if(t.success!==void 0){i=!1;let a=Vl(t.success,e);u({...n,...a,id:r,type:`success`})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let a=Vl(t.error,e);u({...n,...a,id:r,type:`error`})}}).finally(()=>{i&&d(r),t.finally?.()});return{id:r,unwrap:()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t))}},pause:e=>{r=e==null?r.map(e=>s({...e,message:`PAUSE`})):r.map(t=>t.id===e?s({...t,message:`PAUSE`}):t)},resume:e=>{r=e==null?r.map(e=>s({...e,message:`RESUME`})):r.map(t=>t.id===e?s({...t,message:`RESUME`}):t)},isVisible:e=>!i.has(e)&&!!r.find(t=>t.id===e),isDismissed:e=>i.has(e),expand:()=>{r=r.map(e=>s({...e,stacked:!0}))},collapse:()=>{r=r.map(e=>s({...e,stacked:!1}))}}}var hb=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,gb={connect:sb,machine:cb},_b=e=>mb(e),[vb,yb]=hl(`ToastContext`),bb=M({__name:`toast-action-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=yb();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getActionTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),xb=M({__name:`toast-close-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=yb();return G(),(e,n)=>(F(),L(k(W).button,H(k(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Sb=M({__name:`toast-context`,setup(e){let t=yb();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Cb=M({__name:`toast-description`,props:{asChild:{type:Boolean}},setup(e){let t=yb();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getDescriptionProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),wb=M({__name:`toast-root`,props:{asChild:{type:Boolean}},setup(e){let t=yb();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[R(`div`,Ae(Ro(k(t).getGhostBeforeProps())),null,16),N(e.$slots,`default`),R(`div`,Ae(Ro(k(t).getGhostAfterProps())),null,16)]),_:3},16,[`as-child`]))}}),Tb=M({__name:`toast-title`,props:{asChild:{type:Boolean}},setup(e){let t=yb();return G(),(e,n)=>(F(),L(k(W).div,H(k(t).getTitleProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Eb=M({__name:`toaster-item`,props:{value:{},index:{},parent:{}},setup(e){let t=e,n=qd(Jd),r=Nd(db,U(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})));return vb(U(()=>lb(r,kd))),G(),(e,n)=>N(e.$slots,`default`,Ae(Ro(t.value)))}}),Db=M({__name:`toaster`,props:{toaster:{},asChild:{type:Boolean}},setup(e){let t=e,n=Xd(Yd),r=qd(Jd),i=Nd(gb.machine,{store:t.toaster,id:Hr(),dir:n?.value.dir,getRootNode:r?.value.getRootNode}),a=U(()=>gb.connect(i,kd));return G(),(e,t)=>(F(),L(k(W).div,Ae(Ro(a.value.getGroupProps())),{default:j(()=>[(F(!0),I(P,null,Vi(a.value.getToasts(),(t,n)=>(F(),L(Eb,{key:t.id,value:t,parent:k(i),index:n},{default:j(t=>[N(e.$slots,`default`,H({ref_for:!0},t))]),_:3},8,[`value`,`parent`,`index`]))),128))]),_:3},16))}}),Ob=Object.freeze(Object.defineProperty({__proto__:null,ActionTrigger:bb,CloseTrigger:xb,Context:Sb,Description:Cb,Root:wb,Title:Tb},Symbol.toStringTag,{value:`Module`})),kb={key:1,class:`border-b px-6 py-4 flex items-center justify-between`},Ab=M({__name:`Modals`,setup(e){let t=or(ml),{openModals:n,modals:r,closeModal:i}=n_(),a=U(()=>n.value.reduce((e,t)=>{let n=r.value.get(t);return n&&(e[t]=n),e},{})),o=e=>({xs:`max-w-xs`,sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-xl`,"2xl":`max-w-2xl`,full:`max-w-[calc(100vw-2rem)] w-full max-h-[calc(100vh-2rem)] h-full`})[e]||`max-w-md`,s=(e,t)=>{e.open||i(t)};return(e,r)=>{let c=x_,l=b_;return F(!0),I(P,null,Vi(k(n),e=>(F(),I(P,{key:e},[k(a)[e]?(F(),L(k(uv).Root,{key:0,open:!0,onOpenChange:t=>s(t,e),modal:!0},{default:j(()=>[z(k(uv).Backdrop,{class:`fixed inset-0 bg-black/50 z-50`}),z(k(uv).Positioner,{class:`fixed inset-0 z-50 flex items-center justify-center p-4`},{default:j(()=>[z(k(uv).Content,{class:ke(`relative bg-white rounded-lg shadow-xl ${o(k(a)[e]?.size)} ${k(a)[e]?.size===`full`?``:`max-h-[90vh]`} overflow-auto`)},{default:j(()=>[k(a)[e].title?V(``,!0):(F(),L(k(uv).CloseTrigger,{key:0,class:`absolute top-4 right-4 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded p-1 z-10`,onClick:t=>k(i)(e)},{default:j(()=>[z(c,{class:`w-5 h-5`})]),_:1},8,[`onClick`])),k(a)[e].title?(F(),I(`div`,kb,[z(k(uv).Title,{class:`text-lg font-semibold text-gray-900`},{default:j(()=>[B(E(k(a)[e].title),1)]),_:2},1024),z(k(uv).CloseTrigger,{class:`text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded p-1`,onClick:t=>k(i)(e)},{default:j(()=>[z(c,{class:`w-5 h-5`})]),_:1},8,[`onClick`])])):V(``,!0),k(Qg)(k(a)[e].render)||k($g)(k(a)[e].render)?(F(),L(Ri(k(a)[e].render),{key:2,"modal-id":e,editor:k(t)},null,8,[`modal-id`,`editor`])):k(e_)(k(a)[e].render)?(F(),L(l,{key:3,"render-fn":k(a)[e].render},null,8,[`render-fn`])):V(``,!0)]),_:2},1032,[`class`])]),_:2},1024)]),_:2},1032,[`onOpenChange`])):V(``,!0)],64))),128)}}}),jb={header:{undo:`Undo`,redo:`Redo`,auto:`Auto`,apply:`Apply`,devicePreview:`Device Preview`,customDeviceSize:`Custom Size`,deviceWidthPx:`Width (px)`,savedCustomDevices:`Saved custom devices`,enableInspector:`Enable inspection mode`,disableInspector:`Disable inspection mode`},block:{show:`Show`,hide:`Hide`,copy:`Copy`,pasteAfter:`Paste After`,duplicate:`Duplicate`,remove:`Remove`,moveToNext:`Move to Next`,moveToPrevious:`Move to Previous`,enable:`Enable`,disable:`Disable`,insertBlockBefore:`Insert Block Before`,insertBlockAfter:`Insert Block After`,insertSiblingBefore:`Insert Sibling Before`,insertSiblingAfter:`Insert Sibling After`,copyAsJson:`Copy as JSON`},layers:{title:`Layers`,header:`Page content`,collapseAll:`Collapse all blocks`,addBlockToBlock:`Add block`,addBlockToRegion:`Add block`},blocksPopover:{searchPlaceholder:`Search blocks...`,tabBlocks:`Blocks`,tabSaved:`Saved`,noBlocksAvailable:`No blocks available`,noBlocksFound:`No blocks found`,hoverToSeeDetails:`Hover over a block to see details`,noPreviewAvailable:`No preview available`},configPanels:{properties:`Properties`,selectedBlock:`Select a block to edit its properties`,noProperties:`This block has no editable properties`,unknownFieldType:`Unknown field type`},common:{block:`Block`,custom:`Custom`,close:`Close`,default:`Default`}};function Mb(e,t){let n={...e};for(let e in t)if(t.hasOwnProperty(e)){let r=t[e],i=n[e];r&&typeof r==`object`&&!Array.isArray(r)&&i&&typeof i==`object`&&!Array.isArray(i)?n[e]={...i,...r}:r!==void 0&&(n[e]=r)}return n}function Nb(e,t){return t.split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)}function Pb(e){return e?Mb(jb,e):jb}function Fb(e){return function(t){let n=Nb(e,t);return n===void 0?(console.warn(`Translation key "${t}" not found, returning key as fallback`),t):typeof n==`string`?n:(console.warn(`Translation key "${t}" does not point to a string value`),t)}}function Ib(){let e=or(ml);if(!e)throw Error(`useI18n must be used within a component that has access to CraftileEditor`);return{t:Fb(e.i18n)}}var Lb={class:`toast-content`},Rb={class:`sr-only`},zb=M({__name:`Toasts`,setup(e){let{t}=Ib(),{toaster:n}=n_();return(e,r)=>{let i=x_;return F(),L(k(Db),{toaster:k(n)},{default:j(e=>[z(k(Ob).Root,{class:`toast-root`},{default:j(()=>[R(`div`,Lb,[z(k(Ob).Title,{class:`text-sm font-medium leading-snug`},{default:j(()=>[B(E(e.title),1)]),_:2},1024),e.description?(F(),L(k(Ob).Description,{key:0,class:`mt-1 text-sm leading-snug opacity-80`},{default:j(()=>[B(E(e.description),1)]),_:2},1024)):V(``,!0),e.action?(F(),L(k(Ob).ActionTrigger,{key:1,class:`toast-action mt-2`},{default:j(()=>[B(E(e.action.label),1)]),_:2},1024)):V(``,!0)]),z(k(Ob).CloseTrigger,{class:`toast-close`},{default:j(()=>[z(i,{class:`h-4 w-4`}),R(`span`,Rb,E(k(t)(`common.close`)),1)]),_:1})]),_:2},1024)]),_:1},8,[`toaster`])}}}),Bb={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vb(e,t){return F(),I(`svg`,Bb,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m19.5 8.25l-7.5 7.5l-7.5-7.5`},null,-1)]])}var Hb=D({name:`heroicons-chevron-down`,render:Vb}),Ub={key:0,class:`text-center text-gray-500 py-8`},Wb={key:0},Gb={key:1},Kb={key:1,class:`h-full flex`},qb={class:`w-60 border-r overflow-y-auto`},Jb={class:`text-xs font-medium text-gray-700`},Yb={class:`pb-1`},Xb=[`onClick`,`onMouseenter`],Zb=[`innerHTML`],Qb={class:`flex-1 min-w-0`},$b={class:`text-xs text-gray-900 truncate`},ex={class:`flex-1 p-2 bg-gray-50`},fae={key:0,class:`h-full flex flex-col`},pae={class:`flex items-start gap-2 mb-2`},mae=[`innerHTML`],hae={class:`flex-1`},gae={class:`font-semibold text-base text-gray-900`},_ae={key:0,class:`text-xs text-gray-600`},vae={class:`flex-1 bg-white rounded overflow-hidden flex items-center justify-center`},yae=[`src`,`alt`],bae={key:1,class:`text-center text-gray-400 text-sm p-4`},xae={class:`mb-2`},Sae={class:`text-xs`},Cae={key:1,class:`h-full flex items-center justify-center text-gray-400 text-sm`},wae=M({__name:`BlocksList`,props:{blocksByCategory:{},searchQuery:{}},emits:[`blockSelect`],setup(e,{emit:t}){let n=e,r=t,{t:i}=Ib(),a=U(()=>Object.keys(n.blocksByCategory).sort((e,t)=>e.localeCompare(t))),o=O([]),s=O(null);pr(a,e=>{if(e.length===0){o.value=[];return}let t=new Set(e),n=o.value.filter(e=>t.has(e)),r=e[0];r&&!n.includes(r)&&n.unshift(r),o.value=n},{immediate:!0});let c=e=>{s.value=e},l=()=>{s.value=null};return(e,t)=>{let n=Hb;return Object.keys(e.blocksByCategory).length===0?(F(),I(`div`,Ub,[e.searchQuery.trim()?(F(),I(`p`,Wb,E(k(i)(`blocksPopover.noBlocksFound`))+` "`+E(e.searchQuery)+`"`,1)):(F(),I(`p`,Gb,E(k(i)(`blocksPopover.noBlocksAvailable`)),1))])):(F(),I(`div`,Kb,[R(`div`,qb,[z(k(I_).Root,{modelValue:k(o),"onUpdate:modelValue":t[0]||=e=>dn(o)?o.value=e:null,class:`w-full`,multiple:``},{default:j(()=>[(F(!0),I(P,null,Vi(k(a),t=>(F(),L(k(I_).Item,{key:t,value:t,class:`border-b border-gray-100 last:border-b-0`},{default:j(()=>[z(k(I_).ItemTrigger,{class:`flex w-full items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors`},{default:j(()=>[R(`span`,Jb,E(t),1),z(k(I_).ItemIndicator,{class:`transition-transform duration-200`},{default:j(()=>[z(n,{class:`w-3 h-3 text-gray-500`})]),_:1})]),_:2},1024),z(k(I_).ItemContent,{class:`overflow-hidden`},{default:j(()=>[R(`div`,Yb,[(F(!0),I(P,null,Vi(e.blocksByCategory[t],e=>(F(),I(`button`,{key:e.blockType+`-`+(e.presetIndex??`default`),onClick:t=>r(`blockSelect`,e),onMouseenter:t=>c(e),onMouseleave:l,class:ke([`flex items-center gap-2 px-3 py-2 w-full hover:bg-gray-50 transition-colors text-left`,{"bg-gray-50":k(s)===e}])},[R(`div`,{class:`flex-none w-5 h-5 flex items-center justify-center text-gray-600 text-sm`,innerHTML:e.icon||``},null,8,Zb),R(`div`,Qb,[R(`div`,$b,E(e.name),1)])],42,Xb))),128))])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`])]),R(`div`,ex,[k(s)?(F(),I(`div`,fae,[R(`div`,pae,[R(`div`,{class:`flex-none w-12 h-12 flex items-center justify-center text-gray-600 text-2xl bg-white rounded border`,innerHTML:k(s).icon||``},null,8,mae),R(`div`,hae,[R(`h3`,gae,E(k(s).name),1),k(s).description?(F(),I(`p`,_ae,E(k(s).description),1)):V(``,!0)])]),R(`div`,vae,[k(s).previewImageUrl?(F(),I(`img`,{key:0,src:k(s).previewImageUrl,alt:`Preview of ${k(s).name}`,class:`w-full h-full object-contain`},null,8,yae)):(F(),I(`div`,bae,[R(`div`,xae,E(k(i)(`blocksPopover.noPreviewAvailable`)),1),R(`div`,Sae,E(k(s).blockType),1)]))])])):(F(),I(`div`,Cae,E(k(i)(`blocksPopover.hoverToSeeDetails`)),1))])]))}}});function tx(){let e=or(ml);if(!e)throw Error(`useEventBus must be used within a component that has access to CraftileEditor`);return e.events}function Tae(e,t){let n=e instanceof y_,r,i;if(n)r=e,i=!0;else{let{autoSync:t=!0,...n}=e||{};r=new y_(n),i=t}let a=O({blocks:{},regions:[{name:`main`,blocks:[]}]}),o=U(()=>a.value.blocks),s=U(()=>a.value.regions),c=O(r.canUndo()),l=O(r.canRedo()),u=U(()=>{let e=[];for(let t of s.value)for(let n of t.blocks){let t=o.value[n];t&&e.push(t)}return e}),d=e=>o.value[e],f=e=>Object.values(o.value).filter(t=>t.type===e),p=e=>{let t=o.value[e];return t?t.children.map(e=>o.value[e]).filter(Boolean):[]},m=()=>{a.value=cn(r.getPage()),zn(()=>{c.value=r.canUndo(),l.value=r.canRedo()})};m();let h=[];i&&[`page:set`,`block:insert`,`block:remove`,`block:move`,`block:toggle`,`block:duplicate`,`block:property:set`,`block:update`,`undo`,`redo`].forEach(e=>{let t=r.on(e,()=>{m()});h.push(t)});let g=(e,t)=>{let n=r.insertBlock(e,t);return i||m(),n},_=(e,t,n)=>{let a=r.insertBlockFromPreset(e,t,n);return i||m(),a},v=e=>{r.removeBlock(e),i||m()},y=(e,t)=>{r.moveBlock(e,t),i||m()},b=(e,t,n)=>{r.setBlockProperty(e,t,n),i||m()},x=(e,t)=>{r.setBlockName(e,t),i||m()},S=(e,t)=>{r.toggleBlock(e,t),i||m()},C=e=>{let t=r.duplicateBlock(e);return i||m(),t},ee=(e,t)=>{let n=r.pasteBlock(e,t);return i||m(),n},te=()=>{let e=r.undo();return i||m(),e},w=()=>{let e=r.redo();return i||m(),e},T=()=>{m()},ne=()=>{h.forEach(e=>e()),h.length=0};return Ai(()=>{ne()}),{page:a,blocks:o,regions:s,engine:r,rootLevelBlocks:u,getBlockById:d,getBlocksByType:f,getChildrenBlocks:p,insertBlock:g,insertBlockFromPreset:_,removeBlock:v,moveBlock:y,setBlockProperty:b,setBlockName:x,toggleBlock:S,duplicateBlock:C,pasteBlock:ee,undo:te,redo:w,canUndo:c,canRedo:l,refresh:T,destroy:ne}}function nx(){let e=or(ml);if(!e)throw Error(`useCraftileEngine must be used within a component that has access to CraftileEditor`);return Tae(e.engine)}function rx(){let e=or(ml);if(!e)throw Error(`useBlocksPopover must be used within a component that has access to CraftileEditor`);return{open:({anchor:t,context:n})=>{e.events.emit(`blocks-popover:open`,{anchor:t,context:n})},close:()=>{e.events.emit(`blocks-popover:close`)},getAllowedBlockSchemas:t=>{let n=e.engine.getBlocksManager(),r=Object.values(n.getAll());if(t.parentId){let i=e.engine.getBlockById(t.parentId);if(!i)return[];let a=r.filter(e=>n.canBeChild(e.type,i.type));return e.blockFilterFunction&&(a=a.filter(n=>e.blockFilterFunction(n,t))),a}return e.blockFilterFunction?r.filter(n=>e.blockFilterFunction(n,t)):r},expandPresetsToBlockOptions:e=>{let t=[];for(let n of e)n.presets&&n.presets.length>0?n.presets.forEach((e,r)=>{t.push({blockType:n.type,presetIndex:r,name:e.name,icon:e.icon||n.meta?.icon,category:e.category||n.meta?.category||`Other`,description:e.description||n.meta?.description,previewImageUrl:e.previewImageUrl||n.meta?.previewImageUrl})}):t.push({blockType:n.type,name:n.meta?.name||n.type.replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),icon:n.meta?.icon,category:n.meta?.category||`Other`,description:n.meta?.description,previewImageUrl:n.meta?.previewImageUrl});return t},getInsertionContext:(t,n)=>{let r=e.engine.getBlockById(t);if(!r)return{regionId:`main`};if(r.parentId){let i=e.engine.getBlockById(r.parentId);if(i){let e=i.children.indexOf(t),a=n===`before`?e:e+1;return{parentId:r.parentId,index:a}}}for(let r of e.engine.getPage().regions){let e=r.blocks.indexOf(t);if(e!==-1){let t=n===`before`?e:e+1;return{regionId:f_(r),index:t}}}return{regionId:`main`}}}}function ix(){let e=or(ml);if(!e)throw Error(`useLayersPanel must be used within a component that has access to CraftileEditor`);let t=U(()=>e.ui.state.layersPanel.expandedBlocks),n=(t,n)=>{n?e.ui.state.layersPanel.expandedBlocks.add(t):e.ui.state.layersPanel.expandedBlocks.delete(t)},r=t=>e.ui.state.layersPanel.expandedBlocks.has(t),i=e=>{let t=!r(e);return n(e,t),t},a=t=>{t.forEach(t=>{e.ui.state.layersPanel.expandedBlocks.add(t)})},o=t=>{t.forEach(t=>{e.ui.state.layersPanel.expandedBlocks.delete(t)})};return{expandedBlocks:t,setExpanded:n,isExpanded:r,toggleExpanded:i,expandAll:a,collapseAll:o,collapseRegion:t=>{let n=e.engine.getPage(),r=n.regions.find(e=>f_(e)===t);if(!r)return;let i=e=>{let t=n.blocks[e];if(!t||!t.children)return[];let r=[];return t.children.forEach(e=>{r.push(e),r.push(...i(e))}),r};r.blocks.forEach(e=>{o([e,...i(e)])})},expandAncestors:t=>{let n=e.engine.getPage(),r=n.blocks[t];if(!r)return;let i=r.parentId;for(;i;)e.ui.state.layersPanel.expandedBlocks.add(i),i=n.blocks[i]?.parentId}}}var Eae={key:1,class:`flex-1 overflow-hidden`},Dae=M({__name:`BlocksPopover`,setup(e){let{t}=Ib(),n=tx(),{engine:r,insertBlock:i,insertBlockFromPreset:a}=nx(),{getAllowedBlockSchemas:o,expandPresetsToBlockOptions:s}=rx(),{setExpanded:c}=ix(),{toaster:l}=n_(),u=O(null),d=O(null),f=O(``),p=O([]),m=U(()=>p.value.length>0),h=yy({id:`blocks-popover`,portalled:!0,closeOnInteractOutside:!0,positioning:{placement:`left-start`,strategy:`fixed`,slide:!0,offset:{crossAxis:-32},flip:[`left`,`right`],fitViewport:!0,getAnchorRect:()=>u.value?.getBoundingClientRect()??null}}),g=U(()=>d.value?s(o(d.value)):[]),_=U(()=>{let e={};return g.value.forEach(t=>{let n=t.category||`Other`;e[n]||(e[n]=[]),e[n].push(t)}),e}),v=U(()=>{let e=f.value.trim().toLowerCase();if(!e)return _.value;let t={};return Object.entries(_.value).forEach(([n,r])=>{let i=r.filter(t=>{let n=t.name.toLowerCase(),r=(t.description||``).toLowerCase();return n.includes(e)||r.includes(e)});i.length>0&&(t[n]=i)}),t}),y=e=>{if(!d.value)return;let t;try{t=e.presetIndex===void 0?i(e.blockType,{parentId:d.value.parentId,regionId:d.value.regionId,index:d.value.index}):a(e.blockType,e.presetIndex,{parentId:d.value.parentId,regionId:d.value.regionId,index:d.value.index})}catch(e){l.create({title:e instanceof Error?e.message:String(e),type:`error`}),x();return}let n=r.getBlocksManager().get(e.blockType);n?.accepts&&n.accepts.length>0&&c(t,!0),x()},b=({anchor:e,context:t})=>{u.value=e,d.value=t||null,h.value.setOpen(!0),h.value.reposition()},x=()=>{h.value.setOpen(!1),d.value=null,u.value=null};return Ei(()=>{n.on(`blocks-popover:open`,b),n.on(`blocks-popover:close`,x)}),Ai(()=>{n.off(`blocks-popover:open`,b),n.off(`blocks-popover:close`,x)}),(e,n)=>{let r=wae;return F(),L(k(by).RootProvider,{value:k(h)},{default:j(()=>[z(k(by).Positioner,{class:`!z-[1100]`},{default:j(()=>[z(k(by).Content,{class:`bg-white shadow rounded-md w-[640px] h-[520px] border flex flex-col`},{default:j(()=>[z(k(fv).Root,{class:`flex-none p-2`},{default:j(()=>[z(k(fv).Input,{modelValue:k(f),"onUpdate:modelValue":n[0]||=e=>dn(f)?f.value=e:null,class:`rounded border w-full text-sm h-8 px-3 focus-visible:ring-2 focus-visible:border-transparent focus-visible:ring-accent focus-visible:outline-none`,placeholder:k(t)(`blocksPopover.searchPlaceholder`)},null,8,[`modelValue`,`placeholder`])]),_:1}),k(m)?(F(),L(k(Gy).Root,{key:0,class:`flex-1 flex flex-col overflow-hidden`,defaultValue:`blocks`},{default:j(()=>[z(k(Gy).List,{class:`flex flex-none bg-gray-100 p-[2px] rounded mx-2`},{default:j(()=>[z(k(Gy).Trigger,{value:`blocks`,class:`flex-1 py-1.5 rounded data-selected:bg-white data-selected:shadow`},{default:j(()=>[B(E(k(t)(`blocksPopover.tabBlocks`)),1)]),_:1}),z(k(Gy).Trigger,{value:`saved`,class:`flex-1 py-1.5 rounded data-selected:bg-white data-selected:shadow`},{default:j(()=>[B(E(k(t)(`blocksPopover.tabSaved`)),1)]),_:1})]),_:1}),z(k(Gy).Content,{value:`blocks`,class:`flex-1 overflow-hidden mt-2`},{default:j(()=>[z(r,{"blocks-by-category":k(v),"search-query":k(f),onBlockSelect:y},null,8,[`blocks-by-category`,`search-query`])]),_:1})]),_:1})):(F(),I(`div`,Eae,[z(r,{"blocks-by-category":k(v),"search-query":k(f),onBlockSelect:y},null,8,[`blocks-by-category`,`search-query`])]))]),_:1})]),_:1})]),_:1},8,[`value`])}}}),Oae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function kae(e,t){return F(),I(`svg`,Oae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75`},null,-1)]])}var Aae=D({name:`heroicons-adjustments-horizontal`,render:kae}),jae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mae(e,t){return F(),I(`svg`,jae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.088 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0`},null,-1)]])}var ax=D({name:`heroicons-trash`,render:Mae}),Nae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pae(e,t){return F(),I(`svg`,Nae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M3.98 8.223A10.5 10.5 0 0 0 1.934 12c1.292 4.339 5.31 7.5 10.066 7.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.499a10.52 10.52 0 0 1-4.293 5.773M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88`},null,-1)]])}var ox=D({name:`heroicons-eye-slash`,render:Pae}),Fae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Iae(e,t){return F(),I(`svg`,Fae,[...t[0]||=[R(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`},[R(`path`,{d:`M2.036 12.322a1 1 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178`}),R(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0`})],-1)]])}var sx=D({name:`heroicons-eye`,render:Iae}),Lae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rae(e,t){return F(),I(`svg`,Lae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3`},null,-1)]])}var zae=D({name:`heroicons-arrow-long-right`,render:Rae}),Bae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vae(e,t){return F(),I(`svg`,Bae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18`},null,-1)]])}var Hae=D({name:`heroicons-arrow-long-left`,render:Vae}),Uae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wae(e,t){return F(),I(`svg`,Uae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9 9 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9 9 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75`},null,-1)]])}var cx=D({name:`heroicons-document-duplicate`,render:Wae}),Gae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Kae(e,t){return F(),I(`svg`,Gae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M12 6.75a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5m0 6a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5m0 6a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5`},null,-1)]])}var qae=D({name:`heroicons-ellipsis-vertical`,render:Kae}),Jae={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yae(e,t){return F(),I(`svg`,Jae,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M15.75 19.5L8.25 12l7.5-7.5`},null,-1)]])}var Xae=D({name:`heroicons-chevron-left`,render:Yae});function lx(){let e=or(ml);if(!e)throw Error(`useSelectedBlock must be used within a component that has access to CraftileEditor`);let{regions:t,blocks:n,moveBlock:r,duplicateBlock:i,toggleBlock:a,removeBlock:o}=nx(),s=U(()=>!!e.ui.state.selectedBlockId),c=U(()=>e.ui.state.selectedBlockId),l=U(()=>e.ui.state.selectedBlockId&&n.value[e.ui.state.selectedBlockId]||null),u=t=>{e.ui.setSelectedBlock(t)},d=()=>{e.ui.clearSelectedBlock(),e.inspector.clearSelectedBlock()},f=U(()=>{if(!l.value)return null;let e=l.value;for(let n of t.value){let t=n.blocks.indexOf(e.id);if(t!==-1)return{parentType:`region`,parentId:f_(n),currentIndex:t,siblingCount:n.blocks.length}}if(e.parentId){let t=n.value[e.parentId];if(t){let n=t.children.indexOf(e.id);if(n!==-1)return{parentType:`block`,parentId:e.parentId,currentIndex:n,siblingCount:t.children.length}}}return null});return{hasSelection:s,selectedBlockId:c,selectedBlock:l,canMoveToPrevious:U(()=>!l.value||l.value?.static?!1:f.value&&f.value.currentIndex>0),canMoveToNext:U(()=>!l.value||l.value?.static?!1:f.value&&f.value.currentIndex{if(!l.value||!f.value)return;let e=f.value.currentIndex-1;f.value.parentType===`region`?r(l.value.id,{targetRegionId:f.value.parentId,targetIndex:e}):f.value.parentType===`block`&&r(l.value.id,{targetParentId:f.value.parentId,targetIndex:e})},moveToNext:()=>{if(!l.value||!f.value)return;let e=f.value.currentIndex+1;f.value.parentType===`region`?r(l.value.id,{targetRegionId:f.value.parentId,targetIndex:e}):f.value.parentType===`block`&&r(l.value.id,{targetParentId:f.value.parentId,targetIndex:e})},duplicate:()=>{c.value&&i(c.value)},toggle:()=>{c.value&&a(c.value)},remove:()=>{c.value&&o(c.value)}}}var Zae={key:0,class:`border-b border-gray-200 bg-white px-3 py-2 flex-none`},Qae={class:`flex items-center gap-2`},$ae=[`aria-label`],eoe={class:`flex-1 min-w-0`},toe=M({__name:`ConfigurationHeader`,props:{isOverlay:{type:Boolean,default:!1}},setup(e){let t=e,{t:n}=Ib(),{engine:r,moveBlock:i,duplicateBlock:a,toggleBlock:o,removeBlock:s,setBlockName:c}=nx(),{selectedBlock:l,clearSelection:u}=lx(),d=U(()=>l.value?l.value.name?l.value.name:r.getBlockSchema(l.value.type)?.meta?.name||l.value.type:``),f=O(!1),p=O(``),m=O(null);function h(){l.value&&(p.value=d.value,f.value=!0,zn(()=>{m.value?.focus(),m.value?.select()}))}function g(){if(!l.value||!p.value.trim()){_();return}let e=p.value.trim();e!==d.value&&c(l.value.id,e),f.value=!1}function _(){f.value=!1,p.value=``}function v(e){e.key===`Enter`?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),_())}let y=U(()=>{if(!l.value)return null;let e=r.getPage(),t=l.value;for(let n of e.regions){let e=n.blocks.indexOf(t.id);if(e!==-1)return{parentType:`region`,parentId:f_(n),currentIndex:e,siblingCount:n.blocks.length}}if(t.parentId){let n=e.blocks[t.parentId];if(n){let e=n.children.indexOf(t.id);if(e!==-1)return{parentType:`block`,parentId:t.parentId,currentIndex:e,siblingCount:n.children.length}}}return null}),b=U(()=>!l.value||l.value?.static?!1:y.value&&y.value.currentIndex>0),x=U(()=>!l.value||l.value?.static?!1:y.value&&y.value.currentIndex{let i=Xae,a=qae,o=cx,s=Hae,c=zae,_=sx,y=ox,T=ax;return k(l)?(F(),I(`div`,Zae,[R(`div`,Qae,[t.isOverlay?(F(),I(`button`,{key:0,onClick:r[0]||=(...e)=>k(u)&&k(u)(...e),class:`flex-none flex items-center justify-center w-8 h-8 rounded-md hover:bg-gray-100 transition-colors`,"aria-label":k(n)(`common.close`)},[z(i,{class:`w-4 h-4 text-gray-600`})],8,$ae)):V(``,!0),R(`div`,eoe,[k(f)?rr((F(),I(`input`,{key:0,ref_key:`nameInputRef`,ref:m,"onUpdate:modelValue":r[1]||=e=>dn(p)?p.value=e:null,type:`text`,onBlur:g,onKeydown:v,class:`w-full text-sm font-medium text-gray-900 px-2 py-1 rounded border border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500`},null,544)),[[Ic,k(p)]]):(F(),I(`button`,{key:1,onClick:h,class:`w-full text-left text-sm font-medium text-gray-900 truncate capitalize px-2 py-1 rounded hover:bg-gray-100 transition-colors`},E(k(d)),1))]),z(k(Uv).Root,{positioning:{strategy:`fixed`,placement:`bottom-end`}},{default:j(()=>[z(k(Uv).Trigger,{class:`flex items-center justify-center w-8 h-8 rounded-md hover:bg-gray-100 transition-colors`},{default:j(()=>[z(a,{class:`w-4 h-4 text-gray-600`})]),_:1}),z(k(Uv).Positioner,{class:`!z-10`},{default:j(()=>[z(k(Uv).Content,{class:`bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px] focus:outline-none`},{default:j(()=>[z(k(Uv).Item,{value:`duplicate`,disabled:k(l).static,onSelect:S,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(o,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.duplicate`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`move-next`,disabled:!k(b),onSelect:ee,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(s,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.moveToPrevious`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`move-next`,disabled:!k(x),onSelect:C,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(c,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.moveToNext`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`toggle`,onSelect:te,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer`},{default:j(()=>[k(l).disabled?(F(),L(_,{key:0,class:`w-4 h-4`})):(F(),L(y,{key:1,class:`w-4 h-4`})),B(` `+E(k(l).disabled?k(n)(`block.enable`):k(n)(`block.disable`)),1)]),_:1}),z(k(Uv).Item,{value:`remove`,disabled:k(l).static,onSelect:w,class:`flex items-center gap-2 px-3 py-2 text-sm text-red-600 hover:bg-red-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(T,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.remove`)),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1})])])):V(``,!0)}}}),noe={class:`h-full w-full flex flex-col bg-white relative`},roe={class:`flex-1 overflow-y-auto`},ioe={key:1,class:`flex-1 overflow-y-auto`},aoe={key:1,class:`h-full flex flex-col items-center justify-center p-6 text-center`},ooe={class:`w-16 h-16 bg-gray-100 rounded-lg flex items-center justify-center mb-4`},soe={class:`text-lg font-medium text-gray-900 mb-2`},coe={class:`text-sm text-gray-500 max-w-xs`},ux=M({__name:`ConfigurationPanels`,props:{isOverlay:{type:Boolean,default:!1}},setup(e){let t=or(ml),{t:n}=Ib(),{configurationPanels:r}=n_(),{hasSelection:i}=lx(),a=O(`properties`),o=U(()=>r.value.length>=2),s=U(()=>i.value&&r.value.length>0?r.value[0]:null);return(e,c)=>{let l=toe,u=b_,d=Aae;return F(),I(`div`,noe,[z(l,{"is-overlay":e.isOverlay,class:`flex-none`},null,8,[`is-overlay`]),k(i)?(F(),I(P,{key:0},[k(o)?(F(),L(k(Gy).Root,{key:0,modelValue:k(a),"onUpdate:modelValue":c[0]||=e=>dn(a)?a.value=e:null,class:`flex-1 flex flex-col overflow-y-hidden`},{default:j(()=>[z(k(Gy).List,{class:`flex border-b flex-none`},{default:j(()=>[(F(!0),I(P,null,Vi(k(r),e=>(F(),L(k(Gy).Trigger,{key:e.id,value:e.id,class:`flex items-center gap-0.5 px-1.5 py-2 text-xs font-medium transition-colors text-gray-500 data-selected:border-b-2 data-selected:border-accent data-selected:text-accent hover:text-gray-700`},{default:j(()=>[e.icon&&(k(Qg)(e.icon)||k($g)(e.icon))?(F(),L(Ri(e.icon),{key:0,editor:k(t),class:`w-3 h-3`},null,8,[`editor`])):e.icon&&k(e_)(e.icon)?(F(),L(u,{key:1,"render-fn":e.icon,class:`w-3 h-3`},null,8,[`render-fn`])):V(``,!0),B(` `+E(e.title),1)]),_:2},1032,[`value`]))),128))]),_:1}),R(`div`,roe,[(F(!0),I(P,null,Vi(k(r),e=>(F(),L(k(Gy).Content,{key:e.id,value:e.id},{default:j(()=>[k(Qg)(e.render)||k($g)(e.render)?(F(),L(Ri(e.render),{editor:k(t),key:e.id},null,8,[`editor`])):k(e_)(e.render)?(F(),L(u,{key:1,"render-fn":e.render,class:`h-full`},null,8,[`render-fn`])):V(``,!0)]),_:2},1032,[`value`]))),128))])]),_:1},8,[`modelValue`])):k(s)?(F(),I(`div`,ioe,[k(Qg)(k(s).render)||k($g)(k(s).render)?(F(),L(Ri(k(s).render),{key:0,editor:k(t)},null,8,[`editor`])):k(e_)(k(s).render)?(F(),L(u,{key:1,"render-fn":k(s).render},null,8,[`render-fn`])):V(``,!0)])):V(``,!0)],64)):(F(),I(`div`,aoe,[R(`div`,ooe,[z(d,{class:`w-8 h-8 text-gray-400`})]),R(`h3`,soe,E(k(n)(`configPanels.properties`)),1),R(`p`,coe,E(k(n)(`configPanels.selectedBlock`)),1)]))])}}}),loe={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function uoe(e,t){return F(),I(`svg`,loe,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.286a1.5 1.5 0 0 0 1.492-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25m2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75zM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6m3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711`,"clip-rule":`evenodd`},null,-1)]])}var doe=D({name:`heroicons-trash16-solid`,render:uoe}),foe={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function poe(e,t){return F(),I(`svg`,foe,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M3.28 2.22a.75.75 0 0 0-1.06 1.06l10.5 10.5a.75.75 0 1 0 1.06-1.06l-1.322-1.323a7 7 0 0 0 2.16-3.11a.87.87 0 0 0 0-.567A7.003 7.003 0 0 0 4.82 3.76zm3.196 3.195l1.135 1.136A1.502 1.502 0 0 1 9.45 8.389l1.136 1.135a3 3 0 0 0-4.109-4.109`,"clip-rule":`evenodd`},null,-1),R(`path`,{fill:`currentColor`,d:`m7.812 10.994l1.816 1.816A7.003 7.003 0 0 1 1.38 8.28a.87.87 0 0 1 0-.566a7 7 0 0 1 1.113-2.039l2.513 2.513a3 3 0 0 0 2.806 2.806`},null,-1)]])}var moe=D({name:`heroicons-eye-slash16-solid`,render:poe}),hoe={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function goe(e,t){return F(),I(`svg`,hoe,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M5.5 3.5A1.5 1.5 0 0 1 7 2h2.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 1 .439 1.061V9.5A1.5 1.5 0 0 1 12 11V8.621a3 3 0 0 0-.879-2.121L9 4.379A3 3 0 0 0 6.879 3.5z`},null,-1),R(`path`,{fill:`currentColor`,d:`M4 5a1.5 1.5 0 0 0-1.5 1.5v6A1.5 1.5 0 0 0 4 14h5a1.5 1.5 0 0 0 1.5-1.5V8.621a1.5 1.5 0 0 0-.44-1.06L7.94 5.439A1.5 1.5 0 0 0 6.878 5z`},null,-1)]])}var _oe=D({name:`heroicons-document-duplicate16-solid`,render:goe}),voe={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function yoe(e,t){return F(),I(`svg`,voe,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M8 2a.75.75 0 0 1 .75.75v8.69l1.22-1.22a.75.75 0 1 1 1.06 1.06l-2.5 2.5a.75.75 0 0 1-1.06 0l-2.5-2.5a.75.75 0 1 1 1.06-1.06l1.22 1.22V2.75A.75.75 0 0 1 8 2`,"clip-rule":`evenodd`},null,-1)]])}var boe=D({name:`heroicons-arrow-long-down16-solid`,render:yoe}),xoe=[`disabled`,`title`],Soe=M({__name:`PreviewToolbarButton`,props:{disabled:{type:Boolean,default:!1},title:{},variant:{default:`default`}},emits:[`click`],setup(e){let t=e,n=U(()=>`w-6 h-6 flex items-center justify-center border-0 bg-transparent rounded-md cursor-pointer relative disabled:text-gray-600 disabled:cursor-not-allowed [&>svg]:w-3.5 &[&>svg]:h-3.5 ${{default:`text-gray-400 hover:enabled:bg-gray-500 hover:enabled:text-gray-100 active:enabled:bg-gray-600`,danger:`text-gray-400 hover:enabled:bg-red-800 hover:enabled:text-red-200 active:enabled:bg-gray-600`}[t.variant]}`);return(e,t)=>(F(),I(`button`,{disabled:e.disabled,title:e.title,class:ke(n.value),onClick:t[0]||=Xc(t=>e.$emit(`click`,t),[`stop`])},[N(e.$slots,`default`)],10,xoe))}}),Coe={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function woe(e,t){return F(),I(`svg`,Coe,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M8 14a.75.75 0 0 0 .75-.75V4.56l1.22 1.22a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0l-2.5 2.5a.75.75 0 0 0 1.06 1.06l1.22-1.22v8.69c0 .414.336.75.75.75`,"clip-rule":`evenodd`},null,-1)]])}var Toe=D({name:`heroicons-arrow-long-up16-solid`,render:woe});function dx(){let e=or(ml);if(!e)throw Error(`useInspector must be used within a component that has access to CraftileEditor`);let t=U(()=>e.inspector.state.enabled),n=U(()=>e.inspector.state.hoveredBlockRect),r=U(()=>e.inspector.state.hoveredParentRect),i=U(()=>e.inspector.state.hoveredBlockId),a=U(()=>e.inspector.state.selectedBlockRect),o=U(()=>e.inspector.state.parentFlexDirection);return{isEnabled:t,iframeRect:U(()=>e.inspector.state.iframeRect),hoveredBlockId:i,hoveredBlockRect:n,hoveredParentRect:r,selectedBlockRect:a,parentFlexDirection:o,enable:()=>e.inspector.enable(),disable:()=>e.inspector.disable(),toggle:()=>e.inspector.toggle(),updateIframeRect:t=>e.inspector.setIframeRect(t),clearHoveredBlock:()=>e.inspector.clearHoveredBlock()}}var Eoe={key:0,class:`absolute -top-[18.5px] left-0 bg-blue-500/95 text-white px-1 py-0.5 font-semibold text-[0.6rem] flex items-center gap-0.5 pointer-events-none whitespace-nowrap shadow-lg rounded-t`},Doe=[`innerHTML`],Ooe=M({__name:`SelectedBlockOverlay`,props:{zoomScale:{default:1}},setup(e){let t=e,{t:n}=Ib(),{engine:r,getBlockById:i}=nx(),{isEnabled:a,selectedBlockRect:o,iframeRect:s}=dx(),{selectedBlock:c,canMoveToPrevious:l,canMoveToNext:u,moveToPrevious:d,moveToNext:f,duplicate:p,toggle:m,remove:h}=lx(),g=O(),_=O({width:200,height:42}),v=U(()=>a.value&&o.value&&s.value&&!c.value?.disabled&&!c.value?.ghost),y=U(()=>c.value?.static===!0),b=U(()=>{if(!c.value)return{name:n(`common.block`),icon:``};let e=i(c.value.id);if(!e)return{name:n(`common.block`),icon:``};let t=r.getBlockSchema(e.type);return{name:t?.meta?.name||e.type||n(`common.block`),icon:t?.meta?.icon||``}}),x=U(()=>b.value.name),S=U(()=>b.value.icon),C=U(()=>{if(!o.value||!x.value)return!1;let e=20+x.value.length*7+20;return o.value.width>=e}),ee=U(()=>!o.value||!s.value?{}:{position:`absolute`,left:`${o.value.left}px`,top:`${o.value.top}px`,width:`${o.value.width}px`,height:`${o.value.height}px`});pr([g,v],async()=>{if(g.value&&v.value&&(await zn(),g.value)){let e=g.value.getBoundingClientRect();_.value={width:e.width,height:e.height}}},{immediate:!0});let te=U(()=>{if(!o.value||!s.value)return{};let e=o.value,n=s.value,{width:r,height:i}=_.value,a=t.zoomScale,c=e.width*a,l=e.top-n.top{let r=Toe,i=Soe,a=boe,o=_oe,s=moe,c=doe;return k(v)?(F(),I(`div`,{key:0,class:`absolute inset-0 w-full h-full pointer-events-none z-10`,style:Ee(k(ee))},[k(C)?(F(),I(`div`,Eoe,[R(`span`,{class:`w-3 h-3 flex items-center justify-center [&_svg]:w-full [&_svg]:h-full [&_svg]:fill-current`,innerHTML:k(S)},null,8,Doe),R(`span`,null,E(k(x)),1)])):V(``,!0),t[0]||=R(`div`,{class:`absolute inset-0 border border-blue-500 bg-blue-500/5`},null,-1),R(`div`,{ref_key:`toolbarElement`,ref:g,class:`absolute flex gap-0.5 bg-gray-800 rounded p-0.5 shadow-lg shadow-black/25 ring-1 ring-white/10 z-10 pointer-events-auto`,style:Ee(k(te))},[k(y)?V(``,!0):(F(),L(i,{key:0,disabled:!k(l),title:k(n)(`block.moveToPrevious`),onClick:k(d)},{default:j(()=>[z(r,{class:`w-3.5 h-3.5`})]),_:1},8,[`disabled`,`title`,`onClick`])),k(y)?V(``,!0):(F(),L(i,{key:1,disabled:!k(u),title:k(n)(`block.moveToNext`),onClick:k(f)},{default:j(()=>[z(a)]),_:1},8,[`disabled`,`title`,`onClick`])),k(y)?V(``,!0):(F(),L(i,{key:2,title:k(n)(`block.duplicate`),onClick:k(p)},{default:j(()=>[z(o)]),_:1},8,[`title`,`onClick`])),z(i,{title:k(n)(`block.disable`),onClick:k(m)},{default:j(()=>[z(s)]),_:1},8,[`title`,`onClick`]),k(y)?V(``,!0):(F(),L(i,{key:3,variant:`danger`,title:k(n)(`block.remove`),onClick:k(h)},{default:j(()=>[z(c)]),_:1},8,[`title`,`onClick`]))],4)],4)):V(``,!0)}}}),koe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Aoe(e,t){return F(),I(`svg`,koe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M12 4.5v15m7.5-7.5h-15`},null,-1)]])}var fx=D({name:`heroicons-plus`,render:Aoe}),px={key:0,class:`absolute top-0 left-0 w-full h-full pointer-events-none z-[1000]`},mx={class:`bg-blue-500 text-white px-1 py-0.5 rounded-t font-medium text-[0.60rem] flex items-center gap-0.5 pointer-events-none absolute -left-[1px] -top-[19px] max-w-full overflow-hidden`},hx=[`innerHTML`],gx={class:`truncate min-w-0`},_x=M({__name:`HoveredBlockOverlay`,emits:[`insertBefore`,`insertAfter`,`buttonEnter`,`buttonLeave`],setup(e,{emit:t}){let n=t,{t:r}=Ib(),{engine:i,getBlockById:a}=nx(),{isEnabled:o,iframeRect:s,hoveredBlockId:c,hoveredBlockRect:l,hoveredParentRect:u,parentFlexDirection:d}=dx(),{selectedBlockId:f}=lx(),p=U(()=>o.value&&c.value&&c.value!==f.value),m=U(()=>{if(!c.value)return{name:r(`common.block`),icon:``};let e=a(c.value);if(!e)return{name:r(`common.block`),icon:``};let t=i.getBlockSchema(e.type);return{name:t?.meta?.name||e.type||r(`common.block`),icon:t?.meta?.icon||``}}),h=U(()=>m.value.name),g=U(()=>m.value.icon),_=U(()=>!u.value||!s.value?{}:{position:`absolute`,left:`${u.value.left}px`,top:`${u.value.top}px`,width:`${u.value.width}px`,height:`${u.value.height}px`}),v=U(()=>!l.value||!s.value?{}:{position:`absolute`,left:`${l.value.left}px`,top:`${l.value.top}px`,width:`${l.value.width}px`,height:`${l.value.height}px`});return(e,t)=>{let r=fx;return k(p)?(F(),I(`div`,px,[k(u)?(F(),I(`div`,{key:0,class:`border border-dashed border-slate-400 bg-transparent pointer-events-none box-border absolute`,style:Ee(k(_))},null,4)):V(``,!0),R(`div`,{class:`border border-dashed border-blue-500 bg-transparent pointer-events-none box-border relative`,style:Ee(k(v))},[R(`div`,mx,[R(`span`,{class:`w-3 h-3 shrink-0 flex items-center justify-center [&_svg]:w-full [&_svg]:h-full [&_svg]:fill-current`,innerHTML:k(g)},null,8,hx),R(`span`,gx,E(k(h)),1)]),R(`button`,{class:ke([`w-4 h-4 bg-blue-500/90 border border-white/20 rounded-full flex items-center justify-center text-white cursor-pointer pointer-events-auto opacity-80 shadow-sm hover:opacity-100 hover:bg-blue-500 absolute`,{"-top-2 left-1/2 -translate-x-1/2":k(d)===`column`,"-left-2 top-1/2 -translate-y-1/2":k(d)===`row`}]),onMouseenter:t[0]||=e=>n(`buttonEnter`,k(c)),onMouseleave:t[1]||=e=>n(`buttonLeave`,k(c)),onClick:t[2]||=Xc(e=>n(`insertBefore`,k(c),e),[`stop`])},[z(r,{class:`w-3 h-3 fill-current`})],34),R(`button`,{class:ke([`w-4 h-4 bg-blue-500/90 border border-white/20 rounded-full flex items-center justify-center text-white cursor-pointer pointer-events-auto opacity-80 shadow-sm hover:opacity-100 hover:bg-blue-500 absolute`,{"-bottom-2 left-1/2 -translate-x-1/2":k(d)===`column`,"-right-2 top-1/2 -translate-y-1/2":k(d)===`row`}]),onMouseenter:t[3]||=e=>n(`buttonEnter`,k(c)),onMouseleave:t[4]||=e=>n(`buttonLeave`,k(c)),onClick:t[5]||=Xc(e=>n(`insertAfter`,k(c),e),[`stop`])},[z(r,{class:`w-3 h-3 fill-current`})],34)],4)])):V(``,!0)}}});function vx(){let e=or(ml);if(!e)throw Error(`usePreview must be used within a component that has access to CraftileEditor`);return{currentPreviewUrl:U(()=>e.preview.state.previewUrl),isIframeReady:U(()=>e.preview.state.isIframeReady),previewFrame:U(()=>e.preview.state.previewFrame),registerFrame:e.preview._registerFrame.bind(e.preview),onMessage:e.preview.onMessage.bind(e.preview),sendMessage:e.preview.sendMessage.bind(e.preview),loadUrl:e.preview.loadUrl.bind(e.preview),loadFromHtml:e.preview.loadFromHtml.bind(e.preview),reload:e.preview.reload.bind(e.preview),getFrame:e.preview.getFrame.bind(e.preview)}}var yx=[`src`],bx=M({__name:`PreviewCanvas`,setup(e){let{currentDeviceData:t}=r_(),{currentPreviewUrl:n,registerFrame:r,sendMessage:i}=vx(),{updateIframeRect:a,clearHoveredBlock:o}=dx(),{open:s,getInsertionContext:c}=rx(),{clearSelection:l}=lx(),u=O(),d=O(),f=U(()=>t.value?.width),p=()=>d.value?.getBoundingClientRect().width||0,m=U(()=>{let e=p();if(e<=0||!f.value||f.value===0||f.value<=e)return 1;let t=e/f.value;return Math.min(t,1)}),h=U(()=>{let e=m.value,t=f.value===0?`100%`:`${f.value}px`,n=f.value===0?`none`:`scale(${e})`;return{width:t,height:`${100/e}%`,transform:n,transformOrigin:`0 0`}}),g=()=>{u.value&&a(u.value.getBoundingClientRect())},_=e=>{l(),o(),r(e.target),g()},v=e=>{i(`craftile.inspector.overlay-button-enter`,{blockId:e})},y=e=>{i(`craftile.inspector.overlay-button-leave`,{blockId:e})},b=(e,t)=>{let n=c(e,`before`);s({anchor:t.target,context:n})},x=(e,t)=>{let n=c(e,`after`);s({anchor:t.target,context:n})};return Ei(()=>{window.addEventListener(`scroll`,g)}),Ai(()=>{window.removeEventListener(`scroll`,g)}),(e,t)=>{let r=_x,i=Ooe;return F(),I(`div`,{ref_key:`previewWrapper`,ref:d,class:`h-full w-full relative preview-wrapper overflow-hidden`},[R(`div`,{ref_key:`canvasContainer`,ref:u,class:`bg-white mx-auto rounded-xs relative transition-transform duration-300 ease-out`,style:Ee(k(h))},[R(`iframe`,{ref:`previewFrame`,src:k(n),class:`w-full h-full border-0 preview-iframe`,onLoad:_},null,40,yx),z(r,{onButtonEnter:v,onButtonLeave:y,onInsertBefore:b,onInsertAfter:x}),z(i)],4)],512)}}}),xx=M({__name:`AddBlockBtn`,props:{blockId:{}},setup(e){let t=e,{open:n,getInsertionContext:r}=rx(),i=O(null);function a(){i.value&&n({anchor:i.value,context:r(t.blockId,`after`)})}return(e,t)=>{let n=fx;return F(),I(`div`,{ref_key:`el`,ref:i,class:`relative flex items-center w-full h-1.5 transition-colors group rounded`},[t[0]||=R(`div`,{class:`h-[2px] w-0 bg-accent/70 group-hover:w-full transition-[width] duration-100 absolute left-1/2 transform -translate-x-1/2`},null,-1),R(`button`,{class:`bg-accent text-accent-foreground h-4 w-4 hidden group-hover:flex items-center justify-center absolute left-1/2 transform -translate-x-1/2 rounded-full cursor-pointer hover:ring-2 hover:ring-accent/40`,onClick:a},[z(n,{class:`w-3 h-3`})])],512)}}}),Sx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Cx(e,t){return F(),I(`svg`,Sx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5`},null,-1)]])}var wx=D({name:`heroicons-code-bracket`,render:Cx}),Tx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ex(e,t){return F(),I(`svg`,Tx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0l3-3m-3 3V2.25`},null,-1)]])}var Dx=D({name:`heroicons-arrow-down-on-square`,render:Ex}),Ox={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function kx(e,t){return F(),I(`svg`,Ox,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3l-3-3m0 0l-3 3m3-3V15`},null,-1)]])}var Ax=D({name:`heroicons-arrow-up-on-square`,render:kx}),jx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mx(e,t){return F(),I(`svg`,jx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3`},null,-1)]])}var Nx=D({name:`heroicons-arrow-long-down`,render:Mx}),Px={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Fx(e,t){return F(),I(`svg`,Px,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18`},null,-1)]])}var Ix=D({name:`heroicons-arrow-long-up`,render:Fx}),Lx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rx(e,t){return F(),I(`svg`,Lx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0q.083.292.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0q.002-.32.084-.612m7.332 0q.969.073 1.927.184c1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48 48 0 0 1 1.927-.184`},null,-1)]])}var zx=D({name:`heroicons-clipboard`,render:Rx}),Bx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Vx(e,t){return F(),I(`svg`,Bx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192q.56-.045 1.124-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48 48 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.25 2.25 0 0 0 15 2.25h-1.5a2.25 2.25 0 0 0-2.15 1.586m5.8 0q.099.316.1.664v.75h-6V4.5q.001-.348.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9`},null,-1)]])}var Hx=D({name:`heroicons-clipboard-document`,render:Vx});function Ux(e){let{engine:t,blocks:n,getBlockById:r,getChildrenBlocks:i,setBlockProperty:a,toggleBlock:o,removeBlock:s,duplicateBlock:c,moveBlock:l,regions:u}=nx(),d=U(()=>r(e)),f=U(()=>d.value?.properties||{}),p=U(()=>d.value?.type),m=U(()=>d.value?.disabled),h=U(()=>{if(d.value)return t.getBlockSchema(d.value.type)}),g=U(()=>{if(_.value)return _.value.children?.indexOf(e)??-1;for(let t of u.value){let n=t.blocks.indexOf(e);if(n!==-1)return n}}),_=U(()=>{if(d.value){for(let t of u.value)if(t.blocks.includes(e))return;for(let t of Object.values(n.value))if(t.children?.includes(e))return t}}),v=U(()=>i(e)),y=U(()=>{if(!(g.value===void 0||g.value<=0)){if(_.value){let e=_.value.children[g.value-1];return r(e)}for(let t of u.value)if(t.blocks.includes(e)){let e=t.blocks[g.value-1];return r(e)}}}),b=U(()=>{if(!(g.value===void 0||g.value<0)){if(_.value){if(g.value>=_.value.children.length-1)return;let e=_.value.children[g.value+1];return r(e)}for(let t of u.value)if(t.blocks.includes(e)){if(g.value>=t.blocks.length-1)return;let e=t.blocks[g.value+1];return r(e)}}}),x=U(()=>_.value===void 0),S=U(()=>v.value.length>0);return{block:d,properties:f,type:p,disabled:m,schema:h,index:g,parent:_,children:v,isRootLevel:x,hasChildren:S,canHaveChildren:U(()=>h.value?.accepts&&h.value.accepts.length>0||S.value),previousSibling:y,nextSibling:b,setProperty:(t,n)=>{a(e,t,n)},toggle:t=>{o(e,t)},remove:()=>{s(e)},duplicate:()=>c(e),moveChild:(t,n)=>{l(t,{targetParentId:e,targetIndex:n})}}}function Wx(){let e=or(ml);if(!e)throw Error(`useClipboard must be used within a component that has access to CraftileEditor`);let{engine:t,pasteBlock:n}=nx(),r=e.ui,i=U(()=>r.state.clipboard.copiedBlock),a=U(()=>i.value!==null);function o(e){try{let n=t.exportBlockAsNestedStructure(e);r.copyBlock(n)}catch(e){console.error(`Failed to copy block:`,e)}}function s(e){let n=i.value;if(!n)return!1;let r=t.getBlockById(e);if(!r)return!1;if(r.parentId){let e=t.getBlockById(r.parentId);if(!e||!t.getBlocksManager().canBeChild(n.type,e.type)||e.static)return!1}return!0}function c(e){let a=i.value;if(!a||!s(e))return;let o=cn(a),c=t.getBlockById(e).parentId,l;try{if(c)l=t.getBlockById(c).children.indexOf(e)+1,n(o,{parentId:c,index:l});else{let r=t.getPage();for(let t of r.regions){let r=t.blocks.indexOf(e);if(r!==-1){l=r+1,n(o,{regionId:f_(t),index:l});break}}}}catch(e){r.toast({title:e instanceof Error?e.message:String(e),type:`error`})}}function l(){r.clearClipboard()}function u(e){try{let n=t.exportBlockAsNestedStructure(e),i=JSON.stringify(n,null,2);navigator.clipboard.writeText(i).then(()=>{r.toast({title:`Block copied as JSON`,type:`success`})},e=>{console.error(`Failed to copy to clipboard:`,e),r.toast({title:`Failed to copy to clipboard`,type:`error`})})}catch(e){console.error(`Failed to export block:`,e),r.toast({title:`Failed to export block`,type:`error`})}}return{copiedBlock:i,hasCopiedBlock:a,copyBlock:o,canPasteAfter:s,pasteBlockAfter:c,clearClipboard:l,copyBlockAsJSON:u}}var Gx=M({__name:`BlockContextMenu`,props:{blockId:{}},setup(e){let t=e,{t:n}=Ib(),{engine:r,moveBlock:i,duplicateBlock:a,toggleBlock:o,removeBlock:s,blocks:c,regions:l}=nx(),{open:u,getInsertionContext:d}=rx(),{block:f,parent:p,index:m}=Ux(t.blockId),{toaster:h}=n_(),{copyBlock:g,canPasteAfter:_,pasteBlockAfter:v,hasCopiedBlock:y,copyBlockAsJSON:b}=Wx(),x=U(()=>f.value?.static===!0),S=U(()=>!f.value?.parentId),C=U(()=>{if(!f.value)return null;let e=r.getPage(),t=f.value;for(let n of e.regions){let e=n.blocks.indexOf(t.id);if(e!==-1)return{parentType:`region`,parentId:f_(n),currentIndex:e,siblingCount:n.blocks.length}}if(t.parentId){let n=e.blocks[t.parentId];if(n){let e=n.children.indexOf(t.id);if(e!==-1)return{parentType:`block`,parentId:t.parentId,currentIndex:e,siblingCount:n.children.length}}}return null}),ee=U(()=>p.value?.children??l.value.find(e=>e.blocks.includes(t.blockId))?.blocks),te=U(()=>!f.value||x.value||!C.value||C.value.currentIndex<=0?!1:ee.value?g_(ee.value.filter(e=>e!==t.blockId),c.value,C.value.currentIndex-1):!0),w=U(()=>!f.value||x.value||!C.value||C.value.currentIndex>=C.value.siblingCount-1?!1:ee.value?g_(ee.value.filter(e=>e!==t.blockId),c.value,C.value.currentIndex+1):!0),T=U(()=>m.value===void 0||m.value<0||!ee.value?!0:g_(ee.value,c.value,m.value)),ne=U(()=>m.value===void 0||m.value<0||!ee.value?!0:g_(ee.value,c.value,m.value+1)),re=O(null);function ie(){a(t.blockId)}function ae(){o(t.blockId)}function oe(e){try{e()}catch(e){h.create({title:e instanceof Error?e.message:String(e),type:`error`})}}function se(){if(!f.value||!C.value)return;let e=C.value.currentIndex-1;oe(()=>{C.value.parentType===`region`?i(t.blockId,{targetRegionId:C.value.parentId,targetIndex:e}):C.value.parentType===`block`&&i(t.blockId,{targetParentId:C.value.parentId,targetIndex:e})})}function ce(){if(!f.value||!C.value)return;let e=C.value.currentIndex+1;oe(()=>{C.value.parentType===`region`?i(t.blockId,{targetRegionId:C.value.parentId,targetIndex:e}):C.value.parentType===`block`&&i(t.blockId,{targetParentId:C.value.parentId,targetIndex:e})})}function le(){if(!re.value?.$el)return;let e=d(t.blockId,`before`);u({anchor:re.value.$el,context:e})}function ue(){if(!re.value?.$el)return;let e=d(t.blockId,`after`);u({anchor:re.value.$el,context:e})}function de(){!f.value||x.value||s(t.blockId)}let fe=U(()=>S.value?n(`block.insertBlockBefore`):n(`block.insertSiblingBefore`)),pe=U(()=>S.value?n(`block.insertBlockAfter`):n(`block.insertSiblingAfter`));function me(){g(t.blockId)}let he=U(()=>y.value&&_(t.blockId));function ge(){v(t.blockId)}function _e(){b(t.blockId)}return(e,t)=>{let r=Hx,i=zx,a=cx,o=sx,s=ox,c=Ix,l=Nx,u=Ax,d=Dx,p=wx,m=ax;return k(f)?(F(),L(k(Uv).Root,{key:0},{default:j(()=>[z(k(Uv).ContextTrigger,{ref_key:`contextTriggerRef`,ref:re,"as-child":``},{default:j(()=>[N(e.$slots,`default`)]),_:3},512),z(k(Uv).Positioner,null,{default:j(()=>[z(k(Uv).Content,{class:`bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[180px] focus:outline-none z-50`},{default:j(()=>[z(k(Uv).Item,{value:`copy`,onSelect:me,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer`},{default:j(()=>[z(r,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.copy`)),1)]),_:1}),z(k(Uv).Item,{value:`paste-after`,disabled:!k(he),onSelect:ge,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(i,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.pasteAfter`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`duplicate`,disabled:k(x),onSelect:ie,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(a,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.duplicate`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`toggle`,onSelect:ae,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer`},{default:j(()=>[k(f).disabled?(F(),L(o,{key:0,class:`w-4 h-4`})):(F(),L(s,{key:1,class:`w-4 h-4`})),B(` `+E(k(f).disabled?k(n)(`block.enable`):k(n)(`block.disable`)),1)]),_:1}),z(k(Uv).Separator,{class:`my-1 h-px bg-gray-200`}),z(k(Uv).Item,{value:`move-previous`,disabled:!k(te),onSelect:se,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(c,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.moveToPrevious`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`move-next`,disabled:!k(w),onSelect:ce,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(l,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.moveToNext`)),1)]),_:1},8,[`disabled`]),z(k(Uv).Separator,{class:`my-1 h-px bg-gray-200`}),z(k(Uv).Item,{value:`insert-before`,disabled:!k(T),onSelect:le,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(u,{class:`w-4 h-4`}),B(` `+E(k(fe)),1)]),_:1},8,[`disabled`]),z(k(Uv).Item,{value:`insert-after`,disabled:!k(ne),onSelect:ue,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(d,{class:`w-4 h-4`}),B(` `+E(k(pe)),1)]),_:1},8,[`disabled`]),z(k(Uv).Separator,{class:`my-1 h-px bg-gray-200`}),z(k(Uv).Item,{value:`copy-as-json`,onSelect:_e,class:`flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer`},{default:j(()=>[z(p,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.copyAsJson`)),1)]),_:1}),z(k(Uv).Item,{value:`remove`,disabled:k(x),onSelect:de,class:`flex items-center gap-2 px-3 py-2 text-sm text-red-600 hover:bg-red-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`},{default:j(()=>[z(m,{class:`w-4 h-4`}),B(` `+E(k(n)(`block.remove`)),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:3})):V(``,!0)}}}),Kx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qx(e,t){return F(),I(`svg`,Kx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25`},null,-1)]])}var Jx=D({name:`heroicons-lock-closed`,render:qx}),Yx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xx(e,t){return F(),I(`svg`,Yx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5m0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25m9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25`},null,-1)]])}var Zx=D({name:`heroicons-squares-plus`,render:Xx}),Qx={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $x(e,t){return F(),I(`svg`,Qx,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99`},null,-1)]])}var eS=D({name:`heroicons-arrow-path`,render:$x}),tS={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nS(e,t){return F(),I(`svg`,tS,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9`},null,-1)]])}var rS=D({name:`heroicons-cube`,render:nS}),iS={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function aS(e,t){return F(),I(`svg`,iS,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m8.25 4.5l7.5 7.5l-7.5 7.5`},null,-1)]])}var oS=D({name:`heroicons-chevron-right`,render:aS}),sS=Object.defineProperty,cS=Object.getOwnPropertySymbols,lS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,dS=(e,t,n)=>t in e?sS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fS=(e,t)=>{for(var n in t||={})lS.call(t,n)&&dS(e,n,t[n]);if(cS)for(var n of cS(t))uS.call(t,n)&&dS(e,n,t[n]);return e},pS=(e,t)=>{var n={};for(var r in e)lS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cS)for(var r of cS(e))t.indexOf(r)<0&&uS.call(e,r)&&(n[r]=e[r]);return n},mS=`[vue-draggable-plus]: `;function hS(e){console.warn(mS+e)}function gS(e){console.error(mS+e)}function _S(e,t,n){return n>=0&&nt?t.toUpperCase():``)}function yS(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<`u`&&(t[vS(n)]=e[n]),t),{})}function bS(e,t){return Array.isArray(e)&&e.splice(t,1),e}function xS(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function SS(e){return typeof e>`u`}function CS(e){return typeof e==`string`}function wS(e,t,n){let r=e.children[n];e.insertBefore(t,r)}function TS(e){e.parentNode&&e.parentNode.removeChild(e)}function ES(e,t=document){let n=null;return n=typeof t?.querySelector==`function`?(t?.querySelector)?.call(t,e):document.querySelector(e),n||hS(`Element not found: ${e}`),n}function DS(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}function OS(e,t){let n=fS({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=DS(e[r],t[r]):n[r]=t[r]}),n}function kS(e){return e instanceof HTMLElement}function AS(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function jS(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}var MS=Object.assign;function NS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PS(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function zS(e,t){if(e==null)return{};var n=RS(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var BS=`1.15.2`;function VS(e){if(typeof window<`u`&&window.navigator)return!!navigator.userAgent.match(e)}var HS=VS(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),US=VS(/Edge/i),WS=VS(/firefox/i),GS=VS(/safari/i)&&!VS(/chrome/i)&&!VS(/android/i),KS=VS(/iP(ad|od|hone)/i),qS=VS(/chrome/i)&&VS(/android/i),JS={capture:!1,passive:!1};function YS(e,t,n){e.addEventListener(t,n,!HS&&JS)}function XS(e,t,n){e.removeEventListener(t,n,!HS&&JS)}function ZS(e,t){if(t){if(t[0]===`>`&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function QS(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function $S(e,t,n,r){if(e){n||=document;do{if(t!=null&&(t[0]===`>`?e.parentNode===n&&ZS(e,t):ZS(e,t))||r&&e===n)return e;if(e===n)break}while(e=QS(e))}return null}var eC=/\s+/g;function tC(e,t,n){e&&t&&(e.classList?e.classList[n?`add`:`remove`](t):e.className=((` `+e.className+` `).replace(eC,` `).replace(` `+t+` `,` `)+(n?` `+t:``)).replace(eC,` `))}function nC(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,``):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf(`webkit`)===-1&&(t=`-webkit-`+t),r[t]=n+(typeof n==`string`?``:`px`)}}function rC(e,t){var n=``;if(typeof e==`string`)n=e;else do{var r=nC(e,`transform`);r&&r!==`none`&&(n=r+` `+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function iC(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i=a,!o)return r;if(r===aC())break;r=pC(r,!1)}return!1}function cC(e,t,n,r){for(var i=0,a=0,o=e.children;a2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=zS(n,AC);OC.pluginEvent.bind(ww)(e,t,PS({dragEl:K,parentEl:NC,ghostEl:PC,rootEl:FC,nextEl:IC,lastDownEl:LC,cloneEl:RC,cloneHidden:zC,dragStarted:tw,putSortable:GC,activeSortable:ww.active,originalEvent:r,oldIndex:BC,oldDraggableIndex:HC,newIndex:VC,newDraggableIndex:UC,hideGhostForTarget:bw,unhideGhostForTarget:xw,cloneNowHidden:function(){zC=!0},cloneNowShown:function(){zC=!1},dispatchSortableEvent:function(e){MC({sortable:t,name:e,originalEvent:r})}},i))};function MC(e){kC(PS({putSortable:GC,cloneEl:RC,targetEl:K,rootEl:FC,oldIndex:BC,oldDraggableIndex:HC,newIndex:VC,newDraggableIndex:UC},e))}var K,NC,PC,FC,IC,LC,RC,zC,BC,VC,HC,UC,WC,GC,KC=!1,qC=!1,JC=[],YC,XC,ZC,QC,$C,ew,tw,nw,rw,iw=!1,aw=!1,ow,sw,cw=[],lw=!1,uw=[],dw=typeof document<`u`,fw=KS,pw=US||HS?`cssFloat`:`float`,mw=dw&&!qS&&!KS&&`draggable`in document.createElement(`div`),hw=(function(){if(dw){if(HS)return!1;var e=document.createElement(`x`);return e.style.cssText=`pointer-events:auto`,e.style.pointerEvents===`auto`}})(),gw=function(e,t){var n=nC(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=cC(e,0,t),a=cC(e,1,t),o=i&&nC(i),s=a&&nC(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+oC(i).width,l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+oC(a).width;if(n.display===`flex`)return n.flexDirection===`column`||n.flexDirection===`column-reverse`?`vertical`:`horizontal`;if(n.display===`grid`)return n.gridTemplateColumns.split(` `).length<=1?`vertical`:`horizontal`;if(i&&o.float&&o.float!==`none`){var u=o.float===`left`?`left`:`right`;return a&&(s.clear===`both`||s.clear===u)?`vertical`:`horizontal`}return i&&(o.display===`block`||o.display===`flex`||o.display===`table`||o.display===`grid`||c>=r&&n[pw]===`none`||a&&n[pw]===`none`&&c+l>r)?`vertical`:`horizontal`},_w=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2},vw=function(e,t){var n;return JC.some(function(r){var i=r[SC].options.emptyInsertThreshold;if(!(!i||lC(r))){var a=oC(r),o=e>=a.left-i&&e<=a.right+i,s=t>=a.top-i&&t<=a.bottom+i;if(o&&s)return n=r}}),n},yw=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(e==null&&(n||s))return!0;if(e==null||e===!1)return!1;if(n&&e===`clone`)return e;if(typeof e==`function`)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return e===!0||typeof e==`string`&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;(!r||FS(r)!=`object`)&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},bw=function(){!hw&&PC&&nC(PC,`display`,`none`)},xw=function(){!hw&&PC&&nC(PC,`display`,``)};dw&&!qS&&document.addEventListener(`click`,function(e){if(qC)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),qC=!1,!1},!0);var Sw=function(e){if(K){e=e.touches?e.touches[0]:e;var t=vw(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[SC]._onDragOver(n)}}},Cw=function(e){K&&K.parentNode[SC]._isOutsideThisEl(e.target)};function ww(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw`Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;this.el=e,this.options=t=LS({},t),e[SC]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?`>li`:`>*`,swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return gw(e,this.options)},ghostClass:`sortable-ghost`,chosenClass:`sortable-chosen`,dragClass:`sortable-drag`,ignore:`a, img`,filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData(`Text`,t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:`data-id`,delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:`sortable-fallback`,fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ww.supportPointer!==!1&&`PointerEvent`in window&&!GS,emptyInsertThreshold:5};for(var r in OC.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in yw(t),this)i.charAt(0)===`_`&&typeof this[i]==`function`&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:mw,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?YS(e,`pointerdown`,this._onTapStart):(YS(e,`mousedown`,this._onTapStart),YS(e,`touchstart`,this._onTapStart)),this.nativeDraggable&&(YS(e,`dragover`,this),YS(e,`dragenter`,this)),JC.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),LS(this,CC())}ww.prototype={constructor:ww,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(nw=null)},_getDirection:function(e,t){return typeof this.options.direction==`function`?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType===`touch`&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,l=r.filter;if(Pw(n),!K&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&GS&&s&&s.tagName.toUpperCase()===`SELECT`)&&(s=$S(s,r.draggable,n,!1),!(s&&s.animated)&&LC!==s)){if(BC=uC(s),HC=uC(s,r.draggable),typeof l==`function`){if(l.call(this,e,s,this)){MC({sortable:t,rootEl:c,name:`filter`,targetEl:s,toEl:n,fromEl:n}),jC(`filter`,t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(l&&(l=l.split(`,`).some(function(r){if(r=$S(c,r.trim(),n,!1),r)return MC({sortable:t,rootEl:r,name:`filter`,targetEl:s,fromEl:n,toEl:n}),jC(`filter`,t,{evt:e}),!0}),l)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!$S(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,o=i.ownerDocument,s;if(n&&!K&&n.parentNode===i){var c=oC(n);if(FC=i,K=n,NC=K.parentNode,IC=K.nextSibling,LC=n,WC=a.group,ww.dragged=K,YC={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},$C=YC.clientX-c.left,ew=YC.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style[`will-change`]=`all`,s=function(){if(jC(`delayEnded`,r,{evt:e}),ww.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!WS&&r.nativeDraggable&&(K.draggable=!0),r._triggerDragStart(e,t),MC({sortable:r,name:`choose`,originalEvent:e}),tC(K,a.chosenClass,!0)},a.ignore.split(`,`).forEach(function(e){iC(K,e.trim(),Dw)}),YS(o,`dragover`,Sw),YS(o,`mousemove`,Sw),YS(o,`touchmove`,Sw),YS(o,`mouseup`,r._onDrop),YS(o,`touchend`,r._onDrop),YS(o,`touchcancel`,r._onDrop),WS&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),jC(`delayStart`,this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(US||HS))){if(ww.eventCanceled){this._onDrop();return}YS(o,`mouseup`,r._disableDelayedDrag),YS(o,`touchend`,r._disableDelayedDrag),YS(o,`touchcancel`,r._disableDelayedDrag),YS(o,`mousemove`,r._delayedDragTouchMoveHandler),YS(o,`touchmove`,r._delayedDragTouchMoveHandler),a.supportPointer&&YS(o,`pointermove`,r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Dw(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;XS(e,`mouseup`,this._disableDelayedDrag),XS(e,`touchend`,this._disableDelayedDrag),XS(e,`touchcancel`,this._disableDelayedDrag),XS(e,`mousemove`,this._delayedDragTouchMoveHandler),XS(e,`touchmove`,this._delayedDragTouchMoveHandler),XS(e,`pointermove`,this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t||=e.pointerType==`touch`&&e,!this.nativeDraggable||t?this.options.supportPointer?YS(document,`pointermove`,this._onTouchMove):t?YS(document,`touchmove`,this._onTouchMove):YS(document,`mousemove`,this._onTouchMove):(YS(K,`dragend`,this),YS(FC,`dragstart`,this._onDragStart));try{document.selection?Fw(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(KC=!1,FC&&K){jC(`dragStarted`,this,{evt:t}),this.nativeDraggable&&YS(document,`dragover`,Cw);var n=this.options;!e&&tC(K,n.dragClass,!1),tC(K,n.ghostClass,!0),ww.active=this,e&&this._appendGhost(),MC({sortable:this,name:`start`,originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(XC){this._lastX=XC.clientX,this._lastY=XC.clientY,bw();for(var e=document.elementFromPoint(XC.clientX,XC.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(XC.clientX,XC.clientY),e!==t);)t=e;if(K.parentNode[SC]._isOutsideThisEl(e),t)do{if(t[SC]){var n=void 0;if(n=t[SC]._onDragOver({clientX:XC.clientX,clientY:XC.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);xw()}},_onTouchMove:function(e){if(YC){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=PC&&rC(PC,!0),o=PC&&a&&a.a,s=PC&&a&&a.d,c=fw&&sw&&dC(sw),l=(i.clientX-YC.clientX+r.x)/(o||1)+(c?c[0]-cw[0]:0)/(o||1),u=(i.clientY-YC.clientY+r.y)/(s||1)+(c?c[1]-cw[1]:0)/(s||1);if(!ww.active&&!KC){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))=0&&(MC({sortable:this,name:`update`,toEl:NC,originalEvent:e}),MC({sortable:this,name:`sort`,toEl:NC,originalEvent:e})):(VC>=0&&(MC({rootEl:NC,name:`add`,toEl:NC,fromEl:FC,originalEvent:e}),MC({sortable:this,name:`remove`,toEl:NC,originalEvent:e}),MC({rootEl:NC,name:`sort`,toEl:NC,fromEl:FC,originalEvent:e}),MC({sortable:this,name:`sort`,toEl:NC,originalEvent:e})),GC&&GC.save()),ww.active&&((VC==null||VC===-1)&&(VC=BC,UC=HC),MC({sortable:this,name:`end`,toEl:NC,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){jC(`nulling`,this),FC=K=NC=PC=IC=RC=LC=zC=YC=XC=tw=VC=UC=BC=HC=nw=rw=GC=WC=ww.dragged=ww.ghost=ww.clone=ww.active=null,uw.forEach(function(e){e.checked=!0}),uw.length=ZC=QC=0},handleEvent:function(e){switch(e.type){case`drop`:case`dragend`:this._onDrop(e);break;case`dragenter`:case`dragover`:K&&(this._onDragOver(e),Tw(e));break;case`selectstart`:e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;ri.right+a||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+a||e.clientX>r.right&&e.clientY>r.top}function jw(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,l=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!o){if(s&&owu+l*a/2:cd-ow)return-rw}else if(c>u+l*(1-i)/2&&cd-l*a/2)?c>u+l/2?1:-1:0}function Mw(e){return uC(K){if(e&&n?.length!==a.childNodes.length)return i.insertBefore(e,t.nextSibling),!0;let o=a.childNodes[r];e=a?.replaceChild(t,o)})}}catch(e){o=e}finally{n=null}zn(()=>{if(rT(),o)throw o})}let h={onUpdate:p,onStart:u,onAdd:d,onRemove:f,onEnd:m};function g(e){let n=k(r);return e||=CS(n)?ES(n,t?.$el):n,e&&!kS(e)&&(e=e.$el),e||gS(`Root element not found`),e}function _(){let e=k(a)??{},{immediate:t,clone:n}=e,r=pS(e,[`immediate`,`clone`]);return AS(r,(e,t)=>{jS(e)&&(r[e]=(e,...n)=>(MS(e,iT()),t(e,...n)))}),OS(i===null?{}:h,r)}let v=e=>{e=g(e),o&&y.destroy(),o=new ww(e,_())};pr(()=>a,()=>{o&&AS(_(),(e,t)=>{o?.option(e,t)})},{deep:!0});let y={option:(e,t)=>o?.option(e,t),destroy:()=>{o?.destroy(),o=null},save:()=>o?.save(),toArray:()=>o?.toArray(),closest:(...e)=>o?.closest(...e)};return eT(()=>{s&&v()}),$w(y.destroy),fS({start:v,pause:()=>y?.option(`disabled`,!0),resume:()=>y?.option(`disabled`,!1)},y)}var sT=[`update`,`start`,`add`,`remove`,`choose`,`unchoose`,`end`,`sort`,`filter`,`clone`,`move`,`change`],cT=M({name:`VueDraggable`,model:{prop:`modelValue`,event:`update:modelValue`},props:[`clone`,`animation`,`ghostClass`,`group`,`sort`,`disabled`,`store`,`handle`,`draggable`,`swapThreshold`,`invertSwap`,`invertedSwapThreshold`,`removeCloneOnHide`,`direction`,`chosenClass`,`dragClass`,`ignore`,`filter`,`preventOnFilter`,`easing`,`setData`,`dropBubble`,`dragoverBubble`,`dataIdAttr`,`delay`,`delayOnTouchOnly`,`touchStartThreshold`,`forceFallback`,`fallbackClass`,`fallbackOnBody`,`fallbackTolerance`,`fallbackOffset`,`supportPointer`,`emptyInsertThreshold`,`scroll`,`forceAutoScrollFallback`,`scrollSensitivity`,`scrollSpeed`,`bubbleScroll`,`modelValue`,`tag`,`target`,`customUpdate`,...sT.map(e=>`on${e.replace(/^\S/,e=>e.toUpperCase())}`)],emits:[`update:modelValue`,...sT],setup(e,{slots:t,emit:n,expose:r,attrs:i}){let a=sT.reduce((e,t)=>{let r=`on${t.replace(/^\S/,e=>e.toUpperCase())}`;return e[r]=(...e)=>n(t,...e),e},{}),o=U(()=>{let t=vn(e),{modelValue:n}=t,r=pS(t,[`modelValue`]),o=Object.entries(r).reduce((e,[t,n])=>{let r=k(n);return r!==void 0&&(e[t]=r),e},{});return fS(fS({},a),yS(fS(fS({},i),o)))}),s=U({get:()=>e.modelValue,set:e=>n(`update:modelValue`,e)}),c=O(),l=$t(oT(e.target||c,s,o));return r(l),()=>cs(e.tag||`div`,{ref:c},(t?.default)?.call(t,l))}}),lT=(e,t)=>e.name?e.name:t?.meta?.name?t.meta.name:e.type.replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase());function uT(){let e=or(ml),{engine:t,getBlockById:n}=nx(),r=e?.blockLabelFunction,i=e=>{let i=n(e);return!i||!r?``:r(i,t.getBlockSchema(i.type))},a=e=>{let r=n(e);return r?lT(r,t.getBlockSchema(r.type)):`Unknown Block`};return{getBlockLabel:i,getBlockSchemaName:a,getBlockLabelReactive:e=>U(()=>i(e)),getBlockSchemaNameReactive:e=>U(()=>a(e))}}var dT=[`data-block-id`],fT=[`data-block-id`,`data-selected`],pT={key:1,class:`w-5 h-full`},mT={class:`w-4 h-4 mr-1 flex items-center justify-center relative`},hT=[`innerHTML`],gT={class:`flex-1 flex items-center gap-1 min-w-0`},_T={class:`shrink-0`},vT={key:0,class:`italic text-gray-500 truncate text-xs`},yT={class:`flex items-center gap-0.5`},bT=[`title`],xT=[`title`],ST={key:0,class:`ml-3 space-y-1`},CT={key:0,class:``},wT=M({__name:`BlockItem`,props:{blockId:{},level:{},isDragging:{type:Boolean}},setup(e){let t=e,{t:n}=Ib(),r=O(!1),{block:i,children:a,hasChildren:o,canHaveChildren:s,parent:c,index:l,toggle:u,moveChild:d,schema:f}=Ux(t.blockId),{isExpanded:p,toggleExpanded:m}=ix(),{getBlockLabelReactive:h,getBlockSchemaNameReactive:g}=uT(),{selectedBlockId:_,selectBlock:v}=lx(),{open:y}=rx(),{engine:b,moveBlock:x,removeBlock:S,blocks:C,regions:ee}=nx(),{toaster:te}=n_(),w=U(()=>_.value===t.blockId),T=U(()=>p(t.blockId)),ne=U(()=>i.value?.static===!0),re=U(()=>i.value?.repeated===!0),ie=U(()=>i.value?.ghost===!0),ae=g(t.blockId),oe=h(t.blockId),se=U(()=>f.value?.meta?.icon),ce=U(()=>{if(l.value===void 0||l.value<0)return!0;let e=l.value+1,n=c.value?.children??ee.value.find(e=>e.blocks.includes(t.blockId))?.blocks;return n?g_(n,C.value,e):!0});function le(e){let n=e.target;y({anchor:n,context:{parentId:t.blockId,index:0}})}function ue(e){if(e.related&&e.related.classList.contains(`is-static`))return!1;if(!e.drag||!e.target||!e.to)return!0;let t=e.dragged.getAttribute?.(`data-block-id`);if(!t)return!1;let n=C.value[t];if(!n)return!1;let r=e.to?.parentElement?.closest?.(`[data-block-id]`)?.getAttribute?.(`data-block-id`);if(!r)return!1;let i=C.value[r];return i?b.getBlocksManager().canBeChild(n.type,i.type):!1}function de(e){let{oldIndex:t,newIndex:n,from:r,to:i}=e;if(typeof n>`u`)return;let a=e.item?.getAttribute?.(`data-block-id`);if(!a)return;let o=r===i;if(!(o&&t===n))try{if(o){d(a,n);return}let e=i?.parentElement?.closest?.(`[data-block-id]`)?.getAttribute?.(`data-block-id`);e&&x(a,{targetParentId:e,targetIndex:n})}catch(e){te.create({title:e instanceof Error?e.message:String(e),type:`error`})}}function fe(e){return ue(e)}function pe(){S(t.blockId)}return(e,c)=>{let l=oS,d=rS,f=eS,p=Zx,h=Jx,g=ox,_=sx,y=ax,b=Gx,x=Ii(`BlockItem`,!0),S=fx,C=xx;return k(i)?(F(),I(`div`,{key:0,class:ke({"bg-gray-100":k(r),"is-static":k(ne)}),"data-block-id":k(i).id},[z(b,{"block-id":k(i).id},{default:j(()=>[R(`div`,{"data-block-id":k(i).id,"data-selected":k(w)?`true`:void 0,class:ke([`flex items-center h-8 text-sm hover:bg-gray-50 data-selected:bg-accent/10 data-selected:border data-selected:border-accent/20 data-selected:hover:bg-accent/10 cursor-pointer rounded-md group transition-all duration-200`,{"text-gray-700":!k(i).disabled&&!k(ie),"text-gray-500":k(ie)&&!k(i).disabled,"text-gray-400":k(i).disabled}]),onClick:c[3]||=e=>k(v)(k(i).id)},[k(s)?(F(),I(`button`,{key:0,onClick:c[0]||=Xc(()=>k(m)(t.blockId),[`stop`]),class:`h-full mr-0.5 px-1 flex items-center justify-center hover:bg-gray-200 rounded cursor-pointer`},[z(l,{class:ke([`w-3 h-3 transition-transform duration-200`,{"rotate-90":k(T)}])},null,8,[`class`])])):(F(),I(`div`,pT)),R(`div`,mT,[k(ie)?(F(),L(d,{key:0,class:ke([{"group-hover:opacity-0":k(ne)},`w-4 h-4 transition-opacity text-gray-400`])},null,8,[`class`])):k(re)?(F(),L(f,{key:1,class:ke([{"group-hover:opacity-0":k(ne)},`w-4 h-4 transition-opacity`])},null,8,[`class`])):k(se)?(F(),I(`span`,{key:2,innerHTML:k(se),class:ke([{"group-hover:opacity-0":k(ne)},`[&>svg]:w-4 [&>svg]:h-4 h-4 w-4 transition-opacity`])},null,10,hT)):(F(),L(p,{key:3,class:ke([{"group-hover:opacity-0":k(ne)},`transition-opacity`])},null,8,[`class`])),k(ne)?(F(),L(h,{key:4,class:`w-4 h-4 absolute opacity-0 group-hover:opacity-100 transition-opacity text-gray-400`})):V(``,!0)]),R(`div`,gT,[R(`span`,_T,E(k(ae)),1),k(oe)?(F(),I(`span`,vT,`- `+E(k(oe)),1)):V(``,!0)]),R(`div`,yT,[R(`button`,{onClick:c[1]||=Xc(()=>k(u)(),[`stop`]),class:ke([`p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors`,{"opacity-100":k(i).disabled,"opacity-0 group-hover:opacity-100":!k(i).disabled}]),title:k(i).disabled?k(n)(`block.show`):k(n)(`block.hide`)},[k(i).disabled?(F(),L(g,{key:0,class:`w-4 h-4`})):(F(),L(_,{key:1,class:`w-4 h-4`}))],10,bT),k(ne)?V(``,!0):(F(),I(`button`,{key:0,onClick:c[2]||=Xc(()=>pe(),[`stop`]),class:`p-1 hover:bg-red-100 rounded text-gray-500 hover:text-red-600 transition-colors opacity-0 group-hover:opacity-100`,title:k(n)(`block.remove`)},[z(y,{class:`w-4 h-4`})],8,xT))])],10,fT)]),_:1},8,[`block-id`]),k(s)&&k(T)?(F(),I(`div`,ST,[z(k(cT),{"model-value":k(i).children,animation:200,group:{name:`blocks`,pull:!0,put:ue},"ghost-class":`ghost-block`,"chosen-class":`chosen-block`,"drag-class":`drag-block`,filter:`.is-static`,onEnd:de,onMove:fe},{default:j(()=>[(F(!0),I(P,null,Vi(k(a),t=>(F(),L(x,{key:t.id,"block-id":t.id,level:e.level+1},null,8,[`block-id`,`level`]))),128))]),_:1},8,[`model-value`,`group`]),k(o)?V(``,!0):(F(),I(`div`,CT,[R(`button`,{onClick:c[4]||=e=>le(e),class:`flex items-center gap-1.5 w-full p-1.5 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded transition-colors`},[z(S,{class:`w-3 h-3`}),R(`span`,null,E(k(n)(`layers.addBlockToBlock`)),1)])]))])):V(``,!0),k(ce)?(F(),L(C,{key:`add-block-${k(i).id}`,"block-id":k(i).id,onMouseenter:c[5]||=e=>r.value=!0,onMouseleave:c[6]||=e=>r.value=!1},null,8,[`block-id`])):V(``,!0)],10,dT)):V(``,!0)}}}),TT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},ET={},DT={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,class:`w-4 h-4`};function OT(e,t){return F(),I(`svg`,DT,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M4 2a2 2 0 0 0-2 2v10h2V4h10V2zm4 4a2 2 0 0 0-2 2v10h2V8h10V6zm12 6v8h-8v-8zm0-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2m-1 7h-6v-2h6z`},null,-1)]])}var kT=TT(ET,[[`render`,OT]]),AT={small:640,medium:768,large:1024,extraLarge:1280,extraExtraLarge:1536};function jT(){let e=O(0),t=()=>{e.value=window.innerWidth},n=U(()=>e.value>=AT.small),r=U(()=>e.value>=AT.medium),i=U(()=>e.value>=AT.large),a=U(()=>e.value>=AT.extraLarge),o=U(()=>e.value>=AT.extraExtraLarge);return Ei(()=>{t(),window.addEventListener(`resize`,t)}),Ai(()=>{window.removeEventListener(`resize`,t)}),{width:e,isSmall:n,isMedium:r,isLarge:i,isExtraLarge:a,isExtraExtraLarge:o}}var MT={class:`h-full flex flex-col overflow-y-hidden relative`},NT={class:`flex-none h-12 flex items-center border-b px-4`},PT={class:`flex-1 overflow-y-auto`},FT={class:`flex items-center justify-between`},IT={class:`text-sm capitalize`},LT=[`title`,`onClick`],RT={class:`my-2`},zT={key:0,class:`flex items-center justify-center py-2`},BT=[`onClick`],VT={key:0,class:`absolute inset-0 z-10`},HT=M({__name:`LayersPanel`,setup(e){let{t}=Ib(),{regions:n,moveBlock:r}=nx(),{collapseRegion:i,expandAncestors:a}=ix(),{open:o}=rx(),s=tx(),{isExtraExtraLarge:c}=jT(),{hasSelection:l}=lx();s.on(`ui:block:select`,e=>{a(e.blockId),zn(()=>{let t=document.querySelector(`[data-block-id="${e.blockId}"]`);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`})})});let u=U(()=>Array.isArray(n.value)?n.value:[]);function d(e,t){let{oldIndex:n,newIndex:i}=e;if(typeof i>`u`||n===i)return;let a=u.value.find(e=>f_(e)===t);if(!a)return;let o=a.blocks[n];o&&r(o,{targetRegionId:t,targetIndex:i})}function f(e){if(e.related&&e.related.classList.contains(`is-static`))return!1}function p(e,t){let n=e.target;o({anchor:n,context:{regionId:t,index:0}})}return(e,n)=>{let r=wT,a=fx,o=ux;return F(),I(`div`,MT,[R(`div`,NT,[R(`h2`,null,E(k(t)(`layers.header`)),1)]),R(`div`,PT,[(F(!0),I(P,null,Vi(k(u),e=>(F(),I(`div`,{key:k(f_)(e),class:`not-last:border-b px-4 mt-2`},[R(`div`,FT,[R(`h3`,IT,E(e.name),1),e.blocks.length>0?(F(),I(`button`,{key:0,class:`p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors`,title:k(t)(`layers.collapseAll`),onClick:t=>k(i)(k(f_)(e))},[z(kT,{class:`w-4 h-4`})],8,LT)):V(``,!0)]),R(`div`,RT,[z(k(cT),{"model-value":e.blocks,animation:200,"ghost-class":`ghost-block`,"chosen-class":`chosen-block`,"drag-class":`drag-block`,filter:`.is-static`,onEnd:t=>d(t,k(f_)(e)),onMove:f},{default:j(()=>[(F(!0),I(P,null,Vi(e.blocks,e=>(F(),L(r,{key:e,"block-id":e,level:0},null,8,[`block-id`]))),128))]),_:2},1032,[`model-value`,`onEnd`]),e.blocks.length===0?(F(),I(`div`,zT,[R(`button`,{onClick:t=>p(t,k(f_)(e)),class:`flex w-full items-center gap-2 px-2 py-1 text-sm text-accent/90 hover:text-accent hover:bg-accent-foreground rounded-lg transition-colors cursor-pointer`},[z(a,{class:`w-4 h-4`}),B(` `+E(k(t)(`layers.addBlockToRegion`)),1)],8,BT)])):V(``,!0)])]))),128))]),k(l)&&!k(c)?(F(),I(`div`,VT,[z(o,{"is-overlay":``})])):V(``,!0)])}}}),UT={class:`h-full w-75 border-r flex-none relative`},WT=M({__name:`Panels`,setup(e){let t=or(ml),{activeSidebarPanel:n,sidebarPanels:r}=n_(),i=U(()=>r.value.find(e=>e.id===n.value));return(e,r)=>{let a=HT,o=b_;return F(),I(`aside`,UT,[k(n)===`layers`?(F(),L(a,{key:0,class:`h-full`})):k(i)?(F(),I(P,{key:1},[k(Qg)(k(i).render)||k($g)(k(i).render)?(F(),L(Ri(k(i).render),{key:0,editor:k(t),class:`h-full`},null,8,[`editor`])):k(e_)(k(i).render)?(F(),L(o,{key:1,"render-fn":k(i).render,class:`h-full`},null,8,[`render-fn`])):V(``,!0)],64)):V(``,!0)])}}}),GT={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function KT(e,t){return F(),I(`svg`,GT,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6.429 9.75L2.25 12l4.179 2.25m0-4.5l5.571 3l5.571-3m-11.142 0L2.25 7.5L12 2.25l9.75 5.25l-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0l4.179 2.25L12 21.75L2.25 16.5l4.179-2.25m11.142 0l-5.571 3l-5.571-3`},null,-1)]])}var qT=D({name:`heroicons-square3-stack3d`,render:KT}),JT={class:`h-full w-14 border-r bg-white`},YT={class:`flex flex-col gap-1 p-1.5`},XT=[`title`],ZT=[`onClick`,`title`],QT={key:2},$T=M({__name:`Sidebar`,setup(e){let{t}=Ib(),{activeSidebarPanel:n,setActiveSidebarPanel:r,sidebarPanels:i}=n_(),a=or(ml);return(e,o)=>{let s=qT,c=b_;return F(),I(`div`,JT,[R(`div`,YT,[R(`button`,{onClick:o[0]||=e=>k(r)(`layers`),class:ke([`aspect-square flex items-center justify-center rounded-md cursor-pointer transition-colors`,k(n)===`layers`?`bg-accent-foreground text-accent`:`hover:bg-gray-100 text-gray-700`]),title:k(t)(`layers.title`)},[z(s,{class:`w-5`})],10,XT),(F(!0),I(P,null,Vi(k(i),e=>(F(),I(`button`,{key:`panel-icon-`+e.id,onClick:t=>k(r)(e.id),class:ke([`aspect-square flex items-center justify-center rounded-md cursor-pointer transition-colors text-sm font-medium`,k(n)===e.id?`bg-accent-foreground text-accent`:`hover:bg-gray-100 text-gray-700`]),title:e.title},[e.icon&&(k(Qg)(e.icon)||k($g)(e.icon))?(F(),L(Ri(e.icon),{key:0,editor:k(a),class:`w-5 h-5`},null,8,[`editor`])):e.icon&&k(e_)(e.icon)?(F(),L(c,{key:1,"render-fn":e.icon,class:`w-5 h-5`},null,8,[`render-fn`])):(F(),I(`span`,QT,E(e.title.charAt(0).toUpperCase()),1))],10,ZT))),128))])])}}}),eE=M({__name:`HeaderActionRenderer`,props:{action:{}},setup(e){let t=e,n=or(ml),r=O(!1),i=()=>{r.value=!r.value},a=e=>{t.action.button&&t.action.button.onClick(e,{toggleLoading:i,editor:n})};return(e,t)=>{let i=i_,o=b_;return F(),L(gi,null,[e.action.button?(F(),L(i,{key:0,variant:e.action.button.variant||`default`,loading:k(r),onClick:a},{default:j(()=>[B(E(e.action.button.text),1)]),_:1},8,[`variant`,`loading`])):k(Qg)(e.action.render)||k($g)(e.action.render)?(F(),L(Ri(e.action.render),{key:1,editor:k(n)},null,8,[`editor`])):k(e_)(e.action.render)?(F(),L(o,{key:2,"render-fn":e.action.render},null,8,[`render-fn`])):V(``,!0)],1024)}}}),tE={class:`h-14 flex items-center justify-between relative z-50 px-4 border-b bg-white`},nE={class:`flex items-center gap-2`},rE={class:`flex items-center gap-2`},iE={class:`flex items-center gap-2`},aE=M({__name:`Header`,setup(e){let{headerActions:t}=n_(),n=U(()=>t.value.filter(e=>e.slot===`left`)),r=U(()=>t.value.filter(e=>e.slot===`center`)),i=U(()=>t.value.filter(e=>e.slot===`right`));return(e,t)=>{let a=eE;return F(),I(`header`,tE,[R(`div`,nE,[(F(!0),I(P,null,Vi(k(n),e=>(F(),L(a,{key:e.id,action:e},null,8,[`action`]))),128))]),R(`div`,rE,[(F(!0),I(P,null,Vi(k(r),e=>(F(),L(a,{key:e.id,action:e},null,8,[`action`]))),128))]),R(`div`,iE,[(F(!0),I(P,null,Vi(k(i),e=>(F(),L(a,{key:e.id,action:e},null,8,[`action`]))),128))])])}}}),oE={class:`h-full w-full flex flex-col overflow-hidden`},sE={class:`flex-1 flex overflow-hidden relative`},cE={class:`flex-1 p-3 bg-gray-100 overflow-auto preview-container flex justify-center`},lE={key:0,class:`h-full flex-none overflow-y-hidden w-75 border-l`},uE=M({__name:`Editor`,setup(e){let{isExtraExtraLarge:t}=jT(),{keyboardShortcuts:n}=n_(),r=or(ml),i=e=>{let t=[e.ctrlKey&&`ctrl`,e.metaKey&&`meta`,e.shiftKey&&`shift`,e.altKey&&`alt`,e.key.toLowerCase()].filter(Boolean).join(`+`),i=n.value.get(t);i&&(e.preventDefault(),e.stopPropagation(),i.handler({editor:r}))};return(e,n)=>{let r=aE,a=$T,o=WT,s=bx,c=ux,l=Dae,u=zb,d=Ab;return F(),I(`div`,{class:`__craftile`,style:{height:`100%`,width:`100%`},tabindex:`0`,onKeydown:i},[R(`div`,oE,[z(r),R(`main`,sE,[z(a),z(o),R(`div`,cE,[z(s)]),k(t)?(F(),I(`aside`,lE,[z(c)])):V(``,!0)])]),z(l),z(u),z(d)],32)}}}),dE=class{events;state;toaster;constructor(e){this.events=e,this.state=$t({activeSidebarPanel:`layers`,sidebarPanels:new Map,headerActions:new Map,configurationPanels:new Map,modals:new Map,openModals:[],keyboardShortcuts:new Map,propertyFields:new Map,selectedBlockId:null,layersPanel:{expandedBlocks:new Set},clipboard:{copiedBlock:null}}),this.toaster=_b({placement:`bottom`,overlap:!0,gap:16})}generateId(e){return e+`-`+(Date.now().toString(36)+Math.random().toString(36).substr(2))}setSelectedBlock(e){let t=this.state.selectedBlockId;this.state.selectedBlockId=e,e!==null&&e!==t&&this.events.emit(`ui:block:select`,{blockId:e})}clearSelectedBlock(){this.state.selectedBlockId&&(this.state.selectedBlockId=null,this.events.emit(`ui:block:clear-selection`,{blockId:null}))}toast(e){typeof e==`string`?this.toaster.create({description:e,type:`info`}):this.toaster.create(e)}registerSidebarPanel(e){let t={...e,id:e.id||this.generateId(`sidebar-panel`),render:typeof e.render==`object`?D(e.render):e.render,icon:e.icon&&typeof e.icon==`object`?D(e.icon):e.icon};this.state.sidebarPanels.set(t.id,t)}removeSidebarPanel(e){this.state.sidebarPanels.delete(e)}registerHeaderAction(e){if(!e.render&&!e.button)throw Error(`HeaderAction must have either a render or button configuration`);if(e.render&&e.button)throw Error(`HeaderAction cannot have both render and button configurations`);let t={...e,id:e.id||this.generateId(`header-action`),render:typeof e.render==`object`?D(e.render):e.render};this.state.headerActions.set(t.id,t)}removeHeaderAction(e){this.state.headerActions.delete(e)}registerConfigurationPanel(e){let t={...e,id:e.id||this.generateId(`config-panel`),render:typeof e.render==`object`?D(e.render):e.render,icon:e.icon&&typeof e.icon==`object`?D(e.icon):e.icon};this.state.configurationPanels.set(t.id,t)}removeConfigurationPanel(e){this.state.configurationPanels.delete(e)}registerPropertyField(e){let t={...e,render:typeof e.render==`object`?D(e.render):e.render};this.state.propertyFields.set(e.type,t)}removePropertyField(e){this.state.propertyFields.delete(e)}registerModal(e){let t={...e,id:e.id||this.generateId(`modal`),render:typeof e.render==`object`?D(e.render):e.render};this.state.modals.set(t.id,t)}unregisterModal(e){this.state.modals.delete(e),this.closeModal(e)}openModal(e){this.state.openModals.includes(e)||(this.state.openModals.push(e),this.events.emit(`ui:modal:open`,{modalId:e}))}closeModal(e){let t=this.state.openModals.indexOf(e);t>=0&&(this.state.openModals.splice(t,1),this.events.emit(`ui:modal:close`,{modalId:e}))}registerKeyboardShortcut(e){this.state.keyboardShortcuts.set(e.key,e)}removeKeyboardShortcut(e){this.state.keyboardShortcuts.delete(e)}copyBlock(e){this.state.clipboard.copiedBlock=e,this.events.emit(`ui:clipboard:copy`,{block:e})}getCopiedBlock(){return this.state.clipboard.copiedBlock}clearClipboard(){this.state.clipboard.copiedBlock=null,this.events.emit(`ui:clipboard:clear`,{})}},fE={class:`text-xs whitespace-nowrap capitalize max-w-[120px] overflow-hidden text-ellipsis`},pE={class:`flex items-center justify-between px-4 py-3 border-b border-solid`},mE={class:`text-sm font-semibold text-gray-900 m-0`},hE={class:`rounded cursor-pointer text-gray-500 transition-all duration-200 flex items-center justify-center p-1 hover:text-gray-700`},gE={class:`flex flex-col gap-1 p-2`},_E=[`onClick`],vE={class:`text-xs ml-auto`},yE={class:`px-4 py-3 border-t`},bE={class:`text-[13px] font-semibold text-gray-700 mt-0 mb-3 mx-0`},xE={class:`flex flex-wrap gap-2`},SE={class:`flex-1`},CE={for:`custom-width`,class:`block text-xs text-gray-500 mb-1`},wE={key:0,class:`mt-4`},TE={class:`flex flex-col gap-1 mt-2`},EE=[`onClick`],DE={class:`flex-1`},OE=[`onClick`],kE=M({inheritAttrs:!1,__name:`DeviceModeSwitcher`,setup(e){let{t}=Ib(),{currentDevice:n,currentDeviceData:r,devicePresets:i,savedCustomDevices:a,setDeviceMode:o,addCustomDevice:s,removeCustomDevice:c}=r_(),l=O(!1),u=O(768),d={desktop:o_,tablet:a_,mobile:s_},f=e=>d[e||`desktop`]||o_,p=()=>f(r.value.icon),m=e=>{o(e),l.value=!1},h=()=>{let e=`custom-${u.value}`;s({id:e,label:`${t(`common.custom`)} ${u.value}px`,width:u.value}),o(e),l.value=!1},g=e=>{c(e)};return(e,o)=>{let s=Hb,c=i_,d=x_,_=a_;return F(),L(k(by).Root,{open:k(l),"onUpdate:open":o[1]||=e=>dn(l)?l.value=e:null,positioning:{placement:`top-end`,gutter:0}},{default:j(()=>[z(k(by).Trigger,{"as-child":``},{default:j(()=>[z(c,{class:`gap-1`},{default:j(()=>[(F(),L(Ri(p()),{class:`device-icon`})),R(`span`,fE,E(k(r).label),1),z(k(by).Indicator,{"as-child":``},{default:j(()=>[z(s,{class:`w-3.5 h-3.5 transition-transform duration-200 data-[state=open]:rotate-180`})]),_:1})]),_:1})]),_:1}),z(k(by).Positioner,null,{default:j(()=>[z(k(by).Content,{class:`w-72 border shadow-xs overflow-hidden mt-1 rounded-lg bg-white`},{default:j(()=>[R(`div`,pE,[R(`h4`,mE,E(k(t)(`header.devicePreview`)),1),z(k(by).CloseTrigger,{"as-child":``},{default:j(()=>[R(`button`,hE,[z(d,{class:`w-4 h-4`})])]),_:1})]),R(`div`,gE,[(F(!0),I(P,null,Vi(k(i),e=>(F(),I(`button`,{key:e.id,class:ke([`flex items-center gap-2 cursor-pointer text-left text-sm text-gray-700 transition-[background] duration-[0.2s] px-3 py-2.5 rounded-md border-[none]`,{"text-accent! bg-accent/8":k(n)===e.id}]),onClick:t=>m(e.id)},[(F(),L(Ri(f(e.icon)),{class:`w-5 h-5`})),R(`span`,null,E(e.label),1),R(`span`,vE,E(e.width===0?k(t)(`header.auto`):e.width+`px`),1)],10,_E))),128))]),R(`div`,yE,[R(`h5`,bE,E(k(t)(`header.customDeviceSize`)),1),R(`div`,xE,[R(`div`,SE,[R(`label`,CE,E(k(t)(`header.deviceWidthPx`)),1),rr(R(`input`,{"onUpdate:modelValue":o[0]||=e=>dn(u)?u.value=e:null,type:`number`,id:`custom-width`,min:`320`,max:`2560`,class:`w-full border rounded text-sm px-3 py-2`},null,512),[[Ic,k(u)]])]),R(`button`,{class:`w-full text-accent-foreground bg-accent rounded text-[13px] font-medium cursor-pointer transition-[background] duration-[0.2s] mt-2 p-2 border-[none]`,onClick:h},E(k(t)(`header.apply`)),1)]),k(a).length>0?(F(),I(`div`,wE,[R(`h5`,null,E(k(t)(`header.savedCustomDevices`)),1),R(`div`,TE,[(F(!0),I(P,null,Vi(k(a),e=>(F(),I(`div`,{key:e.id,role:`button`,class:ke([`flex items-center gap-2 rounded text-left text-sm text-gray-700 px-3 py-2 cursor-pointer`,{"text-accent! bg-accent/8":k(n)===e.id}]),onClick:t=>m(e.id)},[z(_,{class:`w-5 h-5 flex-none`}),R(`span`,DE,E(e.width)+`px`,1),R(`button`,{class:`flex-none rounded cursor-pointer text-gray-500 flex items-center justify-center transition-all duration-[0.2s] p-1 border-[none] hover:text-red-600`,onClick:Xc(t=>g(e.id),[`stop`])},[z(d)],8,OE)],10,EE))),128))])])):V(``,!0)])]),_:1})]),_:1})]),_:1},8,[`open`])}}}),AE={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function jE(e,t){return F(),I(`svg`,AE,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18`},null,-1)]])}var ME=D({name:`heroicons-arrow-left`,render:jE}),NE={};function PE(e,t){let n=ME,r=i_;return F(),L(r,{square:``,title:`Back`},{default:j(()=>[z(n)]),_:1})}var FE=TT(NE,[[`render`,PE]]),IE=M({__name:`RedoButton`,setup(e){let{t}=Ib(),{redo:n,canRedo:r}=nx(),i=()=>{n()};return(e,n)=>{let a=c_,o=i_;return F(),L(o,{square:``,disabled:!k(r),onClick:i,title:k(t)(`header.redo`)},{default:j(()=>[z(a)]),_:1},8,[`disabled`,`title`])}}}),LE={},RE={class:`text-xl`};function zE(e,t){return F(),I(`h1`,RE,`Craftile Editor`)}var BE=TT(LE,[[`render`,zE]]),VE={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function HE(e,t){return F(),I(`svg`,VE,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9 15L3 9m0 0l6-6M3 9h12a6 6 0 0 1 0 12h-3`},null,-1)]])}var UE=D({name:`heroicons-arrow-uturn-left`,render:HE}),WE=M({__name:`UndoButton`,setup(e){let{t}=Ib(),{undo:n,canUndo:r}=nx(),i=()=>{n()};return(e,n)=>{let a=UE,o=i_;return F(),L(o,{square:``,disabled:!k(r),onClick:i,title:k(t)(`header.undo`)},{default:j(()=>[z(a)]),_:1},8,[`disabled`,`title`])}}}),GE={},KE={xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 24 24`};function qE(e,t){return F(),I(`svg`,KE,[...t[0]||=[R(`g`,{fill:`none`},[R(`path`,{d:`m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z`}),R(`path`,{fill:`currentColor`,d:`M10.611 10.611a1 1 0 0 1 1.11-.208l8.839 3.889a1 1 0 0 1-.14 1.88l-3.338.91l-.91 3.338a1 1 0 0 1-1.88.14l-3.89-8.84a1 1 0 0 1 .209-1.109M17 3a3 3 0 0 1 3 3v3a1 1 0 1 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h3a1 1 0 1 1 0 2H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3zm-3.73 10.269l1.715 3.9l.318-1.164a1 1 0 0 1 .701-.702l1.165-.318l-3.9-1.716Z`})],-1)]])}var JE=TT(GE,[[`render`,qE]]),YE=M({__name:`ToggleInspector`,setup(e){let{t}=Ib(),{isEnabled:n,toggle:r}=dx();return(e,i)=>{let a=JE,o=i_;return F(),L(o,{onClick:k(r),variant:k(n)?`sutble`:`default`,square:``,title:k(n)?k(t)(`header.disableInspector`):k(t)(`header.enableInspector`)},{default:j(()=>[z(a,{class:`w-4 h-4`})]),_:1},8,[`onClick`,`variant`,`title`])}}});function XE(e){e.registerHeaderAction({id:`back-button`,slot:`left`,render:FE,order:-20}),e.registerHeaderAction({id:`title`,slot:`left`,render:BE,order:-10}),e.registerHeaderAction({id:`device-mode`,slot:`right`,render:kE,order:-40}),e.registerHeaderAction({id:`inspection-mode`,slot:`right`,render:YE,order:-30}),e.registerHeaderAction({id:`undo`,slot:`right`,render:WE,order:-20}),e.registerHeaderAction({id:`redo`,slot:`right`,render:IE,order:-10})}var ZE=({editor:e})=>{let t=e.engine;t&&t.canUndo()&&t.undo()},QE=({editor:e})=>{let t=e.engine;t&&t.canRedo()&&t.redo()};function $E(e){e.registerKeyboardShortcut({key:`ctrl+z`,handler:ZE}),e.registerKeyboardShortcut({key:`meta+z`,handler:ZE}),e.registerKeyboardShortcut({key:`ctrl+y`,handler:QE}),e.registerKeyboardShortcut({key:`ctrl+shift+z`,handler:QE}),e.registerKeyboardShortcut({key:`meta+shift+z`,handler:QE})}var eD=`craftile-editor:custom-devices`,tD=class{state;devicePresets;constructor(e={}){let t={id:`fit`,label:`Auto`,width:0,icon:`desktop`},n=e.presets?.filter(e=>e.id!==`fit`);n&&n.length>0?this.devicePresets=[t,...n]:this.devicePresets=[t,{id:`desktop`,label:`Desktop`,width:1440,icon:`desktop`},{id:`laptop`,label:`Laptop`,width:1024,icon:`desktop`},{id:`tablet`,label:`Tablet`,width:768,icon:`tablet`},{id:`mobile`,label:`Mobile`,width:375,icon:`mobile`},{id:`mobile-sm`,label:`Small Mobile`,width:320,icon:`mobile`}];let r=e.default||`fit`,i=this.devicePresets.some(e=>e.id===r);this.state=$t({currentDevice:i?r:`fit`,savedCustomDevices:this.loadCustomDevices()})}getCurrentDeviceData(){return this.devicePresets.find(e=>e.id===this.state.currentDevice)||this.state.savedCustomDevices.find(e=>e.id===this.state.currentDevice)||this.devicePresets[0]}setDeviceMode(e){this.state.currentDevice=e}addCustomDevice(e){this.state.savedCustomDevices.some(t=>t.id===e.id)||(this.state.savedCustomDevices.push(e),this.saveCustomDevices())}removeCustomDevice(e){let t=this.state.savedCustomDevices.findIndex(t=>t.id===e);t>-1&&this.state.savedCustomDevices.splice(t,1),this.state.currentDevice===e&&(this.state.currentDevice=`fit`),this.saveCustomDevices()}getAllDevices(){return[...this.devicePresets,...this.state.savedCustomDevices]}loadCustomDevices(){try{let e=localStorage.getItem(eD);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>typeof e==`object`&&!!e&&typeof e.id==`string`&&typeof e.label==`string`&&typeof e.width==`number`&&(e.icon===void 0||typeof e.icon==`string`)):[]}catch{return[]}}saveCustomDevices(){try{localStorage.setItem(eD,JSON.stringify(this.state.savedCustomDevices))}catch{}}},nD={key:0},rD={class:`text-sm font-medium text-gray-700 capitalize`},iD={class:`p-3`},aD={key:1,class:`p-4`},oD={key:1,class:`text-center py-8`},sD={class:`text-sm text-gray-500`},cD=M({__name:`PropertiesPanel`,setup(e){let{t}=Ib(),{selectedBlock:n}=lx(),{engine:r,setBlockProperty:i}=nx(),{currentDevice:a}=r_(),o=U(()=>{if(!n.value)return[];let e=r.getBlockSchema(n.value.type);if(!e||!e.properties)return[];let t=a.value===`fit`?`_default`:a.value;return e.properties.filter(e=>e.visibleIf?t_(e.visibleIf,n.value?.properties||{},t):!0)}),s=U(()=>o.value.some(e=>e.group)),c=U(()=>{if(!s.value)return[];let e=new Map;return o.value.forEach(n=>{let r=n.group||`default`,i=n.group||t(`common.default`);e.has(r)||e.set(r,{id:r,label:i,fields:[]}),e.get(r).fields.push(n)}),Array.from(e.values())}),l=U(()=>c.value.length===0?[]:[c.value[0].id]),u=e=>n.value?.properties?.[e];function d(e,t){if(!n.value)return;let r=e=>{let t=cn(e);return Array.isArray(t)?t.map(r):t&&typeof t==`object`&&t.constructor===Object?Object.fromEntries(Object.entries(t).map(([e,t])=>[e,r(t)])):t};i(n.value.id,e,r(t))}return(e,r)=>{let i=Hb,a=u_;return k(n)?(F(),I(`div`,nD,[k(o).length>0?(F(),I(P,{key:0},[k(s)?(F(),L(k(I_).Root,{key:0,class:`w-full`,"default-value":k(l),multiple:``},{default:j(()=>[(F(!0),I(P,null,Vi(k(c),e=>(F(),L(k(I_).Item,{key:e.id,value:e.id,class:`border-b border-gray-100`},{default:j(()=>[z(k(I_).ItemTrigger,{class:`flex w-full items-center justify-between p-3 text-left hover:bg-gray-50 transition-colors`},{default:j(()=>[R(`span`,rD,E(e.label),1),z(k(I_).ItemIndicator,{class:`transition-transform duration-200 data-[state=open]:rotate-180`},{default:j(()=>[z(i,{class:`w-4 h-4 text-gray-500`})]),_:1})]),_:2},1024),z(k(I_).ItemContent,{class:`overflow-hidden`},{default:j(()=>[R(`div`,iD,[z(Tc,{name:`property-field`,tag:`div`,class:`space-y-4`},{default:j(()=>[(F(!0),I(P,null,Vi(e.fields,e=>(F(),L(a,{key:e.id,field:e,"model-value":u(e.id),"onUpdate:modelValue":t=>d(e.id,t)},null,8,[`field`,`model-value`,`onUpdate:modelValue`]))),128))]),_:2},1024)])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1},8,[`default-value`])):(F(),I(`div`,aD,[z(Tc,{name:`property-field`,tag:`div`,class:`space-y-4`},{default:j(()=>[(F(!0),I(P,null,Vi(k(o),e=>(F(),L(a,{key:e.id,field:e,"model-value":u(e.id),"onUpdate:modelValue":t=>d(e.id,t)},null,8,[`field`,`model-value`,`onUpdate:modelValue`]))),128))]),_:1})]))],64)):(F(),I(`div`,oD,[R(`p`,sD,E(k(t)(`configPanels.noProperties`)),1)]))])):V(``,!0)}}});function lD(e){e.registerConfigurationPanel({id:`properties`,title:`Properties`,render:cD,order:-10})}var uD=class{editor;plugins=new Set;constructor(e){this.editor=e}setupPlugins(e){this.plugins.forEach(t=>{t({vueApp:e,editor:this.editor})})}register(e){return this.plugins.add(e),this}unregister(e){return this.plugins.delete(e),this}getAllPlugins(){return Array.from(this.plugins.values())}},dD=class{handlers=new Map;targetWindow;targetOrigin;fallbackHandler;constructor(e,t=`*`){this.targetWindow=e,this.targetOrigin=t,window.addEventListener(`message`,this.handleMessage.bind(this))}handleMessage(e){let t=e.data;if(!t.type)return;let n=this.handlers.get(t.type);n?n.forEach(n=>n(t.payload,e)):this.fallbackHandler&&this.fallbackHandler(e.data,e)}send(e,t){let n={type:e,payload:t};this.targetWindow.postMessage(n,this.targetOrigin)}listen(e,t){return this.handlers.has(e)||this.handlers.set(e,[]),this.handlers.get(e).push(t),()=>{let n=this.handlers.get(e);if(n){let e=n.indexOf(t);e>-1&&n.splice(e,1)}}}registerFallbackHandler(e){this.fallbackHandler=e}};function fD(e,t=`*`){return new dD(e.contentWindow,t)}var pD=class{state;messenger;readyListenerInitialized=!1;readyCallbacks=[];documentReadyCallbacks=[];constructor(){this.state=$t({previewUrl:`about:blank`,previewFrame:null,isIframeReady:!1,messageQueue:[]})}loadUrl(e){this.state.previewUrl=e}loadFromHtml(e){let t=new Blob([e],{type:`text/html`}),n=URL.createObjectURL(t);this.state.previewUrl=n,setTimeout(()=>URL.revokeObjectURL(n),1e3)}reload(){this.state.previewFrame&&this.state.previewFrame.contentWindow?.location.reload()}getFrame(){return this.state.previewFrame}_registerFrame(e){this.state.previewFrame=e,this.state.isIframeReady=!1,this.messenger=fD(e),this.readyListenerInitialized||=(this.messenger.listen(`craftile.preview.ready`,()=>{this.state.isIframeReady=!0,this.runReadyCallbacks(),this.runDocumentReadyCallbacks(),this.flushMessageQueue()}),!0)}sendMessage(e,t){this.state.isIframeReady?this.messenger.send(e,t):this.state.messageQueue.push({type:e,payload:t})}onMessage(e,t){return this.messenger.listen(e,t)}onReady(e){this.readyCallbacks.push(e)}onDocumentReady(e){this.documentReadyCallbacks.push(e)}runReadyCallbacks(){this.readyCallbacks.forEach(e=>e.call(this)),this.readyCallbacks=[]}runDocumentReadyCallbacks(){this.documentReadyCallbacks.forEach(e=>e.call(this))}flushMessageQueue(){if(this.state.isIframeReady&&this.state.previewFrame?.contentWindow)for(;this.state.messageQueue.length>0;){let e=this.state.messageQueue.shift();this.messenger.send(e.type,e.payload)}}};function mD(e,t){let n=t.blocks[e];if(!n)return;let r,i,a;if(n.parentId){let e=t.blocks[n.parentId];if(!e)return;i=n.parentId,r=e.children}else{let n=t.regions.find(t=>t.blocks.includes(e));if(!n)return;a=n.id||n.name,r=n.blocks}let o=r.indexOf(e);if(o===-1)return;let s,c;for(let e=o-1;e>=0;e--){let n=t.blocks[r[e]];if(n&&!n.disabled){s=r[e];break}}for(let e=o+1;e{if(n.added.size||n.updated.size||n.removed.size||n.moved.size){let r=e.getPage();Array.from(n.blocksToInclude).forEach(e=>{let t=r.blocks[e];for(;t;){if(t.repeated&&t.parentId){n.blocksToInclude.add(t.parentId);break}t=t.parentId?r.blocks[t.parentId]:void 0}});let i={};n.blocksToInclude.forEach(e=>{r.blocks[e]&&(i[e]=structuredClone(r.blocks[e]))});let a={};n.positions.forEach(e=>{let t=mD(e,r);t&&(a[e]=t)}),t?.onUpdates({blocks:i,regions:structuredClone(r.regions),changes:{added:Array.from(n.added),updated:Array.from(n.updated),removed:Array.from(n.removed),moved:Object.fromEntries(n.moved),positions:a}}),n.added.clear(),n.updated.clear(),n.removed.clear(),n.moved.clear(),n.positions.clear(),n.blocksToInclude.clear()}},o=()=>{r&&clearTimeout(r),r=setTimeout(a,t?.debounceMs||0)},s=(t,n)=>{n.add(t);let r=e.getPage().blocks[t];r?.children&&r.children.forEach(e=>{s(e,n)})};return i.push(e.on(`block:insert`,({blockId:e,parentId:t})=>{n.added.add(e),n.positions.add(e),s(e,n.blocksToInclude),t&&n.blocksToInclude.add(t),o()})),i.push(e.on(`block:remove`,({blockId:e,parentId:t})=>{n.added.delete(e),n.updated.delete(e),n.positions.delete(e),n.removed.add(e),n.blocksToInclude.delete(e),t&&n.blocksToInclude.add(t),o()})),i.push(e.on(`block:property:set`,({blockId:e})=>{n.added.has(e)||n.updated.add(e),n.blocksToInclude.add(e),o()})),i.push(e.on(`block:move`,({blockId:t,sourceParentId:r,targetParentId:i,targetIndex:a,targetRegionId:s})=>{n.moved.set(t,{toRegion:s,toParent:i,toIndex:a??0}),n.positions.add(t),n.blocksToInclude.add(t),r&&n.blocksToInclude.add(r),i&&n.blocksToInclude.add(i);let c=e.getPage(),l=e=>{let t=e?c.blocks[e]:void 0;for(;t;){if(t.repeated)return!0;t=t.parentId?c.blocks[t.parentId]:void 0}return!1};(l(t)||l(r))&&(r&&!n.added.has(r)&&n.updated.add(r),i&&!n.added.has(i)&&n.updated.add(i)),o()})),i.push(e.on(`block:toggle`,({blockId:t})=>{n.added.has(t)||n.updated.add(t),n.positions.add(t),n.blocksToInclude.add(t);let r=e.getPage().blocks[t];r?.parentId&&n.blocksToInclude.add(r.parentId),o()})),i.push(e.on(`block:duplicate`,({newBlockId:e,parentId:t})=>{n.added.add(e),n.positions.add(e),s(e,n.blocksToInclude),t&&n.blocksToInclude.add(t),o()})),i.push(e.on(`block:update`,({blockId:e})=>{n.added.has(e)||n.updated.add(e),n.blocksToInclude.add(e),o()})),()=>{r&&clearTimeout(r),i.forEach(e=>e())}}var gD=class{state;events;preview;ui;engine;previewListenersInitialized=!1;constructor(e,t,n,r){this.events=e,this.preview=t,this.ui=n,this.engine=r,this.state=$t({enabled:!0,hoveredBlockId:null,hoveredBlockRect:null,hoveredParentRect:null,parentFlexDirection:`column`,selectedBlockId:null,selectedBlockRect:null,iframeRect:null}),this.preview.onReady(()=>{this.initializePreviewListeners()}),this.preview.onDocumentReady(()=>{this.syncInspectionModeToPreview()}),this.events.on(`ui:block:select`,e=>{this.engine.getPage().blocks[e.blockId]?.ghost!==!0&&this.preview.sendMessage(`craftile.editor.select-block`,{blockId:e.blockId})}),this.events.on(`ui:block:clear-selection`,()=>{this.preview.sendMessage(`craftile.editor.deselect-block`),this.clearSelectedBlock()})}enable(){this.state.enabled=!0,this.events.emit(`inspector:enabled`,{}),this.preview.sendMessage(`craftile.inspector.enable`)}disable(){this.state.enabled=!1,this.events.emit(`inspector:disabled`,{}),this.preview.sendMessage(`craftile.inspector.disable`)}toggle(){this.state.enabled?this.disable():this.enable()}setHoveredBlock(e,t,n){this.state.hoveredBlockId=e,this.state.hoveredBlockRect=t,this.state.hoveredParentRect=n||null}setSelectedBlock(e,t){this.state.selectedBlockId=e,this.state.selectedBlockRect=t}clearHoveredBlock(){this.state.hoveredBlockId=null,this.state.hoveredBlockRect=null,this.state.hoveredParentRect=null}clearSelectedBlock(){this.state.selectedBlockId=null,this.state.selectedBlockRect=null}setIframeRect(e){this.state.iframeRect=e}initializePreviewListeners(){this.previewListenersInitialized||=(this.preview.onMessage(`craftile.preview.block-hover`,e=>{this.setHoveredBlock(e.blockId,e.blockRect,e.parentRect),this.state.parentFlexDirection=e.parentFlexDirection}),this.preview.onMessage(`craftile.preview.block-select`,e=>{this.setSelectedBlock(e.blockId,e.blockRect),this.ui.setSelectedBlock(e.blockId)}),this.preview.onMessage(`craftile.preview.update-selected-block`,e=>{this.state.selectedBlockId&&this.setSelectedBlock(e.blockId,e.blockRect)}),this.preview.onMessage(`craftile.preview.block-leave`,()=>{this.clearHoveredBlock()}),!0)}syncInspectionModeToPreview(){this.preview.sendMessage(this.state.enabled?`craftile.inspector.enable`:`craftile.inspector.disable`)}},_D=class{engine;ui;i18n;events;devices;preview;plugins;inspector;blockLabelFunction;blockFilterFunction;previewUpdateDelay;vueApp=null;constructor(e={}){this.engine=new y_({blockSchemas:e.blockSchemas,page:e.initialPage}),this.events=new __,this.i18n=Pb(e.i18n),this.devices=new tD(e.devices),this.preview=new pD,this.ui=new dE(this.events),this.plugins=new uD(this),this.inspector=new gD(this.events,this.preview,this.ui,this.engine),this.blockLabelFunction=e.blockLabelFunction,this.blockFilterFunction=e.blockFilterFunction,this.previewUpdateDelay=e.previewUpdateDelay,e.plugins?.forEach(e=>this.plugins.register(e)),this.setup()}getActiveBlock(){return this.ui.state.selectedBlockId?this.engine.getBlockById(this.ui.state.selectedBlockId):void 0}getBlockProperty(e,t){let n=this.engine.getBlockById(e);return n?n.properties[t]:null}setBlockProperty(e,t,n){return this.engine.setBlockProperty(e,t,n)}setup(){XE(this.ui),$E(this.ui),lD(this.ui),this.vueApp=ol({setup:()=>{ar(ml,this);let e=this.setupEngineWatcher(this.previewUpdateDelay??150),t=this.engine.on(`block:remove`,({blockId:e})=>{this.ui.state.selectedBlockId===e&&this.ui.clearSelectedBlock()});return ki(()=>{e(),t()}),()=>cs(uE)}}),this.plugins.setupPlugins(this.vueApp)}setupEngineWatcher(e){return hD(this.engine,{debounceMs:e,onUpdates:e=>{this.preview.sendMessage(`craftile.editor.updates`,e),this.events.emit(`updates`,e)}})}mount(e){this.vueApp.mount(e)}};function vD(e={}){let{el:t,...n}=e,r=new _D(n);return t&&r.mount(t),r}(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{.__craftile,.__craftile :host{--color-blue-500:oklch(62.3% .214 259.815);--color-gray-50:var(--color-gray-50,oklch(98.5% 0 0));--color-gray-100:var(--color-gray-100,oklch(96.7% .001 286.375));--color-gray-200:var(--color-gray-200,oklch(92% .004 286.32));--color-gray-300:var(--color-gray-300,oklch(87.1% .006 286.286));--color-gray-400:var(--color-gray-400,oklch(70.5% .015 286.067));--color-gray-500:var(--color-gray-500,oklch(55.2% .016 285.938));--color-gray-600:var(--color-gray-600,oklch(44.2% .017 285.786));--color-gray-700:var(--color-gray-700,oklch(37% .013 285.805));--color-gray-800:var(--color-gray-800,oklch(37% .013 285.805));--color-gray-900:var(--color-gray-900,oklch(37% .013 285.805));--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-accent:var(--color-accent,oklch(54.6% .245 262.881));--color-accent-foreground:var(--color-accent-foreground,oklch(93.2% .032 255.585))}}@layer base,components;@layer utilities{.__craftile .absolute{position:absolute}.__craftile .relative{position:relative}.__craftile .top-px{top:1px}.__craftile .right-1{right:calc(var(--spacing)*1)}.__craftile .bottom-px{bottom:1px}.__craftile .\\!z-20{z-index:20!important}.__craftile .z-50{z-index:50}.__craftile .mt-3{margin-top:calc(var(--spacing)*3)}.__craftile .mb-1{margin-bottom:calc(var(--spacing)*1)}.__craftile .mb-2{margin-bottom:calc(var(--spacing)*2)}.__craftile .ml-2{margin-left:calc(var(--spacing)*2)}.__craftile .ml-auto{margin-left:auto}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .hidden{display:none}.__craftile .inline-flex{display:inline-flex}.__craftile .h-1{height:calc(var(--spacing)*1)}.__craftile .h-2{height:calc(var(--spacing)*2)}.__craftile .h-2\\.5{height:calc(var(--spacing)*2.5)}.__craftile .h-3{height:calc(var(--spacing)*3)}.__craftile .h-4{height:calc(var(--spacing)*4)}.__craftile .h-6{height:calc(var(--spacing)*6)}.__craftile .h-7{height:calc(var(--spacing)*7)}.__craftile .h-8{height:calc(var(--spacing)*8)}.__craftile .h-9{height:calc(var(--spacing)*9)}.__craftile .h-10{height:calc(var(--spacing)*10)}.__craftile .h-36{height:calc(var(--spacing)*36)}.__craftile .h-full{height:100%}.__craftile .max-h-60{max-height:calc(var(--spacing)*60)}.__craftile .w-0{width:calc(var(--spacing)*0)}.__craftile .w-2\\.5{width:calc(var(--spacing)*2.5)}.__craftile .w-3{width:calc(var(--spacing)*3)}.__craftile .w-4{width:calc(var(--spacing)*4)}.__craftile .w-6{width:calc(var(--spacing)*6)}.__craftile .w-7{width:calc(var(--spacing)*7)}.__craftile .w-8{width:calc(var(--spacing)*8)}.__craftile .w-14{width:calc(var(--spacing)*14)}.__craftile .w-16{width:calc(var(--spacing)*16)}.__craftile .w-60{width:calc(var(--spacing)*60)}.__craftile .w-\\[var\\(--reference-width\\)\\]{width:var(--reference-width)}.__craftile .w-full{width:100%}.__craftile .min-w-8{min-width:calc(var(--spacing)*8)}.__craftile .min-w-10{min-width:calc(var(--spacing)*10)}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .cursor-pointer{cursor:pointer}.__craftile .touch-none{touch-action:none}.__craftile .appearance-none{appearance:none}.__craftile .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.__craftile .flex-col{flex-direction:column}.__craftile .items-center{align-items:center}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .gap-1{gap:calc(var(--spacing)*1)}.__craftile .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.__craftile .gap-2{gap:calc(var(--spacing)*2)}.__craftile .gap-3{gap:calc(var(--spacing)*3)}.__craftile .gap-4{gap:calc(var(--spacing)*4)}.__craftile .overflow-auto{overflow:auto}.__craftile .overflow-hidden{overflow:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.__craftile .rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-2{border-style:var(--tw-border-style);border-width:2px}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-accent{border-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .border-gray-300{border-color:var(--color-gray-300,oklch(87.1% .006 286.286))}.__craftile .border-white{border-color:var(--color-white)}.__craftile .bg-accent{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .bg-gray-100{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .bg-gray-300{background-color:var(--color-gray-300,oklch(87.1% .006 286.286))}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .bg-none{background-image:none}.__craftile .p-0\\.5{padding:calc(var(--spacing)*.5)}.__craftile .p-4{padding:calc(var(--spacing)*4)}.__craftile .px-1{padding-inline:calc(var(--spacing)*1)}.__craftile .px-2{padding-inline:calc(var(--spacing)*2)}.__craftile .px-3{padding-inline:calc(var(--spacing)*3)}.__craftile .py-1{padding-block:calc(var(--spacing)*1)}.__craftile .py-2{padding-block:calc(var(--spacing)*2)}.__craftile .pl-1{padding-left:calc(var(--spacing)*1)}.__craftile .text-center{text-align:center}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .text-accent{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .text-gray-400{color:var(--color-gray-400,oklch(70.5% .015 286.067))}.__craftile .text-gray-500{color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .text-gray-600{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .text-gray-700{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .text-gray-900{color:var(--color-gray-900,oklch(37% .013 285.805))}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .outline-0{outline-style:var(--tw-outline-style);outline-width:0}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .forced-color-adjust-none{forced-color-adjust:none}.__craftile .outline-none{--tw-outline-style:none;outline-style:none}.__craftile .select-none{-webkit-user-select:none;user-select:none}.__craftile .group-focus-within\\:flex:is(:where(.group):focus-within *){display:flex}@media (hover:hover){.__craftile .group-hover\\:flex:is(:where(.group):hover *){display:flex}}.__craftile .focus-within\\:border-transparent:focus-within{border-color:#0000}.__craftile .focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-within\\:ring-accent:focus-within{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus-within\\:outline-none:focus-within{--tw-outline-style:none;outline-style:none}@media (hover:hover){.__craftile .hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.__craftile .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}}.__craftile .focus\\:border-transparent:focus{border-color:#0000}.__craftile .focus\\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .data-\\[state\\=checked\\]\\:border-accent[data-state=checked]{border-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:bg-accent[data-state=checked]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:bg-accent-foreground[data-state=checked]{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .data-\\[state\\=checked\\]\\:bg-white[data-state=checked]{background-color:var(--color-white)}.__craftile .data-\\[state\\=checked\\]\\:text-accent[data-state=checked]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:shadow[data-state=checked]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .data-\\[state\\=checked\\]\\:outline-4[data-state=checked]{outline-style:var(--tw-outline-style);outline-width:4px}.__craftile .data-\\[state\\=checked\\]\\:-outline-offset-8[data-state=checked]{outline-offset:-8px}.__craftile .data-\\[state\\=checked\\]\\:outline-accent[data-state=checked]{outline-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=closed\\]\\:hidden[data-state=closed]{display:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();var yD=e=>{let t=Symbol(e);return[e=>ar(t,e),e=>or(t,e),t]},[bD,xD]=yD(`FieldContext`),SD=M({__name:`field-context`,setup(e){let t=xD();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}});function CD(e){return e==null?[]:Array.isArray(e)?e:[e]}var wD=e=>e[0],TD=e=>e[e.length-1],ED=(e,t)=>e.indexOf(t)!==-1,DD=(e,...t)=>e.concat(t),OD=(e,...t)=>e.filter(e=>!t.includes(e)),kD=(e,t)=>ED(e,t)?OD(e,t):DD(e,t),AD=e=>e?.constructor.name===`Array`,jD=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(AD(e)&&AD(t))return jD(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;tArray.isArray(e),PD=e=>typeof e==`object`&&!!e,FD=e=>PD(e)&&!ND(e),ID=e=>typeof e==`string`,LD=e=>typeof e==`function`,RD=e=>e==null,zD=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),joe=e=>Object.prototype.toString.call(e),BD=Function.prototype.toString,Moe=BD.call(Object),Noe=e=>{if(!PD(e)||joe(e)!=`[object Object]`||Ioe(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=zD(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&BD.call(n)==Moe},Poe=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,Foe=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,Ioe=e=>Poe(e)||Foe(e),Loe=()=>{},VD=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},HD=(e,t)=>{try{return e()}catch(e){return e instanceof Error&&Error.captureStackTrace?.(e,HD),t?.()}},{floor:UD,abs:WD,round:GD,min:Roe,max:zoe,pow:Boe,sign:Voe}=Math,KD=e=>Number.isNaN(e),qD=e=>KD(e)?0:e,JD=(e,t)=>(e%t+t)%t,Hoe=(e,t)=>(e%t+t)%t,Uoe=(e,t,n)=>e===0?n:t[e-1],Woe=(e,t,n)=>e===t.length-1?n:t[e+1],Goe=(e,t)=>qD(e)>=t,Koe=(e,t)=>qD(e)<=t,YD=(e,t,n)=>{let r=qD(e);return(t==null||r>=t)&&(n==null||r<=n)},qoe=(e,t,n)=>GD((qD(e)-t)/n)*n+t,XD=(e,t,n)=>Roe(zoe(qD(e),t),n),ZD=(e,t,n)=>(qD(e)-t)/(n-t),QD=(e,t,n,r)=>XD(qoe(e*(n-t)+t,t,r),t,n),$D=(e,t)=>{let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=Boe(10,a);n=GD(n*e)/e}return n},eO=(e,t)=>typeof t==`number`?UD(e*t+.5)/t:GD(e),tO=(e,t,n,r)=>{let i=t==null?0:Number(t),a=Number(n),o=(e-i)%r,s=WD(o)*2>=r?e+Voe(o)*(r-WD(o)):e-o;if(s=$D(s,r),!KD(i)&&sa){let e=UD((a-i)/r),t=i+e*r;s=e<=0||te[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)];function rO(e,t){let n=Uoe(e,t.values,t.min),r=Woe(e,t.values,t.max),i=t.values.slice();return function(a){let o=tO(a,n,r,t.step);return i=nO(i,e,a),i[e]=o,i}}function Joe(e,t){let n=t.values[e]+t.step;return rO(e,t)(n)}function Yoe(e,t){let n=t.values[e]-t.step;return rO(e,t)(n)}var Xoe=(e,t)=>{let n=e.findIndex(e=>t-e<0);if(n===0)return n;if(n===-1)return e.length-1;let r=e[n-1],i=e[n];return WD(r-t)e.map((i,a)=>({min:a===0?t:e[a-1]+r,max:a===e.length-1?n:e[a+1]-r,value:i})),aO=(e,t)=>{let[n,r]=e,[i,a]=t;return e=>n===r||i===a?i:i+(a-i)/(r-n)*(e-n)},oO=(e,t=0,n=10)=>{let r=n**+t;return GD(e*r)/r},sO=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},cO=(e,t,n)=>{let r=t===`+`?e+n:e-n;if(e%1!=0||n%1!=0){let i=10**Math.max(sO(e),sO(n));e=Math.round(e*i),n=Math.round(n*i),r=t===`+`?e+n:e-n,r/=i}return r},Zoe=(e,t)=>cO(qD(e),`+`,t),Qoe=(e,t)=>cO(qD(e),`-`,t),lO=e=>e==null?void 0:`${e}px`;function uO(e){if(!Noe(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=uO(t))}return n}function $oe(e,t){let n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}function dO(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function fO(e,t){if(e==null)throw Error(t())}var pO=e=>Math.max(0,Math.min(1,e)),ese=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),mO=(...e)=>t=>e.reduce((e,t)=>t(e),t),hO=()=>{},gO=e=>typeof e==`object`&&!!e,tse=2147483647,q=e=>e?``:void 0,_O=e=>e?`true`:void 0,nse=1,rse=9,ise=11,vO=e=>gO(e)&&e.nodeType===nse&&typeof e.nodeName==`string`,yO=e=>gO(e)&&e.nodeType===rse,ase=e=>gO(e)&&e===e.window,bO=e=>vO(e)?e.localName||``:`#document`;function ose(e){return[`html`,`body`,`#document`].includes(bO(e))}var sse=e=>gO(e)&&e.nodeType!==void 0,xO=e=>sse(e)&&e.nodeType===ise&&`host`in e,cse=e=>vO(e)&&e.localName===`input`,lse=e=>vO(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function SO(e){return e?EO(e.getRootNode())===e:!1}var use=/(textarea|select)/;function dse(e){if(e==null||!vO(e))return!1;try{return cse(e)&&e.selectionStart!=null||use.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function CO(e,t){if(!e||!t||!vO(e)||!vO(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&xO(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wO(e){return yO(e)?e:ase(e)?e.document:e?.ownerDocument??document}function fse(e){return wO(e).documentElement}function TO(e){return xO(e)?TO(e.host):yO(e)?e.defaultView??window:vO(e)?e.ownerDocument?.defaultView??window:window}function EO(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function pse(e){if(bO(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||xO(e)&&e.host||fse(e);return xO(t)?t.host:t}var DO=new WeakMap;function OO(e){return DO.has(e)||DO.set(e,TO(e).getComputedStyle(e)),DO.get(e)}var kO=()=>typeof document<`u`;function mse(){return navigator.userAgentData?.platform??navigator.platform}function hse(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var AO=e=>kO()&&e.test(mse()),gse=e=>kO()&&e.test(hse()),_se=e=>kO()&&e.test(navigator.vendor),jO=()=>kO()&&!!navigator.maxTouchPoints,vse=()=>AO(/^iPhone/i),yse=()=>AO(/^iPad/i)||NO()&&navigator.maxTouchPoints>1,MO=()=>vse()||yse(),bse=()=>NO()||MO(),NO=()=>AO(/^Mac/i),PO=()=>bse()&&_se(/apple/i),xse=()=>gse(/Android/i);function Sse(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function FO(e){return Sse(e)?.[0]??e.target}function Cse(e){return Ose(e).isComposing||e.keyCode===229}function wse(e){return e.pointerType===``&&e.isTrusted?!0:xse()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var IO=e=>e.button===0,Tse=e=>e.button===2||NO()&&e.ctrlKey&&e.button===0,LO=e=>e.ctrlKey||e.altKey||e.metaKey,Ese=e=>`touches`in e&&e.touches.length>0,Dse={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},RO={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function zO(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=Dse[i]??i,n===`rtl`&&r===`horizontal`&&i in RO&&(i=RO[i]),i}function Ose(e){return e.nativeEvent??e}var kse=new Set([`PageUp`,`PageDown`]),Ase=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function BO(e){return e.ctrlKey||e.metaKey?.1:kse.has(e.key)||e.shiftKey&&Ase.has(e.key)?10:1}function VO(e,t=`client`){let n=Ese(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var HO=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function UO(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=TO(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function jse(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function WO(e,t,n=`value`){if(!e)return;let r=jse(e);r&&UO(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function GO(e,t){e&&(UO(e,{type:`HTMLInputElement`,property:`checked`}).set?.call(e,t),t?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}function KO(e,t){let{value:n,bubbles:r=!0}=t;if(!e)return;let i=TO(e);e instanceof i.HTMLInputElement&&(WO(e,`${n}`),e.dispatchEvent(new i.Event(`input`,{bubbles:r})))}function qO(e,t){let{checked:n,bubbles:r=!0}=t;if(!e)return;let i=TO(e);e instanceof i.HTMLInputElement&&(GO(e,n),e.dispatchEvent(new i.Event(`click`,{bubbles:r})))}function Mse(e){return Nse(e)?e.form:e.closest(`form`)}function Nse(e){return e.matches(`textarea, input, select, button`)}function Pse(e,t){if(!e)return;let n=Mse(e),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function Fse(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(TO(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function JO(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[Pse(e,r),Fse(e,n)];return()=>i.forEach(e=>e?.())}var Ise=e=>vO(e)&&e.tagName===`IFRAME`,Lse=e=>parseInt(e.getAttribute(`tabindex`)||`0`,10)<0,YO=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`;function XO(e){return!e||e.closest(`[inert]`)?!1:e.matches(YO)&&lse(e)}function ZO(e,t){if(!e)return[];let n=Array.from(e.querySelectorAll(YO)).filter(Rse);return n.forEach((e,t)=>{if(Ise(e)&&e.contentDocument){let r=e.contentDocument.body,i=ZO(r);n.splice(t,1,...i)}}),n.length,n}function Rse(e){return e!=null&&e.tabIndex>0?!0:XO(e)&&!Lse(e)}function zse(e,t){let n=ZO(e,t);return[n[0]||null,n[n.length-1]||null]}function QO(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=null;if(a||=typeof n==`function`?n():n,a||=t?.querySelector(`[data-autofocus],[autofocus]`),!a){let e=ZO(t);a=r?e.filter(r)[0]:e[0]}return a||t||void 0}function Bse(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=zse(t);return!(SO(n)&&e.shiftKey||SO(r)&&!e.shiftKey||!n&&!r)}function $O(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function ek(e){let t,n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}function Vse(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function tk(e,t){let{defer:n}=t,r=n?ek:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Vse(n,t))})),()=>{i.forEach(e=>e?.())}}function nk(e){let t=pse(e);return ose(t)?wO(t).body:vO(t)&&rk(t)?t:nk(t)}var Hse=/auto|scroll|overlay|hidden|clip/,Use=new Set([`inline`,`contents`]);function rk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=TO(e).getComputedStyle(e);return Hse.test(t+r+n)&&!Use.has(i)}function Wse(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Gse(e,t){let{rootEl:n,...r}=t||{};!e||!n||!rk(n)||!Wse(n)||e.scrollIntoView(r)}function ik(e,t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect(),o={x:e.x-n,y:e.y-r},s={x:pO(o.x/i),y:pO(o.y/a)};function c(e={}){let{dir:t=`ltr`,orientation:n=`horizontal`,inverted:r}=e,i=typeof r==`object`?r.x:r,a=typeof r==`object`?r.y:r;return n===`horizontal`?t===`rtl`||i?1-s.x:s.x:a?1-s.y:s.y}return{offset:o,percent:s,getPercentValue:c}}function Kse(e,t){let n=e.body,r=`pointerLockElement`in e||`mozPointerLockElement`in e,i=()=>!!e.pointerLockElement;function a(){}function o(t){i(),console.error(`PointerLock error occurred:`,t),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}let s=[HO(e,`pointerlockchange`,a,!1),HO(e,`pointerlockerror`,o,!1)];return()=>{s.forEach(e=>e()),e.exitPointerLock()}}var ak=`default`,ok=``,sk=new WeakMap;function qse(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return MO()?(ak===`default`&&(ok=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),ak=`disabled`):t&&(sk.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>Jse({target:t,doc:r})}function Jse(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(MO()){if(ak!==`disabled`)return;ak=`restoring`,setTimeout(()=>{$O(()=>{ak===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=ok||``),ok=``,ak=`default`)})},300)}else if(t&&sk.has(t)){let e=sk.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),sk.delete(t)}}function ck(e={}){let{defer:t,target:n,...r}=e,i=t?ek:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(qse({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function lk(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=VO(e);if(!(Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5))){if(e.pointerType===`mouse`&&e.button===0){a(e);return}n({point:t,event:e})}},a=e=>{r({point:VO(e),event:e})},o=[HO(e,`pointermove`,i,!1),HO(e,`pointerup`,a,!1),HO(e,`pointercancel`,a,!1),HO(e,`contextmenu`,a,!1),ck({doc:e})];return()=>{o.forEach(e=>e())}}function Yse(e){let{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:i,onPressEnd:a,isValidKey:o=e=>e.key===`Enter`}=e;if(!t)return hO;let s=TO(t),c=hO,l=hO,u=hO,d=e=>({point:VO(e),event:e});function f(e){i?.(d(e))}function p(e){a?.(d(e))}c=mO(HO(t,`pointerdown`,e=>{l(),l=mO(HO(s,`pointerup`,e=>{CO(t,FO(e))?r?.(d(e)):a?.(d(e))},{passive:!r,once:!0}),HO(s,`pointercancel`,p,{passive:!a,once:!0})),SO(n)&&e.pointerType===`mouse`&&e.preventDefault(),f(e)},{passive:!i}),HO(n,`focus`,m));function m(){u=mO(HO(n,`keydown`,e=>{o(e)&&(l(),l=HO(n,`keyup`,e=>{if(!o(e))return;let t=d(new s.PointerEvent(`pointerup`));r?.(t),a?.(t)}),f(new s.PointerEvent(`pointerdown`)))}),HO(n,`blur`,()=>{p(new s.PointerEvent(`pointercancel`))}))}return()=>{c(),l(),u()}}function uk(e,t){return Array.from(e?.querySelectorAll(t)??[])}function Xse(e,t){return e?.querySelector(t)??null}var dk=e=>e.id;function Zse(e,t,n=dk){return e.find(e=>n(e)===t)}function Qse(e,t,n=dk){let r=Zse(e,t,n);return r?e.indexOf(r):-1}function fk(e,t){let{onEntry:n,measure:r,box:i=`border-box`}=t,a=(Array.isArray(e)?e:[e]).filter(vO),o=TO(a[0]),s=e=>{n({rects:a.map(e=>r(e)),entries:e})};s([]);let c=new o.ResizeObserver(s);return a.forEach(e=>c.observe(e,{box:i})),()=>c.disconnect()}var $se=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),ece=e=>$se(e.dataset?.valuetext??e.textContent??``),tce=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function nce(e,t,n,r=dk){let i=n?Qse(e,n,r):-1,a=n?ese(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>tce(ece(e),t))}function pk(e,t){if(!e)return hO;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)}}function rce(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=nce(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var mk=Object.assign(rce,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:ice});function ice(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var hk={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function ace(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(Error(`Promise aborted`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function oce(e,t){let{timeout:n,rootNode:r}=t,i=TO(r),a=wO(r),o=new i.AbortController;return ace(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}var sce=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),cce=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,gk=e=>{let t={},n;for(;n=cce.exec(e);)t[n[1]]=n[2];return t},lce=(e,t)=>{if(ID(e)){if(ID(t))return`${e};${t}`;e=gk(e)}else ID(t)&&(t=gk(t));return Object.assign({},e??{},t??{})};function _k(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=VD(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=sce(t[e],n[e]);continue}if(e===`style`){t[e]=lce(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function vk(e,t,n){let r=[],i;return n=>{let a=e(n);return(a.length!==r.length||a.some((e,t)=>!MD(r[t],e)))&&(r=a,i=t(a,n)),i}}function yk(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function uce(){return{guards:yk(),createMachine:e=>e,choose:e=>function({choose:t}){return t(e)?.actions}}}var bk=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(bk||{}),xk=`__init__`;function dce(e){let t=()=>e.getRootNode?.()??document,n=()=>wO(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>EO(t()),isActiveElement:SO,getById:e=>t().getElementById(e)}}function fce(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Sk=()=>e=>Array.from(new Set(e));function pce(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Ck={htmlFor:`for`,className:`class`,onDoubleClick:`onDblclick`,onChange:`onInput`,onFocus:`onFocusin`,onBlur:`onFocusout`,defaultValue:`value`,defaultChecked:`checked`},mce=`viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit`.split(`,`);function hce(e){return e in Ck?Ck[e]:e.startsWith(`on`)?`on${pce(e.substr(2))}`:mce.includes(e)?e:e.toLowerCase()}var wk=fce(e=>{let t={};for(let n in e){let r=e[n];n===`children`?typeof r==`string`&&(t.innerHTML=r):t[hce(n)]=e[n]}return t});function Tk(e){let t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=fn(t),i=U(()=>e().value!==void 0);return{initial:t,ref:fn(i.value?e().value:r.value),get(){return i.value?e().value:r.value},set(t){let a=i.value?e().value:r.value,o=LD(t)?t(a):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:o,prev:a}),i.value||(r.value=o),n(o,a)||e().onChange?.(o,a)},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Tk.cleanup=e=>{Ai(()=>e())},Tk.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function gce(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var _ce=(e,t)=>{pr(()=>[...e.map(e=>e())],(e,n)=>{let r=!1;for(let t=0;t{let{id:e,ids:n,getRootNode:r}=A(t);return dce({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=vce(U(()=>e.props?.({props:uO(A(t)),get scope(){return n.value}})??A(t))),a=e.context?.({prop:i,bindable:Tk,get scope(){return n.value},flush:Dk,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a[e]?.get()},set(e,t){a[e]?.set(t)},initial(e){return a[e]?.initial},hash(e){let t=a[e]?.get();return a[e]?.hash(t)}},s=new Map,c=null,l={current:null},u={current:{type:``}},d=()=>({...u.current,current(){return u.current},previous(){return l.current}}),f=()=>({...b,matches(...e){let t=b.get();return e.includes(t)},hasTag(t){let n=b.get();return!!e.states[n]?.tags?.includes(t)}}),p=gce(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:S,action:h,guard:g,track:_ce,refs:p,computed:y,flush:Dk,get scope(){return n.value},choose:v}),h=t=>{let n=LD(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||dO(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>LD(t)?t(m()):e.implementations?.guards?.[t](m()),_=t=>{let n=LD(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||dO(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>CD(e).find(e=>{let t=!e.guard;return ID(e.guard)?t=!!g(e.guard):LD(e.guard)&&(t=e.guard(m())),t}),y=t=>{fO(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:d(),prop:i,refs:p,get scope(){return n.value},computed:y})},b=Tk(()=>({defaultValue:e.initialState({prop:i}),onChange(t,n){n&&(s.get(n)?.(),s.delete(n)),n&&h(e.states[n]?.exit),h(c?.actions);let r=_(e.states[t]?.effects);if(r&&s.set(t,r),n===xk){h(e.entry);let t=_(e.effects);t&&s.set(xk,t)}h(e.states[t]?.entry)}})),x=bk.NotStarted;Ei(()=>{let e=x===bk.Started;x=bk.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,xk)}),ki(()=>{x=bk.Stopped,r(`unmounting...`);let t=s.values();for(let e of t)e?.();s=new Map,h(e.exit)});let S=t=>{if(x!==bk.Started)return;l.current=u.current,u.current=t;let n=b.get(),i=v(e.states[n].on?.[t.type]??e.on?.[t.type]);if(!i)return;c=i;let a=i.target??n;r(`transition`,t.type,i.target||n,`(${i.actions})`);let o=a!==n;o?b.set(a):i.reenter&&!o?b.invoke(n,n):h(i.actions)};return e.watch?.(m()),{state:f(),send:S,context:o,prop:i,get scope(){return n.value},refs:p,computed:y,event:d(),getStatus:()=>x}}function vce(e){return function(t){return e.value[t]}}var Dk=e=>{zn().then(()=>{e()})},yce=M({name:`Dynamic`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=Ok(n.default()),[r,...i]=e;if(Object.keys(t).length>0){delete r.props?.ref;let n=_k(t,r.props??{}),a=zo(r,n);for(let e in n)e.startsWith(`on`)&&(a.props||={},a.props[e]=n[e]);return e.length===1?a:[a,...i]}return e}}});function Ok(e){return e?e.flatMap(e=>e.type===P?Ok(e.children):[e]):[]}var bce=`br, hr, img, input, area, textarea`.split(`, `),xce=e=>typeof e==`string`&&bce.includes(e),kk=e=>M({name:`Polymorphic`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>cs(yce,n,r):()=>cs(e,n,xce(e)?void 0:r.default?.())}});function Sce(){let e=new Map;return new Proxy(kk,{apply(e,t,n){return kk(n[0])},get(t,n){return e.has(n)||e.set(n,kk(n)),e.get(n)}})}var J=Sce();function Ak(e){let t=A(e);return t?.$el??t}var Cce=e=>Object.prototype.hasOwnProperty.call(e,`nodeName`)&&typeof e.nodeName==`string`;function Y(){let e=Ko(),t=O(),n=U(()=>[`#text`,`#comment`].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Ak(t)),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(n){t.value=n,!(Cce(n)||!n)&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>n.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}var wce=M({__name:`field-error-text`,props:{asChild:{type:Boolean}},setup(e){let t=xD();return Y(),(e,n)=>k(t).invalid?(F(),L(k(J).span,H({key:0},k(t).getErrorTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`])):V(``,!0)}}),Tce=M({__name:`field-helper-text`,props:{asChild:{type:Boolean}},setup(e){let t=xD();return Y(),(e,n)=>(F(),L(k(J).span,H(k(t).getHelperTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ece=M({__name:`field-input`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=xD(),r=t;return Y(),(e,t)=>(F(),L(k(J).input,H(k(n).getInputProps(),{"as-child":e.asChild,value:e.modelValue,onInput:t[0]||=e=>r(`update:modelValue`,e.target.value)}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`,`value`]))}}),Dce=M({__name:`field-label`,props:{asChild:{type:Boolean}},setup(e){let t=xD();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Oce=M({__name:`field-required-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=xD();return Y(),(e,n)=>k(t).required?(F(),L(k(J).span,H({key:0},k(t).getRequiredIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[n[0]||=B(`*`,-1)])]),_:3},16,[`as-child`])):N(e.$slots,`fallback`,{key:1})}}),kce=M({__name:`field-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return bD(n),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Ace,jk]=yD(`EnvironmentContext`),Mk=U(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),Nk=(e,t=[])=>({parts:(...n)=>{if(jce(t))return Nk(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>Nk(e,[...t,...n]),omit:(...n)=>Nk(e,t.filter(e=>!n.includes(e))),rename:e=>Nk(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${Pk(e)}"][data-part="${Pk(n)}"]`,`& [data-scope="${Pk(e)}"][data-part="${Pk(n)}"]`].join(`, `),attrs:{"data-scope":Pk(e),"data-part":Pk(n)}}}),{})}),Pk=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),jce=e=>e.length===0,Fk=Nk(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),Mce=(e={})=>{let t=jk(Mk),n=$t({hasErrorText:!1,hasHelperText:!1}),r=Hr(),i=U(()=>A(e).id??r),a=O(null),o=U(()=>A(e).ids?.control??`field::${i.value}`),s=U(()=>A(e).ids?.errorText??`field::${i.value}::error-text`),c=U(()=>A(e).ids?.helperText??`field::${i.value}::helper-text`),l=U(()=>A(e).ids?.label??`field::${i.value}::label`);Ei(()=>{let e=Ak(a);if(!e)return;let r=()=>{let e=t.value.getRootNode();n.hasErrorText=!!e.getElementById(s.value),n.hasHelperText=!!e.getElementById(c.value)};r();let i=new(t.value.getWindow()).MutationObserver(r);i.observe(e,{childList:!0,subtree:!0}),ki(()=>{i.disconnect()})});let u=()=>{let t=A(e);return{...Fk.root.attrs,id:o.value,role:`group`,"data-disabled":q(t.disabled),"data-invalid":q(t.invalid),"data-readonly":q(t.readOnly)}},d=()=>{let t=A(e);return{...Fk.label.attrs,id:l.value,"data-disabled":q(t.disabled),"data-invalid":q(t.invalid),"data-readonly":q(t.readOnly),"data-required":q(t.required),htmlFor:i.value}},f=U(()=>{let t=A(e),r=[];return n.hasErrorText&&t.invalid&&r.push(s.value),n.hasHelperText&&r.push(c.value),r}),p=()=>{let t=A(e);return{"aria-describedby":f.value.join(` `)||void 0,"aria-invalid":_O(t.invalid),"data-invalid":q(t.invalid),"data-required":q(t.required),"data-readonly":q(t.readOnly),id:i.value,required:t.required,disabled:t.disabled,readOnly:t.readOnly}},m=()=>({...p(),...Fk.input.attrs}),h=()=>({...p(),...Fk.textarea.attrs}),g=()=>({...p(),...Fk.select.attrs}),_=()=>{let t=A(e);return{id:c.value,...Fk.helperText.attrs,"data-disabled":q(t.disabled)}},v=()=>({id:s.value,...Fk.errorText.attrs,"aria-live":`polite`}),y=()=>({"aria-hidden":!0,...Fk.requiredIndicator.attrs});return U(()=>{let t=A(e);return{ariaDescribedby:f.value.join(` `)||void 0,ids:{control:i.value,label:l.value,errorText:s.value,helperText:c.value},refs:{rootRef:a},disabled:t.disabled,invalid:t.invalid,readOnly:t.readOnly,required:t.required,getLabelProps:d,getRootProps:u,getInputProps:m,getTextareaProps:h,getSelectProps:g,getHelperTextProps:_,getErrorTextProps:v,getRequiredIndicatorProps:y}})},Nce=M({__name:`field-root`,props:Xi({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){let t=Mce(e);return bD(t),Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getRootProps(),{ref:k(t).refs.rootRef,"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Pce=M({__name:`field-select`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=xD(),r=t;return Y(),(e,t)=>(F(),L(k(J).select,H(k(n).getSelectProps(),{value:e.modelValue,onChange:t[0]||=e=>r(`update:modelValue`,e.target.value),"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`value`,`as-child`]))}}),Fce=e=>{if(!e)return;let t=OO(e),n=TO(e),r=wO(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);Object.defineProperty(e,`value`,{...a,set(){a?.set?.apply(this,arguments),i()}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},Ik=Object.freeze(Object.defineProperty({__proto__:null,Context:SD,ErrorText:wce,HelperText:Tce,Input:Ece,Label:Dce,RequiredIndicator:Oce,Root:Nce,RootProvider:kce,Select:Pce,Textarea:M({__name:`field-textarea`,props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=xD(),i=t,a=O();return Ei(()=>{let e=Ak(a);if(!e||!n.autoresize)return;let t=Fce(e);ki(()=>t?.())}),Y(),(e,t)=>(F(),L(k(J).textarea,H({ref_key:`textareaRef`,ref:a},k(r).getTextareaProps(),{value:e.modelValue,onInput:t[0]||=e=>i(`update:modelValue`,e.target.value),style:n.autoresize?{resize:`none`,overflow:`hidden`}:void 0,"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`value`,`style`,`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),Ice=M({__name:`Text`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`);return(e,n)=>(F(),L(k(Ik).Root,null,{default:j(()=>[z(k(Ik).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),z(k(Ik).Input,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`w-full h-9 px-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent`,placeholder:e.field.placeholder},null,8,[`modelValue`,`placeholder`])]),_:1}))}}),Lce=M({__name:`Textarea`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`);return(e,n)=>(F(),L(k(Ik).Root,null,{default:j(()=>[z(k(Ik).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label||e.field.id),1)]),_:1}),z(k(Ik).Textarea,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical`,rows:e.field.rows||3,placeholder:e.field.placeholder},null,8,[`modelValue`,`rows`,`placeholder`])]),_:1}))}}),[Lk,Rk]=yD(`SwitchContext`),Rce=M({__name:`switch-context`,setup(e){let t=Rk();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),zce=M({__name:`switch-control`,props:{asChild:{type:Boolean}},setup(e){let t=Rk();return Y(),(e,n)=>(F(),L(k(J).span,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Bce=M({__name:`switch-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=Rk(),n=xD();return Y(),(e,r)=>(F(),L(k(J).input,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`aria-describedby`,`as-child`]))}}),Vce=M({__name:`switch-label`,props:{asChild:{type:Boolean}},setup(e){let t=Rk();return Y(),(e,n)=>(F(),L(k(J).span,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Hce=M({__name:`switch-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return Lk(n),Y(),(e,t)=>(F(),L(k(J).label,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}});function Uce(e){return!(e.metaKey||!NO()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var Wce=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Gce(e,t,n){let r=n?FO(n):null,i=TO(r);return e=e||r instanceof i.HTMLInputElement&&!Wce.has(r?.type)||r instanceof i.HTMLTextAreaElement||r instanceof i.HTMLElement&&r.isContentEditable,!(e&&t===`keyboard`&&n instanceof i.KeyboardEvent&&!Reflect.has(Kce,n.key))}var zk=null,Bk=new Set,Vk=new Map,Hk=!1,Uk=!1,Kce={Tab:!0,Escape:!0};function Wk(e,t){for(let n of Bk)n(e,t)}function Gk(e){Hk=!0,Uce(e)&&(zk=`keyboard`,Wk(`keyboard`,e))}function Kk(e){zk=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Hk=!0,Wk(`pointer`,e))}function qk(e){wse(e)&&(Hk=!0,zk=`virtual`)}function Jk(e){let t=FO(e);t===TO(t)||t===wO(t)||(!Hk&&!Uk&&(zk=`virtual`,Wk(`virtual`,e)),Hk=!1,Uk=!1)}function Yk(){Hk=!1,Uk=!0}function qce(e){if(typeof window>`u`||Vk.get(TO(e)))return;let t=TO(e),n=wO(e),r=t.HTMLElement.prototype.focus;function i(){zk=`virtual`,Wk(`virtual`,null),Hk=!0,r.apply(this,arguments)}Object.defineProperty(t.HTMLElement.prototype,`focus`,{configurable:!0,value:i}),n.addEventListener(`keydown`,Gk,!0),n.addEventListener(`keyup`,Gk,!0),n.addEventListener(`click`,qk,!0),t.addEventListener(`focus`,Jk,!0),t.addEventListener(`blur`,Yk,!1),typeof t.PointerEvent<`u`?(n.addEventListener(`pointerdown`,Kk,!0),n.addEventListener(`pointermove`,Kk,!0),n.addEventListener(`pointerup`,Kk,!0)):(n.addEventListener(`mousedown`,Kk,!0),n.addEventListener(`mousemove`,Kk,!0),n.addEventListener(`mouseup`,Kk,!0)),t.addEventListener(`beforeunload`,()=>{Jce(e)},{once:!0}),Vk.set(t,{focus:r})}var Jce=(e,t)=>{let n=TO(e),r=wO(e);Vk.has(n)&&(n.HTMLElement.prototype.focus=Vk.get(n).focus,r.removeEventListener(`keydown`,Gk,!0),r.removeEventListener(`keyup`,Gk,!0),r.removeEventListener(`click`,qk,!0),n.removeEventListener(`focus`,Jk,!0),n.removeEventListener(`blur`,Yk,!1),typeof n.PointerEvent<`u`?(r.removeEventListener(`pointerdown`,Kk,!0),r.removeEventListener(`pointermove`,Kk,!0),r.removeEventListener(`pointerup`,Kk,!0)):(r.removeEventListener(`mousedown`,Kk,!0),r.removeEventListener(`mousemove`,Kk,!0),r.removeEventListener(`mouseup`,Kk,!0)),Vk.delete(n))};function Xk(){return zk===`keyboard`}function Zk(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;qce(i),r?.({isFocusVisible:n||Xk(),modality:zk});let a=(e,n)=>{Gce(!!t,e,n)&&r?.({isFocusVisible:Xk(),modality:e})};return Bk.add(a),()=>{Bk.delete(a)}}var Qk=Nk(`switch`).parts(`root`,`label`,`control`,`thumb`).build(),$k=e=>e.ids?.root??`switch:${e.id}`,eA=e=>e.ids?.label??`switch:${e.id}:label`,Yce=e=>e.ids?.thumb??`switch:${e.id}:thumb`,Xce=e=>e.ids?.control??`switch:${e.id}:control`,tA=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,Zce=e=>e.getById($k(e)),nA=e=>e.getById(tA(e));function Qce(e,t){let{context:n,send:r,prop:i,scope:a}=e,o=!!i(`disabled`),s=!!i(`readOnly`),c=!!i(`required`),l=!!n.get(`checked`),u=!o&&n.get(`focused`),d=!o&&n.get(`focusVisible`),f={"data-active":q(n.get(`active`)),"data-focus":q(u),"data-focus-visible":q(d),"data-readonly":q(s),"data-hover":q(n.get(`hovered`)),"data-disabled":q(o),"data-state":l?`checked`:`unchecked`,"data-invalid":q(i(`invalid`)),"data-required":q(c)};return{checked:l,disabled:o,focused:u,setChecked(e){r({type:`CHECKED.SET`,checked:e,isTrusted:!1})},toggleChecked(){r({type:`CHECKED.TOGGLE`,checked:l,isTrusted:!1})},getRootProps(){return t.label({...Qk.root.attrs,...f,dir:i(`dir`),id:$k(a),htmlFor:tA(a),onPointerMove(){o||r({type:`CONTEXT.SET`,context:{hovered:!0}})},onPointerLeave(){o||r({type:`CONTEXT.SET`,context:{hovered:!1}})},onClick(e){o||(FO(e)===nA(a)&&e.stopPropagation(),PO()&&nA(a)?.focus())}})},getLabelProps(){return t.element({...Qk.label.attrs,...f,dir:i(`dir`),id:eA(a)})},getThumbProps(){return t.element({...Qk.thumb.attrs,...f,dir:i(`dir`),id:Yce(a),"aria-hidden":!0})},getControlProps(){return t.element({...Qk.control.attrs,...f,dir:i(`dir`),id:Xce(a),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:tA(a),type:`checkbox`,required:i(`required`),defaultChecked:l,disabled:o,"aria-labelledby":eA(a),"aria-invalid":i(`invalid`),name:i(`name`),form:i(`form`),value:i(`value`),style:hk,onFocus(){r({type:`CONTEXT.SET`,context:{focused:!0,focusVisible:Xk()}})},onBlur(){r({type:`CONTEXT.SET`,context:{focused:!1,focusVisible:!1}})},onClick(e){if(s){e.preventDefault();return}let t=e.currentTarget.checked;r({type:`CHECKED.SET`,checked:t,isTrusted:!0})}})}}}var{not:rA}=yk(),$ce={props({props:e}){return{defaultChecked:!1,label:`switch`,value:`on`,...e}},initialState(){return`ready`},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e(`defaultChecked`),value:e(`checked`),onChange(t){e(`onCheckedChange`)?.({checked:t})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t(`disabled`)||e.get(`fieldsetDisabled`)},watch({track:e,prop:t,context:n,action:r}){e([()=>t(`disabled`)],()=>{r([`removeFocusIfNeeded`])}),e([()=>n.get(`checked`)],()=>{r([`syncInputElement`])})},effects:[`trackFormControlState`,`trackPressEvent`,`trackFocusVisible`],on:{"CHECKED.TOGGLE":[{guard:rA(`isTrusted`),actions:[`toggleChecked`,`dispatchChangeEvent`]},{actions:[`toggleChecked`]}],"CHECKED.SET":[{guard:rA(`isTrusted`),actions:[`setChecked`,`dispatchChangeEvent`]},{actions:[`setChecked`]}],"CONTEXT.SET":{actions:[`setContext`]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e(`isDisabled`))return Yse({pointerNode:Zce(t),keyboardNode:nA(t),isValidKey:e=>e.key===` `,onPress:()=>n.set(`active`,!1),onPressStart:()=>n.set(`active`,!0),onPressEnd:()=>n.set(`active`,!1)})},trackFocusVisible({computed:e,scope:t}){if(!e(`isDisabled`))return Zk({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return JO(nA(n),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){t({type:`CHECKED.SET`,checked:!!e.initial(`checked`),src:`form-reset`})}})}},actions:{setContext({context:e,event:t}){for(let n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){let n=nA(t);n&&GO(n,!!e.get(`checked`))},removeFocusIfNeeded({context:e,prop:t}){t(`disabled`)&&e.set(`focused`,!1)},setChecked({context:e,event:t}){e.set(`checked`,t.checked)},toggleChecked({context:e}){e.set(`checked`,!e.get(`checked`))},dispatchChangeEvent({context:e,scope:t}){qO(nA(t),{checked:e.get(`checked`)})}}}};Sk()([`checked`,`defaultChecked`,`dir`,`disabled`,`form`,`getRootNode`,`id`,`ids`,`invalid`,`label`,`name`,`onCheckedChange`,`readOnly`,`required`,`value`]);var iA=U(()=>({dir:`ltr`,locale:`en-US`})),[ele,aA]=yD(`LocaleContext`),oA=e=>{let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},tle=(e={},t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=xD(),o=Ek($ce,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,hiddenInput:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,getRootNode:r?.value.getRootNode,...oA(o),onCheckedChange(e){t?.(`checkedChange`,e),t?.(`update:checked`,e.checked),o.onCheckedChange?.(e)}}}));return U(()=>Qce(o,wk))},sA=Object.freeze(Object.defineProperty({__proto__:null,Context:Rce,Control:zce,HiddenInput:Bce,Label:Vce,Root:M({__name:`switch-root`,props:Xi({checked:{type:Boolean},defaultChecked:{type:Boolean},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:[`checkedChange`,`update:checked`],setup(e,{emit:t}){let n=tle(e,t);return Lk(n),Y(),(e,t)=>(F(),L(k(J).label,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:Hce,Thumb:M({__name:`switch-thumb`,props:{asChild:{type:Boolean}},setup(e){let t=Rk();return Y(),(e,n)=>(F(),L(k(J).span,H(k(t).getThumbProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),nle={key:1,class:`flex items-center cursor-pointer gap-2`},rle={class:`text-sm font-medium text-gray-700`},ile=M({__name:`Boolean`,props:Zi({field:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=U(()=>t.field.variant||`checkbox`),r=ya(e,`modelValue`);return(e,t)=>n.value===`switch`?(F(),L(k(sA).Root,{key:0,checked:r.value,"onUpdate:checked":t[0]||=e=>r.value=e,class:`flex items-center cursor-pointer gap-2`},{default:j(()=>[z(k(sA).Control,{class:`w-8 h-4 p-0.5 inline-flex items-center bg-gray-300 rounded-full data-[state=checked]:bg-accent relative transition-colors`},{default:j(()=>[z(k(sA).Thumb,{class:`w-3 h-3 bg-white rounded-full shadow-sm data-[state=checked]:translate-x-4 transition-transform`})]),_:1}),z(k(sA).Label,{class:`text-sm font-medium text-gray-700`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),z(k(sA).HiddenInput)]),_:1},8,[`checked`])):(F(),I(`label`,nle,[rr(R(`input`,{type:`checkbox`,"onUpdate:modelValue":t[1]||=e=>r.value=e,class:`w-4 h-4 rounded border-gray-300 focus:outline-none text-accent focus:ring-accent focus:ring-2`},null,512),[[Lc,r.value]]),R(`span`,rle,E(e.field.label),1)]))}}),ale={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ole(e,t){return F(),I(`svg`,ale,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m4.5 12.75l6 6l9-13.5`},null,-1)]])}var sle=D({name:`heroicons-check`,render:ole}),cle={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function lle(e,t){return F(),I(`svg`,cle,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m19.5 8.25l-7.5 7.5l-7.5-7.5`},null,-1)]])}var cA=D({name:`heroicons-chevron-down`,render:lle}),ule=Object.defineProperty,dle=(e,t,n)=>t in e?ule(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lA=(e,t,n)=>dle(e,typeof t==`symbol`?t:t+``,n),uA={itemToValue(e){return typeof e==`string`?e:FD(e)&&zD(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:FD(e)&&zD(e,`label`)?e.label:uA.itemToValue(e)},isItemDisabled(e){return FD(e)&&zD(e,`disabled`)?!!e.disabled:!1}},dA=class e{constructor(t){this.options=t,lA(this,`items`),lA(this,`indexMap`,null),lA(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),lA(this,`isEqual`,e=>MD(this.items,e.items)),lA(this,`setItems`,e=>this.copy(e)),lA(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),lA(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),lA(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),lA(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),lA(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),lA(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),lA(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??uA.itemToValue(e)),lA(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??uA.isItemDisabled(e)),lA(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??uA.itemToString(e)),lA(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),lA(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),lA(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),lA(this,`has`,e=>this.indexOf(e)!==-1),lA(this,`hasItem`,e=>e==null?!1:this.has(this.getItemValue(e))),lA(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),lA(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),lA(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),lA(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),lA(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),lA(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),lA(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),lA(this,`insert`,(e,...t)=>this.copy(fA(this.items,e,...t))),lA(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(fA(this.items,n,...t))}),lA(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(fA(this.items,n+1,...t))}),lA(this,`prepend`,(...e)=>this.copy(fA(this.items,0,...e))),lA(this,`append`,(...e)=>this.copy(fA(this.items,this.items.length,...e))),lA(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),lA(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n==null?!1:!t.includes(n)}))}),lA(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(pA(this.items,[n],t))}),lA(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(pA(this.items,r,n))}),lA(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(pA(this.items,r,n+1))}),lA(this,`reorder`,(e,t)=>this.copy(pA(this.items,[e],t))),lA(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return nr)}),lA(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),lA(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),lA(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),lA(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},fle=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function fA(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function pA(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>enew dA(e),[mA,hA]=yD(`SelectContext`),mle=M({__name:`select-clear-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getClearTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[gA,_A]=yD(`PresenceContext`),hle=M({__name:`select-content`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=_A(),r=U(()=>_k(t.value.getContentProps(),n.value.presenceProps));return Y(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(J).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),gle=M({__name:`select-context`,setup(e){let t=hA();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),_le=M({__name:`select-control`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),vle={key:0,value:``},yle=[`value`,`disabled`],ble=M({__name:`select-hidden-select`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=xD();return Y(),(e,r)=>(F(),L(k(J).select,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getHiddenSelectProps()),{default:j(()=>[k(t).value.length===0?(F(),I(`option`,vle)):V(``,!0),(F(!0),I(P,null,Vi(k(t).collection.items,e=>(F(),I(`option`,{key:e.value,value:k(t).collection.getItemValue(e),disabled:k(t).collection.getItemDisabled(e)},E(k(t).collection.stringifyItem(e))+` > `,9,yle))),128))]),_:1},16,[`aria-describedby`]))}}),xle=M({__name:`select-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Sle,Cle]=yD(`SelectItemContext`),wle=M({__name:`select-item-context`,setup(e){let t=Cle();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[Tle,Ele]=yD(`SelectItemGroupPropsContext`),Dle=M({__name:`select-item-group-label`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=Ele();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getItemGroupLabelProps({htmlFor:k(n).id}),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ole=M({__name:`select-item-group`,props:{id:{},asChild:{type:Boolean}},setup(e){let t=e,n=hA(),r=Hr(),i=t.id??r;return Tle({id:i}),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getItemGroupProps({id:k(i)}),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[kle,vA]=yD(`SelectItemPropsContext`),Ale=M({__name:`select-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=vA();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),jle=M({__name:`select-item-text`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=vA();return Y(),(e,r)=>(F(),L(k(J).span,H(k(t).getItemTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Mle=M({__name:`select-item`,props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=hA();return kle(t),Sle(U(()=>n.value.getItemState(t))),Y(),(e,r)=>(F(),L(k(J).div,H(k(n).getItemProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Nle=M({__name:`select-label`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ple=M({__name:`select-list`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getListProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[yA,bA]=yD(`RenderStrategyProps`);function Fle(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var Ile={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`clearInitial`,`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},clearInitial:({context:e})=>{e.set(`initial`,!1)},invokeOnExitComplete:({prop:e})=>{e(`onExitComplete`)?.()},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,OO(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});ek(()=>{let r=xA(t.get(`styles`));e.set(`unmountAnimationName`,r),r===`none`||r===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{ek(()=>{e.set(`prevAnimationName`,xA(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{let r=t.get(`node`);if(!r)return;let i=n=>{(n.composedPath?.()?.[0]??n.target)===r&&e.set(`prevAnimationName`,xA(t.get(`styles`)))},a=i=>{let a=xA(t.get(`styles`));FO(i)===r&&a===e.get(`unmountAnimationName`)&&n({type:`UNMOUNT`,src:`animationend`})};r.addEventListener(`animationstart`,i),r.addEventListener(`animationcancel`,a),r.addEventListener(`animationend`,a);let o=pk(r,{animationFillMode:`forwards`});return()=>{r.removeEventListener(`animationstart`,i),r.removeEventListener(`animationcancel`,a),r.removeEventListener(`animationend`,a),$O(()=>o())}}}}};function xA(e){return e?.animationName||`none`}Sk()([`onExitComplete`,`present`,`immediate`]);var SA=(e,t)=>{let n=O(!1),r=O(null),i=Ek(Ile,U(()=>({present:A(e).present,onExitComplete:()=>t?.(`exitComplete`)}))),a=U(()=>Fle(i));return pr(()=>a.value.present,()=>{a.value.present&&(n.value=!0)}),pr(r,()=>{if(r.value){let e=r.value.$el?r.value.$el:r.value;e&&a.value.setNode(e)}}),U(()=>{let t=A(e);return{present:a.value.present,unmounted:!a.value.present&&!n.value&&t.lazyMount||t?.unmountOnExit&&!a.value?.present&&n.value,presenceProps:{ref:r,hidden:!a.value.present,"data-state":a.value.skip&&t.skipAnimationOnMount?void 0:t?.present?`open`:`closed`}}})},Lle=M({__name:`select-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=hA(),n=bA(),r=SA(U(()=>({...n.value,present:t.value.open})));return gA(r),Y(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(J).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Rle=M({__name:`select-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return mA(n),yA(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zle=[`top`,`right`,`bottom`,`left`],CA=Math.min,wA=Math.max,TA=Math.round,EA=Math.floor,DA=e=>({x:e,y:e}),Ble={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Vle={start:`end`,end:`start`};function OA(e,t,n){return wA(e,CA(t,n))}function kA(e,t){return typeof e==`function`?e(t):e}function AA(e){return e.split(`-`)[0]}function jA(e){return e.split(`-`)[1]}function MA(e){return e===`x`?`y`:`x`}function NA(e){return e===`y`?`height`:`width`}var Hle=new Set([`top`,`bottom`]);function PA(e){return Hle.has(AA(e))?`y`:`x`}function FA(e){return MA(PA(e))}function Ule(e,t,n){n===void 0&&(n=!1);let r=jA(e),i=FA(e),a=NA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=UA(o)),[o,UA(o)]}function Wle(e){let t=UA(e);return[IA(e),t,IA(t)]}function IA(e){return e.replace(/start|end/g,e=>Vle[e])}var LA=[`left`,`right`],RA=[`right`,`left`],zA=[`top`,`bottom`],BA=[`bottom`,`top`];function VA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?RA:LA:t?LA:RA;case`left`:case`right`:return t?zA:BA;default:return[]}}function HA(e,t,n,r){let i=jA(e),a=VA(AA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(IA)))),a}function UA(e){return e.replace(/left|right|bottom|top/g,e=>Ble[e])}function WA(e){return{top:0,right:0,bottom:0,left:0,...e}}function GA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:WA(e)}function KA(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function qA(e,t,n){let{reference:r,floating:i}=e,a=PA(t),o=FA(t),s=NA(o),c=AA(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(jA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var JA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=qA(l,r,c),f=r,p={},m=0;for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kA(e,t)||{};if(l==null)return{};let d=GA(u),f={x:n,y:r},p=FA(i),m=NA(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let ee=b/2-x/2,te=C/2-h[m]/2-1,w=CA(d[_],te),T=CA(d[v],te),ne=w,re=C-h[m]-T,ie=C/2-h[m]/2+ee,ae=OA(ne,ie,re),oe=!c.arrow&&jA(i)!=null&&ie!==ae&&a.reference[m]/2-(iee<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==PA(t))||te.every(e=>PA(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:te},reset:{placement:t}};let n=te.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=te.filter(e=>{if(x){let t=PA(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function QA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $A(e){return zle.some(t=>e[t]>=0)}var ej=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=kA(e,t);switch(r){case`referenceHidden`:{let e=QA(await YA(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:$A(e)}}}case`escaped`:{let e=QA(await YA(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:$A(e)}}}default:return{}}}}},tj=new Set([`left`,`top`]);async function nj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AA(n),s=jA(n),c=PA(n)===`y`,l=tj.has(o)?-1:1,u=a&&c?-1:1,d=kA(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var rj=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await nj(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ij=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=kA(e,t),l={x:n,y:r},u=await YA(t,c),d=PA(AA(i)),f=MA(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=OA(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=OA(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},aj=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kA(e,t),u={x:n,y:r},d=PA(i),f=MA(d),p=u[f],m=u[d],h=kA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=tj.has(AA(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},oj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=kA(e,t),u=await YA(t,l),d=AA(i),f=jA(i),p=PA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=CA(h-u[g],v),x=CA(m-u[_],y),S=!t.middlewareData.shift,C=b,ee=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ee=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=wA(u.left,0),t=wA(u.right,0),n=wA(u.top,0),r=wA(u.bottom,0);p?ee=m-2*(e!==0||t!==0?e+t:wA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:wA(u.top,u.bottom))}await c({...t,availableWidth:ee,availableHeight:C});let te=await o.getDimensions(s.floating);return m!==te.width||h!==te.height?{reset:{rects:!0}}:{}}}};function sj(){return typeof window<`u`}function cj(e){return dj(e)?(e.nodeName||``).toLowerCase():`#document`}function lj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uj(e){return((dj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function dj(e){return sj()?e instanceof Node||e instanceof lj(e).Node:!1}function fj(e){return sj()?e instanceof Element||e instanceof lj(e).Element:!1}function pj(e){return sj()?e instanceof HTMLElement||e instanceof lj(e).HTMLElement:!1}function mj(e){return!sj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof lj(e).ShadowRoot}var hj=new Set([`inline`,`contents`]);function gj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hj.has(i)}var _j=new Set([`table`,`td`,`th`]);function vj(e){return _j.has(cj(e))}var yj=[`:popover-open`,`:modal`];function bj(e){return yj.some(t=>{try{return e.matches(t)}catch{return!1}})}var xj=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Sj=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Cj=[`paint`,`layout`,`strict`,`content`];function wj(e){let t=Ej(),n=fj(e)?kj(e):e;return xj.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Sj.some(e=>(n.willChange||``).includes(e))||Cj.some(e=>(n.contain||``).includes(e))}function Tj(e){let t=jj(e);for(;pj(t)&&!Oj(t);){if(wj(t))return t;if(bj(t))return null;t=jj(t)}return null}function Ej(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Dj=new Set([`html`,`body`,`#document`]);function Oj(e){return Dj.has(cj(e))}function kj(e){return lj(e).getComputedStyle(e)}function Aj(e){return fj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jj(e){if(cj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||mj(e)&&e.host||uj(e);return mj(t)?t.host:t}function Mj(e){let t=jj(e);return Oj(t)?e.ownerDocument?e.ownerDocument.body:e.body:pj(t)&&gj(t)?t:Mj(t)}function Nj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Mj(e),i=r===e.ownerDocument?.body,a=lj(r);if(i){let e=Pj(a);return t.concat(a,a.visualViewport||[],gj(r)?r:[],e&&n?Nj(e):[])}return t.concat(r,Nj(r,[],n))}function Pj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fj(e){let t=kj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=pj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=TA(n)!==a||TA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ij(e){return fj(e)?e:e.contextElement}function Lj(e){let t=Ij(e);if(!pj(t))return DA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Fj(t),o=(a?TA(n.width):n.width)/r,s=(a?TA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rj=DA(0);function zj(e){let t=lj(e);return!Ej()||!t.visualViewport?Rj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==lj(e)?!1:t}function Vj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ij(e),o=DA(1);t&&(r?fj(r)&&(o=Lj(r)):o=Lj(e));let s=Bj(a,n,r)?zj(a):DA(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=lj(a),t=r&&fj(r)?lj(r):r,n=e,i=Pj(n);for(;i&&r&&t!==n;){let e=Lj(i),t=i.getBoundingClientRect(),r=kj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=lj(i),i=Pj(n)}}return KA({width:u,height:d,x:c,y:l})}function Hj(e,t){let n=Aj(e).scrollLeft;return t?t.left+n:Vj(uj(e)).left+n}function Uj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hj(e,n),y:n.top+t.scrollTop}}function Wj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=uj(r),s=t?bj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=DA(1),u=DA(0),d=pj(r);if((d||!d&&!a)&&((cj(r)!==`body`||gj(o))&&(c=Aj(r)),pj(r))){let e=Vj(r);l=Lj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Uj(o,c):DA(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gj(e){return Array.from(e.getClientRects())}function Kj(e){let t=uj(e),n=Aj(e),r=e.ownerDocument.body,i=wA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=wA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Hj(e),s=-n.scrollTop;return kj(r).direction===`rtl`&&(o+=wA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qj=25;function Jj(e,t){let n=lj(e),r=uj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ej();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Hj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qj&&(a-=o)}else l<=qj&&(a+=l);return{width:a,height:o,x:s,y:c}}var Yj=new Set([`absolute`,`fixed`]);function Xj(e,t){let n=Vj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pj(e)?Lj(e):DA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Zj(e,t,n){let r;if(t===`viewport`)r=Jj(e,n);else if(t===`document`)r=Kj(uj(e));else if(fj(t))r=Xj(t,n);else{let n=zj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return KA(r)}function Qj(e,t){let n=jj(e);return n===t||!fj(n)||Oj(n)?!1:kj(n).position===`fixed`||Qj(n,t)}function $j(e,t){let n=t.get(e);if(n)return n;let r=Nj(e,[],!1).filter(e=>fj(e)&&cj(e)!==`body`),i=null,a=kj(e).position===`fixed`,o=a?jj(e):e;for(;fj(o)&&!Oj(o);){let t=kj(o),n=wj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Yj.has(i.position)||gj(o)&&!n&&Qj(e,o))?r=r.filter(e=>e!==o):i=t,o=jj(o)}return t.set(e,r),r}function eM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?bj(t)?[]:$j(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Zj(t,n,i);return e.top=wA(r.top,e.top),e.right=CA(r.right,e.right),e.bottom=CA(r.bottom,e.bottom),e.left=wA(r.left,e.left),e},Zj(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function tM(e){let{width:t,height:n}=Fj(e);return{width:t,height:n}}function nM(e,t,n){let r=pj(t),i=uj(t),a=n===`fixed`,o=Vj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=DA(0);function l(){c.x=Hj(i)}if(r||!r&&!a)if((cj(t)!==`body`||gj(i))&&(s=Aj(t)),r){let e=Vj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Uj(i,s):DA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function rM(e){return kj(e).position===`static`}function iM(e,t){if(!pj(e)||kj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return uj(e)===n&&(n=n.ownerDocument.body),n}function aM(e,t){let n=lj(e);if(bj(e))return n;if(!pj(e)){let t=jj(e);for(;t&&!Oj(t);){if(fj(t)&&!rM(t))return t;t=jj(t)}return n}let r=iM(e,t);for(;r&&vj(r)&&rM(r);)r=iM(r,t);return r&&Oj(r)&&rM(r)&&!wj(r)?n:r||Tj(e)||n}var oM=async function(e){let t=this.getOffsetParent||aM,n=this.getDimensions,r=await n(e.floating);return{reference:nM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sM(e){return kj(e).direction===`rtl`}var cM={convertOffsetParentRelativeRectToViewportRelativeRect:Wj,getDocumentElement:uj,getClippingRect:eM,getOffsetParent:aM,getElementRects:oM,getClientRects:Gj,getDimensions:tM,getScale:Lj,isElement:fj,isRTL:sM};function lM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uM(e,t){let n=null,r,i=uj(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=EA(d),h=EA(i.clientWidth-(u+f)),g=EA(i.clientHeight-(d+p)),_=EA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:wA(0,CA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!lM(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function dM(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ij(e),u=i||a?[...l?Nj(l):[],...Nj(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?uM(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Vj(e):null;c&&g();function g(){let t=Vj(e);h&&!lM(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var fM=rj,pM=ij,mM=ZA,hM=oj,gM=ej,_M=XA,vM=aj,yM=(e,t,n)=>{let r=new Map,i={platform:cM,...n},a={...i.platform,_c:r};return JA(e,t,{...i,platform:a})};function bM(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function xM(e){if(!e)return bM();let{x:t,y:n,width:r,height:i}=e;return bM(t,n,r,i)}function SM(e,t){return{contextElement:vO(e)?e:void 0,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?xM(r):n.getBoundingClientRect()}}}var CM=e=>({variable:e,reference:`var(${e})`}),wM={arrowSize:CM(`--arrow-size`),arrowSizeHalf:CM(`--arrow-size-half`),arrowBg:CM(`--arrow-background`),transformOrigin:CM(`--transform-origin`),arrowOffset:CM(`--arrow-offset`)},TM=e=>e===`top`||e===`bottom`?`y`:`x`;function EM(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=TM(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,ee=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(wM.transformOrigin.variable,ee?C:S),{data:{transformOrigin:ee?C:S}}}}}var DM={name:`rects`,fn({rects:e}){return{data:e}}},OM=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${wM.arrowOffset.reference})`}),{}}}};function kM(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}var AM={strategy:`absolute`,placement:`bottom`,listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function jM(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function MM(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function NM(e,t,n){return _M({element:e||t.createElement(`div`),padding:n.arrowPadding})}function PM(e,t){if(!RD(t.offset??t.gutter))return fM(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=kM(n),s=o?void 0:t.shift;return uO({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function FM(e){if(!e.flip)return;let t=MM(e.boundary);return mM({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function IM(e){if(!e.slide&&!e.overlap)return;let t=MM(e.boundary);return pM({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:vM()})}function LM(e){return hM({padding:e.overflowPadding,apply({elements:e,rects:t,availableHeight:n,availableWidth:r}){let i=e.floating,a=Math.round(t.reference.width),o=Math.round(t.reference.height);r=Math.floor(r),n=Math.floor(n),i.style.setProperty(`--reference-width`,`${a}px`),i.style.setProperty(`--reference-height`,`${o}px`),i.style.setProperty(`--available-width`,`${r}px`),i.style.setProperty(`--available-height`,`${n}px`)}})}function RM(e){if(e.hideWhenDetached)return gM({strategy:`referenceHidden`,boundary:MM(e.boundary)??`clippingAncestors`})}function zM(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function BM(e,t,n={}){let r=SM(e,n.getAnchorRect);if(!t||!r)return;let i=Object.assign({},AM,n),a=t.querySelector(`[data-part=arrow]`),o=[PM(a,i),FM(i),IM(i),NM(a,t.ownerDocument,i),OM(a),EM({gutter:i.gutter,offset:i.offset,overlap:i.overlap},a),LM(i),RM(i),DM],{placement:s,strategy:c,onComplete:l,onPositioned:u}=i,d=async()=>{if(!r||!t)return;let e=await yM(r,t,{placement:s,middleware:o,strategy:c});l?.(e),u?.({placed:!0});let n=TO(t),a=jM(n,e.x),d=jM(n,e.y);t.style.setProperty(`--x`,`${a}px`),t.style.setProperty(`--y`,`${d}px`),i.hideWhenDetached&&(e.middlewareData.hide?.referenceHidden?(t.style.setProperty(`visibility`,`hidden`),t.style.setProperty(`pointer-events`,`none`)):(t.style.removeProperty(`visibility`),t.style.removeProperty(`pointer-events`)));let f=t.firstElementChild;if(f){let e=OO(f);t.style.setProperty(`--z-index`,e.zIndex)}},f=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:d,floatingElement:t}),u?.({placed:!0})):await d()},p=zM(i.listeners),m=i.listeners?dM(r,t,f,p):Loe;return f(),()=>{m?.(),u?.({placed:!1})}}function VM(e,t,n={}){let{defer:r,...i}=n,a=r?ek:e=>e(),o=[];return o.push(a(()=>{let n=typeof e==`function`?e():e,r=typeof t==`function`?t():t;o.push(BM(n,r,i))})),()=>{o.forEach(e=>e?.())}}var HM={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function UM(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:wM.arrowSize.reference,height:wM.arrowSize.reference,[wM.arrowSizeHalf.variable]:`calc(${wM.arrowSize.reference} / 2)`,[wM.arrowOffset.variable]:`calc(${wM.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?HM[t.split(`-`)[0]]:void 0,background:wM.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}function WM(e){let t={each(t){for(let n=0;n{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function GM(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var KM=`pointerdown.outside`,qM=`focus.outside`;function JM(e){for(let t of e)if(vO(t)&&XO(t))return!0;return!1}var YM=e=>`clientY`in e;function XM(e,t){if(!YM(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function ZM(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function QM(e,t){if(!t||!YM(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return ZM({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function $M(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o}=t;if(!e)return;let s=wO(e),c=TO(e),l=WM(c),u=GM(c);function d(t,r){if(!vO(r)||!r.isConnected||CO(e,r)||XM(e,t))return!1;let i=s.querySelector(`[aria-controls="${e.id}"]`);return i&&QM(t,nk(i))||QM(t,nk(e))?!1:!n?.(r)}let f=new Set,p=xO(e?.getRootNode());function m(t){function n(n){let r=o&&!jO()?ek:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=p?c[0]:FO(t);if(!(!e||!d(t,n))){if(i||a){let t=VD(i,a);e.addEventListener(KM,t,{once:!0})}tN(e,KM,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:Tse(s),focusable:JM(c),target:n}})}})}t.pointerType===`touch`?(f.forEach(e=>e()),f.add(HO(s,`click`,n,{once:!0})),f.add(u.addEventListener(`click`,n,{once:!0})),f.add(l.addEventListener(`click`,n,{once:!0}))):n()}let h=new Set,g=setTimeout(()=>{h.add(HO(s,`pointerdown`,m,!0)),h.add(u.addEventListener(`pointerdown`,m,!0)),h.add(l.addEventListener(`pointerdown`,m,!0))},0);function _(t){(o?ek:e=>e())(()=>{let n=FO(t);if(!(!e||!d(t,n))){if(r||a){let t=VD(r,a);e.addEventListener(qM,t,{once:!0})}tN(e,qM,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:XO(n),target:n}})}})}return jO()||(h.add(HO(s,`focusin`,_,!0)),h.add(u.addEventListener(`focusin`,_,!0)),h.add(l.addEventListener(`focusin`,_,!0))),()=>{clearTimeout(g),f.forEach(e=>e()),h.forEach(e=>e())}}function eN(e,t){let{defer:n}=t,r=n?ek:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push($M(n,t))})),()=>{i.forEach(e=>e?.())}}function tN(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function nN(e,t){return HO(wO(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var rN=`layer:request-dismiss`,iN={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(e=>CO(e.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>CO(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(tiN.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty(`--layer-index`,`${t}`),e.node.removeAttribute(`data-nested`),e.node.removeAttribute(`data-has-nested`),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute(`data-nested`,e.type);let n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute(`data-has-nested`,e.type),e.node.style.setProperty(`--nested-layer-count`,`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];oN(e,rN,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),aN(e,rN,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function aN(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function oN(e,t,n){e.addEventListener(t,n,{once:!0})}var sN;function cN(){iN.layers.forEach(({node:e})=>{e.style.pointerEvents=iN.isBelowPointerBlockingLayer(e)?`none`:`auto`})}function lN(e){e.style.pointerEvents=``}function uN(e,t){let n=wO(e),r=[];return iN.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(sN=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents=`none`,n.body.setAttribute(`data-inert`,``)})),t?.forEach(e=>{let[t,n]=oce(()=>{let t=e();return vO(t)?t:null},{timeout:1e3});t.then(e=>r.push(pk(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{iN.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=sN,n.body.removeAttribute(`data-inert`),n.body.style.length===0&&n.body.removeAttribute(`style`)}),r.forEach(e=>e()))}}function dN(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){dO("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`}=t,l={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i};iN.add(l),cN();function u(n){let i=FO(n.detail.originalEvent);iN.isBelowPointerBlockingLayer(e)||iN.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function d(e){let n=FO(e.detail.originalEvent);iN.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function f(n){iN.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function p(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(vO);return a&&i.push(...a),i.some(e=>CO(e,n))||iN.isInNestedLayer(e,n)}let m=[a?uN(e,t.persistentElements):void 0,nN(e,f),eN(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{iN.remove(e),cN(),lN(e),m.forEach(e=>e?.())}}function fN(e,t){let{defer:n}=t,r=n?ek:e=>e(),i=[];return i.push(r(()=>{let n=LD(e)?e():e;i.push(dN(n,t))})),()=>{i.forEach(e=>e?.())}}var pN=Nk(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`).build(),mN=e=>new dA(e);mN.empty=()=>new dA({items:[]});var hN=e=>e.ids?.root??`select:${e.id}`,gN=e=>e.ids?.content??`select:${e.id}:content`,_N=e=>e.ids?.trigger??`select:${e.id}:trigger`,vN=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,yN=e=>e.ids?.label??`select:${e.id}:label`,bN=e=>e.ids?.control??`select:${e.id}:control`,xN=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,SN=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,CN=e=>e.ids?.positioner??`select:${e.id}:positioner`,wN=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,TN=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,EN=e=>e.getById(SN(e)),DN=e=>e.getById(gN(e)),ON=e=>e.getById(_N(e)),kN=e=>e.getById(vN(e)),AN=e=>e.getById(CN(e)),jN=(e,t)=>t==null?null:e.getById(xN(e,t));function MN(e,t){let{context:n,prop:r,scope:i,state:a,computed:o,send:s}=e,c=r(`disabled`)||n.get(`fieldsetDisabled`),l=!!r(`invalid`),u=!!r(`required`),d=!!r(`readOnly`),f=r(`composite`),p=r(`collection`),m=a.hasTag(`open`),h=a.matches(`focused`),g=n.get(`highlightedValue`),_=n.get(`highlightedItem`),v=n.get(`selectedItems`),y=n.get(`currentPlacement`),b=o(`isTypingAhead`),x=o(`isInteractive`),S=g?xN(i,g):void 0;function C(e){let t=p.getItemDisabled(e.item),r=p.getItemValue(e.item);return fO(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(c||t),highlighted:g===r,selected:n.get(`value`).includes(r)}}let ee=UM({...r(`positioning`),placement:y});return{open:m,focused:h,empty:n.get(`value`).length===0,highlightedItem:_,highlightedValue:g,selectedItems:v,hasSelectedItems:o(`hasSelectedItems`),value:n.get(`value`),valueAsString:o(`valueAsString`),collection:p,multiple:!!r(`multiple`),disabled:!!c,reposition(e={}){s({type:`POSITIONING.SET`,options:e})},focus(){ON(i)?.focus({preventScroll:!0})},setOpen(e){a.hasTag(`open`)!==e&&s({type:e?`OPEN`:`CLOSE`})},selectValue(e){s({type:`ITEM.SELECT`,value:e})},setValue(e){s({type:`VALUE.SET`,value:e})},selectAll(){s({type:`VALUE.SET`,value:p.getValues()})},setHighlightValue(e){s({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){s({type:`HIGHLIGHTED_VALUE.CLEAR`})},clearValue(e){s(e?{type:`ITEM.CLEAR`,value:e}:{type:`VALUE.CLEAR`})},getItemState:C,getRootProps(){return t.element({...pN.root.attrs,dir:r(`dir`),id:hN(i),"data-invalid":q(l),"data-readonly":q(d)})},getLabelProps(){return t.label({dir:r(`dir`),id:yN(i),...pN.label.attrs,"data-disabled":q(c),"data-invalid":q(l),"data-readonly":q(d),"data-required":q(u),htmlFor:SN(i),onClick(e){e.defaultPrevented||c||ON(i)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...pN.control.attrs,dir:r(`dir`),id:bN(i),"data-state":m?`open`:`closed`,"data-focus":q(h),"data-disabled":q(c),"data-invalid":q(l)})},getValueTextProps(){return t.element({...pN.valueText.attrs,dir:r(`dir`),"data-disabled":q(c),"data-invalid":q(l),"data-focus":q(h)})},getTriggerProps(){return t.button({id:_N(i),disabled:c,dir:r(`dir`),type:`button`,role:`combobox`,"aria-controls":gN(i),"aria-expanded":m,"aria-haspopup":`listbox`,"data-state":m?`open`:`closed`,"aria-invalid":l,"aria-labelledby":yN(i),...pN.trigger.attrs,"data-disabled":q(c),"data-invalid":q(l),"data-readonly":q(d),"data-placement":y,"data-placeholder-shown":q(!o(`hasSelectedItems`)),onClick(e){x&&(e.defaultPrevented||s({type:`TRIGGER.CLICK`}))},onFocus(){s({type:`TRIGGER.FOCUS`})},onBlur(){s({type:`TRIGGER.BLUR`})},onKeyDown(e){if(e.defaultPrevented||!x)return;let t={ArrowUp(){s({type:`TRIGGER.ARROW_UP`})},ArrowDown(e){s({type:e.altKey?`OPEN`:`TRIGGER.ARROW_DOWN`})},ArrowLeft(){s({type:`TRIGGER.ARROW_LEFT`})},ArrowRight(){s({type:`TRIGGER.ARROW_RIGHT`})},Home(){s({type:`TRIGGER.HOME`})},End(){s({type:`TRIGGER.END`})},Enter(){s({type:`TRIGGER.ENTER`})},Space(e){s(b?{type:`TRIGGER.TYPEAHEAD`,key:e.key}:{type:`TRIGGER.ENTER`})}}[zO(e,{dir:r(`dir`),orientation:`vertical`})];if(t){t(e),e.preventDefault();return}mk.isValidEvent(e)&&(s({type:`TRIGGER.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getIndicatorProps(){return t.element({...pN.indicator.attrs,dir:r(`dir`),"aria-hidden":!0,"data-state":m?`open`:`closed`,"data-disabled":q(c),"data-invalid":q(l),"data-readonly":q(d)})},getItemProps(n){let a=C(n);return t.element({id:xN(i,a.value),role:`option`,...pN.item.attrs,dir:r(`dir`),"data-value":a.value,"aria-selected":a.selected,"data-state":a.selected?`checked`:`unchecked`,"data-highlighted":q(a.highlighted),"data-disabled":q(a.disabled),"aria-disabled":_O(a.disabled),onPointerMove(e){a.disabled||e.pointerType!==`mouse`||a.value!==g&&s({type:`ITEM.POINTER_MOVE`,value:a.value})},onClick(e){e.defaultPrevented||a.disabled||s({type:`ITEM.CLICK`,src:`pointerup`,value:a.value})},onPointerLeave(t){a.disabled||n.persistFocus||t.pointerType!==`mouse`||!e.event.previous()?.type.includes(`POINTER`)||s({type:`ITEM.POINTER_LEAVE`})}})},getItemTextProps(e){let n=C(e);return t.element({...pN.itemText.attrs,"data-state":n.selected?`checked`:`unchecked`,"data-disabled":q(n.disabled),"data-highlighted":q(n.highlighted)})},getItemIndicatorProps(e){let n=C(e);return t.element({"aria-hidden":!0,...pN.itemIndicator.attrs,"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...pN.itemGroupLabel.attrs,id:TN(i,n),dir:r(`dir`),role:`presentation`})},getItemGroupProps(e){let{id:n}=e;return t.element({...pN.itemGroup.attrs,"data-disabled":q(c),id:wN(i,n),"aria-labelledby":TN(i,n),role:`group`,dir:r(`dir`)})},getClearTriggerProps(){return t.button({...pN.clearTrigger.attrs,id:vN(i),type:`button`,"aria-label":`Clear value`,"data-invalid":q(l),disabled:c,hidden:!o(`hasSelectedItems`),dir:r(`dir`),onClick(e){e.defaultPrevented||s({type:`CLEAR.CLICK`})}})},getHiddenSelectProps(){let e=n.get(`value`),a=r(`multiple`)?e:e?.[0];return t.select({name:r(`name`),form:r(`form`),disabled:c,multiple:r(`multiple`),required:r(`required`),"aria-hidden":!0,id:SN(i),defaultValue:a,style:hk,tabIndex:-1,onFocus(){ON(i)?.focus({preventScroll:!0})},"aria-labelledby":yN(i)})},getPositionerProps(){return t.element({...pN.positioner.attrs,dir:r(`dir`),id:CN(i),style:ee.floating})},getContentProps(){return t.element({hidden:!m,dir:r(`dir`),id:gN(i),role:f?`listbox`:`dialog`,...pN.content.attrs,"data-state":m?`open`:`closed`,"data-placement":y,"data-activedescendant":S,"aria-activedescendant":f?S:void 0,"aria-multiselectable":r(`multiple`)&&f?!0:void 0,"aria-labelledby":yN(i),tabIndex:0,onKeyDown(e){if(!x||!CO(e.currentTarget,FO(e)))return;if(e.key===`Tab`&&!Bse(e)){e.preventDefault();return}let t={ArrowUp(){s({type:`CONTENT.ARROW_UP`})},ArrowDown(){s({type:`CONTENT.ARROW_DOWN`})},Home(){s({type:`CONTENT.HOME`})},End(){s({type:`CONTENT.END`})},Enter(){s({type:`ITEM.CLICK`,src:`keydown.enter`})},Space(e){b?s({type:`CONTENT.TYPEAHEAD`,key:e.key}):t.Enter?.(e)}},n=t[zO(e)];if(n){n(e),e.preventDefault();return}dse(FO(e))||mk.isValidEvent(e)&&(s({type:`CONTENT.TYPEAHEAD`,key:e.key}),e.preventDefault())}})},getListProps(){return t.element({...pN.list.attrs,tabIndex:0,role:f?void 0:`listbox`,"aria-labelledby":_N(i),"aria-activedescendant":f?void 0:S,"aria-multiselectable":!f&&r(`multiple`)?!0:void 0})}}}var{and:NN,not:PN,or:FN}=yk(),IN={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??mN.empty(),positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:MD,onChange(t){let n=e(`collection`).findMany(t);return e(`onValueChange`)?.({value:t,items:n})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:e(`collection`).find(t),highlightedIndex:e(`collection`).indexOf(t)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{let t=e(`value`)??e(`defaultValue`)??[];return{defaultValue:e(`collection`).findMany(t)}})}},refs(){return{typeahead:{...mk.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get(`value`).length>0,isTypingAhead:({refs:e})=>e.get(`typeahead`).keysSoFar!==``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||!!t.get(`fieldsetDisabled`),isInteractive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),valueAsString:({context:e,prop:t})=>t(`collection`).stringifyItems(e.get(`selectedItems`))},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},entry:[`syncSelectElement`],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get(`value`).toString()],()=>{r([`syncSelectedItems`,`syncSelectElement`,`dispatchChangeEvent`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`])}),n([()=>t(`collection`).toString()],()=>{r([`syncCollection`])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedItem`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setSelectedItems`]},"VALUE.CLEAR":{actions:[`clearSelectedItems`]},"CLEAR.CLICK":{actions:[`clearSelectedItems`,`focusTriggerEl`]}},effects:[`trackFormControlState`],states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{target:`open`,actions:[`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`,`highlightFirstSelectedItem`]}],"TRIGGER.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":[{guard:`isTriggerClickEvent`,target:`open`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`]},{guard:`isTriggerArrowUpEvent`,target:`open`,actions:[`setInitialFocus`,`highlightComputedLastItem`]},{guard:FN(`isTriggerArrowDownEvent`,`isTriggerEnterEvent`),target:`open`,actions:[`setInitialFocus`,`highlightComputedFirstItem`]},{target:`open`,actions:[`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`]}],"TRIGGER.BLUR":{target:`idle`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightFirstSelectedItem`]}],"TRIGGER.ENTER":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_UP":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedLastItem`]}],"TRIGGER.ARROW_DOWN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitialFocus`,`invokeOnOpen`,`highlightComputedFirstItem`]}],"TRIGGER.ARROW_LEFT":[{guard:NN(PN(`multiple`),`hasSelectedItems`),actions:[`selectPreviousItem`]},{guard:PN(`multiple`),actions:[`selectLastItem`]}],"TRIGGER.ARROW_RIGHT":[{guard:NN(PN(`multiple`),`hasSelectedItems`),actions:[`selectNextItem`]},{guard:PN(`multiple`),actions:[`selectFirstItem`]}],"TRIGGER.HOME":{guard:PN(`multiple`),actions:[`selectFirstItem`]},"TRIGGER.END":{guard:PN(`multiple`),actions:[`selectLastItem`]},"TRIGGER.TYPEAHEAD":{guard:PN(`multiple`),actions:[`selectMatchingItem`]}}},open:{tags:[`open`],exit:[`scrollContentToTop`],effects:[`trackDismissableElement`,`computePlacement`,`scrollToHighlightedItem`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`focused`,actions:[`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`clearHighlightedItem`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`restoreFocus`,target:`focused`,actions:[`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{target:`idle`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`,`clearHighlightedItem`]}],"ITEM.CLICK":[{guard:NN(`closeOnSelect`,`isOpenControlled`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`focusTriggerEl`,`clearHighlightedItem`]},{actions:[`selectHighlightedItem`]}],"CONTENT.HOME":{actions:[`highlightFirstItem`]},"CONTENT.END":{actions:[`highlightLastItem`]},"CONTENT.ARROW_DOWN":[{guard:NN(`hasHighlightedItem`,`loop`,`isLastItemHighlighted`),actions:[`highlightFirstItem`]},{guard:`hasHighlightedItem`,actions:[`highlightNextItem`]},{actions:[`highlightFirstItem`]}],"CONTENT.ARROW_UP":[{guard:NN(`hasHighlightedItem`,`loop`,`isFirstItemHighlighted`),actions:[`highlightLastItem`]},{guard:`hasHighlightedItem`,actions:[`highlightPreviousItem`]},{actions:[`highlightLastItem`]}],"CONTENT.TYPEAHEAD":{actions:[`highlightMatchingItem`]},"ITEM.POINTER_MOVE":{actions:[`highlightItem`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedItem`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{loop:({prop:e})=>!!e(`loopFocus`),multiple:({prop:e})=>!!e(`multiple`),hasSelectedItems:({computed:e})=>!!e(`hasSelectedItems`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get(`highlightedValue`)===t(`collection`).lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e(`closeOnSelect`)),restoreFocus:({event:e})=>LN(e),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.CLICK`,isTriggerEnterEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ENTER`,isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_UP`,isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type===`TRIGGER.ARROW_DOWN`},effects:{trackFormControlState({context:e,scope:t}){return JO(EN(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){let t=e.initial(`value`);e.set(`value`,t)}})},trackDismissableElement({scope:e,send:t,prop:n}){let r=()=>DN(e),i=!0;return fN(r,{type:`listbox`,defer:!0,exclude:[ON(e),kN(e)],onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onInteractOutside(e){n(`onInteractOutside`)?.(e),i=!(e.detail.focusable||e.detail.contextmenu)},onDismiss(){t({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},computePlacement({context:e,prop:t,scope:n}){let r=t(`positioning`);return e.set(`currentPlacement`,r.placement),VM(()=>ON(n),()=>AN(n),{defer:!0,...r,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:r}){let i=i=>{let a=e.get(`highlightedValue`);if(a==null||r.current().type.includes(`POINTER`))return;let o=DN(n),s=t(`scrollToIndexFn`);if(s){let e=t(`collection`).indexOf(a);s?.({index:e,immediate:i,getElement:()=>jN(n,a)});return}Gse(jN(n,a),{rootEl:o,block:`nearest`})};return ek(()=>i(!0)),tk(()=>DN(n),{defer:!0,attributes:[`data-activedescendant`],callback(){i(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){VM(ON(n),()=>AN(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})},highlightPreviousItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getPreviousValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightNextItem({context:e,prop:t}){let n=e.get(`highlightedValue`);if(n==null)return;let r=t(`collection`).getNextValue(n,1,t(`loopFocus`));r!=null&&e.set(`highlightedValue`,r)},highlightFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;e.set(`highlightedValue`,n)},highlightLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;e.set(`highlightedValue`,n)},setInitialFocus({scope:e}){ek(()=>{QO({root:DN(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){LN(e)&&ek(()=>{ON(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get(`highlightedValue`);r==null||!t(`collection`).has(r)||(t(`onSelect`)?.({value:r}),r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(r)?null:r,e.set(`value`,e=>r==null?[]:t(`multiple`)?kD(e,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.firstValue;e.set(`highlightedValue`,i)},highlightComputedLastItem({context:e,prop:t,computed:n}){let r=t(`collection`),i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue;e.set(`highlightedValue`,i)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n(`hasSelectedItems`))return;let r=t(`collection`).sort(e.get(`value`))[0];e.set(`highlightedValue`,r)},highlightItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`highlightedValue`)});i!=null&&e.set(`highlightedValue`,i)},setHighlightedItem({context:e,event:t}){e.set(`highlightedValue`,t.value)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},selectItem({context:e,prop:t,event:n}){t(`onSelect`)?.({value:n.value});let r=t(`deselectable`)&&!t(`multiple`)&&e.get(`value`).includes(n.value)?null:n.value;e.set(`value`,e=>r==null?[]:t(`multiple`)?kD(e,r):[r])},clearItem({context:e,event:t}){e.set(`value`,e=>e.filter(e=>e!==t.value))},setSelectedItems({context:e,event:t}){e.set(`value`,t.value)},clearSelectedItems({context:e}){e.set(`value`,[])},selectPreviousItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getPreviousValue(n);r&&e.set(`value`,[r])},selectNextItem({context:e,prop:t}){let[n]=e.get(`value`),r=t(`collection`).getNextValue(n);r&&e.set(`value`,[r])},selectFirstItem({context:e,prop:t}){let n=t(`collection`).firstValue;n&&e.set(`value`,[n])},selectLastItem({context:e,prop:t}){let n=t(`collection`).lastValue;n&&e.set(`value`,[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){let i=t(`collection`).search(n.key,{state:r.get(`typeahead`),currentValue:e.get(`value`)[0]});i!=null&&e.set(`value`,[i])},scrollContentToTop({prop:e,scope:t}){if(e(`scrollToIndexFn`)){let n=e(`collection`).firstValue;e(`scrollToIndexFn`)?.({index:0,immediate:!0,getElement:()=>jN(t,n)})}else DN(t)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){let r=EN(n);if(r){if(e.get(`value`).length===0&&!t(`multiple`)){r.selectedIndex=-1;return}for(let t of r.options)t.selected=e.get(`value`).includes(t.value)}},syncCollection({context:e,prop:t}){let n=t(`collection`),r=n.find(e.get(`highlightedValue`));r&&e.set(`highlightedItem`,r);let i=n.findMany(e.get(`value`));e.set(`selectedItems`,i)},syncSelectedItems({context:e,prop:t}){let n=t(`collection`),r=e.get(`selectedItems`),i=e.get(`value`).map(e=>r.find(t=>n.getItemValue(t)===e)||n.find(e));e.set(`selectedItems`,i)},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`),r=e.get(`highlightedValue`),i=r?n.find(r):null;e.set(`highlightedItem`,i)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{let t=EN(e);if(!t)return;let n=new(e.getWin()).Event(`change`,{bubbles:!0,composed:!0});t.dispatchEvent(n)})}}}};function LN(e){let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}Sk()(`closeOnSelect.collection.composite.defaultHighlightedValue.defaultOpen.defaultValue.deselectable.dir.disabled.form.getRootNode.highlightedValue.id.ids.invalid.loopFocus.multiple.name.onFocusOutside.onHighlightChange.onInteractOutside.onOpenChange.onPointerDownOutside.onSelect.onValueChange.open.positioning.readOnly.required.scrollToIndexFn.value`.split(`.`)),Sk()([`item`,`persistFocus`]),Sk()([`id`]),Sk()([`htmlFor`]);var RN=(e,t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=xD(),o=Ek(IN,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,hiddenSelect:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,invalid:a?.value.invalid,required:a?.value.required,dir:i.value.dir,value:o.modelValue,getRootNode:r?.value.getRootNode,...oA(o),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onHighlightChange:e=>{t?.(`highlightChange`,e),t?.(`update:highlightedValue`,e.highlightedValue),o.onHighlightChange?.(e)},onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),o.onOpenChange?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),o.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),o.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),o.onPointerDownOutside?.(e)},onSelect(e){t?.(`select`,e),o.onSelect?.(e)}}}));return U(()=>MN(o,wk))},zN=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:mle,Content:hle,Context:gle,Control:_le,HiddenSelect:ble,Indicator:xle,Item:Mle,ItemContext:wle,ItemGroup:Ole,ItemGroupLabel:Dle,ItemIndicator:Ale,ItemText:jle,Label:Nle,List:Ple,Positioner:Lle,Root:M({__name:`select-root`,props:Xi({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:[`focusOutside`,`highlightChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`select`,`valueChange`,`update:modelValue`,`update:open`,`update:highlightedValue`],setup(e,{emit:t}){let n=e,r=RN(n,t);return mA(r),yA(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(e,t)=>(F(),L(k(J).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:Rle,Trigger:M({__name:`select-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=hA();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueText:M({__name:`select-value-text`,props:{placeholder:{},asChild:{type:Boolean}},setup(e){let t=e,n=hA(),r=qi();return Y(),(e,i)=>(F(),L(k(J).span,H(k(n).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(r.default?.()||k(n).valueAsString||t.placeholder),1)])]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),BN={key:0},VN={class:`block text-sm font-medium text-gray-700 mb-1`},HN={class:`flex rounded-lg border border-gray-300 bg-gray-100 p-0.5`},UN=[`data-state`,`onClick`],WN=M({__name:`Select`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=ya(e,`modelValue`),r=U(()=>t.field.variant||`select`),i=U(()=>ple({items:t.field.options?.map(e=>({label:e.label||e.value,value:e.value}))||[]})),a=U({get:()=>n.value?[n.value]:[],set:e=>{n.value=e[0]||null}});return(e,t)=>{let o=cA,s=sle;return r.value===`segment`?(F(),I(`div`,BN,[R(`label`,VN,E(e.field.label),1),R(`div`,HN,[(F(!0),I(P,null,Vi(e.field.options,e=>(F(),I(`button`,{class:`flex-1 h-9 text-center cursor-pointer rounded text-sm data-[state=checked]:bg-white data-[state=checked]:shadow`,"data-state":n.value===e.value?`checked`:`unchecked`,onClick:t=>n.value=e.value},E(e.label||e.value),9,UN))),256))])])):(F(),L(k(zN).Root,{key:1,modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,collection:i.value,positioning:{gutter:2}},{default:j(()=>[z(k(zN).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),z(k(zN).Control,{class:`w-full`},{default:j(()=>[z(k(zN).Trigger,{class:`flex items-center justify-between w-full px-3 py-2 border border-gray-300 rounded-md bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent`},{default:j(()=>[z(k(zN).ValueText,{class:`text-sm text-gray-900`,placeholder:e.field.placeholder||`Select an option...`},null,8,[`placeholder`]),z(k(zN).Indicator,{class:`ml-2`},{default:j(()=>[z(o,{class:`w-4 h-4 text-gray-400`})]),_:1})]),_:1})]),_:1}),(F(),L(Tr,{to:`.__craftile`},[z(k(zN).Positioner,{class:`w-[var(--reference-width)]`},{default:j(()=>[z(k(zN).Content,{class:`bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto z-50`},{default:j(()=>[(F(!0),I(P,null,Vi(i.value.items,e=>(F(),L(k(zN).Item,{key:e.value,item:e,class:`flex items-center px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 cursor-pointer data-[state=checked]:bg-accent-foreground data-[state=checked]:text-accent`},{default:j(()=>[z(k(zN).ItemText,null,{default:j(()=>[B(E(e.label),1)]),_:2},1024),z(k(zN).ItemIndicator,{class:`ml-auto`},{default:j(()=>[z(s,{class:`w-4 h-4 text-accent`})]),_:1})]),_:2},1032,[`item`]))),128))]),_:1})]),_:1})]))]),_:1},8,[`modelValue`,`collection`]))}}}),[GN,KN]=yD(`RadioGroupContext`),qN=M({__name:`radio-group-context`,setup(e){let t=KN();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),JN=M({__name:`radio-group-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=KN();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[YN,XN]=yD(`RadioGroupItemContext`),ZN=M({__name:`radio-group-item-context`,setup(e){let t=XN();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[QN,$N]=yD(`RadioGroupItemPropsContext`),eP=M({__name:`radio-group-item-control`,props:{asChild:{type:Boolean}},setup(e){let t=KN(),n=$N();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getItemControlProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),tP=M({__name:`radio-group-item-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=KN(),n=$N();return Y(),(e,r)=>(F(),L(k(J).input,H(k(t).getItemHiddenInputProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),nP=M({__name:`radio-group-item-text`,props:{asChild:{type:Boolean}},setup(e){let t=KN(),n=$N();return Y(),(e,r)=>(F(),L(k(J).span,H(k(t).getItemTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),rP=M({__name:`radio-group-item`,props:{value:{},disabled:{type:Boolean},invalid:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=KN();return QN(t),YN(U(()=>n.value.getItemState(t))),Y(),(e,r)=>(F(),L(k(J).label,H(k(n).getItemProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),iP=M({__name:`radio-group-label`,props:{asChild:{type:Boolean}},setup(e){let t=KN();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),aP=M({__name:`radio-group-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return GN(n),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),oP=Nk(`radio-group`).parts(`root`,`label`,`item`,`itemText`,`itemControl`,`indicator`).build(),sP=e=>e.ids?.root??`radio-group:${e.id}`,cP=e=>e.ids?.label??`radio-group:${e.id}:label`,lP=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,uP=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,dP=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,fP=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,pP=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,mP=e=>e.getById(sP(e)),hP=(e,t)=>e.getById(uP(e,t)),gP=e=>e.getById(pP(e)),_P=e=>mP(e)?.querySelector(`input:not(:disabled)`),vP=e=>mP(e)?.querySelector(`input:not(:disabled):checked`),yP=e=>{let t=`input[type=radio][data-ownedby='${CSS.escape(sP(e))}']:not([disabled])`;return uk(mP(e),t)},bP=(e,t)=>{if(t)return e.getById(lP(e,t))},xP=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),SP=e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`});function CP(e,t){let{context:n,send:r,computed:i,prop:a,scope:o,refs:s}=e,c=i(`isDisabled`),l=a(`readOnly`);function u(e){return{value:e.value,invalid:!!e.invalid,disabled:!!e.disabled||c,checked:n.get(`value`)===e.value,focused:n.get(`focusedValue`)===e.value,focusVisible:s.get(`focusVisibleValue`)===e.value,hovered:n.get(`hoveredValue`)===e.value,active:n.get(`activeValue`)===e.value}}function d(e){let t=u(e);return{"data-focus":q(t.focused),"data-focus-visible":q(t.focusVisible),"data-disabled":q(t.disabled),"data-readonly":q(l),"data-state":t.checked?`checked`:`unchecked`,"data-hover":q(t.hovered),"data-invalid":q(t.invalid),"data-orientation":a(`orientation`),"data-ssr":q(n.get(`ssr`))}}let f=()=>{(vP(o)??_P(o))?.focus()};return{focus:f,value:n.get(`value`),setValue(e){r({type:`SET_VALUE`,value:e,isTrusted:!1})},clearValue(){r({type:`SET_VALUE`,value:null,isTrusted:!1})},getRootProps(){return t.element({...oP.root.attrs,role:`radiogroup`,id:sP(o),"aria-labelledby":cP(o),"data-orientation":a(`orientation`),"data-disabled":q(c),"aria-orientation":a(`orientation`),dir:a(`dir`),style:{position:`relative`}})},getLabelProps(){return t.element({...oP.label.attrs,dir:a(`dir`),"data-orientation":a(`orientation`),"data-disabled":q(c),id:cP(o),onClick:f})},getItemState:u,getItemProps(e){let n=u(e);return t.label({...oP.item.attrs,dir:a(`dir`),id:lP(o,e.value),htmlFor:uP(o,e.value),...d(e),onPointerMove(){n.disabled||n.hovered||r({type:`SET_HOVERED`,value:e.value,hovered:!0})},onPointerLeave(){n.disabled||r({type:`SET_HOVERED`,value:null})},onPointerDown(t){n.disabled||IO(t)&&(n.focused&&t.pointerType===`mouse`&&t.preventDefault(),r({type:`SET_ACTIVE`,value:e.value,active:!0}))},onPointerUp(){n.disabled||r({type:`SET_ACTIVE`,value:null})},onClick(){!n.disabled&&PO()&&hP(o,e.value)?.focus()}})},getItemTextProps(e){return t.element({...oP.itemText.attrs,dir:a(`dir`),id:fP(o,e.value),...d(e)})},getItemControlProps(e){let n=u(e);return t.element({...oP.itemControl.attrs,dir:a(`dir`),id:dP(o,e.value),"data-active":q(n.active),"aria-hidden":!0,...d(e)})},getItemHiddenInputProps(e){let n=u(e);return t.input({"data-ownedby":sP(o),id:uP(o,e.value),type:`radio`,name:a(`name`)||a(`id`),form:a(`form`),value:e.value,onClick(t){if(l){t.preventDefault();return}t.currentTarget.checked&&r({type:`SET_VALUE`,value:e.value,isTrusted:!0})},onBlur(){r({type:`SET_FOCUSED`,value:null,focused:!1})},onFocus(){let t=Xk();r({type:`SET_FOCUSED`,value:e.value,focused:!0,focusVisible:t})},onKeyDown(t){t.defaultPrevented||t.key===` `&&r({type:`SET_ACTIVE`,value:e.value,active:!0})},onKeyUp(e){e.defaultPrevented||e.key===` `&&r({type:`SET_ACTIVE`,value:null})},disabled:n.disabled||l,defaultChecked:n.checked,style:hk})},getIndicatorProps(){let e=n.get(`indicatorRect`);return t.element({id:pP(o),...oP.indicator.attrs,dir:a(`dir`),hidden:n.get(`value`)==null,"data-disabled":q(c),"data-orientation":a(`orientation`),style:{"--transition-property":`left, top, width, height`,"--left":e?.left,"--top":e?.top,"--width":e?.width,"--height":e?.height,position:`absolute`,willChange:`var(--transition-property)`,transitionProperty:`var(--transition-property)`,transitionDuration:n.get(`canIndicatorTransition`)?`var(--transition-duration, 150ms)`:`0ms`,transitionTimingFunction:`var(--transition-timing-function)`,[a(`orientation`)===`horizontal`?`left`:`top`]:a(`orientation`)===`horizontal`?`var(--left)`:`var(--top)`}})}}}var{not:wP}=yk(),TP={props({props:e}){return{orientation:`vertical`,...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:{}})),canIndicatorTransition:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`)},entry:[`syncIndicatorRect`,`syncSsr`],exit:[`cleanupObserver`],effects:[`trackFormControlState`,`trackFocusVisible`],watch({track:e,action:t,context:n}){e([()=>n.get(`value`)],()=>{t([`setIndicatorTransition`,`syncIndicatorRect`,`syncInputElements`])})},on:{SET_VALUE:[{guard:wP(`isTrusted`),actions:[`setValue`,`dispatchChangeEvent`]},{actions:[`setValue`]}],SET_HOVERED:{actions:[`setHovered`]},SET_ACTIVE:{actions:[`setActive`]},SET_FOCUSED:{actions:[`setFocused`]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return JO(mP(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackFocusVisible({scope:e}){return Zk({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set(`value`,t.value)},setHovered({context:e,event:t}){e.set(`hoveredValue`,t.value)},setActive({context:e,event:t}){e.set(`activeValue`,t.value)},setFocused({context:e,event:t,refs:n}){e.set(`focusedValue`,t.value),n.set(`focusVisibleValue`,t.focusVisible?t.value:null)},syncInputElements({context:e,scope:t}){yP(t).forEach(t=>{t.checked=t.value===e.get(`value`)})},setIndicatorTransition({context:e}){e.set(`canIndicatorTransition`,ID(e.get(`value`)))},cleanupObserver({refs:e}){e.get(`indicatorCleanup`)?.()},syncSsr({context:e}){e.set(`ssr`,!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get(`indicatorCleanup`)?.(),!gP(t))return;let r=e.get(`value`),i=bP(t,r);if(r==null||!i){e.set(`canIndicatorTransition`,!1),e.set(`indicatorRect`,{});return}let a=fk([i],{measure(e){return xP(e)},onEntry({rects:t}){e.set(`indicatorRect`,SP(t[0]))}});n.set(`indicatorCleanup`,a)},dispatchChangeEvent({context:e,scope:t}){yP(t).forEach(t=>{let n=t.value===e.get(`value`);n!==t.checked&&qO(t,{checked:n})})}}}};Sk()([`dir`,`disabled`,`form`,`getRootNode`,`id`,`ids`,`name`,`onValueChange`,`orientation`,`readOnly`,`value`,`defaultValue`]),Sk()([`value`,`disabled`,`invalid`]);var EP=(e={},t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=Ek(TP,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...oA(a),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a.onValueChange?.(e)}}}));return U(()=>CP(a,wk))},DP=Object.freeze(Object.defineProperty({__proto__:null,Context:qN,Indicator:JN,Item:rP,ItemContext:ZN,ItemControl:eP,ItemHiddenInput:tP,ItemText:nP,Label:iP,Root:M({__name:`radio-group-root`,props:Xi({defaultValue:{},disabled:{type:Boolean},form:{},id:{},ids:{},modelValue:{},name:{},orientation:{},readOnly:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0}),emits:[`valueChange`,`update:modelValue`],setup(e,{emit:t}){let n=EP(e,t);return GN(n),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:aP},Symbol.toStringTag,{value:`Module`})),OP=M({__name:`Radio`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`);return(e,n)=>(F(),L(k(DP).Root,{modelValue:t.value,"onUpdate:modelValue":n[0]||=e=>t.value=e,class:`relative gap-1 flex flex-col`},{default:j(()=>[z(k(DP).Label,{class:`text-sm font-medium text-gray-700`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),(F(!0),I(P,null,Vi(e.field.options,e=>(F(),L(k(DP).Item,{key:e.value,value:e.value,class:`flex items-center gap-2 cursor-pointer`},{default:j(()=>[z(k(DP).Indicator),z(k(DP).ItemControl,{class:`w-4 h-4 border border-gray-300 rounded-full data-[state=checked]:border-accent data-[state=checked]:outline-accent data-[state=checked]:outline-4 data-[state=checked]:-outline-offset-8`}),z(k(DP).ItemText,{class:`text-sm text-gray-700`},{default:j(()=>[B(E(e.label||e.value),1)]),_:2},1024),z(k(DP).ItemHiddenInput)]),_:2},1032,[`value`]))),128))]),_:1},8,[`modelValue`]))}}),kP={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function AP(e,t){return F(),I(`svg`,kP,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m4.5 15.75l7.5-7.5l7.5 7.5`},null,-1)]])}var jP=D({name:`heroicons-chevron-up`,render:AP}),[MP,NP]=yD(`SliderContext`),PP=M({__name:`slider-context`,setup(e){let t=NP();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),FP=M({__name:`slider-control`,props:{asChild:{type:Boolean}},setup(e){let t=NP();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[IP,LP]=yD(`SliderThumbPropsContext`),RP=M({__name:`slider-dragging-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=NP(),n=LP(),r=qi();return Y(),(e,i)=>(F(),L(k(J).span,H(k(t).getDraggingIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(r.default?.()||k(t).getThumbValue(k(n).index)),1)])]),_:3},16,[`as-child`]))}}),zP=M({__name:`slider-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=NP(),n=LP();return Y(),(e,r)=>(F(),L(k(J).input,H(k(t).getHiddenInputProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),BP=M({__name:`slider-label`,props:{asChild:{type:Boolean}},setup(e){let t=NP();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),VP=M({__name:`slider-marker-group`,props:{asChild:{type:Boolean}},setup(e){let t=NP();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getMarkerGroupProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),HP=M({__name:`slider-marker`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=NP();return Y(),(e,r)=>(F(),L(k(J).span,H(k(n).getMarkerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),UP=M({__name:`slider-range`,props:{asChild:{type:Boolean}},setup(e){let t=NP();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getRangeProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),WP=M({__name:`slider-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return MP(n),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),GP=Nk(`slider`).parts(`root`,`label`,`thumb`,`valueText`,`track`,`range`,`control`,`markerGroup`,`marker`,`draggingIndicator`).build(),KP=e=>e.ids?.root??`slider:${e.id}`,qP=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,JP=(e,t)=>e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,YP=e=>e.ids?.control??`slider:${e.id}:control`,XP=e=>e.ids?.track??`slider:${e.id}:track`,ZP=e=>e.ids?.range??`slider:${e.id}:range`,QP=e=>e.ids?.label??`slider:${e.id}:label`,$P=e=>e.ids?.valueText??`slider:${e.id}:value-text`,eF=(e,t)=>e.ids?.marker?.(t)??`slider:${e.id}:marker:${t}`,tF=e=>e.getById(KP(e)),nF=(e,t)=>e.getById(qP(e,t)),rF=e=>uk(oF(e),`[role=slider]`),iF=e=>rF(e)[0],aF=(e,t)=>e.getById(JP(e,t)),oF=e=>e.getById(YP(e)),sF=(e,t)=>{let{prop:n,scope:r}=e,i=oF(r);if(i)return QD(ik(t,i).getPercentValue({orientation:n(`orientation`),dir:n(`dir`),inverted:{y:!0}}),n(`min`),n(`max`),n(`step`))},cF=(e,t)=>{t.forEach((t,n)=>{let r=aF(e,n);r&&KO(r,{value:t})})},lF=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function uF(e){return[e[0],e[e.length-1]]}function dF(e){let{prop:t,computed:n}=e,r=n(`valuePercent`),[i,a]=uF(r);if(r.length===1){if(t(`origin`)===`center`){let e=r[0]<50;return{start:e?`${r[0]}%`:`50%`,end:e?`50%`:`${100-r[0]}%`}}return t(`origin`)===`end`?{start:`${a}%`,end:`0%`}:{start:`0%`,end:`${100-a}%`}}return{start:`${i}%`,end:`${100-a}%`}}function fF(e){let{computed:t}=e,n=t(`isVertical`),r=t(`isRtl`);return n?{position:`absolute`,bottom:`var(--slider-range-start)`,top:`var(--slider-range-end)`}:{position:`absolute`,[r?`right`:`left`]:`var(--slider-range-start)`,[r?`left`:`right`]:`var(--slider-range-end)`}}function pF(e,t){let{context:n,prop:r}=e,{height:i=0}=n.get(`thumbSize`)??{},a=aO([r(`min`),r(`max`)],[-i/2,i/2]);return parseFloat(a(t).toFixed(2))}function mF(e,t){let{computed:n,context:r,prop:i}=e,{width:a=0}=r.get(`thumbSize`)??{};if(n(`isRtl`)){let e=aO([i(`max`),i(`min`)],[-a/2,a/2]);return-1*parseFloat(e(t).toFixed(2))}let o=aO([i(`min`),i(`max`)],[-a/2,a/2]);return parseFloat(o(t).toFixed(2))}function hF(e,t,n){let{computed:r,prop:i}=e;return i(`thumbAlignment`)===`center`?`${t}%`:`calc(${t}% - ${r(`isVertical`)?pF(e,n):mF(e,n)}px)`}function gF(e,t){let{prop:n}=e;return hF(e,ZD(t,n(`min`),n(`max`))*100,t)}function _F(e){let{computed:t,prop:n}=e,r=`visible`;return n(`thumbAlignment`)===`contain`&&!t(`hasMeasuredThumbSize`)&&(r=`hidden`),r}function vF(e,t){let{computed:n}=e,r=n(`isVertical`)?`bottom`:`insetInlineStart`;return{visibility:_F(e),position:`absolute`,transform:`var(--slider-thumb-transform)`,[r]:`var(--slider-thumb-offset-${t})`}}function yF(){return{touchAction:`none`,userSelect:`none`,WebkitUserSelect:`none`,position:`relative`}}function bF(e){let{context:t,computed:n}=e,r=n(`isVertical`),i=n(`isRtl`),a=dF(e),o=t.get(`thumbSize`);return{...t.get(`value`).reduce((t,n,r)=>{let i=gF(e,n);return{...t,[`--slider-thumb-offset-${r}`]:i}},{}),"--slider-thumb-width":lO(o?.width),"--slider-thumb-height":lO(o?.height),"--slider-thumb-transform":r?`translateY(50%)`:i?`translateX(50%)`:`translateX(-50%)`,"--slider-range-start":a.start,"--slider-range-end":a.end}}function xF(e,t){let{computed:n}=e,r=n(`isHorizontal`),i=n(`isRtl`);return{visibility:_F(e),position:`absolute`,pointerEvents:`none`,[r?`insetInlineStart`:`bottom`]:gF(e,t),translate:`var(--translate-x) var(--translate-y)`,"--translate-x":r?i?`50%`:`-50%`:`0%`,"--translate-y":r?`0%`:`50%`}}function SF(){return{userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`,position:`relative`}}function CF(e,t){return t.map((t,n)=>TF(e,t,n))}function wF(e,t){let{context:n,prop:r}=e,i=r(`step`)*r(`minStepsBetweenThumbs`);return iO(n.get(`value`),r(`min`),r(`max`),i)[t]}function TF(e,t,n){let{prop:r}=e,i=wF(e,n);return XD(tO(t,r(`min`),r(`max`),r(`step`)),i.min,i.max)}function EF(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=wF(e,a),s=Yoe(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=XD(s[a],o.min,o.max),s}function DF(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=wF(e,a),s=Joe(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=XD(s[a],o.min,o.max),s}function OF(e,t){let{context:n}=e;return Xoe(n.get(`value`),t)}function kF(e,t){let{state:n,send:r,context:i,prop:a,computed:o,scope:s}=e,c=a(`aria-label`),l=a(`aria-labelledby`),u=i.get(`value`),d=i.get(`focusedIndex`),f=n.matches(`focus`),p=n.matches(`dragging`),m=o(`isDisabled`),h=a(`invalid`),g=o(`isInteractive`),_=a(`orientation`)===`horizontal`,v=a(`orientation`)===`vertical`;function y(e){return ZD(e,a(`min`),a(`max`))}function b(e){return QD(e,a(`min`),a(`max`),a(`step`))}return{value:u,dragging:p,focused:f,setValue(e){r({type:`SET_VALUE`,value:e})},getThumbValue(e){return u[e]},setThumbValue(e,t){r({type:`SET_VALUE`,index:e,value:t})},getValuePercent:y,getPercentValue:b,getThumbPercent(e){return y(u[e])},setThumbPercent(e,t){r({type:`SET_VALUE`,index:e,value:b(t)})},getThumbMin(t){return wF(e,t).min},getThumbMax(t){return wF(e,t).max},increment(e){r({type:`INCREMENT`,index:e})},decrement(e){r({type:`DECREMENT`,index:e})},focus(){g&&r({type:`FOCUS`,index:0})},getLabelProps(){return t.label({...GP.label.attrs,dir:a(`dir`),"data-disabled":q(m),"data-orientation":a(`orientation`),"data-invalid":q(h),"data-dragging":q(p),"data-focus":q(f),id:QP(s),htmlFor:JP(s,0),onClick(e){g&&(e.preventDefault(),iF(s)?.focus())},style:{userSelect:`none`,WebkitUserSelect:`none`}})},getRootProps(){return t.element({...GP.root.attrs,"data-disabled":q(m),"data-orientation":a(`orientation`),"data-dragging":q(p),"data-invalid":q(h),"data-focus":q(f),id:KP(s),dir:a(`dir`),style:bF(e)})},getValueTextProps(){return t.element({...GP.valueText.attrs,dir:a(`dir`),"data-disabled":q(m),"data-orientation":a(`orientation`),"data-invalid":q(h),"data-focus":q(f),id:$P(s)})},getTrackProps(){return t.element({...GP.track.attrs,dir:a(`dir`),id:XP(s),"data-disabled":q(m),"data-invalid":q(h),"data-dragging":q(p),"data-orientation":a(`orientation`),"data-focus":q(f),style:{position:`relative`}})},getThumbProps(n){let{index:i=0,name:o}=n,h=u[i],y=wF(e,i),b=a(`getAriaValueText`)?.({value:h,index:i}),x=Array.isArray(c)?c[i]:c,S=Array.isArray(l)?l[i]:l;return t.element({...GP.thumb.attrs,dir:a(`dir`),"data-index":i,"data-name":o,id:qP(s,i),"data-disabled":q(m),"data-orientation":a(`orientation`),"data-focus":q(f&&d===i),"data-dragging":q(p&&d===i),draggable:!1,"aria-disabled":_O(m),"aria-label":x,"aria-labelledby":S??QP(s),"aria-orientation":a(`orientation`),"aria-valuemax":y.max,"aria-valuemin":y.min,"aria-valuenow":u[i],"aria-valuetext":b,role:`slider`,tabIndex:m?void 0:0,style:vF(e,i),onPointerDown(e){g&&IO(e)&&(r({type:`THUMB_POINTER_DOWN`,index:i}),e.stopPropagation())},onBlur(){g&&r({type:`BLUR`})},onFocus(){g&&r({type:`FOCUS`,index:i})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=BO(e)*a(`step`),n={ArrowUp(){_||r({type:`ARROW_INC`,step:t,src:`ArrowUp`})},ArrowDown(){_||r({type:`ARROW_DEC`,step:t,src:`ArrowDown`})},ArrowLeft(){v||r({type:`ARROW_DEC`,step:t,src:`ArrowLeft`})},ArrowRight(){v||r({type:`ARROW_INC`,step:t,src:`ArrowRight`})},PageUp(){r({type:`ARROW_INC`,step:t,src:`PageUp`})},PageDown(){r({type:`ARROW_DEC`,step:t,src:`PageDown`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[zO(e,{dir:a(`dir`),orientation:a(`orientation`)})];n&&(n(e),e.preventDefault(),e.stopPropagation())}})},getHiddenInputProps(e){let{index:n=0,name:r}=e;return t.input({name:r??(a(`name`)?a(`name`)+(u.length>1?`[]`:``):void 0),form:a(`form`),type:`text`,hidden:!0,defaultValue:u[n],id:JP(s,n)})},getRangeProps(){return t.element({id:ZP(s),...GP.range.attrs,dir:a(`dir`),"data-dragging":q(p),"data-focus":q(f),"data-invalid":q(h),"data-disabled":q(m),"data-orientation":a(`orientation`),style:fF(e)})},getControlProps(){return t.element({...GP.control.attrs,dir:a(`dir`),id:YP(s),"data-dragging":q(p),"data-disabled":q(m),"data-orientation":a(`orientation`),"data-invalid":q(h),"data-focus":q(f),style:yF(),onPointerDown(e){!g||!IO(e)||LO(e)||(r({type:`POINTER_DOWN`,point:VO(e)}),e.preventDefault(),e.stopPropagation())}})},getMarkerGroupProps(){return t.element({...GP.markerGroup.attrs,role:`presentation`,dir:a(`dir`),"aria-hidden":!0,"data-orientation":a(`orientation`),style:SF()})},getMarkerProps(n){let r=xF(e,n.value),i;return i=n.valueTD(u)?`over-value`:`at-value`,t.element({...GP.marker.attrs,id:eF(s,n.value),role:`presentation`,dir:a(`dir`),"data-orientation":a(`orientation`),"data-value":n.value,"data-disabled":q(m),"data-state":i,style:r})},getDraggingIndicatorProps(n){let{index:r=0}=n,i=r===d&&p;return t.element({...GP.draggingIndicator.attrs,role:`presentation`,dir:a(`dir`),hidden:!i,"data-orientation":a(`orientation`),"data-state":i?`open`:`closed`,style:vF(e,r)})}}}var AF=(e,t)=>e?.width===t?.width&&e?.height===t?.height,jF=(e,t,n,r,i)=>iO(e,t,n,i*r).map(e=>{let i=XD(tO(e.value,e.min,e.max,r),e.min,e.max);if(!YD(i,t,n))throw Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return i}),MF={props({props:e}){let t=e.min??0,n=e.max??100,r=e.step??1,i=e.defaultValue??[t],a=e.minStepsBetweenThumbs??0;return{dir:`ltr`,thumbAlignment:`contain`,origin:`start`,orientation:`horizontal`,minStepsBetweenThumbs:a,...e,defaultValue:jF(i,t,n,r,a),value:e.value?jF(e.value,t,n,r,a):void 0,max:n,step:r,min:t}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{thumbSize:t(()=>({defaultValue:e(`thumbSize`)||null})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:MD,hash(e){return e.join(`,`)},onChange(t){e(`onValueChange`)?.({value:t})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(t){let r=n();e(`onFocusChange`)?.({focusedIndex:t,value:r.get(`value`)})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`,isVertical:({prop:e})=>e(`orientation`)===`vertical`,isRtl:({prop:e})=>e(`orientation`)===`horizontal`&&e(`dir`)===`rtl`,isDisabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`),isInteractive:({prop:e,computed:t})=>!(e(`readOnly`)||t(`isDisabled`)),hasMeasuredThumbSize:({context:e})=>e.get(`thumbSize`)!=null,valuePercent:vk(({context:e,prop:t})=>[e.get(`value`),t(`min`),t(`max`)],([e,t,n])=>e.map(e=>100*ZD(e,t,n)))},watch({track:e,action:t,context:n}){e([()=>n.hash(`value`)],()=>{t([`syncInputElements`,`dispatchChangeEvent`])})},effects:[`trackFormControlState`,`trackThumbSize`],on:{SET_VALUE:[{guard:`hasIndex`,actions:[`setValueAtIndex`]},{actions:[`setValue`]}],INCREMENT:{actions:[`incrementThumbAtIndex`]},DECREMENT:{actions:[`decrementThumbAtIndex`]}},states:{idle:{on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setPointerValue`,`focusActiveThumb`]},FOCUS:{target:`focus`,actions:[`setFocusedIndex`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`focusActiveThumb`]}}},focus:{entry:[`focusActiveThumb`],on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setPointerValue`,`focusActiveThumb`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`focusActiveThumb`]},ARROW_DEC:{actions:[`decrementThumbAtIndex`,`invokeOnChangeEnd`]},ARROW_INC:{actions:[`incrementThumbAtIndex`,`invokeOnChangeEnd`]},HOME:{actions:[`setFocusedThumbToMin`,`invokeOnChangeEnd`]},END:{actions:[`setFocusedThumbToMax`,`invokeOnChangeEnd`]},BLUR:{target:`idle`,actions:[`clearFocusedIndex`]}}},dragging:{entry:[`focusActiveThumb`],effects:[`trackPointerMove`],on:{POINTER_UP:{target:`focus`,actions:[`invokeOnChangeEnd`]},POINTER_MOVE:{actions:[`setPointerValue`]}}}},implementations:{guards:{hasIndex:({event:e})=>e.index!=null},effects:{trackFormControlState({context:e,scope:t}){return JO(tF(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackPointerMove({scope:e,send:t}){return lk(e.getDoc(),{onPointerMove(e){t({type:`POINTER_MOVE`,point:e.point})},onPointerUp(){t({type:`POINTER_UP`})}})},trackThumbSize({context:e,scope:t,prop:n}){if(!(n(`thumbAlignment`)!==`contain`||n(`thumbSize`)))return fk(rF(t),{box:`border-box`,measure(e){return lF(e)},onEntry({rects:t}){if(t.length===0)return;let n=$oe(t[0],[`width`,`height`]);AF(e.get(`thumbSize`),n)||e.set(`thumbSize`,n)}})}},actions:{dispatchChangeEvent({context:e,scope:t}){cF(t,e.get(`value`))},syncInputElements({context:e,scope:t}){e.get(`value`).forEach((e,n)=>{WO(aF(t,n),e.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e(`onValueChangeEnd`)?.({value:t.get(`value`)})})},setClosestThumbIndex(e){let{context:t,event:n}=e,r=sF(e,n.point);if(r==null)return;let i=OF(e,r);t.set(`focusedIndex`,i)},setFocusedIndex({context:e,event:t}){e.set(`focusedIndex`,t.index)},clearFocusedIndex({context:e}){e.set(`focusedIndex`,-1)},setPointerValue(e){queueMicrotask(()=>{let{context:t,event:n}=e,r=sF(e,n.point);if(r==null)return;let i=t.get(`focusedIndex`),a=TF(e,r,i);t.set(`value`,e=>nO(e,i,a))})},focusActiveThumb({scope:e,context:t}){ek(()=>{nF(e,t.get(`focusedIndex`))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){let{context:t,event:n}=e,r=EF(e,n.index,n.step);t.set(`value`,r)},incrementThumbAtIndex(e){let{context:t,event:n}=e,r=DF(e,n.index,n.step);t.set(`value`,r)},setFocusedThumbToMin(e){let{context:t}=e,n=t.get(`focusedIndex`),{min:r}=wF(e,n);t.set(`value`,e=>nO(e,n,r))},setFocusedThumbToMax(e){let{context:t}=e,n=t.get(`focusedIndex`),{max:r}=wF(e,n);t.set(`value`,e=>nO(e,n,r))},setValueAtIndex(e){let{context:t,event:n}=e,r=TF(e,n.value,n.index);t.set(`value`,e=>nO(e,n.index,r))},setValue(e){let{context:t,event:n}=e,r=CF(e,n.value);t.set(`value`,r)}}}};Sk()(`aria-label.aria-labelledby.dir.disabled.form.getAriaValueText.getRootNode.id.ids.invalid.max.min.minStepsBetweenThumbs.name.onFocusChange.onValueChange.onValueChangeEnd.orientation.origin.readOnly.step.thumbAlignment.thumbAlignment.thumbSize.value.defaultValue`.split(`.`)),Sk()([`index`,`name`]);var NF=(e={},t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=Ek(MF,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...oA(a),onFocusChange:e=>{t?.(`focusChange`,e),a.onFocusChange?.(e)},onValueChangeEnd:e=>{t?.(`valueChangeEnd`,e),a.onValueChangeEnd?.(e)},onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a.onValueChange?.(e)}}}));return U(()=>kF(a,wk))},PF=Object.freeze(Object.defineProperty({__proto__:null,Context:PP,Control:FP,DraggingIndicator:RP,HiddenInput:zP,Label:BP,Marker:HP,MarkerGroup:VP,Range:UP,Root:M({__name:`slider-root`,props:Xi({"aria-label":{},"aria-labelledby":{},defaultValue:{},dir:{},disabled:{type:Boolean},form:{},getAriaValueText:{type:Function},getRootNode:{type:Function},id:{},ids:{},invalid:{type:Boolean},max:{},min:{},minStepsBetweenThumbs:{},modelValue:{},name:{},orientation:{},origin:{},readOnly:{type:Boolean},step:{},thumbAlignment:{},thumbSize:{},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0}),emits:[`focusChange`,`valueChange`,`valueChangeEnd`,`update:modelValue`],setup(e,{emit:t}){let n=NF(e,t);return MP(n),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:WP,Thumb:M({__name:`slider-thumb`,props:{index:{},name:{},asChild:{type:Boolean}},setup(e){let t=e,n=NP();return IP(t),Y(),(e,r)=>(F(),L(k(J).div,H(k(n).getThumbProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Track:M({__name:`slider-track`,props:{asChild:{type:Boolean}},setup(e){let t=NP();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getTrackProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueText:M({__name:`slider-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=NP(),n=qi();return Y(),(e,r)=>(F(),L(k(J).span,H(k(t).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(n.default?.()||k(t).value.join(`, `)),1)])]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),[FF,IF]=yD(`NumberInputContext`),LF=M({__name:`number-input-context`,setup(e){let t=IF();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),RF=M({__name:`number-input-control`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zF=M({__name:`number-input-decrement-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getDecrementTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),BF=M({__name:`number-input-increment-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getIncrementTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),VF=M({__name:`number-input-input`,props:{asChild:{type:Boolean}},setup(e){let t=IF(),n=xD();return Y(),(e,r)=>(F(),L(k(J).input,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getInputProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`aria-describedby`,`as-child`]))}}),HF=M({__name:`number-input-label`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),UF=M({__name:`number-input-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return FF(n),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),WF=new Map,GF=!1;try{GF=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var KF=!1;try{KF=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var qF={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},JF=class{format(e){let t=``;if(t=!GF&&this.options.signDisplay!=null?XF(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!KF){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=qF[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} – ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!GF&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!KF&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=YF(e,t),this.options=t}};function YF(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!KF){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!((r=qF[e])!=null&&r[n]))throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}var ZF=RegExp(`^.*\\(.*\\).*$`),QF=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],$F=class{parse(e){return tI(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return tI(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return tI(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},eI=new Map;function tI(e,t,n){let r=nI(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of QF)if(i!==r.options.numberingSystem){let r=nI(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function nI(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new $F(this.locale,e).parse(new JF(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&ZF.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=sI(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&(e=sI(e,`'`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&(e=sI(e,` `,this.symbols.group),e=sI(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=sI(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=oI(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}},iI=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),aI=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function oI(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=aI.map(e=>i.formatToParts(e)),c=a.find(e=>e.type===`minusSign`)?.value??`-`,l=o.find(e=>e.type===`plusSign`)?.value;!l&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(l=`+`);let u=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,d=a.find(e=>e.type===`group`)?.value,f=a.filter(e=>!iI.has(e.type)).map(e=>cI(e.value)),p=s.flatMap(e=>e.filter(e=>!iI.has(e.type)).map(e=>cI(e.value))),m=[...new Set([...f,...p])].sort((e,t)=>t.length-e.length),h=m.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${m.join(`|`)}|[\\p{White_Space}]`,`gu`),g=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(g.map((e,t)=>[e,t])),v=RegExp(`[${g.join(``)}]`,`g`);return{minusSign:c,plusSign:l,decimal:u,group:d,literals:h,numeral:v,index:e=>String(_.get(e))}}function sI(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function cI(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var lI=Nk(`numberInput`).parts(`root`,`label`,`input`,`control`,`valueText`,`incrementTrigger`,`decrementTrigger`,`scrubber`).build(),uI=e=>e.ids?.root??`number-input:${e.id}`,dI=e=>e.ids?.input??`number-input:${e.id}:input`,fI=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,pI=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,mI=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,hI=e=>`number-input:${e.id}:cursor`,gI=e=>e.ids?.label??`number-input:${e.id}:label`,_I=e=>e.getById(dI(e)),vI=e=>e.getById(fI(e)),yI=e=>e.getById(pI(e)),bI=e=>e.getDoc().getElementById(hI(e)),xI=(e,t)=>{let n=null;return t===`increment`&&(n=vI(e)),t===`decrement`&&(n=yI(e)),n},SI=(e,t)=>{if(!PO())return TI(e,t),()=>{bI(e)?.remove()}},CI=e=>{let t=e.getDoc(),n=t.documentElement,r=t.body;return r.style.pointerEvents=`none`,n.style.userSelect=`none`,n.style.cursor=`ew-resize`,()=>{r.style.pointerEvents=``,n.style.userSelect=``,n.style.cursor=``,n.style.length||n.removeAttribute(`style`),r.style.length||r.removeAttribute(`style`)}},wI=(e,t)=>{let{point:n,isRtl:r,event:i}=t,a=e.getWin(),o=eO(i.movementX,a.devicePixelRatio),s=eO(i.movementY,a.devicePixelRatio),c=o>0?`increment`:o<0?`decrement`:null;r&&c===`increment`&&(c=`decrement`),r&&c===`decrement`&&(c=`increment`);let l={x:n.x+o,y:n.y+s},u=a.innerWidth,d=eO(7.5,a.devicePixelRatio);return l.x=Hoe(l.x+d,u)-d,{hint:c,point:l}},TI=(e,t)=>{let n=e.getDoc(),r=n.createElement(`div`);r.className=`scrubber--cursor`,r.id=hI(e),Object.assign(r.style,{width:`15px`,height:`15px`,position:`fixed`,pointerEvents:`none`,left:`0px`,top:`0px`,zIndex:tse,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:`transform`}),r.innerHTML=` + + + + + + `,n.body.appendChild(r)};function EI(e,t){let{state:n,send:r,prop:i,scope:a,computed:o}=e,s=n.hasTag(`focus`),c=o(`isDisabled`),l=!!i(`readOnly`),u=!!i(`required`),d=n.matches(`scrubbing`),f=o(`isValueEmpty`),p=o(`isOutOfRange`)||!!i(`invalid`),m=c||!o(`canIncrement`)||l,h=c||!o(`canDecrement`)||l,g=i(`translations`);return{focused:s,invalid:p,empty:f,value:o(`formattedValue`),valueAsNumber:o(`valueAsNumber`),setValue(e){r({type:`VALUE.SET`,value:e})},clearValue(){r({type:`VALUE.CLEAR`})},increment(){r({type:`VALUE.INCREMENT`})},decrement(){r({type:`VALUE.DECREMENT`})},setToMax(){r({type:`VALUE.SET`,value:i(`max`)})},setToMin(){r({type:`VALUE.SET`,value:i(`min`)})},focus(){_I(a)?.focus()},getRootProps(){return t.element({id:uI(a),...lI.root.attrs,dir:i(`dir`),"data-disabled":q(c),"data-focus":q(s),"data-invalid":q(p),"data-scrubbing":q(d)})},getLabelProps(){return t.label({...lI.label.attrs,dir:i(`dir`),"data-disabled":q(c),"data-focus":q(s),"data-invalid":q(p),"data-required":q(u),"data-scrubbing":q(d),id:gI(a),htmlFor:dI(a)})},getControlProps(){return t.element({...lI.control.attrs,dir:i(`dir`),role:`group`,"aria-disabled":c,"data-focus":q(s),"data-disabled":q(c),"data-invalid":q(p),"data-scrubbing":q(d),"aria-invalid":_O(p)})},getValueTextProps(){return t.element({...lI.valueText.attrs,dir:i(`dir`),"data-disabled":q(c),"data-invalid":q(p),"data-focus":q(s),"data-scrubbing":q(d)})},getInputProps(){return t.input({...lI.input.attrs,dir:i(`dir`),name:i(`name`),form:i(`form`),id:dI(a),role:`spinbutton`,defaultValue:o(`formattedValue`),pattern:i(`formatOptions`)?void 0:i(`pattern`),inputMode:i(`inputMode`),"aria-invalid":_O(p),"data-invalid":q(p),disabled:c,"data-disabled":q(c),readOnly:l,required:i(`required`),autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,type:`text`,"aria-roledescription":`numberfield`,"aria-valuemin":i(`min`),"aria-valuemax":i(`max`),"aria-valuenow":Number.isNaN(o(`valueAsNumber`))?void 0:o(`valueAsNumber`),"aria-valuetext":o(`valueText`),"data-scrubbing":q(d),onFocus(){r({type:`INPUT.FOCUS`})},onBlur(){r({type:`INPUT.BLUR`})},onInput(e){r({type:`INPUT.CHANGE`,target:e.currentTarget,hint:`set`})},onBeforeInput(e){try{let{selectionStart:t,selectionEnd:n,value:r}=e.currentTarget,i=r.slice(0,t)+(e.data??``)+r.slice(n);o(`parser`).isValidPartialNumber(i)||e.preventDefault()}catch{}},onKeyDown(e){if(e.defaultPrevented||l||Cse(e))return;let t=BO(e)*i(`step`),n={ArrowUp(){r({type:`INPUT.ARROW_UP`,step:t}),e.preventDefault()},ArrowDown(){r({type:`INPUT.ARROW_DOWN`,step:t}),e.preventDefault()},Home(){LO(e)||(r({type:`INPUT.HOME`}),e.preventDefault())},End(){LO(e)||(r({type:`INPUT.END`}),e.preventDefault())},Enter(){r({type:`INPUT.ENTER`})}}[e.key];n?.(e)}})},getDecrementTriggerProps(){return t.button({...lI.decrementTrigger.attrs,dir:i(`dir`),id:pI(a),disabled:h,"data-disabled":q(h),"aria-label":g.decrementLabel,type:`button`,tabIndex:-1,"aria-controls":dI(a),"data-scrubbing":q(d),onPointerDown(e){h||IO(e)&&(r({type:`TRIGGER.PRESS_DOWN`,hint:`decrement`,pointerType:e.pointerType}),e.pointerType===`mouse`&&e.preventDefault(),e.pointerType===`touch`&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){r({type:`TRIGGER.PRESS_UP`,hint:`decrement`,pointerType:e.pointerType})},onPointerLeave(){h||r({type:`TRIGGER.PRESS_UP`,hint:`decrement`})}})},getIncrementTriggerProps(){return t.button({...lI.incrementTrigger.attrs,dir:i(`dir`),id:fI(a),disabled:m,"data-disabled":q(m),"aria-label":g.incrementLabel,type:`button`,tabIndex:-1,"aria-controls":dI(a),"data-scrubbing":q(d),onPointerDown(e){m||!IO(e)||(r({type:`TRIGGER.PRESS_DOWN`,hint:`increment`,pointerType:e.pointerType}),e.pointerType===`mouse`&&e.preventDefault(),e.pointerType===`touch`&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){r({type:`TRIGGER.PRESS_UP`,hint:`increment`,pointerType:e.pointerType})},onPointerLeave(e){r({type:`TRIGGER.PRESS_UP`,hint:`increment`,pointerType:e.pointerType})}})},getScrubberProps(){return t.element({...lI.scrubber.attrs,dir:i(`dir`),"data-disabled":q(c),id:mI(a),role:`presentation`,"data-scrubbing":q(d),onMouseDown(e){if(c||!IO(e))return;let t=VO(e),n=TO(e.currentTarget).devicePixelRatio;t.x-=eO(7.5,n),t.y-=eO(7.5,n),r({type:`SCRUBBER.PRESS_DOWN`,point:t}),e.preventDefault()},style:{cursor:c?void 0:`ew-resize`}})}}}function DI(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:t,selectionEnd:n,value:r}=e;return{start:t,end:n,value:r,beforeTxt:r.substring(0,t),afterTxt:r.substring(n)}}catch{}}function OI(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){e.setSelectionRange(e.value.length,e.value.length);return}try{let{value:n}=e,{beforeTxt:r=``,afterTxt:i=``,start:a}=t,o=n.length;if(n.endsWith(i))o=n.length-i.length;else if(n.startsWith(r))o=r.length;else if(a!=null){let e=r[a-1],t=n.indexOf(e,a-1);t!==-1&&(o=t+1)}e.setSelectionRange(o,o)}catch{}}}var kI=(e,t={})=>new Intl.NumberFormat(e,t),AI=(e,t={})=>new $F(e,t),jI=(e,t)=>{let{prop:n,computed:r}=t;return n(`formatOptions`)?e===``?NaN:r(`parser`).parse(e):parseFloat(e)},MI=(e,t)=>{let{prop:n,computed:r}=t;return Number.isNaN(e)?``:n(`formatOptions`)?r(`formatter`).format(e):e.toString()},NI=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style===`percent`&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:PI,guards:FI,createMachine:II}=uce(),{not:LI,and:RI}=FI,zI=II({props({props:e}){let t=NI(e.step,e.formatOptions);return{dir:`ltr`,locale:`en-US`,focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:`decimal`,pattern:`-?[0-9]*(.[0-9]+)?`,defaultValue:``,step:t,min:-(2**53-1),max:2**53-1,spinOnPress:!0,...e,translations:{incrementLabel:`increment value`,decrementLabel:`decrease value`,...e.translations}}},initialState(){return`idle`},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){let r=jI(t,{computed:n(),prop:e});e(`onValueChange`)?.({value:t,valueAsNumber:r})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(e){return e?`x:${e.x}, y:${e.y}`:``}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e(`dir`)===`rtl`,valueAsNumber:({context:e,computed:t,prop:n})=>jI(e.get(`value`),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>MI(e(`valueAsNumber`),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>Koe(e(`valueAsNumber`),t(`min`)),isAtMax:({computed:e,prop:t})=>Goe(e(`valueAsNumber`),t(`max`)),isOutOfRange:({computed:e,prop:t})=>!YD(e(`valueAsNumber`),t(`min`),t(`max`)),isValueEmpty:({context:e})=>e.get(`value`)===``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`),canIncrement:({prop:e,computed:t})=>e(`allowOverflow`)||!t(`isAtMax`),canDecrement:({prop:e,computed:t})=>e(`allowOverflow`)||!t(`isAtMin`),valueText:({prop:e,context:t})=>e(`translations`).valueText?.(t.get(`value`)),formatter:vk(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>kI(e,t)),parser:vk(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>AI(e,t))},watch({track:e,action:t,context:n,computed:r,prop:i}){e([()=>n.get(`value`),()=>i(`locale`)],()=>{t([`syncInputElement`])}),e([()=>r(`isOutOfRange`)],()=>{t([`invokeOnInvalid`])}),e([()=>n.hash(`scrubberCursorPoint`)],()=>{t([`setVirtualCursorPosition`])})},effects:[`trackFormControl`],on:{"VALUE.SET":{actions:[`setRawValue`]},"VALUE.CLEAR":{actions:[`clearValue`]},"VALUE.INCREMENT":{actions:[`increment`]},"VALUE.DECREMENT":{actions:[`decrement`]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:`isTouchPointer`,target:`before:spin`,actions:[`setHint`]},{target:`before:spin`,actions:[`focusInput`,`invokeOnFocus`,`setHint`]}],"SCRUBBER.PRESS_DOWN":{target:`scrubbing`,actions:[`focusInput`,`invokeOnFocus`,`setHint`,`setCursorPoint`]},"INPUT.FOCUS":{target:`focused`,actions:[`focusInput`,`invokeOnFocus`]}}},focused:{tags:[`focus`],effects:[`attachWheelListener`],on:{"TRIGGER.PRESS_DOWN":[{guard:`isTouchPointer`,target:`before:spin`,actions:[`setHint`]},{target:`before:spin`,actions:[`focusInput`,`setHint`]}],"SCRUBBER.PRESS_DOWN":{target:`scrubbing`,actions:[`focusInput`,`setHint`,`setCursorPoint`]},"INPUT.ARROW_UP":{actions:[`increment`]},"INPUT.ARROW_DOWN":{actions:[`decrement`]},"INPUT.HOME":{actions:[`decrementToMin`]},"INPUT.END":{actions:[`incrementToMax`]},"INPUT.CHANGE":{actions:[`setValue`,`setHint`]},"INPUT.BLUR":[{guard:RI(`clampValueOnBlur`,LI(`isInRange`)),target:`idle`,actions:[`setClampedValue`,`clearHint`,`invokeOnBlur`]},{guard:LI(`isInRange`),target:`idle`,actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`,`invokeOnInvalid`]},{target:`idle`,actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`]}],"INPUT.ENTER":{actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`]}}},"before:spin":{tags:[`focus`],effects:[`trackButtonDisabled`,`waitForChangeDelay`],entry:PI([{guard:`isIncrementHint`,actions:[`increment`]},{guard:`isDecrementHint`,actions:[`decrement`]}]),on:{CHANGE_DELAY:{target:`spinning`,guard:RI(`isInRange`,`spinOnPress`)},"TRIGGER.PRESS_UP":[{guard:`isTouchPointer`,target:`focused`,actions:[`clearHint`]},{target:`focused`,actions:[`focusInput`,`clearHint`]}]}},spinning:{tags:[`focus`],effects:[`trackButtonDisabled`,`spinValue`],on:{SPIN:[{guard:`isIncrementHint`,actions:[`increment`]},{guard:`isDecrementHint`,actions:[`decrement`]}],"TRIGGER.PRESS_UP":{target:`focused`,actions:[`focusInput`,`clearHint`]}}},scrubbing:{tags:[`focus`],effects:[`activatePointerLock`,`trackMousemove`,`setupVirtualCursor`,`preventTextSelection`],on:{"SCRUBBER.POINTER_UP":{target:`focused`,actions:[`focusInput`,`clearCursorPoint`]},"SCRUBBER.POINTER_MOVE":[{guard:`isIncrementHint`,actions:[`increment`,`setCursorPoint`]},{guard:`isDecrementHint`,actions:[`decrement`,`setCursorPoint`]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e(`clampValueOnBlur`),spinOnPress:({prop:e})=>!!e(`spinOnPress`),isInRange:({computed:e})=>!e(`isOutOfRange`),isDecrementHint:({context:e,event:t})=>(t.hint??e.get(`hint`))===`decrement`,isIncrementHint:({context:e,event:t})=>(t.hint??e.get(`hint`))===`increment`,isTouchPointer:({event:e})=>e.pointerType===`touch`},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:`CHANGE_DELAY`})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:`SPIN`})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){return JO(_I(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},setupVirtualCursor({context:e,scope:t}){return SI(t,e.get(`scrubberCursorPoint`))},preventTextSelection({scope:e}){return CI(e)},trackButtonDisabled({context:e,scope:t,send:n}){return tk(xI(t,e.get(`hint`)),{attributes:[`disabled`],callback(){n({type:`TRIGGER.PRESS_UP`,src:`attr`})}})},attachWheelListener({scope:e,send:t,prop:n}){let r=_I(e);if(!r||!e.isActiveElement(r)||!n(`allowMouseWheel`))return;function i(e){e.preventDefault();let n=Math.sign(e.deltaY)*-1;n===1?t({type:`VALUE.INCREMENT`}):n===-1&&t({type:`VALUE.DECREMENT`})}return HO(r,`wheel`,i,{passive:!1})},activatePointerLock({scope:e}){if(!PO())return Kse(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:r}){let i=e.getDoc();function a(i){let a=wI(e,{point:n.get(`scrubberCursorPoint`),isRtl:r(`isRtl`),event:i});a.hint&&t({type:`SCRUBBER.POINTER_MOVE`,hint:a.hint,point:a.point})}function o(){t({type:`SCRUBBER.POINTER_UP`})}return VD(HO(i,`mousemove`,a,!1),HO(i,`mouseup`,o,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t(`focusInputOnChange`))return;let n=_I(e);e.isActiveElement(n)||ek(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:r}){let i=Zoe(r(`valueAsNumber`),t.step??n(`step`));n(`allowOverflow`)||(i=XD(i,n(`min`),n(`max`))),e.set(`value`,MI(i,{computed:r,prop:n}))},decrement({context:e,event:t,prop:n,computed:r}){let i=Qoe(r(`valueAsNumber`),t.step??n(`step`));n(`allowOverflow`)||(i=XD(i,n(`min`),n(`max`))),e.set(`value`,MI(i,{computed:r,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let r=XD(n(`valueAsNumber`),t(`min`),t(`max`));e.set(`value`,MI(r,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:r}){let i=jI(t.value,{computed:r,prop:n});n(`allowOverflow`)||(i=XD(i,n(`min`),n(`max`))),e.set(`value`,MI(i,{computed:r,prop:n}))},setValue({context:e,event:t}){let n=t.target?.value??t.value;e.set(`value`,n)},clearValue({context:e}){e.set(`value`,``)},incrementToMax({context:e,prop:t,computed:n}){let r=MI(t(`max`),{computed:n,prop:t});e.set(`value`,r)},decrementToMin({context:e,prop:t,computed:n}){let r=MI(t(`min`),{computed:n,prop:t});e.set(`value`,r)},setHint({context:e,event:t}){e.set(`hint`,t.hint)},clearHint({context:e}){e.set(`hint`,null)},invokeOnFocus({computed:e,prop:t}){t(`onFocusChange`)?.({focused:!0,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},invokeOnBlur({computed:e,prop:t}){t(`onFocusChange`)?.({focused:!1,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},invokeOnInvalid({computed:e,prop:t,event:n}){if(n.type===`INPUT.CHANGE`)return;let r=e(`valueAsNumber`)>t(`max`)?`rangeOverflow`:`rangeUnderflow`;t(`onValueInvalid`)?.({reason:r,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},syncInputElement({context:e,event:t,computed:n,scope:r}){let i=t.type.endsWith(`CHANGE`)?e.get(`value`):n(`formattedValue`),a=_I(r),o=DI(a,r);ek(()=>{WO(a,i),OI(a,o,r)})},setFormattedValue({context:e,computed:t}){e.set(`value`,t(`formattedValue`))},setCursorPoint({context:e,event:t}){e.set(`scrubberCursorPoint`,t.point)},clearCursorPoint({context:e}){e.set(`scrubberCursorPoint`,null)},setVirtualCursorPosition({context:e,scope:t}){let n=bI(t),r=e.get(`scrubberCursorPoint`);!n||!r||(n.style.transform=`translate3d(${r.x}px, ${r.y}px, 0px)`)}}}});Sk()(`allowMouseWheel.allowOverflow.clampValueOnBlur.dir.disabled.focusInputOnChange.form.formatOptions.getRootNode.id.ids.inputMode.invalid.locale.max.min.name.onFocusChange.onValueChange.onValueInvalid.pattern.required.readOnly.spinOnPress.step.translations.value.defaultValue`.split(`.`));var BI=(e={},t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=xD(),o=Ek(zI,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,input:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,required:a?.value.required,invalid:a?.value.invalid,dir:i.value.dir,locale:i.value.locale,value:o.modelValue,getRootNode:r?.value.getRootNode,...oA(o),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onFocusChange:e=>{t?.(`focusChange`,e),o.onFocusChange?.(e)},onValueInvalid:e=>{t?.(`valueInvalid`,e),o.onValueInvalid?.(e)}}}));return U(()=>EI(o,wk))},VI=Object.freeze(Object.defineProperty({__proto__:null,Context:LF,Control:RF,DecrementTrigger:zF,IncrementTrigger:BF,Input:VF,Label:HF,Root:M({__name:`number-input-root`,props:Xi({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:[`focusChange`,`valueChange`,`valueInvalid`,`update:modelValue`],setup(e,{emit:t}){let n=BI(e,t);return FF(n),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),RootProvider:UF,Scrubber:M({__name:`number-input-scrubber`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getScrubberProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueText:M({__name:`number-input-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=IF();return Y(),(e,n)=>(F(),L(k(J).span,H(k(t).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}})},Symbol.toStringTag,{value:`Module`})),HI={class:`flex items-center gap-4`},UI={key:0,class:`px-1 text-sm text-gray-500 border-gray-300`},WI={class:`absolute top-px bottom-px right-1 flex-col hidden group-hover:flex group-focus-within:flex bg-white`},GI=M({__name:`Range`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=U(()=>t.field.min||0),r=U(()=>t.field.max||100),i=U(()=>t.field.step||1),a=ya(e,`modelValue`),o=U({get:()=>[a.value??t.field.default??t.field.min??0],set:e=>{a.value=e[0]}}),s=U({get:()=>(a.value??t.field.default??t.field.min??0).toString(),set:e=>{let t=parseFloat(e);a.value=isNaN(t)?void 0:t}});return(e,t)=>{let a=jP,c=cA;return F(),L(k(PF).Root,{modelValue:o.value,"onUpdate:modelValue":t[1]||=e=>o.value=e,min:n.value,max:r.value,step:i.value,class:`relative w-full`},{default:j(()=>[z(k(PF).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),R(`div`,HI,[z(k(PF).Control,{class:`flex-1 flex items-center h-2 select-none touch-none`},{default:j(()=>[z(k(PF).Track,{class:`flex-1 overflow-hidden h-1 rounded-full bg-gray-100`},{default:j(()=>[z(k(PF).Range,{class:`h-1 bg-accent`})]),_:1}),(F(),L(k(PF).Thumb,{index:0,key:0,class:`h-4 w-4 bg-white rounded-full shadow outline-none border-2 border-accent`}))]),_:1}),z(k(VI).Root,{modelValue:s.value,"onUpdate:modelValue":t[0]||=e=>s.value=e,min:n.value,max:r.value,step:i.value,class:`flex-none w-16 relative group`},{default:j(()=>[z(k(VI).Control,{class:`relative flex items-center h-8 border border-gray-300 rounded overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-accent focus-within:border-transparent`},{default:j(()=>[z(k(VI).Input,{class:`w-full px-2 text-sm focus:outline-none appearance-none`}),e.field.unit?(F(),I(`div`,UI,E(e.field.unit),1)):V(``,!0),R(`div`,WI,[z(k(VI).IncrementTrigger,{class:`flex-1 flex items-center`},{default:j(()=>[z(a,{class:`w-3 h-3 text-gray-600`})]),_:1}),z(k(VI).DecrementTrigger,{class:`flex-1 flex items-center`},{default:j(()=>[z(c,{class:`w-3 h-3 text-gray-600`})]),_:1})])]),_:1})]),_:1},8,[`modelValue`,`min`,`max`,`step`])])]),_:1},8,[`modelValue`,`min`,`max`,`step`])}}}),KI={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qI(e,t){return F(),I(`svg`,KI,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m15 11.25l1.5 1.5l.75-.75V8.758l2.276-.61a3 3 0 1 0-3.675-3.675l-.61 2.277H12l-.75.75l1.5 1.5M15 11.25l-8.47 8.47c-.34.34-.8.53-1.28.53s-.94.19-1.28.53l-.97.97l-.75-.75l.97-.97c.34-.34.53-.8.53-1.28s.19-.94.53-1.28L12.75 9M15 11.25L12.75 9`},null,-1)]])}var JI=D({name:`heroicons-eye-dropper`,render:qI}),YI=Object.defineProperty,XI=(e,t,n)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZI=(e,t,n)=>XI(e,t+``,n),QI=(e,t,n)=>{let r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,0),rgb(${n},255,0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,255),rgb(${n},255,255))`,WebkitMaskImage:r,maskImage:r}}},$I=(e,t,n)=>{let r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},0),rgb(255,${n},0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},255),rgb(255,${n},255))`,WebkitMaskImage:r,maskImage:r}}},eL=(e,t,n)=>{let r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,0,${n}),rgb(255,0,${n}))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,255,${n}),rgb(255,255,${n}))`,WebkitMaskImage:r,maskImage:r}}},tL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,`linear-gradient(to ${e[+!t]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,`hsl(${n}, 100%, 50%)`].join(`,`)}}),nL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]}, hsla(0,0%,0%,${n}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${n}) 100%)`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`hsl(0, 0%, 50%)`].join(`,`)}}),rL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{backgroundImage:[`linear-gradient(to ${e[+!t]},hsl(0,0%,${n}%),hsla(0,0%,${n}%,0))`,`linear-gradient(to ${e[Number(t)]},hsl(0,100%,${n}%),hsl(60,100%,${n}%),hsl(120,100%,${n}%),hsl(180,100%,${n}%),hsl(240,100%,${n}%),hsl(300,100%,${n}%),hsl(360,100%,${n}%))`].join(`,`)}}),iL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,`hsl(${n}, 100%, 50%)`].join(`,`)}}),aL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,0%,${n}),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,0%),hsl(0,0%,100%))`].join(`,`)}}),oL=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,100%,${n}),hsla(0,0%,100%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`#000`].join(`,`)}});function sL(e,t){let{xChannel:n,yChannel:r,dir:i=`ltr`}=t,{zChannel:a}=e.getColorAxes({xChannel:n,yChannel:r}),o=e.getChannelValue(a),{minValue:s,maxValue:c}=e.getChannelRange(a),l=[`top`,i===`rtl`?`left`:`right`],u=!1,d={areaStyles:{},areaGradientStyles:{}},f=(o-s)/(c-s),p=e.getFormat()===`hsla`;switch(a){case`red`:u=n===`green`,d=QI(l,u,o);break;case`green`:u=n===`red`,d=$I(l,u,o);break;case`blue`:u=n===`red`,d=eL(l,u,o);break;case`hue`:u=n!==`saturation`,d=p?tL(l,u,o):iL(l,u,o);break;case`saturation`:u=n===`hue`,d=p?nL(l,u,f):aL(l,u,f);break;case`brightness`:u=n===`hue`,d=oL(l,u,f);break;case`lightness`:u=n===`hue`,d=rL(l,u,o);break}return d}var cL=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},lL=class{toHexInt(){return this.toFormat(`rgba`).toHexInt()}getChannelValue(e){if(e in this)return this[e];throw Error(`Unsupported color channel: `+e)}getChannelValuePercent(e,t){let n=t??this.getChannelValue(e),{minValue:r,maxValue:i}=this.getChannelRange(e);return ZD(n,r,i)}getChannelPercentValue(e,t){let{minValue:n,maxValue:r,step:i}=this.getChannelRange(e);return tO(QD(t,n,r,i),n,r,i)}withChannelValue(e,t){let{minValue:n,maxValue:r}=this.getChannelRange(e);if(e in this){let i=this.clone();return i[e]=XD(t,n,r),i}throw Error(`Unsupported color channel: `+e)}getColorAxes(e){let{xChannel:t,yChannel:n}=e,r=t||this.getChannels().find(e=>e!==n),i=n||this.getChannels().find(e=>e!==r);return{xChannel:r,yChannel:i,zChannel:this.getChannels().find(e=>e!==r&&e!==i)}}incrementChannel(e,t){let{minValue:n,maxValue:r,step:i}=this.getChannelRange(e),a=tO(XD(this.getChannelValue(e)+t,n,r),n,r,i);return this.withChannelValue(e,a)}decrementChannel(e,t){return this.incrementChannel(e,-t)}isEqual(e){return cL(this.toJSON(),e.toJSON())&&this.getChannelValue(`alpha`)===e.getChannelValue(`alpha`)}},uL=/^#[\da-f]+$/i,dL=/^rgba?\((.*)\)$/,fL=/[^#]/gi,pL=class e extends lL{constructor(e,t,n,r){super(),this.red=e,this.green=t,this.blue=n,this.alpha=r}static parse(t){let n=[];if(uL.test(t)&&[4,5,7,9].includes(t.length)){let e=(t.length<6?t.replace(fL,`$&$&`):t).slice(1).split(``);for(;e.length>0;)n.push(parseInt(e.splice(0,2).join(``),16));n[3]=n[3]===void 0?void 0:n[3]/255}let r=t.match(dL);return r?.[1]&&(n=r[1].split(`,`).map(e=>Number(e.trim())).map((e,t)=>XD(e,0,t<3?255:1))),n.length<3?void 0:new e(n[0],n[1],n[2],n[3]??1)}toString(e){switch(e){case`hex`:return`#`+(this.red.toString(16).padStart(2,`0`)+this.green.toString(16).padStart(2,`0`)+this.blue.toString(16).padStart(2,`0`)).toUpperCase();case`hexa`:return`#`+(this.red.toString(16).padStart(2,`0`)+this.green.toString(16).padStart(2,`0`)+this.blue.toString(16).padStart(2,`0`)+Math.round(this.alpha*255).toString(16).padStart(2,`0`)).toUpperCase();case`rgb`:return`rgb(${this.red}, ${this.green}, ${this.blue})`;case`css`:case`rgba`:return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case`hsl`:return this.toHSL().toString(`hsl`);case`hsb`:return this.toHSB().toString(`hsb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`rgba`:return this;case`hsba`:return this.toHSB();case`hsla`:return this.toHSL();default:throw Error(`Unsupported color conversion: rgb -> `+e)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){let e=this.red/255,t=this.green/255,n=this.blue/255,r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o=i===0?0:a/i,s=0;if(a!==0){switch(i){case e:s=(t-n)/a+(tNumber(e.trim().replace(`%`,``)));return new e(JD(t,360),XD(r,0,100),XD(i,0,100),XD(a??1,0,1))}}toString(e){switch(e){case`hex`:return this.toRGB().toString(`hex`);case`hexa`:return this.toRGB().toString(`hexa`);case`hsl`:return`hsl(${this.hue}, ${oO(this.saturation,2)}%, ${oO(this.lightness,2)}%)`;case`css`:case`hsla`:return`hsla(${this.hue}, ${oO(this.saturation,2)}%, ${oO(this.lightness,2)}%, ${this.alpha})`;case`hsb`:return this.toHSB().toString(`hsb`);case`rgb`:return this.toRGB().toString(`rgb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`hsla`:return this;case`hsba`:return this.toHSB();case`rgba`:return this.toRGB();default:throw Error(`Unsupported color conversion: hsl -> `+e)}}toHSB(){let e=this.saturation/100,t=this.lightness/100,n=t+e*Math.min(t,1-t);return e=n===0?0:2*(1-t/n),new bL(oO(this.hue,2),oO(e*100,2),oO(n*100,2),oO(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,n=this.lightness/100,r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return new mL(Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255),oO(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(e){switch(e){case`hue`:return{style:`unit`,unit:`degree`,unitDisplay:`narrow`};case`saturation`:case`lightness`:case`alpha`:return{style:`percent`};default:throw Error(`Unknown color channel: `+e)}}formatChannelValue(e,t){let n=this.getChannelFormatOptions(e),r=this.getChannelValue(e);return(e===`saturation`||e===`lightness`)&&(r/=100),new Intl.NumberFormat(t,n).format(r)}getChannelRange(e){switch(e){case`hue`:return{minValue:0,maxValue:360,step:1,pageSize:15};case`saturation`:case`lightness`:return{minValue:0,maxValue:100,step:1,pageSize:10};case`alpha`:return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error(`Unknown color channel: `+e)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return`hsla`}getChannels(){return e.colorChannels}};ZI(gL,`colorChannels`,[`hue`,`saturation`,`lightness`]);var _L=gL,vL=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,yL=class e extends lL{constructor(e,t,n,r){super(),this.hue=e,this.saturation=t,this.brightness=n,this.alpha=r}static parse(t){let n;if(n=t.match(vL)){let[t,r,i,a]=(n[1]??n[2]).split(`,`).map(e=>Number(e.trim().replace(`%`,``)));return new e(JD(t,360),XD(r,0,100),XD(i,0,100),XD(a??1,0,1))}}toString(e){switch(e){case`css`:return this.toHSL().toString(`css`);case`hex`:return this.toRGB().toString(`hex`);case`hexa`:return this.toRGB().toString(`hexa`);case`hsb`:return`hsb(${this.hue}, ${oO(this.saturation,2)}%, ${oO(this.brightness,2)}%)`;case`hsba`:return`hsba(${this.hue}, ${oO(this.saturation,2)}%, ${oO(this.brightness,2)}%, ${this.alpha})`;case`hsl`:return this.toHSL().toString(`hsl`);case`rgb`:return this.toRGB().toString(`rgb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`hsba`:return this;case`hsla`:return this.toHSL();case`rgba`:return this.toRGB();default:throw Error(`Unsupported color conversion: hsb -> `+e)}}toHSL(){let e=this.saturation/100,t=this.brightness/100,n=t*(1-e/2);return e=n===0||n===1?0:(t-n)/Math.min(n,1-n),new _L(oO(this.hue,2),oO(e*100,2),oO(n*100,2),oO(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,n=this.brightness/100,r=(r,i=(r+e/60)%6)=>n-t*n*Math.max(Math.min(i,4-i,1),0);return new mL(Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255),oO(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(e){switch(e){case`hue`:return{style:`unit`,unit:`degree`,unitDisplay:`narrow`};case`saturation`:case`brightness`:case`alpha`:return{style:`percent`};default:throw Error(`Unknown color channel: `+e)}}formatChannelValue(e,t){let n=this.getChannelFormatOptions(e),r=this.getChannelValue(e);return(e===`saturation`||e===`brightness`)&&(r/=100),new Intl.NumberFormat(t,n).format(r)}getChannelRange(e){switch(e){case`hue`:return{minValue:0,maxValue:360,step:1,pageSize:15};case`saturation`:case`brightness`:return{minValue:0,maxValue:100,step:1,pageSize:10};case`alpha`:return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error(`Unknown color channel: `+e)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return`hsba`}getChannels(){return e.colorChannels}};ZI(yL,`colorChannels`,[`hue`,`saturation`,`brightness`]);var bL=yL,xL=(e=>{let t=new Map,n=e.split(`,`);for(let e=0;e{if(xL.has(e))return SL(xL.get(e));let t=mL.parse(e)||bL.parse(e)||_L.parse(e);if(!t){let t=Error(`Invalid color value: `+e);throw Error.captureStackTrace?.(t,SL),t}return t},CL=e=>typeof e==`string`?SL(e):e,wL=Nk(`color-picker`,[`root`,`label`,`control`,`trigger`,`positioner`,`content`,`area`,`areaThumb`,`valueText`,`areaBackground`,`channelSlider`,`channelSliderLabel`,`channelSliderTrack`,`channelSliderThumb`,`channelSliderValueText`,`channelInput`,`transparencyGrid`,`swatchGroup`,`swatchTrigger`,`swatchIndicator`,`swatch`,`eyeDropperTrigger`,`formatTrigger`,`formatSelect`]),TL=wL.build(),EL=e=>e.ids?.root??`color-picker:${e.id}`,DL=e=>e.ids?.label??`color-picker:${e.id}:label`,OL=e=>e.ids?.hiddenInput??`color-picker:${e.id}:hidden-input`,kL=e=>e.ids?.control??`color-picker:${e.id}:control`,AL=e=>e.ids?.trigger??`color-picker:${e.id}:trigger`,jL=e=>e.ids?.content??`color-picker:${e.id}:content`,ML=e=>e.ids?.positioner??`color-picker:${e.id}:positioner`,NL=e=>e.ids?.formatSelect??`color-picker:${e.id}:format-select`,PL=e=>e.ids?.area??`color-picker:${e.id}:area`,FL=e=>e.ids?.areaGradient??`color-picker:${e.id}:area-gradient`,IL=e=>e.ids?.areaThumb??`color-picker:${e.id}:area-thumb`,LL=(e,t)=>e.ids?.channelSliderTrack?.(t)??`color-picker:${e.id}:slider-track:${t}`,RL=(e,t)=>e.ids?.channelSliderThumb?.(t)??`color-picker:${e.id}:slider-thumb:${t}`,zL=e=>e.getById(jL(e)),BL=e=>e.getById(IL(e)),VL=(e,t)=>e.getById(RL(e,t)),HL=e=>e.getById(NL(e)),UL=e=>e.getById(OL(e)),WL=e=>e.getById(PL(e)),GL=(e,t,n)=>{let r=WL(e);if(!r)return;let{getPercentValue:i}=ik(t,r);return{x:i({dir:n,orientation:`horizontal`}),y:i({orientation:`vertical`})}},KL=e=>e.getById(kL(e)),qL=e=>e.getById(AL(e)),JL=e=>e.getById(ML(e)),YL=(e,t)=>e.getById(LL(e,t)),XL=(e,t,n,r)=>{let i=YL(e,n);if(!i)return;let{getPercentValue:a}=ik(t,i);return{x:a({dir:r,orientation:`horizontal`}),y:a({orientation:`vertical`})}},ZL=e=>[...uk(zL(e),`input[data-channel]`),...uk(KL(e),`input[data-channel]`)];function QL(e,t){switch(t){case`hue`:return SL(`hsl(${e.getChannelValue(`hue`)}, 100%, 50%)`);case`lightness`:case`brightness`:case`saturation`:case`red`:case`green`:case`blue`:return e.withChannelValue(`alpha`,1);case`alpha`:return e;default:throw Error(`Unknown color channel: `+t)}}function $L(e,t){if(t==null)return``;if(t===`hex`)return e.toString(`hex`);if(t===`css`)return e.toString(`css`);if(t in e)return e.getChannelValue(t).toString();let n=e.getFormat()===`hsla`;switch(t){case`hue`:return n?e.toFormat(`hsla`).getChannelValue(`hue`).toString():e.toFormat(`hsba`).getChannelValue(`hue`).toString();case`saturation`:return n?e.toFormat(`hsla`).getChannelValue(`saturation`).toString():e.toFormat(`hsba`).getChannelValue(`saturation`).toString();case`lightness`:return e.toFormat(`hsla`).getChannelValue(`lightness`).toString();case`brightness`:return e.toFormat(`hsba`).getChannelValue(`brightness`).toString();case`red`:case`green`:case`blue`:return e.toFormat(`rgba`).getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}function eR(e,t){switch(t){case`hex`:let n=SL(`#000000`),r=SL(`#FFFFFF`);return{minValue:n.toHexInt(),maxValue:r.toHexInt(),pageSize:10,step:1};case`css`:return;case`hue`:case`saturation`:case`lightness`:return e.toFormat(`hsla`).getChannelRange(t);case`brightness`:return e.toFormat(`hsba`).getChannelRange(t);case`red`:case`green`:case`blue`:return e.toFormat(`rgba`).getChannelRange(t);default:return e.getChannelRange(t)}}function tR(e,t){return e===`vertical`?`top`:t===`ltr`?`right`:`left`}var nR=e=>{let{channel:t,value:n,dir:r,orientation:i}=e,a=tR(i,r),{minValue:o,maxValue:s}=n.getChannelRange(t);switch(t){case`hue`:return`linear-gradient(to ${a}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;case`lightness`:return`linear-gradient(to ${a}, ${n.withChannelValue(t,o).toString(`css`)}, ${n.withChannelValue(t,(s-o)/2).toString(`css`)}, ${n.withChannelValue(t,s).toString(`css`)})`;case`saturation`:case`brightness`:case`red`:case`green`:case`blue`:case`alpha`:return`linear-gradient(to ${a}, ${n.withChannelValue(t,o).toString(`css`)}, ${n.withChannelValue(t,s).toString(`css`)})`;default:throw Error(`Unknown color channel: `+t)}};function rR(e,t){let{context:n,send:r,prop:i,computed:a,state:o,scope:s}=e,c=n.get(`value`),l=n.get(`format`),u=a(`areaValue`),d=a(`valueAsString`),f=a(`disabled`),p=!!i(`readOnly`),m=!!i(`invalid`),h=!!i(`required`),g=a(`interactive`),_=o.hasTag(`dragging`),v=o.hasTag(`open`),y=o.hasTag(`focused`),b=e=>{let t=u.getChannels();return{xChannel:e.xChannel??t[1],yChannel:e.yChannel??t[2]}},x=n.get(`currentPlacement`),S=UM({...i(`positioning`),placement:x});function C(e){let t=CL(e.value).toFormat(n.get(`format`));return{value:t,valueAsString:t.toString(`hex`),checked:t.isEqual(c),disabled:e.disabled||!g}}return{dragging:_,open:v,valueAsString:d,value:c,inline:!!i(`inline`),setOpen(e){i(`inline`)||o.hasTag(`open`)===e||r({type:e?`OPEN`:`CLOSE`})},setValue(e){r({type:`VALUE.SET`,value:CL(e),src:`set-color`})},getChannelValue(e){return $L(c,e)},getChannelValueText(e,t){return c.formatChannelValue(e,t)},setChannelValue(e,t){r({type:`VALUE.SET`,value:c.withChannelValue(e,t),src:`set-channel`})},format:n.get(`format`),setFormat(e){r({type:`VALUE.SET`,value:c.toFormat(e),src:`set-format`})},alpha:c.getChannelValue(`alpha`),setAlpha(e){r({type:`VALUE.SET`,value:c.withChannelValue(`alpha`,e),src:`set-alpha`})},getRootProps(){return t.element({...TL.root.attrs,dir:i(`dir`),id:EL(s),"data-disabled":q(f),"data-readonly":q(p),"data-invalid":q(m),style:{"--value":c.toString(`css`)}})},getLabelProps(){return t.element({...TL.label.attrs,dir:i(`dir`),id:DL(s),htmlFor:OL(s),"data-disabled":q(f),"data-readonly":q(p),"data-invalid":q(m),"data-required":q(h),"data-focus":q(y),onClick(e){e.preventDefault(),Xse(KL(s),`[data-channel=hex]`)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...TL.control.attrs,id:kL(s),dir:i(`dir`),"data-disabled":q(f),"data-readonly":q(p),"data-invalid":q(m),"data-state":v?`open`:`closed`,"data-focus":q(y)})},getTriggerProps(){return t.button({...TL.trigger.attrs,id:AL(s),dir:i(`dir`),disabled:f,"aria-label":`select color. current color is ${d}`,"aria-controls":jL(s),"aria-labelledby":DL(s),"data-disabled":q(f),"data-readonly":q(p),"data-invalid":q(m),"data-placement":x,"aria-expanded":q(v),"data-state":v?`open`:`closed`,"data-focus":q(y),type:`button`,onClick(){g&&r({type:`TRIGGER.CLICK`})},onBlur(){g&&r({type:`TRIGGER.BLUR`})},style:{position:`relative`}})},getPositionerProps(){return t.element({...TL.positioner.attrs,id:ML(s),dir:i(`dir`),style:S.floating})},getContentProps(){return t.element({...TL.content.attrs,id:jL(s),dir:i(`dir`),tabIndex:-1,"data-placement":x,"data-state":v?`open`:`closed`,hidden:!v})},getValueTextProps(){return t.element({...TL.valueText.attrs,dir:i(`dir`),"data-disabled":q(f),"data-focus":q(y)})},getAreaProps(e={}){let{xChannel:n,yChannel:a}=b(e),{areaStyles:o}=sL(u,{xChannel:n,yChannel:a,dir:i(`dir`)});return t.element({...TL.area.attrs,id:PL(s),role:`group`,"data-invalid":q(m),"data-disabled":q(f),"data-readonly":q(p),onPointerDown(e){!g||!IO(e)||LO(e)||(r({type:`AREA.POINTER_DOWN`,point:VO(e),channel:{xChannel:n,yChannel:a},id:`area`}),e.preventDefault())},style:{position:`relative`,touchAction:`none`,forcedColorAdjust:`none`,...o}})},getAreaBackgroundProps(e={}){let{xChannel:n,yChannel:r}=b(e),{areaGradientStyles:a}=sL(u,{xChannel:n,yChannel:r,dir:i(`dir`)});return t.element({...TL.areaBackground.attrs,id:FL(s),"data-invalid":q(m),"data-disabled":q(f),"data-readonly":q(p),style:{position:`relative`,touchAction:`none`,forcedColorAdjust:`none`,...a}})},getAreaThumbProps(e={}){let{xChannel:n,yChannel:a}=b(e),o={xChannel:n,yChannel:a},c=u.getChannelValuePercent(n),l=1-u.getChannelValuePercent(a),d=i(`dir`)===`rtl`?1-c:c,h=u.getChannelValue(n),_=u.getChannelValue(a),v=u.withChannelValue(`alpha`,1).toString(`css`);return t.element({...TL.areaThumb.attrs,id:IL(s),dir:i(`dir`),tabIndex:f?void 0:0,"data-disabled":q(f),"data-invalid":q(m),"data-readonly":q(p),role:`slider`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":h,"aria-label":`${n} and ${a}`,"aria-roledescription":`2d slider`,"aria-valuetext":`${n} ${h}, ${a} ${_}`,style:{position:`absolute`,left:`${d*100}%`,top:`${l*100}%`,transform:`translate(-50%, -50%)`,touchAction:`none`,forcedColorAdjust:`none`,"--color":v,background:v},onFocus(){g&&r({type:`AREA.FOCUS`,id:`area`,channel:o})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=BO(e),n={ArrowUp(){r({type:`AREA.ARROW_UP`,channel:o,step:t})},ArrowDown(){r({type:`AREA.ARROW_DOWN`,channel:o,step:t})},ArrowLeft(){r({type:`AREA.ARROW_LEFT`,channel:o,step:t})},ArrowRight(){r({type:`AREA.ARROW_RIGHT`,channel:o,step:t})},PageUp(){r({type:`AREA.PAGE_UP`,channel:o,step:t})},PageDown(){r({type:`AREA.PAGE_DOWN`,channel:o,step:t})},Escape(e){e.stopPropagation()}}[zO(e,{dir:i(`dir`)})];n&&(n(e),e.preventDefault())}})},getTransparencyGridProps(e={}){let{size:n=`12px`}=e;return t.element({...TL.transparencyGrid.attrs,style:{"--size":n,width:`100%`,height:`100%`,position:`absolute`,backgroundColor:`#fff`,backgroundImage:`conic-gradient(#eeeeee 0 25%, transparent 0 50%, #eeeeee 0 75%, transparent 0)`,backgroundSize:`var(--size) var(--size)`,inset:`0px`,zIndex:`auto`,pointerEvents:`none`}})},getChannelSliderProps(e){let{orientation:n=`horizontal`,channel:i,format:a}=e;return t.element({...TL.channelSlider.attrs,"data-channel":i,"data-orientation":n,role:`presentation`,onPointerDown(e){!g||!IO(e)||LO(e)||(r({type:`CHANNEL_SLIDER.POINTER_DOWN`,channel:i,format:a,point:VO(e),id:i,orientation:n}),e.preventDefault())},style:{position:`relative`,touchAction:`none`}})},getChannelSliderTrackProps(e){let{orientation:n=`horizontal`,channel:r,format:a}=e,o=a?c.toFormat(a):u;return t.element({...TL.channelSliderTrack.attrs,id:LL(s,r),role:`group`,"data-channel":r,"data-orientation":n,style:{position:`relative`,forcedColorAdjust:`none`,backgroundImage:nR({orientation:n,channel:r,dir:i(`dir`),value:o})}})},getChannelSliderLabelProps(e){let{channel:n}=e;return t.element({...TL.channelSliderLabel.attrs,"data-channel":n,onClick(e){if(!g)return;e.preventDefault();let t=RL(s,n);s.getById(t)?.focus({preventScroll:!0})},style:{userSelect:`none`,WebkitUserSelect:`none`}})},getChannelSliderValueTextProps(e){return t.element({...TL.channelSliderValueText.attrs,"data-channel":e.channel})},getChannelSliderThumbProps(e){let{orientation:n=`horizontal`,channel:a,format:o}=e,l=o?c.toFormat(o):u,d=l.getChannelRange(a),p=l.getChannelValue(a),m=(p-d.minValue)/(d.maxValue-d.minValue),h=i(`dir`)===`rtl`,_=n===`horizontal`&&h?1-m:m,v=n===`horizontal`?{left:`${_*100}%`,top:`50%`}:{top:`${m*100}%`,left:`50%`};return t.element({...TL.channelSliderThumb.attrs,id:RL(s,a),role:`slider`,"aria-label":a,tabIndex:f?void 0:0,"data-channel":a,"data-disabled":q(f),"data-orientation":n,"aria-disabled":q(f),"aria-orientation":n,"aria-valuemax":d.maxValue,"aria-valuemin":d.minValue,"aria-valuenow":p,"aria-valuetext":`${a} ${p}`,style:{forcedColorAdjust:`none`,position:`absolute`,background:QL(u,a).toString(`css`),...v},onFocus(){g&&r({type:`CHANNEL_SLIDER.FOCUS`,channel:a})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=BO(e)*d.step,n={ArrowUp(){r({type:`CHANNEL_SLIDER.ARROW_UP`,channel:a,step:t})},ArrowDown(){r({type:`CHANNEL_SLIDER.ARROW_DOWN`,channel:a,step:t})},ArrowLeft(){r({type:`CHANNEL_SLIDER.ARROW_LEFT`,channel:a,step:t})},ArrowRight(){r({type:`CHANNEL_SLIDER.ARROW_RIGHT`,channel:a,step:t})},PageUp(){r({type:`CHANNEL_SLIDER.PAGE_UP`,channel:a})},PageDown(){r({type:`CHANNEL_SLIDER.PAGE_DOWN`,channel:a})},Home(){r({type:`CHANNEL_SLIDER.HOME`,channel:a})},End(){r({type:`CHANNEL_SLIDER.END`,channel:a})},Escape(e){e.stopPropagation()}}[zO(e,{dir:i(`dir`)})];n&&(n(e),e.preventDefault())}})},getChannelInputProps(e){let{channel:n}=e,a=n===`hex`||n===`css`,o=eR(c,n);return t.input({...TL.channelInput.attrs,dir:i(`dir`),type:a?`text`:`number`,"data-channel":n,"aria-label":n,spellCheck:!1,autoComplete:`off`,disabled:f,"data-disabled":q(f),"data-invalid":q(m),"data-readonly":q(p),readOnly:p,defaultValue:$L(c,n),min:o?.minValue,max:o?.maxValue,step:o?.step,onBeforeInput(e){a||!g||e.currentTarget.value.match(/[^0-9.]/g)&&e.preventDefault()},onFocus(e){g&&(r({type:`CHANNEL_INPUT.FOCUS`,channel:n}),e.currentTarget.select())},onBlur(e){g&&r({type:`CHANNEL_INPUT.BLUR`,channel:n,value:a?e.currentTarget.value:e.currentTarget.valueAsNumber,isTextField:a})},onKeyDown(e){!e.defaultPrevented&&g&&e.key===`Enter`&&(r({type:`CHANNEL_INPUT.CHANGE`,channel:n,value:a?e.currentTarget.value:e.currentTarget.valueAsNumber,isTextField:a}),e.preventDefault())},style:{appearance:`none`,WebkitAppearance:`none`,MozAppearance:`textfield`}})},getHiddenInputProps(){return t.input({type:`text`,disabled:f,name:i(`name`),tabIndex:-1,readOnly:p,required:h,id:OL(s),style:hk,defaultValue:d})},getEyeDropperTriggerProps(){return t.button({...TL.eyeDropperTrigger.attrs,type:`button`,dir:i(`dir`),disabled:f,"data-disabled":q(f),"data-invalid":q(m),"data-readonly":q(p),"aria-label":`Pick a color from the screen`,onClick(){g&&r({type:`EYEDROPPER.CLICK`})}})},getSwatchGroupProps(){return t.element({...TL.swatchGroup.attrs,role:`group`})},getSwatchTriggerState:C,getSwatchTriggerProps(e){let n=C(e);return t.button({...TL.swatchTrigger.attrs,disabled:n.disabled,dir:i(`dir`),type:`button`,"aria-label":`select ${n.valueAsString} as the color`,"data-state":n.checked?`checked`:`unchecked`,"data-value":n.valueAsString,"data-disabled":q(n.disabled),onClick(){n.disabled||r({type:`SWATCH_TRIGGER.CLICK`,value:n.value})},style:{"--color":n.valueAsString,position:`relative`}})},getSwatchIndicatorProps(e){let n=C(e);return t.element({...TL.swatchIndicator.attrs,dir:i(`dir`),hidden:!n.checked})},getSwatchProps(e){let{respectAlpha:n=!0}=e,r=C(e),a=r.value.toString(n?`css`:`hex`);return t.element({...TL.swatch.attrs,dir:i(`dir`),"data-state":r.checked?`checked`:`unchecked`,"data-value":r.valueAsString,style:{"--color":a,position:`relative`,background:a}})},getFormatTriggerProps(){return t.button({...TL.formatTrigger.attrs,dir:i(`dir`),type:`button`,"aria-label":`change color format to ${oR(l)}`,onClick(e){e.currentTarget.disabled||r({type:`FORMAT.SET`,format:oR(l),src:`format-trigger`})}})},getFormatSelectProps(){return t.select({...TL.formatSelect.attrs,"aria-label":`change color format`,dir:i(`dir`),defaultValue:i(`format`),disabled:f,onChange(e){r({type:`FORMAT.SET`,format:sR(e.currentTarget.value),src:`format-select`})}})}}}var iR=[`hsba`,`hsla`,`rgba`],aR=RegExp(`^(${iR.join(`|`)})$`);function oR(e){return iR[iR.indexOf(e)+1]??iR[0]}function sR(e){if(aR.test(e))return e;throw Error(`Unsupported color format: ${e}`)}var cR=e=>SL(e),lR=/^[0-9a-fA-F]{3,8}$/;function uR(e){return lR.test(e)}function dR(e){return e.startsWith(`#`)?e:uR(e)?`#${e}`:e}var{and:fR}=yk(),pR={props({props:e}){return{dir:`ltr`,defaultValue:cR(`#000000`),defaultFormat:`rgba`,openAutoFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)||e(`inline`)?`open`:`idle`},context({prop:e,bindable:t,getContext:n}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual(e,t){return e.toString(`css`)===t?.toString(`css`)},hash(e){return e.toString(`css`)},onChange(t){let r=n(),i=t.toString(r.get(`format`));e(`onValueChange`)?.({value:t,valueAsString:i})}})),format:t(()=>({defaultValue:e(`defaultFormat`),value:e(`format`),onChange(t){e(`onFormatChange`)?.({format:t})}})),activeId:t(()=>({defaultValue:null})),activeChannel:t(()=>({defaultValue:null})),activeOrientation:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),restoreFocus:t(()=>({defaultValue:!0})),currentPlacement:t(()=>({defaultValue:void 0}))}},computed:{rtl:({prop:e})=>e(`dir`)===`rtl`,disabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`),interactive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),valueAsString:({context:e})=>e.get(`value`).toString(e.get(`format`)),areaValue:({context:e})=>{let t=e.get(`format`).startsWith(`hsl`)?`hsla`:`hsba`;return e.get(`value`).toFormat(t)}},effects:[`trackFormControl`],watch({prop:e,context:t,action:n,track:r}){r([()=>t.hash(`value`)],()=>{n([`syncInputElements`,`dispatchChangeEvent`])}),r([()=>t.get(`format`)],()=>{n([`syncFormatSelectElement`])}),r([()=>e(`open`)],()=>{n([`toggleVisibility`])})},on:{"VALUE.SET":{actions:[`setValue`]},"FORMAT.SET":{actions:[`setFormat`]},"CHANNEL_INPUT.CHANGE":{actions:[`setChannelColorFromInput`]},"EYEDROPPER.CLICK":{actions:[`openEyeDropper`]},"SWATCH_TRIGGER.CLICK":{actions:[`setValue`]}},states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"CHANNEL_INPUT.FOCUS":{target:`focused`,actions:[`setActiveChannel`]}}},focused:{tags:[`closed`,`focused`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"CHANNEL_INPUT.FOCUS":{actions:[`setActiveChannel`]},"CHANNEL_INPUT.BLUR":{target:`idle`,actions:[`setChannelColorFromInput`]},"TRIGGER.BLUR":{target:`idle`}}},open:{tags:[`open`],effects:[`trackPositioning`,`trackDismissableElement`],on:{"CONTROLLED.CLOSE":[{guard:`shouldRestoreFocus`,target:`focused`,actions:[`setReturnFocus`]},{target:`idle`}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`idle`,actions:[`invokeOnClose`]}],"AREA.POINTER_DOWN":{target:`open:dragging`,actions:[`setActiveChannel`,`setAreaColorFromPoint`,`focusAreaThumb`]},"AREA.FOCUS":{actions:[`setActiveChannel`]},"CHANNEL_SLIDER.POINTER_DOWN":{target:`open:dragging`,actions:[`setActiveChannel`,`setChannelColorFromPoint`,`focusChannelThumb`]},"CHANNEL_SLIDER.FOCUS":{actions:[`setActiveChannel`]},"AREA.ARROW_LEFT":{actions:[`decrementAreaXChannel`]},"AREA.ARROW_RIGHT":{actions:[`incrementAreaXChannel`]},"AREA.ARROW_UP":{actions:[`incrementAreaYChannel`]},"AREA.ARROW_DOWN":{actions:[`decrementAreaYChannel`]},"AREA.PAGE_UP":{actions:[`incrementAreaXChannel`]},"AREA.PAGE_DOWN":{actions:[`decrementAreaXChannel`]},"CHANNEL_SLIDER.ARROW_LEFT":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.ARROW_RIGHT":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.ARROW_UP":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.ARROW_DOWN":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.PAGE_UP":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.PAGE_DOWN":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.HOME":{actions:[`setChannelToMin`]},"CHANNEL_SLIDER.END":{actions:[`setChannelToMax`]},"CHANNEL_INPUT.BLUR":{actions:[`setChannelColorFromInput`]},INTERACT_OUTSIDE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`shouldRestoreFocus`,target:`focused`,actions:[`invokeOnClose`,`setReturnFocus`]},{target:`idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`idle`,actions:[`invokeOnClose`]}],"SWATCH_TRIGGER.CLICK":[{guard:fR(`isOpenControlled`,`closeOnSelect`),actions:[`setValue`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`setValue`,`invokeOnClose`,`setReturnFocus`]},{actions:[`setValue`]}]}},"open:dragging":{tags:[`open`],exit:[`clearActiveChannel`],effects:[`trackPointerMove`,`disableTextSelection`,`trackPositioning`,`trackDismissableElement`],on:{"CONTROLLED.CLOSE":[{guard:`shouldRestoreFocus`,target:`focused`,actions:[`setReturnFocus`]},{target:`idle`}],"AREA.POINTER_MOVE":{actions:[`setAreaColorFromPoint`,`focusAreaThumb`]},"AREA.POINTER_UP":{target:`open`,actions:[`invokeOnChangeEnd`]},"CHANNEL_SLIDER.POINTER_MOVE":{actions:[`setChannelColorFromPoint`,`focusChannelThumb`]},"CHANNEL_SLIDER.POINTER_UP":{target:`open`,actions:[`invokeOnChangeEnd`]},INTERACT_OUTSIDE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`shouldRestoreFocus`,target:`focused`,actions:[`invokeOnClose`,`setReturnFocus`]},{target:`idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`idle`,actions:[`invokeOnClose`]}]}}},implementations:{guards:{closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null||!!e(`inline`),shouldRestoreFocus:({context:e})=>!!e.get(`restoreFocus`)},effects:{trackPositioning({context:e,prop:t,scope:n}){if(!t(`inline`))return e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`)?.placement),VM(qL(n),()=>JL(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({context:e,scope:t,prop:n,send:r}){return n(`inline`)?void 0:fN(()=>zL(t),{type:`popover`,exclude:qL(t),defer:!0,onInteractOutside(t){n(`onInteractOutside`)?.(t),!t.defaultPrevented&&e.set(`restoreFocus`,!(t.detail.focusable||t.detail.contextmenu))},onPointerDownOutside:n(`onPointerDownOutside`),onFocusOutside:n(`onFocusOutside`),onDismiss(){r({type:`INTERACT_OUTSIDE`})}})},trackFormControl({context:e,scope:t,send:n}){return JO(UL(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){n({type:`VALUE.SET`,value:e.initial(`value`),src:`form.reset`})}})},trackPointerMove({context:e,scope:t,event:n,send:r}){return lk(t.getDoc(),{onPointerMove({point:t}){r({type:e.get(`activeId`)===`area`?`AREA.POINTER_MOVE`:`CHANNEL_SLIDER.POINTER_MOVE`,point:t,format:n.format})},onPointerUp(){r({type:e.get(`activeId`)===`area`?`AREA.POINTER_UP`:`CHANNEL_SLIDER.POINTER_UP`})}})},disableTextSelection({scope:e}){return ck({doc:e.getDoc(),target:zL(e)})}},actions:{openEyeDropper({scope:e,context:t}){let n=e.getWin();`EyeDropper`in n&&new n.EyeDropper().open().then(({sRGBHex:e})=>{let n=t.get(`value`).getFormat(),r=SL(e).toFormat(n);t.set(`value`,r)}).catch(()=>{})},setActiveChannel({context:e,event:t}){e.set(`activeId`,t.id),t.channel&&e.set(`activeChannel`,t.channel),t.orientation&&e.set(`activeOrientation`,t.orientation)},clearActiveChannel({context:e}){e.set(`activeChannel`,null),e.set(`activeId`,null),e.set(`activeOrientation`,null)},setAreaColorFromPoint({context:e,event:t,computed:n,scope:r,prop:i}){let a=t.format?e.get(`value`).toFormat(t.format):n(`areaValue`),{xChannel:o,yChannel:s}=t.channel||e.get(`activeChannel`),c=GL(r,t.point,i(`dir`));if(!c)return;let l=a.getChannelPercentValue(o,c.x),u=a.getChannelPercentValue(s,1-c.y),d=a.withChannelValue(o,l).withChannelValue(s,u);e.set(`value`,d)},setChannelColorFromPoint({context:e,event:t,computed:n,scope:r,prop:i}){let a=t.channel||e.get(`activeId`),o=t.format?e.get(`value`).toFormat(t.format):n(`areaValue`),s=XL(r,t.point,a,i(`dir`));if(!s)return;let c=(e.get(`activeOrientation`)||`horizontal`)===`horizontal`?s.x:s.y,l=o.getChannelPercentValue(a,c),u=o.withChannelValue(a,l);e.set(`value`,u)},setValue({context:e,event:t}){e.set(`value`,t.value)},setFormat({context:e,event:t}){e.set(`format`,t.format)},dispatchChangeEvent({scope:e,computed:t}){KO(UL(e),{value:t(`valueAsString`)})},syncInputElements({context:e,scope:t}){mR(t,e.get(`value`))},invokeOnChangeEnd({context:e,prop:t,computed:n}){t(`onValueChangeEnd`)?.({value:e.get(`value`),valueAsString:n(`valueAsString`)})},setChannelColorFromInput({context:e,event:t,scope:n,prop:r}){let{channel:i,isTextField:a,value:o}=t,s=e.get(`value`).getChannelValue(`alpha`),c;if(i===`alpha`){let t=parseFloat(o);t=Number.isNaN(t)?s:t,c=e.get(`value`).withChannelValue(`alpha`,t)}else if(a)c=HD(()=>cR(i===`hex`?dR(o):o).withChannelValue(`alpha`,s),()=>e.get(`value`));else{let t=e.get(`value`).toFormat(e.get(`format`)),n=Number.isNaN(o)?t.getChannelValue(i):o;c=t.withChannelValue(i,n)}mR(n,e.get(`value`),c),e.set(`value`,c),r(`onValueChangeEnd`)?.({value:c,valueAsString:c.toString(e.get(`format`))})},incrementChannel({context:e,event:t}){let n=e.get(`value`).incrementChannel(t.channel,t.step);e.set(`value`,n)},decrementChannel({context:e,event:t}){let n=e.get(`value`).decrementChannel(t.channel,t.step);e.set(`value`,n)},incrementAreaXChannel({context:e,event:t,computed:n}){let{xChannel:r}=t.channel,i=n(`areaValue`).incrementChannel(r,t.step);e.set(`value`,i)},decrementAreaXChannel({context:e,event:t,computed:n}){let{xChannel:r}=t.channel,i=n(`areaValue`).decrementChannel(r,t.step);e.set(`value`,i)},incrementAreaYChannel({context:e,event:t,computed:n}){let{yChannel:r}=t.channel,i=n(`areaValue`).incrementChannel(r,t.step);e.set(`value`,i)},decrementAreaYChannel({context:e,event:t,computed:n}){let{yChannel:r}=t.channel,i=n(`areaValue`).decrementChannel(r,t.step);e.set(`value`,i)},setChannelToMax({context:e,event:t}){let n=e.get(`value`),r=n.getChannelRange(t.channel),i=n.withChannelValue(t.channel,r.maxValue);e.set(`value`,i)},setChannelToMin({context:e,event:t}){let n=e.get(`value`),r=n.getChannelRange(t.channel),i=n.withChannelValue(t.channel,r.minValue);e.set(`value`,i)},focusAreaThumb({scope:e}){ek(()=>{BL(e)?.focus({preventScroll:!0})})},focusChannelThumb({event:e,scope:t}){ek(()=>{VL(t,e.channel)?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e(`openAutoFocus`)&&ek(()=>{QO({root:zL(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},setReturnFocus({scope:e}){ek(()=>{qL(e)?.focus({preventScroll:!0})})},syncFormatSelectElement({context:e,scope:t}){hR(t,e.get(`format`))},invokeOnOpen({prop:e}){e(`inline`)||e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`inline`)||e(`onOpenChange`)?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:t})}}}};function mR(e,t,n){let r=ZL(e);ek(()=>{r.forEach(e=>{let r=e.dataset.channel;WO(e,$L(n||t,r))})})}function hR(e,t){let n=HL(e);n&&ek(()=>WO(n,t))}Sk()(`closeOnSelect.dir.disabled.format.defaultFormat.getRootNode.id.ids.initialFocusEl.inline.name.positioning.onFocusOutside.onFormatChange.onInteractOutside.onOpenChange.onPointerDownOutside.onValueChange.onValueChangeEnd.defaultOpen.open.positioning.required.readOnly.value.defaultValue.invalid.openAutoFocus`.split(`.`)),Sk()([`xChannel`,`yChannel`]),Sk()([`channel`,`orientation`]),Sk()([`value`,`disabled`]),Sk()([`value`,`respectAlpha`]),Sk()([`size`]);var[gR,_R]=yD(`ColorPickerAreaPropsContext`),[vR,yR]=yD(`ColorPickerContext`),bR=M({__name:`color-picker-area-background`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=_R();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getAreaBackgroundProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),xR=M({__name:`color-picker-area-thumb`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=_R();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getAreaThumbProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),SR=M({__name:`color-picker-area`,props:{xChannel:{},yChannel:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return gR(t),Y(),(e,r)=>(F(),L(k(J).div,H(k(n).getAreaProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),CR=M({__name:`color-picker-channel-input`,props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return Y(),(e,r)=>(F(),L(k(J).input,H(k(n).getChannelInputProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[wR,TR]=yD(`ColorPickerChannelPropsContext`),ER=M({__name:`color-picker-channel-slider-label`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=TR();return Y(),(e,r)=>(F(),L(k(J).label,H(k(t).getChannelSliderLabelProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[DR,OR]=yD(`ColorPickerFormatProps`),kR=M({__name:`color-picker-channel-slider-thumb`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=OR(),r=TR(),i=U(()=>({...r,...n}));return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getChannelSliderThumbProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),AR=M({__name:`color-picker-channel-slider-track`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=OR(),r=TR(),i=U(()=>({...r,...n}));return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getChannelSliderTrackProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),jR=M({__name:`color-picker-channel-slider-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=TR(),r=qi(),i=aA(iA);return Y(),(e,a)=>(F(),L(k(J).span,H(k(t).getChannelSliderValueTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(r.default?.()||k(t).getChannelValueText(k(n).channel,k(i).locale)),1)])]),_:3},16,[`as-child`]))}}),MR=M({__name:`color-picker-channel-slider`,props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR(),r=OR(),i=U(()=>({...t,...r}));return wR(t),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getChannelSliderProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),NR=M({__name:`color-picker-content`,props:{immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=yR(),n=_A(),r=U(()=>_k(t.value.getContentProps(),n.value.presenceProps));return Y(),(e,t)=>k(n).unmounted?V(``,!0):(F(),L(k(J).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),PR=M({__name:`color-picker-context`,setup(e){let t=yR();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),FR=M({__name:`color-picker-control`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),IR=M({__name:`color-picker-eye-dropper-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getEyeDropperTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),LR=M({__name:`color-picker-format-select`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).select,Ae(Ro(k(t).getFormatSelectProps())),{default:j(()=>[(F(),I(P,null,Vi([`rgba`,`hsla`,`hsba`],e=>z(k(J).option,{key:e,value:e},{default:j(()=>[B(E(e),1)]),_:2},1032,[`value`])),64))]),_:1},16))}}),RR=M({__name:`color-picker-format-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getFormatTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),zR=M({__name:`color-picker-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=xD();return Y(),(e,r)=>(F(),L(k(J).input,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`aria-describedby`,`as-child`]))}}),BR=M({__name:`color-picker-label`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),VR=M({__name:`color-picker-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=bA(),r=SA(U(()=>({...n.value,present:t.value.open})));return gA(r),Y(),(e,n)=>k(r).unmounted?V(``,!0):(F(),L(k(J).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),HR=M({__name:`color-picker-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return vR(n),yA(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Y(),(e,t)=>(F(),L(k(J).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),UR=(e={},t)=>{let n=Hr(),r=jk(Mk),i=aA(iA),a=xD(),o=Ek(pR,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,input:a?.value.ids.control},disabled:a?.value.disabled,invalid:a?.value.invalid,readOnly:a?.value.readOnly,required:a?.value.required,dir:i.value.dir,value:o.modelValue,getRootNode:r?.value.getRootNode,...oA(o),onOpenChange(e){t?.(`openChange`,e),t?.(`update:open`,e.open),o.onOpenChange?.(e)},onValueChange(e){t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),o.onFocusOutside?.(e)},onFormatChange:e=>{t?.(`formatChange`,e),t?.(`update:format`,e.format),o.onFormatChange?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),o.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),o.onPointerDownOutside?.(e)},onValueChangeEnd:e=>{t?.(`valueChangeEnd`,e),o.onValueChangeEnd?.(e)}}}));return U(()=>rR(o,wk))},WR=M({__name:`color-picker-root`,props:Xi({closeOnSelect:{type:Boolean},defaultFormat:{},defaultOpen:{type:Boolean},defaultValue:{},disabled:{type:Boolean},format:{},id:{},ids:{},initialFocusEl:{type:Function},invalid:{type:Boolean},modelValue:{},name:{},open:{type:Boolean},openAutoFocus:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,invalid:void 0,open:void 0,openAutoFocus:void 0,readOnly:void 0,required:void 0,inline:void 0}),emits:[`focusOutside`,`formatChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`valueChange`,`valueChangeEnd`,`update:modelValue`,`update:open`,`update:format`],setup(e,{emit:t}){let n=e,r=UR(n,t);return vR(r),yA(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Y(),(e,t)=>(F(),L(k(J).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),GR=wL.extendWith(`view`),KR=M({__name:`color-picker-swatch-group`,props:{asChild:{type:Boolean}},setup(e){return Y(),(e,t)=>(F(),L(k(J).div,H(k(GR).build().swatchGroup.attrs,{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),[qR,JR]=yD(`ColorPickerSwatchPropsContext`),YR=Object.freeze(Object.defineProperty({__proto__:null,Area:SR,AreaBackground:bR,AreaThumb:xR,ChannelInput:CR,ChannelSlider:MR,ChannelSliderLabel:ER,ChannelSliderThumb:kR,ChannelSliderTrack:AR,ChannelSliderValueText:jR,Content:NR,Context:PR,Control:FR,EyeDropperTrigger:IR,FormatSelect:LR,FormatTrigger:RR,HiddenInput:zR,Label:BR,Positioner:VR,Root:WR,RootProvider:HR,Swatch:M({__name:`color-picker-swatch`,props:{value:{},respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return qR(t),Y(),(e,r)=>(F(),L(k(J).div,H(k(n).getSwatchProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),SwatchGroup:KR,SwatchIndicator:M({__name:`color-picker-swatch-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=yR(),n=JR();return Y(),(e,r)=>(F(),L(k(J).div,H(k(t).getSwatchIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),SwatchTrigger:M({__name:`color-picker-swatch-trigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return Y(),(e,r)=>(F(),L(k(J).button,H(k(n).getSwatchTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),TransparencyGrid:M({__name:`color-picker-transparency-grid`,props:{size:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return Y(),(e,r)=>(F(),L(k(J).div,H(k(n).getTransparencyGridProps(t),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),Trigger:M({__name:`color-picker-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=yR();return Y(),(e,n)=>(F(),L(k(J).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueSwatch:M({__name:`color-picker-value-swatch`,props:{respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=yR(),r=U(()=>({value:n.value.value,respectAlpha:t.respectAlpha}));return qR(r.value),Y(),(e,t)=>(F(),L(k(J).div,H(k(n).getSwatchProps(r.value),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`as-child`]))}}),ValueText:M({__name:`color-picker-value-text`,props:{format:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR(),r=qi();Y();let i=U(()=>t.format?n.value.value.toString(t.format):n.value.valueAsString);return(e,t)=>(F(),L(k(J).span,H(k(n).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`,{},()=>[B(E(r.default?.()||i.value),1)])]),_:3},16,[`as-child`]))}}),View:M({__name:`color-picker-view`,props:{format:{},asChild:{type:Boolean}},setup(e){let t=e,n=yR();return DR(t),Y(),(e,t)=>k(n).format===e.format?(F(),L(k(J).div,H({key:0},k(GR).build().view.attrs,{"data-format":e.format,"as-child":e.asChild}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`data-format`,`as-child`])):V(``,!0)}})},Symbol.toStringTag,{value:`Module`})),XR={class:`flex`},ZR=[`value`],QR={class:`flex gap-2`},$R={class:`flex flex-col gap-2 w-full`},ez={key:0,class:`mt-3`},tz=8,nz=M({__name:`Color`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=O([]),n=ya(e,`modelValue`,{get:e=>{try{return cR(e||`#000000`)}catch{return cR(`#000000`)}},set:e=>e.toString(`hexa`)}),r=e=>{let t=e?.getChannelValue(`alpha`)??1;return Number(t.toFixed(2)).toString()},i=O(r(n.value)),a=O(!1);pr(n,e=>{a.value||(i.value=r(e))});let o=e=>{let t=Number.parseFloat(e.replace(`,`,`.`));if(Number.isNaN(t))return!1;let r=Math.min(1,Math.max(0,t));return n.value=(n.value??cR(`#000000`)).withChannelValue(`alpha`,r),!0},s=e=>{let t=e.target;i.value=t.value,o(t.value)},c=()=>{if(a.value=!1,!o(i.value)){i.value=r(n.value);return}i.value=r(n.value)},l=e=>{let n=t.value.findIndex(t=>t.toHexInt()===e.value.toHexInt());n!==-1&&t.value.splice(n,1),t.value.unshift(e.value),t.value.length>tz&&(t.value=t.value.slice(0,tz))};return(e,r)=>{let o=JI;return F(),L(k(YR).Root,{modelValue:n.value,"onUpdate:modelValue":r[1]||=e=>n.value=e,format:`rgba`,class:`flex flex-col gap-1.5`,onValueChangeEnd:l},{default:j(()=>[z(k(YR).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),z(k(YR).Control,{class:`flex gap-2`},{default:j(()=>[z(k(YR).Trigger,{class:`appearance-none rounded cursor-pointer inline-flex items-center justify-center outline-none h-10 min-w-10 gap-2 border border-gray-300`},{default:j(()=>[z(k(YR).TransparencyGrid,{class:`rounded`}),z(k(YR).ValueSwatch,{class:`h-7 w-7 rounded shadow`})]),_:1}),R(`div`,XR,[z(k(YR).ChannelInput,{channel:`hex`,class:`appearance-none rounded-l bg-none outline-0 relative w-full border border-r-0 px-3 h-10 min-w-10 focus:ring focus:ring-accent`}),R(`input`,{value:i.value,type:`number`,inputmode:`decimal`,step:`0.01`,min:`0`,max:`1`,class:`appearance-none rounded-r bg-none outline-0 flex-none w-14 border border-gray-300 px-2 h-10 text-xs font-medium text-gray-600 text-center focus:ring focus:ring-accent`,onFocus:r[0]||=e=>a.value=!0,onInput:s,onBlur:c},null,40,ZR)])]),_:1}),(F(),L(Tr,{to:`.__craftile`},[z(k(YR).Positioner,{class:`w-60 !z-20 pl-1`},{default:j(()=>[z(k(YR).Content,{class:`flex flex-col p-4 gap-3 rounded bg-white border shadow-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out data-[state=closed]:hidden`},{default:j(()=>[z(k(YR).Area,{class:`rounded overflow-hidden h-36 touch-none forced-color-adjust-none`},{default:j(()=>[z(k(YR).AreaBackground,{class:`h-full rounded`}),z(k(YR).AreaThumb,{class:`rounded-full w-2.5 h-2.5 outline-none border-2 border-white`})]),_:1}),R(`div`,QR,[z(k(YR).EyeDropperTrigger,{class:`appearance-none rounded cursor-pointer inline-flex outline-none relative select-none items-center justify-center border h-8 min-w-8`},{default:j(()=>[z(o,{class:`w-4 h-4`})]),_:1}),R(`div`,$R,[z(k(YR).ChannelSlider,{channel:`hue`,class:`rounded w-full`},{default:j(()=>[z(k(YR).ChannelSliderTrack,{class:`h-2.5 rounded`}),z(k(YR).ChannelSliderThumb,{class:`h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2`})]),_:1}),z(k(YR).ChannelSlider,{channel:`alpha`,class:`rounded w-full`},{default:j(()=>[z(k(YR).TransparencyGrid),z(k(YR).ChannelSliderTrack,{class:`h-2.5 rounded`}),z(k(YR).ChannelSliderThumb,{class:`h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2`})]),_:1})])]),z(k(YR).View,{format:`rgba`,class:`flex gap-3`},{default:j(()=>[z(k(YR).ChannelInput,{channel:`hex`,class:`flex-1 border px-3 h-8 w-0 rounded outline-0 focus:ring focus:ring-accent`}),z(k(YR).ChannelInput,{channel:`alpha`,class:`flex-none border px-3 h-8 rounded outline-0 focus:ring-2 focus:ring-accent`})]),_:1}),t.value.length>0?(F(),I(`div`,ez,[r[2]||=R(`div`,{class:`text-xs font-medium text-gray-600 mb-2`},`Recent Colors`,-1),z(k(YR).SwatchGroup,{class:`grid grid-cols-8 gap-1`},{default:j(()=>[(F(!0),I(P,null,Vi(t.value,e=>(F(),L(k(YR).SwatchTrigger,{key:e.toHexInt(),value:e,class:`w-6 h-6 rounded border border-gray-300 cursor-pointer hover:scale-110 transition-transform`},{default:j(()=>[z(k(YR).Swatch,{value:e,class:`w-full h-full rounded`},null,8,[`value`])]),_:2},1032,[`value`]))),128))]),_:1})])):V(``,!0)]),_:1})]),_:1})])),z(k(YR).HiddenInput)]),_:1},8,[`modelValue`])}}}),rz={class:`flex flex-col border-l border-gray-300`},iz=M({__name:`Number`,props:Zi({field:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`),n=U({get:()=>t.value?.toString()??``,set:e=>{let n=parseFloat(e);t.value=isNaN(n)?void 0:n}});return(e,t)=>{let r=jP,i=cA;return F(),L(k(VI).Root,{modelValue:n.value,"onUpdate:modelValue":t[0]||=e=>n.value=e,min:e.field.min,max:e.field.max,step:e.field.step},{default:j(()=>[z(k(VI).Label,{class:`block text-sm font-medium text-gray-700 mb-1`},{default:j(()=>[B(E(e.field.label),1)]),_:1}),z(k(VI).Control,{class:`flex items-center h-9 border border-gray-300 rounded-md overflow-hidden focus-within:ring-2 focus-within:ring-accent focus-within:border-transparent`},{default:j(()=>[z(k(VI).Input,{class:`flex-1 px-3 focus:outline-none`,placeholder:e.field.placeholder},null,8,[`placeholder`]),R(`div`,rz,[z(k(VI).IncrementTrigger,{class:`px-2 py-1 hover:bg-gray-100 cursor-pointer`},{default:j(()=>[z(r,{class:`w-3 h-3 text-gray-600`})]),_:1}),z(k(VI).DecrementTrigger,{class:`px-2 py-1 hover:bg-gray-100 cursor-pointer border-t border-gray-300`},{default:j(()=>[z(i,{class:`w-3 h-3 text-gray-600`})]),_:1})])]),_:1})]),_:1},8,[`modelValue`,`min`,`max`,`step`])}}}),az=({editor:e})=>{let t={text:Ice,textarea:Lce,boolean:ile,select:WN,radio:OP,range:GI,color:nz,number:iz};for(let[n,r]of Object.entries(t))e.ui.registerPropertyField({type:n,render:r})},oz=null;function sz(e={}){return oz=$t({channels:e.channels||[],channel:`default`,locale:`en`,theme:e.theme||null,templates:e.templates||[],pageData:null,images:e.images||[],categories:e.categories||new Map,products:e.products||new Map,cmsPages:e.cmsPages||new Map,haveEdits:e.haveEdits||!1}),oz}function cz(){if(!oz)throw Error(`State not initialized. Make sure to call createState first.`);function e(e){let t=oz.categories.get(e);if(t&&t.translations){let e=t.translations.find(e=>e.locale===oz.locale);if(e)return{...t,name:e.name,slug:e.slug}}return t}function t(){return Array.from(oz.categories.values()).map(e=>{if(e.translations){let t=e.translations.find(e=>e.locale===oz.locale);if(t)return{...e,name:t.name,slug:t.slug}}return e})}function n(e){return oz.products.get(e)}function r(){return Array.from(oz.products.values())}function i(e){let t=oz.cmsPages.get(e);if(t&&t.translations){let e=t.translations.find(e=>e.locale===oz.locale);if(e)return{...t,url_key:e.url_key,page_title:e.page_title}}return t}function a(){return Array.from(oz.cmsPages.values()).map(e=>{if(e.translations){let t=e.translations.find(e=>e.locale===oz.locale);if(t)return{...e,url_key:t.url_key,page_title:t.page_title}}return e})}return{state:oz,...vn(oz),currentTemplate:U(()=>{let e=oz.pageData?.template;return oz.templates.find(t=>t.template===e)||null}),getCategory:e,getCategories:t,getProduct:n,getProducts:r,getCmsPage:i,getCmsPages:a}}function lz(e){e.categories&&e.categories.forEach(e=>{oz.categories.set(e.id,e)}),e.products&&e.products.forEach(e=>{oz.products.set(e.id,e)}),e.cms_pages&&e.cms_pages.forEach(e=>{oz.cmsPages.set(e.id,e)})}var uz={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dz(e,t){return F(),I(`svg`,uz,[...t[0]||=[R(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`},[R(`path`,{d:`M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z`}),R(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0`})],-1)]])}var fz=D({name:`heroicons-cog-6-tooth`,render:dz}),pz={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mz(e,t){return F(),I(`svg`,pz,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m2.25 15.75l5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5m10.5-11.25h.008v.008h-.008zm.375 0a.375.375 0 1 1-.75 0a.375.375 0 0 1 .75 0`},null,-1)]])}var hz=D({name:`heroicons-photo`,render:mz});function gz(){let e=window.editorConfig.messages||{};return{t:t=>e[t]||t}}var _z={class:`pl-2`},vz={class:`font-medium text-base`},yz={class:`text-gray-700 text-xs`},bz={key:0,class:`text-gray-500`},xz=M({__name:`HeaderTitle`,setup(e){let{theme:t}=cz(),{t:n}=gz();return(e,r)=>(F(),I(`div`,_z,[R(`h1`,vz,E(k(n)(`title`)),1),R(`h2`,yz,[B(E(k(t)?.name)+` `,1),k(t)?.version?(F(),I(`span`,bz,`(v`+E(k(t).version)+`)`,1)):V(``,!0)])]))}}),Sz={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Cz(e,t){return F(),I(`svg`,Sz,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m19.5 8.25l-7.5 7.5l-7.5-7.5`},null,-1)]])}var wz=D({name:`heroicons-chevron-down`,render:Cz}),Tz={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ez(e,t){return F(),I(`svg`,Tz,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M12.75 3.03v.568c0 .334.148.65.405.864l1.068.89c.442.369.535 1.01.216 1.49l-.51.766a2.25 2.25 0 0 1-1.161.886l-.143.048a1.107 1.107 0 0 0-.57 1.664a1.108 1.108 0 0 1-.427 1.605L9 13.125l.423 1.059a.956.956 0 0 1-1.652.928l-.679-.906a1.125 1.125 0 0 0-1.906.172L4.5 15.75l-.612.153M12.75 3.031a9 9 0 0 0-8.862 12.872M12.75 3.031a9 9 0 0 1 6.69 14.036m0 0l-.177-.529A2.25 2.25 0 0 0 17.128 15H16.5l-.324-.324a1.453 1.453 0 0 0-2.328.377l-.036.073a1.6 1.6 0 0 1-.982.816l-.99.282c-.55.157-.894.702-.8 1.267l.073.438c.08.474.49.821.97.821c.846 0 1.598.542 1.865 1.345l.215.643m5.276-3.67a9 9 0 0 1-5.276 3.67m0 0a9 9 0 0 1-10.275-4.835M15.75 9c0 .896-.393 1.7-1.016 2.25`},null,-1)]])}var Dz=D({name:`heroicons-globe-asia-australia`,render:Ez}),Oz=(e,t=[])=>({parts:(...n)=>{if(Az(t))return Oz(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>Oz(e,[...t,...n]),omit:(...n)=>Oz(e,t.filter(e=>!n.includes(e))),rename:e=>Oz(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${kz(e)}"][data-part="${kz(n)}"]`,`& [data-scope="${kz(e)}"][data-part="${kz(n)}"]`].join(`, `),attrs:{"data-scope":kz(e),"data-part":kz(n)}}}),{})}),kz=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),Az=e=>e.length===0,jz=Oz(`menu`).parts(`arrow`,`arrowTip`,`content`,`contextTrigger`,`indicator`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`positioner`,`separator`,`trigger`,`triggerItem`).build();function Mz(e){return e==null?[]:Array.isArray(e)?e:[e]}var Nz=e=>e[0],Pz=e=>e[e.length-1],Fz=(e,...t)=>e.concat(t),Iz=(e,...t)=>e.filter(e=>!t.includes(e));function Lz(e,t,n={}){let{step:r=1,loop:i=!0}=n,a=t+r,o=e.length,s=o-1;return t===-1?r>0?0:s:a<0?i?s:0:a>=o?i?0:t>o?o:t:a}function Rz(e,t,n={}){return e[Lz(e,t,n)]}function zz(e,t,n={}){let{step:r=1,loop:i=!0}=n;return Lz(e,t,{step:-r,loop:i})}function Bz(e,t,n={}){return e[zz(e,t,n)]}function Vz(e){return e.reduce((e,t)=>Array.isArray(t)?e.concat(Vz(t)):e.concat(t),[])}var Hz=e=>e?.constructor.name===`Array`,Uz=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(Hz(e)&&Hz(t))return Uz(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;ttypeof e==`object`&&!!e,Kz=e=>typeof e==`string`,qz=e=>typeof e==`function`,Jz=e=>e==null,Yz=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Xz=e=>Object.prototype.toString.call(e),Zz=Function.prototype.toString,Qz=Zz.call(Object),$z=e=>{if(!Gz(e)||Xz(e)!=`[object Object]`||nB(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Yz(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Zz.call(n)==Qz},eB=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,tB=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,nB=e=>eB(e)||tB(e),rB=e=>e,iB=()=>{},aB=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},oB=(e,t)=>{try{return e()}catch(e){return e instanceof Error&&Error.captureStackTrace?.(e,oB),t?.()}},sB=e=>String.fromCharCode(e+(e>25?39:97));function cB(e){let t=``,n;for(n=Math.abs(e);n>52;n=n/52|0)t=sB(n%52)+t;return sB(n%52)+t}function lB(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}var uB=e=>cB(lB(5381,e)>>>0),{floor:dB,abs:fB,round:pB,min:mB,max:hB,pow:gB,sign:_B}=Math,vB=e=>Number.isNaN(e),yB=e=>vB(e)?0:e,bB=(e,t)=>(e%t+t)%t,xB=(e,t)=>(e%t+t)%t,SB=(e,t,n)=>e===0?n:t[e-1],CB=(e,t,n)=>e===t.length-1?n:t[e+1],wB=(e,t)=>yB(e)>=t,TB=(e,t)=>yB(e)<=t,EB=(e,t,n)=>{let r=yB(e);return(t==null||r>=t)&&(n==null||r<=n)},DB=(e,t,n)=>pB((yB(e)-t)/n)*n+t,OB=(e,t,n)=>mB(hB(yB(e),t),n),kB=e=>OB(e,0,1),AB=(e,t,n)=>(yB(e)-t)/(n-t),jB=(e,t,n,r)=>OB(DB(e*(n-t)+t,t,r),t,n),MB=(e,t)=>{let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>=0?r.length-i:0;if(a>0){let e=gB(10,a);n=pB(n*e)/e}return n},NB=(e,t)=>typeof t==`number`?dB(e*t+.5)/t:pB(e),PB=(e,t,n,r)=>{let i=t==null?0:Number(t),a=Number(n),o=(e-i)%r,s=fB(o)*2>=r?e+_B(o)*(r-fB(o)):e-o;if(s=MB(s,r),!vB(i)&&sa){let e=dB((a-i)/r),t=i+e*r;s=e<=0||te[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)];function IB(e,t){let n=SB(e,t.values,t.min),r=CB(e,t.values,t.max),i=t.values.slice();return function(a){let o=PB(a,n,r,t.step);return i=FB(i,e,a),i[e]=o,i}}function LB(e,t){let n=t.values[e]+t.step;return IB(e,t)(n)}function RB(e,t){let n=t.values[e]-t.step;return IB(e,t)(n)}var zB=(e,t,n,r)=>e.map((i,a)=>({min:a===0?t:e[a-1]+r,max:a===e.length-1?n:e[a+1]-r,value:i})),BB=(e,t)=>{let[n,r]=e,[i,a]=t;return e=>n===r||i===a?i:i+(a-i)/(r-n)*(e-n)},VB=(e,t=0,n=10)=>{let r=n**+t;return pB(e*r)/r},HB=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},UB=(e,t,n)=>{let r=t===`+`?e+n:e-n;if(e%1!=0||n%1!=0){let i=10**Math.max(HB(e),HB(n));e=Math.round(e*i),n=Math.round(n*i),r=t===`+`?e+n:e-n,r/=i}return r},WB=(e,t)=>UB(yB(e),`+`,t),GB=(e,t)=>UB(yB(e),`-`,t),KB=e=>typeof e==`number`?`${e}px`:e;function qB(e){if(!$z(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=qB(t))}return n}function JB(e,t){let n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}function YB(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function XB(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ZB(e,t){if(e==null)throw Error(t())}var QB=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),$B=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,eV=e=>{let t={},n;for(;n=$B.exec(e);)t[n[1]]=n[2];return t},tV=(e,t)=>{if(Kz(e)){if(Kz(t))return`${e};${t}`;e=eV(e)}else Kz(t)&&(t=eV(t));return Object.assign({},e??{},t??{})};function nV(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=aB(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=QB(t[e],n[e]);continue}if(e===`style`){t[e]=tV(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function rV(e,t,n){let r=[],i;return a=>{let o=e(a);return o.length!==r.length||o.some((e,t)=>!Wz(r[t],e))?(r=o,i=t(o,a),n?.onChange?.(i),i):i}}var iV=`.`,aV=`#`,oV=new WeakMap,sV=new WeakMap;function cV(e){return e.join(iV)}function lV(e){return e.includes(iV)}function uV(e){return e.startsWith(aV)}function dV(e){return e.startsWith(iV)}function fV(e){return uV(e)?e.slice(aV.length):e}function pV(e,t){return e?`${e}${iV}${t}`:t}function mV(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&XB(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){ZB(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||XB(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o))n&&r(pV(e,t),n)}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function hV(e){let t=oV.get(e);if(t)return t;let{index:n,idIndex:r}=mV(e);return oV.set(e,n),sV.set(e,r),n}function gV(e,t){return hV(e),sV.get(e)?.get(t)}function _V(e){return e?String(e).split(iV).filter(Boolean):[]}function vV(e,t){if(!t)return[];let n=hV(e),r=_V(t),i=[],a=[];for(let e of r){a.push(e);let t=cV(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function yV(e,t){let n=hV(e),r=_V(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=cV(i);if(!n.has(r))return t}let a=cV(i),o=n.get(a);for(;o?.initial;){let e=`${a}${iV}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function bV(e,t){return hV(e).has(t)}function xV(e,t,n){let r=String(t);if(uV(r)){let t=fV(r),n=gV(e,t);return ZB(n,()=>`[zag-js] Unknown state id: "${t}"`),yV(e,n)}if(dV(r)&&n)return yV(e,pV(n,r.slice(1)));if(!lV(r)&&n){let t=_V(n);for(let n=t.length-1;n>=1;n--){let i=pV(t.slice(0,n).join(iV),r);if(bV(e,i))return yV(e,i)}if(bV(e,r))return yV(e,r)}return yV(e,r)}function SV(e,t,n){let r=vV(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function CV(e,t,n,r){let i=t?vV(e,t):[],a=vV(e,n),o=0;for(;oe.state.tags?.includes(n))}function EV(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function DV(e){return hV(e),e}function OV(){return{guards:EV(),createMachine:e=>DV(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var kV=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(kV||{}),AV=`__init__`,jV=Object.defineProperty,MV=(e,t,n)=>t in e?jV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NV=(e,t,n)=>MV(e,typeof t==`symbol`?t:t+``,n);function PV(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var FV=e=>Math.max(0,Math.min(1,e)),IV=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),LV=()=>void 0,RV=e=>typeof e==`object`&&!!e,zV=2147483647,X=e=>e?``:void 0,BV=e=>e?`true`:void 0,VV=1,HV=9,UV=11,WV=e=>RV(e)&&e.nodeType===VV&&typeof e.nodeName==`string`,GV=e=>RV(e)&&e.nodeType===HV,KV=e=>RV(e)&&e===e.window,qV=e=>WV(e)?e.localName||``:`#document`;function JV(e){return[`html`,`body`,`#document`].includes(qV(e))}var YV=e=>RV(e)&&e.nodeType!==void 0,XV=e=>YV(e)&&e.nodeType===UV&&`host`in e,ZV=e=>WV(e)&&e.localName===`input`,QV=e=>!!e?.matches(`a[href]`),$V=e=>WV(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function eH(e){return e?sH(e.getRootNode())===e:!1}var tH=/(textarea|select)/;function nH(e){if(e==null||!WV(e))return!1;try{return ZV(e)&&e.selectionStart!=null||tH.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function rH(e,t){if(!e||!t||!WV(e)||!YV(t))return!1;if(WV(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&XV(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function iH(e){return GV(e)?e:KV(e)?e.document:e?.ownerDocument??document}function aH(e){return iH(e).documentElement}function oH(e){return XV(e)?oH(e.host):GV(e)?e.defaultView??window:WV(e)?e.ownerDocument?.defaultView??window:window}function sH(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function cH(e){if(qV(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||XV(e)&&e.host||aH(e);return XV(t)?t.host:t}function lH(e){let t;try{if(t=e.getRootNode({composed:!0}),GV(t)||XV(t))return t}catch{}return e.ownerDocument??document}var uH=new WeakMap;function dH(e){return uH.has(e)||uH.set(e,oH(e).getComputedStyle(e)),uH.get(e)}var fH=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`]),pH=e=>fH.has(e),mH=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function hH(e,t){let n=new Set,r=lH(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=mH(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&pH(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function gH(e,t){let n=lH(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=mH(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&fH.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function _H(e){let t=new Set;return gH(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function vH(e){let t=e.getAttribute(`role`);return!!(t&&fH.has(t))}function yH(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function bH(e){return yH(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function xH(e){if(!e.id)return!1;let t=lH(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&vH(e))}var SH=()=>typeof document<`u`;function CH(){return navigator.userAgentData?.platform??navigator.platform}function wH(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var TH=e=>SH()&&e.test(CH()),EH=e=>SH()&&e.test(wH()),DH=e=>SH()&&e.test(navigator.vendor),OH=()=>SH()&&!!navigator.maxTouchPoints,kH=()=>TH(/^iPhone/i),AH=()=>TH(/^iPad/i)||NH()&&navigator.maxTouchPoints>1,jH=()=>kH()||AH(),MH=()=>NH()||jH(),NH=()=>TH(/^Mac/i),PH=()=>MH()&&DH(/apple/i),FH=()=>EH(/Firefox/i),IH=()=>EH(/Android/i);function LH(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function RH(e){return LH(e)?.[0]??e.target}function zH(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=HH(e);return n||r}function BH(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function VH(e){return QH(e).isComposing||e.keyCode===229}function HH(e){return NH()?e.metaKey:e.ctrlKey}function UH(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function WH(e){return e.pointerType===``&&e.isTrusted?!0:IH()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var GH=e=>e.button===0,KH=e=>e.button===2||NH()&&e.ctrlKey&&e.button===0,qH=e=>e.ctrlKey||e.altKey||e.metaKey,JH=e=>`touches`in e&&e.touches.length>0,YH={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},XH={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function ZH(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=YH[i]??i,n===`rtl`&&r===`horizontal`&&i in XH&&(i=XH[i]),i}function QH(e){return e.nativeEvent??e}var $H=new Set([`PageUp`,`PageDown`]),eU=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function tU(e){return e.ctrlKey||e.metaKey?.1:$H.has(e.key)||e.shiftKey&&eU.has(e.key)?10:1}function nU(e,t=`client`){let n=JH(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var rU=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function iU(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=oH(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function aU(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function oU(e,t,n=`value`){if(!e)return;let r=aU(e);r&&iU(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function sU(e,t){let{value:n,bubbles:r=!0}=t;if(!e)return;let i=oH(e);if(!(e instanceof i.HTMLInputElement))return;oU(e,`${n}`);let a=new i.Event(`input`,{bubbles:r});e.dispatchEvent(mU(a))}function cU(e){return e.matches(`textarea, input, select, button`)}function lU(e,t){if(!e)return;let n=cU(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function uU(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(oH(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function dU(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[lU(e,r),uU(e,n)];return()=>i.forEach(e=>e?.())}var fU=Symbol.for(`zag.changeEvent`);function pU(e){return Object.prototype.hasOwnProperty.call(e,fU)}function mU(e){return pU(e)||Object.defineProperty(e,fU,{value:!0}),e}var hU=e=>WV(e)&&e.tagName===`IFRAME`,gU=/^(audio|video|details)$/;function _U(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var vU=e=>!Number.isNaN(_U(e)),yU=e=>_U(e)<0;function bU(e){return ZV(e)&&e.type===`radio`}function xU(e){if(!bU(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&EU(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function SU(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function CU(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s{o.set(t,e+n)});for(let n=e+t.length;n{o.set(t,e+n)})}i.push(...t)}}return r}var wU=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,TU=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(wU));(n==1||n==`if-empty`&&i.length===0)&&WV(e)&&EU(e)&&i.unshift(e);let a=[];for(let e of i)if(EU(e)){if(hU(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...TU(t,{getShadowRoot:r}));continue}a.push(e)}return r?CU(a,r,EU):a};function EU(e){return!WV(e)||e.closest(`[inert]`)?!1:e.matches(wU)&&$V(e)}function DU(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(wU));n&&OU(e)&&i.unshift(e);let a=[];for(let e of i)if(OU(e)){if(hU(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...DU(t,{getShadowRoot:r}));continue}a.push(e)}if(r){let e=CU(a,r,OU);return!e.length&&n?i:e}return!a.length&&n?i:a}function OU(e){return WV(e)&&e.tabIndex>0?!0:!EU(e)||yU(e)?!1:xU(e)}function kU(e,t={}){let n=DU(e,t);return[n[0]||null,n[n.length-1]||null]}function AU(e,t={}){let{current:n,getShadowRoot:r}=t,i=DU(e,{getShadowRoot:r}),a=e?.ownerDocument||document,o=n??sH(a);return o&&i[i.indexOf(o)+1]||null}function jU(e){return e.tabIndex<0&&(gU.test(e.localName)||nH(e))&&!vU(e)?0:e.tabIndex}function MU(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=null;if(a||=typeof n==`function`?n():n,a||=t?.querySelector(`[data-autofocus],[autofocus]`),!a){let e=DU(t);a=r?e.filter(r)[0]:e[0]}return a||t||void 0}function NU(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=kU(t);return!(eH(n)&&e.shiftKey||eH(r)&&!e.shiftKey||!n&&!r)}var PU=class e{constructor(){NV(this,`id`,null),NV(this,`fn_cleanup`),NV(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function FU(e){let t=PU.create();return t.request(e),t.cleanup}function IU(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function LU(e,t,n){let r=FU(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function RU(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function zU(e,t){let{defer:n}=t,r=n?FU:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(RU(n,t))})),()=>{i.forEach(e=>e?.())}}function BU(e,t){let{callback:n}=t;if(!e)return;let r=new(e.ownerDocument.defaultView||window).MutationObserver(n);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function VU(e,t){let{defer:n}=t,r=n?FU:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(BU(n,t))})),()=>{i.forEach(e=>e?.())}}function HU(e){let t=()=>{let t=oH(e);e.dispatchEvent(new t.MouseEvent(`click`))};FH()?LU(e,`keyup`,t):queueMicrotask(t)}function UU(e){let t=cH(e);return JV(t)?iH(t).body:WV(t)&&KU(t)?t:UU(t)}var WU=/auto|scroll|overlay|hidden|clip/,GU=new Set([`inline`,`contents`]);function KU(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=oH(e).getComputedStyle(e);return WU.test(t+r+n)&&!GU.has(i)}function qU(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function JU(e,t){let{rootEl:n,...r}=t||{};!e||!n||!KU(n)||!qU(n)||e.scrollIntoView(r)}function YU(e,t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect(),o={x:e.x-n,y:e.y-r},s={x:FV(o.x/i),y:FV(o.y/a)};function c(e={}){let{dir:t=`ltr`,orientation:n=`horizontal`,inverted:r}=e,i=typeof r==`object`?r.x:r,a=typeof r==`object`?r.y:r;return n===`horizontal`?t===`rtl`||i?1-s.x:s.x:a?1-s.y:s.y}return{offset:o,percent:s,getPercentValue:c}}function XU(e,t){let n=e.body,r=`pointerLockElement`in e||`mozPointerLockElement`in e,i=()=>!!e.pointerLockElement;function a(){t?.(i())}function o(n){i()&&t?.(!1),console.error(`PointerLock error occurred:`,n),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}let s=[rU(e,`pointerlockchange`,a,!1),rU(e,`pointerlockerror`,o,!1)];return()=>{s.forEach(e=>e()),e.exitPointerLock()}}var ZU=`default`,QU=``,$U=new WeakMap;function eW(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return jH()?(ZU===`default`&&(QU=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),ZU=`disabled`):t&&($U.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>tW({target:t,doc:r})}function tW(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(jH()){if(ZU!==`disabled`)return;ZU=`restoring`,setTimeout(()=>{IU(()=>{ZU===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=QU||``),QU=``,ZU=`default`)})},300)}else if(t&&$U.has(t)){let e=$U.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),$U.delete(t)}}function nW(e={}){let{defer:t,target:n,...r}=e,i=t?FU:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(eW({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function rW(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=nU(e);if(!(Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5))){if(e.pointerType===`mouse`&&e.buttons===0){a(e);return}n({point:t,event:e})}},a=e=>{r({point:nU(e),event:e})},o=[rU(e,`pointermove`,i,!1),rU(e,`pointerup`,a,!1),rU(e,`pointercancel`,a,!1),rU(e,`contextmenu`,a,!1),nW({doc:e})];return()=>{o.forEach(e=>e())}}function iW(e,t={}){let{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:a}=t,o=e?.ownerDocument||document,s=o.body;function c(t){if(t.key!==`Tab`)return;let o=null,[c,l]=kU(e,{includeContainer:!0,getShadowRoot:a}),u=AU(s,{current:n,getShadowRoot:a}),d=!c&&!l;t.shiftKey&&eH(u)?(i?.(),o=l):t.shiftKey&&(eH(c)||d)?o=n:!t.shiftKey&&eH(n)?(i?.(),o=c):!t.shiftKey&&(eH(l)||d)&&(o=u),o&&(t.preventDefault(),typeof r==`function`?r(o):o.focus())}return rU(o,`keydown`,c,!0)}function aW(e,t){let{defer:n,triggerElement:r,...i}=t,a=n?FU:e=>e(),o=[];return o.push(a(()=>{let t=typeof e==`function`?e():e,n=typeof r==`function`?r():r;o.push(iW(t,{triggerElement:n,...i}))})),()=>{o.forEach(e=>e?.())}}function oW(e,t){return Array.from(e?.querySelectorAll(t)??[])}function sW(e,t){return e?.querySelector(t)??null}var cW=e=>e.id;function lW(e,t,n=cW){return e.find(e=>n(e)===t)}function uW(e,t,n=cW){let r=lW(e,t,n);return r?e.indexOf(r):-1}function dW(e,t,n=!0){let r=uW(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function fW(e,t,n=!0){let r=uW(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function pW(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=t.get(n)||new Set;a.add(r),t.set(n,a);let o=oH(n);return i(o).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(o).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var mW=pW({box:`border-box`}),hW=e=>e.split(``).map(e=>{let t=e.charCodeAt(0);return t>0&&t<128?e:t>=128&&t<=255?`/x${t.toString(16)}`.replace(`/`,`\\`):``}).join(``).trim(),gW=e=>hW(e.dataset?.valuetext??e.textContent??``),_W=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function vW(e,t,n,r=cW){let i=n?uW(e,n,r):-1,a=n?IV(e,i):e;return t.length===1&&(a=a.filter(e=>r(e)!==n)),a.find(e=>_W(gW(e),t))}function yW(e,t,n){let r=e.getAttribute(t),i=r!=null;return r===n?LV:(e.setAttribute(t,n),()=>{i?e.setAttribute(t,r):e.removeAttribute(t)})}function bW(e,t){if(!e)return LV;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return SW(n,t)?LV:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function xW(e,t,n){if(!e)return LV;let r=e.style.getPropertyValue(t);return r===n?LV:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function SW(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function CW(e,t){let{state:n,activeId:r,key:i,timeout:a=350,itemToId:o}=t,s=n.keysSoFar+i,c=s.length>1&&Array.from(s).every(e=>e===s[0])?s[0]:s,l=vW(e.slice(),c,r,o);function u(){clearTimeout(n.timer),n.timer=-1}function d(e){n.keysSoFar=e,u(),e!==``&&(n.timer=+setTimeout(()=>{d(``),u()},a))}return d(s),l}var wW=Object.assign(CW,{defaultOptions:{keysSoFar:``,timer:-1},isValidEvent:TW});function TW(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var EW={border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`};function DW(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function OW(e,t){let{timeout:n,rootNode:r}=t,i=oH(r),a=iH(r),o=new i.AbortController;return DW(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function kW(e){let t=()=>e.getRootNode?.()??document,n=()=>iH(t()),r=()=>n().defaultView??window,i=()=>sH(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:eH,getById:a}}var AW=[`top`,`right`,`bottom`,`left`],jW=Math.min,MW=Math.max,NW=Math.round,PW=Math.floor,FW=e=>({x:e,y:e}),IW={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function LW(e,t,n){return MW(e,jW(t,n))}function RW(e,t){return typeof e==`function`?e(t):e}function zW(e){return e.split(`-`)[0]}function BW(e){return e.split(`-`)[1]}function VW(e){return e===`x`?`y`:`x`}function HW(e){return e===`y`?`height`:`width`}function UW(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function WW(e){return VW(UW(e))}function GW(e,t,n){n===void 0&&(n=!1);let r=BW(e),i=WW(e),a=HW(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=eG(o)),[o,eG(o)]}function KW(e){let t=eG(e);return[qW(e),t,qW(t)]}function qW(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var JW=[`left`,`right`],YW=[`right`,`left`],XW=[`top`,`bottom`],ZW=[`bottom`,`top`];function QW(e,t,n){switch(e){case`top`:case`bottom`:return n?t?YW:JW:t?JW:YW;case`left`:case`right`:return t?XW:ZW;default:return[]}}function $W(e,t,n,r){let i=BW(e),a=QW(zW(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(qW)))),a}function eG(e){let t=zW(e);return IW[t]+e.slice(t.length)}function tG(e){return{top:0,right:0,bottom:0,left:0,...e}}function nG(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:tG(e)}function rG(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function iG(e,t,n){let{reference:r,floating:i}=e,a=UW(t),o=WW(t),s=HW(o),c=zW(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(BW(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function aG(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=RW(t,e),p=nG(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=rG(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=rG(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var oG=50,sG=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:aG},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=iG(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=RW(e,t)||{};if(l==null)return{};let d=nG(u),f={x:n,y:r},p=WW(i),m=HW(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let ee=b/2-x/2,te=C/2-h[m]/2-1,w=jW(d[_],te),T=jW(d[v],te),ne=w,re=C-h[m]-T,ie=C/2-h[m]/2+ee,ae=LW(ne,ie,re),oe=!c.arrow&&BW(i)!=null&&ie!==ae&&a.reference[m]/2-(iee<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==UW(t))||te.every(e=>UW(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:te},reset:{placement:t}};let n=te.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=te.filter(e=>{if(x){let t=UW(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function uG(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dG(e){return AW.some(t=>e[t]>=0)}var fG=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=RW(e,t);switch(i){case`referenceHidden`:{let e=uG(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:dG(e)}}}case`escaped`:{let e=uG(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:dG(e)}}}default:return{}}}}},pG=new Set([`left`,`top`]);async function mG(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zW(n),s=BW(n),c=UW(n)===`y`,l=pG.has(o)?-1:1,u=a&&c?-1:1,d=RW(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var hG=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mG(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},gG=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=RW(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=UW(zW(i)),p=VW(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=LW(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=LW(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},_G=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=RW(e,t),u={x:n,y:r},d=UW(i),f=VW(d),p=u[f],m=u[d],h=RW(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=pG.has(zW(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},vG=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=RW(e,t),u=await o.detectOverflow(t,l),d=zW(i),f=BW(i),p=UW(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=jW(h-u[g],v),x=jW(m-u[_],y),S=!t.middlewareData.shift,C=b,ee=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ee=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=MW(u.left,0),t=MW(u.right,0),n=MW(u.top,0),r=MW(u.bottom,0);p?ee=m-2*(e!==0||t!==0?e+t:MW(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:MW(u.top,u.bottom))}await c({...t,availableWidth:ee,availableHeight:C});let te=await o.getDimensions(s.floating);return m!==te.width||h!==te.height?{reset:{rects:!0}}:{}}}};function yG(){return typeof window<`u`}function bG(e){return CG(e)?(e.nodeName||``).toLowerCase():`#document`}function xG(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function SG(e){return((CG(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function CG(e){return yG()?e instanceof Node||e instanceof xG(e).Node:!1}function wG(e){return yG()?e instanceof Element||e instanceof xG(e).Element:!1}function TG(e){return yG()?e instanceof HTMLElement||e instanceof xG(e).HTMLElement:!1}function EG(e){return!yG()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xG(e).ShadowRoot}function DG(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=RG(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function OG(e){return/^(table|td|th)$/.test(bG(e))}function kG(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var AG=/transform|translate|scale|rotate|perspective|filter/,jG=/paint|layout|strict|content/,MG=e=>!!e&&e!==`none`,NG;function PG(e){let t=wG(e)?RG(e):e;return MG(t.transform)||MG(t.translate)||MG(t.scale)||MG(t.rotate)||MG(t.perspective)||!IG()&&(MG(t.backdropFilter)||MG(t.filter))||AG.test(t.willChange||``)||jG.test(t.contain||``)}function FG(e){let t=BG(e);for(;TG(t)&&!LG(t);){if(PG(t))return t;if(kG(t))return null;t=BG(t)}return null}function IG(){return NG??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),NG}function LG(e){return/^(html|body|#document)$/.test(bG(e))}function RG(e){return xG(e).getComputedStyle(e)}function zG(e){return wG(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function BG(e){if(bG(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||EG(e)&&e.host||SG(e);return EG(t)?t.host:t}function VG(e){let t=BG(e);return LG(t)?e.ownerDocument?e.ownerDocument.body:e.body:TG(t)&&DG(t)?t:VG(t)}function HG(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=VG(e),i=r===e.ownerDocument?.body,a=xG(r);if(i){let e=UG(a);return t.concat(a,a.visualViewport||[],DG(r)?r:[],e&&n?HG(e):[])}else return t.concat(r,HG(r,[],n))}function UG(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WG(e){let t=RG(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=TG(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=NW(n)!==a||NW(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function GG(e){return wG(e)?e:e.contextElement}function KG(e){let t=GG(e);if(!TG(t))return FW(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=WG(t),o=(a?NW(n.width):n.width)/r,s=(a?NW(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var qG=FW(0);function JG(e){let t=xG(e);return!IG()||!t.visualViewport?qG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function YG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xG(e)?!1:t}function XG(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=GG(e),o=FW(1);t&&(r?wG(r)&&(o=KG(r)):o=KG(e));let s=YG(a,n,r)?JG(a):FW(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=xG(a),t=r&&wG(r)?xG(r):r,n=e,i=UG(n);for(;i&&r&&t!==n;){let e=KG(i),t=i.getBoundingClientRect(),r=RG(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xG(i),i=UG(n)}}return rG({width:u,height:d,x:c,y:l})}function ZG(e,t){let n=zG(e).scrollLeft;return t?t.left+n:XG(SG(e)).left+n}function QG(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ZG(e,n),y:n.top+t.scrollTop}}function $G(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=SG(r),s=t?kG(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=FW(1),u=FW(0),d=TG(r);if((d||!d&&!a)&&((bG(r)!==`body`||DG(o))&&(c=zG(r)),d)){let e=XG(r);l=KG(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?QG(o,c):FW(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function eK(e){return Array.from(e.getClientRects())}function tK(e){let t=SG(e),n=zG(e),r=e.ownerDocument.body,i=MW(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=MW(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ZG(e),s=-n.scrollTop;return RG(r).direction===`rtl`&&(o+=MW(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var nK=25;function rK(e,t){let n=xG(e),r=SG(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=IG();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ZG(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=nK&&(a-=o)}else l<=nK&&(a+=l);return{width:a,height:o,x:s,y:c}}function iK(e,t){let n=XG(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=TG(e)?KG(e):FW(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function aK(e,t,n){let r;if(t===`viewport`)r=rK(e,n);else if(t===`document`)r=tK(SG(e));else if(wG(t))r=iK(t,n);else{let n=JG(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return rG(r)}function oK(e,t){let n=BG(e);return n===t||!wG(n)||LG(n)?!1:RG(n).position===`fixed`||oK(n,t)}function sK(e,t){let n=t.get(e);if(n)return n;let r=HG(e,[],!1).filter(e=>wG(e)&&bG(e)!==`body`),i=null,a=RG(e).position===`fixed`,o=a?BG(e):e;for(;wG(o)&&!LG(o);){let t=RG(o),n=PG(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||DG(o)&&!n&&oK(e,o))?r=r.filter(e=>e!==o):i=t,o=BG(o)}return t.set(e,r),r}function cK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?kG(t)?[]:sK(t,this._c):[].concat(n),r],o=aK(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!_K(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function yK(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=GG(e),u=i||a?[...l?HG(l):[],...t?HG(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?vK(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?XG(e):null;c&&g();function g(){let t=XG(e);h&&!_K(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var bK=hG,xK=gG,SK=lG,CK=vG,wK=fG,TK=cG,EK=_G,DK=(e,t,n)=>{let r=new Map,i={platform:gK,...n},a={...i.platform,_c:r};return sG(e,t,{...i,platform:a})};function OK(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function kK(e){if(!e)return OK();let{x:t,y:n,width:r,height:i}=e;return OK(t,n,r,i)}function AK(e,t){return{contextElement:WV(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?kK(r):n.getBoundingClientRect()}}}var jK=e=>({variable:e,reference:`var(${e})`}),MK={arrowSize:jK(`--arrow-size`),arrowSizeHalf:jK(`--arrow-size-half`),arrowBg:jK(`--arrow-background`),transformOrigin:jK(`--transform-origin`),arrowOffset:jK(`--arrow-offset`)},NK=e=>e===`top`||e===`bottom`?`y`:`x`;function PK(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=NK(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,ee=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(MK.transformOrigin.variable,ee?C:S),{data:{transformOrigin:ee?C:S}}}}}var FK={name:`rects`,fn({rects:e}){return{data:e}}},IK=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${MK.arrowOffset.reference})`}),{}}}};function LK(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function RK(e){return e.split(`-`)[0]}var zK={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function BK(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function VK(e,t){return e!=null&&Math.abs(e-t)<.5}function HK(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function UK(e,t,n){return TK({element:e||t.createElement(`div`),padding:n.arrowPadding})}function WK(e,t){if(!Jz(t.offset??t.gutter))return bK(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=LK(n),s=o?void 0:t.shift;return qB({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function GK(e){if(!e.flip)return;let t=HK(e.boundary);return SK({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function KK(e){if(!e.slide&&!e.overlap)return;let t=HK(e.boundary);return xK({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:EK()})}function qK(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return CK({padding:e.overflowPadding,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),VK(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),VK(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),VK(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),VK(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}})}function JK(e){if(e.hideWhenDetached)return wK({strategy:`referenceHidden`,boundary:HK(e.boundary)??`clippingAncestors`})}function YK(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var XK=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],ZK=[`top`,`right`,`bottom`,`left`];function QK(e,t){if(!e)return iB;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function $K(e){return e==null?null:WV(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function eq(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:AK(e,n.getAnchorRect)},o=Object.assign({},zK,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?QK(e,XK):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?QK(t,ZK):void 0,s=[WK(t,o),GK(o),KK(o),UK(t,e.ownerDocument,o),IK(t),PK({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),qK(o),JK(o),FK]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=iB,S=YK(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();!t||!n||($K(e)!==$K(y)||n!==b)&&(x(),y=e,b=n,x=yK(t,n,te,S))}async function ee(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await DK(t,e,{placement:f,middleware:s,strategy:p});m?.(n);let i=oH(e),l=BK(i,n.x),u=BK(i,n.y);if(VK(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),VK(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,dH(t).zIndex),v=!0)}}async function te(){n.updatePosition?(await n.updatePosition({updatePosition:ee,floatingElement:r()}),h?.({placed:!0})):await ee()}return te(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function tq(e,t,n={}){let{defer:r,...i}=n,a=r?FU:e=>e(),o=[];return o.push(a(()=>{o.push(eq(e,t,i))})),()=>{o.forEach(e=>e?.())}}var nq={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function rq(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:MK.arrowSize.reference,height:MK.arrowSize.reference,[MK.arrowSizeHalf.variable]:`calc(${MK.arrowSize.reference} / 2)`,[MK.arrowOffset.variable]:`calc(${MK.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?nq[t.split(`-`)[0]]:void 0,background:MK.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var iq=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`menu:${e.id}:trigger:${t}`:`menu:${e.id}:trigger`:qz(n)?n(t):n},aq=(e,t)=>{let n=e.ids?.contextTrigger;return n==null?t?`menu:${e.id}:ctx-trigger:${t}`:`menu:${e.id}:ctx-trigger`:qz(n)?n(t):n},oq=e=>e.ids?.content??`menu:${e.id}:content`,sq=e=>e.ids?.arrow??`menu:${e.id}:arrow`,cq=e=>e.ids?.positioner??`menu:${e.id}:popper`,lq=(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,uq=(e,t)=>`${e.id}/${t}`,dq=e=>e?.dataset.value??null,fq=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,pq=e=>e.getById(oq(e)),mq=e=>e.getById(cq(e)),hq=e=>e.getById(iq(e)),gq=(e,t)=>t?e.getById(uq(e,t)):null,_q=e=>e.getById(aq(e)),vq=e=>oW(e.getDoc(),`[data-scope="menu"][data-part="trigger"][data-ownedby="${e.id}"]`),yq=e=>oW(e.getDoc(),`[data-scope="menu"][data-part="context-trigger"][data-ownedby="${e.id}"]`),bq=(e,t)=>t==null?hq(e)??vq(e)[0]:e.getById(iq(e,t)),xq=e=>{let t=`[role^="menuitem"][data-ownedby=${CSS.escape(oq(e))}]:not([data-disabled])`;return oW(pq(e),t)},Sq=e=>Nz(xq(e)),Cq=e=>Pz(xq(e)),wq=(e,t)=>t?e.id===t||e.dataset.value===t:!1,Tq=(e,t)=>{let n=xq(e);return Rz(n,n.findIndex(e=>wq(e,t.value)),{loop:t.loop??t.loopFocus})},Eq=(e,t)=>{let n=xq(e);return Bz(n,n.findIndex(e=>wq(e,t.value)),{loop:t.loop??t.loopFocus})},Dq=(e,t)=>{let n=xq(e),r=n.find(e=>wq(e,t.value));return wW(n,{state:t.typeaheadState,key:t.key,activeId:r?.id??null})},Oq=e=>WV(e)&&(e.dataset.disabled===``||e.hasAttribute(`disabled`)),kq=e=>!!e?.getAttribute(`role`)?.startsWith(`menuitem`)&&!!e?.hasAttribute(`data-controls`),Aq=`menu:select`;function jq(e,t){if(!e)return;let n=new(oH(e)).CustomEvent(Aq,{detail:{value:t}});e.dispatchEvent(n)}function Mq(e){let t=oq(e);return pq(e)??e.getDoc().getElementById(t)}function Nq(e,t){if(!WV(e))return!1;for(let n in t){let r=t[n],i=Mq(r.scope);if(i&&rH(i,e))return!0;let a=r.refs.get(`children`);if(Object.keys(a).length>0&&Nq(e,a))return!0}return!1}var Pq=(e,t)=>({x:e,y:t});function Fq(e){let{x:t,y:n,width:r,height:i}=e,a=t+r/2,o=n+i/2;return{x:t,y:n,width:r,height:i,minX:t,minY:n,maxX:t+r,maxY:n+i,midX:a,midY:o,center:Pq(a,o)}}function Iq(e){return{top:Pq(e.minX,e.minY),right:Pq(e.maxX,e.minY),bottom:Pq(e.maxX,e.maxY),left:Pq(e.minX,e.maxY)}}function Lq(e,t){let{top:n,right:r,left:i,bottom:a}=Iq(Fq(e)),[o]=t.split(`-`);return{top:[i,n,r,a],right:[n,r,a,i],bottom:[n,i,a,r],left:[r,n,i,a]}[o]}function Rq(e,t){let{x:n,y:r}=t,i=!1;for(let t=0,a=e.length-1;tr!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function zq(e){let t=e.parent;for(;t&&t.context.get(`isSubmenu`);)t=t.refs.get(`parent`);t?.send({type:`CLOSE`})}function Bq(e,t){return e?Rq(e,t):!1}function Vq(e,t,n){let r=Object.keys(e).length>0;if(!t)return null;if(!r)return uq(n,t);for(let n in e){let r=e[n],i=iq(r.scope);if(i===t)return i}return uq(n,t)}function Hq(e,t){e&&(e.refs.set(`pointerRoutingLocked`,t),e.context.set(`pointerRoutingMode`,t?`locked`:`interactive`))}function Uq(e){let t=e.context.get(`highlightedValue`);if(!t)return!1;let n=e.refs.get(`children`);for(let e in n){let r=n[e];if(r.state.hasTag(`open`)&&iq(r.scope)===t)return!0}return!1}function Wq(e,t){e&&(e.refs.get(`pointerRoutingLocked`)||t&&Uq(e)||Hq(e,!1))}function Gq(e){e&&(Uq(e)||Hq(e,!1))}function Kq(e,t){let{context:n,send:r,state:i,computed:a,prop:o,scope:s}=e,c=i.hasTag(`open`),l=n.get(`isSubmenu`),u=a(`isTypingAhead`),d=o(`composite`),f=n.get(`currentPlacement`),p=n.get(`anchorPoint`),m=n.get(`highlightedValue`),h=n.get(`triggerValue`),g=rq({...o(`positioning`),placement:p?`bottom`:f});function _(e){return{id:uq(s,e.value),disabled:!!e.disabled,highlighted:m===e.value}}function v(e){let t=e.valueText??e.value;return{...e,id:e.value,valueText:t}}function y(e){return{..._(v(e)),checked:!!e.checked}}function b(n){let{closeOnSelect:i,valueText:a,value:o}=n,c=_(n),l=uq(s,o);return t.element({...jz.item.attrs,id:l,role:`menuitem`,"aria-disabled":BV(c.disabled),"data-disabled":X(c.disabled),"data-ownedby":oq(s),"data-highlighted":X(c.highlighted),"data-value":o,"data-valuetext":a,onDragStart(e){e.currentTarget.matches(`a[href]`)&&e.preventDefault()},onPointerMove(e){if(c.disabled||e.pointerType!==`mouse`)return;let t=e.currentTarget;c.highlighted||r({type:`ITEM_POINTERMOVE`,id:l,target:t,closeOnSelect:i,point:nU(e)})},onPointerLeave(t){if(c.disabled||t.pointerType!==`mouse`||!e.event.previous()?.type.includes(`POINTER`))return;let n=t.currentTarget;r({type:`ITEM_POINTERLEAVE`,id:l,target:n,closeOnSelect:i})},onPointerDown(e){if(c.disabled)return;let t=e.currentTarget;r({type:`ITEM_POINTERDOWN`,target:t,id:l,closeOnSelect:i})},onClick(e){if(BH(e)||zH(e)||c.disabled)return;let t=e.currentTarget;r({type:`ITEM_CLICK`,target:t,id:l,closeOnSelect:i})}})}return{highlightedValue:m,open:c,setOpen(e){i.hasTag(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:h,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},setHighlightedValue(e){r({type:`HIGHLIGHTED.SET`,value:e})},setParent(e){r({type:`PARENT.SET`,value:e,id:e.prop(`id`)})},setChild(e){r({type:`CHILD.SET`,value:e,id:e.prop(`id`)})},reposition(e={}){r({type:`POSITIONING.SET`,options:e})},addItemListener(e){let t=s.getById(e.id);if(!t)return;let n=()=>e.onSelect?.();return t.addEventListener(Aq,n),()=>t.removeEventListener(Aq,n)},getContextTriggerProps(e={}){let{value:n}=e,i=n==null?!1:h===n,a=aq(s,n);return t.element({...jz.contextTrigger.attrs,dir:o(`dir`),id:a,"data-ownedby":s.id,"data-value":n,"data-current":X(i),"data-state":c?`open`:`closed`,onPointerDown(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_START`,point:nU(e),value:n})},onPointerCancel(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onPointerMove(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onPointerUp(e){e.pointerType!==`mouse`&&r({type:`CONTEXT_MENU_CANCEL`})},onContextMenu(e){let t=nU(e);r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`CONTEXT_MENU`,point:t,value:n}),e.preventDefault()},style:{WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`}})},getTriggerItemProps(e){let t=e.getTriggerProps();return nV(b({value:t.id}),t)},getTriggerProps(i={}){let{value:a}=i,u=a==null?!1:h===a,f=iq(s,a);return t.button({...l?jz.triggerItem.attrs:jz.trigger.attrs,"data-placement":n.get(`currentPlacement`),type:`button`,dir:o(`dir`),id:f,...a!=null&&{"data-ownedby":s.id,"data-value":a,"data-current":X(u)},"data-uid":o(`id`),"aria-haspopup":d?`menu`:`dialog`,"aria-controls":oq(s),"data-controls":oq(s),"aria-expanded":a==null?c:c&&u,"data-state":c?`open`:`closed`,onPointerMove(e){if(e.pointerType!==`mouse`||Oq(e.currentTarget)||!l)return;let t=nU(e);r({type:`TRIGGER_POINTERMOVE`,target:e.currentTarget,point:t})},onPointerLeave(t){if(Oq(t.currentTarget)||t.pointerType!==`mouse`||!l)return;Hq(e.refs.get(`parent`),!0);let n=nU(t);r({type:`TRIGGER_POINTERLEAVE`,target:t.currentTarget,point:n})},onPointerDown(e){Oq(e.currentTarget)||KH(e)||e.preventDefault()},onClick(e){e.defaultPrevented||Oq(e.currentTarget)||r({type:c&&a!=null&&!u?`TRIGGER_VALUE.SET`:`TRIGGER_CLICK`,target:e.currentTarget,value:a})},onBlur(){r({type:`TRIGGER_BLUR`})},onFocus(){r({type:`TRIGGER_FOCUS`})},onKeyDown(e){if(e.defaultPrevented)return;let t={ArrowDown(){r({type:`ARROW_DOWN`,value:a})},ArrowUp(){r({type:`ARROW_UP`,value:a})},Enter(){r({type:`ARROW_DOWN`,src:`enter`,value:a})},Space(){r({type:`ARROW_DOWN`,src:`space`,value:a})}}[ZH(e,{orientation:`vertical`,dir:o(`dir`)})];t&&(e.preventDefault(),t(e))}})},getIndicatorProps(){return t.element({...jz.indicator.attrs,dir:o(`dir`),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...jz.positioner.attrs,dir:o(`dir`),id:cq(s),style:g.floating})},getArrowProps(){return t.element({id:sq(s),...jz.arrow.attrs,dir:o(`dir`),style:g.arrow})},getArrowTipProps(){return t.element({...jz.arrowTip.attrs,dir:o(`dir`),style:g.arrowTip})},getContentProps(){return t.element({...jz.content.attrs,id:oq(s),"aria-label":o(`aria-label`),hidden:!c,"data-state":c?`open`:`closed`,role:d?`menu`:`dialog`,tabIndex:0,dir:o(`dir`),"aria-activedescendant":a(`highlightedId`)||void 0,"aria-labelledby":p?aq(s,h??void 0):iq(s,h??void 0),"data-placement":f,onPointerEnter(e){e.pointerType===`mouse`&&r({type:`MENU_POINTERENTER`})},onKeyDown(e){if(e.defaultPrevented||!rH(e.currentTarget,RH(e)))return;let t=RH(e);if(!(t?.closest(`[role=menu]`)===e.currentTarget||t===e.currentTarget))return;if(e.key===`Tab`&&!NU(e)){e.preventDefault();return}let n={ArrowDown(){r({type:`ARROW_DOWN`})},ArrowUp(){r({type:`ARROW_UP`})},ArrowLeft(){r({type:`ARROW_LEFT`})},ArrowRight(){r({type:`ARROW_RIGHT`})},Enter(){r({type:`ENTER`})},Space(e){u?r({type:`TYPEAHEAD`,key:e.key}):n.Enter?.(e)},Home(){r({type:`HOME`})},End(){r({type:`END`})}},i=n[ZH(e,{dir:o(`dir`)})];if(i){i(e),e.stopPropagation(),e.preventDefault();return}o(`typeahead`)&&UH(e)&&(qH(e)||nH(t)||(r({type:`TYPEAHEAD`,key:e.key}),e.preventDefault()))}})},getSeparatorProps(){return t.element({...jz.separator.attrs,role:`separator`,dir:o(`dir`),"aria-orientation":`horizontal`})},getItemState:_,getItemProps:b,getOptionItemState:y,getOptionItemProps(e){let{type:n,disabled:i,closeOnSelect:a}=e,s=v(e),c=y(e);return{...b(s),...t.element({"data-type":n,...jz.item.attrs,dir:o(`dir`),"data-value":s.value,role:`menuitem${n}`,"aria-checked":!!c.checked,"data-state":c.checked?`checked`:`unchecked`,onClick(e){if(i||BH(e)||zH(e))return;let t=e.currentTarget;r({type:`ITEM_CLICK`,target:t,option:s,closeOnSelect:a})}})}},getItemIndicatorProps(e){let n=y(rB(e)),r=n.checked?`checked`:`unchecked`;return t.element({...jz.itemIndicator.attrs,dir:o(`dir`),"data-disabled":X(n.disabled),"data-highlighted":X(n.highlighted),"data-state":Yz(e,`checked`)?r:void 0,hidden:Yz(e,`checked`)?!n.checked:void 0})},getItemTextProps(e){let n=y(rB(e)),r=n.checked?`checked`:`unchecked`;return t.element({...jz.itemText.attrs,dir:o(`dir`),"data-disabled":X(n.disabled),"data-highlighted":X(n.highlighted),"data-state":Yz(e,`checked`)?r:void 0})},getItemGroupLabelProps(e){return t.element({...jz.itemGroupLabel.attrs,id:fq(s,e.htmlFor),dir:o(`dir`)})},getItemGroupProps(e){return t.element({id:lq(s,e.id),...jz.itemGroup.attrs,dir:o(`dir`),"aria-labelledby":fq(s,e.id),role:`group`})}}}function qq(e){let t={each(t){for(let n=0;n{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Jq(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var Yq=`pointerdown.outside`,Xq=`focus.outside`;function Zq(e){for(let t of e)if(WV(t)&&EU(t))return!0;return!1}var Qq=e=>`clientY`in e;function $q(e,t){if(!Qq(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function eJ(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function tJ(e,t){if(!t||!Qq(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return eJ({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function nJ(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=iH(e),l=oH(e),u=qq(l),d=Jq(l);function f(t,r){if(!WV(r)||!r.isConnected||rH(e,r)||$q(e,t)||s&&hH(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&tJ(t,UU(i))||tJ(t,UU(e))?!1:!n?.(r)}let p=new Set,m=XV(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!OH()?FU:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:RH(t);if(!(!e||!f(t,n))){if(i||a){let t=aB(i,a);e.addEventListener(Yq,t,{once:!0})}iJ(e,Yq,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:KH(s),focusable:Zq(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(rU(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(rU(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?FU:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:RH(t);if(!(!e||!f(t,i))){if(r||a){let t=aB(r,a);e.addEventListener(Xq,t,{once:!0})}iJ(e,Xq,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:EU(i),target:i}})}})}return OH()||(_.add(rU(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function rJ(e,t){let{defer:n}=t,r=n?FU:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(nJ(n,t))})),()=>{i.forEach(e=>e?.())}}function iJ(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function aJ(e,t){return rU(iH(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var oJ=`layer:request-dismiss`,sJ={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>rH(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>rH(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),IU(()=>this.recentlyRemoved.delete(e)),tsJ.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty(`--layer-index`,`${t}`),e.node.removeAttribute(`data-nested`),e.node.removeAttribute(`data-has-nested`),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute(`data-nested`,e.type);let n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute(`data-has-nested`,e.type),e.node.style.setProperty(`--nested-layer-count`,`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];lJ(e,oJ,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),cJ(e,oJ,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function cJ(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function lJ(e,t,n){e.addEventListener(t,n,{once:!0})}var uJ;function dJ(){sJ.layers.forEach(({node:e})=>{e.style.pointerEvents=sJ.isBelowPointerBlockingLayer(e)?`none`:`auto`})}function fJ(e){e.style.pointerEvents=``}function pJ(e,t){let n=iH(e),r=[];return sJ.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(uJ=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents=`none`,n.body.setAttribute(`data-inert`,``)})),t?.forEach(e=>{let[t,n]=OW(()=>{let t=e();return WV(t)?t:null},{timeout:1e3});t.then(e=>r.push(bW(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{sJ.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=uJ,n.body.removeAttribute(`data-inert`),n.body.style.length===0&&n.body.removeAttribute(`style`)}),r.forEach(e=>e()))}}function mJ(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){YB("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`}=t,l={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i};sJ.add(l),dJ();function u(n){let i=RH(n.detail.originalEvent);sJ.isBelowPointerBlockingLayer(e)||sJ.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function d(e){let n=RH(e.detail.originalEvent);sJ.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function f(n){sJ.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function p(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(WV);return a&&i.push(...a),i.some(e=>rH(e,n))||sJ.isInNestedLayer(e,n)}let m=[a?pJ(e,t.persistentElements):void 0,aJ(e,f),rJ(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{sJ.remove(e),dJ(),fJ(e),m.forEach(e=>e?.())}}function hJ(e,t){let{defer:n}=t,r=n?FU:e=>e(),i=[];return i.push(r(()=>{let n=qz(e)?e():e;i.push(mJ(n,t))})),()=>{i.forEach(e=>e?.())}}function gJ(e){return!(e.metaKey||!NH()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var _J=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function vJ(e,t,n){let r=n?RH(n):null,i=iH(r),a=oH(r),o=sH(i);return e=e||o instanceof a.HTMLInputElement&&!_J.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(wJ,n.key))}var yJ=null,bJ=new Set,xJ=new Map,SJ=!1,CJ=!1,wJ={Tab:!0,Escape:!0};function TJ(e,t){for(let n of bJ)n(e,t)}function EJ(e){SJ=!0,gJ(e)&&(yJ=`keyboard`,TJ(`keyboard`,e))}function DJ(e){yJ=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(SJ=!0,TJ(`pointer`,e))}function OJ(e){WH(e)&&(SJ=!0,yJ=`virtual`)}function kJ(e){let t=RH(e);t===oH(t)||t===iH(t)||!e.isTrusted||(!SJ&&!CJ&&(yJ=`virtual`,TJ(`virtual`,e)),SJ=!1,CJ=!1)}function AJ(){SJ=!1,CJ=!0}function jJ(e){if(typeof window>`u`||xJ.get(oH(e)))return;let t=oH(e),n=iH(e),r=t.HTMLElement.prototype.focus;function i(){SJ=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,`focus`,{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,EJ,!0),n.addEventListener(`keyup`,EJ,!0),n.addEventListener(`click`,OJ,!0),t.addEventListener(`focus`,kJ,!0),t.addEventListener(`blur`,AJ,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,DJ,!0),n.addEventListener(`mousemove`,DJ,!0),n.addEventListener(`mouseup`,DJ,!0)):(n.addEventListener(`pointerdown`,DJ,!0),n.addEventListener(`pointermove`,DJ,!0),n.addEventListener(`pointerup`,DJ,!0)),t.addEventListener(`beforeunload`,()=>{MJ(e)},{once:!0}),xJ.set(t,{focus:r})}var MJ=(e,t)=>{let n=oH(e),r=iH(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=xJ.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,`focus`,{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,EJ,!0),r.removeEventListener(`keyup`,EJ,!0),r.removeEventListener(`click`,OJ,!0),n.removeEventListener(`focus`,kJ,!0),n.removeEventListener(`blur`,AJ,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,DJ,!0),r.removeEventListener(`mousemove`,DJ,!0),r.removeEventListener(`mouseup`,DJ,!0)):(r.removeEventListener(`pointerdown`,DJ,!0),r.removeEventListener(`pointermove`,DJ,!0),r.removeEventListener(`pointerup`,DJ,!0)),xJ.delete(n)}};function NJ(){return yJ}function PJ(e){yJ=e,TJ(e,null)}function FJ(){return yJ===`keyboard`||yJ===`virtual`}function IJ(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;jJ(i),r?.({isFocusVisible:n||FJ(),modality:yJ});let a=(e,n)=>{vJ(!!t,e,n)&&r?.({isFocusVisible:FJ(),modality:e})};return bJ.add(a),()=>{bJ.delete(a)}}var{not:LJ,and:RJ,or:zJ}=EV(),BJ=DV({props({props:e}){return{closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(e){HU(e.node)},...e,positioning:{placement:`bottom-start`,gutter:8,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`idle`},context({bindable:e,prop:t,scope:n}){return{highlightedValue:e(()=>({defaultValue:t(`defaultHighlightedValue`)||null,value:t(`highlightedValue`),onChange(e){t(`onHighlightChange`)?.({highlightedValue:e})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(e){return`x: ${e?.x}, y: ${e?.y}`}})),isSubmenu:e(()=>({defaultValue:!1})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:bq(n,e)})}})),pointerRoutingMode:e(()=>({defaultValue:`interactive`}))}},refs(){return{parent:null,children:{},pointerRoutingLocked:!1,typeaheadState:{...wW.defaultOptions},positioningOverride:{}}},computed:{isRtl:({prop:e})=>e(`dir`)===`rtl`,isTypingAhead:({refs:e})=>e.get(`typeaheadState`).keysSoFar!==``,highlightedId:({context:e,scope:t,refs:n})=>Vq(n.get(`children`),e.get(`highlightedValue`),t)},watch({track:e,action:t,context:n,prop:r}){e([()=>n.get(`isSubmenu`)],()=>{t([`setSubmenuPlacement`])}),e([()=>n.hash(`anchorPoint`)],()=>{n.get(`anchorPoint`)&&t([`reposition`])}),e([()=>r(`open`)],()=>{t([`toggleVisibility`])})},on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`setAnchorPoint`,`reposition`,`focusMenu`]},"PARENT.SET":{actions:[`setParentMenu`]},"CHILD.SET":{actions:[`setChildMenu`]},OPEN:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],OPEN_AUTOFOCUS:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`highlightFirstItem`,`invokeOnOpen`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]}],"HIGHLIGHTED.RESTORE":{actions:[`restoreHighlightedItem`]},"HIGHLIGHTED.SET":{actions:[`setHighlightedItem`]},"HIGHLIGHTED.SUGGEST":{actions:[`suggestHighlightedItem`]}},states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`},CONTEXT_MENU_START:{target:`opening:contextmenu`,actions:[`setAnchorPoint`,`setTriggerValue`]},CONTEXT_MENU:[{guard:`isOpenControlled`,actions:[`setAnchorPoint`,`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setAnchorPoint`,`setTriggerValue`,`invokeOnOpen`]}],TRIGGER_CLICK:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TRIGGER_FOCUS:{guard:LJ(`isSubmenu`),target:`closed`},TRIGGER_POINTERMOVE:{guard:`isSubmenu`,target:`opening`}}},"opening:contextmenu":{tags:[`closed`],effects:[`waitForLongPress`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`,actions:[`focusTrigger`]},CONTEXT_MENU_CANCEL:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]}],"LONG_PRESS.OPEN":[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}]}},opening:{tags:[`closed`],effects:[`waitForOpenDelay`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`,actions:[`focusTrigger`]},BLUR:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]}],TRIGGER_POINTERLEAVE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]}],"DELAY.OPEN":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`]}]}},closing:{tags:[`open`],effects:[`trackPointerMove`,`trackInteractOutside`,`waitForCloseDelay`],on:{"CONTROLLED.OPEN":{target:`open`},"CONTROLLED.CLOSE":{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`]},MENU_POINTERENTER:{target:`open`,actions:[`clearIntentPolygon`]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`]}],"DELAY.CLOSE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{target:`closed`,actions:[`focusParentMenu`,`restoreParentHighlightedItem`,`invokeOnClose`,`releaseParentRoutingLock`]}]}},closed:{tags:[`closed`],entry:[`clearHighlightedItem`,`unlockParentOnClose`,`clearAnchorPoint`],on:{"CONTROLLED.OPEN":[{guard:zJ(`isOpenAutoFocusEvent`,`isArrowDownEvent`),target:`open`,actions:[`highlightFirstItem`]},{guard:`isArrowUpEvent`,target:`open`,actions:[`highlightLastItem`]},{target:`open`}],CONTEXT_MENU_START:{target:`opening:contextmenu`,actions:[`setAnchorPoint`,`setTriggerValue`]},CONTEXT_MENU:[{guard:`isOpenControlled`,actions:[`setAnchorPoint`,`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setAnchorPoint`,`setTriggerValue`,`invokeOnOpen`]}],TRIGGER_CLICK:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TRIGGER_POINTERMOVE:{guard:`isTriggerItem`,target:`opening`},TRIGGER_BLUR:{target:`idle`},ARROW_DOWN:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`highlightFirstItem`,`invokeOnOpen`]}],ARROW_UP:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`highlightLastItem`,`invokeOnOpen`]}]}},open:{tags:[`open`],effects:[`trackInteractOutside`,`trackFocusVisible`,`trackPositioning`,`scrollToHighlightedItem`],entry:[`focusMenu`,`unlockParentOnOpen`],on:{"CONTROLLED.CLOSE":[{target:`closed`,guard:`isArrowLeftEvent`,actions:[`focusParentMenu`]},{target:`closed`,actions:[`focusTrigger`]}],TRIGGER_CLICK:[{guard:RJ(LJ(`isTriggerItem`),`isOpenControlled`),actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{guard:LJ(`isTriggerItem`),target:`closed`,actions:[`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]}],CONTEXT_MENU:{actions:[`setAnchorPoint`,`setTriggerValue`,`focusMenu`]},ARROW_UP:{actions:[`highlightPrevItem`,`focusMenu`]},ARROW_DOWN:{actions:[`highlightNextItem`,`focusMenu`]},ARROW_LEFT:[{guard:RJ(`isSubmenu`,`isOpenControlled`),actions:[`invokeOnClose`,`releaseParentRoutingLock`]},{guard:`isSubmenu`,target:`closed`,actions:[`focusParentMenu`,`invokeOnClose`,`releaseParentRoutingLock`]}],HOME:{actions:[`highlightFirstItem`,`focusMenu`]},END:{actions:[`highlightLastItem`,`focusMenu`]},ARROW_RIGHT:{guard:`isTriggerItemHighlighted`,actions:[`openSubmenu`]},ENTER:[{guard:`isTriggerItemHighlighted`,actions:[`openSubmenu`]},{actions:[`clickHighlightedItem`]}],ITEM_POINTERMOVE:[{guard:LJ(`isPointerRoutingLocked`),actions:[`setHighlightedItem`,`focusMenu`,`closeSiblingMenus`]},{actions:[`setLastHighlightedItem`,`closeSiblingMenus`]}],ITEM_POINTERLEAVE:{guard:RJ(LJ(`isPointerRoutingLocked`),LJ(`isTriggerItem`)),actions:[`clearHighlightedItem`]},ITEM_CLICK:[{guard:RJ(LJ(`isTriggerItemHighlighted`),LJ(`isHighlightedItemEditable`),`closeOnSelect`,`isOpenControlled`),actions:[`invokeOnSelect`,`setOptionState`,`closeRootMenu`,`invokeOnClose`,`releaseParentRoutingLock`]},{guard:RJ(LJ(`isTriggerItemHighlighted`),LJ(`isHighlightedItemEditable`),`closeOnSelect`),target:`closed`,actions:[`invokeOnSelect`,`setOptionState`,`closeRootMenu`,`invokeOnClose`,`releaseParentRoutingLock`,`focusTrigger`]},{guard:RJ(LJ(`isTriggerItemHighlighted`),LJ(`isHighlightedItemEditable`)),actions:[`invokeOnSelect`,`setOptionState`]},{actions:[`setHighlightedItem`]}],TRIGGER_POINTERMOVE:{guard:`isTriggerItem`,actions:[`setIntentPolygon`]},TRIGGER_POINTERLEAVE:{target:`closing`,actions:[`setIntentPolygon`]},ITEM_POINTERDOWN:{actions:[`setHighlightedItem`]},TYPEAHEAD:{actions:[`highlightMatchedItem`]},FOCUS_MENU:{actions:[`focusMenu`]},"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e(`closeOnSelect`)),isTriggerItem:({event:e})=>kq(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>!!(e.target??t.getById(n(`highlightedId`)))?.hasAttribute(`data-controls`),isSubmenu:({context:e})=>e.get(`isSubmenu`),isPointerRoutingLocked:({refs:e})=>e.get(`pointerRoutingLocked`),isHighlightedItemEditable:({scope:e,computed:t})=>nH(e.getById(t(`highlightedId`))),isOpenControlled:({prop:e})=>e(`open`)!==void 0,isArrowLeftEvent:({event:e})=>e.previousEvent?.type===`ARROW_LEFT`,isArrowUpEvent:({event:e})=>e.previousEvent?.type===`ARROW_UP`,isArrowDownEvent:({event:e})=>e.previousEvent?.type===`ARROW_DOWN`,isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type===`OPEN_AUTOFOCUS`},effects:{waitForOpenDelay({send:e}){let t=setTimeout(()=>{e({type:`DELAY.OPEN`})},200);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){let t=setTimeout(()=>{e({type:`DELAY.CLOSE`})},100);return()=>clearTimeout(t)},waitForLongPress({send:e}){let t=setTimeout(()=>{e({type:`LONG_PRESS.OPEN`})},700);return()=>clearTimeout(t)},trackFocusVisible({scope:e}){return IJ({root:e.getRootNode?.()})},trackPositioning({context:e,prop:t,scope:n,refs:r}){if(_q(n)||yq(n).length>0)return;let i={...t(`positioning`),...r.get(`positioningOverride`)};return e.set(`currentPlacement`,i.placement),tq(()=>bq(n,e.get(`triggerValue`)),()=>mq(n),{...i,defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackInteractOutside({refs:e,scope:t,prop:n,context:r,send:i}){let a=()=>pq(t),o=!0,s=e=>yq(t).some(t=>rH(t,e));return hJ(a,{type:`menu`,defer:!0,exclude:[hq(t),...vq(t)].filter(Boolean),onInteractOutside:n(`onInteractOutside`),onRequestDismiss:n(`onRequestDismiss`),onFocusOutside(t){n(`onFocusOutside`)?.(t);let r=RH(t.detail.originalEvent);if(s(r)){t.preventDefault();return}if(Nq(r,e.get(`children`))){t.preventDefault();return}},onEscapeKeyDown(t){n(`onEscapeKeyDown`)?.(t),r.get(`isSubmenu`)&&t.preventDefault(),zq({parent:e.get(`parent`)})},onPointerDownOutside(e){if(n(`onPointerDownOutside`)?.(e),s(RH(e.detail.originalEvent))&&e.detail.contextmenu){e.preventDefault();return}o=!e.detail.focusable},onDismiss(){i({type:`CLOSE`,src:`interact-outside`,restoreFocus:o})}})},trackPointerMove({context:e,scope:t,send:n,refs:r}){let i=r.get(`parent`);if(i)return Hq(i,!0),rU(t.getDoc(),`pointermove`,t=>{Bq(e.get(`intentPolygon`),{x:t.clientX,y:t.clientY})||(n({type:`POINTER_MOVED_AWAY_FROM_SUBMENU`}),Hq(i,!1))})},scrollToHighlightedItem({scope:e,computed:t}){let n=()=>{NJ()!==`pointer`&&JU(e.getById(t(`highlightedId`)),{rootEl:pq(e),block:`nearest`})};return FU(()=>{PJ(`virtual`),n()}),zU(()=>pq(e),{defer:!0,attributes:[`aria-activedescendant`],callback:n})}},actions:{setAnchorPoint({context:e,event:t}){e.set(`anchorPoint`,e=>Wz(e,t.point)?e:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get(`isSubmenu`))return;let r=t(`isRtl`)?`left-start`:`right-start`;n.set(`positioningOverride`,{placement:r,gutter:0})},reposition({context:e,scope:t,prop:n,event:r,refs:i}){let a=()=>mq(t),o=r.point??e.get(`anchorPoint`),s=o?()=>({width:0,height:0,...o}):void 0,c={...n(`positioning`),...i.get(`positioningOverride`)},l=r.value??e.get(`triggerValue`);tq(()=>bq(t,l),a,{...c,defer:!0,getAnchorRect:s,...r.options??{},listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setOptionState({event:e}){if(!e.option)return;let{checked:t,onCheckedChange:n,type:r}=e.option;r===`radio`?n?.(!0):r===`checkbox`&&n?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:n,context:r}){let i=e.getById(t(`highlightedId`));if(!i||i.dataset.disabled)return;let a=r.get(`highlightedValue`);QV(i)?n(`navigate`)?.({value:a,node:i,href:i.href}):queueMicrotask(()=>i.click())},setIntentPolygon({context:e,scope:t,event:n}){let r=pq(t),i=e.get(`currentPlacement`);if(!r||!i)return;let a=Lq(r.getBoundingClientRect(),i);if(!a)return;let o=RK(i)===`right`?-5:5;e.set(`intentPolygon`,[{...n.point,x:n.point.x+o},...a])},clearIntentPolygon({context:e}){e.set(`intentPolygon`,null)},clearAnchorPoint({context:e}){e.set(`anchorPoint`,null)},unlockParentOnOpen({refs:e,context:t,scope:n}){let r=e.get(`parent`);if(t.get(`isSubmenu`)){let e=iq(n);r?.send({type:`HIGHLIGHTED.SUGGEST`,value:e})}Hq(r,!1)},unlockParentOnClose({refs:e,context:t}){Wq(e.get(`parent`),t.get(`isSubmenu`))},setHighlightedItem({context:e,event:t}){let n=t.value||dq(t.target);e.set(`highlightedValue`,n)},clearHighlightedItem({context:e}){e.set(`highlightedValue`,null)},focusMenu({scope:e}){FU(()=>{let t=pq(e);MU({root:t,enabled:!rH(t,e.getActiveElement()),filter(e){return!e.role?.startsWith(`menuitem`)}})?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(pq(t)?queueMicrotask:FU)(()=>{let n=Sq(t);n&&e.set(`highlightedValue`,dq(n))})},highlightLastItem({context:e,scope:t}){(pq(t)?queueMicrotask:FU)(()=>{let n=Cq(t);n&&e.set(`highlightedValue`,dq(n))})},highlightNextItem({context:e,scope:t,event:n,prop:r}){let i=Tq(t,{loop:n.loop,value:e.get(`highlightedValue`),loopFocus:r(`loopFocus`)});e.set(`highlightedValue`,dq(i))},highlightPrevItem({context:e,scope:t,event:n,prop:r}){let i=Eq(t,{loop:n.loop,value:e.get(`highlightedValue`),loopFocus:r(`loopFocus`)});e.set(`highlightedValue`,dq(i))},invokeOnSelect({context:e,prop:t,scope:n}){let r=e.get(`highlightedValue`);r!=null&&(jq(gq(n,r),r),t(`onSelect`)?.({value:r}))},focusTrigger({scope:e,context:t,event:n}){t.get(`isSubmenu`)||t.get(`anchorPoint`)||n.restoreFocus===!1||queueMicrotask(()=>{bq(e,t.get(`triggerValue`))?.focus({preventScroll:!0})})},highlightMatchedItem({scope:e,context:t,event:n,refs:r}){let i=Dq(e,{key:n.key,value:t.get(`highlightedValue`),typeaheadState:r.get(`typeaheadState`)});i&&t.set(`highlightedValue`,dq(i))},setParentMenu({refs:e,event:t,context:n}){e.set(`parent`,t.value),n.set(`isSubmenu`,!0)},setChildMenu({refs:e,event:t}){let n=e.get(`children`);n[t.id]=t.value,e.set(`children`,n)},closeSiblingMenus({refs:e,event:t,scope:n}){let r=t.target;if(!kq(r))return;let i=r?.getAttribute(`data-uid`),a=e.get(`children`);for(let e in a){if(e===i)continue;let r=a[e],o=r.context.get(`intentPolygon`);o&&t.point&&Rq(o,t.point)||(pq(n)?.focus({preventScroll:!0}),r.send({type:`CLOSE`}))}},closeRootMenu({refs:e}){zq({parent:e.get(`parent`)})},openSubmenu({refs:e,scope:t,computed:n}){let r=t.getById(n(`highlightedId`))?.getAttribute(`data-uid`),i=e.get(`children`);(r?i[r]:null)?.send({type:`OPEN_AUTOFOCUS`})},focusParentMenu({refs:e}){e.get(`parent`)?.send({type:`FOCUS_MENU`})},setLastHighlightedItem({context:e,event:t}){e.set(`lastHighlightedValue`,dq(t.target))},suggestHighlightedItem({context:e,event:t}){let n=t.value;if(n){if(e.get(`highlightedValue`)!=null){e.set(`lastHighlightedValue`,n);return}e.set(`highlightedValue`,n)}},restoreHighlightedItem({context:e}){let t=e.get(`lastHighlightedValue`);e.set(`lastHighlightedValue`,null),t&&e.set(`highlightedValue`,t)},restoreParentHighlightedItem({refs:e}){e.get(`parent`)?.send({type:`HIGHLIGHTED.RESTORE`})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},releaseParentRoutingLock({refs:e,context:t}){t.get(`isSubmenu`)&&Gq(e.get(`parent`))},toggleVisibility({prop:e,event:t,send:n}){n({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:t})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)}}}});function VJ(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var HJ=e=>{let t=Symbol(e);return[e=>ar(t,e),e=>or(t,e),t]},[UJ,WJ]=HJ(`MenuContext`);function GJ(e){let t=A(e);return t?.$el??t}var KJ=e=>Object.prototype.hasOwnProperty.call(e,`nodeName`)&&typeof e.nodeName==`string`;function Z(){let e=Ko(),t=O(),n=U(()=>[`#text`,`#comment`].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:GJ(t)),r=Object.assign({},e.exposed),i={};for(let t in e.props)Object.defineProperty(i,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(r).length>0)for(let e in r)Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>r[e]});Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function a(n){t.value=n,n&&(Object.defineProperty(i,`$el`,{enumerable:!0,configurable:!0,get:()=>KJ(n)?n:n.$el}),e.exposed=i)}return{forwardRef:a,currentRef:t,currentElement:n}}function qJ(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var JJ={htmlFor:`for`,className:`class`,onDoubleClick:`onDblclick`,onChange:`onInput`,onFocus:`onFocusin`,onBlur:`onFocusout`,defaultValue:`value`,defaultChecked:`checked`},YJ=`viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit`.split(`,`);function XJ(e){return e in JJ?JJ[e]:e.startsWith(`on`)?`on${qJ(e.substr(2))}`:YJ.includes(e)?e:e.toLowerCase()}var ZJ=VJ(e=>{let t={};for(let n in e){let r=e[n];n===`children`?typeof r==`string`&&(t.innerHTML=r):t[XJ(n)]=e[n]}return t});function QJ(e){let t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=fn(t),i=U(()=>e().value!==void 0);return{initial:t,ref:fn(i.value?e().value:r.value),get(){return i.value?e().value:r.value},set(t){let a=i.value?e().value:r.value,o=qz(t)?t(a):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:o,prev:a}),i.value||(r.value=o),n(o,a)||e().onChange?.(o,a)},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}QJ.cleanup=e=>{Ai(()=>e())},QJ.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function $J(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var eY=(e,t)=>{pr(()=>[...e.map(e=>e())],(e,n)=>{let r=!1;for(let t=0;t{let{id:e,ids:n,getRootNode:r}=A(t);return kW({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=nY(U(()=>e.props?.({props:qB(A(t)),get scope(){return n.value}})??A(t))),a=e.context?.({prop:i,bindable:QJ,get scope(){return n.value},flush:rY,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a[e]?.get()},set(e,t){a[e]?.set(t)},initial(e){return a[e]?.initial},hash(e){let t=a[e]?.get();return a[e]?.hash(t)}},s=new Map,c=null,l={current:null},u={current:{type:``}},d=()=>({...u.current,current(){return u.current},previous(){return l.current}}),f=()=>({...b,matches(...e){let t=b.get();return e.some(e=>wV(t,e))},hasTag(t){return TV(e,b.get(),t)}}),p=$J(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:C,action:h,guard:g,track:eY,refs:p,computed:y,flush:rY,get scope(){return n.value},choose:v}),h=t=>{let n=qz(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||YB(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>qz(t)?t(m()):e.implementations?.guards?.[t](m()),_=t=>{let n=qz(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||YB(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>Mz(e).find(e=>{let t=!e.guard;return Kz(e.guard)?t=!!g(e.guard):qz(e.guard)&&(t=e.guard(m())),t}),y=t=>{ZB(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:d(),prop:i,refs:p,get scope(){return n.value},computed:y})},b=QJ(()=>({defaultValue:xV(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=CV(e,n,t,c?.reenter);if(r.forEach(e=>{s.get(e.path)?.(),s.delete(e.path)}),r.forEach(e=>{h(e.state?.exit)}),h(c?.actions),i.forEach(e=>{let t=_(e.state?.effects);t&&s.set(e.path,t)}),n===`__init__`){h(e.entry);let t=_(e.effects);t&&s.set(AV,t)}i.forEach(e=>{h(e.state?.entry)})}})),x=kV.NotStarted,S=[];Ei(()=>{let e=x===kV.Started;x=kV.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,AV);let t=S;S=[];for(let e of t)C(e)}),ki(()=>{x=kV.Stopped,S=[],r(`unmounting...`);let t=s.values();for(let e of t)e?.();s=new Map,h(e.exit)});let C=t=>{if(x!==kV.Started){S.push(t);return}l.current=u.current,u.current=t;let n=b.get(),{transitions:i,source:a}=SV(e,n,t.type),o=v(i);if(!o)return;c=o;let s=xV(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?b.invoke(n,n):h(o.actions):b.set(s)};return e.watch?.(m()),{state:f(),send:C,context:o,prop:i,get scope(){return n.value},refs:p,computed:y,event:d(),getStatus:()=>x}}function nY(e){return function(t){return e.value[t]}}var rY=e=>{zn().then(()=>{e()})},iY=M({name:`Dynamic`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=aY(n.default()),[r,...i]=e;if(r&&Object.keys(t).length>0){delete r.props?.ref;let n=nV(t,r.props??{}),a=zo(r,n);for(let e in n)e.startsWith(`on`)&&(a.props||={},a.props[e]=n[e]);return e.length===1?a:[a,...i]}return e}}});function aY(e){return e?e.flatMap(e=>e.type===P?aY(e.children):[e]):[]}var oY=`br, hr, img, input, area, textarea`.split(`, `),sY=e=>typeof e==`string`&&oY.includes(e),cY=e=>M({name:`Polymorphic`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>cs(iY,n,r):()=>cs(e,n,sY(e)?void 0:r.default?.())}});function lY(){let e=new Map;return new Proxy(cY,{apply(e,t,n){return cY(n[0])},get(t,n){return e.has(n)||e.set(n,cY(n)),e.get(n)}})}var Q=lY(),uY=M({__name:`menu-arrow-tip`,props:{asChild:{type:Boolean}},setup(e){let t=WJ();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getArrowTipProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),dY=M({__name:`menu-arrow`,props:{asChild:{type:Boolean}},setup(e){let t=WJ();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getArrowProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),[fY,pY]=HJ(`MenuItemContext`),[mY,hY]=HJ(`MenuItemPropsContext`),gY=M({__name:`menu-checkbox-item`,props:Xi({checked:{type:Boolean},value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{checked:void 0,disabled:void 0,closeOnSelect:void 0}),emits:[`update:checked`],setup(e,{emit:t}){let n=e,r=t,i=WJ(),a=U(()=>({...n,type:`checkbox`,onCheckedChange:e=>r(`update:checked`,e)}));return fY(U(()=>i.value.getOptionItemState(a.value))),mY(a),Z(),(t,n)=>(F(),L(k(Q).div,H(k(i).getOptionItemProps(a.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),[_Y,vY]=HJ(`PresenceContext`),yY=M({__name:`menu-content`,props:{asChild:{type:Boolean}},setup(e){let t=WJ(),n=vY(),r=U(()=>nV(t.value.getContentProps(),n.value.presenceProps));return Z(),(t,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),bY=M({__name:`menu-context-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=WJ();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getContextTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),xY=M({__name:`menu-context`,setup(e){let t=WJ();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),SY=M({__name:`menu-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=WJ();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),CY=M({__name:`menu-item-context`,setup(e){let t=pY();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),[wY,TY]=HJ(`MenuItemGroupContext`),EY=M({__name:`menu-item-group-label`,props:{asChild:{type:Boolean}},setup(e){let t=WJ(),n=TY();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getItemGroupLabelProps({htmlFor:k(n).id}),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),DY=M({__name:`menu-item-group`,props:{id:{},asChild:{type:Boolean}},setup(e){let t=e,n=WJ(),r=Hr(),i=t.id??r,a=U(()=>({id:i}));return wY(a),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getItemGroupProps(a.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),OY=M({__name:`menu-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=WJ(),n=hY();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),kY=M({__name:`menu-item-text`,props:{asChild:{type:Boolean}},setup(e){let t=WJ(),n=hY();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getItemTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),AY=M({__name:`menu-item`,props:Xi({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=WJ(),a=U(()=>i.value.getItemState(n));return mY(U(()=>n)),fY(a),Ei(()=>{let e=i.value.addItemListener({id:a.value.id,onSelect:()=>r(`select`)});ki(()=>e?.())}),Z(),(t,r)=>(F(),L(k(Q).div,H(k(i).getItemProps(n),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),jY=M({__name:`menu-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=WJ(),n=vY();return Z(),(r,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),MY=M({__name:`menu-radio-item-group`,props:{id:{},modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=WJ(),a=Hr(),o=n.id??a,s=U(()=>({id:o,value:n.modelValue,onValueChange:e=>r(`update:modelValue`,e.value)}));return wY(s),Z(),(t,n)=>(F(),L(k(Q).div,H(k(i).getItemGroupProps(s.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),NY=M({__name:`menu-radio-item`,props:Xi({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),setup(e){let t=e,n=WJ(),r=TY(),i=U(()=>({...t,checked:r.value.value===t.value,type:`radio`,onCheckedChange:()=>r.value.onValueChange?.({value:t.value})}));return fY(U(()=>n.value.getOptionItemState(i.value))),mY(i),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getOptionItemProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),[PY,FY]=HJ(`RenderStrategyProps`);function IY(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var LY=DV({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(oH(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,dH(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});FU(()=>{if(r(`present`))return;let i=RY(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{FU(()=>{e.set(`prevAnimationName`,RY(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,RY(t.get(`styles`)))},o=a=>{let o=RY(t.get(`styles`));RH(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{RH(e)===i&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=bW(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),IU(()=>c())}}}}});function RY(e){return e?.animationName||`none`}var zY=(e,t)=>{let n=O(!1),r=O(null),i=tY(LY,U(()=>({present:A(e).present,onExitComplete:()=>t?.(`exitComplete`)}))),a=U(()=>IY(i,ZJ));return pr(()=>a.value.present,()=>{a.value.present&&(n.value=!0)}),pr(r,()=>{if(r.value){let e=r.value.$el?r.value.$el:r.value;e&&a.value.setNode(e)}}),U(()=>{let t=A(e);return{present:a.value.present,unmounted:!a.value.present&&!n.value&&t.lazyMount||t?.unmountOnExit&&!a.value?.present&&n.value,presenceProps:{ref:r,hidden:!a.value.present,"data-state":a.value.skip&&t.skipAnimationOnMount?void 0:t?.present?`open`:`closed`}}})},[BY,VY]=HJ(`MenuMachineContext`),[HY,UY]=HJ(`MenuTriggerItemContext`),WY=M({__name:`menu-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:[`exitComplete`],setup(e,{emit:t}){let n=e,r=t,{value:{machine:i,api:a}}=n,o=zY(U(()=>({present:a.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r),s=WJ(),c=VY();return Ei(()=>{c&&(s.value.setChild(i),a.value.setParent(c))}),HY(U(()=>s.value.getTriggerItemProps(a.value))),BY(i),UJ(a),_Y(o),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),[Gle,GY]=HJ(`EnvironmentContext`),KY=U(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),qY=U(()=>({dir:`ltr`,locale:`en-US`})),[Kle,JY]=HJ(`LocaleContext`),YY=e=>{let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},XY=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(BJ,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...YY(a),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onTriggerValueChange:e=>{t?.(`triggerValueChange`,e),a.onTriggerValueChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onHighlightChange:e=>{t?.(`highlightChange`,e),t?.(`update:highlightedValue`,e.highlightedValue),a.onHighlightChange?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)},onSelect:e=>{t?.(`select`,e),a.onSelect?.(e)}}}));return{api:U(()=>Kq(a,ZJ)),machine:a}},ZY=M({__name:`menu-root`,props:Xi({anchorPoint:{},"aria-label":{},closeOnSelect:{type:Boolean},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},highlightedValue:{},id:{},ids:{},loopFocus:{type:Boolean},navigate:{type:Function},open:{type:Boolean},positioning:{},typeahead:{type:Boolean},triggerValue:{},defaultTriggerValue:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,loopFocus:void 0,open:void 0,typeahead:void 0}),emits:[`escapeKeyDown`,`exitComplete`,`focusOutside`,`highlightChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`select`,`triggerValueChange`,`update:open`,`update:highlightedValue`],setup(e,{emit:t}){let n=e,r=t,{api:i,machine:a}=XY(n,r),o=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r),s=WJ(),c=VY();return Ei(()=>{c&&(s.value.setChild(a),i.value.setParent(c))}),HY(U(()=>s.value.getTriggerItemProps(i.value))),BY(a),UJ(i),_Y(o),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),QY=M({__name:`menu-separator`,props:{asChild:{type:Boolean}},setup(e){let t=WJ();return Z(),(n,r)=>(F(),L(k(Q).hr,H(k(t).getSeparatorProps(),{"as-child":e.asChild}),null,16,[`as-child`]))}}),$Y=M({__name:`menu-trigger-item`,props:{asChild:{type:Boolean}},setup(e){let t=UY();return mY(U(()=>({value:t.value?.[`data-value`]}))),Z(),(n,r)=>(F(),L(k(Q).div,H(k(t),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),eX=M({__name:`menu-trigger`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=WJ();return Z(),(r,i)=>(F(),L(k(Q).button,H(k(n).getTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),tX=Object.defineProperty,nX=(e,t)=>{let n={};for(var r in e)tX(n,r,{get:e[r],enumerable:!0});return t||tX(n,Symbol.toStringTag,{value:`Module`}),n},rX=nX({Arrow:()=>dY,ArrowTip:()=>uY,CheckboxItem:()=>gY,Content:()=>yY,Context:()=>xY,ContextTrigger:()=>bY,Indicator:()=>SY,Item:()=>AY,ItemContext:()=>CY,ItemGroup:()=>DY,ItemGroupLabel:()=>EY,ItemIndicator:()=>OY,ItemText:()=>kY,Positioner:()=>jY,RadioItem:()=>NY,RadioItemGroup:()=>MY,Root:()=>ZY,RootProvider:()=>WY,Separator:()=>QY,Trigger:()=>eX,TriggerItem:()=>$Y}),iX=M({__name:`LocaleSelector`,props:Zi({channel:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,{t:n}=gz(),r=window.editorConfig.channels||[],i=ya(e,`modelValue`),a=U(()=>{let e=r.find(e=>e.code===t.channel);return e||=r[0],e.locales}),o=U(()=>a.value.find(e=>e.code===i.value)?.name);Ti(()=>{i.value||=a.value[0].code}),pr(()=>t.channel,e=>{a.value.find(e=>e.code===i.value)||(i.value=a.value[0].code)});function s({value:e}){i.value=e}return(e,t)=>{let r=Dz,i=wz;return k(a)&&k(a).length>1?(F(),L(k(rX).Root,{key:0,positioning:{gutter:4},onSelect:s},{default:j(()=>[z(k(rX).Trigger,{asChild:``,class:`min-w-32 py-2 appearance-none rounded-lg cursor-pointer inline-flex gap-3 outline-none relative select-none items-center justify-center hover:bg-gray-200`},{default:j(()=>[z(k(i_),null,{default:j(()=>[z(r,{class:`inline w-4`}),B(` `+E(k(o))+` `,1),z(k(rX).Indicator,null,{default:j(()=>[z(i,{class:`inline w-4`})]),_:1})]),_:1})]),_:1}),z(k(rX).Positioner,{class:`w-56`},{default:j(()=>[z(k(rX).Content,{class:`pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in`},{default:j(()=>[z(k(rX).ItemGroup,{class:`flex flex-col`},{default:j(()=>[z(k(rX).ItemGroupLabel,{class:`px-2.5 mb-1 text-zinc-700`},{default:j(()=>[B(E(k(n)(`Locales`)),1)]),_:1}),(F(!0),I(P,null,Vi(k(a),e=>(F(),L(k(rX).Item,{key:e.code,value:e.code,class:`rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-zinc-100`},{default:j(()=>[B(E(e.name),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1})]),_:1})):V(``,!0)}}}),aX={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function oX(e,t){return F(),I(`svg`,aX,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3 3 0 0 0 3.75-.615A3 3 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a3 3 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015q.062.07.128.136a3 3 0 0 0 3.622.478m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75`},null,-1)]])}var sX=D({name:`heroicons-building-storefront`,render:oX}),cX=M({__name:`ChannelSelector`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let{t}=gz(),{channels:n}=cz(),r=ya(e,`modelValue`),i=U(()=>n.value.find(e=>e.code===r.value)?.name);function a({value:e}){r.value=e}return(e,r)=>{let o=sX,s=wz;return k(n).length>1?(F(),L(k(rX).Root,{key:0,positioning:{gutter:4},onSelect:a},{default:j(()=>[z(k(rX).Trigger,{asChild:``},{default:j(()=>[z(k(i_),null,{default:j(()=>[z(o,{class:`inline w-4`}),B(` `+E(k(i))+` `,1),z(k(rX).Indicator,null,{default:j(()=>[z(s,{class:`inline w-4`})]),_:1})]),_:1})]),_:1}),z(k(rX).Positioner,{class:`w-56`},{default:j(()=>[z(k(rX).Content,{class:`pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in`},{default:j(()=>[z(k(rX).ItemGroup,{class:`flex flex-col`},{default:j(()=>[z(k(rX).ItemGroupLabel,{class:`px-2.5 mb-1 text-zinc-700`},{default:j(()=>[B(E(k(t)(`Channels`)),1)]),_:1}),(F(!0),I(P,null,Vi(k(n),e=>(F(),L(k(rX).Item,{key:e.code,value:e.code,class:`rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-zinc-100`},{default:j(()=>[B(E(e.name),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1})]),_:1})):V(``,!0)}}}),lX=l(o(((e,t)=>{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof e==`object`?t.exports=r():n.NProgress=r()})(e,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`
`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},(function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}})(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return en?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`};return a.transition=`all `+n+`ms `+i,a}var a=(function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}})(),o=(function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}})();function s(e,t){return(typeof e==`string`?e:u(e)).indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})}))(),1);function uX(e,t){let n=new URL(window.location.href);n.searchParams.set(e,t),window.history.replaceState({},``,n.toString())}function dX(e){return new URL(window.location.href).searchParams.get(e)}function fX(e){let t=new URL(window.location.href);t.searchParams.delete(e),window.history.replaceState({},``,t.toString())}function pX(){return or(Y9)}var mX=[`innerHTML`],hX=[`innerHTML`],gX=[`innerHTML`],_X=M({__name:`TemplateSelector`,setup(e){let t=pX(),{currentTemplate:n,templates:r,theme:i,channel:a,locale:o,state:s}=cz();function c({value:e}){let n=r.value.find(t=>t.template===e);if(n&&t){s.pageData?.template!==e&&(s.pageData&&(s.pageData.template=e),t.engine.setPage({regions:[],blocks:{}})),uX(`template`,e),fX(`block`),lX.default.start();let r=new URL(n.previewUrl);r.searchParams.set(`_designMode`,i.value.code),r.searchParams.set(`channel`,a.value),r.searchParams.set(`locale`,o.value),t.preview.loadUrl(r.href)}}return(e,t)=>{let i=wz;return F(),L(k(rX).Root,{onSelect:c,positioning:{gutter:4,strategy:`fixed`,placement:`bottom`}},{default:j(()=>[z(k(rX).Trigger,{asChild:``},{default:j(()=>[z(k(i_),null,{default:j(()=>[k(n)?(F(),I(P,{key:0},[R(`span`,{innerHTML:k(n).icon},null,8,mX),B(` `+E(k(n).label),1)],64)):k(r).length>0?(F(),I(P,{key:1},[R(`span`,{innerHTML:k(r)[0].icon},null,8,hX),B(` `+E(k(r)[0].label),1)],64)):(F(),I(P,{key:2},[B(` Select Template `)],64)),z(k(rX).Indicator,null,{default:j(()=>[z(i,{class:`inline w-4`})]),_:1})]),_:1})]),_:1}),z(k(rX).Positioner,{class:`w-64`},{default:j(()=>[z(k(rX).Content,{class:`pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in`},{default:j(()=>[(F(!0),I(P,null,Vi(k(r),e=>(F(),I(P,{key:e.template},[e.template===`__separator__`?(F(),L(k(rX).Separator,{key:0})):(F(),L(k(rX).Item,{key:1,value:e.template,class:`rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-gray-200`},{default:j(()=>[R(`span`,{innerHTML:e.icon},null,8,gX),B(` `+E(e.label),1)]),_:2},1032,[`value`]))],64))),128))]),_:1})]),_:1})]),_:1})}}}),vX={class:`flex-1 flex justify-start items-center gap-2`},yX=M({__name:`HeaderTools`,setup(e){let t=pX(),{channel:n,locale:r,state:i}=cz();function a(e){i.channel=e;let t=window.editorConfig.channels.find(t=>t.code===e);t&&!t.locales.find(e=>e.code===i.locale)&&(i.locale=t.default_locale),s()}function o(e){i.locale=e,s()}function s(){let e=new URL(t.preview.getFrame().src);e.searchParams.set(`channel`,i.channel),e.searchParams.set(`locale`,i.locale),t.preview.loadUrl(e.href)}return(e,t)=>{let i=_X,s=cX,c=iX;return F(),I(`div`,vX,[z(i),z(s,{"model-value":k(n),"onUpdate:modelValue":a},null,8,[`model-value`]),z(c,{channel:k(n),"model-value":k(r),"onUpdate:modelValue":o},null,8,[`channel`,`model-value`])])}}}),bX=Oz(`accordion`).parts(`root`,`item`,`itemTrigger`,`itemContent`,`itemIndicator`).build(),xX=e=>e.ids?.root??`accordion:${e.id}`,SX=(e,t)=>e.ids?.item?.(t)??`accordion:${e.id}:item:${t}`,CX=(e,t)=>e.ids?.itemContent?.(t)??`accordion:${e.id}:content:${t}`,wX=(e,t)=>e.ids?.itemTrigger?.(t)??`accordion:${e.id}:trigger:${t}`,TX=e=>e.getById(xX(e)),EX=e=>{let t=`[data-controls][data-ownedby='${CSS.escape(xX(e))}']:not([disabled])`;return oW(TX(e),t)},DX=e=>Nz(EX(e)),OX=e=>Pz(EX(e)),kX=(e,t)=>dW(EX(e),wX(e,t)),AX=(e,t)=>fW(EX(e),wX(e,t));function jX(e,t){let{send:n,context:r,prop:i,scope:a,computed:o}=e,s=r.get(`focusedValue`),c=r.get(`value`),l=i(`multiple`);function u(e){let t=e;!l&&t.length>1&&(t=[t[0]]),n({type:`VALUE.SET`,value:t})}function d(e){return{expanded:c.includes(e.value),focused:s===e.value,disabled:!!(e.disabled??i(`disabled`))}}return{focusedValue:s,value:c,setValue:u,getItemState:d,getRootProps(){return t.element({...bX.root.attrs,dir:i(`dir`),id:xX(a),"data-orientation":i(`orientation`)})},getItemProps(e){let n=d(e);return t.element({...bX.item.attrs,dir:i(`dir`),id:SX(a,e.value),"data-state":n.expanded?`open`:`closed`,"data-focus":X(n.focused),"data-disabled":X(n.disabled),"data-orientation":i(`orientation`)})},getItemContentProps(e){let n=d(e);return t.element({...bX.itemContent.attrs,dir:i(`dir`),role:`region`,id:CX(a,e.value),"aria-labelledby":wX(a,e.value),hidden:!n.expanded,"data-state":n.expanded?`open`:`closed`,"data-disabled":X(n.disabled),"data-focus":X(n.focused),"data-orientation":i(`orientation`)})},getItemIndicatorProps(e){let n=d(e);return t.element({...bX.itemIndicator.attrs,dir:i(`dir`),"aria-hidden":!0,"data-state":n.expanded?`open`:`closed`,"data-disabled":X(n.disabled),"data-focus":X(n.focused),"data-orientation":i(`orientation`)})},getItemTriggerProps(e){let{value:r}=e,s=d(e);return t.button({...bX.itemTrigger.attrs,type:`button`,dir:i(`dir`),id:wX(a,r),"aria-controls":CX(a,r),"data-controls":CX(a,r),"aria-expanded":s.expanded,disabled:s.disabled,"data-orientation":i(`orientation`),"aria-disabled":s.disabled,"data-state":s.expanded?`open`:`closed`,"data-focus":X(s.focused),"data-ownedby":xX(a),onFocus(){s.disabled||n({type:`TRIGGER.FOCUS`,value:r})},onBlur(){s.disabled||n({type:`TRIGGER.BLUR`})},onClick(e){s.disabled||(PH()&&e.currentTarget.focus(),n({type:`TRIGGER.CLICK`,value:r}))},onKeyDown(e){if(e.defaultPrevented||s.disabled)return;let t={ArrowDown(){o(`isHorizontal`)||n({type:`GOTO.NEXT`,value:r})},ArrowUp(){o(`isHorizontal`)||n({type:`GOTO.PREV`,value:r})},ArrowRight(){o(`isHorizontal`)&&n({type:`GOTO.NEXT`,value:r})},ArrowLeft(){o(`isHorizontal`)&&n({type:`GOTO.PREV`,value:r})},Home(){n({type:`GOTO.FIRST`,value:r})},End(){n({type:`GOTO.LAST`,value:r})}}[ZH(e,{dir:i(`dir`),orientation:i(`orientation`)})];t&&(t(e),e.preventDefault())}})}}}var{and:MX,not:NX}=EV(),PX=DV({props({props:e}){return{collapsible:!1,multiple:!1,orientation:`vertical`,defaultValue:[],...e}},initialState(){return`idle`},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(t){e(`onFocusChange`)?.({value:t})}})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){e(`onValueChange`)?.({value:t})}}))}},computed:{isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`},on:{"VALUE.SET":{actions:[`setValue`]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:`focused`,actions:[`setFocusedValue`]}}},focused:{on:{"GOTO.NEXT":{actions:[`focusNextTrigger`]},"GOTO.PREV":{actions:[`focusPrevTrigger`]},"TRIGGER.CLICK":[{guard:MX(`isExpanded`,`canToggle`),actions:[`collapse`]},{guard:NX(`isExpanded`),actions:[`expand`]}],"GOTO.FIRST":{actions:[`focusFirstTrigger`]},"GOTO.LAST":{actions:[`focusLastTrigger`]},"TRIGGER.BLUR":{target:`idle`,actions:[`clearFocusedValue`]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e(`collapsible`)||!!e(`multiple`),isExpanded:({context:e,event:t})=>e.get(`value`).includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){let r=t(`multiple`)?Iz(e.get(`value`),n.value):[];e.set(`value`,r)},expand({context:e,prop:t,event:n}){let r=t(`multiple`)?Fz(e.get(`value`),n.value):[n.value];e.set(`value`,r)},focusFirstTrigger({scope:e}){DX(e)?.focus()},focusLastTrigger({scope:e}){OX(e)?.focus()},focusNextTrigger({context:e,scope:t}){let n=e.get(`focusedValue`);n&&kX(t,n)?.focus()},focusPrevTrigger({context:e,scope:t}){let n=e.get(`focusedValue`);n&&AX(t,n)?.focus()},setFocusedValue({context:e,event:t}){e.set(`focusedValue`,t.value)},clearFocusedValue({context:e}){e.set(`focusedValue`,null)},setValue({context:e,event:t}){e.set(`value`,t.value)},coarseValue({context:e,prop:t}){!t(`multiple`)&&e.get(`value`).length>1&&(YB(`The value of accordion should be a single value when multiple is false.`),e.set(`value`,[e.get(`value`)[0]]))}}}}),FX=new WeakMap,IX=new WeakMap,LX={},RX=0,zX=e=>e&&(e.host||zX(e.parentNode)),BX=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=zX(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),VX=new Set([`script`,`output`,`status`,`next-route-announcer`]),HX=e=>VX.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),UX=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=BX(n,Array.isArray(e)?e:[e]);LX[r]||(LX[r]=new WeakMap);let c=LX[r],l=[],u=new Set,d=new Set(s),f=e=>{!e||u.has(e)||(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&WV(e)&&gH(e,e=>{f(e)})});let p=e=>{!e||d.has(e)||Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(HX(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(FX.get(e)||0)+1,s=(c.get(e)||0)+1;FX.set(e,o),c.set(e,s),l.push(e),o===1&&n&&IX.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),RX++,()=>{l.forEach(e=>{let t=FX.get(e)-1,n=c.get(e)-1;FX.set(e,t),c.set(e,n),t||(IX.has(e)||e.removeAttribute(i),IX.delete(e)),n||e.removeAttribute(r)}),RX--,RX||(FX=new WeakMap,FX=new WeakMap,IX=new WeakMap,LX={})}},WX=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,GX=(e,t=WX(e),n=`data-aria-hidden`,r=!0)=>{if(t)return UX(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},KX=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function qX(e,t={}){let{defer:n=!0}=t,r=n?KX:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(GX(t))})),()=>{i.forEach(e=>e?.())}}var JX=Object.defineProperty,YX=(e,t,n)=>t in e?JX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,XX=(e,t,n)=>YX(e,typeof t==`symbol`?t:t+``,n),ZX={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},QX=[],$X=class{constructor(e,t){XX(this,`trapStack`),XX(this,`config`),XX(this,`doc`),XX(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),XX(this,`portalContainers`,new Set),XX(this,`listenerCleanups`,[]),XX(this,`handleFocus`,e=>{let t=RH(e),n=this.findContainerIndex(t,e)>=0;if(n||GV(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode)if(jU(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>jU(e)>0))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),XX(this,`handlePointerDown`,e=>{let t=RH(e);if(!(this.findContainerIndex(t,e)>=0)){if(iZ(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iZ(this.config.allowOutsideClick,e)||e.preventDefault()}}),XX(this,`handleClick`,e=>{let t=RH(e);this.findContainerIndex(t,e)>=0||iZ(this.config.clickOutsideDeactivates,e)||iZ(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),XX(this,`handleTabKey`,e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;tZ(e)&&e.preventDefault(),this.tryFocus(n)}}),XX(this,`handleEscapeKey`,e=>{aZ(e)&&iZ(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),XX(this,`_mutationObserver`),XX(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)?!0:e.type===`childList`&&e.addedNodes.length>0?Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return bH(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?xH(t):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),XX(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),XX(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!EU(e)){let t=sH(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),XX(this,`tryFocus`,e=>{if(e!==!1&&e!==sH(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,sZ(e)&&e.select()}}),XX(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),ZX.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{oZ(()=>{if(a){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),XX(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),XX(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);return this.state.paused=!1,t?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.(),this}),XX(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),XX(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||(t===!1?!1:e)}),XX(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),XX(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),XX(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||RH(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||EU(r)&&!OU(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=jU(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else tZ(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||EU(r)&&!OU(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=jU(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else tZ(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||QX;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:nZ,isKeyBackward:rZ,...t};this.doc=n.document||iH(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{_H(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:t,tabbableNodes:r})=>t.contains(e)||n?.includes(t)||r.find(t=>t===e)||this.isControlledElement(t,e))}isControlledElement(e,t){return this.config.followControlledElements?hH(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=DU(e,{getShadowRoot:this.config.getShadowRoot}),n=TU(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e=0;e--)if(OU(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}addListeners(){if(this.state.active)return ZX.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?oZ(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(rU(this.doc,`focusin`,this.handleFocus,!0),rU(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),rU(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),rU(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),rU(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),rU(this.doc,`keydown`,this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=sH(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},eZ=e=>e?.type===`keydown`,tZ=e=>eZ(e)&&e?.key===`Tab`,nZ=e=>eZ(e)&&e.key===`Tab`&&!e?.shiftKey,rZ=e=>eZ(e)&&e.key===`Tab`&&e?.shiftKey,iZ=(e,...t)=>typeof e==`function`?e(...t):e,aZ=e=>!e.isComposing&&e.key===`Escape`,oZ=e=>setTimeout(e,0),sZ=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function cZ(e,t={}){let n,r=FU(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new $X(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:iH(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var lZ=`data-scroll-lock`;function uZ(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function dZ(e){let t=dH(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function fZ(e){let t=e??document,n=t.defaultView??window,{documentElement:r,body:i}=t;if(i.hasAttribute(lZ))return;let a=dZ(r)||dZ(i),o=n.innerWidth-r.clientWidth;i.setAttribute(lZ,``);let s=()=>xW(r,`--scrollbar-width`,`${o}px`),c=uZ(r),l=[s(),jH()?(()=>{let{scrollX:e,scrollY:t,visualViewport:r}=n,s=r?.offsetLeft??0,l=r?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(t-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=bW(i,u);return()=>{d?.(),n.scrollTo({left:e,top:t,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),bW(i,e)})()];return()=>{l.forEach(e=>e?.()),i.removeAttribute(lZ)}}var pZ=Oz(`collapsible`).parts(`root`,`trigger`,`content`,`indicator`).build(),mZ=e=>e.ids?.root??`collapsible:${e.id}`,hZ=e=>e.ids?.content??`collapsible:${e.id}:content`,gZ=e=>e.ids?.trigger??`collapsible:${e.id}:trigger`,_Z=e=>e.getById(hZ(e));function vZ(e,t){let{state:n,send:r,context:i,scope:a,prop:o}=e,s=n.matches(`open`)||n.matches(`closing`),c=n.matches(`open`),l=n.matches(`closed`),{width:u,height:d}=i.get(`size`),f=!!o(`disabled`),p=o(`collapsedHeight`),m=o(`collapsedWidth`),h=p!=null,g=m!=null,_=h||g,v=!i.get(`initial`)&&c;return{disabled:f,visible:s,open:c,measureSize(){r({type:`size.measure`})},setOpen(e){n.matches(`open`)!==e&&r({type:e?`open`:`close`})},getRootProps(){return t.element({...pZ.root.attrs,"data-state":c?`open`:`closed`,dir:o(`dir`),id:mZ(a)})},getContentProps(){return t.element({...pZ.content.attrs,id:hZ(a),"data-collapsible":``,"data-state":v?void 0:c?`open`:`closed`,"data-disabled":X(f),"data-has-collapsed-size":X(_),hidden:!s&&!_,dir:o(`dir`),style:{"--height":KB(d),"--width":KB(u),"--collapsed-height":KB(p),"--collapsed-width":KB(m),...l&&h&&{overflow:`hidden`,minHeight:KB(p),maxHeight:KB(p)},...l&&g&&{overflow:`hidden`,minWidth:KB(m),maxWidth:KB(m)}}})},getTriggerProps(){return t.element({...pZ.trigger.attrs,id:gZ(a),dir:o(`dir`),type:`button`,"data-state":c?`open`:`closed`,"data-disabled":X(f),"aria-controls":hZ(a),"aria-expanded":s||!1,onClick(e){e.defaultPrevented||f||r({type:c?`close`:`open`})}})},getIndicatorProps(){return t.element({...pZ.indicator.attrs,dir:o(`dir`),"data-state":c?`open`:`closed`,"data-disabled":X(f)})}}}var yZ=DV({initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`setInitial`,`computeSize`,`toggleVisibility`])})},exit:[`cleanupNode`],states:{closed:{effects:[`trackTabbableElements`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`computeSize`,`invokeOnOpen`]}]}},closing:{effects:[`trackExitAnimation`],on:{"controlled.close":{target:`closed`},"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`setInitial`,`invokeOnOpen`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnExitComplete`]},{target:`closed`,actions:[`setInitial`,`computeSize`,`invokeOnExitComplete`]}],"animation.end":{target:`closed`,actions:[`invokeOnExitComplete`,`clearInitial`]}}},open:{effects:[`trackEnterAnimation`],on:{"controlled.close":{target:`closing`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closing`,actions:[`setInitial`,`computeSize`,`invokeOnClose`]}],"size.measure":{actions:[`measureSize`]},"animation.end":{actions:[`clearInitial`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n,r=FU(()=>{let r=_Z(t);if(!r)return;let i=dH(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{RH(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a),n=()=>{r.removeEventListener(`animationend`,a)}});return()=>{r(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n,r=FU(()=>{let r=_Z(t);if(!r)return;let i=dH(r).animationName;if(!i||i===`none`){e({type:`animation.end`});return}let a=t=>{RH(t)===r&&e({type:`animation.end`})};r.addEventListener(`animationend`,a);let o=bW(r,{animationFillMode:`forwards`});n=()=>{r.removeEventListener(`animationend`,a),IU(()=>o())}});return()=>{r(),n?.()}},trackTabbableElements:({scope:e,prop:t})=>{if(!t(`collapsedHeight`)&&!t(`collapsedWidth`))return;let n=_Z(e);if(!n)return;let r=()=>{let e=DU(n).map(e=>yW(e,`inert`,``));return()=>{e.forEach(e=>e())}},i=r(),a=VU(n,{callback(){i(),i=r()}});return()=>{i(),a()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set(`initial`,!0)})},clearInitial:({context:e})=>{e.set(`initial`,!1)},cleanupNode:({refs:e})=>{e.set(`stylesRef`,null)},measureSize:({context:e,scope:t})=>{let n=_Z(t);if(!n)return;let{height:r,width:i}=n.getBoundingClientRect();e.set(`size`,{height:r,width:i})},computeSize:({refs:e,scope:t,context:n})=>{e.get(`cleanup`)?.();let r=FU(()=>{let e=_Z(t);if(!e)return;let r=e.hidden;e.style.animationName=`none`,e.style.animationDuration=`0s`,e.hidden=!1;let i=e.getBoundingClientRect();n.set(`size`,{height:i.height,width:i.width}),n.get(`initial`)&&(e.style.animationName=``,e.style.animationDuration=``),e.hidden=r});e.set(`cleanup`,r)},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e(`onExitComplete`)?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e(`open`)?`controlled.open`:`controlled.close`})}}}}),bZ=Oz(`color-picker`,[`root`,`label`,`control`,`trigger`,`positioner`,`content`,`area`,`areaThumb`,`valueText`,`areaBackground`,`channelSlider`,`channelSliderLabel`,`channelSliderTrack`,`channelSliderThumb`,`channelSliderValueText`,`channelInput`,`transparencyGrid`,`swatchGroup`,`swatchTrigger`,`swatchIndicator`,`swatch`,`eyeDropperTrigger`,`formatTrigger`,`formatSelect`]),xZ=bZ.build(),SZ=Object.defineProperty,CZ=(e,t,n)=>t in e?SZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wZ=(e,t,n)=>CZ(e,typeof t==`symbol`?t:t+``,n),TZ=(e,t,n)=>{let r=`linear-gradient(to ${e[Number(!t)]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,0),rgb(${n},255,0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,255),rgb(${n},255,255))`,WebkitMaskImage:r,maskImage:r}}},EZ=(e,t,n)=>{let r=`linear-gradient(to ${e[Number(!t)]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},0),rgb(255,${n},0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},255),rgb(255,${n},255))`,WebkitMaskImage:r,maskImage:r}}},DZ=(e,t,n)=>{let r=`linear-gradient(to ${e[Number(!t)]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,0,${n}),rgb(255,0,${n}))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,255,${n}),rgb(255,255,${n}))`,WebkitMaskImage:r,maskImage:r}}},OZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,`linear-gradient(to ${e[Number(!t)]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,`hsl(${n}, 100%, 50%)`].join(`,`)}}),kZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(!t)]}, hsla(0,0%,0%,${n}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${n}) 100%)`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`hsl(0, 0%, 50%)`].join(`,`)}}),AZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{backgroundImage:[`linear-gradient(to ${e[Number(!t)]},hsl(0,0%,${n}%),hsla(0,0%,${n}%,0))`,`linear-gradient(to ${e[Number(t)]},hsl(0,100%,${n}%),hsl(60,100%,${n}%),hsl(120,100%,${n}%),hsl(180,100%,${n}%),hsl(240,100%,${n}%),hsl(300,100%,${n}%),hsl(360,100%,${n}%))`].join(`,`)}}),jZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[Number(!t)]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,`hsl(${n}, 100%, 50%)`].join(`,`)}}),MZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(!t)]},hsla(0,0%,0%,${n}),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`linear-gradient(to ${e[Number(!t)]},hsl(0,0%,0%),hsl(0,0%,100%))`].join(`,`)}}),NZ=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(!t)]},hsla(0,0%,100%,${n}),hsla(0,0%,100%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`#000`].join(`,`)}});function PZ(e,t){let{xChannel:n,yChannel:r,dir:i=`ltr`}=t,{zChannel:a}=e.getColorAxes({xChannel:n,yChannel:r}),o=e.getChannelValue(a),{minValue:s,maxValue:c}=e.getChannelRange(a),l=[`top`,i===`rtl`?`left`:`right`],u=!1,d={areaStyles:{},areaGradientStyles:{}},f=(o-s)/(c-s),p=e.getFormat()===`hsla`;switch(a){case`red`:u=n===`green`,d=TZ(l,u,o);break;case`green`:u=n===`red`,d=EZ(l,u,o);break;case`blue`:u=n===`red`,d=DZ(l,u,o);break;case`hue`:u=n!==`saturation`,d=p?OZ(l,u,o):jZ(l,u,o);break;case`saturation`:u=n===`hue`,d=p?kZ(l,u,f):MZ(l,u,f);break;case`brightness`:u=n===`hue`,d=NZ(l,u,f);break;case`lightness`:u=n===`hue`,d=AZ(l,u,o);break}return d}var FZ=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},IZ=class{toHexInt(){return this.toFormat(`rgba`).toHexInt()}getChannelValue(e){if(e in this)return this[e];throw Error(`Unsupported color channel: `+e)}getChannelValuePercent(e,t){let n=t??this.getChannelValue(e),{minValue:r,maxValue:i}=this.getChannelRange(e);return AB(n,r,i)}getChannelPercentValue(e,t){let{minValue:n,maxValue:r,step:i}=this.getChannelRange(e);return PB(jB(t,n,r,i),n,r,i)}withChannelValue(e,t){let{minValue:n,maxValue:r}=this.getChannelRange(e);if(e in this){let i=this.clone();return i[e]=OB(t,n,r),i}throw Error(`Unsupported color channel: `+e)}getColorAxes(e){let{xChannel:t,yChannel:n}=e,r=t||this.getChannels().find(e=>e!==n),i=n||this.getChannels().find(e=>e!==r);return{xChannel:r,yChannel:i,zChannel:this.getChannels().find(e=>e!==r&&e!==i)}}incrementChannel(e,t){let{minValue:n,maxValue:r,step:i}=this.getChannelRange(e),a=PB(OB(this.getChannelValue(e)+t,n,r),n,r,i);return this.withChannelValue(e,a)}decrementChannel(e,t){return this.incrementChannel(e,-t)}isEqual(e){return FZ(this.toJSON(),e.toJSON())&&this.getChannelValue(`alpha`)===e.getChannelValue(`alpha`)}},LZ=/^#[\da-f]+$/i,RZ=/^rgba?\((.*)\)$/,zZ=/[^#]/gi,BZ=class e extends IZ{constructor(e,t,n,r){super(),wZ(this,`red`,e),wZ(this,`green`,t),wZ(this,`blue`,n),wZ(this,`alpha`,r)}static parse(t){let n=[];if(LZ.test(t)&&[4,5,7,9].includes(t.length)){let e=(t.length<6?t.replace(zZ,`$&$&`):t).slice(1).split(``);for(;e.length>0;)n.push(parseInt(e.splice(0,2).join(``),16));n[3]=n[3]===void 0?void 0:n[3]/255}let r=t.match(RZ);return r?.[1]&&(n=r[1].split(`,`).map(e=>Number(e.trim())).map((e,t)=>OB(e,0,t<3?255:1))),n.length<3?void 0:new e(n[0],n[1],n[2],n[3]??1)}toString(e=`css`){switch(e){case`hex`:return`#`+(this.red.toString(16).padStart(2,`0`)+this.green.toString(16).padStart(2,`0`)+this.blue.toString(16).padStart(2,`0`)).toUpperCase();case`hexa`:return`#`+(this.red.toString(16).padStart(2,`0`)+this.green.toString(16).padStart(2,`0`)+this.blue.toString(16).padStart(2,`0`)+Math.round(this.alpha*255).toString(16).padStart(2,`0`)).toUpperCase();case`rgb`:return`rgb(${this.red}, ${this.green}, ${this.blue})`;case`css`:case`rgba`:return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case`hsl`:return this.toHSL().toString(`hsl`);case`hsb`:return this.toHSB().toString(`hsb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`rgba`:return this;case`hsba`:return this.toHSB();case`hsla`:return this.toHSL();default:throw Error(`Unsupported color conversion: rgb -> `+e)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){let e=this.red/255,t=this.green/255,n=this.blue/255,r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o=i===0?0:a/i,s=0;if(a!==0){switch(i){case e:s=(t-n)/a+(tNumber(e.trim().replace(`%`,``)));return new e(bB(t,360),OB(r,0,100),OB(i,0,100),OB(a??1,0,1))}}toString(e=`css`){switch(e){case`hex`:return this.toRGB().toString(`hex`);case`hexa`:return this.toRGB().toString(`hexa`);case`hsl`:return`hsl(${this.hue}, ${VB(this.saturation,2)}%, ${VB(this.lightness,2)}%)`;case`css`:case`hsla`:return`hsla(${this.hue}, ${VB(this.saturation,2)}%, ${VB(this.lightness,2)}%, ${this.alpha})`;case`hsb`:return this.toHSB().toString(`hsb`);case`rgb`:return this.toRGB().toString(`rgb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`hsla`:return this;case`hsba`:return this.toHSB();case`rgba`:return this.toRGB();default:throw Error(`Unsupported color conversion: hsl -> `+e)}}toHSB(){let e=this.saturation/100,t=this.lightness/100,n=t+e*Math.min(t,1-t);return e=n===0?0:2*(1-t/n),new qZ(VB(this.hue,2),VB(e*100,2),VB(n*100,2),VB(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,n=this.lightness/100,r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return new VZ(Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255),VB(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(e){switch(e){case`hue`:return{style:`unit`,unit:`degree`,unitDisplay:`narrow`};case`saturation`:case`lightness`:case`alpha`:return{style:`percent`};default:throw Error(`Unknown color channel: `+e)}}formatChannelValue(e,t){let n=this.getChannelFormatOptions(e),r=this.getChannelValue(e);return(e===`saturation`||e===`lightness`)&&(r/=100),new Intl.NumberFormat(t,n).format(r)}getChannelRange(e){switch(e){case`hue`:return{minValue:0,maxValue:360,step:1,pageSize:15};case`saturation`:case`lightness`:return{minValue:0,maxValue:100,step:1,pageSize:10};case`alpha`:return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error(`Unknown color channel: `+e)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return`hsla`}getChannels(){return e.colorChannels}};wZ(UZ,`colorChannels`,[`hue`,`saturation`,`lightness`]);var WZ=UZ,GZ=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,KZ=class e extends IZ{constructor(e,t,n,r){super(),wZ(this,`hue`,e),wZ(this,`saturation`,t),wZ(this,`brightness`,n),wZ(this,`alpha`,r)}static parse(t){let n;if(n=t.match(GZ)){let[t,r,i,a]=(n[1]??n[2]).split(`,`).map(e=>Number(e.trim().replace(`%`,``)));return new e(bB(t,360),OB(r,0,100),OB(i,0,100),OB(a??1,0,1))}}toString(e=`css`){switch(e){case`css`:return this.toHSL().toString(`css`);case`hex`:return this.toRGB().toString(`hex`);case`hexa`:return this.toRGB().toString(`hexa`);case`hsb`:return`hsb(${this.hue}, ${VB(this.saturation,2)}%, ${VB(this.brightness,2)}%)`;case`hsba`:return`hsba(${this.hue}, ${VB(this.saturation,2)}%, ${VB(this.brightness,2)}%, ${this.alpha})`;case`hsl`:return this.toHSL().toString(`hsl`);case`rgb`:return this.toRGB().toString(`rgb`);default:return this.toFormat(e).toString(e)}}toFormat(e){switch(e){case`hsba`:return this;case`hsla`:return this.toHSL();case`rgba`:return this.toRGB();default:throw Error(`Unsupported color conversion: hsb -> `+e)}}toHSL(){let e=this.saturation/100,t=this.brightness/100,n=t*(1-e/2);return e=n===0||n===1?0:(t-n)/Math.min(n,1-n),new WZ(VB(this.hue,2),VB(e*100,2),VB(n*100,2),VB(this.alpha,2))}toRGB(){let e=this.hue,t=this.saturation/100,n=this.brightness/100,r=(r,i=(r+e/60)%6)=>n-t*n*Math.max(Math.min(i,4-i,1),0);return new VZ(Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255),VB(this.alpha,2))}clone(){return new e(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(e){switch(e){case`hue`:return{style:`unit`,unit:`degree`,unitDisplay:`narrow`};case`saturation`:case`brightness`:case`alpha`:return{style:`percent`};default:throw Error(`Unknown color channel: `+e)}}formatChannelValue(e,t){let n=this.getChannelFormatOptions(e),r=this.getChannelValue(e);return(e===`saturation`||e===`brightness`)&&(r/=100),new Intl.NumberFormat(t,n).format(r)}getChannelRange(e){switch(e){case`hue`:return{minValue:0,maxValue:360,step:1,pageSize:15};case`saturation`:case`brightness`:return{minValue:0,maxValue:100,step:1,pageSize:10};case`alpha`:return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw Error(`Unknown color channel: `+e)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return`hsba`}getChannels(){return e.colorChannels}};wZ(KZ,`colorChannels`,[`hue`,`saturation`,`brightness`]);var qZ=KZ,JZ=(e=>{let t=new Map,n=e.split(`,`);for(let e=0;e{if(JZ.has(e))return YZ(JZ.get(e));let t=VZ.parse(e)||qZ.parse(e)||WZ.parse(e);if(!t){let t=Error(`Invalid color value: `+e);throw Error.captureStackTrace?.(t,YZ),t}return t},XZ=e=>typeof e==`string`?YZ(e):e,ZZ=e=>e.ids?.root??`color-picker:${e.id}`,QZ=e=>e.ids?.label??`color-picker:${e.id}:label`,$Z=e=>e.ids?.hiddenInput??`color-picker:${e.id}:hidden-input`,eQ=e=>e.ids?.control??`color-picker:${e.id}:control`,tQ=e=>e.ids?.trigger??`color-picker:${e.id}:trigger`,nQ=e=>e.ids?.content??`color-picker:${e.id}:content`,rQ=e=>e.ids?.positioner??`color-picker:${e.id}:positioner`,iQ=e=>e.ids?.formatSelect??`color-picker:${e.id}:format-select`,aQ=e=>e.ids?.area??`color-picker:${e.id}:area`,oQ=e=>e.ids?.areaGradient??`color-picker:${e.id}:area-gradient`,sQ=e=>e.ids?.areaThumb??`color-picker:${e.id}:area-thumb`,cQ=(e,t)=>e.ids?.channelSliderTrack?.(t)??`color-picker:${e.id}:slider-track:${t}`,lQ=(e,t)=>e.ids?.channelSliderThumb?.(t)??`color-picker:${e.id}:slider-thumb:${t}`,uQ=e=>e.getById(nQ(e)),dQ=e=>e.getById(sQ(e)),fQ=(e,t)=>e.getById(lQ(e,t)),pQ=e=>e.getById(iQ(e)),mQ=e=>e.getById($Z(e)),hQ=e=>e.getById(aQ(e)),gQ=(e,t,n)=>{let r=hQ(e);if(!r)return;let{getPercentValue:i}=YU(t,r);return{x:i({dir:n,orientation:`horizontal`}),y:i({orientation:`vertical`})}},_Q=e=>e.getById(eQ(e)),vQ=e=>e.getById(tQ(e)),yQ=e=>e.getById(rQ(e)),bQ=(e,t)=>e.getById(cQ(e,t)),xQ=(e,t,n,r)=>{let i=bQ(e,n);if(!i)return;let{getPercentValue:a}=YU(t,i);return{x:a({dir:r,orientation:`horizontal`}),y:a({orientation:`vertical`})}},SQ=e=>[...oW(uQ(e),`input[data-channel]`),...oW(_Q(e),`input[data-channel]`)];function CQ(e,t){switch(t){case`hue`:return YZ(`hsl(${e.getChannelValue(`hue`)}, 100%, 50%)`);case`lightness`:case`brightness`:case`saturation`:case`red`:case`green`:case`blue`:return e.withChannelValue(`alpha`,1);case`alpha`:return e;default:throw Error(`Unknown color channel: `+t)}}function wQ(e,t){if(t==null)return``;if(t===`hex`)return e.toString(`hex`);if(t===`css`)return e.toString(`css`);if(t in e)return e.getChannelValue(t).toString();let n=e.getFormat()===`hsla`;switch(t){case`hue`:return n?e.toFormat(`hsla`).getChannelValue(`hue`).toString():e.toFormat(`hsba`).getChannelValue(`hue`).toString();case`saturation`:return n?e.toFormat(`hsla`).getChannelValue(`saturation`).toString():e.toFormat(`hsba`).getChannelValue(`saturation`).toString();case`lightness`:return e.toFormat(`hsla`).getChannelValue(`lightness`).toString();case`brightness`:return e.toFormat(`hsba`).getChannelValue(`brightness`).toString();case`red`:case`green`:case`blue`:return e.toFormat(`rgba`).getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}function TQ(e,t){switch(t){case`hex`:let n=YZ(`#000000`),r=YZ(`#FFFFFF`);return{minValue:n.toHexInt(),maxValue:r.toHexInt(),pageSize:10,step:1};case`css`:return;case`hue`:case`saturation`:case`lightness`:return e.toFormat(`hsla`).getChannelRange(t);case`brightness`:return e.toFormat(`hsba`).getChannelRange(t);case`red`:case`green`:case`blue`:return e.toFormat(`rgba`).getChannelRange(t);default:return e.getChannelRange(t)}}function EQ(e,t){return e===`vertical`?`top`:t===`ltr`?`right`:`left`}var DQ=e=>{let{channel:t,value:n,dir:r,orientation:i}=e,a=EQ(i,r),{minValue:o,maxValue:s}=n.getChannelRange(t);switch(t){case`hue`:return`linear-gradient(to ${a}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;case`lightness`:return`linear-gradient(to ${a}, ${n.withChannelValue(t,o).toString(`css`)}, ${n.withChannelValue(t,(s-o)/2).toString(`css`)}, ${n.withChannelValue(t,s).toString(`css`)})`;case`saturation`:case`brightness`:case`red`:case`green`:case`blue`:case`alpha`:return`linear-gradient(to ${a}, ${n.withChannelValue(t,o).toString(`css`)}, ${n.withChannelValue(t,s).toString(`css`)})`;default:throw Error(`Unknown color channel: `+t)}};function OQ(e,t){let{context:n,send:r,prop:i,computed:a,state:o,scope:s}=e,c=n.get(`value`),l=n.get(`format`),u=a(`areaValue`),d=a(`valueAsString`),f=a(`disabled`),p=!!i(`readOnly`),m=!!i(`invalid`),h=!!i(`required`),g=a(`interactive`),_=o.hasTag(`dragging`),v=o.hasTag(`open`),y=o.hasTag(`focused`),b=e=>{let t=u.getChannels();return{xChannel:e.xChannel??t[1],yChannel:e.yChannel??t[2]}},x=n.get(`currentPlacement`),S=rq({...i(`positioning`),placement:x});function C(e){let t=XZ(e.value).toFormat(n.get(`format`));return{value:t,valueAsString:t.toString(`hex`),checked:t.isEqual(c),disabled:e.disabled||!g}}return{dragging:_,open:v,valueAsString:d,value:c,inline:!!i(`inline`),setOpen(e){i(`inline`)||o.hasTag(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},setValue(e){r({type:`VALUE.SET`,value:XZ(e),src:`set-color`})},getChannelValue(e){return wQ(c,e)},getChannelValueText(e,t){return c.formatChannelValue(e,t)},setChannelValue(e,t){r({type:`VALUE.SET`,value:c.withChannelValue(e,t),src:`set-channel`})},format:n.get(`format`),setFormat(e){r({type:`VALUE.SET`,value:c.toFormat(e),src:`set-format`})},alpha:c.getChannelValue(`alpha`),setAlpha(e){r({type:`VALUE.SET`,value:c.withChannelValue(`alpha`,e),src:`set-alpha`})},getRootProps(){return t.element({...xZ.root.attrs,dir:i(`dir`),id:ZZ(s),"data-disabled":X(f),"data-readonly":X(p),"data-invalid":X(m),style:{"--value":c.toString(`css`)}})},getLabelProps(){return t.element({...xZ.label.attrs,dir:i(`dir`),id:QZ(s),htmlFor:$Z(s),"data-disabled":X(f),"data-readonly":X(p),"data-invalid":X(m),"data-required":X(h),"data-focus":X(y),onClick(e){e.preventDefault(),sW(_Q(s),`[data-channel=hex]`)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...xZ.control.attrs,id:eQ(s),dir:i(`dir`),"data-disabled":X(f),"data-readonly":X(p),"data-invalid":X(m),"data-state":v?`open`:`closed`,"data-focus":X(y)})},getTriggerProps(){return t.button({...xZ.trigger.attrs,id:tQ(s),dir:i(`dir`),disabled:f,"aria-label":`select color. current color is ${d}`,"aria-controls":nQ(s),"aria-labelledby":QZ(s),"aria-haspopup":i(`inline`)?void 0:`dialog`,"data-disabled":X(f),"data-readonly":X(p),"data-invalid":X(m),"data-placement":x,"aria-expanded":v,"data-state":v?`open`:`closed`,"data-focus":X(y),type:`button`,onClick(){g&&r({type:`TRIGGER.CLICK`})},onBlur(){g&&r({type:`TRIGGER.BLUR`})},style:{position:`relative`}})},getPositionerProps(){return t.element({...xZ.positioner.attrs,id:rQ(s),dir:i(`dir`),style:S.floating})},getContentProps(){return t.element({...xZ.content.attrs,id:nQ(s),dir:i(`dir`),role:i(`inline`)?void 0:`dialog`,tabIndex:-1,"data-placement":x,"data-state":v?`open`:`closed`,hidden:!v})},getValueTextProps(){return t.element({...xZ.valueText.attrs,dir:i(`dir`),"data-disabled":X(f),"data-focus":X(y)})},getAreaProps(e={}){let{xChannel:n,yChannel:a}=b(e),{areaStyles:o}=PZ(u,{xChannel:n,yChannel:a,dir:i(`dir`)});return t.element({...xZ.area.attrs,id:aQ(s),role:`group`,"data-invalid":X(m),"data-disabled":X(f),"data-readonly":X(p),onPointerDown(e){g&&GH(e)&&(qH(e)||(r({type:`AREA.POINTER_DOWN`,point:nU(e),channel:{xChannel:n,yChannel:a},id:`area`}),e.preventDefault()))},style:{position:`relative`,touchAction:`none`,forcedColorAdjust:`none`,...o}})},getAreaBackgroundProps(e={}){let{xChannel:n,yChannel:r}=b(e),{areaGradientStyles:a}=PZ(u,{xChannel:n,yChannel:r,dir:i(`dir`)});return t.element({...xZ.areaBackground.attrs,id:oQ(s),"data-invalid":X(m),"data-disabled":X(f),"data-readonly":X(p),style:{position:`relative`,touchAction:`none`,forcedColorAdjust:`none`,...a}})},getAreaThumbProps(e={}){let{xChannel:n,yChannel:a}=b(e),o={xChannel:n,yChannel:a},c=u.getChannelValuePercent(n),l=1-u.getChannelValuePercent(a),d=i(`dir`)===`rtl`?1-c:c,h=u.getChannelValue(n),_=u.getChannelValue(a),v=u.withChannelValue(`alpha`,1).toString(`css`);return t.element({...xZ.areaThumb.attrs,id:sQ(s),dir:i(`dir`),tabIndex:f?void 0:0,"data-disabled":X(f),"data-invalid":X(m),"data-readonly":X(p),role:`slider`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":h,"aria-label":`${n} and ${a}`,"aria-roledescription":`2d slider`,"aria-valuetext":`${n} ${h}, ${a} ${_}`,style:{position:`absolute`,left:`${d*100}%`,top:`${l*100}%`,transform:`translate(-50%, -50%)`,touchAction:`none`,forcedColorAdjust:`none`,"--color":v,background:v},onFocus(){g&&r({type:`AREA.FOCUS`,id:`area`,channel:o})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=tU(e),n={ArrowUp(){r({type:`AREA.ARROW_UP`,channel:o,step:t})},ArrowDown(){r({type:`AREA.ARROW_DOWN`,channel:o,step:t})},ArrowLeft(){r({type:`AREA.ARROW_LEFT`,channel:o,step:t})},ArrowRight(){r({type:`AREA.ARROW_RIGHT`,channel:o,step:t})},PageUp(){r({type:`AREA.PAGE_UP`,channel:o,step:t})},PageDown(){r({type:`AREA.PAGE_DOWN`,channel:o,step:t})},Escape(e){e.stopPropagation()}}[ZH(e,{dir:i(`dir`)})];n&&(n(e),e.preventDefault())}})},getTransparencyGridProps(e={}){let{size:n=`12px`}=e;return t.element({...xZ.transparencyGrid.attrs,style:{"--size":n,width:`100%`,height:`100%`,position:`absolute`,backgroundColor:`#fff`,backgroundImage:`conic-gradient(#eeeeee 0 25%, transparent 0 50%, #eeeeee 0 75%, transparent 0)`,backgroundSize:`var(--size) var(--size)`,inset:`0px`,zIndex:`auto`,pointerEvents:`none`}})},getChannelSliderProps(e){let{orientation:n=`horizontal`,channel:i,format:a}=e;return t.element({...xZ.channelSlider.attrs,"data-channel":i,"data-orientation":n,role:`presentation`,onPointerDown(e){g&&GH(e)&&(qH(e)||(r({type:`CHANNEL_SLIDER.POINTER_DOWN`,channel:i,format:a,point:nU(e),id:i,orientation:n}),e.preventDefault()))},style:{position:`relative`,touchAction:`none`}})},getChannelSliderTrackProps(e){let{orientation:n=`horizontal`,channel:r,format:a}=e,o=a?c.toFormat(a):u;return t.element({...xZ.channelSliderTrack.attrs,id:cQ(s,r),role:`group`,"data-channel":r,"data-orientation":n,style:{position:`relative`,forcedColorAdjust:`none`,backgroundImage:DQ({orientation:n,channel:r,dir:i(`dir`),value:o})}})},getChannelSliderLabelProps(e){let{channel:n}=e;return t.element({...xZ.channelSliderLabel.attrs,"data-channel":n,onClick(e){if(!g)return;e.preventDefault();let t=lQ(s,n);s.getById(t)?.focus({preventScroll:!0})},style:{userSelect:`none`,WebkitUserSelect:`none`}})},getChannelSliderValueTextProps(e){return t.element({...xZ.channelSliderValueText.attrs,"data-channel":e.channel})},getChannelSliderThumbProps(e){let{orientation:n=`horizontal`,channel:a,format:o}=e,l=o?c.toFormat(o):u,d=l.getChannelRange(a),p=l.getChannelValue(a),m=(p-d.minValue)/(d.maxValue-d.minValue),h=i(`dir`)===`rtl`,_=n===`horizontal`&&h?1-m:m,v=n===`horizontal`?{left:`${_*100}%`,top:`50%`}:{top:`${m*100}%`,left:`50%`};return t.element({...xZ.channelSliderThumb.attrs,id:lQ(s,a),role:`slider`,"aria-label":a,tabIndex:f?void 0:0,"data-channel":a,"data-disabled":X(f),"data-orientation":n,"aria-disabled":X(f),"aria-orientation":n,"aria-valuemax":d.maxValue,"aria-valuemin":d.minValue,"aria-valuenow":p,"aria-valuetext":`${a} ${p}`,style:{forcedColorAdjust:`none`,position:`absolute`,background:CQ(u,a).toString(`css`),...v},onFocus(){g&&r({type:`CHANNEL_SLIDER.FOCUS`,channel:a})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=tU(e)*d.step,n={ArrowUp(){r({type:`CHANNEL_SLIDER.ARROW_UP`,channel:a,step:t})},ArrowDown(){r({type:`CHANNEL_SLIDER.ARROW_DOWN`,channel:a,step:t})},ArrowLeft(){r({type:`CHANNEL_SLIDER.ARROW_LEFT`,channel:a,step:t})},ArrowRight(){r({type:`CHANNEL_SLIDER.ARROW_RIGHT`,channel:a,step:t})},PageUp(){r({type:`CHANNEL_SLIDER.PAGE_UP`,channel:a})},PageDown(){r({type:`CHANNEL_SLIDER.PAGE_DOWN`,channel:a})},Home(){r({type:`CHANNEL_SLIDER.HOME`,channel:a})},End(){r({type:`CHANNEL_SLIDER.END`,channel:a})},Escape(e){e.stopPropagation()}}[ZH(e,{dir:i(`dir`)})];n&&(n(e),e.preventDefault())}})},getChannelInputProps(e){let{channel:n}=e,a=n===`hex`||n===`css`,o=TQ(c,n);return t.input({...xZ.channelInput.attrs,dir:i(`dir`),type:a?`text`:`number`,"data-channel":n,"aria-label":n,spellCheck:!1,autoComplete:`off`,disabled:f,"data-disabled":X(f),"data-invalid":X(m),"data-readonly":X(p),readOnly:p,defaultValue:wQ(c,n),min:o?.minValue,max:o?.maxValue,step:o?.step,onBeforeInput(e){a||!g||e.currentTarget.value.match(/[^0-9.]/g)&&e.preventDefault()},onFocus(e){g&&(r({type:`CHANNEL_INPUT.FOCUS`,channel:n}),e.currentTarget.select())},onBlur(e){g&&r({type:`CHANNEL_INPUT.BLUR`,channel:n,value:a?e.currentTarget.value:e.currentTarget.valueAsNumber,isTextField:a})},onKeyDown(e){e.defaultPrevented||g&&e.key===`Enter`&&(r({type:`CHANNEL_INPUT.CHANGE`,channel:n,value:a?e.currentTarget.value:e.currentTarget.valueAsNumber,isTextField:a}),e.preventDefault())},style:{appearance:`none`,WebkitAppearance:`none`,MozAppearance:`textfield`}})},getHiddenInputProps(){return t.input({type:`text`,disabled:f,name:i(`name`),tabIndex:-1,readOnly:p,required:h,id:$Z(s),style:EW,defaultValue:d})},getEyeDropperTriggerProps(){return t.button({...xZ.eyeDropperTrigger.attrs,type:`button`,dir:i(`dir`),disabled:f,"data-disabled":X(f),"data-invalid":X(m),"data-readonly":X(p),"aria-label":`Pick a color from the screen`,onClick(){g&&r({type:`EYEDROPPER.CLICK`})}})},getSwatchGroupProps(){return t.element({...xZ.swatchGroup.attrs,role:`group`})},getSwatchTriggerState:C,getSwatchTriggerProps(e){let n=C(e);return t.button({...xZ.swatchTrigger.attrs,disabled:n.disabled,dir:i(`dir`),type:`button`,"aria-label":`select ${n.valueAsString} as the color`,"data-state":n.checked?`checked`:`unchecked`,"data-value":n.valueAsString,"data-disabled":X(n.disabled),onClick(){n.disabled||r({type:`SWATCH_TRIGGER.CLICK`,value:n.value})},style:{"--color":n.valueAsString,position:`relative`}})},getSwatchIndicatorProps(e){let n=C(e);return t.element({...xZ.swatchIndicator.attrs,dir:i(`dir`),hidden:!n.checked})},getSwatchProps(e){let{respectAlpha:n=!0}=e,r=C(e),a=r.value.toString(n?`css`:`hex`);return t.element({...xZ.swatch.attrs,dir:i(`dir`),"data-state":r.checked?`checked`:`unchecked`,"data-value":r.valueAsString,style:{"--color":a,position:`relative`,background:a}})},getFormatTriggerProps(){return t.button({...xZ.formatTrigger.attrs,dir:i(`dir`),type:`button`,"aria-label":`change color format to ${jQ(l)}`,onClick(e){e.currentTarget.disabled||r({type:`FORMAT.SET`,format:jQ(l),src:`format-trigger`})}})},getFormatSelectProps(){return t.select({...xZ.formatSelect.attrs,"aria-label":`change color format`,dir:i(`dir`),defaultValue:i(`format`),disabled:f,onChange(e){r({type:`FORMAT.SET`,format:MQ(e.currentTarget.value),src:`format-select`})}})}}}var kQ=[`hsba`,`hsla`,`rgba`],AQ=RegExp(`^(${kQ.join(`|`)})$`);function jQ(e){return kQ[kQ.indexOf(e)+1]??kQ[0]}function MQ(e){if(AQ.test(e))return e;throw Error(`Unsupported color format: ${e}`)}var NQ=e=>YZ(e),PQ=/^[0-9a-fA-F]{3,8}$/;function FQ(e){return PQ.test(e)}function IQ(e){return e.startsWith(`#`)?e:FQ(e)?`#${e}`:e}var{and:LQ}=EV(),RQ=e=>{let t=``;for(let n in e)t+=`${n}:${e[n]??``};`;return t},zQ=NQ(`#000000`),BQ=DV({props({props:e}){return{dir:`ltr`,defaultValue:zQ,defaultFormat:(e.value??e.defaultValue??zQ).getFormat(),openAutoFocus:!0,...e,positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)||e(`inline`)?`open`:`idle`},context({prop:e,bindable:t,getContext:n}){return{value:t(()=>({defaultValue:e(`defaultValue`).toFormat(e(`format`)??e(`defaultFormat`)),value:e(`value`)?.toFormat(e(`format`)??e(`defaultFormat`)),isEqual(e,t){return t!=null&&e.isEqual(t)},hash(e){return RQ(e.toJSON())},onChange(t){let r=n().get(`format`);e(`onValueChange`)?.({value:t,valueAsString:t.toString(r)})}})),format:t(()=>({defaultValue:e(`defaultFormat`),value:e(`format`),onChange(t){e(`onFormatChange`)?.({format:t})}})),activeId:t(()=>({defaultValue:null})),activeChannel:t(()=>({defaultValue:null})),activeOrientation:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),restoreFocus:t(()=>({defaultValue:!0})),currentPlacement:t(()=>({defaultValue:void 0}))}},computed:{rtl:({prop:e})=>e(`dir`)===`rtl`,disabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`),interactive:({prop:e})=>!(e(`disabled`)||e(`readOnly`)),valueAsString:({context:e})=>e.get(`value`).toString(e.get(`format`)),areaValue:({context:e})=>{let t=e.get(`format`).startsWith(`hsl`)?`hsla`:`hsba`;return e.get(`value`).toFormat(t)}},effects:[`trackFormControl`],watch({prop:e,context:t,action:n,track:r}){r([()=>t.hash(`value`)],()=>{n([`syncInputElements`,`dispatchChangeEvent`])}),r([()=>t.get(`format`)],()=>{n([`syncFormatSelectElement`,`syncValueWithFormat`])}),r([()=>e(`open`)],()=>{n([`toggleVisibility`])})},on:{"VALUE.SET":{actions:[`setValue`]},"FORMAT.SET":{actions:[`setFormat`]},"CHANNEL_INPUT.CHANGE":{actions:[`setChannelColorFromInput`]},"EYEDROPPER.CLICK":{actions:[`openEyeDropper`]},"SWATCH_TRIGGER.CLICK":{actions:[`setValue`]}},states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"CHANNEL_INPUT.FOCUS":{target:`focused`,actions:[`setActiveChannel`]}}},focused:{id:`color-picker-focused`,tags:[`closed`,`focused`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`invokeOnOpen`,`setInitialFocus`]}],"CHANNEL_INPUT.FOCUS":{actions:[`setActiveChannel`]},"CHANNEL_INPUT.BLUR":{target:`idle`,actions:[`setChannelColorFromInput`]},"TRIGGER.BLUR":{target:`idle`}}},open:{tags:[`open`],effects:[`trackPositioning`,`trackDismissableElement`],initial:`idle`,on:{"CONTROLLED.CLOSE":[{guard:`shouldRestoreFocus`,target:`focused`,actions:[`setReturnFocus`]},{target:`idle`}],INTERACT_OUTSIDE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{guard:`shouldRestoreFocus`,target:`focused`,actions:[`invokeOnClose`,`setReturnFocus`]},{target:`idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`idle`,actions:[`invokeOnClose`]}]},states:{idle:{on:{"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`#color-picker-focused`,actions:[`invokeOnClose`]}],"AREA.POINTER_DOWN":{target:`dragging`,actions:[`setActiveChannel`,`setAreaColorFromPoint`,`focusAreaThumb`]},"AREA.FOCUS":{actions:[`setActiveChannel`]},"CHANNEL_SLIDER.POINTER_DOWN":{target:`dragging`,actions:[`setActiveChannel`,`setChannelColorFromPoint`,`focusChannelThumb`]},"CHANNEL_SLIDER.FOCUS":{actions:[`setActiveChannel`]},"AREA.ARROW_LEFT":{actions:[`decrementAreaXChannel`]},"AREA.ARROW_RIGHT":{actions:[`incrementAreaXChannel`]},"AREA.ARROW_UP":{actions:[`incrementAreaYChannel`]},"AREA.ARROW_DOWN":{actions:[`decrementAreaYChannel`]},"AREA.PAGE_UP":{actions:[`incrementAreaXChannel`]},"AREA.PAGE_DOWN":{actions:[`decrementAreaXChannel`]},"CHANNEL_SLIDER.ARROW_LEFT":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.ARROW_RIGHT":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.ARROW_UP":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.ARROW_DOWN":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.PAGE_UP":{actions:[`incrementChannel`]},"CHANNEL_SLIDER.PAGE_DOWN":{actions:[`decrementChannel`]},"CHANNEL_SLIDER.HOME":{actions:[`setChannelToMin`]},"CHANNEL_SLIDER.END":{actions:[`setChannelToMax`]},"CHANNEL_INPUT.BLUR":{actions:[`setChannelColorFromInput`]},"SWATCH_TRIGGER.CLICK":[{guard:LQ(`isOpenControlled`,`closeOnSelect`),actions:[`setValue`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`setValue`,`invokeOnClose`,`setReturnFocus`]},{actions:[`setValue`]}]}},dragging:{tags:[`dragging`],exit:[`clearActiveChannel`],effects:[`trackPointerMove`,`disableTextSelection`],on:{"AREA.POINTER_MOVE":{actions:[`setAreaColorFromPoint`,`focusAreaThumb`]},"AREA.POINTER_UP":{target:`idle`,actions:[`invokeOnChangeEnd`]},"CHANNEL_SLIDER.POINTER_MOVE":{actions:[`setChannelColorFromPoint`,`focusChannelThumb`]},"CHANNEL_SLIDER.POINTER_UP":{target:`idle`,actions:[`invokeOnChangeEnd`]}}}}}},implementations:{guards:{closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null||!!e(`inline`),shouldRestoreFocus:({context:e})=>!!e.get(`restoreFocus`)},effects:{trackPositioning({context:e,prop:t,scope:n}){return t(`inline`)?void 0:(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`)?.placement),tq(vQ(n),()=>yQ(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}}))},trackDismissableElement({context:e,scope:t,prop:n,send:r}){return n(`inline`)?void 0:hJ(()=>uQ(t),{type:`popover`,exclude:vQ(t),defer:!0,onInteractOutside(t){n(`onInteractOutside`)?.(t),!t.defaultPrevented&&e.set(`restoreFocus`,!(t.detail.focusable||t.detail.contextmenu))},onPointerDownOutside:n(`onPointerDownOutside`),onFocusOutside:n(`onFocusOutside`),onDismiss(){r({type:`INTERACT_OUTSIDE`})}})},trackFormControl({context:e,scope:t,send:n}){return dU(mQ(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){n({type:`VALUE.SET`,value:e.initial(`value`),src:`form.reset`})}})},trackPointerMove({context:e,scope:t,event:n,send:r}){return rW(t.getDoc(),{onPointerMove({point:t}){r({type:e.get(`activeId`)===`area`?`AREA.POINTER_MOVE`:`CHANNEL_SLIDER.POINTER_MOVE`,point:t,format:n.format,orientation:e.get(`activeOrientation`)??void 0})},onPointerUp(){r({type:e.get(`activeId`)===`area`?`AREA.POINTER_UP`:`CHANNEL_SLIDER.POINTER_UP`})}})},disableTextSelection({scope:e}){return nW({doc:e.getDoc(),target:uQ(e)})}},actions:{openEyeDropper({scope:e,context:t}){let n=e.getWin();`EyeDropper`in n&&new n.EyeDropper().open().then(({sRGBHex:e})=>{let n=t.get(`value`).getFormat(),r=YZ(e).toFormat(n);t.set(`value`,r)}).catch(()=>void 0)},setActiveChannel({context:e,event:t}){e.set(`activeId`,t.id),t.channel&&e.set(`activeChannel`,t.channel),t.orientation&&e.set(`activeOrientation`,t.orientation)},clearActiveChannel({context:e}){e.set(`activeChannel`,null),e.set(`activeId`,null),e.set(`activeOrientation`,null)},setAreaColorFromPoint({context:e,event:t,computed:n,scope:r,prop:i}){let a=t.format?e.get(`value`).toFormat(t.format):n(`areaValue`),{xChannel:o,yChannel:s}=t.channel||e.get(`activeChannel`),c=gQ(r,t.point,i(`dir`));if(!c)return;let l=a.getChannelPercentValue(o,c.x),u=a.getChannelPercentValue(s,1-c.y),d=a.withChannelValue(o,l).withChannelValue(s,u);e.set(`value`,d)},setChannelColorFromPoint({context:e,event:t,computed:n,scope:r,prop:i}){let a=t.channel||e.get(`activeId`),o=t.format?e.get(`value`).toFormat(t.format):n(`areaValue`),s=xQ(r,t.point,a,i(`dir`));if(!s)return;let c=(t.orientation||e.get(`activeOrientation`)||`horizontal`)===`horizontal`?s.x:s.y,l=o.getChannelPercentValue(a,c),u=o.withChannelValue(a,l);e.set(`value`,u)},setValue({context:e,event:t}){let n=e.get(`format`);e.set(`value`,t.value.toFormat(n))},setFormat({context:e,event:t}){e.set(`format`,t.format)},dispatchChangeEvent({scope:e,computed:t}){sU(mQ(e),{value:t(`valueAsString`)})},syncInputElements({context:e,scope:t}){VQ(t,e.get(`value`))},invokeOnChangeEnd({context:e,prop:t,computed:n}){t(`onValueChangeEnd`)?.({value:e.get(`value`),valueAsString:n(`valueAsString`)})},setChannelColorFromInput({context:e,event:t,scope:n,prop:r}){let{channel:i,isTextField:a,value:o}=t,s=e.get(`value`).getChannelValue(`alpha`),c;if(i===`alpha`){let t=parseFloat(o);t=Number.isNaN(t)?s:t,c=e.get(`value`).withChannelValue(`alpha`,t)}else if(a)c=oB(()=>NQ(i===`hex`?IQ(o):o).withChannelValue(`alpha`,s),()=>e.get(`value`));else{let t=e.get(`value`).toFormat(e.get(`format`)),n=Number.isNaN(o)?t.getChannelValue(i):o;c=t.withChannelValue(i,n)}VQ(n,e.get(`value`),c),e.set(`value`,c),r(`onValueChangeEnd`)?.({value:c,valueAsString:c.toString(e.get(`format`))})},incrementChannel({context:e,event:t}){let n=e.get(`value`).incrementChannel(t.channel,t.step);e.set(`value`,n)},decrementChannel({context:e,event:t}){let n=e.get(`value`).decrementChannel(t.channel,t.step);e.set(`value`,n)},incrementAreaXChannel({context:e,event:t,computed:n}){let{xChannel:r}=t.channel,i=n(`areaValue`).incrementChannel(r,t.step);e.set(`value`,i)},decrementAreaXChannel({context:e,event:t,computed:n}){let{xChannel:r}=t.channel,i=n(`areaValue`).decrementChannel(r,t.step);e.set(`value`,i)},incrementAreaYChannel({context:e,event:t,computed:n}){let{yChannel:r}=t.channel,i=n(`areaValue`).incrementChannel(r,t.step);e.set(`value`,i)},decrementAreaYChannel({context:e,event:t,computed:n}){let{yChannel:r}=t.channel,i=n(`areaValue`).decrementChannel(r,t.step);e.set(`value`,i)},setChannelToMax({context:e,event:t}){let n=e.get(`value`),r=n.getChannelRange(t.channel),i=n.withChannelValue(t.channel,r.maxValue);e.set(`value`,i)},setChannelToMin({context:e,event:t}){let n=e.get(`value`),r=n.getChannelRange(t.channel),i=n.withChannelValue(t.channel,r.minValue);e.set(`value`,i)},focusAreaThumb({scope:e}){FU(()=>{dQ(e)?.focus({preventScroll:!0})})},focusChannelThumb({event:e,scope:t}){FU(()=>{fQ(t,e.channel)?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e(`openAutoFocus`)&&FU(()=>{MU({root:uQ(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},setReturnFocus({scope:e}){FU(()=>{vQ(e)?.focus({preventScroll:!0})})},syncFormatSelectElement({context:e,scope:t}){HQ(t,e.get(`format`))},syncValueWithFormat({context:e}){let t=e.get(`value`),n=t.toFormat(e.get(`format`));n.isEqual(t)||e.set(`value`,n)},invokeOnOpen({prop:e,context:t}){e(`inline`)||e(`onOpenChange`)?.({open:!0,value:t.get(`value`)})},invokeOnClose({prop:e,context:t}){e(`inline`)||e(`onOpenChange`)?.({open:!1,value:t.get(`value`)})},toggleVisibility({prop:e,event:t,send:n}){n({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:t})}}}});function VQ(e,t,n){let r=SQ(e);FU(()=>{r.forEach(e=>{let r=e.dataset.channel;oU(e,wQ(n||t,r))})})}function HQ(e,t){let n=pQ(e);n&&FU(()=>oU(n,t))}var UQ=bZ.extendWith(`view`),WQ=Oz(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),GQ=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,KQ=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,qQ=e=>e.ids?.content??`dialog:${e.id}:content`,JQ=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:qz(n)?n(t):n},YQ=e=>e.ids?.title??`dialog:${e.id}:title`,XQ=e=>e.ids?.description??`dialog:${e.id}:description`,ZQ=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,QQ=e=>e.getById(qQ(e)),$Q=e=>e.getById(GQ(e)),e$=e=>e.getById(KQ(e)),t$=e=>e.getById(YQ(e)),n$=e=>e.getById(XQ(e)),r$=e=>e.getById(ZQ(e)),i$=e=>oW(e.getDoc(),`[data-scope="dialog"][data-part="trigger"][data-ownedby="${e.id}"]`),a$=(e,t)=>t==null?i$(e)[0]:e.getById(JQ(e,t));function o$(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n==null?!1:l===n;return t.button({...WQ.trigger.attrs,dir:a(`dir`),id:JQ(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":qQ(o),"data-current":X(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...WQ.backdrop.attrs,dir:a(`dir`),hidden:!c,id:KQ(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...WQ.positioner.attrs,dir:a(`dir`),id:GQ(o),style:qB({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...WQ.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:qQ(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:YQ(o),"aria-describedby":e.description?XQ(o):void 0,style:qB({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...WQ.title.attrs,dir:a(`dir`),id:YQ(o)})},getDescriptionProps(){return t.element({...WQ.description.attrs,dir:a(`dir`),id:XQ(o)})},getCloseTriggerProps(){return t.button({...WQ.closeTrigger.attrs,dir:a(`dir`),id:ZQ(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var s$=DV({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>r$(t):void 0,i=typeof e.modal==`boolean`?e.modal:!0;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:a$(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`syncZIndex`,`setInitialFocus`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return hJ(()=>QQ(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),exclude:i$(e),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return fZ(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?cZ(()=>QQ(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:t(`initialFocusEl`),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=a$(e,a);if(t)return t}return i$(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?qX(()=>[QQ(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||FU(()=>{MU({root:QQ(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){FU(()=>{e.set(`rendered`,{title:!!t$(t),description:!!n$(t)})})},syncZIndex({scope:e}){FU(()=>{let t=QQ(e);if(!t)return;let n=dH(t);[$Q(e),e$(e)].forEach(e=>{e?.style.setProperty(`--z-index`,n.zIndex),e?.style.setProperty(`--layer-index`,n.getPropertyValue(`--layer-index`))})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),c$=Oz(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),l$=Oz(`file-upload`).parts(`root`,`dropzone`,`item`,`itemDeleteTrigger`,`itemGroup`,`itemName`,`itemPreview`,`itemPreviewImage`,`itemSizeText`,`label`,`trigger`,`clearTrigger`).build(),u$=e=>typeof e.getAsEntry==`function`?e.getAsEntry():typeof e.webkitGetAsEntry==`function`?e.webkitGetAsEntry():null,d$=e=>e.isDirectory,f$=e=>e.isFile,p$=(e,t)=>(Object.defineProperty(e,`relativePath`,{value:t?`${t}/${e.name}`:e.name}),e),m$=(e,t)=>Promise.all(Array.from(e).filter(e=>e.kind===`file`).map(e=>{let n=u$(e);if(!n)return null;if(d$(n)&&t)return h$(n.createReader(),`${n.name}`);if(f$(n)&&typeof e.getAsFile==`function`){let t=e.getAsFile();return Promise.resolve(t?p$(t,``):null)}if(f$(n))return new Promise(e=>{n.file(t=>{e(p$(t,``))})})}).filter(e=>e)),h$=(e,t=``)=>new Promise(n=>{let r=[],i=()=>{e.readEntries(e=>{if(e.length===0){n(Promise.all(r).then(e=>e.flat()));return}let a=e.map(e=>{if(!e)return null;if(d$(e))return h$(e.createReader(),`${t}${e.name}`);if(f$(e))return new Promise(n=>{e.file(e=>{n(p$(e,t))})})}).filter(e=>e);r.push(Promise.all(a)),i()})};i()});function g$(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||/\w+\/[-+.\w]+/g.test(e)}function _$(e){return/^.*\.[\w]+$/.test(e)}var v$=e=>g$(e)||_$(e);function y$(e){if(e!=null)return typeof e==`string`?e:Array.isArray(e)?e.filter(v$).join(`,`):Object.entries(e).reduce((e,[t,n])=>[...e,t,...n],[]).filter(v$).join(`,`)}var b$=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,x$=e=>e!=null;function S$(e,t,n){if(x$(e.size)){if(x$(t)&&x$(n)){if(e.size>n)return[!1,`FILE_TOO_LARGE`];if(e.sizen)return[!1,`FILE_TOO_LARGE`]}return[!0,null]}var C$=new Map(`3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip`.split(`[`).flatMap(e=>{let[t,n]=e.split(`_`);return t.split(`,`).map(e=>[e,n])}));function w$(e){let t=e.split(`.`).pop();return t&&C$.get(t)||null}function T$(e,t){if(e&&t){let n=Array.isArray(t)?t:typeof t==`string`?t.split(`,`):[];if(n.length===0)return!0;let r=e.name||``,i=(e.type||w$(r)||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(e=>{let t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}function E$(e,t){let n=e.type===`application/x-moz-file`||T$(e,t);return[n,n?null:`FILE_INVALID_TYPE`]}function D$(e){let t=new Map;return function(n,r){let i=n+(r?Object.entries(r).sort((e,t)=>e[0]{if(Number.isNaN(e))return``;if(e===0)return`0 B`;let{unitSystem:r=`decimal`,precision:i=3,unit:a=`byte`,unitDisplay:o=`short`}=n,s=r===`binary`?1024:1e3,c=a===`bit`?A$:j$,l=e<0,u=Math.abs(e),d=0;for(;u>=s&&de.ids?.root??`file:${e.id}`,P$=e=>e.ids?.dropzone??`file:${e.id}:dropzone`,F$=e=>e.ids?.hiddenInput??`file:${e.id}:input`,I$=e=>e.ids?.trigger??`file:${e.id}:trigger`,L$=e=>e.ids?.label??`file:${e.id}:label`,R$=(e,t)=>e.ids?.item?.(t)??`file:${e.id}:item:${t}`,z$=(e,t)=>e.ids?.itemName?.(t)??`file:${e.id}:item-name:${t}`,B$=(e,t)=>e.ids?.itemSizeText?.(t)??`file:${e.id}:item-size:${t}`,V$=(e,t)=>e.ids?.itemPreview?.(t)??`file:${e.id}:item-preview:${t}`,H$=(e,t)=>e.ids?.itemDeleteTrigger?.(t)??`file:${e.id}:item-delete:${t}`,U$=e=>uB(`${e.name}-${e.size}`),W$=e=>e.getById(N$(e)),G$=e=>e.getById(F$(e)),K$=e=>e.getById(P$(e));function q$(e){let t=RH(e);return e.dataTransfer?e.dataTransfer.types.some(e=>e===`Files`||e===`application/x-moz-file`):!!t&&`files`in t}function J$(e,t,n){let{prop:r,computed:i}=e;return!i(`multiple`)&&t>1?!1:!i(`multiple`)&&t+n.length===2?!0:!(t+n.length>r(`maxFiles`))}function Y$(e,t,n=[],r=[]){let{prop:i,computed:a}=e,o=[],s=[],c={acceptedFiles:n,rejectedFiles:r};return t.forEach(e=>{let[t,r]=E$(e,a(`acceptAttr`)),[l,u]=S$(e,i(`minFileSize`),i(`maxFileSize`)),d=n.some(t=>b$(t,e))||o.some(t=>b$(t,e)),f=i(`validate`)?.(e,c),p=f?f.length===0:!0;if(t&&l&&p&&!d)o.push(e);else{let t=[r,u];d&&t.push(`FILE_EXISTS`),p||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}}),J$(e,o.length,n)||(o.forEach(e=>{s.push({file:e,errors:[`TOO_MANY_FILES`]})}),o.splice(0)),{acceptedFiles:o,rejectedFiles:s}}function X$(e,t){let n=oH(e);try{if(`DataTransfer`in n){let r=new n.DataTransfer;t.forEach(e=>{r.items.add(e)}),e.files=r.files}}catch{}}var Z$=`accepted`,Q$=`button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]`;function $$(e,t){if(!e||e.getAttribute(`type`)===`file`)return!1;let n=e.closest(Q$);return n!=t&&rH(t,n)}function e1(e,t){let{state:n,send:r,prop:i,computed:a,scope:o,context:s}=e,c=!!i(`disabled`),l=!!i(`readOnly`),u=!!i(`required`),d=i(`allowDrop`),f=i(`translations`),p=n.matches(`dragging`),m=n.matches(`focused`)&&!c,h=s.get(`acceptedFiles`),g=i(`maxFiles`);return{dragging:p,focused:m,disabled:c,readOnly:l,transforming:s.get(`transforming`),maxFilesReached:h.length>=g,remainingFiles:Math.max(0,g-h.length),openFilePicker(){c||l||r({type:`OPEN`})},deleteFile(e,t=Z$){c||l||r({type:`FILE.DELETE`,file:e,itemType:t})},acceptedFiles:h,rejectedFiles:s.get(`rejectedFiles`),setFiles(e){c||l||r({type:`FILES.SET`,files:e,count:e.length})},clearRejectedFiles(){c||l||r({type:`REJECTED_FILES.CLEAR`})},clearFiles(){c||l||r({type:`FILES.CLEAR`})},getFileSize(e){return M$(e.size,i(`locale`))},createFileUrl(e,t){let n=o.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(c||l)return!1;let t=Array.from(e?.items??[]).reduce((e,t)=>{if(t.kind!==`file`)return e;let n=t.getAsFile();return n?[...e,n]:e},[]);return t.length?(r({type:`FILE.SELECT`,files:t}),!0):!1},getRootProps(){return t.element({...l$.root.attrs,dir:i(`dir`),id:N$(o),"data-disabled":X(c),"data-readonly":X(l),"data-dragging":X(p)})},getDropzoneProps(e={}){return t.element({...l$.dropzone.attrs,dir:i(`dir`),id:P$(o),tabIndex:c||l||e.disableClick?void 0:0,role:e.disableClick?`application`:`button`,"aria-label":f.dropzone,"aria-disabled":c||l||void 0,"data-invalid":X(i(`invalid`)),"data-disabled":X(c),"data-readonly":X(l),"data-dragging":X(p),onKeyDown(t){if(c||l||t.defaultPrevented)return;let n=RH(t);rH(t.currentTarget,n)&&($$(n,t.currentTarget)||e.disableClick||t.key!==`Enter`&&t.key!==` `||r({type:`DROPZONE.CLICK`,src:`keydown`}))},onClick(t){if(c||l||t.defaultPrevented||e.disableClick)return;let n=RH(t);rH(t.currentTarget,n)&&($$(n,t.currentTarget)||(t.currentTarget.localName===`label`&&t.preventDefault(),r({type:`DROPZONE.CLICK`})))},onDragOver(e){if(c||l||!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=`copy`}catch{}if(!q$(e))return;let t=e.dataTransfer.items.length;r({type:`DROPZONE.DRAG_OVER`,count:t})},onDragLeave(e){c||l||d&&(rH(e.currentTarget,e.relatedTarget)||r({type:`DROPZONE.DRAG_LEAVE`}))},onDrop(e){c||l||(d&&(e.preventDefault(),e.stopPropagation()),q$(e)&&m$(e.dataTransfer.items,i(`directory`)).then(e=>{r({type:`DROPZONE.DROP`,files:Vz(e)})}))},onFocus(){c||l||r({type:`DROPZONE.FOCUS`})},onBlur(){c||l||r({type:`DROPZONE.BLUR`})}})},getTriggerProps(){return t.button({...l$.trigger.attrs,dir:i(`dir`),id:I$(o),disabled:c||l,"data-disabled":X(c),"data-readonly":X(l),"data-invalid":X(i(`invalid`)),type:`button`,onClick(e){c||l||(rH(K$(o),e.currentTarget)&&e.stopPropagation(),r({type:`OPEN`}))}})},getHiddenInputProps(){return t.input({id:F$(o),tabIndex:-1,disabled:c||l,type:`file`,required:i(`required`),capture:i(`capture`),name:i(`name`),accept:a(`acceptAttr`),webkitdirectory:i(`directory`)?``:void 0,multiple:a(`multiple`)||i(`maxFiles`)>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=``},onInput(e){if(c||l)return;let{files:t}=e.currentTarget;r({type:`FILE.SELECT`,files:t?Array.from(t):[]})},style:EW})},getItemGroupProps(e={}){let{type:n=Z$}=e;return t.element({...l$.itemGroup.attrs,dir:i(`dir`),"data-disabled":X(c),"data-type":n})},getItemProps(e){let{file:n,type:r=Z$}=e;return t.element({...l$.item.attrs,dir:i(`dir`),id:R$(o,U$(n)),"data-disabled":X(c),"data-type":r})},getItemNameProps(e){let{file:n,type:r=Z$}=e;return t.element({...l$.itemName.attrs,dir:i(`dir`),id:z$(o,U$(n)),"data-disabled":X(c),"data-type":r})},getItemSizeTextProps(e){let{file:n,type:r=Z$}=e;return t.element({...l$.itemSizeText.attrs,dir:i(`dir`),id:B$(o,U$(n)),"data-disabled":X(c),"data-type":r})},getItemPreviewProps(e){let{file:n,type:r=Z$}=e;return t.element({...l$.itemPreview.attrs,dir:i(`dir`),id:V$(o,U$(n)),"data-disabled":X(c),"data-type":r})},getItemPreviewImageProps(e){let{file:n,url:r,type:i=Z$}=e;if(!n.type.startsWith(`image/`))throw Error(`Preview Image is only supported for image files`);return t.img({...l$.itemPreviewImage.attrs,alt:f.itemPreview?.(n),src:r,"data-disabled":X(c),"data-type":i})},getItemDeleteTriggerProps(e){let{file:n,type:a=Z$}=e;return t.button({...l$.itemDeleteTrigger.attrs,dir:i(`dir`),id:H$(o,U$(n)),type:`button`,disabled:c||l,"data-disabled":X(c),"data-readonly":X(l),"data-type":a,"aria-label":f.deleteFile?.(n),onClick(){c||l||r({type:`FILE.DELETE`,file:n,itemType:a})}})},getLabelProps(){return t.label({...l$.label.attrs,dir:i(`dir`),id:L$(o),htmlFor:F$(o),"data-disabled":X(c),"data-required":X(u)})},getClearTriggerProps(){return t.button({...l$.clearTrigger.attrs,dir:i(`dir`),type:`button`,disabled:c||l,hidden:h.length===0,"data-disabled":X(c),"data-readonly":X(l),onClick(e){e.defaultPrevented||c||l||r({type:`FILES.CLEAR`})}})}}}var t1=DV({props({props:e}){return{minFileSize:0,maxFileSize:1/0,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:`dropzone`,itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e(`defaultAcceptedFiles`),value:e(`acceptedFiles`),isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>b$(e,t[n])),hash(e){return e.map(e=>`${e.name}-${e.size}`).join(`,`)},onChange(t){let r=n();e(`onFileAccept`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:t,rejectedFiles:r.get(`rejectedFiles`)})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(e,t)=>e.length===t?.length&&e.every((e,n)=>b$(e.file,t[n].file)),onChange(t){let r=n();e(`onFileReject`)?.({files:t}),e(`onFileChange`)?.({acceptedFiles:r.get(`acceptedFiles`),rejectedFiles:t})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>y$(e(`accept`)),multiple:({prop:e})=>e(`maxFiles`)>1},watch({track:e,context:t,action:n}){e([()=>t.hash(`acceptedFiles`)],()=>{n([`syncInputElement`])})},on:{"FILES.SET":{actions:[`setFiles`]},"FILE.SELECT":{actions:[`setEventFiles`]},"FILE.DELETE":{actions:[`removeFile`]},"FILES.CLEAR":{actions:[`clearFiles`]},"REJECTED_FILES.CLEAR":{actions:[`clearRejectedFiles`]}},effects:[`preventDocumentDrop`],states:{idle:{on:{OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.FOCUS":{target:`focused`},"DROPZONE.DRAG_OVER":{target:`dragging`}}},focused:{on:{"DROPZONE.BLUR":{target:`idle`},OPEN:{actions:[`openFilePicker`]},"DROPZONE.CLICK":{actions:[`openFilePicker`]},"DROPZONE.DRAG_OVER":{target:`dragging`}}},dragging:{on:{"DROPZONE.DROP":{target:`idle`,actions:[`setEventFiles`]},"DROPZONE.DRAG_LEAVE":{target:`idle`}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e(`preventDocumentDrop`)||!e(`allowDrop`)||e(`disabled`))return;let n=t.getDoc();return aB(rU(n,`dragover`,e=>{e?.preventDefault()},!1),rU(n,`drop`,e=>{rH(W$(t),RH(e))||e.preventDefault()},!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{let n=G$(e);if(!n)return;X$(n,t.get(`acceptedFiles`));let r=e.getWin();n.dispatchEvent(new r.Event(`change`,{bubbles:!0}))})},openFilePicker({scope:e}){FU(()=>{G$(e)?.click()})},setFiles(e){let{computed:t,context:n,event:r}=e,{acceptedFiles:i,rejectedFiles:a}=Y$(e,r.files);n.set(`acceptedFiles`,t(`multiple`)?i:i.length>0?[i[0]]:[]),n.set(`rejectedFiles`,a)},setEventFiles(e){let{computed:t,context:n,event:r,prop:i}=e,a=n.get(`acceptedFiles`),o=n.get(`rejectedFiles`),{acceptedFiles:s,rejectedFiles:c}=Y$(e,r.files,a,o),l=e=>{if(t(`multiple`)){n.set(`acceptedFiles`,t=>[...t,...e]),n.set(`rejectedFiles`,c);return}if(e.length){n.set(`acceptedFiles`,[e[0]]),n.set(`rejectedFiles`,c);return}c.length&&(n.set(`acceptedFiles`,n.get(`acceptedFiles`)),n.set(`rejectedFiles`,c))},u=i(`transformFiles`);u?(n.set(`transforming`,!0),u(s).then(l).catch(e=>{YB(`[zag-js/file-upload] error transforming files +${e}`)}).finally(()=>{n.set(`transforming`,!1)})):l(s)},removeFile({context:e,event:t}){if(t.itemType===`rejected`){let n=e.get(`rejectedFiles`).filter(e=>!b$(e.file,t.file));e.set(`rejectedFiles`,n)}else{let n=e.get(`acceptedFiles`).filter(e=>!b$(e,t.file));e.set(`acceptedFiles`,n)}},clearRejectedFiles({context:e}){e.set(`rejectedFiles`,[])},clearFiles({context:e}){e.set(`acceptedFiles`,[]),e.set(`rejectedFiles`,[])}}}}),n1=Oz(`numberInput`).parts(`root`,`label`,`input`,`control`,`valueText`,`incrementTrigger`,`decrementTrigger`,`scrubber`).build();function r1(e,t){if(!(!e||!t.isActiveElement(e)))try{let{selectionStart:t,selectionEnd:n,value:r}=e;return t==null||n==null?void 0:{start:t,end:n,value:r}}catch{return}}function i1(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){let t=e.value.length;e.setSelectionRange(t,t);return}try{let n=e.value,{start:r,end:i,value:a}=t;if(n===a){e.setSelectionRange(r,i);return}let o=a1(a,n,r),s=r===i?o:a1(a,n,i),c=Math.max(0,Math.min(o,n.length)),l=Math.max(c,Math.min(s,n.length));e.setSelectionRange(c,l)}catch{let t=e.value.length;e.setSelectionRange(t,t)}}}function a1(e,t,n){let r=e.slice(0,n),i=e.slice(n),a=0,o=Math.min(r.length,t.length);for(let e=0;e0&&a>=r.length)return a;if(s>=i.length)return t.length-s;if(a>0)return a;if(s>0)return t.length-s;if(n===0&&a===0&&s===0)return t.length;if(e.length>0){let r=n/e.length;return Math.round(r*t.length)}return t.length}var o1=e=>e.ids?.root??`number-input:${e.id}`,s1=e=>e.ids?.input??`number-input:${e.id}:input`,c1=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,l1=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,u1=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,d1=e=>`number-input:${e.id}:cursor`,f1=e=>e.ids?.label??`number-input:${e.id}:label`,p1=e=>e.getById(s1(e)),qle=e=>e.getById(c1(e)),Jle=e=>e.getById(l1(e)),m1=e=>e.getDoc().getElementById(d1(e)),Yle=(e,t)=>{let n=null;return t===`increment`&&(n=qle(e)),t===`decrement`&&(n=Jle(e)),n},Xle=(e,t)=>{if(!PH())return $le(e,t),()=>{m1(e)?.remove()}},Zle=e=>{let t=e.getDoc(),n=t.documentElement,r=t.body;return r.style.pointerEvents=`none`,n.style.userSelect=`none`,n.style.cursor=`ew-resize`,()=>{r.style.pointerEvents=``,n.style.userSelect=``,n.style.cursor=``,n.style.length||n.removeAttribute(`style`),r.style.length||r.removeAttribute(`style`)}},Qle=(e,t)=>{let{point:n,isRtl:r,event:i}=t,a=e.getWin(),o=NB(i.movementX,a.devicePixelRatio),s=NB(i.movementY,a.devicePixelRatio),c=o>0?`increment`:o<0?`decrement`:null;r&&c===`increment`&&(c=`decrement`),r&&c===`decrement`&&(c=`increment`);let l={x:n.x+o,y:n.y+s},u=a.innerWidth,d=NB(7.5,a.devicePixelRatio);return l.x=xB(l.x+d,u)-d,{hint:c,point:l}},$le=(e,t)=>{let n=e.getDoc(),r=n.createElement(`div`);r.className=`scrubber--cursor`,r.id=d1(e),Object.assign(r.style,{width:`15px`,height:`15px`,position:`fixed`,pointerEvents:`none`,left:`0px`,top:`0px`,zIndex:zV,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:`transform`}),r.innerHTML=` + + + + + + `,n.body.appendChild(r)};function eue(e,t){let{state:n,send:r,prop:i,scope:a,computed:o}=e,s=n.hasTag(`focus`),c=o(`isDisabled`),l=!!i(`readOnly`),u=!!i(`required`),d=n.matches(`scrubbing`),f=o(`isValueEmpty`),p=i(`invalid`)===void 0?o(`isOutOfRange`):!!i(`invalid`),m=c||!o(`canIncrement`)||l,h=c||!o(`canDecrement`)||l,g=i(`translations`);return{focused:s,invalid:p,empty:f,value:o(`formattedValue`),valueAsNumber:o(`valueAsNumber`),setValue(e){r({type:`VALUE.SET`,value:e})},clearValue(){r({type:`VALUE.CLEAR`})},increment(){r({type:`VALUE.INCREMENT`})},decrement(){r({type:`VALUE.DECREMENT`})},setToMax(){r({type:`VALUE.SET`,value:i(`max`)})},setToMin(){r({type:`VALUE.SET`,value:i(`min`)})},focus(){p1(a)?.focus()},getRootProps(){return t.element({id:o1(a),...n1.root.attrs,dir:i(`dir`),"data-disabled":X(c),"data-focus":X(s),"data-invalid":X(p),"data-scrubbing":X(d)})},getLabelProps(){return t.label({...n1.label.attrs,dir:i(`dir`),"data-disabled":X(c),"data-focus":X(s),"data-invalid":X(p),"data-required":X(u),"data-scrubbing":X(d),id:f1(a),htmlFor:s1(a),onClick(){FU(()=>{PV(p1(a))})}})},getControlProps(){return t.element({...n1.control.attrs,dir:i(`dir`),role:`group`,"aria-disabled":c,"data-focus":X(s),"data-disabled":X(c),"data-invalid":X(p),"data-scrubbing":X(d),"aria-invalid":BV(p)})},getValueTextProps(){return t.element({...n1.valueText.attrs,dir:i(`dir`),"data-disabled":X(c),"data-invalid":X(p),"data-focus":X(s),"data-scrubbing":X(d)})},getInputProps(){return t.input({...n1.input.attrs,dir:i(`dir`),name:i(`name`),form:i(`form`),id:s1(a),role:`spinbutton`,defaultValue:o(`formattedValue`),pattern:i(`formatOptions`)?void 0:i(`pattern`),inputMode:i(`inputMode`),"aria-invalid":BV(p),"data-invalid":X(p),disabled:c,"data-disabled":X(c),readOnly:l,required:i(`required`),autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,type:`text`,"aria-roledescription":`numberfield`,"aria-valuemin":i(`min`),"aria-valuemax":i(`max`),"aria-valuenow":Number.isNaN(o(`valueAsNumber`))?void 0:o(`valueAsNumber`),"aria-valuetext":o(`valueText`),"data-scrubbing":X(d),onFocus(){r({type:`INPUT.FOCUS`})},onBlur(){r({type:`INPUT.BLUR`})},onInput(e){let t=r1(e.currentTarget,a);r({type:`INPUT.CHANGE`,target:e.currentTarget,hint:`set`,selection:t})},onBeforeInput(e){try{let{selectionStart:t,selectionEnd:n,value:r}=e.currentTarget,i=r.slice(0,t)+(e.data??``)+r.slice(n);o(`parser`).isValidPartialNumber(i)||e.preventDefault()}catch{}},onKeyDown(e){if(e.defaultPrevented||l||VH(e))return;let t=tU(e)*i(`step`),n={ArrowUp(){r({type:`INPUT.ARROW_UP`,step:t}),e.preventDefault()},ArrowDown(){r({type:`INPUT.ARROW_DOWN`,step:t}),e.preventDefault()},Home(){qH(e)||(r({type:`INPUT.HOME`}),e.preventDefault())},End(){qH(e)||(r({type:`INPUT.END`}),e.preventDefault())},Enter(e){r({type:`INPUT.ENTER`,selection:r1(e.currentTarget,a)})}}[e.key];n?.(e)}})},getDecrementTriggerProps(){return t.button({...n1.decrementTrigger.attrs,dir:i(`dir`),id:l1(a),disabled:h,"data-disabled":X(h),"aria-label":g.decrementLabel,type:`button`,tabIndex:-1,"aria-controls":s1(a),"data-scrubbing":X(d),onPointerDown(e){h||GH(e)&&(r({type:`TRIGGER.PRESS_DOWN`,hint:`decrement`,pointerType:e.pointerType}),e.pointerType===`mouse`&&e.preventDefault(),e.pointerType===`touch`&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){r({type:`TRIGGER.PRESS_UP`,hint:`decrement`,pointerType:e.pointerType})},onPointerLeave(){h||r({type:`TRIGGER.PRESS_UP`,hint:`decrement`})}})},getIncrementTriggerProps(){return t.button({...n1.incrementTrigger.attrs,dir:i(`dir`),id:c1(a),disabled:m,"data-disabled":X(m),"aria-label":g.incrementLabel,type:`button`,tabIndex:-1,"aria-controls":s1(a),"data-scrubbing":X(d),onPointerDown(e){m||!GH(e)||(r({type:`TRIGGER.PRESS_DOWN`,hint:`increment`,pointerType:e.pointerType}),e.pointerType===`mouse`&&e.preventDefault(),e.pointerType===`touch`&&e.currentTarget?.focus({preventScroll:!0}))},onPointerUp(e){r({type:`TRIGGER.PRESS_UP`,hint:`increment`,pointerType:e.pointerType})},onPointerLeave(e){r({type:`TRIGGER.PRESS_UP`,hint:`increment`,pointerType:e.pointerType})}})},getScrubberProps(){return t.element({...n1.scrubber.attrs,dir:i(`dir`),"data-disabled":X(c),id:u1(a),role:`presentation`,"data-scrubbing":X(d),onMouseDown(e){if(c||!GH(e))return;let t=nU(e),n=oH(e.currentTarget).devicePixelRatio;t.x-=NB(7.5,n),t.y-=NB(7.5,n),r({type:`SCRUBBER.PRESS_DOWN`,point:t}),e.preventDefault(),FU(()=>{PV(p1(a))})},style:{cursor:c?void 0:`ew-resize`}})}}}var h1=new Map,g1=!1;try{g1=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var _1=!1;try{_1=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var v1={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},tue=class{format(e){let t=``;if(t=!g1&&this.options.signDisplay!=null?rue(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!_1){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=v1[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!g1&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!_1&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=nue(e,t),this.options=t}};function nue(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!_1){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!v1[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}var iue=RegExp(`^.*\\(.*\\).*$`),aue=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],y1=class{parse(e){return x1(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return x1(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return x1(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},b1=new Map;function x1(e,t,n){let r=S1(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of aue)if(i!==r.options.numberingSystem){let r=S1(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function S1(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new y1(this.locale,e).parse(new tue(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&iue.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=w1(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&(e=w1(e,`'`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&(e=w1(e,` `,this.symbols.group),e=w1(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=w1(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=cue(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}},C1=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),sue=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function cue(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=sue.map(e=>i.formatToParts(e)),c=a.find(e=>e.type===`minusSign`)?.value??`-`,l=o.find(e=>e.type===`plusSign`)?.value;!l&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(l=`+`);let u=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,d=a.find(e=>e.type===`group`)?.value,f=a.filter(e=>!C1.has(e.type)).map(e=>T1(e.value)),p=s.flatMap(e=>e.filter(e=>!C1.has(e.type)).map(e=>T1(e.value))),m=[...new Set([...f,...p])].sort((e,t)=>t.length-e.length),h=m.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${m.join(`|`)}|[\\p{White_Space}]`,`gu`),g=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(g.map((e,t)=>[e,t])),v=RegExp(`[${g.join(``)}]`,`g`);return{minusSign:c,plusSign:l,decimal:u,group:d,literals:h,numeral:v,index:e=>String(_.get(e))}}function w1(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function T1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var lue=(e,t={})=>new Intl.NumberFormat(e,t),uue=(e,t={})=>new y1(e,t),E1=(e,t)=>{let{prop:n,computed:r}=t;return n(`formatOptions`)?e===``?NaN:r(`parser`).parse(e):parseFloat(e)},D1=(e,t)=>{let{prop:n,computed:r}=t;return Number.isNaN(e)?``:n(`formatOptions`)?r(`formatter`).format(e):e.toString()},due=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style===`percent`&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:fue,guards:pue,createMachine:mue}=OV(),{not:O1,and:k1}=pue,hue=mue({props({props:e}){let t=due(e.step,e.formatOptions);return{dir:`ltr`,locale:`en-US`,focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:`decimal`,pattern:`-?[0-9]*(.[0-9]+)?`,defaultValue:``,step:t,min:-(2**53-1),max:2**53-1,spinOnPress:!0,...e,translations:{incrementLabel:`increment value`,decrementLabel:`decrease value`,...e.translations}}},initialState(){return`idle`},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),onChange(t){let r=E1(t,{computed:n(),prop:e});e(`onValueChange`)?.({value:t,valueAsNumber:r})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(e){return e?`x:${e.x}, y:${e.y}`:``}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e(`dir`)===`rtl`,valueAsNumber:({context:e,computed:t,prop:n})=>E1(e.get(`value`),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>D1(e(`valueAsNumber`),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>TB(e(`valueAsNumber`),t(`min`)),isAtMax:({computed:e,prop:t})=>wB(e(`valueAsNumber`),t(`max`)),isOutOfRange:({computed:e,prop:t})=>!EB(e(`valueAsNumber`),t(`min`),t(`max`)),isValueEmpty:({context:e})=>e.get(`value`)===``,isDisabled:({prop:e,context:t})=>!!e(`disabled`)||t.get(`fieldsetDisabled`),canIncrement:({prop:e,computed:t})=>e(`allowOverflow`)||!t(`isAtMax`),canDecrement:({prop:e,computed:t})=>e(`allowOverflow`)||!t(`isAtMin`),valueText:({prop:e,context:t})=>e(`translations`).valueText?.(t.get(`value`)),formatter:rV(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>lue(e,t)),parser:rV(({prop:e})=>[e(`locale`),e(`formatOptions`)],([e,t])=>uue(e,t))},watch({track:e,action:t,context:n,computed:r,prop:i}){e([()=>n.get(`value`),()=>i(`locale`),()=>JSON.stringify(i(`formatOptions`))],()=>{t([`syncInputElement`])}),e([()=>r(`isOutOfRange`)],()=>{t([`invokeOnInvalid`])}),e([()=>n.hash(`scrubberCursorPoint`)],()=>{t([`setVirtualCursorPosition`])})},effects:[`trackFormControl`],on:{"VALUE.SET":{actions:[`setRawValue`]},"VALUE.CLEAR":{actions:[`clearValue`]},"VALUE.INCREMENT":{actions:[`increment`]},"VALUE.DECREMENT":{actions:[`decrement`]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:`isTouchPointer`,target:`before:spin`,actions:[`setHint`]},{target:`before:spin`,actions:[`focusInput`,`invokeOnFocus`,`setHint`]}],"SCRUBBER.PRESS_DOWN":{target:`scrubbing`,actions:[`focusInput`,`invokeOnFocus`,`setHint`,`setCursorPoint`]},"INPUT.FOCUS":{target:`focused`,actions:[`focusInput`,`invokeOnFocus`]}}},focused:{tags:[`focus`],effects:[`attachWheelListener`],on:{"TRIGGER.PRESS_DOWN":[{guard:`isTouchPointer`,target:`before:spin`,actions:[`setHint`]},{target:`before:spin`,actions:[`focusInput`,`setHint`]}],"SCRUBBER.PRESS_DOWN":{target:`scrubbing`,actions:[`focusInput`,`setHint`,`setCursorPoint`]},"INPUT.ARROW_UP":{actions:[`increment`]},"INPUT.ARROW_DOWN":{actions:[`decrement`]},"INPUT.HOME":{actions:[`decrementToMin`]},"INPUT.END":{actions:[`incrementToMax`]},"INPUT.CHANGE":{actions:[`setValue`,`setHint`]},"INPUT.BLUR":[{guard:k1(`clampValueOnBlur`,O1(`isInRange`)),target:`idle`,actions:[`setClampedValue`,`clearHint`,`invokeOnBlur`,`invokeOnValueCommit`]},{guard:O1(`isInRange`),target:`idle`,actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`,`invokeOnInvalid`,`invokeOnValueCommit`]},{target:`idle`,actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`,`invokeOnValueCommit`]}],"INPUT.ENTER":{actions:[`setFormattedValue`,`clearHint`,`invokeOnBlur`,`invokeOnValueCommit`]}}},"before:spin":{tags:[`focus`],effects:[`trackButtonDisabled`,`waitForChangeDelay`],entry:fue([{guard:`isIncrementHint`,actions:[`increment`]},{guard:`isDecrementHint`,actions:[`decrement`]}]),on:{CHANGE_DELAY:{target:`spinning`,guard:k1(`isInRange`,`spinOnPress`)},"TRIGGER.PRESS_UP":[{guard:`isTouchPointer`,target:`focused`,actions:[`clearHint`]},{target:`focused`,actions:[`focusInput`,`clearHint`]}]}},spinning:{tags:[`focus`],effects:[`trackButtonDisabled`,`spinValue`],on:{SPIN:[{guard:`isIncrementHint`,actions:[`increment`]},{guard:`isDecrementHint`,actions:[`decrement`]}],"TRIGGER.PRESS_UP":{target:`focused`,actions:[`focusInput`,`clearHint`]}}},scrubbing:{tags:[`focus`],effects:[`activatePointerLock`,`trackMousemove`,`setupVirtualCursor`,`preventTextSelection`],on:{"SCRUBBER.POINTER_UP":{target:`focused`,actions:[`focusInput`,`clearCursorPoint`]},"SCRUBBER.POINTER_MOVE":[{guard:`isIncrementHint`,actions:[`increment`,`setCursorPoint`]},{guard:`isDecrementHint`,actions:[`decrement`,`setCursorPoint`]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e(`clampValueOnBlur`),spinOnPress:({prop:e})=>!!e(`spinOnPress`),isInRange:({computed:e})=>!e(`isOutOfRange`),isDecrementHint:({context:e,event:t})=>(t.hint??e.get(`hint`))===`decrement`,isIncrementHint:({context:e,event:t})=>(t.hint??e.get(`hint`))===`increment`,isTouchPointer:({event:e})=>e.pointerType===`touch`},effects:{waitForChangeDelay({send:e}){let t=setTimeout(()=>{e({type:`CHANGE_DELAY`})},300);return()=>clearTimeout(t)},spinValue({send:e}){let t=setInterval(()=>{e({type:`SPIN`})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){return dU(p1(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},setupVirtualCursor({context:e,scope:t}){return Xle(t,e.get(`scrubberCursorPoint`))},preventTextSelection({scope:e}){return Zle(e)},trackButtonDisabled({context:e,scope:t,send:n}){return zU(Yle(t,e.get(`hint`)),{attributes:[`disabled`],callback(){n({type:`TRIGGER.PRESS_UP`,src:`attr`})}})},attachWheelListener({scope:e,send:t,prop:n}){let r=p1(e);if(!r||!e.isActiveElement(r)||!n(`allowMouseWheel`))return;function i(e){e.preventDefault();let n=Math.sign(e.deltaY)*-1;n===1?t({type:`VALUE.INCREMENT`}):n===-1&&t({type:`VALUE.DECREMENT`})}return rU(r,`wheel`,i,{passive:!1})},activatePointerLock({scope:e}){if(!PH())return XU(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:r}){let i=e.getDoc();function a(i){let a=Qle(e,{point:n.get(`scrubberCursorPoint`),isRtl:r(`isRtl`),event:i});a.hint&&t({type:`SCRUBBER.POINTER_MOVE`,hint:a.hint,point:a.point})}function o(){t({type:`SCRUBBER.POINTER_UP`})}return aB(rU(i,`mousemove`,a,!1),rU(i,`mouseup`,o,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t(`focusInputOnChange`))return;let n=p1(e);e.isActiveElement(n)||FU(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:r}){let i=WB(r(`valueAsNumber`),t.step??n(`step`));n(`allowOverflow`)||(i=OB(i,n(`min`),n(`max`))),e.set(`value`,D1(i,{computed:r,prop:n}))},decrement({context:e,event:t,prop:n,computed:r}){let i=GB(r(`valueAsNumber`),t.step??n(`step`));n(`allowOverflow`)||(i=OB(i,n(`min`),n(`max`))),e.set(`value`,D1(i,{computed:r,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){let r=OB(n(`valueAsNumber`),t(`min`),t(`max`));e.set(`value`,D1(r,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:r}){let i=E1(t.value,{computed:r,prop:n});n(`allowOverflow`)||(i=OB(i,n(`min`),n(`max`))),e.set(`value`,D1(i,{computed:r,prop:n}))},setValue({context:e,event:t}){let n=t.target?.value??t.value;e.set(`value`,n)},clearValue({context:e}){e.set(`value`,``)},incrementToMax({context:e,prop:t,computed:n}){let r=D1(t(`max`),{computed:n,prop:t});e.set(`value`,r)},decrementToMin({context:e,prop:t,computed:n}){let r=D1(t(`min`),{computed:n,prop:t});e.set(`value`,r)},setHint({context:e,event:t}){e.set(`hint`,t.hint)},clearHint({context:e}){e.set(`hint`,null)},invokeOnFocus({computed:e,prop:t}){t(`onFocusChange`)?.({focused:!0,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},invokeOnBlur({computed:e,prop:t}){t(`onFocusChange`)?.({focused:!1,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},invokeOnInvalid({computed:e,prop:t,event:n}){if(n.type===`INPUT.CHANGE`)return;let r=e(`valueAsNumber`)>t(`max`)?`rangeOverflow`:`rangeUnderflow`;t(`onValueInvalid`)?.({reason:r,value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},invokeOnValueCommit({computed:e,prop:t}){t(`onValueCommit`)?.({value:e(`formattedValue`),valueAsNumber:e(`valueAsNumber`)})},syncInputElement({context:e,event:t,computed:n,scope:r}){let i=t.type.endsWith(`CHANGE`)?e.get(`value`):n(`formattedValue`),a=p1(r),o=t.selection??r1(a,r);FU(()=>{oU(a,i),i1(a,o,r)})},setFormattedValue({context:e,computed:t,action:n}){e.set(`value`,t(`formattedValue`)),n([`syncInputElement`])},setCursorPoint({context:e,event:t}){e.set(`scrubberCursorPoint`,t.point)},clearCursorPoint({context:e}){e.set(`scrubberCursorPoint`,null)},setVirtualCursorPosition({context:e,scope:t}){let n=m1(t),r=e.get(`scrubberCursorPoint`);!n||!r||(n.style.transform=`translate3d(${r.x}px, ${r.y}px, 0px)`)}}}}),A1=Oz(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`).build(),j1=e=>e.ids?.anchor??`popover:${e.id}:anchor`,M1=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`popover:${e.id}:trigger:${t}`:`popover:${e.id}:trigger`:qz(n)?n(t):n},N1=e=>e.ids?.content??`popover:${e.id}:content`,P1=e=>e.ids?.positioner??`popover:${e.id}:popper`,gue=e=>e.ids?.arrow??`popover:${e.id}:arrow`,F1=e=>e.ids?.title??`popover:${e.id}:title`,I1=e=>e.ids?.description??`popover:${e.id}:desc`,_ue=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,L1=e=>e.getById(j1(e)),R1=e=>oW(e.getDoc(),`[data-scope="popover"][data-part="trigger"][data-ownedby="${e.id}"]`),z1=(e,t)=>t==null?R1(e)[0]:e.getById(M1(e,t)),B1=e=>e.getById(N1(e)),V1=e=>e.getById(P1(e)),vue=e=>e.getById(F1(e)),yue=e=>e.getById(I1(e));function bue(e,t){let{state:n,context:r,send:i,computed:a,prop:o,scope:s}=e,c=o(`translations`),l=n.matches(`open`),u=r.get(`currentPlacement`),d=a(`currentPortalled`),f=r.get(`renderedElements`),p=r.get(`triggerValue`),m=rq({...o(`positioning`),placement:u});return{portalled:d,open:l,setOpen(e){n.matches(`open`)!==e&&i({type:e?`OPEN`:`CLOSE`})},triggerValue:p,setTriggerValue(e){i({type:`TRIGGER_VALUE.SET`,value:e})},reposition(e={}){i({type:`POSITIONING.SET`,options:e})},getArrowProps(){return t.element({id:gue(s),...A1.arrow.attrs,dir:o(`dir`),style:m.arrow})},getArrowTipProps(){return t.element({...A1.arrowTip.attrs,dir:o(`dir`),style:m.arrowTip})},getAnchorProps(){return t.element({...A1.anchor.attrs,dir:o(`dir`),id:j1(s)})},getTriggerProps(e={}){let{value:n}=e,r=n==null?!1:p===n;return t.button({...A1.trigger.attrs,dir:o(`dir`),type:`button`,"data-placement":u,id:M1(s,n),"data-ownedby":s.id,"data-value":n,"data-current":X(r),"aria-haspopup":`dialog`,"aria-expanded":n==null?l:l&&r,"data-state":l?`open`:`closed`,"aria-controls":N1(s),onPointerDown(e){GH(e)&&PH()&&e.currentTarget.focus()},onClick(e){e.defaultPrevented||i({type:l&&n!=null&&!r?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})},onBlur(e){i({type:`TRIGGER_BLUR`,target:e.relatedTarget})}})},getIndicatorProps(){return t.element({...A1.indicator.attrs,dir:o(`dir`),"data-state":l?`open`:`closed`})},getPositionerProps(){return t.element({id:P1(s),...A1.positioner.attrs,dir:o(`dir`),style:m.floating})},getContentProps(){return t.element({...A1.content.attrs,dir:o(`dir`),id:N1(s),tabIndex:-1,role:`dialog`,"aria-modal":BV(o(`modal`)),hidden:!l,"data-state":l?`open`:`closed`,"data-expanded":X(l),"aria-labelledby":f.title?F1(s):void 0,"aria-describedby":f.description?I1(s):void 0,"data-placement":u})},getTitleProps(){return t.element({...A1.title.attrs,id:F1(s),dir:o(`dir`)})},getDescriptionProps(){return t.element({...A1.description.attrs,id:I1(s),dir:o(`dir`)})},getCloseTriggerProps(){return t.button({...A1.closeTrigger.attrs,dir:o(`dir`),id:_ue(s),type:`button`,"aria-label":c.closeTriggerLabel,onClick(e){e.defaultPrevented||(e.stopPropagation(),i({type:`CLOSE`}))}})}}}var xue=DV({props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,restoreFocus:!0,...e,translations:{closeTriggerLabel:`close`,...e.translations},positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:z1(n,e)})}}))}},computed:{currentPortalled:({prop:e})=>!!e(`modal`)||!!e(`portalled`)},watch({track:e,prop:t,action:n}){e([()=>t(`open`)],()=>{n([`toggleVisibility`])})},entry:[`checkRenderedElements`],on:{"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`,`reposition`]}},states:{closed:{on:{"CONTROLLED.OPEN":{target:`open`,actions:[`setInitialFocus`]},TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`,`setInitialFocus`]}]}},open:{effects:[`trapFocus`,`preventScroll`,`hideContentBelow`,`trackDismissableElement`,`trackPositioning`,`proxyTabFocus`],on:{"CONTROLLED.CLOSE":{target:`closed`,actions:[`setFinalFocus`]},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`,`setFinalFocus`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"POSITIONING.SET":{actions:[`reposition`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){e.set(`currentPlacement`,t(`positioning`).placement);let r=L1(n);return tq(()=>r??z1(n,e.get(`triggerValue`)),()=>V1(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){let r=()=>B1(n),i=!0;return hJ(r,{type:`popover`,pointerBlocking:t(`modal`),exclude:R1(n),defer:!0,onEscapeKeyDown(e){t(`onEscapeKeyDown`)?.(e),!t(`closeOnEscape`)&&e.preventDefault()},onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&(i=!(e.detail.focusable||e.detail.contextmenu),t(`closeOnInteractOutside`)||e.preventDefault())},onPointerDownOutside:t(`onPointerDownOutside`),onFocusOutside:t(`onFocusOutside`),persistentElements:t(`persistentElements`),onRequestDismiss:t(`onRequestDismiss`),onDismiss(){e({type:`CLOSE`,src:`interact-outside`,restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t,context:n}){return e(`modal`)||!e(`portalled`)?void 0:aW(()=>B1(t),{triggerElement:z1(t,n.get(`triggerValue`)),defer:!0,getShadowRoot:!0,onFocus(e){e.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t,context:n}){return e(`modal`)?qX(()=>[B1(t),z1(t,n.get(`triggerValue`))],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e(`modal`))return fZ(t.getDoc())},trapFocus({prop:e,scope:t,context:n}){return e(`modal`)?cZ(()=>B1(t),{preventScroll:!0,returnFocusOnDeactivate:!!e(`restoreFocus`),initialFocus:()=>MU({root:B1(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)}),setReturnFocus:r=>{let i=e(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let e=z1(t,a);if(e)return e}return R1(t)[0]||r},getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){let i=L1(n);tq(()=>i??z1(n,r.get(`triggerValue`)),()=>V1(n),{...t(`positioning`),...e.options,defer:!0,listeners:!1,onComplete(e){r.set(`currentPlacement`,e.placement)}})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},checkRenderedElements({context:e,scope:t}){FU(()=>{Object.assign(e.get(`renderedElements`),{title:!!vue(t),description:!!yue(t)})})},setInitialFocus({prop:e,scope:t}){e(`modal`)||FU(()=>{MU({root:B1(t),getInitialEl:e(`initialFocusEl`),enabled:e(`autoFocus`)})?.focus({preventScroll:!0})})},setFinalFocus({event:e,prop:t,scope:n,context:r}){let i=e.restoreFocus??e.previousEvent?.restoreFocus;i!=null&&!i||t(`restoreFocus`)&&FU(()=>{let e=t(`finalFocusEl`)?.();if(e){e.focus({preventScroll:!0});return}z1(n,r.get(`triggerValue`))?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e(`onOpenChange`)?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}}),H1=Oz(`slider`).parts(`root`,`label`,`thumb`,`valueText`,`track`,`range`,`control`,`markerGroup`,`marker`,`draggingIndicator`).build(),U1=e=>e.ids?.root??`slider:${e.id}`,W1=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,G1=(e,t)=>e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,K1=e=>e.ids?.control??`slider:${e.id}:control`,Sue=e=>e.ids?.track??`slider:${e.id}:track`,Cue=e=>e.ids?.range??`slider:${e.id}:range`,q1=e=>e.ids?.label??`slider:${e.id}:label`,wue=e=>e.ids?.valueText??`slider:${e.id}:value-text`,Tue=(e,t)=>e.ids?.marker?.(t)??`slider:${e.id}:marker:${t}`,Eue=e=>e.getById(U1(e)),Due=(e,t)=>e.getById(W1(e,t)),J1=e=>oW(X1(e),`[role=slider]`),Oue=e=>J1(e)[0],Y1=(e,t)=>e.getById(G1(e,t)),X1=e=>e.getById(K1(e)),kue=(e,t,n)=>t===`contain`?(n===`vertical`?e?.height??0:e?.width??0)/2:0,Z1=(e,t)=>{let{context:n,prop:r,scope:i,refs:a}=e,o=X1(i);if(!o)return;let s=a.get(`thumbDragOffset`);return jB(Aue({x:t.x-(s?.x??0),y:t.y-(s?.y??0)},o,kue(n.get(`thumbSize`),r(`thumbAlignment`),r(`orientation`))).getPercentValue({orientation:r(`orientation`),dir:r(`dir`),inverted:{y:!0}}),r(`min`),r(`max`),r(`step`))};function Aue(e,t,n){let{left:r,top:i,width:a,height:o}=t.getBoundingClientRect(),s=a-n*2,c=o-n*2,l=r+n,u=i+n,d={x:e.x-l,y:e.y-u},f={x:s>0?kB(d.x/s):0,y:c>0?kB(d.y/c):0};function p(e={}){let{dir:t=`ltr`,orientation:n=`horizontal`,inverted:r}=e,i=typeof r==`object`?r.x:r,a=typeof r==`object`?r.y:r;return n===`horizontal`?t===`rtl`||i?1-f.x:f.x:a?1-f.y:f.y}return{offset:d,percent:f,getPercentValue:p}}var jue=(e,t)=>{t.forEach((t,n)=>{let r=Y1(e,n);r&&sU(r,{value:t})})},Mue=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function Nue(e){return[e[0],e[e.length-1]]}function Pue(e){let{prop:t,computed:n}=e,r=n(`valuePercent`),[i,a]=Nue(r);if(r.length===1){if(t(`origin`)===`center`){let e=r[0]<50;return{start:e?`${r[0]}%`:`50%`,end:e?`50%`:`${100-r[0]}%`}}return t(`origin`)===`end`?{start:`${a}%`,end:`0%`}:{start:`0%`,end:`${100-a}%`}}return{start:`${i}%`,end:`${100-a}%`}}function Fue(e){let{computed:t}=e,n=t(`isVertical`),r=t(`isRtl`);return n?{position:`absolute`,bottom:`var(--slider-range-start)`,top:`var(--slider-range-end)`}:{position:`absolute`,[r?`right`:`left`]:`var(--slider-range-start)`,[r?`left`:`right`]:`var(--slider-range-end)`}}function Iue(e,t){let{context:n,prop:r}=e,{height:i=0}=n.get(`thumbSize`)??{},a=BB([r(`min`),r(`max`)],[-i/2,i/2]);return parseFloat(a(t).toFixed(2))}function Lue(e,t){let{computed:n,context:r,prop:i}=e,{width:a=0}=r.get(`thumbSize`)??{};if(n(`isRtl`)){let e=BB([i(`max`),i(`min`)],[-a/2,a/2]);return-1*parseFloat(e(t).toFixed(2))}let o=BB([i(`min`),i(`max`)],[-a/2,a/2]);return parseFloat(o(t).toFixed(2))}function Rue(e,t,n){let{computed:r,prop:i}=e;return i(`thumbAlignment`)===`center`?`${t}%`:`calc(${t}% - ${r(`isVertical`)?Iue(e,n):Lue(e,n)}px)`}function Q1(e,t){let{prop:n}=e;return Rue(e,AB(t,n(`min`),n(`max`))*100,t)}function $1(e){let{computed:t,prop:n}=e,r=`visible`;return n(`thumbAlignment`)===`contain`&&!t(`hasMeasuredThumbSize`)&&(r=`hidden`),r}function e0(e,t){let{computed:n,context:r}=e,i=n(`isVertical`)?`bottom`:`insetInlineStart`,a=r.get(`focusedIndex`);return{visibility:$1(e),position:`absolute`,transform:`var(--slider-thumb-transform)`,[i]:`var(--slider-thumb-offset-${t})`,zIndex:a===t?1:void 0}}function zue(){return{touchAction:`none`,userSelect:`none`,WebkitUserSelect:`none`,position:`relative`}}function Bue(e){let{context:t,computed:n}=e,r=n(`isVertical`),i=n(`isRtl`),a=Pue(e),o=t.get(`thumbSize`);return{...t.get(`value`).reduce((t,n,r)=>{let i=Q1(e,n);return{...t,[`--slider-thumb-offset-${r}`]:i}},{}),"--slider-thumb-width":KB(o?.width),"--slider-thumb-height":KB(o?.height),"--slider-thumb-transform":r?`translateY(50%)`:i?`translateX(50%)`:`translateX(-50%)`,"--slider-range-start":a.start,"--slider-range-end":a.end}}function Vue(e,t){let{computed:n}=e,r=n(`isHorizontal`),i=n(`isRtl`);return{visibility:$1(e),position:`absolute`,pointerEvents:`none`,[r?`insetInlineStart`:`bottom`]:Q1(e,t),translate:`var(--translate-x) var(--translate-y)`,"--translate-x":r?i?`50%`:`-50%`:`0%`,"--translate-y":r?`0%`:`50%`}}function Hue(){return{userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`,position:`relative`}}function t0(e){let{index:t,values:n,min:r,max:i,gap:a}=e,o=n[t-1],s=n[t+1];return{min:o==null?r:o+a,max:s==null?i:s-a}}function n0(e){return Math.round(e*1e10)/1e10}function r0(e){let{index:t,value:n,values:r}=e,i=t0(e),a=r.slice();return a[t]=n0(OB(n,i.min,i.max)),{values:a,index:t,swapped:!1}}function Uue(e){let{index:t,value:n,values:r,min:i,max:a,gap:o}=e,s=r.slice();s[t]=n0(OB(n,i+t*o,a-(r.length-1-t)*o));for(let e=t+1;e=0;e--){let t=s[e+1]-o;s[e]>t&&(s[e]=n0(t))}return{values:s,index:t,swapped:!1}}function Wue(e,t){let{index:n,value:r,values:i,gap:a}=e,o=i[n-1],s=i[n+1],c=s!=null&&r>=s&&r>t,l=o!=null&&r<=o&&rd[u]-a?d[n]=n0(d[u]-a):l&&d[n]a0(e,t,n))}function i0(e,t){let{context:n,prop:r}=e,i=r(`step`)*r(`minStepsBetweenThumbs`);return zB(n.get(`value`),r(`min`),r(`max`),i)[t]}function a0(e,t,n){let{prop:r}=e,i=i0(e,n);return OB(PB(t,r(`min`),r(`max`),r(`step`)),i.min,i.max)}function que(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=i0(e,a),s=RB(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=OB(s[a],o.min,o.max),s}function Jue(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=i0(e,a),s=LB(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=OB(s[a],o.min,o.max),s}function Yue(e,t){let{context:n}=e,r=n.get(`value`),i=0,a=Math.abs(r[0]-t);for(let e=1;e0&&i[e-1]===a;)--e;return e}return t}function Xue(e,t){let{state:n,send:r,context:i,prop:a,computed:o,scope:s}=e,c=a(`aria-label`),l=a(`aria-labelledby`),u=i.get(`value`),d=i.get(`focusedIndex`),f=n.matches(`focus`),p=n.matches(`dragging`),m=o(`isDisabled`),h=a(`invalid`),g=o(`isInteractive`),_=a(`orientation`)===`horizontal`,v=a(`orientation`)===`vertical`;function y(e){return AB(e,a(`min`),a(`max`))}function b(e){return jB(e,a(`min`),a(`max`),a(`step`))}return{value:u,dragging:p,focused:f,setValue(e){r({type:`SET_VALUE`,value:e})},getThumbValue(e){return u[e]},setThumbValue(e,t){r({type:`SET_VALUE`,index:e,value:t})},getValuePercent:y,getPercentValue:b,getThumbPercent(e){return y(u[e])},setThumbPercent(e,t){r({type:`SET_VALUE`,index:e,value:b(t)})},getThumbMin(t){return i0(e,t).min},getThumbMax(t){return i0(e,t).max},increment(e){r({type:`INCREMENT`,index:e})},decrement(e){r({type:`DECREMENT`,index:e})},focus(){g&&r({type:`FOCUS`,index:0})},getLabelProps(){return t.label({...H1.label.attrs,dir:a(`dir`),"data-disabled":X(m),"data-orientation":a(`orientation`),"data-invalid":X(h),"data-dragging":X(p),"data-focus":X(f),id:q1(s),htmlFor:G1(s,0),onClick(e){g&&(e.preventDefault(),Oue(s)?.focus())},style:{userSelect:`none`,WebkitUserSelect:`none`}})},getRootProps(){return t.element({...H1.root.attrs,"data-disabled":X(m),"data-orientation":a(`orientation`),"data-dragging":X(p),"data-invalid":X(h),"data-focus":X(f),id:U1(s),dir:a(`dir`),style:Bue(e)})},getValueTextProps(){return t.element({...H1.valueText.attrs,dir:a(`dir`),"data-disabled":X(m),"data-orientation":a(`orientation`),"data-invalid":X(h),"data-focus":X(f),id:wue(s)})},getTrackProps(){return t.element({...H1.track.attrs,dir:a(`dir`),id:Sue(s),"data-disabled":X(m),"data-invalid":X(h),"data-dragging":X(p),"data-orientation":a(`orientation`),"data-focus":X(f),style:{position:`relative`}})},getThumbProps(n){let{index:i=0,name:o}=n,h=u[i],y=i0(e,i),b=a(`getAriaValueText`)?.({value:h,index:i}),x=Array.isArray(c)?c[i]:c,S=Array.isArray(l)?l[i]:l;return t.element({...H1.thumb.attrs,dir:a(`dir`),"data-index":i,"data-name":o,id:W1(s,i),"data-disabled":X(m),"data-orientation":a(`orientation`),"data-focus":X(f&&d===i),"data-dragging":X(p&&d===i),draggable:!1,"aria-disabled":BV(m),"aria-label":x,"aria-labelledby":S??q1(s),"aria-orientation":a(`orientation`),"aria-valuemax":y.max,"aria-valuemin":y.min,"aria-valuenow":u[i],"aria-valuetext":b,role:`slider`,tabIndex:m?void 0:0,style:e0(e,i),onPointerDown(e){if(!g||!GH(e))return;let t=e.currentTarget.getBoundingClientRect(),n={x:t.left+t.width/2,y:t.top+t.height/2};r({type:`THUMB_POINTER_DOWN`,index:i,offset:{x:e.clientX-n.x,y:e.clientY-n.y}}),e.stopPropagation()},onBlur(){g&&r({type:`BLUR`})},onFocus(){g&&r({type:`FOCUS`,index:i})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=tU(e)*a(`step`),n={ArrowUp(){_||r({type:`ARROW_INC`,step:t,src:`ArrowUp`})},ArrowDown(){_||r({type:`ARROW_DEC`,step:t,src:`ArrowDown`})},ArrowLeft(){v||r({type:`ARROW_DEC`,step:t,src:`ArrowLeft`})},ArrowRight(){v||r({type:`ARROW_INC`,step:t,src:`ArrowRight`})},PageUp(){r({type:`ARROW_INC`,step:t,src:`PageUp`})},PageDown(){r({type:`ARROW_DEC`,step:t,src:`PageDown`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[ZH(e,{dir:a(`dir`),orientation:a(`orientation`)})];n&&(n(e),e.preventDefault(),e.stopPropagation())}})},getHiddenInputProps(e){let{index:n=0,name:r}=e;return t.input({name:r??(a(`name`)?a(`name`)+(u.length>1?`[]`:``):void 0),form:a(`form`),type:`text`,hidden:!0,defaultValue:u[n],id:G1(s,n)})},getRangeProps(){return t.element({id:Cue(s),...H1.range.attrs,dir:a(`dir`),"data-dragging":X(p),"data-focus":X(f),"data-invalid":X(h),"data-disabled":X(m),"data-orientation":a(`orientation`),style:Fue(e)})},getControlProps(){return t.element({...H1.control.attrs,dir:a(`dir`),id:K1(s),"data-dragging":X(p),"data-disabled":X(m),"data-orientation":a(`orientation`),"data-invalid":X(h),"data-focus":X(f),style:zue(),onPointerDown(e){g&&GH(e)&&(qH(e)||(r({type:`POINTER_DOWN`,point:nU(e)}),e.preventDefault(),e.stopPropagation()))}})},getMarkerGroupProps(){return t.element({...H1.markerGroup.attrs,role:`presentation`,dir:a(`dir`),"aria-hidden":!0,"data-orientation":a(`orientation`),style:Hue()})},getMarkerProps(n){let r=Vue(e,n.value),i;return i=n.valuePz(u)?`over-value`:`at-value`,t.element({...H1.marker.attrs,id:Tue(s,n.value),role:`presentation`,dir:a(`dir`),"data-orientation":a(`orientation`),"data-value":n.value,"data-disabled":X(m),"data-state":i,style:r})},getDraggingIndicatorProps(n){let{index:r=0}=n,i=r===d&&p;return t.element({...H1.draggingIndicator.attrs,role:`presentation`,dir:a(`dir`),hidden:!i,"data-orientation":a(`orientation`),"data-state":i?`open`:`closed`,style:e0(e,r)})}}}var Zue=(e,t)=>e?.width===t?.width&&e?.height===t?.height,s0=(e,t,n,r,i)=>zB(e,t,n,i*r).map(e=>{let i=OB(PB(e.value,e.min,e.max,r),e.min,e.max);if(!EB(i,t,n))throw Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return i}),Que=DV({props({props:e}){let t=e.min??0,n=e.max??100,r=e.step??1,i=e.defaultValue??[t],a=e.minStepsBetweenThumbs??0;return{dir:`ltr`,thumbAlignment:`contain`,origin:`start`,orientation:`horizontal`,thumbCollisionBehavior:`none`,minStepsBetweenThumbs:a,...e,defaultValue:s0(i,t,n,r,a),value:e.value?s0(e.value,t,n,r,a):void 0,max:n,step:r,min:t}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}){return{thumbSize:t(()=>({defaultValue:e(`thumbSize`)||null})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Wz,hash(e){return e.join(`,`)},onChange(t){e(`onValueChange`)?.({value:t})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(t){let r=n();e(`onFocusChange`)?.({focusedIndex:t,value:r.get(`value`)})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},refs(){return{thumbDragOffset:null,thumbDragStartValue:null}},computed:{isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`,isVertical:({prop:e})=>e(`orientation`)===`vertical`,isRtl:({prop:e})=>e(`orientation`)===`horizontal`&&e(`dir`)===`rtl`,isDisabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`),isInteractive:({prop:e,computed:t})=>!(e(`readOnly`)||t(`isDisabled`)),hasMeasuredThumbSize:({context:e})=>e.get(`thumbSize`)!=null,valuePercent:rV(({context:e,prop:t})=>[e.get(`value`),t(`min`),t(`max`)],([e,t,n])=>e.map(e=>100*AB(e,t,n)))},watch({track:e,action:t,context:n,computed:r,send:i}){e([()=>n.hash(`value`)],()=>{t([`syncInputElements`,`dispatchChangeEvent`])}),e([()=>r(`isDisabled`)],()=>{r(`isDisabled`)&&i({type:`POINTER_CANCEL`})})},effects:[`trackFormControlState`,`trackThumbSize`],on:{SET_VALUE:[{guard:`hasIndex`,actions:[`setValueAtIndex`,`invokeOnChangeEnd`]},{actions:[`setValue`,`invokeOnChangeEnd`]}],INCREMENT:{actions:[`incrementThumbAtIndex`,`invokeOnChangeEnd`]},DECREMENT:{actions:[`decrementThumbAtIndex`,`invokeOnChangeEnd`]}},states:{idle:{on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setThumbDragStartValue`,`setPointerValue`,`focusActiveThumb`]},FOCUS:{target:`focus`,actions:[`setFocusedIndex`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`setThumbDragOffset`,`setThumbDragStartValue`,`focusActiveThumb`]}}},focus:{entry:[`focusActiveThumb`],on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setThumbDragStartValue`,`setPointerValue`,`focusActiveThumb`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`setThumbDragOffset`,`setThumbDragStartValue`,`focusActiveThumb`]},ARROW_DEC:{actions:[`decrementThumbAtIndex`,`invokeOnChangeEnd`]},ARROW_INC:{actions:[`incrementThumbAtIndex`,`invokeOnChangeEnd`]},HOME:{actions:[`setFocusedThumbToMin`,`invokeOnChangeEnd`]},END:{actions:[`setFocusedThumbToMax`,`invokeOnChangeEnd`]},BLUR:{target:`idle`,actions:[`clearFocusedIndex`]}}},dragging:{entry:[`focusActiveThumb`],effects:[`trackPointerMove`],on:{POINTER_UP:{target:`focus`,actions:[`invokeOnChangeEnd`,`clearThumbDragOffset`,`clearThumbDragStartValue`]},POINTER_MOVE:{actions:[`setPointerValue`]},POINTER_CANCEL:{target:`idle`,actions:[`clearFocusedIndex`,`clearThumbDragOffset`,`clearThumbDragStartValue`]}}}},implementations:{guards:{hasIndex:({event:e})=>e.index!=null},effects:{trackFormControlState({context:e,scope:t}){return dU(Eue(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackPointerMove({scope:e,send:t}){return rW(e.getDoc(),{onPointerMove(e){t({type:`POINTER_MOVE`,point:e.point})},onPointerUp(){t({type:`POINTER_UP`})}})},trackThumbSize({context:e,scope:t,prop:n}){if(n(`thumbAlignment`)!==`contain`||n(`thumbSize`))return;let r=t=>{let n=JB(Mue(t),[`width`,`height`]);Zue(e.get(`thumbSize`),n)||e.set(`thumbSize`,n)},i=J1(t);return i.forEach(r),aB(...i.map(e=>mW.observe(e,()=>r(e))))}},actions:{dispatchChangeEvent({context:e,scope:t}){jue(t,e.get(`value`))},syncInputElements({context:e,scope:t}){e.get(`value`).forEach((e,n)=>{oU(Y1(t,n),e.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e(`onValueChangeEnd`)?.({value:t.get(`value`)})})},setClosestThumbIndex(e){let{context:t,event:n}=e,r=Z1(e,n.point);if(r==null)return;let i=Yue(e,r);t.set(`focusedIndex`,i)},setFocusedIndex(e){let{context:t,event:n}=e,r=o0(e,n.index);t.set(`focusedIndex`,r)},clearFocusedIndex({context:e}){e.set(`focusedIndex`,-1)},setThumbDragOffset(e){let{refs:t,event:n}=e;t.set(`thumbDragOffset`,n.offset??null)},clearThumbDragOffset({refs:e}){e.set(`thumbDragOffset`,null)},setThumbDragStartValue({refs:e,context:t}){e.set(`thumbDragStartValue`,t.get(`value`).slice())},clearThumbDragStartValue({refs:e}){e.set(`thumbDragStartValue`,null)},setPointerValue(e){queueMicrotask(()=>{let{context:t,event:n,prop:r,refs:i}=e,a=Z1(e,n.point);if(a==null)return;let o=t.get(`focusedIndex`),s=i.get(`thumbDragStartValue`),c=Gue(r(`thumbCollisionBehavior`),o,a,t.get(`value`),r(`min`),r(`max`),r(`step`),r(`minStepsBetweenThumbs`),s?.[o]);c.swapped&&t.set(`focusedIndex`,c.index),t.set(`value`,c.values)})},focusActiveThumb({scope:e,context:t}){FU(()=>{Due(e,t.get(`focusedIndex`))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){let{context:t,event:n}=e,r=que(e,n.index,n.step);t.set(`value`,r)},incrementThumbAtIndex(e){let{context:t,event:n}=e,r=Jue(e,n.index,n.step);t.set(`value`,r)},setFocusedThumbToMin(e){let{context:t}=e,n=t.get(`focusedIndex`),{min:r}=i0(e,n);t.set(`value`,e=>FB(e,n,r))},setFocusedThumbToMax(e){let{context:t}=e,n=t.get(`focusedIndex`),{max:r}=i0(e,n);t.set(`value`,e=>FB(e,n,r))},setValueAtIndex(e){let{context:t,event:n}=e,r=a0(e,n.value,n.index);t.set(`value`,e=>FB(e,n.index,r))},setValue(e){let{context:t,event:n}=e,r=Kue(e,n.value);t.set(`value`,r)}}}}),$ue=e=>{if(!e)return;let t=dH(e),n=oH(e),r=iH(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);a&&Object.defineProperty(e,`value`,{...a,set(t){let r=a.get?.call(this);a.set?.call(this,t),i(),r!==t&&queueMicrotask(()=>{e.dispatchEvent(new n.InputEvent(`input`,{bubbles:!0}))})}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},[c0,l0]=HJ(`AccordionContext`),ede=M({__name:`accordion-context`,setup(e){let t=l0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),tde=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),[nde,u0]=HJ(`AccordionItemPropsContext`),[d0,f0]=HJ(`CollapsibleContext`),rde=M({__name:`collapsible-content`,props:{asChild:{type:Boolean}},setup(e){let t=f0();return Z(),(n,r)=>k(t).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},k(t).getContentProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),ide=M({__name:`collapsible-context`,setup(e){let t=f0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),ade=M({__name:`collapsible-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return d0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),ode=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(yZ,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...YY(a),onExitComplete:()=>{t?.(`exitComplete`),a.onExitComplete?.()},onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)}}})),o=U(()=>vZ(a,ZJ)),s=O(!1);return pr(()=>o.value.visible,()=>{o.value.visible&&(s.value=!0)}),U(()=>{let t=A(e);return{...o.value,unmounted:!o.value.visible&&!s.value&&t.lazyMount||t.unmountOnExit&&!o.value.visible&&s.value}})},sde=M({__name:`collapsible-root`,props:Xi({collapsedHeight:{},collapsedWidth:{},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:[`exitComplete`,`openChange`,`update:open`],setup(e,{emit:t}){let n=ode(e,t);return d0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),cde=M({__name:`collapsible-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=f0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),lde=M({__name:`collapsible-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=f0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),p0=nX({Content:()=>rde,Context:()=>ide,Indicator:()=>lde,Root:()=>sde,RootProvider:()=>ade,Trigger:()=>cde}),ude=M({__name:`accordion-item-content`,props:{asChild:{type:Boolean}},setup(e){let t=tde(),n=l0(),r=u0(),i=U(()=>{let[,e]=t(n.value.getItemContentProps(r),[`hidden`,`data-state`]);return e});return Z(),(t,n)=>(F(),L(k(p0).Content,H(i.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),[dde,fde]=HJ(`AccordionItemContext`),pde=M({__name:`accordion-item-context`,setup(e){let t=fde();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),mde=M({__name:`accordion-item-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=l0(),n=u0();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getItemIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),hde=M({__name:`accordion-item-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=l0(),n=u0(),r=f0(),i=U(()=>{let{"aria-controls":e,...i}=t.value.getItemTriggerProps(n);return{...i,...r.value.unmounted?{}:{"aria-controls":e}}});return Z(),(t,n)=>(F(),L(k(Q).button,H(i.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),gde=M({__name:`accordion-item`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=l0(),n=e,r=U(()=>t.value.getItemState(n)),i=FY(),a=U(()=>t.value.getItemContentProps(n));return dde(r),nde(n),Z(),(e,o)=>(F(),L(k(p0).Root,H(k(t).getItemProps(n),{open:r.value.expanded,"lazy-mount":k(i).lazyMount,"unmount-on-exit":k(i).unmountOnExit,ids:{content:a.value.id}}),{default:j(()=>[N(e.$slots,`default`)]),_:3},16,[`open`,`lazy-mount`,`unmount-on-exit`,`ids`]))}}),_de=M({__name:`accordion-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return c0(n),PY(U(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),Z(),(t,r)=>(F(),L(k(Q).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),vde=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(PX,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,onFocusChange:e=>t?.(`focusChange`,e),value:a.modelValue,...YY(a),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a?.onValueChange?.(e)}}}));return U(()=>jX(a,ZJ))},yde=M({__name:`accordion-root`,props:Xi({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:[`focusChange`,`valueChange`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=vde(n,t);return c0(r),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(t,n)=>(F(),L(k(Q).div,H(k(r).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),m0=nX({Context:()=>ede,Item:()=>gde,ItemContent:()=>ude,ItemContext:()=>pde,ItemIndicator:()=>mde,ItemTrigger:()=>hde,Root:()=>yde,RootProvider:()=>_de}),[h0,g0]=HJ(`FieldContext`),bde=M({__name:`field-context`,setup(e){let t=g0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),xde=M({__name:`field-error-text`,props:{asChild:{type:Boolean}},setup(e){let t=g0();return Z(),(n,r)=>k(t).invalid?(F(),L(k(Q).span,H({key:0},k(t).getErrorTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`])):V(``,!0)}}),Sde=M({__name:`field-helper-text`,props:{asChild:{type:Boolean}},setup(e){let t=g0();return Z(),(n,r)=>(F(),L(k(Q).span,H(k(t).getHelperTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Cde=M({__name:`field-input`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=g0(),r=t;return Z(),(t,i)=>(F(),L(k(Q).input,H(k(n).getInputProps(),{"as-child":e.asChild,value:e.modelValue,onInput:i[0]||=e=>r(`update:modelValue`,e.target.value)}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`,`value`]))}}),wde=M({__name:`field-item`,props:{value:{}},setup(e){let t=e,n=g0();return h0(U(()=>{let e=A(n);if(!e)throw Error(`Field.Item must be used within Field.Root`);let r=`field::${e.ids.control}::item::${t.value}`,i=`${r}::label`,a=()=>({...e.getInputProps(),id:r});return{...e,ids:{...e.ids,control:r,label:i},getLabelProps:()=>({...e.getLabelProps(),id:i,htmlFor:r}),getInputProps:()=>({...a(),...c$.input.attrs}),getSelectProps:()=>({...a(),...c$.select.attrs}),getTextareaProps:()=>({...a(),...c$.textarea.attrs})}})),(e,t)=>N(e.$slots,`default`)}}),Tde=M({__name:`field-label`,props:{asChild:{type:Boolean}},setup(e){let t=g0();return Z(),(n,r)=>(F(),L(k(Q).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ede=M({__name:`field-required-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=g0();return Z(),(n,r)=>k(t).required?(F(),L(k(Q).span,H({key:0},k(t).getRequiredIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`,{},()=>[r[0]||=B(`*`,-1)])]),_:3},16,[`as-child`])):N(n.$slots,`fallback`,{key:1})}}),Dde=M({__name:`field-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return h0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ode=(e={})=>{let t=GY(KY),n=$t({hasErrorText:!1,hasHelperText:!1}),r=Hr(),i=U(()=>A(e).id??r),a=O(null),o=U(()=>A(e).ids?.control??`field::${i.value}`),s=U(()=>A(e).ids?.errorText??`field::${i.value}::error-text`),c=U(()=>A(e).ids?.helperText??`field::${i.value}::helper-text`),l=U(()=>A(e).ids?.label??`field::${i.value}::label`);Ei(()=>{let e=GJ(a);if(!e)return;let r=()=>{let e=t.value.getRootNode();n.hasErrorText=!!e.getElementById(s.value),n.hasHelperText=!!e.getElementById(c.value)};r();let i=new(t.value.getWindow()).MutationObserver(r);i.observe(e,{childList:!0,subtree:!0}),ki(()=>{i.disconnect()})});let u=()=>{let t=A(e);return{...c$.root.attrs,id:o.value,role:`group`,"data-disabled":X(t.disabled),"data-invalid":X(t.invalid),"data-readonly":X(t.readOnly)}},d=U(()=>{let t=A(e).target;return t?`field::${i.value}::item::${t}`:void 0}),f=()=>{let t=A(e);return{...c$.label.attrs,id:l.value,"data-disabled":X(t.disabled),"data-invalid":X(t.invalid),"data-readonly":X(t.readOnly),"data-required":X(t.required),htmlFor:d.value??i.value}},p=U(()=>{let t=A(e),r=[];return n.hasErrorText&&t.invalid&&r.push(s.value),n.hasHelperText&&r.push(c.value),r}),m=()=>{let t=A(e);return{"aria-describedby":p.value.join(` `)||void 0,"aria-invalid":BV(t.invalid),"data-invalid":X(t.invalid),"data-required":X(t.required),"data-readonly":X(t.readOnly),id:i.value,required:t.required,disabled:t.disabled,readOnly:t.readOnly}},h=()=>({...m(),...c$.input.attrs}),g=()=>({...m(),...c$.textarea.attrs}),_=()=>({...m(),...c$.select.attrs}),v=()=>{let t=A(e);return{id:c.value,...c$.helperText.attrs,"data-disabled":X(t.disabled)}},y=()=>({id:s.value,...c$.errorText.attrs,"aria-live":`polite`}),b=()=>({"aria-hidden":!0,...c$.requiredIndicator.attrs});return U(()=>{let t=A(e);return{ariaDescribedby:p.value.join(` `)||void 0,ids:{control:i.value,label:l.value,errorText:s.value,helperText:c.value},refs:{rootRef:a},disabled:t.disabled,invalid:t.invalid,readOnly:t.readOnly,required:t.required,getLabelProps:f,getRootProps:u,getInputProps:h,getTextareaProps:g,getSelectProps:_,getHelperTextProps:v,getErrorTextProps:y,getRequiredIndicatorProps:b}})},kde=M({__name:`field-root`,props:Xi({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},target:{},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){let t=Ode(e);return h0(t),Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getRootProps(),{ref:k(t).refs.rootRef,"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ade=M({__name:`field-select`,props:{modelValue:{},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=g0(),r=t;return Z(),(t,i)=>(F(),L(k(Q).select,H(k(n).getSelectProps(),{value:e.modelValue,onChange:i[0]||=e=>r(`update:modelValue`,e.target.value),"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`value`,`as-child`]))}}),jde=M({__name:`field-textarea`,props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=g0(),i=t,a=O();return Ei(()=>{let e=GJ(a);if(!e||!n.autoresize)return;let t=$ue(e);ki(()=>t?.())}),Z(),(t,o)=>(F(),L(k(Q).textarea,H({ref_key:`textareaRef`,ref:a},k(r).getTextareaProps(),{value:e.modelValue,onInput:o[0]||=e=>i(`update:modelValue`,e.target.value),style:n.autoresize?{resize:`none`,overflow:`hidden`}:void 0,"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`value`,`style`,`as-child`]))}}),_0=nX({Context:()=>bde,ErrorText:()=>xde,HelperText:()=>Sde,Input:()=>Cde,Item:()=>wde,Label:()=>Tde,RequiredIndicator:()=>Ede,Root:()=>kde,RootProvider:()=>Dde,Select:()=>Ade,Textarea:()=>jde}),[v0,y0]=HJ(`ColorPickerContext`),[Mde,b0]=HJ(`ColorPickerAreaPropsContext`),Nde=M({__name:`color-picker-area-background`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=b0();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getAreaBackgroundProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),Pde=M({__name:`color-picker-area-thumb`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=b0();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getAreaThumbProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),Fde=M({__name:`color-picker-area`,props:{xChannel:{},yChannel:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return Mde(t),Z(),(r,i)=>(F(),L(k(Q).div,H(k(n).getAreaProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ide=M({__name:`color-picker-channel-input`,props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return Z(),(r,i)=>(F(),L(k(Q).input,H(k(n).getChannelInputProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Lde,x0]=HJ(`ColorPickerChannelPropsContext`),Rde=M({__name:`color-picker-channel-slider-label`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=x0();return Z(),(r,i)=>(F(),L(k(Q).label,H(k(t).getChannelSliderLabelProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),[zde,S0]=HJ(`ColorPickerFormatProps`),Bde=M({__name:`color-picker-channel-slider-thumb`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=S0(),r=x0(),i=U(()=>({...r,...n}));return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getChannelSliderThumbProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Vde=M({__name:`color-picker-channel-slider-track`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=S0(),r=x0(),i=U(()=>({...r,...n}));return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getChannelSliderTrackProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Hde=M({__name:`color-picker-channel-slider-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=x0(),r=qi(),i=JY(qY);return Z(),(a,o)=>(F(),L(k(Q).span,H(k(t).getChannelSliderValueTextProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(a.$slots,`default`,{},()=>[B(E(r.default?.()||k(t).getChannelValueText(k(n).channel,k(i).locale)),1)])]),_:3},16,[`as-child`]))}}),Ude=M({__name:`color-picker-channel-slider`,props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0(),r=S0(),i=U(()=>({...t,...r}));return Lde(t),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getChannelSliderProps(i.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),Wde=M({__name:`color-picker-content`,props:{immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=y0(),n=vY(),r=U(()=>nV(t.value.getContentProps(),n.value.presenceProps));return Z(),(t,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),Gde=M({__name:`color-picker-context`,setup(e){let t=y0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Kde=M({__name:`color-picker-control`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),qde=M({__name:`color-picker-eye-dropper-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getEyeDropperTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Jde=M({__name:`color-picker-format-select`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(e,n)=>(F(),L(k(Q).select,Ae(Ro(k(t).getFormatSelectProps())),{default:j(()=>[(F(),I(P,null,Vi([`rgba`,`hsla`,`hsba`],e=>z(k(Q).option,{key:e,value:e},{default:j(()=>[B(E(e),1)]),_:2},1032,[`value`])),64))]),_:1},16))}}),Yde=M({__name:`color-picker-format-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getFormatTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Xde=M({__name:`color-picker-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=g0();return Z(),(r,i)=>(F(),L(k(Q).input,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getHiddenInputProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`aria-describedby`,`as-child`]))}}),Zde=M({__name:`color-picker-label`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(n,r)=>(F(),L(k(Q).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Qde=M({__name:`color-picker-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=vY();return Z(),(r,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),$de=M({__name:`color-picker-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},emits:[`exitComplete`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.value),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return v0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(t,n)=>(F(),L(k(Q).div,H(i.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),efe=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=g0(),o=tY(BQ,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,input:a?.value.ids.control},disabled:a?.value.disabled,invalid:a?.value.invalid,readOnly:a?.value.readOnly,required:a?.value.required,dir:i.value.dir,value:o.modelValue,getRootNode:r?.value.getRootNode,...YY(o),onOpenChange(e){t?.(`openChange`,e),t?.(`update:open`,e.open),o.onOpenChange?.(e)},onValueChange(e){t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),o.onFocusOutside?.(e)},onFormatChange:e=>{t?.(`formatChange`,e),t?.(`update:format`,e.format),o.onFormatChange?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),o.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),o.onPointerDownOutside?.(e)},onValueChangeEnd:e=>{t?.(`valueChangeEnd`,e),o.onValueChangeEnd?.(e)}}}));return U(()=>OQ(o,ZJ))},tfe=M({__name:`color-picker-root`,props:Xi({closeOnSelect:{type:Boolean},defaultFormat:{},defaultOpen:{type:Boolean},defaultValue:{},disabled:{type:Boolean},format:{},id:{},ids:{},initialFocusEl:{type:Function},invalid:{type:Boolean},modelValue:{},name:{},open:{type:Boolean},openAutoFocus:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,invalid:void 0,open:void 0,openAutoFocus:void 0,readOnly:void 0,required:void 0,inline:void 0}),emits:[`exitComplete`,`focusOutside`,`formatChange`,`interactOutside`,`openChange`,`pointerDownOutside`,`valueChange`,`valueChangeEnd`,`update:modelValue`,`update:open`,`update:format`],setup(e,{emit:t}){let n=e,r=t,i=efe(n,r),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return v0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(t,n)=>(F(),L(k(Q).div,H(k(i).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),nfe=M({__name:`color-picker-swatch-group`,props:{asChild:{type:Boolean}},setup(e){return Z(),(t,n)=>(F(),L(k(Q).div,H(k(UQ).build().swatchGroup.attrs,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),[C0,rfe]=HJ(`ColorPickerSwatchPropsContext`),ife=M({__name:`color-picker-swatch-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=y0(),n=rfe();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(t).getSwatchIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),afe=M({__name:`color-picker-swatch-trigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return Z(),(r,i)=>(F(),L(k(Q).button,H(k(n).getSwatchTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),ofe=M({__name:`color-picker-swatch`,props:{value:{},respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return C0(t),Z(),(r,i)=>(F(),L(k(Q).div,H(k(n).getSwatchProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),sfe=M({__name:`color-picker-transparency-grid`,props:{size:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return Z(),(r,i)=>(F(),L(k(Q).div,H(k(n).getTransparencyGridProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),cfe=M({__name:`color-picker-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=y0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),lfe=M({__name:`color-picker-value-swatch`,props:{respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){let t=e,n=y0(),r=U(()=>({value:n.value.value,respectAlpha:t.respectAlpha}));return C0(r.value),Z(),(t,i)=>(F(),L(k(Q).div,H(k(n).getSwatchProps(r.value),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),ufe=M({__name:`color-picker-value-text`,props:{format:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0(),r=qi();Z();let i=U(()=>t.format?n.value.value.toString(t.format):n.value.valueAsString);return(t,a)=>(F(),L(k(Q).span,H(k(n).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`,{},()=>[B(E(r.default?.()||i.value),1)])]),_:3},16,[`as-child`]))}}),dfe=M({__name:`color-picker-view`,props:{format:{},asChild:{type:Boolean}},setup(e){let t=e,n=y0();return zde(t),Z(),(t,r)=>k(n).format===e.format?(F(),L(k(Q).div,H({key:0},k(UQ).build().view.attrs,{"data-format":e.format,"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`data-format`,`as-child`])):V(``,!0)}}),w0=nX({Area:()=>Fde,AreaBackground:()=>Nde,AreaThumb:()=>Pde,ChannelInput:()=>Ide,ChannelSlider:()=>Ude,ChannelSliderLabel:()=>Rde,ChannelSliderThumb:()=>Bde,ChannelSliderTrack:()=>Vde,ChannelSliderValueText:()=>Hde,Content:()=>Wde,Context:()=>Gde,Control:()=>Kde,EyeDropperTrigger:()=>qde,FormatSelect:()=>Jde,FormatTrigger:()=>Yde,HiddenInput:()=>Xde,Label:()=>Zde,Positioner:()=>Qde,Root:()=>tfe,RootProvider:()=>$de,Swatch:()=>ofe,SwatchGroup:()=>nfe,SwatchIndicator:()=>ife,SwatchTrigger:()=>afe,TransparencyGrid:()=>sfe,Trigger:()=>cfe,ValueSwatch:()=>lfe,ValueText:()=>ufe,View:()=>dfe}),[T0,E0]=HJ(`DialogContext`),ffe=M({__name:`dialog-backdrop`,props:{asChild:{type:Boolean}},setup(e){let t=E0(),n=FY(),r=zY(U(()=>({...n.value,present:t.value.open}))),i=U(()=>nV(t.value.getBackdropProps(),r.value.presenceProps));return Z(),(t,n)=>k(r).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},i.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),pfe=M({__name:`dialog-close-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=E0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),mfe=M({__name:`dialog-content`,props:{asChild:{type:Boolean}},setup(e){let t=E0(),n=vY(),r=U(()=>nV(t.value.getContentProps(),n.value.presenceProps));return Z(),(t,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),hfe=M({__name:`dialog-context`,setup(e){let t=E0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),gfe=M({__name:`dialog-description`,props:{asChild:{type:Boolean}},setup(e){let t=E0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getDescriptionProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),_fe=M({__name:`dialog-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=E0(),n=vY();return Z(),(r,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),vfe=M({__name:`dialog-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},emits:[`exitComplete`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.value),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return T0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),yfe=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(s$,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...YY(e),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onTriggerValueChange:e=>{t?.(`triggerValueChange`,e),a.onTriggerValueChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)},onRequestDismiss:e=>{t?.(`requestDismiss`,e),a.onRequestDismiss?.(e)}}}));return U(()=>o$(a,ZJ))},bfe=M({__name:`dialog-root`,props:Xi({"aria-label":{},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},preventScroll:{type:Boolean},restoreFocus:{type:Boolean},role:{},trapFocus:{type:Boolean},triggerValue:{},defaultTriggerValue:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,preventScroll:void 0,restoreFocus:void 0,trapFocus:void 0}),emits:[`escapeKeyDown`,`exitComplete`,`focusOutside`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`triggerValueChange`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=yfe(n,r),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return T0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),xfe=M({__name:`dialog-title`,props:{asChild:{type:Boolean}},setup(e){let t=E0();return Z(),(n,r)=>(F(),L(k(Q).h2,H(k(t).getTitleProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Sfe=M({__name:`dialog-trigger`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=E0();return Z(),(r,i)=>(F(),L(k(Q).button,H(k(n).getTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),D0=nX({Backdrop:()=>ffe,CloseTrigger:()=>pfe,Content:()=>mfe,Context:()=>hfe,Description:()=>gfe,Positioner:()=>_fe,Root:()=>bfe,RootProvider:()=>vfe,Title:()=>xfe,Trigger:()=>Sfe}),[O0,k0]=HJ(`NumberInputContext`),Cfe=M({__name:`number-input-context`,setup(e){let t=k0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),wfe=M({__name:`number-input-control`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Tfe=M({__name:`number-input-decrement-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getDecrementTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Efe=M({__name:`number-input-increment-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getIncrementTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Dfe=M({__name:`number-input-input`,props:{asChild:{type:Boolean}},setup(e){let t=k0(),n=g0();return Z(),(r,i)=>(F(),L(k(Q).input,H({"aria-describedby":k(n)?.ariaDescribedby},k(t).getInputProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`aria-describedby`,`as-child`]))}}),Ofe=M({__name:`number-input-label`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),kfe=M({__name:`number-input-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return O0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),Afe=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=g0(),o=tY(hue,U(()=>{let o=A(e);return{id:n,ids:{label:a?.value.ids.label,input:a?.value.ids.control},disabled:a?.value.disabled,readOnly:a?.value.readOnly,required:a?.value.required,invalid:a?.value.invalid,dir:i.value.dir,locale:i.value.locale,value:o.modelValue,getRootNode:r?.value.getRootNode,...YY(o),onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),o.onValueChange?.(e)},onFocusChange:e=>{t?.(`focusChange`,e),o.onFocusChange?.(e)},onValueInvalid:e=>{t?.(`valueInvalid`,e),o.onValueInvalid?.(e)}}}));return U(()=>eue(o,ZJ))},jfe=M({__name:`number-input-root`,props:Xi({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:[`focusChange`,`valueChange`,`valueInvalid`,`update:modelValue`],setup(e,{emit:t}){let n=Afe(e,t);return O0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),Mfe=M({__name:`number-input-scrubber`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getScrubberProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Nfe=M({__name:`number-input-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=k0();return Z(),(n,r)=>(F(),L(k(Q).span,H(k(t).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),A0=nX({Context:()=>Cfe,Control:()=>wfe,DecrementTrigger:()=>Tfe,IncrementTrigger:()=>Efe,Input:()=>Dfe,Label:()=>Ofe,Root:()=>jfe,RootProvider:()=>kfe,Scrubber:()=>Mfe,ValueText:()=>Nfe}),[j0,M0]=HJ(`PopoverContext`),Pfe=M({__name:`popover-anchor`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getAnchorProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ffe=M({__name:`popover-arrow-tip`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getArrowTipProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ife=M({__name:`popover-arrow`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getArrowProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Lfe=M({__name:`popover-close-trigger`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).button,H(k(t).getCloseTriggerProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Rfe=M({__name:`popover-content`,props:{asChild:{type:Boolean}},setup(e){let t=M0(),n=vY(),r=U(()=>nV(t.value.getContentProps(),n.value.presenceProps));return Z(),(t,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},r.value,{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),zfe=M({__name:`popover-context`,setup(e){let t=M0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Bfe=M({__name:`popover-description`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getDescriptionProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Vfe=M({__name:`popover-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getIndicatorProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),Hfe=M({__name:`popover-positioner`,props:{asChild:{type:Boolean}},setup(e){let t=M0(),n=vY();return Z(),(r,i)=>k(n).unmounted?V(``,!0):(F(),L(k(Q).div,H({key:0},k(t).getPositionerProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),Ufe=M({__name:`popover-root-provider`,props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},emits:[`exitComplete`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.value),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return j0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),Wfe=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(xue,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,getRootNode:r?.value.getRootNode,...YY(a),onOpenChange:e=>{t?.(`openChange`,e),t?.(`update:open`,e.open),a.onOpenChange?.(e)},onTriggerValueChange:e=>{t?.(`triggerValueChange`,e),a.onTriggerValueChange?.(e)},onEscapeKeyDown:e=>{t?.(`escapeKeyDown`,e),a.onEscapeKeyDown?.(e)},onFocusOutside:e=>{t?.(`focusOutside`,e),a.onFocusOutside?.(e)},onInteractOutside:e=>{t?.(`interactOutside`,e),a.onInteractOutside?.(e)},onPointerDownOutside:e=>{t?.(`pointerDownOutside`,e),a.onPointerDownOutside?.(e)}}}));return U(()=>bue(a,ZJ))},Gfe=M({__name:`popover-root`,props:Xi({autoFocus:{type:Boolean},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},portalled:{type:Boolean},positioning:{},restoreFocus:{type:Boolean},translations:{},triggerValue:{},defaultTriggerValue:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{autoFocus:void 0,closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,portalled:void 0,restoreFocus:void 0}),emits:[`escapeKeyDown`,`exitComplete`,`focusOutside`,`interactOutside`,`openChange`,`pointerDownOutside`,`requestDismiss`,`triggerValueChange`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=Wfe(n,r),a=zY(U(()=>({present:i.value.open,lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit})),r);return j0(i),_Y(a),PY(U(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),Z(),(e,t)=>N(e.$slots,`default`)}}),Kfe=M({__name:`popover-title`,props:{asChild:{type:Boolean}},setup(e){let t=M0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getTitleProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),qfe=M({__name:`popover-trigger`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=M0();return Z(),(r,i)=>(F(),L(k(Q).button,H(k(n).getTriggerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),N0=nX({Anchor:()=>Pfe,Arrow:()=>Ife,ArrowTip:()=>Ffe,CloseTrigger:()=>Lfe,Content:()=>Rfe,Context:()=>zfe,Description:()=>Bfe,Indicator:()=>Vfe,Positioner:()=>Hfe,Root:()=>Gfe,RootProvider:()=>Ufe,Title:()=>Kfe,Trigger:()=>qfe}),[P0,F0]=HJ(`SliderContext`),Jfe=M({__name:`slider-context`,setup(e){let t=F0();return(e,n)=>N(e.$slots,`default`,Ae(Ro(k(t))))}}),Yfe=M({__name:`slider-control`,props:{asChild:{type:Boolean}},setup(e){let t=F0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getControlProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),[Xfe,I0]=HJ(`SliderThumbPropsContext`),Zfe=M({__name:`slider-dragging-indicator`,props:{asChild:{type:Boolean}},setup(e){let t=F0(),n=I0(),r=qi();return Z(),(i,a)=>(F(),L(k(Q).span,H(k(t).getDraggingIndicatorProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(i.$slots,`default`,{},()=>[B(E(r.default?.()||k(t).getThumbValue(k(n).index)),1)])]),_:3},16,[`as-child`]))}}),Qfe=M({__name:`slider-hidden-input`,props:{asChild:{type:Boolean}},setup(e){let t=F0(),n=I0();return Z(),(r,i)=>(F(),L(k(Q).input,H(k(t).getHiddenInputProps(k(n)),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),$fe=M({__name:`slider-label`,props:{asChild:{type:Boolean}},setup(e){let t=F0();return Z(),(n,r)=>(F(),L(k(Q).label,H(k(t).getLabelProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),epe=M({__name:`slider-marker-group`,props:{asChild:{type:Boolean}},setup(e){let t=F0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getMarkerGroupProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),tpe=M({__name:`slider-marker`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=F0();return Z(),(r,i)=>(F(),L(k(Q).span,H(k(n).getMarkerProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),npe=M({__name:`slider-range`,props:{asChild:{type:Boolean}},setup(e){let t=F0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getRangeProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),rpe=M({__name:`slider-root-provider`,props:{value:{},asChild:{type:Boolean}},setup(e){let t=e,n=U(()=>t.value);return P0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(n.value.getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),ipe=(e={},t)=>{let n=Hr(),r=GY(KY),i=JY(qY),a=tY(Que,U(()=>{let a=A(e);return{id:n,dir:i.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...YY(a),onFocusChange:e=>{t?.(`focusChange`,e),a.onFocusChange?.(e)},onValueChangeEnd:e=>{t?.(`valueChangeEnd`,e),a.onValueChangeEnd?.(e)},onValueChange:e=>{t?.(`valueChange`,e),t?.(`update:modelValue`,e.value),a.onValueChange?.(e)}}}));return U(()=>Xue(a,ZJ))},ape=M({__name:`slider-root`,props:Xi({"aria-label":{},"aria-labelledby":{},defaultValue:{},dir:{},disabled:{type:Boolean},form:{},getAriaValueText:{type:Function},getRootNode:{type:Function},id:{},ids:{},invalid:{type:Boolean},max:{},min:{},minStepsBetweenThumbs:{},modelValue:{},name:{},orientation:{},origin:{},readOnly:{type:Boolean},step:{},thumbAlignment:{},thumbCollisionBehavior:{},thumbSize:{},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0}),emits:[`focusChange`,`valueChange`,`valueChangeEnd`,`update:modelValue`],setup(e,{emit:t}){let n=ipe(e,t);return P0(n),Z(),(t,r)=>(F(),L(k(Q).div,H(k(n).getRootProps(),{"as-child":e.asChild}),{default:j(()=>[N(t.$slots,`default`)]),_:3},16,[`as-child`]))}}),ope=M({__name:`slider-thumb`,props:{index:{},name:{},asChild:{type:Boolean}},setup(e){let t=e,n=F0();return Xfe(t),Z(),(r,i)=>(F(),L(k(Q).div,H(k(n).getThumbProps(t),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`)]),_:3},16,[`as-child`]))}}),spe=M({__name:`slider-track`,props:{asChild:{type:Boolean}},setup(e){let t=F0();return Z(),(n,r)=>(F(),L(k(Q).div,H(k(t).getTrackProps(),{"as-child":e.asChild}),{default:j(()=>[N(n.$slots,`default`)]),_:3},16,[`as-child`]))}}),cpe=M({__name:`slider-value-text`,props:{asChild:{type:Boolean}},setup(e){let t=F0(),n=qi();return Z(),(r,i)=>(F(),L(k(Q).span,H(k(t).getValueTextProps(),{"as-child":e.asChild}),{default:j(()=>[N(r.$slots,`default`,{},()=>[B(E(n.default?.()||k(t).value.join(`, `)),1)])]),_:3},16,[`as-child`]))}}),L0=nX({Context:()=>Jfe,Control:()=>Yfe,DraggingIndicator:()=>Zfe,HiddenInput:()=>Qfe,Label:()=>$fe,Marker:()=>tpe,MarkerGroup:()=>epe,Range:()=>npe,Root:()=>ape,RootProvider:()=>rpe,Thumb:()=>ope,Track:()=>spe,ValueText:()=>cpe}),lpe={trailing:!0};function R0(e,t=25,n={}){if(n={...lpe,...n},!Number.isFinite(t))throw TypeError("Expected `wait` to be a finite number");let r,i,a=[],o,s,c=(t,r)=>(o=upe(e,t,r),o.finally(()=>{if(o=null,n.trailing&&s&&!i){let e=c(t,s);return s=null,e}}),o),l=function(...e){return n.trailing&&(s=e),o||new Promise(o=>{let l=!i&&n.leading;clearTimeout(i),i=setTimeout(()=>{i=null;let t=n.leading?r:c(this,e);s=null;for(let e of a)e(t);a=[]},t),l?(r=c(this,e),o(r)):a.push(o)})},u=e=>{e&&(clearTimeout(e),i=null)};return l.isPending=()=>!!i,l.cancel=()=>{u(i),a=[],s=null},l.flush=()=>{if(u(i),!s||o)return;let e=s;return s=null,c(this,e)},l}async function upe(e,t,n){return await e.apply(t,n)}function dpe(){return document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`)||``}function z0(){return fpe()}function B0(e,t={}){let n=O(null),r=O(null),i=O(!1),a=O(!1),o=O(null),s=null,c=[],l=[],u=[],d=async(d,f=!1)=>{lX.default.start(),i.value=!0,a.value=!1,r.value=null,s=new AbortController;try{let r=await e(s.signal,d);if(o.value=r.status,!r.ok)throw Error(`HTTP error! status: ${r.status}`);let i=t.responseType===`text`?await r.text():await r.json();return n.value=i,c.forEach(e=>e(i)),i}catch(e){let t=e instanceof Error?e:Error(String(e));if(r.value=t,l.forEach(e=>e(t)),f)throw t;return null}finally{i.value=!1,a.value=!0,lX.default.done(),u.forEach(e=>e())}},f=()=>{s&&=(s.abort(),null)},p=e=>{c.push(e)},m=e=>{l.push(e)},h=e=>{u.push(e)};t.immediate&&d();let g={data:n,error:r,isFetching:i,isFinished:a,statusCode:o,execute:d,abort:f,onSuccess:p,onError:m,onFinish:h,json:()=>(t.responseType=`json`,g),text:()=>(t.responseType=`text`,g)};return g}function fpe(){let e=dpe();return{get(t,n={}){return B0(n=>fetch(A(t),{method:`GET`,headers:{"Content-Type":`application/json`,"X-CSRF-TOKEN":e,Accept:`application/json`},signal:n}),n)},post(t,n,r={}){return B0((r,i)=>{let a=i===void 0?n:i;return fetch(A(t),{method:`POST`,headers:{"Content-Type":`application/json`,"X-CSRF-TOKEN":e,Accept:`application/json`},body:a?JSON.stringify(a):void 0,signal:r})},r)},postFormData(t,n,r={}){return B0((r,i)=>{let a=i===void 0?n:i;return fetch(A(t),{method:`POST`,headers:{"X-CSRF-TOKEN":e},body:a,signal:r})},r)}}}function ppe(e){let{state:t}=cz(),{post:n}=z0();return n(window.editorConfig.routes.persistUpdates,{theme:t.theme?.code,channel:window.editorConfig.defaultChannel,locale:window.editorConfig.editorLocale,template:{url:t.pageData?.url||``,name:t.pageData?.template||`index`,sources:t.pageData?.sources},updates:e}).text()}function mpe(e){let{state:t}=cz(),{post:n}=z0(),r=n(window.editorConfig.routes.persistThemeSettings,{theme:t.theme.code,channel:t.channel||window.editorConfig.defaultChannel,locale:t.locale||window.editorConfig.editorLocale,template:{url:t.pageData?.url||``,name:t.pageData?.template||`index`,sources:t.pageData?.sources},updates:e}).text();return r.onError(e=>{console.error(`Failed to persist theme settings:`,e)}),r}function hpe(e){let{state:t}=cz(),{post:n}=z0(),r=n(window.editorConfig.routes.publishTheme,{theme:t.theme.code,channel:t.channel||window.editorConfig.defaultChannel,locale:t.locale||window.editorConfig.editorLocale,template:t.pageData?.template||`index`,page:e});return r.onError(e=>{console.error(`Failed to publish theme:`,e)}),r}function gpe(){let{state:e}=cz(),t=O(`/api/categories`),{get:n}=z0(),r=n(t);r.onSuccess(t=>{(t?.data||[]).forEach(t=>{e.categories.set(t.id,t)})}),r.onError(e=>{console.error(`Failed to fetch categories:`,e)});function i(n={}){let i=new URL(`/api/categories`,window.location.origin);return i.searchParams.append(`channel`,n.channel||e.channel),i.searchParams.append(`locale`,n.locale||e.locale),n.search&&i.searchParams.append(`name`,n.search),t.value=i.href,r.execute()}return{...r,execute:i}}function _pe(){let{state:e}=cz(),t=O(`/api/products`),{get:n}=z0(),r=n(t);r.onSuccess(t=>{(t?.data||[]).forEach(t=>{e.products.set(t.id,t)})}),r.onError(e=>{console.error(`Failed to fetch products:`,e)});function i(n={}){let i=new URL(`/api/products`,window.location.origin);return i.searchParams.append(`channel`,n.channel||e.channel),i.searchParams.append(`locale`,n.locale||e.locale),n.search&&i.searchParams.append(`name`,n.search),t.value=i.href,r.execute()}return{...r,execute:i}}function vpe(){let{state:e}=cz(),t=O(window.editorConfig.routes.getCmsPages),{get:n}=z0(),r=n(t);r.onSuccess(t=>{(t||[]).forEach(t=>{e.cmsPages.set(t.id,t)})}),r.onError(e=>{console.error(`Failed to fetch CMS pages:`,e)});function i(n={}){let i=window.editorConfig.routes.getCmsPages,a=new URL(i,window.location.origin);return a.searchParams.append(`channel`,n.channel||e.channel),a.searchParams.append(`locale`,n.locale||e.locale),n.search&&a.searchParams.append(`title`,n.search),t.value=a.href,r.execute()}return{...r,execute:i}}var ype={class:`h-full flex flex-col overflow-y-hidden z-[100]`},bpe={class:`flex-none h-12 flex items-center border-b px-4`},xpe={class:`flex-1 overflow-y-auto`},Spe={key:0},Cpe={key:0,class:`border-t pt-2 mb-1`},wpe={class:`text-sm font-medium`},Tpe={key:1,class:`p-4 text-sm text-gray-500 text-center`},Epe=M({__name:`ThemeSettingsPanel`,setup(e){let{t}=gz(),{theme:n}=cz(),r=or(Y9),i=O({}),a=R0(async()=>{if(!r||Object.keys(i.value).length===0)return;let e={...i.value};i.value={};let t=mpe(e);t.onSuccess(e=>{e?r.preview.sendMessage(`page.refresh`,{html:e}):r.preview.reload()}),t.onError(e=>{console.error(`Failed to persist theme settings:`,e),r.ui.toast({type:`error`,title:`Failed to save theme settings`})}),await t.execute()},500),o=(e,t)=>{n.value&&(n.value.settings[e]=t,i.value[e]=t,a())};return(e,r)=>{let i=wz;return F(),I(`div`,ype,[R(`div`,bpe,[R(`h2`,null,E(k(t)(`Theme Settings`)),1)]),R(`div`,xpe,[k(n)?.settingsSchema&&k(n).settingsSchema.length>0?(F(),I(`div`,Spe,[z(k(m0).Root,{value:k(n).settingsSchema[0]?.name,collapsible:``},{default:j(()=>[(F(!0),I(P,null,Vi(k(n).settingsSchema,e=>(F(),L(k(m0).Item,{key:e.name,value:e.name,class:`border-b`},{default:j(()=>[z(k(m0).ItemTrigger,{class:`w-full bg-white z-10 cursor-pointer px-4 py-3 font-medium text-sm hover:bg-gray-50 flex items-center justify-between text-zinc-700`},{default:j(()=>[R(`span`,null,E(e.name),1),z(k(m0).ItemIndicator,{class:`text-zinc-400 transition-transform duration-200 data-[state=open]:rotate-180`},{default:j(()=>[z(i,{class:`w-3 h-3`})]),_:1})]),_:2},1024),z(k(m0).ItemContent,{class:`px-4 py-3 space-y-4`},{default:j(()=>[(F(!0),I(P,null,Vi(e.settings,e=>(F(),I(P,{key:e.id},[e.type===`header`?(F(),I(`div`,Cpe,[R(`h3`,wpe,E(e.label),1)])):(F(),L(k(u_),{key:1,field:e,"model-value":k(n)?.settings?.[e.id]??e.default,"onUpdate:modelValue":t=>o(e.id,t)},null,8,[`field`,`model-value`,`onUpdate:modelValue`]))],64))),128))]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1},8,[`value`])])):(F(),I(`div`,Tpe,E(k(t)(`No theme settings available`)),1))])])}}}),Dpe={class:`h-full flex flex-col overflow-y-hidden`},Ope={class:`flex-none h-12 flex items-center border-b px-4`},kpe=M({__name:`MediaPanel`,setup(e){let{t}=gz();return(e,n)=>(F(),I(`div`,Dpe,[R(`div`,Ope,[R(`h2`,null,E(k(t)(`Media`)),1)]),n[0]||=R(`div`,{class:`flex-1 overflow-y-auto`},null,-1)]))}}),Ape={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function jpe(e,t){return F(),I(`svg`,Ape,[...t[0]||=[R(`g`,{fill:`currentColor`},[R(`path`,{d:`M3 2v4.586l7 7L14.586 9l-7-7zM2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586z`}),R(`path`,{d:`M5.5 5a.5.5 0 1 1 0-1a.5.5 0 0 1 0 1m0 1a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3M1 7.086a1 1 0 0 0 .293.707L8.75 15.25l-.043.043a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 0 7.586V3a1 1 0 0 1 1-1z`})],-1)]])}var V0=D({name:`bi-tags`,render:jpe}),Mpe=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Npe={},Ppe={class:`animate-spin`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`};function Fpe(e,t){return F(),I(`svg`,Ppe,[...t[0]||=[R(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),R(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`},null,-1)]])}var H0=Mpe(Npe,[[`render`,Fpe]]),Ipe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Lpe(e,t){return F(),I(`svg`,Ipe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607`},null,-1)]])}var U0=D({name:`heroicons-magnifying-glass`,render:Lpe});typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var W0=()=>{};function Rpe(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function zpe(e,t={}){let n,r,i=W0,a=e=>{clearTimeout(e),i(),i=W0},o;return s=>{let c=A(e),l=A(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&=(a(r),void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})}}function G0(e,t=200,n={}){return Rpe(zpe(t,n),e)}var Bpe={class:`flex flex-col overflow-y-hidden`},Vpe={key:0,class:`flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring-2 focus-within:ring-zinc-700`},Hpe=[`placeholder`],Upe={class:`flex-1 overflow-y-auto border-t`},Wpe={key:0,class:`h-20 flex items-center justify-center`},Gpe={key:1},Kpe=[`onClick`],qpe=[`src`,`alt`],Jpe={class:`truncate flex-1 w-0`},K0=M({__name:`CategoryListbox`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let{t}=gz(),{channel:n,locale:r,getCategories:i}=cz(),a=ya(e,`modelValue`),o=O(``),s=U(()=>{let e=i();if(!o.value)return e;let t=o.value.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))}),{isFetching:c,execute:l}=gpe(),u=G0(()=>{l({search:o.value})});return Ei(()=>l()),pr([n,r],()=>{l()}),(e,n)=>{let r=U0,i=H0,l=V0;return F(),I(`div`,Bpe,[k(o)||k(s).length>2?(F(),I(`div`,Vpe,[z(r,{class:`w-4 h-4`}),rr(R(`input`,{"onUpdate:modelValue":n[0]||=e=>dn(o)?o.value=e:null,type:`text`,class:`focus:outline-none text-zinc-600`,placeholder:k(t)(`Search category`),onInput:n[1]||=(...e)=>k(u)&&k(u)(...e)},null,40,Hpe),[[Ic,k(o)]])])):V(``,!0),R(`div`,Upe,[k(c)?(F(),I(`div`,Wpe,[z(i,{class:`h-6 w-6 text-zinc-700`})])):(F(),I(`div`,Gpe,[(F(!0),I(P,null,Vi(k(s),e=>(F(),I(`a`,{key:e.id,href:`#`,class:ke([`flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm`,{"bg-neutral-200":a.value&&a.value.id===e.id}]),onClick:Xc(t=>a.value=e,[`stop`,`prevent`])},[e.logo?(F(),I(`img`,{key:0,src:e.logo.small_image_url,alt:e.name,class:`w-5 h-5 object-cover flex-none`},null,8,qpe)):(F(),L(l,{key:1,class:`w-4 h-4 flex-none mr-1 transform rotate-90`})),R(`span`,Jpe,E(e.name),1)],10,Kpe))),128))]))])])}}}),Ype={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Xpe(e,t){return F(),I(`svg`,Ype,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 18L18 6M6 6l12 12`},null,-1)]])}var q0=D({name:`heroicons-x-mark`,render:Xpe}),Zpe={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},Qpe={class:`flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm`},$pe=[`src`,`alt`],eme={class:`flex-1 w-0 truncate`},tme={key:1},nme=M({__name:`CategoryPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),{getCategory:n}=cz(),r=ya(e,`modelValue`),i=O(!1),a=U({get:()=>r.value?n(r.value):null,set:e=>{r.value=e?e.id:null}});return(n,o)=>{let s=V0,c=q0,l=K0;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,Zpe,E(e.field.label),1)):V(``,!0),z(k(N0).Root,{open:k(i),"onUpdate:open":o[3]||=e=>dn(i)?i.value=e:null},{default:j(()=>[z(k(N0).Trigger,{"as-child":``},{default:j(()=>[R(`div`,Qpe,[k(a)?(F(),I(P,{key:0},[k(a).logo?(F(),I(`img`,{key:0,src:k(a).logo.small_image_url,alt:k(a).name,class:`w-5 h-5 object-cover flex-none`},null,8,$pe)):(F(),L(s,{key:1,class:`w-4 h-4 flex-none transform rotate-90`})),R(`span`,eme,E(k(a).name),1),R(`button`,{class:`flex-none rounded-lg hover:bg-neutral-200 p-1`,onClick:o[0]||=Xc(e=>r.value=null,[`stop`])},[z(c)])],64)):(F(),I(`span`,tme,E(k(t)(`Select category`)),1))])]),_:1}),z(k(N0).Positioner,{class:`w-[var(--reference-width)] !z-10`},{default:j(()=>[z(k(N0).Content,{class:`border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col`},{default:j(()=>[z(k(N0).Arrow,{style:{"--arrow-size":`0.5rem`},class:`bg-white`},{default:j(()=>[z(k(N0).ArrowTip,{class:`border-t border-l`})]),_:1}),z(l,{modelValue:k(a),"onUpdate:modelValue":[o[1]||=e=>dn(a)?a.value=e:null,o[2]||=e=>i.value=!1]},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),rme={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function ime(e,t){return F(),I(`svg`,rme,[...t[0]||=[R(`g`,{fill:`currentColor`},[R(`path`,{d:`M6 4.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1 0a.5.5 0 1 0-1 0a.5.5 0 0 0 1 0`}),R(`path`,{d:`M2 1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 1 6.586V2a1 1 0 0 1 1-1m0 5.586l7 7L13.586 9l-7-7H2z`})],-1)]])}var J0=D({name:`bi-tag`,render:ime}),ame={class:`flex flex-col overflow-y-hidden`},ome={class:`flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring focus-within:ring-zinc-700`},sme=[`placeholder`],cme={class:`flex-1 overflow-y-auto border-t`},lme={key:0,class:`h-20 flex items-center justify-center`},ume={key:1},dme=[`onClick`],fme=[`src`,`alt`],pme={class:`flex-1 w-0 truncate`},Y0=M({__name:`ProductListbox`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let{t}=gz(),{channel:n,locale:r,getProducts:i}=cz(),a=ya(e,`modelValue`),o=O(``),s=U(()=>{let e=i();if(!o.value)return e;let t=o.value.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))}),{isFetching:c,execute:l}=_pe(),u=G0(()=>{l({channel:n.value,locale:r.value,search:o.value})},300),d=()=>{u()};return Ei(()=>l({channel:n.value,locale:r.value})),pr([n,r],()=>{l({channel:n.value,locale:r.value})}),(e,n)=>{let r=U0,i=H0,l=J0;return F(),I(`div`,ame,[R(`div`,ome,[z(r,{class:`w-4 h-4 flex-none`}),rr(R(`input`,{class:`flex-1 w-0 focus:outline-none text-zinc-600 text-sm`,placeholder:k(t)(`Search product`),"onUpdate:modelValue":n[0]||=e=>dn(o)?o.value=e:null,onInput:d},null,40,sme),[[Ic,k(o)]])]),R(`div`,cme,[k(c)?(F(),I(`div`,lme,[z(i,{class:`h-6 w-6 text-zinc-700`})])):(F(),I(`div`,ume,[(F(!0),I(P,null,Vi(k(s),e=>(F(),I(`a`,{key:e.id,class:ke([`cursor-pointer flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm`,{"bg-neutral-200":a.value&&a.value.id===e.id}]),onClick:Xc(t=>a.value=e,[`stop`,`prevent`])},[e.base_image?(F(),I(`img`,{key:0,src:e.base_image.small_image_url,alt:e.name,class:`w-5 h-5 object-cover flex-none`},null,8,fme)):(F(),L(l,{key:1,class:`w-4 h-4 flex-none mr-1 transform rotate-90`})),R(`span`,pme,E(e.name),1)],10,dme))),128))]))])])}}}),mme={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},hme={class:`flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm`,role:`button`},gme=[`src`,`alt`],_me={class:`flex-1 w-0 truncate`},vme={key:1},yme=M({__name:`ProductPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),{getProduct:n}=cz(),r=ya(e,`modelValue`),i=O(!1),a=U({get:()=>r.value?n(r.value):null,set:e=>{r.value=e?e.id:null}});return(n,o)=>{let s=V0,c=q0;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,mme,E(e.field.label),1)):V(``,!0),z(k(N0).Root,{open:k(i),"onUpdate:open":o[3]||=e=>dn(i)?i.value=e:null},{default:j(()=>[z(k(N0).Trigger,{"as-child":``},{default:j(()=>[R(`div`,hme,[k(a)?(F(),I(P,{key:0},[k(a).base_image?(F(),I(`img`,{key:0,src:k(a).base_image.small_image_url,alt:k(a).name,class:`w-5 h-5 object-cover flex-none`},null,8,gme)):(F(),L(s,{key:1,class:`w-4 h-4 flex-none transform rotate-90`})),R(`span`,_me,E(k(a).name),1),R(`button`,{class:`flex-none rounded-lg hover:bg-neutral-200 p-1`,onClick:o[0]||=Xc(e=>r.value=null,[`stop`])},[z(c)])],64)):(F(),I(`span`,vme,E(k(t)(`Select product`)),1))])]),_:1}),z(k(N0).Positioner,{class:`w-[var(--reference-width)] !z-10`},{default:j(()=>[z(k(N0).Content,{class:`border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col`},{default:j(()=>[z(k(N0).Arrow,{style:{"--arrow-size":`0.5rem`},class:`bg-white`},{default:j(()=>[z(k(N0).ArrowTip,{class:`border-t border-l`})]),_:1}),z(Y0,{modelValue:k(a),"onUpdate:modelValue":[o[1]||=e=>dn(a)?a.value=e:null,o[2]||=e=>i.value=!1]},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),bme={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xme(e,t){return F(),I(`svg`,bme,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm0 2h7v5h5v11H6zm2 8v2h8v-2zm0 4v2h5v-2z`},null,-1)]])}var X0=D({name:`mdi-file-document-outline`,render:xme}),Sme={class:`flex flex-col overflow-y-hidden`},Cme={class:`flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring focus-within:ring-zinc-700`},wme=[`placeholder`],Tme={class:`flex-1 overflow-y-auto border-t`},Eme={key:0,class:`h-20 flex items-center justify-center`},Dme={key:1},Ome=[`onClick`],kme={class:`truncate flex-1 w-0`},Z0=M({__name:`CmsPageListbox`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let{t}=gz(),{channel:n,locale:r,getCmsPages:i}=cz(),a=ya(e,`modelValue`),o=O(``),s=U(()=>{let e=i();if(!o.value)return e;let t=o.value.toLowerCase();return e.filter(e=>e.page_title.toLowerCase().includes(t))}),{isFetching:c,execute:l}=vpe(),u=G0(()=>{l({channel:n.value,locale:r.value,search:o.value})},300),d=()=>{u()};return Ei(()=>l({channel:n.value,locale:r.value})),pr([n,r],()=>{l({channel:n.value,locale:r.value})}),(e,n)=>{let r=U0,i=H0,l=X0;return F(),I(`div`,Sme,[R(`div`,Cme,[z(r,{class:`w-4 h-4`}),rr(R(`input`,{"onUpdate:modelValue":n[0]||=e=>dn(o)?o.value=e:null,type:`text`,class:`focus:outline-none text-zinc-600`,placeholder:k(t)(`Search page`),onInput:d},null,40,wme),[[Ic,k(o)]])]),R(`div`,Tme,[k(c)?(F(),I(`div`,Eme,[z(i,{class:`h-6 w-6 text-zinc-700`})])):(F(),I(`div`,Dme,[(F(!0),I(P,null,Vi(k(s),e=>(F(),I(`a`,{key:e.url_key,href:`#`,class:ke([`flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm`,{"bg-neutral-200":a.value&&a.value.url_key===e.url_key}]),onClick:Xc(t=>a.value=e,[`stop`,`prevent`])},[z(l,{class:`w-4 h-4 flex-none text-zinc-700`}),R(`span`,kme,E(e.page_title),1)],10,Ome))),128))]))])])}}}),Ame={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},jme={role:`button`,class:`flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm`},Mme={class:`flex-1 w-0 truncate`},Nme={key:1},Pme=M({__name:`CmsPagePicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),{getCmsPage:n}=cz(),r=ya(e,`modelValue`),i=O(!1),a=U({get:()=>r.value?n(r.value):null,set:e=>{r.value=e?e.id:null}});return(n,o)=>{let s=X0,c=q0,l=Z0;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,Ame,E(e.field.label),1)):V(``,!0),z(k(N0).Root,{open:k(i),"onUpdate:open":o[3]||=e=>dn(i)?i.value=e:null},{default:j(()=>[z(k(N0).Trigger,{"as-child":``},{default:j(()=>[R(`div`,jme,[k(a)?(F(),I(P,{key:0},[z(s,{class:`w-4 h-4 flex-none`}),R(`span`,Mme,E(k(a).page_title),1),R(`button`,{class:`flex-none rounded-lg hover:bg-neutral-200 p-1`,onClick:o[0]||=Xc(e=>r.value=null,[`stop`])},[z(c)])],64)):(F(),I(`span`,Nme,E(k(t)(`Select page`)),1))])]),_:1}),z(k(N0).Positioner,{class:`w-[var(--reference-width)] !z-10`},{default:j(()=>[z(k(N0).Content,{class:`border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col`},{default:j(()=>[z(k(N0).Arrow,{style:{"--arrow-size":`0.5rem`},class:`bg-white`},{default:j(()=>[z(k(N0).ArrowTip,{class:`border-t border-l`})]),_:1}),z(l,{modelValue:k(a),"onUpdate:modelValue":[o[1]||=e=>dn(a)?a.value=e:null,o[2]||=e=>i.value=!1]},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),Fme={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ime(e,t){return F(),I(`svg`,Fme,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75s-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12m13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094z`,"clip-rule":`evenodd`},null,-1)]])}var Q0=D({name:`heroicons-check-circle-solid`,render:Ime}),Lme={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rme(e,t){return F(),I(`svg`,Lme,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M21 12a9 9 0 1 1-6.219-8.56`},null,-1)]])}var $0=D({name:`lucide-loader2`,render:Rme}),zme={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Bme(e,t){return F(),I(`svg`,zme,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M8.25 15L12 18.75L15.75 15m-7.5-6L12 5.25L15.75 9`},null,-1)]])}var e2=D({name:`heroicons-chevron-up-down`,render:Bme}),Vme={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Hme(e,t){return F(),I(`svg`,Vme,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154zm-.8-2L8 6.885L5.554 13zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93M19 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4`},null,-1)]])}var Ume=D({name:`ri-font-size`,render:Hme}),t2=O([]),n2=O(!1),r2=O(!1);function i2(){return{fonts:t2,isFetching:n2,isFetched:r2,fetchFonts:async()=>{if(r2.value||n2.value)return t2.value;n2.value=!0;try{let e=await(await fetch(`https://fonts.bunny.net/list`)).json(),t=[];Object.keys(e).forEach(n=>{let r=e[n];t.push({slug:n,name:r.familyName||n.replace(/-/g,` `),weights:r.weights||[400],styles:r.styles||[`normal`]})}),t2.value=t,r2.value=!0}catch(e){console.error(`Failed to fetch fonts:`,e)}finally{n2.value=!1}return t2.value},findFont:e=>t2.value.find(t=>t.slug===e)}}function a2(e){return e.split(/[-_\s]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}var Wme={class:`text-sm font-medium mb-1 text-gray-700`},Gme={class:`flex-1 text-left capitalize line-clamp-1`},Kme={class:`flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between`},qme={class:`flex-1 flex flex-col min-h-0 overflow-y-auto`},Jme={class:`p-3`},Yme={key:0,class:`flex items-center justify-center py-6`},Xme={key:1,class:`divide-y`},Zme=[`onClick`],Qme={class:`flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-neutral-200`},o2=M({__name:`FontPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),n=ya(e,`modelValue`,{get(e){return e?typeof e==`string`?{slug:e,name:a2(e),weights:[],styles:[]}:e:null}}),r=O(null),i=O(!1),a=O(!1),o=O(``),{fonts:s,isFetching:c}=i2(),l=U(()=>s.value?o.value?s.value.filter(e=>e.name.toLowerCase().includes(o.value.toLowerCase())).slice(0,20):s.value.slice(0,20):[]),u=O(new Set),d=new Map;function f(e){n.value=e,i.value=!0}function p(e,t){if(u.value.has(t.slug)||d.has(t.slug))return;let n=new IntersectionObserver(([e])=>{e.isIntersecting&&(m(t),n.disconnect(),d.delete(t.slug))},{threshold:.1});n.observe(e),d.set(t.slug,n)}function m(e){let t=`font-${e.slug}`;if(!document.getElementById(t)){let n=document.createElement(`link`);n.id=t,n.rel=`stylesheet`,n.href=h(e),document.head.appendChild(n),u.value.add(e.slug)}}function h(e){return`https://fonts.bunny.net/css?display=fallback&family=${e.slug}`}function g(){i.value=!1,r.value=n.value}function _(){a.value=!1,n.value=r.value,i.value=!1}return(r,s)=>{let d=Ume,m=e2,h=q0,v=U0,y=$0,b=Q0;return F(),I(`div`,null,[R(`label`,Wme,E(e.field.label),1),z(k(D0).Root,{open:k(a),"onUpdate:open":s[1]||=e=>dn(a)?a.value=e:null,modal:!1,"close-on-interact-outside":!1,onOpenChange:g},{default:j(()=>[z(k(D0).Trigger,{class:`flex items-center px-3 h-10 gap-4 border rounded w-full`},{default:j(()=>[z(d,{class:`flex-none w-4 h-4 text-zinc-500`}),R(`span`,Gme,E(n.value?.name),1),z(m,{class:`flex-none w-4 h-4 text-zinc-500`})]),_:1}),z(k(D0).Positioner,{class:`flex absolute z-50 inset-0 w-full h-full items-center justify-center`},{default:j(()=>[z(k(D0).Content,{class:`bg-white shadow flex flex-col w-full h-full overflow-hidden`},{default:j(()=>[R(`header`,Kme,[z(k(D0).Title,null,{default:j(()=>[B(E(k(t)(`Font Picker`)),1)]),_:1}),R(`button`,{onClick:_,class:`cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300`},[z(h,{class:`w-5 h-5`})])]),R(`div`,qme,[R(`div`,Jme,[z(k(_0).Root,{class:`relative`},{default:j(()=>[z(v,{class:`absolute left-3 top-2.5 text-zinc-500`}),z(k(_0).Input,{modelValue:k(o),"onUpdate:modelValue":s[0]||=e=>dn(o)?o.value=e:null,class:`w-full pr-3 pl-9 h-10 text-gray-500 rounded border border-zinc-300 focus:outline-none focus:ring-2 focus:ring focus:ring-zinc-700 focus:border-transparent`,placeholder:`Search`},null,8,[`modelValue`])]),_:1})]),k(c)?(F(),I(`div`,Yme,[z(y,{class:`w-6 h-6 animate-spin text-zinc-500`})])):(F(),I(`ul`,Xme,[(F(!0),I(P,null,Vi(k(l),e=>(F(),I(`li`,{ref_for:!0,ref:t=>p(t,e),class:ke([`p-3 first:border-t hover:bg-zinc-100 cursor-pointer capitalize flex justify-between items-center`,{"bg-zinc-100":n.value?.slug===e.slug}]),style:Ee({fontFamily:k(u).has(e.slug)?e.name:`inherit`}),onClick:t=>f(e)},[R(`span`,null,E(e.name),1),n.value?.slug===e.slug?(F(),L(b,{key:0,class:`w-5 h-5 text-zinc-700`})):V(``,!0)],14,Zme))),256))]))]),R(`footer`,Qme,[z(k(i_),{onClick:_},{default:j(()=>[B(E(k(t)(`Cancel`)),1)]),_:1}),z(k(D0).CloseTrigger,{"as-child":``},{default:j(()=>[z(k(i_),{variant:`primary`,disabled:!k(i)},{default:j(()=>[B(E(k(t)(`Select`)),1)]),_:1},8,[`disabled`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),$me={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ehe(e,t){return F(),I(`svg`,$me,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18`},null,-1)]])}var s2=D({name:`heroicons-arrow-left`,render:ehe}),the={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nhe(e,t){return F(),I(`svg`,the,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244`},null,-1)]])}var c2=D({name:`heroicons-link`,render:nhe}),rhe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ihe(e,t){return F(),I(`svg`,rhe,[...t[0]||=[R(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,d:`M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5m-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5z`,"clip-rule":`evenodd`},null,-1)]])}var ahe=D({name:`heroicons-arrow-top-right-on-square-solid`,render:ihe}),ohe={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},she={class:`relative flex border px-3 h-10 gap-3 text-sm w-full cursor-pointer rounded outline-0 items-center appearance-none justify-between focus-within:shadow focus-within:ring focus-within:ring-zinc-700`},che=[`href`],lhe=[`value`],uhe=[`href`],dhe={key:0},fhe={key:1,class:`flex flex-col h-full overflow-hidden`},phe=M({__name:`LinkPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),n=ya(e,`modelValue`),r=O(`link`),i=O(``),a=O(``),o=O(``),s=O(!1),c=O(null);Ei(()=>{l(n.value)});function l(e){if(!e)return;if(!e.startsWith(`visual://`)){r.value=`link`,e.startsWith(`/`)||(e=`/`+e),i.value=e,a.value=e,n.value=e;return}let t=e.match(/^visual:\/\/([^:]+):([^\/]+)\/(.*)?$/);t&&(r.value=t[1],i.value=u(t[3],t[1]===`cms_pages`?`page/`:``),a.value=decodeURIComponent(t[2]))}function u(e,t=``){return new URL(t+e,new URL(window.editorConfig.storefrontUrl).origin).href}function d(e){n.value=`visual://categories:${encodeURIComponent(e.name)}/${e.slug}`,r.value=`categories`,i.value=u(e.slug),a.value=e.name,s.value=!1}function f(e){n.value=`visual://products:${encodeURIComponent(e.name)}/${e.url_key}`,r.value=`products`,i.value=u(e.url_key),a.value=e.name,s.value=!1}function p(e){n.value=`visual://cms_pages:${encodeURIComponent(e.page_title)}/${e.url_key}`,r.value=`cms_pages`,i.value=u(e.url_key,`page/`),a.value=e.page_title,s.value=!1}function m(){r.value=`link`,i.value=``,n.value=``,a.value=``}function h(e){try{let t=new URL(e.target.value);r.value=`link`,n.value=t.href,i.value=t.href,a.value=t.href}catch{l(e.target.value)}}function g(e){e&&setTimeout(()=>{c.value?.focus()},0)}return(l,u)=>{let _=ahe,v=V0,y=J0,b=X0,x=c2,S=q0,C=s2,ee=K0,te=Y0,w=Z0;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,ohe,E(e.field.label),1)):V(``,!0),z(k(N0).Root,{open:k(s),"onUpdate:open":u[6]||=e=>dn(s)?s.value=e:null,onOpenChange:g},{default:j(()=>[z(k(N0).Trigger,{"as-child":``},{default:j(()=>[R(`div`,she,[k(i)?(F(),I(`a`,{key:0,href:k(i),target:`_blank`,class:`absolute right-0 -top-6`,onClick:u[0]||=Xc(()=>{},[`stop`])},[z(_,{class:`w-4 h-4`})],8,che)):V(``,!0),k(r)===`categories`?(F(),L(v,{key:1,class:`w-4 h-4 flex-none transform rotate-90`})):k(r)===`products`?(F(),L(y,{key:2,class:`w-4 h-4 flex-none transform rotate-90`})):k(r)===`cms_pages`?(F(),L(b,{key:3,class:`w-4 h-4 flex-none`})):(F(),L(x,{key:4,class:`w-4 h-4 flex-none`})),R(`input`,{ref_key:`inputRef`,ref:c,class:`outline-none flex-1 w-0 bg-transparent`,value:k(a),onChange:h},null,40,lhe),n.value?(F(),I(`button`,{key:5,class:`flex-none text-zinc-700 hover:bg-zinc-200 p-1 rounded-lg`,onClick:Xc(m,[`prevent`])},[z(S,{class:`w-4 h-4`})])):V(``,!0)])]),_:1}),k(i)?(F(),I(`a`,{key:0,href:k(i),target:`_blank`,class:`absolute right-0 -top-6`},[z(_,{class:`w-4 h-4`})],8,uhe)):V(``,!0),z(k(N0).Positioner,{class:`w-[var(--reference-width)] !z-10`},{default:j(()=>[z(k(N0).Content,{class:`bg-white rounded-lg shadow gap-1 flex flex-col max-h-96 border`,onPointerdown:u[5]||=Xc(()=>{},[`stop`])},{default:j(()=>[k(o)?(F(),I(`div`,fhe,[R(`button`,{class:`h-9 flex-none bg-zinc-200 flex gap-3 w-full items-center rounded-t-lg text-left px-3`,onClick:u[4]||=e=>o.value=``},[z(C,{class:`w-4 h-4`}),B(` `+E(k(t)(`Back`)),1)]),k(o)===`categories`?(F(),L(ee,{key:0,class:`h-full flex-1`,"onUpdate:modelValue":d})):k(o)===`products`?(F(),L(te,{key:1,class:`h-full flex-1`,"onUpdate:modelValue":f})):k(o)===`cms_pages`?(F(),L(w,{key:2,class:`h-full flex-1`,"onUpdate:modelValue":p})):V(``,!0)])):(F(),I(`div`,dhe,[R(`button`,{class:`appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200`,onMousedown:u[1]||=Xc(e=>o.value=`categories`,[`prevent`])},[z(v,{class:`w-4 h-4 transform rotate-90`}),B(` `+E(k(t)(`Categories`)),1)],32),R(`button`,{class:`appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200`,onMousedown:u[2]||=Xc(e=>o.value=`products`,[`prevent`])},[z(y,{class:`w-4 h-4 transform rotate-90`}),B(` `+E(k(t)(`Products`)),1)],32),R(`button`,{class:`appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200`,onMousedown:u[3]||=Xc(e=>o.value=`cms_pages`,[`prevent`])},[z(b,{class:`w-4 h-4 text-zinc-700`}),B(` `+E(k(t)(`Cms Pages`)),1)],32)]))]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),mhe={class:`px-2 py-1 col-span-3 col-start-2 row-start-1 row-span-3`},hhe={class:`mb-px font-semibold text-xs`},ghe={class:`grid grid-cols-2 gap-2`},_he=[`title`],l2=M({__name:`ColorSchemePreview`,props:{id:null,scheme:null},setup(e){let t=e,n=[`primary`,`secondary`,`accent`,`neutral`],r=U(()=>`tokens`in t.scheme&&t.scheme.tokens?t.scheme.tokens:t.scheme);return(t,i)=>(F(),I(`div`,{class:`border border-zinc-300 rounded grid grid-cols-4 grid-rows-3 overflow-hidden cursor-pointer`,style:Ee({backgroundColor:k(r).background,color:k(r)[`on-background`]})},[R(`div`,{title:`Main background`,class:`col-start-1 row-start-1`,style:Ee({backgroundColor:k(r).background})},null,4),R(`div`,{class:`col-start-1 row-start-2`,style:Ee({backgroundColor:k(r).surface}),title:`Surface color`},null,4),R(`div`,{class:`col-start-1 row-start-3`,style:Ee({backgroundColor:k(r)[`surface-alt`]}),title:`Alternative surface color`},null,4),R(`div`,mhe,[R(`div`,hhe,E(e.id),1),R(`div`,ghe,[(F(),I(P,null,Vi(n,e=>R(`div`,{key:e,title:e+` color`,class:`rounded flex items-center justify-center`,style:Ee({backgroundColor:k(r)[e],color:k(r)[`on-${e}`]})},[...i[0]||=[R(`span`,{class:`font-semibold`},`A`,-1)]],12,_he)),64))])])],4))}}),vhe={class:`text-sm font-medium mb-1 text-gray-700`},yhe={key:0},bhe={key:0,class:`flex flex-1 gap-3`},xhe={class:`capitalize flex-1 text-left`},She={key:1},Che={key:1,class:`text-sm text-red-400`},whe=M({__name:`ColorSchemePicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{theme:t}=cz(),n=U(()=>{if(!t.value)return{};let e=t.value.settingsSchema.flatMap(e=>e.settings).find(e=>e.type===`color-scheme-group`)?.id;return e&&t.value.settings[e]||{}}),r=U(()=>Object.keys(n.value).length>0),i=ya(e,`modelValue`),a=O(!1),o=U(()=>i.value&&n.value?n.value[i.value]:null);function s(e){i.value=e,a.value=!1}return(t,c)=>{let l=q0,u=e2,d=Q0,f=l2;return F(),I(`div`,null,[R(`label`,vhe,E(e.field.label),1),k(r)?(F(),I(`div`,yhe,[z(k(N0).Root,{open:k(a),"onUpdate:open":c[1]||=e=>dn(a)?a.value=e:null},{default:j(()=>[z(k(N0).Trigger,{class:`border border-zinc-300 rounded w-full flex justify-between h-10 px-3 items-center`},{default:j(()=>[k(o)?(F(),I(`div`,bhe,[R(`div`,{class:`w-6 rounded flex-none`,style:Ee({backgroundColor:k(o).background,color:k(o)[`on-background`]})},`A`,4),R(`div`,xhe,E(i.value),1),R(`button`,{class:`ml-auto flex-none mr-1 p-1 rounded-lg hover:bg-zinc-100`,onClick:c[0]||=Xc(e=>i.value=null,[`stop`])},[z(l,{class:`w-4 h-4`})])])):(F(),I(`span`,She,`Select a color scheme`)),z(u,{class:`flex-none h-4 w-4`})]),_:1}),z(k(N0).Positioner,null,{default:j(()=>[z(k(N0).Content,{class:`border border-zinc-300 rounded shadow-md w-[var(--reference-width)] z-50 bg-white -mt-1 overflow-y-auto max-h-[360px]`},{default:j(()=>[(F(!0),I(P,null,Vi(k(n),(e,t)=>(F(),I(`div`,null,[R(`div`,{class:ke([`px-3 py-3 hover:bg-zinc-100 relative`,{"bg-zinc-100":i.value===String(t)}])},[i.value===String(t)?(F(),L(d,{key:0,class:`w-5 h-5 absolute top-2 right-2 text-green-400`})):V(``,!0),z(f,{scheme:e,id:String(t),onClick:e=>s(String(t))},null,8,[`scheme`,`id`,`onClick`])],2)]))),256))]),_:1})]),_:1})]),_:1},8,[`open`])])):(F(),I(`div`,Che,` Oops! This theme doesn’t have any color schemes to show. `))])}}}),The={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ehe(e,t){return F(),I(`svg`,The,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m15 11.25l1.5 1.5l.75-.75V8.758l2.276-.61a3 3 0 1 0-3.675-3.675l-.61 2.277H12l-.75.75l1.5 1.5M15 11.25l-8.47 8.47c-.34.34-.8.53-1.28.53s-.94.19-1.28.53l-.97.97l-.75-.75l.97-.97c.34-.34.53-.8.53-1.28s.19-.94.53-1.28L12.75 9M15 11.25L12.75 9`},null,-1)]])}var Dhe=D({name:`heroicons-eye-dropper`,render:Ehe}),Ohe={class:`flex gap-2`},khe={class:`flex flex-col gap-2 w-full`},Ahe={key:0},jhe={class:`text-xs font-medium`},Mhe={class:`text-xs font-medium`},u2=M({__name:`ColorPicker`,props:Zi({usedColors:{default:()=>[]},label:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),n=ya(e,`modelValue`,{set(e){return e.toString(`hexa`)},get(e){try{return NQ(e)}catch(t){return console.error(`Invalid color value:`,e,t),NQ(`#000000ff`)}}}),r=e,i=U(()=>r.usedColors.map(e=>NQ(e))),a=O([]);function o({value:e}){n.value=e.toString(`hexa`),!i.value.some(t=>t.toHexInt()===e.toHexInt())&&(a.value.some(t=>t.toHexInt()===e.toHexInt())||a.value.unshift(e))}return(r,s)=>{let c=Dhe;return F(),L(k(w0).Root,{format:`rgba`,class:`flex flex-col gap-1.5`,"model-value":n.value,onValueChange:s[0]||=e=>o(e)},{default:j(()=>[e.label?(F(),L(k(w0).Label,{key:0,class:`font-medium text-sm`},{default:j(()=>[B(E(e.label),1)]),_:1})):V(``,!0),z(k(w0).Control,{class:`flex gap-2`},{default:j(()=>[z(k(w0).Trigger,{class:`appearance-none rounded cursor-pointer inline-flex items-center justify-center outline-none h-10 min-w-10 gap-2 border border-zinc-300`},{default:j(()=>[z(k(w0).TransparencyGrid,{class:`rounded`}),z(k(w0).ValueSwatch,{class:`h-7 w-7 rounded shadow`})]),_:1}),z(k(w0).ChannelInput,{channel:`hex`,class:`appearance-none rounded bg-none outline-0 relative w-full border px-3 h-10 min-w-10 focus:ring focus:ring-zinc-700`})]),_:1}),z(k(w0).Positioner,{class:`w-60 !z-20 pl-1`},{default:j(()=>[z(k(w0).Content,{class:`flex flex-col p-4 gap-3 rounded bg-white border shadow-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out data-[state=closed]:hidden`},{default:j(()=>[z(k(w0).Area,{class:`rounded overflow-hidden h-36 touch-none forced-color-adjust-none`},{default:j(()=>[z(k(w0).AreaBackground,{class:`h-full rounded`}),z(k(w0).AreaThumb,{class:`rounded-full w-2.5 h-2.5 outline-none border-2 border-white`})]),_:1}),R(`div`,Ohe,[z(k(w0).EyeDropperTrigger,{class:`appearance-none rounded cursor-pointer inline-flex outline-none relative select-none items-center justify-center border h-8 min-w-8`},{default:j(()=>[z(c,{class:`w-4 h-4`})]),_:1}),R(`div`,khe,[z(k(w0).ChannelSlider,{channel:`hue`,class:`rounded w-full`},{default:j(()=>[z(k(w0).ChannelSliderTrack,{class:`h-2.5 rounded`}),z(k(w0).ChannelSliderThumb,{class:`h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2`})]),_:1}),z(k(w0).ChannelSlider,{channel:`alpha`,class:`rounded w-full`},{default:j(()=>[z(k(w0).TransparencyGrid),z(k(w0).ChannelSliderTrack,{class:`h-2.5 rounded`}),z(k(w0).ChannelSliderThumb,{class:`h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2`})]),_:1})])]),z(k(w0).View,{format:`rgba`,class:`flex gap-3`},{default:j(()=>[z(k(w0).ChannelInput,{channel:`hex`,class:`flex-1 border px-3 h-8 w-0 rounded outline-0 focus:ring focus:ring-zinc-700`}),z(k(w0).ChannelInput,{channel:`alpha`,class:`flex-none border px-3 h-8 rounded outline-0 focus:ring focus:ring-zinc-700`})]),_:1}),k(a).length>0?(F(),I(`div`,Ahe,[R(`p`,jhe,E(k(t)(`Recently selected`)),1),z(k(w0).SwatchGroup,{class:`grid grid-cols-6 gap-2 mt-2`},{default:j(()=>[(F(!0),I(P,null,Vi(k(a).slice(0,6),e=>(F(),L(k(w0).SwatchTrigger,{value:e,key:e.toHexInt()},{default:j(()=>[z(k(w0).Swatch,{value:e,class:`w-6 h-6 rounded border`},null,8,[`value`])]),_:2},1032,[`value`]))),128))]),_:1})])):V(``,!0),R(`div`,null,[R(`p`,Mhe,E(k(t)(`Currently used`)),1),z(k(w0).SwatchGroup,{class:`grid grid-cols-6 gap-2 mt-2`},{default:j(()=>[(F(!0),I(P,null,Vi(k(i),e=>(F(),L(k(w0).SwatchTrigger,{value:e,key:e.toString(`hexa`)},{default:j(()=>[z(k(w0).Swatch,{value:e,class:`w-6 h-6 rounded border`},null,8,[`value`])]),_:2},1032,[`value`]))),128))]),_:1})])]),_:1})]),_:1}),z(k(w0).HiddenInput)]),_:1},8,[`model-value`])}}}),Nhe={class:`mt-4 space-y-4`},Phe={class:`capitalize`},Fhe={class:`text-xs leading-snug italic mt-1`},Ihe=M({__name:`EditColorScheme`,props:Zi({id:null},{modelValue:{},modelModifiers:{}}),emits:Zi([`update`],[`update:modelValue`]),setup(e,{emit:t}){let n=t,r=ya(e,`modelValue`),i={background:`Main background color. For page background and full-width sections`,"on-background":`Default text color`,primary:`Primary color. For primary buttons, link, CTAs`,"on-primary":`Text/icons on primary backgrounds`,secondary:`Secondary color. For Headings, badges, accents`,"on-secondary":`Text/icons on secondary backgrounds`,accent:`Highlight color. For featured content, banners, badges`,"on-accent":`Text/icons on accent elements`,neutral:`Neutral color`,"on-neutral":`On neutral color`,surface:`Surface color. For components or sections background`,"on-surface":`Section text, icons`,"surface-alt":`Alternative surface color. For hover states, dropdowns`,"on-surface-alt":`Text/icons on alternative surface`,danger:`Errors, danger zones`,"on-danger":`Text/icons on error messages`,warning:`Notices, validation warnings`,"on-warning":`Text/icons on warning backgrounds`,success:`Alerts, tags, confirmations`,"on-success":`Text/icons on success backgrounds`,info:`Tooltips, banners, guidance`,"on-info":`Text/icons on info sections`};function a(e,t){r.value[e]=t,n(`update`,r.value)}return(t,n)=>{let o=l2,s=u2;return F(),I(`div`,null,[z(o,{scheme:r.value,id:e.id},null,8,[`scheme`,`id`]),R(`div`,Nhe,[(F(!0),I(P,null,Vi(r.value,(e,t)=>(F(),I(`div`,null,[R(`label`,Phe,E(t.replace(`-`,` `)),1),z(s,{"model-value":e,"onUpdate:modelValue":e=>a(t,e)},null,8,[`model-value`,`onUpdate:modelValue`]),R(`p`,Fhe,E(i[t]),1)]))),256))])])}}}),Lhe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rhe(e,t){return F(),I(`svg`,Lhe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M12 4.5v15m7.5-7.5h-15`},null,-1)]])}var d2=D({name:`heroicons-plus`,render:Rhe}),zhe={class:`text-sm font-medium mb-1 text-gray-700`},Bhe={class:`grid grid-cols-2 gap-2 items-stretch mt-1`},Vhe={class:`flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between`},Hhe={class:`flex-1 flex flex-col min-h-0 overflow-y-auto p-4`},Uhe=M({__name:`ColorSchemeGroup`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:Zi([`update:modelValue`],[`update:modelValue`]),setup(e,{emit:t}){let n=ya(e,`modelValue`),r=t,i=O(null),a=O(!1),o=U({get(){if(!i.value||!n.value?.[i.value])return null;let e=n.value[i.value];return`tokens`in e?e.tokens:e},set(e){if(!i.value||!e)return;let t=n.value[i.value];`tokens`in t?t.tokens=e:n.value[i.value]=e}});function s(e){i.value=e,a.value=!0}function c(){r(`update:modelValue`,n.value)}function l(){let e=Object.keys(n.value),t=`scheme-${e.length+1}`;n.value[t]=structuredClone(cn(n.value[e[0]])),c(),s(t)}return(t,r)=>{let u=l2,d=d2,f=q0,p=Ihe;return F(),I(`div`,null,[R(`label`,zhe,E(e.field.label),1),R(`div`,Bhe,[(F(!0),I(P,null,Vi(n.value,(e,t)=>(F(),L(u,{key:t,id:t,scheme:e,onClick:e=>s(t)},null,8,[`id`,`scheme`,`onClick`]))),128)),R(`button`,{class:`flex-col border-2 border-dashed flex items-center justify-center min-h-20 rounded border-blue-400 text-blue-400 cursor-pointer`,onClick:l},[z(d,{class:`h-6 w-6`}),r[2]||=R(`span`,null,`Add scheme`,-1)])]),z(k(D0).Root,{open:k(a),"onUpdate:open":r[1]||=e=>dn(a)?a.value=e:null,modal:!1,"close-on-interact-outside":!1},{default:j(()=>[z(k(D0).Positioner,{class:`flex fixed z-50 top-14 left-14 bottom-0 w-75 items-center justify-center`},{default:j(()=>[z(k(D0).Content,{class:`bg-white shadow flex flex-col w-full h-full overflow-hidden`},{default:j(()=>[R(`header`,Vhe,[z(k(D0).Title,{class:`capitalize`},{default:j(()=>[B(`Editing `+E(k(i)?.replace(`-`,` `)),1)]),_:1}),z(k(D0).CloseTrigger,{class:`cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300`},{default:j(()=>[z(f,{class:`w-5 h-5`})]),_:1})]),R(`div`,Hhe,[k(i)&&k(o)?(F(),L(p,{key:0,id:k(i),modelValue:k(o),"onUpdate:modelValue":r[0]||=e=>dn(o)?o.value=e:null,onUpdate:c},null,8,[`id`,`modelValue`])):V(``,!0)])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),Whe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ghe(e,t){return F(),I(`svg`,Whe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M9.879 7.519c1.172-1.025 3.071-1.025 4.243 0c1.171 1.025 1.171 2.687 0 3.712q-.308.268-.67.442c-.746.361-1.452.999-1.452 1.827v.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9 5.25h.008v.008H12z`},null,-1)]])}var Khe=D({name:`heroicons-question-mark-circle`,render:Ghe}),f2=O([]),p2=O(new Map),m2=O(new Set),h2=O(!1),g2=O(window.editorConfig.routes.getIcons),{get:qhe}=z0(),{isFetching:Jhe,execute:Yhe,onSuccess:Xhe,onError:Zhe}=qhe(g2);Xhe(e=>{!f2.value.length&&e.sets&&(f2.value=e.sets),e.currentSet&&(p2.value.set(e.currentSet,e.icons),m2.value.delete(e.currentSet))}),Zhe(e=>{console.error(`Failed to fetch icons:`,e)});async function _2(e){let t=new URL(window.editorConfig.routes.getIcons,window.location.origin);if(e)for(let[n,r]of Object.entries(e))t.searchParams.append(n,r);g2.value=t.href,await Yhe()}function Qhe(){h2.value||(h2.value=!0,_2())}function $he(e){p2.value.has(e)||m2.value.has(e)||(m2.value.add(e),_2({set:e}))}function v2(e){return p2.value.get(e)||[]}function ege(e){return m2.value.has(e)}function y2(e){return f2.value.find(t=>e.startsWith(t.prefix))}function tge(e){let t=y2(e);return t&&v2(t.id).find(t=>t.id===e)||null}function nge(){return Qhe(),{sets:U(()=>f2.value),getIcons:v2,fetchSet:$he,isSetLoading:ege,isFetching:Jhe,findSetByIconId:y2,findIconById:tge}}var rge={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},ige=[`innerHTML`],age={class:`flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between`},oge={class:`flex-1 flex flex-col min-h-0 overflow-y-auto`},sge={class:`p-3`},cge=[`value`],lge={key:0,class:`flex items-center justify-center py-6`},uge={key:1,class:`p-3 grid grid-cols-4 gap-3`},dge=[`onClick`],fge=[`innerHTML`],pge={class:`flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-neutral-200`},mge=M({__name:`IconPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),n=O(!1),r=O(!1),i=ya(e,`modelValue`),a=O(null),o=O(``),s=O(`lucide`),c=O(!1),{sets:l,isFetching:u,getIcons:d,findIconById:f,findSetByIconId:p,fetchSet:m}=nge(),h=U(()=>{let e=d(s.value);return o.value?e.filter(e=>e.name.toLowerCase().includes(o.value.toLowerCase())):e}),g=U(()=>i.value?f(i.value):null);pr(()=>l.value,e=>{if(c.value||e.length===0||!i.value)return;let t=p(i.value);t&&(s.value=t.id,m(t.id)),c.value=!0},{immediate:!0});function _(){m(s.value)}function v(e){i.value=e.id,n.value=!0}function y(){r.value=!1,i.value=a.value,n.value=!1}return(c,d)=>{let f=Khe,p=q0,m=U0,b=$0;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,rge,E(e.field.label),1)):V(``,!0),z(k(D0).Root,{open:k(r),"onUpdate:open":d[3]||=e=>dn(r)?r.value=e:null,modal:!1,"close-on-interact-outside":!1,onOpenChange:d[4]||=e=>{n.value=!1,a.value=i.value}},{default:j(()=>[z(k(D0).Trigger,{class:`flex items-center px-3 py-2.5 gap-4 border rounded relative`},{default:j(()=>[k(g)?(F(),I(`span`,{key:0,innerHTML:k(g).svg,class:`w-8 h-8 text-zinc-600`},null,8,ige)):(F(),L(f,{key:1,class:`w-8 h-8 text-zinc-600`})),k(g)?(F(),I(`button`,{key:2,class:`absolute -top-2 -right-2 bg-zinc-100 rounded-full p-1 hover:bg-zinc-200`,onClick:d[0]||=Xc(e=>i.value=null,[`stop`])},[z(p,{class:`w-4 h-4`})])):V(``,!0)]),_:1}),z(k(D0).Positioner,{class:`flex absolute z-50 inset-0 w-full h-full items-center justify-center`},{default:j(()=>[z(k(D0).Content,{class:`bg-white shadow flex flex-col w-full h-full overflow-hidden`},{default:j(()=>[R(`header`,age,[z(k(D0).Title,null,{default:j(()=>[B(E(k(t)(`Icon Picker`)),1)]),_:1}),R(`button`,{onClick:y,class:`cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300`},[z(p,{class:`w-5 h-5`})])]),R(`div`,oge,[R(`div`,sge,[rr(R(`select`,{"onUpdate:modelValue":d[1]||=e=>dn(s)?s.value=e:null,onChange:_,class:`border rounded-t border-b-0 h-10 px-3 w-full focus:outline-none`},[(F(!0),I(P,null,Vi(k(l),e=>(F(),I(`option`,{value:e.id},E(e.name),9,cge))),256))],544),[[Bc,k(s)]]),z(k(_0).Root,{class:`relative`},{default:j(()=>[z(m,{class:`absolute left-3 top-2.5 text-zinc-500`}),z(k(_0).Input,{modelValue:k(o),"onUpdate:modelValue":d[2]||=e=>dn(o)?o.value=e:null,class:`w-full pr-3 pl-9 h-10 text-surface-500 rounded-b border border-zinc-300 focus:outline-none focus:ring focus:ring-zinc-700`,placeholder:`Search`},null,8,[`modelValue`])]),_:1})]),k(u)?(F(),I(`div`,lge,[z(b,{class:`w-6 h-6 animate-spin text-zinc-500`})])):(F(),I(`div`,uge,[(F(!0),I(P,null,Vi(k(h),e=>(F(),I(`button`,{type:`button`,class:ke([`flex justify-center p-3 border rounded text-zinc-500`,{"border-blue-300 bg-blue-50 hover:bg-blue-50":i.value===e.id,"hover:bg-zinc-100":i.value!==e.id}]),onClick:t=>v(e)},[R(`span`,{innerHTML:e.svg,class:`w-full`},null,8,fge)],10,dge))),256))]))]),R(`footer`,pge,[z(k(i_),{onClick:y},{default:j(()=>[B(E(k(t)(`Cancel`)),1)]),_:1}),z(k(D0).CloseTrigger,{"as-child":``},{default:j(()=>[z(k(i_),{variant:`primary`,disabled:!k(n)},{default:j(()=>[B(E(k(t)(`Select`)),1)]),_:1},8,[`disabled`])]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),hge={class:`flex items-center mb-4`},gge={key:0,class:`ms-2 text-sm font-medium text-gray-900`},b2=M({__name:`Checkbox`,props:Zi({label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`);return(n,r)=>(F(),I(`label`,hge,[rr(R(`input`,{type:`checkbox`,class:`w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2`,"onUpdate:modelValue":r[0]||=e=>t.value=e},null,512),[[Lc,t.value]]),e.label?(F(),I(`span`,gge,E(e.label),1)):V(``,!0)]))}}),_ge={class:`border rounded-lg overflow-hidden p-1 relative bg-white`},vge=[`src`],yge={class:`absolute bg-black/50 inset-0 flex items-center justify-center`},bge={class:`text-xs text-center truncate overflow-hidden max-w-full`},xge=M({__name:`ImagePreview`,props:{image:null,selected:{type:Boolean}},setup(e){return(t,n)=>{let r=b2;return F(),I(`div`,{class:ke([`group flex flex-col items-center justify-center p-3 gap-3 rounded-lg cursor-pointer hover:bg-neutral-100`,{"bg-neutral-100":e.selected,"pointer-events-none":e.image.uploading}])},[R(`div`,_ge,[R(`img`,{class:ke([`hover:bg-neutral-200 object-cover w-full aspect-square rounded`,{"bg-neutral-200":e.selected}]),src:e.image.url},null,10,vge),R(`div`,{class:ke([`absolute p-2 rounded-md inset-1 group-hover:block group-hover:bg-neutral-900/10`,{hidden:!e.selected}])},[z(r,{"model-value":e.selected},null,8,[`model-value`])],2),rr(R(`div`,yge,[...n[0]||=[R(`svg`,{class:`animate-spin h-5 w-5 text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`},[R(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),R(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})],-1)]],512),[[Ls,e.image.uploading]])]),R(`p`,bge,E(e.image.name),1)],2)}}}),Sge={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},Cge={key:0,class:`min-h-24 border border-dashed rounded flex flex-col items-center justify-center`},wge={key:1},Tge={class:`rounded-t p-3 bg-zinc-100 relative`},Ege=[`src`],Dge={class:`rounded-b p-3 bg-zinc-100 border-t border-white`},Oge={class:`flex-none h-12 border-b border-zinc-200 flex gap-3 px-4 items-center justify-between`},kge={class:`flex-1 flex flex-col gap-3 min-h-0 p-3 overflow-y-auto`},Age={class:`grid grid-cols-2 gap-3`},jge={class:`flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-zinc-200`},Mge=M({__name:`ImagePicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e=>{let t=RegExp(`^(https?:\\/\\/)?((localhost)|((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$`,`i`);return e.startsWith(`/`)||!!t.test(e)},{t:n}=gz(),{state:r}=cz(),{get:i,postFormData:a}=z0(),o=pX(),s=ya(e,`modelValue`,{set(e){return e?e.path:null},get(e){return e?{path:e,url:t(e)?e:window.editorConfig.imagesBaseUrl+`/`+e,name:e}:null}}),c=O(!1),l=O([]),u=O(),d=tY(t1,{id:`imagepicker`,accept:`image/*`,maxFiles:10,onFileAccept(e){if(e.files.length===0)return;l.value=e.files.map(e=>({url:URL.createObjectURL(e),path:e.name,name:e.name,uploading:!0}));let t=new FormData;e.files.forEach(e=>{t.append(`image[]`,e)}),m(t)}}),f=U(()=>e1(d,ZJ)),p=a(window.editorConfig.routes.uploadImage);p.onSuccess(e=>{r.images=[...e,...r.images],l.value=[],h(r.images[0]),f.value.clearFiles()}),p.onError(e=>{l.value=[],f.value.clearFiles(),o.ui.toast({type:`error`,title:n(`Failed to upload image`),description:e.message||e.toString()})});async function m(e){p.execute(e)}function h(e){s.value=e}function g(){s.value=u.value,c.value=!1}function _(){c.value=!1}function v(){s.value=null}let{data:y,execute:b}=i(window.editorConfig.routes.listImages);return pr(y,e=>{e&&(r.images=e)}),Ei(()=>{(!r.images||r.images.length===0)&&b()}),(t,i)=>{let a=q0,o=xge;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,Sge,E(e.field.label),1)):V(``,!0),z(k(D0).Root,{open:k(c),"onUpdate:open":i[0]||=e=>dn(c)?c.value=e:null,modal:!1,"close-on-interact-outside":!1,onOpenChange:i[1]||=e=>u.value=s.value||void 0},{default:j(()=>[s.value?(F(),I(`div`,wge,[R(`div`,Tge,[R(`img`,{src:s.value.url,alt:``,class:`object-cover h-32 w-full object-center`},null,8,Ege),R(`button`,{class:`absolute top-4 right-4 bg-zinc-700/30 text-zinc-200 p-px rounded`,onClick:v},[z(a,{class:`w-4 h-4`})])]),R(`div`,Dge,[z(k(D0).Trigger,{class:`text-sm w-full text-center bg-white border rounded py-1`},{default:j(()=>[B(E(k(n)(`Change image`)),1)]),_:1})])])):(F(),I(`div`,Cge,[z(k(D0).Trigger,{class:`text-blue-600 text-sm bg-zinc-200 rounded px-2.5 py-1.5 hover:bg-zinc-100 hover:text-blue-800`},{default:j(()=>[B(E(k(n)(`Select image`)),1)]),_:1})])),z(k(D0).Positioner,{class:`flex absolute inset-0 z-50 h-full w-full items-center justify-center`},{default:j(()=>[z(k(D0).Content,{class:`bg-white shadow flex flex-col w-full h-full overflow-hidden`},{default:j(()=>[R(`header`,Oge,[z(k(D0).Title,null,{default:j(()=>[B(E(e.field.label||k(n)(`Image Picker`)),1)]),_:1}),R(`button`,{onClick:g,class:`cursor-pointer rounded-lg p-0.5 text-zinc-700 hover:bg-zinc-300`},[z(a,{class:`w-5 h-5`})])]),R(`section`,kge,[R(`div`,H(k(f).getRootProps(),{accept:`image/*`}),[R(`div`,H(k(f).getDropzoneProps(),{class:`flex flex-col gap-3 items-center justify-center h-32 bg-zinc-50/50 border border-zinc-300 border-dashed rounded-lg`}),[R(`p`,null,E(k(n)(`Drop your images here`)),1),R(`button`,H(k(f).getTriggerProps(),{class:`cursor-pointer bg-blue-500 text-white shadow-lg rounded border px-2.5 py-1.5 text-sm`}),E(k(n)(`Add images`)),17)],16),R(`input`,Ae(Ro(k(f).getHiddenInputProps())),null,16)],16),R(`div`,Age,[(F(!0),I(P,null,Vi(k(l),e=>(F(),L(o,{key:e.path,image:e},null,8,[`image`]))),128)),(F(!0),I(P,null,Vi(k(r).images,e=>(F(),L(o,{key:e.path,image:e,selected:!!s.value&&s.value.path===e.path,onClick:t=>h(e)},null,8,[`image`,`selected`,`onClick`]))),128))])]),R(`footer`,jge,[z(k(i_),{onClick:g},{default:j(()=>[B(E(k(n)(`Cancel`)),1)]),_:1}),z(k(i_),{variant:`primary`,onClick:_},{default:j(()=>[B(E(k(n)(`Select`)),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),Nge={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Pge(e,t){return F(),I(`svg`,Nge,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M8 4h13v2H8zM5 3v3h1v1H3V6h1V4H3V3zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2zM8 11h13v2H8zm0 7h13v2H8z`},null,-1)]])}var Fge=D({name:`ri-list-ordered`,render:Pge}),Ige={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Lge(e,t){return F(),I(`svg`,Ige,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z`},null,-1)]])}var Rge=D({name:`ri-list-unordered`,render:Lge}),zge={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Bge(e,t){return F(),I(`svg`,zge,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M17 11V4h2v17h-2v-8H7v8H5V4h2v7z`},null,-1)]])}var Vge=D({name:`ri-heading`,render:Bge}),Hge={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Uge(e,t){return F(),I(`svg`,Hge,[...t[0]||=[R(`path`,{fill:`currentColor`,d:`M8 3v9a4 4 0 0 0 8 0V3h2v9a6 6 0 0 1-12 0V3zM4 20h16v2H4z`},null,-1)]])}var Wge=D({name:`ri-underline`,render:Uge}),Gge={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Kge(e,t){return F(),I(`svg`,Gge,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M5.248 20.246H9.05m0 0h3.696m-3.696 0l5.893-16.502m0 0h-3.697m3.697 0h3.803`},null,-1)]])}var qge=D({name:`heroicons-italic`,render:Kge}),Jge={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yge(e,t){return F(),I(`svg`,Jge,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25z`},null,-1)]])}var Xge=D({name:`heroicons-bold`,render:Yge});function x2(e){this.content=e}x2.prototype={constructor:x2,find:function(e){for(var t=0;t>1}},x2.from=function(e){if(e instanceof x2)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new x2(t)};function S2(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=S2(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function C2(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;ee&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);at)for(let e=0,a=0;at&&((an)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?T2(t+1,i):T2(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;ethis.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),n}};D2.none=[];var O2=class extends Error{},k2=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=j2(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(A2(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e($.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};k2.empty=new k2($.empty,0,0);function A2(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(A2(a.content,t-i-1,n-i-1)))}function j2(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),o=e.maybeChild(i);if(a==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=j2(o.content,t-a-1,n,o);return s&&e.replaceChild(i,o.copy(s))}function Zge(e,t,n){if(n.openStart>e.depth)throw new O2(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new O2(`Inconsistent open depths`);return M2(e,t,n,0)}function M2(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function I2(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(F2(e.nodeAfter,r),a++));for(let e=a;ei&&P2(e,t,i+1),o=r.depth>i&&P2(n,r,i+1),s=[];return I2(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(N2(a,o),F2(L2(a,R2(e,t,n,r,i+1)),s)):(a&&F2(L2(a,z2(e,t,i+1)),s),I2(t,n,i,s),o&&F2(L2(o,z2(n,r,i+1)),s)),I2(r,null,i,s),new $(s)}function z2(e,t,n){let r=[];return I2(null,e,n,r),e.depth>n&&F2(L2(P2(e,t,n+1),z2(e,t,n+1)),r),I2(t,null,n,r),new $(r)}function Qge(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy($.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var B2=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new H2(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=V2.get(t);if(r)for(let e=0;ee&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),W2(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=$.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;ee.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=$.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};U2.prototype.text=void 0;var n_e=class e extends U2{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):W2(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function W2(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var G2=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new r_e(t,n);if(r.next==null)return e.empty;let i=K2(r);r.next&&r.err(`Unexpected trailing text`);let a=u_e(l_e(i));return d_e(a,r),a}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n`+e.indexOf(t.next[n].next);return r}).join(` +`)}};G2.empty=new G2(!0);var r_e=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function K2(e){let t=[];do t.push(i_e(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function i_e(e){let t=[];do t.push(a_e(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function a_e(e){let t=c_e(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=o_e(e,t);else break;return t}function q2(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function o_e(e,t){let n=q2(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:q2(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function s_e(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function c_e(e){if(e.eat(`(`)){let t=K2(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=s_e(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function l_e(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new G2(r.indexOf(e.length-1)>-1);for(let e=0;e-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Z2(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new U2(this,this.computeAttrs(e),$.from(t),D2.setFrom(n))}createChecked(e=null,t,n){return t=$.from(t),this.checkContent(t),new U2(this,this.computeAttrs(e),t,D2.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=$.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore($.empty,!0);return i?new U2(this,e,t.append(i),D2.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function f_e(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var p_e=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?f_e(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},t4=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=$2(e,r.attrs),this.excluded=null;let i=X2(this.attrs);this.instance=i?new D2(this,i):null}create(e=null){return!e&&this.instance?this.instance:new D2(this,Z2(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t-1}},n4=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=x2.from(e.nodes),t.marks=x2.from(e.marks||{}),this.nodes=e4.compile(this.spec.nodes,this),this.marks=t4.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=G2.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?r4(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:r4(this,n.split(` `))}this.nodeFromJSON=e=>U2.fromJSON(this,e),this.markFromJSON=e=>D2.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof e4))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new n_e(n,n.defaultAttrs,e,D2.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function r4(e,t){let n=[];for(let r=0;r-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function m_e(e){return e.tag!=null}function h_e(e){return e.style!=null}var i4=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(m_e(e))this.tags.push(e);else if(h_e(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new f4(this,t,!1);return n.addAll(e,D2.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new f4(this,t,!0);return n.addAll(e,D2.none,t.from,t.to),k2.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;re.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r{n(e=p4(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=p4(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},a4={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},g_e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},o4={ol:!0,ul:!0},s4=1,c4=2,l4=4;function u4(e,t,n){return t==null?e&&e.whitespace==`pre`?s4|c4:n&~l4:(t?s4:0)|(t===`full`?c4:0)}var d4=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=D2.none,this.match=i||(a&l4?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore($.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&s4)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=$.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore($.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!a4.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},f4=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=u4(null,t.preserveWhitespace,0)|(n?l4:0);i=r?new d4(r.type,r.attrs,D2.none,!0,t.topMatch||r.type.contentMatch,a):n?new d4(null,null,D2.none,!0,null,a):new d4(e.schema.topNodeType,null,D2.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&c4?`full`:this.localPreserveWS||(r.options&s4)>0;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)n=i===`full`?n.replace(/\r\n?/g,` +`):n.replace(/\r?\n|\r/g,` `);else if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;o4.hasOwnProperty(a)&&this.parser.normalizeLists&&__e(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:g_e.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(a4.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` +`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e(a.type?a.type.allowsMarkType(t.type):m4(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new d4(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=s4);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function __e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&o4.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function v_e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function p4(e){let t={};for(let n in e)t[n]=e[n];return t}function m4(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n{if(i.length||e.marks.length){let n=0,a=0;for(;n=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&y4(_4(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return y4(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=g4(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return g4(e.marks)}};function g4(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function _4(e){return e.document||window.document}var v4=new WeakMap;function y_e(e){let t=v4.get(e);return t===void 0&&v4.set(e,t=b_e(e)),t}function b_e(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;iu)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else{let{dom:t,contentDOM:i}=y4(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var b4=65535,x4=2**16;function x_e(e,t){return e+t*x4}function S4(e){return e&b4}function S_e(e){return(e-(e&b4))/x4}var C4=1,w4=2,T4=4,E4=8,D4=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&E4)>0}get deletedBefore(){return(this.delInfo&(C4|T4))>0}get deletedAfter(){return(this.delInfo&(w4|T4))>0}get deletedAcross(){return(this.delInfo&T4)>0}},O4=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=S4(e);if(!this.inverted)for(let e=0;ee)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:x_e(o/3,e-s),f=e==s?w4:e==u?C4:T4;return(t<0?e!=s:e!=u)&&(f|=E4),new D4(a,f,d)}r+=l-c}return n?e+r:new D4(e+r,0,null)}touches(e,t){let n=0,r=S4(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;te)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;nn&&t!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return j4.fromReplace(e,this.from,this.to,i)}invert(){return new P4(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};A4.jsonID(`addMark`,N4);var P4=class e extends A4{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new k2(M4(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return j4.fromReplace(e,this.from,this.to,n)}invert(){return new N4(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};A4.jsonID(`removeMark`,P4);var F4=class e extends A4{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return j4.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return j4.fromReplace(e,this.pos,this.pos+1,new k2($.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;rr.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,k2.fromJSON(t,n.slice),n.insert,!!n.structure)}};A4.jsonID(`replaceAround`,R4);function z4(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function w_e(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;ee.step(t)),a.forEach(t=>e.step(t))}function T_e(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof t4){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;ee.step(new P4(t.from,t.to,t.style)))}function B4(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t=0;t--)e.step(o[t])}function E_e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function V4(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),a=e.$to.indexAfter(n);if(nn;e--)t||r.index(e)>0?(t=!0,u=$.from(r.node(e).copy(u)),d++):c--;let f=$.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=$.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new R4(i,a,i,a,new k2(r,0,0),n.length,!0))}function j_e(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&M_e(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&G4(e,t,n,a),B4(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new R4(c,l,c+1,l-1,new k2($.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&W4(e,t,n,a),!1}})}function W4(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function G4(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(` +`))}})}function M_e(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function N_e(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new R4(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new k2($.from(o),0,0),1,!0))}function K4(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function P_e(e,t,n=1,r){let i=e.doc.resolve(t),a=$.empty,o=$.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=$.from(i.node(e).copy(a));let t=r&&r[s];o=$.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new L4(t,t,new k2(a.append(o),n,n),!0))}function q4(e,t){let n=e.resolve(t),r=n.index();return J4(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function F_e(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&J4(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function I_e(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);G4(e,r.node(),r.before(),s)}o.inlineContent&&B4(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new L4(l,c.map(t+n,-1),k2.empty,!0)),r===!0){let t=e.doc.resolve(l);W4(e,t.node(),t.before(),e.steps.length)}return e}function L_e(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function X4(e,t,n=t,r=k2.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return Z4(i,a,r)?new L4(t,n,r):new z_e(i,a,r).fit()}function Z4(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var z_e=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=$.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=$.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new k2(i,a,o);return e>-1?new R4(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new L4(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=e3(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore($.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=e3(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new k2(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=e3(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new k2(Q4(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new k2(Q4(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e1||s==0||e.content.size)&&(u=t,l.push(t3(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=$4(this.placed,t,$.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t=0;n--){let{match:t,type:r}=this.frontier[n],i=n3(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=$4(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=$4(this.placed,this.depth,$.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore($.empty,!0);e.childCount&&(this.placed=$4(this.placed,this.frontier.length,e))}};function Q4(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Q4(e.firstChild.content,t-1,n)))}function $4(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy($4(e.lastChild.content,t-1,n)))}function e3(e,t){for(let n=0;n1&&(r=r.replaceChild(0,t3(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore($.empty,!0)))),e.copy(r)}function n3(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!B_e(n,a.content,o)?s:null}function B_e(e,t,n){for(let r=n;r0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=V_e(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function r3(e,t,n,r,i){if(tr){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore($.empty,!0))}return e}function U_e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=L_e(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new k2($.from(r),0,0))}function W_e(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),a=i3(r,i);for(let t=0;t0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function i3(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(rt.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var a3=class e extends A4{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return j4.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return j4.fromReplace(e,this.pos,this.pos+1,new k2($.from(r),0,+!t.isLeaf))}getMap(){return O4.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};A4.jsonID(`attr`,a3);var o3=class e extends A4{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return j4.ok(n)}getMap(){return O4.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};A4.jsonID(`docAttr`,o3);var s3=class extends Error{};s3=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},s3.prototype=Object.create(Error.prototype),s3.prototype.constructor=s3,s3.prototype.name=`TransformError`;var c3=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new C_e}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new s3(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=k2.empty){let r=X4(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new k2($.from(n),0,0))}delete(e,t){return this.replace(e,t,k2.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return H_e(this,e,t,n),this}replaceRangeWith(e,t,n){return U_e(this,e,t,n),this}deleteRange(e,t){return W_e(this,e,t),this}lift(e,t){return D_e(this,e,t),this}join(e,t=1){return I_e(this,e,t),this}wrap(e,t){return A_e(this,e,t),this}setBlockType(e,t=e,n,r=null){return j_e(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return N_e(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new a3(e,t,n)),this}setDocAttribute(e,t){return this.step(new o3(e,t)),this}addNodeMark(e,t){return this.step(new F4(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof D2)t.isInSet(n.marks)&&this.step(new I4(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new I4(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return P_e(this,e,t,n),this}addMark(e,t,n){return w_e(this,e,t,n),this}removeMark(e,t,n){return T_e(this,e,t,n),this}clearIncompatible(e,t,n){return B4(this,e,t,n),this}},l3=Object.create(null),u3=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new G_e(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;r--){let i=t<0?_3(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):_3(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new g3(e.node(0))}static atStart(e){return _3(e,e,0,0,1)||new g3(e)}static atEnd(e){return _3(e,e,e.content.size,e.childCount,-1)||new g3(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=l3[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in l3)throw RangeError(`Duplicate use of selection JSON ID `+e);return l3[e]=t,t.prototype.jsonID=e,t}getBookmark(){return p3.between(this.$anchor,this.$head).getBookmark()}};u3.prototype.visible=!0;var G_e=class{constructor(e,t){this.$from=e,this.$to=t}},d3=!1;function f3(e){!d3&&!e.parent.inlineContent&&(d3=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var p3=class e extends u3{constructor(e,t=e){f3(e),f3(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return u3.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=k2.empty){if(super.replace(e,t),t==k2.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new m3(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=u3.findFrom(n,r,!0)||u3.findFrom(n,-r,!0);if(e)n=e.$head;else return u3.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(u3.findFrom(t,-r,!0)||u3.findFrom(t,r,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=_3(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&h3.isSelectable(r))return h3.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function v3(e,t,n){let r=e.steps.length-1;if(r{o??=r}),e.setSelection(u3.near(e.doc.resolve(o),n))}var y3=1,b3=2,x3=4,J_e=class extends c3{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=b3,this}ensureMarks(e){return D2.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&b3)>0}addStep(e,t){super.addStep(e,t),this.updated&=~b3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||D2.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(u3.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=x3,this}get scrolledIntoView(){return(this.updated&x3)>0}};function S3(e,t){return!t||!e?e:e.bind(t)}var C3=class{constructor(e,t,n){this.name=e,this.init=S3(t.init,n),this.apply=S3(t.apply,n)}},Y_e=[new C3(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new C3(`selection`,{init(e,t){return e.selection||u3.atStart(t.doc)},apply(e){return e.selection}}),new C3(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new C3(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],w3=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Y_e.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new C3(e.key,e.spec.state,e))})}},X_e=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;ne.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new w3(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=U2.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=u3.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function T3(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=T3(i,t,{})),n[r]=i}return n}var E3=class{constructor(e){this.spec=e,this.props={},e.props&&T3(e.props,this,this.props),this.key=e.key?e.key.key:O3(`plugin`)}getState(e){return e[this.key]}},D3=Object.create(null);function O3(e){return e in D3?e+`$`+ ++D3[e]:(D3[e]=0,e+`$`)}var k3=class{constructor(e=`key`){this.key=O3(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},A3=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function j3(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var M3=(e,t,n)=>{let r=j3(e,n);if(!r)return!1;let i=I3(r);if(!i){let n=r.blockRange(),i=n&&V4(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(K3(e,i,t,-1))return!0;if(r.parent.content.size==0&&(P3(a,`end`)||h3.isSelectable(a)))for(let n=r.depth;;n--){let o=X4(e.doc,r.before(n),r.after(n),k2.empty);if(o&&o.slice.size1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},Z_e=(e,t,n)=>{let r=j3(e,n);if(!r)return!1;let i=I3(r);return i?N3(e,i,t):!1},Q_e=(e,t,n)=>{let r=L3(e,n);if(!r)return!1;let i=B3(r);return i?N3(e,i,t):!1};function N3(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=X4(e.doc,i,o,k2.empty);if(!s||s.from!=i||s instanceof L4&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(p3.create(t.doc,i)),n(t.scrollIntoView())}return!0}function P3(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var F3=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=I3(r)}let o=a&&a.nodeBefore;return!o||!h3.isSelectable(o)?!1:(t&&t(e.tr.setSelection(h3.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function I3(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function L3(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset{let r=L3(e,n);if(!r)return!1;let i=B3(r);if(!i)return!1;let a=i.nodeAfter;if(K3(e,i,t,1))return!0;if(r.parent.content.size==0&&(P3(a,`start`)||h3.isSelectable(a))){let n=X4(e.doc,r.before(),r.after(),k2.empty);if(n&&n.slice.size{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof h3,i;if(r){if(n.node.isTextblock||!q4(e.doc,n.from))return!1;i=n.from}else if(i=Y4(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(h3.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},eve=(e,t)=>{let n=e.selection,r;if(n instanceof h3){if(n.node.isTextblock||!q4(e.doc,n.to))return!1;r=n.to}else if(r=Y4(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},tve=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&V4(i);return a==null?!1:(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},V3=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function H3(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=H3(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(u3.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},W3=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof g3||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=H3(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(K4(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&V4(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function nve(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof h3&&t.selection.node.isBlock)return!r.parentOffset||!K4(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],o,s,c=!1,l=!1;for(let t=r.depth;;t--)if(r.node(t).isBlock){c=r.end(t)==r.pos+(r.depth-t),l=r.start(t)==r.pos-(r.depth-t),s=H3(r.node(t-1).contentMatchAt(r.indexAfter(t-1)));let n=e&&e(i.parent,c,r);a.unshift(n||(c&&s?{type:s}:null)),o=t;break}else{if(t==1)return!1;a.unshift(null)}let u=t.tr;(t.selection instanceof p3||t.selection instanceof g3)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=K4(u.doc,d,a.length,a);if(f||=(a[0]=s?{type:s}:null,K4(u.doc,d,a.length,a)),!f)return!1;if(u.split(d,a.length,a),!c&&l&&r.node(o).type!=s){let e=u.mapping.map(r.before(o)),t=u.doc.resolve(e);s&&r.node(o-1).canReplaceWith(t.index(),t.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(o)),s)}return n&&n(u.scrollIntoView()),!0}}var rve=nve(),ive=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection(h3.create(e.doc,i))),!0)},ave=(e,t)=>(t&&t(e.tr.setSelection(new g3(e.doc))),!0);function ove(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||q4(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function K3(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&ove(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=$.empty;for(let e=o.length-1;e>=0;e--)s=$.from(o[e].create(null,s));s=$.from(i.copy(s));let c=e.tr.step(new R4(t.pos-1,r,t.pos,r,new k2(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&q4(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:u3.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&V4(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&P3(a,`start`,!0)&&P3(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=$.empty;for(let e=o.length-1;e>=0;e--)r=$.from(o[e].copy(r));n(e.tr.step(new R4(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new k2(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function q3(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(p3.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var J3=q3(-1),Y3=q3(1);function sve(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&H4(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function X3(e,t=null){return function(n,r){let i=!1;for(let r=0;r{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new H2(e,e,t.depth),t.endIndex=0;e--)a=$.from(n[e].type.create(n[e].attrs,a));e.step(new R4(t.start-(r?2:0),t.end,t.start,t.end,new k2(a,0,0),n.length,!0));let o=0;for(let e=0;et.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?pve(t,n,e,a):mve(t,n,a):!0:!1}}function pve(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);aa;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?$.empty:$.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new R4(d-+!!s,f+ +!!c,d+1,f-1,new k2((s?$.empty:$.from(i.copy($.empty))).append(c?$.empty:$.from(i.copy($.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function hve(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(c.type!=e)return!1;if(n){let r=c.lastChild&&c.lastChild.type==s.type,i=$.from(r?e.create():null),o=new k2($.from(e.create(null,$.from(s.type.create(null,i)))),r?3:1,0),l=a.start,u=a.end;n(t.tr.step(new R4(l-(r?3:1),u,l,u,o,1,!0)).scrollIntoView())}return!0}}var t6=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},n6=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},r6=null,i6=function(e,t,n){let r=r6||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},gve=function(){r6=null},a6=function(e,t,n,r){return n&&(o6(e,t,n,r,-1)||o6(e,t,n,r,1))},_ve=/^(img|br|input|textarea|hr)$/i;function o6(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:s6(e))){let n=e.parentNode;if(!n||n.nodeType!=1||c6(e)||_ve.test(e.nodeName)||e.contentEditable==`false`)return!1;t=t6(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?s6(e):0}else return!1}}function s6(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function vve(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=s6(e)}else if(e.parentNode&&!c6(e))t=t6(e),e=e.parentNode;else return null}}function yve(e,t){for(;;){if(e.nodeType==3&&t2),T6=w6||(d6?/Mac/.test(d6.platform):!1),Cve=d6?/Win/.test(d6.platform):!1,E6=/Android \d/.test(p6),D6=!!f6&&`webkitFontSmoothing`in f6.documentElement.style,wve=D6?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Tve(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function O6(e,t){return typeof e==`number`?e:e[t]}function Eve(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function k6(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=n6(o);continue}let e=o,n=e==a.body,s=n?Tve(a):Eve(e),c=0,l=0;if(t.tops.bottom-O6(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+O6(i,`top`)-s.top:t.bottom-s.bottom+O6(i,`bottom`)),t.lefts.right-O6(r,`right`)&&(c=t.right-s.right+O6(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:n6(o)}}function Dve(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:A6(e.dom)}}function A6(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=n6(r));return t}function Ove({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;j6(n,r==0?0:r-t)}function j6(e,t){for(let n=0;n=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?Ave(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:N6(n,i)}function Ave(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i=(n.left+n.right)/2)}}return{node:e,offset:0}}function P6(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function jve(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function Nve(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right-1?i:e.docView.posFromDOM(t,n,-1)}function F6(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&i++}let n;D6&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=Nve(e,r,i,t))}s??=Mve(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function I6(e){return e.top=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,z6(L6(i6(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==s6(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return B6(e.getBoundingClientRect(),!1)}if(a==null&&i=0)}if(a==null&&i&&(n<0||i==s6(r))){let e=r.childNodes[i-1],t=e.nodeType==3?i6(e,s6(e)-+!o):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return z6(L6(t,1),!1)}if(a==null&&i=0)}function z6(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function B6(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function V6(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Ive(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return V6(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=R6(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=i6(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;ei.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var Lve=/[\u0590-\u08ac]/;function Rve(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!Lve.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:V6(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var H6=null,U6=null,W6=!1;function zve(e,t,n){return H6==t&&U6==n?W6:(H6=t,U6=n,W6=n==`up`||n==`down`?Ive(e,t,n):Rve(e,t,n))}var G6=0,K6=1,q6=2,J6=3,Y6=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=G6,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tt6(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;te||i instanceof t8){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof X6&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?t6(e.dom)+1:0}}else{let e,r=!0;for(;e=n=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=t6(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;es&&at){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r=n:en){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?q6:K6,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=J6:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?q6:J6}n=a}this.dirty=q6}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?q6:K6;t.dirty{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.contentEditable=`false`,a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==G6&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Bve=class extends Y6{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},Z6=class e extends Y6{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=h4.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&J6||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=J6&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=G6){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty0&&(a=u8(a,0,t,r));for(let e=0;e{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=h4.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=s8(u,r,n),l?c=new Vve(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new e8(t,n,r,i,u,f,a):new e(t,n,r,i,u,d||null,f,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(e.preserveWhitespace=`full`),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>$.empty)}return e}matchesNode(e,t,n){return this.dirty==G6&&e.eq(this.node)&&c8(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new Uve(this,a&&a.node,e);Kve(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?D2.none:this.node.child(i).marks,n,e),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==q6)&&(a&&this.protectLocalComposition(e,a),n8(this.contentDOM,this.children,e),w6&&qve(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof p3)||nt+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=Jve(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new Bve(this,i,t,r);e.input.compositionNodes.push(a),this.children=u8(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==J6||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=G6}updateOuterDeco(e){if(c8(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=o8(this.dom,this.nodeDOM,a8(this.outerDeco,this.node,t),a8(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function $6(e,t,n,r,i){s8(r,t,e);let a=new Q6(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var e8=class e extends Q6{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==J6||this.dirty!=G6&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=G6||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=G6,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=J6)}get domAtom(){return!1}isText(e){return this.node.text==e}},t8=class extends Y6{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==G6&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},Vve=class extends Q6{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,c,l),this.spec=s}update(e,t,n,r){if(this.dirty==J6)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function n8(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a>1,a=Math.min(i,e.length);for(;r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Z6.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof Z6)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Gve(e,t){return e.type.side-t.type.side}function Kve(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;na;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function qve(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Jve(e,t,n,r){for(let i=0,a=0;i=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function u8(e,t,n,r,i){let a=[];for(let o=0,s=0;o=n||u<=t?a.push(c):(ln&&a.push(c.slice(n-l,c.size,r)))}return a}function d8(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(l6(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&h3.isSelectable(e)&&i.parent&&!(e.isInline&&bve(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new h3(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!f8(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function Xve(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,t6(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&_6&&v6<=11&&(n.disabled=!0,n.disabled=!1)}function v8(e,t){if(t instanceof h3){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(y8(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else y8(e)}function y8(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function b8(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||p3.between(t,n,r)}function x8(e){return e.editable&&!e.hasFocus()?!1:S8(e)}function S8(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Zve(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return a6(t.node,t.offset,n.anchorNode,n.anchorOffset)}function C8(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&u3.findFrom(a,t)}function w8(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function T8(e,t,n){let r=e.state.selection;if(r instanceof p3){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return w8(e,new p3(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=C8(e.state,t);return n&&n instanceof h3?w8(e,n):!1}else if(!(T6&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?h3.isSelectable(i)?w8(e,new h3(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):D6?w8(e,new p3(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof h3&&r.node.isInline)return w8(e,new p3(t>0?r.$to:r.$from));else{let n=C8(e.state,t);return n?w8(e,n):!1}}function E8(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function D8(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function O8(e,t){return t<0?Qve(e):$ve(e)}function Qve(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(y6&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(D8(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(k8(n))break;else{let t=n.previousSibling;for(;t&&D8(t,-1);)i=n.parentNode,a=t6(t),t=t.previousSibling;if(t)n=t,r=E8(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?A8(e,n,r):i&&A8(e,i,a)}function $ve(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=E8(n),a,o;for(;;)if(r{e.state==i&&p8(e)},50)}function j8(e,t){let n=e.state.doc.resolve(t);if(!(x6||Cve)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i1)return n.leftr.top&&i1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function M8(e,t,n){let r=e.state.selection;if(r instanceof p3&&!r.empty||n.indexOf(`s`)>-1||T6&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=C8(e.state,t);if(n&&n instanceof h3)return w8(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof g3?u3.near(n,t):u3.findFrom(n,t);return o?w8(e,o):!1}return!1}function N8(e,t){if(!(e.state.selection instanceof p3))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function P8(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function nye(e){if(!C6||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;P8(e,n,`true`),setTimeout(()=>P8(e,n,`false`),20)}return!1}function rye(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function iye(e,t){let n=t.keyCode,r=rye(t);if(n==8||T6&&n==72&&r==`c`)return N8(e,-1)||O8(e,-1);if(n==46&&!t.shiftKey||T6&&n==68&&r==`c`)return N8(e,1)||O8(e,1);if(n==13||n==27)return!0;if(n==37||T6&&n==66&&r==`c`){let t=n==37?j8(e,e.state.selection.from)==`ltr`?-1:1:-1;return T8(e,t,r)||O8(e,t)}else if(n==39||T6&&n==70&&r==`c`){let t=n==39?j8(e,e.state.selection.from)==`ltr`?1:-1:1;return T8(e,t,r)||O8(e,t)}else if(n==38||T6&&n==80&&r==`c`)return M8(e,-1,r)||O8(e,-1);else if(n==40||T6&&n==78&&r==`c`)return nye(e)||M8(e,1,r)||O8(e,1);else if(r==(T6?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function F8(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||h4.fromSchema(e.state.schema),s=U8(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=H8[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,` + +`),slice:t}}function I8(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new k2($.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=h4.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=lye(n),D6&&uye(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||i4.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!aye.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=dye(V8(s,+u[1],+u[2]),u[4]);else if(s=k2.maxOpen(oye(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e{s=t(s,e,c)}),s}var aye=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function oye(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&R8(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=z8(a[a.length-1],i.length));let n=L8(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return $.from(a)}return e}function L8(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,$.from(e));return e}function R8(e,t,n,r,i){if(i1&&(a=0),i=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore($.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function V8(e,t,n){return te}),W8.createHTML(e)):e}function lye(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=U8().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&H8[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>``).reverse().join(``)),n.innerHTML=cye(e),i)for(let e=0;e=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=$.from(t.create(r[e+1],i)),a++,o++}return new k2(i,a,o)}var G8={},K8={},fye={touchstart:!0,touchmove:!0},pye=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function mye(e){for(let t in G8){let n=G8[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{gye(e,t)&&!Y8(e,t)&&(e.editable||!(t.type in K8))&&n(e,t)},fye[t]?{passive:!0}:void 0)}C6&&e.dom.addEventListener(`input`,()=>null),J8(e)}function q8(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function hye(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function J8(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>Y8(e,t))})}function Y8(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function gye(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function _ye(e,t){!Y8(e,t)&&G8[t.type]&&(e.editable||!(t.type in K8))&&G8[t.type](e,t)}K8.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!t5(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(E6&&x6&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),w6&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,u6(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||iye(e,n)?n.preventDefault():q8(e,`key`)},K8.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},K8.keypress=(e,t)=>{let n=t;if(t5(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||T6&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof p3)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function X8(e){return{left:e.clientX,top:e.clientY}}function vye(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Z8(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function Q8(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function yye(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&h3.isSelectable(r)?(Q8(e,new h3(n),`pointer`),!0):!1}function bye(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof h3&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(h3.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(Q8(e,h3.create(e.state.doc,i),`pointer`),!0)}function xye(e,t,n,r,i){return Z8(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?bye(e,n):yye(e,n))}function Sye(e,t,n,r){return Z8(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function Cye(e,t,n,r){return Z8(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||wye(e,n,r)}function wye(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Q8(e,p3.create(r,0,r.content.size),`pointer`),!0):!1;let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),a=i.before(t);if(n.inlineContent)Q8(e,p3.create(r,a+1,a+1+n.content.size),`pointer`);else if(h3.isSelectable(n))Q8(e,h3.create(r,a),`pointer`);else continue;return!0}}function $8(e){return i5(e)}var e5=T6?`metaKey`:`ctrlKey`;G8.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=$8(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&vye(n,e.input.lastClick)&&!n[e5]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button};let o=e.posAtCoords(X8(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Tye(e,o,n,!!r)):(a==`doubleClick`?Sye:Cye)(e,o.pos,o.inside,n)?n.preventDefault():q8(e,`pointer`))};var Tye=class{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[e5],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof h3&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&y6&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this)),q8(e,`pointer`)}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>p8(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(X8(e))),this.updateAllowDefault(e),this.allowDefault||!t?q8(this.view,`pointer`):xye(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||C6&&this.mightDrag&&!this.mightDrag.node.isAtom||x6&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Q8(this.view,u3.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):q8(this.view,`pointer`)}move(e){this.updateAllowDefault(e),q8(this.view,`pointer`),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};G8.touchstart=e=>{e.input.lastTouch=Date.now(),$8(e),q8(e,`pointer`)},G8.touchmove=e=>{e.input.lastTouch=Date.now(),q8(e,`pointer`)},G8.contextmenu=e=>$8(e);function t5(e,t){return e.composing?!0:C6&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var Eye=E6?5e3:-1;K8.compositionstart=K8.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof p3&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),i5(e,!0),e.markCursor=null;else if(i5(e,!t.selection.empty),y6&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}n5(e,Eye)},K8.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,n5(e,20))};function n5(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>i5(e),t))}function r5(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Oye());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Dye(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=vve(t.focusNode,t.focusOffset),r=yve(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function Oye(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function i5(e,t=!1){if(!(E6&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),r5(e),t||e.docView&&e.docView.dirty){let n=d8(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function kye(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var a5=_6&&v6<15||w6&&wve<604;G8.copy=K8.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=a5?null:n.clipboardData,{dom:o,text:s}=F8(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):kye(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function Aye(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function jye(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?o5(e,r.value,null,i,t):o5(e,r.textContent,r.innerHTML,i,t)},50)}function o5(e,t,n,r,i){let a=I8(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||k2.empty)))return!0;if(!a)return!1;let o=Aye(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function s5(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}K8.paste=(e,t)=>{let n=t;if(e.composing&&!E6)return;let r=a5?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&o5(e,s5(r),r.getData(`text/html`),i,n)?n.preventDefault():jye(e,n)};var c5=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},Mye=T6?`altKey`:`ctrlKey`;function l5(e,t){return e.someProp(`dragCopies`,e=>!e(t))??!t[Mye]}G8.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(X8(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof h3?i.to-1:i.to))){if(r&&r.mightDrag)o=h3.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=h3.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=F8(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!x6||S6>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(a5?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,a5||n.dataTransfer.setData(`text/plain`,c),e.dragging=new c5(l,l5(e,n),o)},G8.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},K8.dragover=K8.dragenter=(e,t)=>t.preventDefault(),K8.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(X8(n));if(!i)return;let a=e.state.doc.resolve(i.pos),o=r&&r.slice;o?e.someProp(`transformPasted`,t=>{o=t(o,e,!1)}):o=I8(e,s5(n.dataTransfer),a5?null:n.dataTransfer.getData(`text/html`),!1,a);let s=!!(r&&l5(e,n));if(e.someProp(`handleDrop`,t=>t(e,n,o||k2.empty,s))){n.preventDefault();return}if(!o)return;n.preventDefault();let c=o?R_e(e.state.doc,a.pos,o):a.pos;c??=a.pos;let l=e.state.tr;if(s){let{node:e}=r;e?e.replace(l):l.deleteSelection()}let u=l.mapping.map(c),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=l.doc;if(d?l.replaceRangeWith(u,u,o.content.firstChild):l.replaceRange(u,u,o),l.doc.eq(f))return;let p=l.doc.resolve(u);if(d&&h3.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new h3(p));else{let t=l.mapping.map(c);l.mapping.maps[l.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),l.setSelection(b8(e,p,l.doc.resolve(t)))}e.focus(),e.dispatch(l.setMeta(`uiEvent`,`drop`))},G8.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&p8(e)},20))},G8.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},G8.beforeinput=(e,t)=>{if(x6&&E6&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,u6(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in K8)G8[e]=K8[e];function u5(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var d5=class e{constructor(e,t){this.toDOM=e,this.spec=t||h5,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new p5(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&u5(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},f5=class e{constructor(e,t){this.attrs=e,this.spec=t||h5}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new p5(i,a,this)}valid(e,t){return t.from=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;ae){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==_5||e.maps.length==0?this:this.mapInner(e,t,0,0,n||h5)}mapInner(t,n,r,i,a){let o;for(let e=0;e{let o=t+r,s;if(s=b5(n,e,o)){for(i||=this.children.slice();aa&&n.to=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;ea&&t.type instanceof f5){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;ee.map(t,n,h5));return e.from(r)}forChild(t,n){if(n.isLeaf)return g5.empty;let r=[];for(let i=0;ie instanceof g5)?t:t.reduce((e,t)=>e.concat(t instanceof g5?t:t.members),[]))}}forEachSet(e){for(let t=0;t{let o=a-i-(n-e);for(let i=0;ia+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==_5?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=S5(Fye(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;en&&a.to{let s=b5(e,t,o+n);if(s){a=!0;let e=S5(s,t,n+o+1,r);e!=_5&&i.push(o,o+t.nodeSize,e)}});let o=y5(a?x5(e):e,-n).sort(C5);for(let e=0;e0;)t++;e.splice(t,0,n)}function E5(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=_5&&t.push(r)}),e.cursorWrapper&&t.push(g5.create(e.state.doc,[e.cursorWrapper.deco])),v5.from(t)}var Iye={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Lye=_6&&v6<=11,Rye=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},zye=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Rye,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;te.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),Lye&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Iye)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(x8(this.view)){if(this.suppressingSelectionUpdates)return p8(this.view);if(_6&&v6<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&a6(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=n6(n))t.add(n);for(let r=e.anchorNode;r;r=n6(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&x8(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;ee.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||Hye(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||r)&&(i>-1&&(e.docView.markDirty(i,a),Bye(e)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||p8(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;ni;e--){let t=r.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp(`domParser`)||i4.fromSchema(e.state.schema),p=d.resolve(o),m=null,h=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:a,preserveWhitespace:p.parent.type.whitespace==`pre`?`full`:!0,findPositions:l,ruleFromNode:Wye,context:p});if(l&&l[0].pos!=null){let e=l[0].pos,t=l[1]&&l[1].pos;t??=e,m={anchor:e+o,head:t+o}}return{doc:h,sel:m,from:o,to:s}}function Wye(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName==`BR`&&e.parentNode){if(C6&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(e.parentNode.lastChild==e||C6&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName==`IMG`&&e.getAttribute(`mark-placeholder`))return{ignore:!0};return null}var Gye=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Kye(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=d8(e,t);if(n&&!e.state.selection.eq(n)){if(x6&&E6&&e.input.lastKeyCode===13&&Date.now()-100t(e,u6(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=Uye(e,t,n),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||E6)&&i.some(e=>e.nodeType==1&&!Gye.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,u6(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof p3&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=A5(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.frome.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),_6&&v6<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((w6&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.post(e,u6(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Jye(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,u6(8,`Backspace`)))){E6&&x6&&e.domObserver.suppressSelectionUpdates();return}x6&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),E6&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,u6(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=A5(e,n.doc,l.sel);t&&!(x6&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDeletep8(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=qye(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}}else e.dispatch(x())}function A5(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:b8(e,t.resolve(n.anchor),t.resolve(n.head))}function qye(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;ee.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;en||j5(o,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function Yye(e,t,n,r,i){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(i==`end`){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o=o?a-r:0;a-=e,a&&a=s?a-r:0;a-=t,a&&a=56320&&t<=57343&&n>=55296&&n<=56319}var N5=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new pye,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(R5),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=I5(this),F5(this),this.nodeViews=L5(this),this.docView=$6(this.state.doc,P5(this),E5(this),this.dom,this),this.domObserver=new zye(this,(e,t,n,r)=>Kye(this,e,t,n,r)),this.domObserver.start(),mye(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&J8(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(R5),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(r5(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=L5(this);Zye(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&J8(this),this.editable=I5(this),F5(this);let o=E5(this),s=P5(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&Dve(this);if(i){this.domObserver.stop();let t=l&&(_6||x6)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&Xye(n.selection,e.selection);if(l){let n=x6?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Dye(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=$6(e.doc,s,o,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Zve(this))?p8(this,t):(v8(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&Ove(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof h3){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&k6(this,t.getBoundingClientRect(),e)}else k6(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new c5(e.slice,e.move,r<0?void 0:h3.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;ne.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Pve(this,e)}coordsAtPos(e,t=1){return R6(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return zve(this,t||this.state,e)}pasteHTML(e,t){return o5(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return o5(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return F8(this,e)}destroy(){this.docView&&(hye(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],E5(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,gve())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return _ye(this,e)}domSelectionRange(){let e=this.domSelection();return e?C6&&this.root.nodeType===11&&xve(this.dom.ownerDocument)==this.dom&&Vye(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};N5.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function P5(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[p5.node(0,e.state.doc.content.size,t)]}function F5(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:p5.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function I5(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function Xye(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function L5(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function Zye(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function R5(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var z5={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},B5={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Qye=typeof navigator<`u`&&/Mac/.test(navigator.platform),$ye=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),V5=0;V5<10;V5++)z5[48+V5]=z5[96+V5]=String(V5);for(var V5=1;V5<=24;V5++)z5[V5+111]=`F`+V5;for(var V5=65;V5<=90;V5++)z5[V5]=String.fromCharCode(V5+32),B5[V5]=String.fromCharCode(V5);for(var H5 in z5)B5.hasOwnProperty(H5)||(B5[H5]=z5[H5]);function ebe(e){var t=!(Qye&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||$ye&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?B5:z5)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var tbe=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),nbe=typeof navigator<`u`&&/Win/.test(navigator.platform);function rbe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e{for(var n in t)sbe(e,n,{get:t[n],enumerable:!0})};function G5(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var K5=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:G5({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},q5={};W5(q5,{blur:()=>cbe,clearContent:()=>lbe,clearNodes:()=>ube,command:()=>dbe,createParagraphNear:()=>fbe,cut:()=>pbe,deleteCurrentNode:()=>mbe,deleteNode:()=>hbe,deleteRange:()=>gbe,deleteSelection:()=>_be,enter:()=>vbe,exitCode:()=>ybe,extendMarkRange:()=>bbe,first:()=>xbe,focus:()=>Cbe,forEach:()=>wbe,insertContent:()=>Tbe,insertContentAt:()=>Obe,joinBackward:()=>jbe,joinDown:()=>Abe,joinForward:()=>Mbe,joinItemBackward:()=>Nbe,joinItemForward:()=>Pbe,joinTextblockBackward:()=>Fbe,joinTextblockForward:()=>Ibe,joinUp:()=>kbe,keyboardShortcut:()=>Rbe,lift:()=>zbe,liftEmptyBlock:()=>Bbe,liftListItem:()=>Vbe,newlineInCode:()=>Hbe,resetAttributes:()=>Ube,scrollIntoView:()=>Wbe,selectAll:()=>Gbe,selectNodeBackward:()=>Kbe,selectNodeForward:()=>qbe,selectParentNode:()=>Jbe,selectTextblockEnd:()=>Ybe,selectTextblockStart:()=>Xbe,setContent:()=>Zbe,setMark:()=>bxe,setMeta:()=>xxe,setNode:()=>Sxe,setNodeSelection:()=>Cxe,setTextDirection:()=>wxe,setTextSelection:()=>Txe,sinkListItem:()=>Exe,splitBlock:()=>Dxe,splitListItem:()=>Oxe,toggleList:()=>Axe,toggleMark:()=>jxe,toggleNode:()=>Mxe,toggleWrap:()=>Nxe,undoInputRule:()=>Pxe,unsetAllMarks:()=>Fxe,unsetMark:()=>Ixe,unsetTextDirection:()=>Lxe,updateAttributes:()=>Rxe,wrapIn:()=>zxe,wrapInList:()=>Bxe});var cbe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),lbe=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),ube=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=V4(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},dbe=e=>t=>e(t),fbe=()=>({state:e,dispatch:t})=>W3(e,t),pbe=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new p3(r.doc.resolve(Math.max(o-1,0)))),!0},mbe=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function J5(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var hbe=e=>({tr:t,state:n,dispatch:r})=>{let i=J5(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},gbe=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},_be=()=>({state:e,dispatch:t})=>A3(e,t),vbe=()=>({commands:e})=>e.keyboardShortcut(`Enter`),ybe=()=>({state:e,dispatch:t})=>U3(e,t);function Y5(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function X5(e,t,n={strict:!0}){let r=Object.keys(t);return r.length?r.every(r=>n.strict?t[r]===e[r]:Y5(t[r])?t[r].test(e[r]):t[r]===e[r]):!0}function Z5(e,t,n={}){return e.find(e=>e.type===t&&X5(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function Q5(e,t,n={}){return!!Z5(e,t,n)}function $5(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if((!r.node||!r.node.marks.some(e=>e.type===t))&&(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!Z5([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&Q5([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o({tr:n,state:r,dispatch:i})=>{let a=e7(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=$5(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=p3.create(o,e.from,e.to);n.setSelection(t)}}return!0},xbe=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(a7()||i7())&&r.dom.focus(),Sbe()&&!a7()&&!i7()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!t7(n.state.selection))return o(),!0;let s=r7(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},wbe=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),Tbe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),o7=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&o7(r)}return e};function s7(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`${e}`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return o7(n)}function c7(e,t,n){if(e instanceof U2||e instanceof $)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e==`object`&&!!e,i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return $.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),c7(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new n4({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?i4.fromSchema(a).parseSlice(s7(e),n.parseOptions):i4.fromSchema(a).parse(s7(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=i4.fromSchema(t);return n.slice?r.parseSlice(s7(e),n.parseOptions).content:r.parse(s7(e),n.parseOptions)}return c7(``,t,n)}function Ebe(e,t,n){let r=e.steps.length-1;if(r{o===0&&(o=r)}),e.setSelection(u3.near(e.doc.resolve(o),n))}var Dbe=e=>!(`type`in e),Obe=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{c7(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=c7(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((Dbe(i)?i:[i]).forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let f;if(u){if(Array.isArray(t))f=t.map(e=>e.text||``).join(``);else if(t instanceof $){let e=``;t.forEach(t=>{t.text&&(e+=t.text)}),f=e}else f=typeof t==`object`&&t&&t.text?t.text:t;r.insertText(f,c,l)}else{f=i;let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,a=t.isText||t.isTextblock,o=t.content.size>0;n&&a&&o&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&Ebe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:f}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:f})}return!0},kbe=()=>({state:e,dispatch:t})=>$_e(e,t),Abe=()=>({state:e,dispatch:t})=>eve(e,t),jbe=()=>({state:e,dispatch:t})=>M3(e,t),Mbe=()=>({state:e,dispatch:t})=>R3(e,t),Nbe=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Y4(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Pbe=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Y4(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Fbe=()=>({state:e,dispatch:t})=>Z_e(e,t),Ibe=()=>({state:e,dispatch:t})=>Q_e(e,t);function l7(){return typeof navigator<`u`?/Mac/.test(navigator.platform):!1}function Lbe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e({editor:t,view:n,tr:r,dispatch:i})=>{let a=Lbe(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function u7(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?J5(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>o?o.name===e.node.type.name:!0).filter(e=>X5(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var zbe=(e,t={})=>({state:n,dispatch:r})=>u7(n,J5(e,n.schema),t)?tve(n,r):!1,Bbe=()=>({state:e,dispatch:t})=>G3(e,t),Vbe=e=>({state:t,dispatch:n})=>fve(J5(e,t.schema))(t,n),Hbe=()=>({state:e,dispatch:t})=>V3(e,t);function d7(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function f7(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var Ube=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=d7(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=J5(e,r.schema)),s===`mark`&&(o=e7(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,f7(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(f7(a.attrs,t))))})})}),c},Wbe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Gbe=()=>({tr:e,dispatch:t})=>{if(t){let t=new g3(e.doc);e.setSelection(t)}return!0},Kbe=()=>({state:e,dispatch:t})=>F3(e,t),qbe=()=>({state:e,dispatch:t})=>z3(e,t),Jbe=()=>({state:e,dispatch:t})=>ive(e,t),Ybe=()=>({state:e,dispatch:t})=>Y3(e,t),Xbe=()=>({state:e,dispatch:t})=>J3(e,t);function p7(e,t,n={},r={}){return c7(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var Zbe=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=p7(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});return o&&a.replaceWith(0,c.content.size,s).setMeta(`preventUpdate`,!n),!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function m7(e,t){let n=e7(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function Qbe(e,t){let n=new c3(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function $be(e){for(let t=0;t0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function h7(e){return t=>exe(t.$from,e)}function g7(e,t,n){return e.config[t]===void 0&&e.parent?g7(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?g7(e.parent,t,n):null}):e.config[t]}function _7(e){return e.map(e=>{let t=g7(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,..._7(t())]:e}).flat(10)}function v7(e,t){let n=h4.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function y7(e){return typeof e==`function`}function b7(e,t=void 0,...n){return y7(e)?t?e.bind(t)(...n):e(...n):e}function txe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function x7(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function S7(e){let t=[],{nodeExtensions:n,markExtensions:r}=x7(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=g7(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=g7(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function nxe(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}return n&&t.push(n),t}function C7(e){let t=[],n=nxe(e||``),r=n.length;for(let e=0;e!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...C7(n[e]),...C7(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function T7(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>w7(e,t),{})}function rxe(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`?!0:e===`false`?!1:e:e}function E7(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):rxe(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function D7(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&txe(t)?!1:t!=null))}function O7(e){let t={};return!e?.attribute?.isRequired&&`default`in(e?.attribute||{})&&(t.default=e.attribute.default),e?.attribute?.validate!==void 0&&(t.validate=e.attribute.validate),[e.name,t]}function ixe(e,t){let n=S7(e),{nodeExtensions:r,markExtensions:i}=x7(e);return new n4({topNode:r.find(e=>g7(e,`topNode`))?.name,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=D7({...e.reduce((e,t)=>{let n=g7(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:b7(g7(r,`content`,a)),marks:b7(g7(r,`marks`,a)),group:b7(g7(r,`group`,a)),inline:b7(g7(r,`inline`,a)),atom:b7(g7(r,`atom`,a)),selectable:b7(g7(r,`selectable`,a)),draggable:b7(g7(r,`draggable`,a)),code:b7(g7(r,`code`,a)),whitespace:b7(g7(r,`whitespace`,a)),linebreakReplacement:b7(g7(r,`linebreakReplacement`,a)),defining:b7(g7(r,`defining`,a)),isolating:b7(g7(r,`isolating`,a)),attrs:Object.fromEntries(i.map(O7))}),s=b7(g7(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>E7(e,i)));let c=g7(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:T7(e,i)}));let l=g7(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=D7({...e.reduce((e,t)=>{let n=g7(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:b7(g7(r,`inclusive`,a)),excludes:b7(g7(r,`excludes`,a)),group:b7(g7(r,`group`,a)),spanning:b7(g7(r,`spanning`,a)),code:b7(g7(r,`code`,a)),attrs:Object.fromEntries(i.map(O7))}),s=b7(g7(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>E7(e,i)));let c=g7(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:T7(e,i)})),[r.name,o]}))})}function axe(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function k7(e){return e.sort((e,t)=>{let n=g7(e,`priority`)||100,r=g7(t,`priority`)||100;return n>r?-1:+(ne.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function j7(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=` + +`,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;e.isText&&(s+=(e?.text)?.slice(Math.max(r,n)-n,i-n))}),s}function oxe(e,t){return j7(e,{from:0,to:e.content.size},t)}function M7(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function sxe(e,t){let n=J5(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function cxe(e,t){let n=d7(typeof t==`string`?t:t.name,e.schema);return n===`node`?sxe(e,t):n===`mark`?m7(e,t):{}}function lxe(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function uxe(e){let t=lxe(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function dxe(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),uxe(r)}function N7(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=$5(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{!e||e?.nodeSize===void 0||r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var fxe=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]};function P7(e,t){return t.nodes[e]||t.marks[e]||null}function F7(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var pxe=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function I7(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?e7(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>a?a.name===e.type.name:!0).find(e=>X5(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>a?a.name===e.mark.type.name:!0).filter(e=>X5(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>a?e.mark.type!==a&&e.mark.type.excludes(a):!0).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function mxe(e,t,n={}){if(!t)return u7(e,null,n)||I7(e,null,n);let r=d7(t,e.schema);return r===`node`?u7(e,t,n):r===`mark`?I7(e,t,n):!1}var hxe=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=h7(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function L7(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function R7(e,t){let{nodeExtensions:n}=x7(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=b7(g7(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`?i.split(` `).includes(`list`):!1}function z7(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(z7(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}var B7=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function _xe(e,t){let n=t.mapping.mapResult(e.position);return{position:new B7(n.pos),mapResult:n}}function vxe(e){return new B7(e)}function yxe(e,t,n){let{selection:r}=t,i=null;if(t7(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var bxe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=e7(e,r.schema);if(i)if(o){let e=m7(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})});return yxe(r,n,c)},xxe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Sxe=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=J5(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>X3(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>X3(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},Cxe=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=n7(e,0,n.content.size),i=h3.create(n,r);t.setSelection(i)}return!0},wxe=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},Txe=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=p3.atStart(n).from,o=p3.atEnd(n).to,s=n7(r,a,o),c=n7(i,a,o),l=p3.create(n,s,c);t.setSelection(l)}return!0},Exe=e=>({state:t,dispatch:n})=>hve(J5(e,t.schema))(t,n);function V7(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var Dxe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=F7(l,s.node().type.name,s.node().attrs);if(a instanceof h3&&a.node.isBlock)return!s.parentOffset||!K4(o,s.pos)?!1:(r&&(e&&V7(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:$be(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=K4(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&K4(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof p3&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&V7(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},Oxe=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=J5(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=$.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=$.from(s.node(t).copy(e));let i=s.indexAfter(-1){if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(p3.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...F7(d,u.type.name,u.attrs),...t},m={...F7(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!K4(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0},H7=(e,t)=>{let n=h7(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&q4(e.doc,n.pos)&&e.join(n.pos),!0},U7=(e,t)=>{let n=h7(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&q4(e.doc,r)&&e.join(r),!0};function kxe(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return p3.between(r,i)}var Axe=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=J5(e,o.schema),m=J5(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=h7(e=>R7(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,ee=C.length===1?C[0]:null,te=S&&ee&&R7(ee.type.name,d)?{node:ee,pos:0,depth:0}:null,w=x??te,T=!!x&&y.depth>=1&&y.depth-x.depth<=1,ne=!!te;if((T||ne)&&w){if(w.node.type===p)return S&&ne?c().command(({tr:e,dispatch:t})=>{let n=kxe(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(R7(w.node.type.name,d)&&p.validContent(w.node.content))return c().command(()=>(a.setNodeMarkup(w.pos,p),!0)).command(()=>H7(a,p)).command(()=>U7(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>H7(a,p)).command(()=>U7(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>H7(a,p)).command(()=>U7(a,p)).run()},jxe=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=e7(e,r.schema);return I7(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},Mxe=(e,t,n={})=>({state:r,commands:i})=>{let a=J5(e,r.schema),o=J5(t,r.schema),s=u7(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},Nxe=(e,t={})=>({state:n,commands:r})=>{let i=J5(e,n.schema);return u7(n,i,t)?r.lift(i):r.wrapIn(i,t)},Pxe=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},Fxe=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},Ixe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=e7(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=$5(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},Lxe=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},Rxe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=d7(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=J5(e,r.schema)),s===`mark`&&(o=e7(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},zxe=(e,t={})=>({state:n,dispatch:r})=>sve(J5(e,n.schema),t)(n,r),Bxe=(e,t={})=>({state:n,dispatch:r})=>lve(J5(e,n.schema),t)(n,r),Vxe=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},W7=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},Hxe=(e,t)=>{if(Y5(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function G7(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=pxe(c)+i;return a.forEach(e=>{if(l)return;let a=Hxe(u,e.find);if(!a)return;let c=s.state.tr,d=G5({state:s.state,transaction:c}),f={from:n-(a[0].length-i.length),to:r},{commands:p,chain:m,can:h}=new K5({editor:t,state:d});e.handler({state:d,range:f,match:a,commands:p,chain:m,can:h})===null||!c.steps.length||(e.undoable&&c.setMeta(o,{transform:c,from:n,to:r,text:i}),s.dispatch(c),l=!0)}),l}function Uxe(e){let{editor:t,rules:n}=e,r=new E3({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:v7($.from(e),a.schema);let{from:i}=s;G7({editor:t,from:i,to:i+e.length,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return G7({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&G7({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?G7({editor:t,from:a.pos,to:a.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Wxe(e){return Object.prototype.toString.call(e).slice(8,-1)}function K7(e){return Wxe(e)===`Object`?e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype:!1}function q7(e,t){let n={...e};return K7(e)&&K7(t)&&Object.keys(t).forEach(r=>{K7(t[r])&&K7(e[r])?n[r]=q7(e[r],t[r]):n[r]=t[r]}),n}var J7=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...b7(g7(this,`addOptions`,{name:this.name}))||{}}}get storage(){return{...b7(g7(this,`addStorage`,{name:this.name,options:this.options}))||{}}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>q7(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},Y7=class e extends J7{constructor(){super(...arguments),this.type=`mark`}static create(t={}){return new e(typeof t==`function`?t():t)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function Gxe(e){return typeof e==`number`}var Kxe=class{constructor(e){this.find=e.find,this.handler=e.handler}},qxe=(e,t,n)=>{if(Y5(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function Jxe(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new K5({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{if(e.type?.spec?.code||!(e.isText||e.isTextblock||e.isInline))return;let f=e.content?.size??e.nodeSize??0,p=Math.max(r,t),m=Math.min(i,t+f);p>=m||qxe(e.isText?e.text||``:e.textBetween(p-t,m-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=p+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var X7=null,Yxe=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function Xxe(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr;if(!(!Jxe({editor:t,state:G5({state:e,transaction:c}),from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})||!c.steps.length)){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return n.map(e=>new E3({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(X7=t)},i=()=>{X7&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=X7;e?.isEditable&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:v7($.from(t),r.schema);let{from:n}=d,i=n+t.length,a=Yxe(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(!(!Gxe(p)||!m||p===m.b))return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var Z7=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=A7(e),this.schema=ixe(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=g7(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:P7(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this;return k7([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:P7(t.name,this.schema)},r=[],i=g7(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&g7(t,`exitable`,n)&&(a.ArrowRight=()=>Y7.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=abe(a);r.push(o);let s=g7(t,`addInputRules`,n);if(L7(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=Uxe({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=g7(t,`addPasteRules`,n);if(L7(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=Xxe({editor:e,rules:t});r.push(...n)}}let l=g7(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r})}get attributes(){return S7(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=x7(this.extensions);return Object.fromEntries(t.filter(e=>!!g7(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=g7(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:J5(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:T7(r,n)})]:[]}))}dispatchTransaction(e){let{editor:t}=this;return k7([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:P7(n.name,this.schema)},i=g7(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return k7([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:P7(n.name,this.schema)},i=g7(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=x7(this.extensions);return Object.fromEntries(t.filter(e=>!!g7(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=g7(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:e7(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=T7(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{sSe(i,e,t)}})}]:[]}))}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:P7(e.name,this.schema)};e.type===`mark`&&(b7(g7(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name);let n=g7(e,`onBeforeCreate`,t),r=g7(e,`onCreate`,t),i=g7(e,`onUpdate`,t),a=g7(e,`onSelectionUpdate`,t),o=g7(e,`onTransaction`,t),s=g7(e,`onFocus`,t),c=g7(e,`onBlur`,t),l=g7(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};Z7.resolve=A7,Z7.sort=k7,Z7.flatten=_7,W5({},{ClipboardTextSerializer:()=>$7,Commands:()=>e9,Delete:()=>t9,Drop:()=>n9,Editable:()=>r9,FocusEvents:()=>a9,Keymap:()=>o9,Paste:()=>s9,Tabindex:()=>c9,TextDirection:()=>l9,focusEventsPluginKey:()=>i9});var Q7=class e extends J7{constructor(){super(...arguments),this.type=`extension`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},$7=Q7.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new E3({key:new k3(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:a}=i,o=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),c=M7(n);return j7(r,{from:o,to:s},{...this.options.blockSeparator===void 0?{}:{blockSeparator:this.options.blockSeparator},textSerializers:c})}}})]}}),e9=Q7.create({name:`commands`,addCommands(){return{...q5}}}),t9=Q7.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){let n=()=>{var n;if(((n=this.editor.options.coreExtensionOptions?.delete)?.filterTransaction)?.call(n,e)??e.getMeta(`y-sync$`))return;let r=Qbe(e.before,[e,...t]);dxe(r).forEach(t=>{r.mapping.mapResult(t.oldRange.from).deletedAfter&&r.mapping.mapResult(t.oldRange.to).deletedBefore&&r.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,i)=>{let a=i+n.nodeSize-2,o=t.oldRange.from<=i&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:i,to:a,newFrom:r.mapping.map(i),newTo:r.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:r})})});let i=r.mapping;r.steps.forEach((t,n)=>{if(t instanceof P4){let a=i.slice(n).map(t.from,-1),o=i.slice(n).map(t.to),s=i.invert().map(a,-1),c=i.invert().map(o),l=a>0?r.doc.nodeAt(a-1)?.marks.some(e=>e.eq(t.mark)):!1,u=r.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:a,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:r})}})};this.editor.options.coreExtensionOptions?.delete?.async??!0?setTimeout(n,0):n()}}),n9=Q7.create({name:`drop`,addProseMirrorPlugins(){return[new E3({key:new k3(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),r9=Q7.create({name:`editable`,addProseMirrorPlugins(){return[new E3({key:new k3(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),i9=new k3(`focusEvents`),a9=Q7.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new E3({key:i9,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),o9=Q7.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:u3.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return a7()||l7()?i:r},addProseMirrorPlugins(){return[new E3({key:new k3(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=u3.atStart(t.doc).from,l=u3.atEnd(t.doc).to;if(a||!(o===c&&s===l)||!z7(n.doc))return;let u=n.tr,d=G5({state:n,transaction:u}),{commands:f}=new K5({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),s9=Q7.create({name:`paste`,addProseMirrorPlugins(){return[new E3({key:new k3(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),c9=Q7.create({name:`tabindex`,addProseMirrorPlugins(){return[new E3({key:new k3(`tabindex`),props:{attributes:()=>this.editor.isEditable?{tabindex:`0`}:{}}})]}}),l9=Q7.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=x7(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new E3({key:new k3(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),Zxe=class e{constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1);return new e(this.resolvedPos.doc.resolve(t),this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),!(n&&r.length>0)&&(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},Qxe=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 0 !important; + height: 0 !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; + margin: 0; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +}`;function $xe(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}var eSe=class extends Vxe{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:_xe,createMappablePosition:vxe},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),this.on(`create`,this.options.onCreate),this.on(`update`,this.options.onUpdate),this.on(`selectionUpdate`,this.options.onSelectionUpdate),this.on(`transaction`,this.options.onTransaction),this.on(`focus`,this.options.onFocus),this.on(`blur`,this.options.onBlur),this.on(`destroy`,this.options.onDestroy),this.on(`drop`,({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc(),n=r7(t,this.options.autofocus);this.editorState=X_e.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=$xe(Qxe,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=y7(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){let e=[...this.options.enableCoreExtensions?[r9,$7.configure({blockSeparator:this.options.coreExtensionOptions?.clipboardTextSerializer?.blockSeparator}),e9,a9,o9,c9,n9,s9,t9,l9.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions==`object`?this.options.enableCoreExtensions[e.name]!==!1:!0):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new Z7(e,this)}createCommandManager(){this.commandManager=new K5({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=p7(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(t.message))throw t;this.emit(`contentError`,{editor:this,error:t,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),e=p7(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new N5(e,{...t,attributes:{role:`textbox`,...t?.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),!(e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc))&&this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return cxe(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return mxe(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return v7(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` + +`,textSerializers:n={}}=e||{};return oxe(this.state.doc,{blockSeparator:t,textSerializers:{...M7(this.schema),...n}})}get isEmpty(){return z7(this.state.doc)}destroy(){this.emit(`destroy`),this.unmount(),this.removeAllListeners()}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){return new Zxe(this.state.doc.resolve(e),this)}get $doc(){return this.$pos(0)}};function u9(e){return new W7({find:e.find,handler:({state:t,range:n,match:r})=>{let i=b7(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(N7(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;ln.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function tSe(e){return new W7({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=b7(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function d9(e){return new W7({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=b7(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&H4(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&q4(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}W5({},{createAtomBlockMarkdownSpec:()=>nSe,createBlockMarkdownSpec:()=>rSe,createInlineMarkdownSpec:()=>oSe,parseAttributes:()=>f9,parseIndentedBlocks:()=>m9,renderNestedMarkdownContent:()=>h9,serializeAttributes:()=>p9});function f9(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,e=>(n.push(e),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);i&&(t.class=i.map(e=>e.trim().slice(1)).join(` `));let a=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);a&&(t.id=a[1]),Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,e,r])=>{let i=n[parseInt(r.match(/__QUOTED_(\d+)__/)?.[1]||`0`,10)];i&&(t[e]=i.slice(1,-1))});let o=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,``).replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,``).replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,``).trim();return o&&o.split(/\s+/).filter(Boolean).forEach(e=>{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}),t}function p9(e){if(!e||Object.keys(e).length===0)return``;let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(e=>t.push(`.${e}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([e,n])=>{e===`class`||e===`id`||(n===!0?t.push(e):n!==!1&&n!=null&&t.push(`${e}="${String(n)}"`))}),t.join(` `)}function nSe(e){let{nodeName:t,name:n,parseAttributes:r=f9,serializeAttributes:i=p9,defaultAttributes:a={},requiredAttributes:o=[],allowedAttributes:s}=e,c=n||t,l=e=>{if(!s)return e;let t={};return s.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let r={...a,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${c}(?:\\s|$)`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,i){let a=RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),s=e.match(a);if(!s)return;let l=r(s[1]||``);if(!o.find(e=>!(e in l)))return{type:t,raw:s[0],attributes:l}}},renderMarkdown:e=>{let t=i(l(e.attrs||{}));return`:::${c}${t?` {${t}}`:``} :::`}}}function rSe(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=f9,serializeAttributes:a=p9,defaultAttributes:o={},content:s=`block`,allowedAttributes:c}=e,l=n||t,u=e=>{if(!c)return e;let t={};return c.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let i;if(r){let t=r(e);i=typeof t==`string`?[{type:`text`,text:t}]:t}else i=s===`block`?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);let a={...o,...e.attributes};return n.createNode(t,a,i)},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${l}`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,r){let a=RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),o=e.match(a);if(!o)return;let[c,u=``]=o,d=i(u),f=1,p=c.length,m=``,h=/^:::([\w-]*)(\s.*)?/gm,g=e.slice(p);for(h.lastIndex=0;;){let n=h.exec(g);if(n===null)break;let i=n.index,a=n[1];if(!n[2]?.endsWith(`:::`)){if(a)f+=1;else if(--f,f===0){let a=g.slice(0,i);m=a.trim();let o=e.slice(0,p+i+n[0].length),c=[];if(m)if(s===`block`)for(c=r.blockTokens(a),c.forEach(e=>{e.text&&(!e.tokens||e.tokens.length===0)&&(e.tokens=r.inlineTokens(e.text))});c.length>0;){let e=c[c.length-1];if(e.type===`paragraph`&&(!e.text||e.text.trim()===``))c.pop();else break}else c=r.inlineTokens(m);return{type:t,raw:o,attributes:d,content:m,tokens:c}}}}}},renderMarkdown:(e,t)=>{let n=a(u(e.attrs||{}));return`:::${l}${n?` {${n}}`:``} + +${t.renderChildren(e.content||[],` + +`)} + +:::`}}}function iSe(e){if(!e.trim())return{};let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;r!==null;){let[,i,a,o]=r;t[i]=a||o,r=n.exec(e)}return t}function aSe(e){return Object.entries(e).filter(([,e])=>e!=null).map(([e,t])=>`${e}="${t}"`).join(` `)}function oSe(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=iSe,serializeAttributes:a=aSe,defaultAttributes:o={},selfClosing:s=!1,allowedAttributes:c}=e,l=n||t,u=e=>{if(!c)return e;let t={};return c.forEach(n=>{let r=typeof n==`string`?n:n.name,i=typeof n==`string`?void 0:n.skipIfDefault;if(r in e){let n=e[r];if(i!==void 0&&n===i)return;t[r]=n}}),t},d=l.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return{parseMarkdown:(e,n)=>{let i={...o,...e.attributes};if(s)return n.createNode(t,i);let a=r?r(e):e.content||``;return a?n.createNode(t,i,[n.createTextNode(a)]):n.createNode(t,i,[])},markdownTokenizer:{name:t,level:`inline`,start(e){let t=RegExp(s?`\\[${d}\\s*[^\\]]*\\]`:`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,r){let a=RegExp(s?`^\\[${d}\\s*([^\\]]*)\\]`:`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),o=e.match(a);if(!o)return;let c=``,l=``;if(s){let[,e]=o;l=e}else{let[,e,t]=o;l=e,c=t||``}let u=i(l.trim());return{type:t,raw:o[0],content:c.trim(),attributes:u}}},renderMarkdown:e=>{let t=``;r?t=r(e):e.content&&e.content.length>0&&(t=e.content.filter(e=>e.type===`text`).map(e=>e.text).join(``));let n=a(u(e.attrs||{})),i=n?` ${n}`:``;return s?`[${l}${i}]`:`[${l}${i}]${t}[/${l}]`}}}function m9(e,t,n){let r=e.split(` +`),i=[],a=``,o=0,s=t.baseIndentSize||2;for(;o0)break;if(e.trim()===``){o+=1,a=`${a}${e} +`;continue}else return}let l=t.extractItemData(c),{indentLevel:u,mainContent:d}=l;a=`${a}${e} +`;let f=[d];for(o+=1;oe.trim()!==``);if(t===-1)break;if((r[o+1+t].match(/^(\s*)/)?.[1]?.length||0)>u){f.push(e),a=`${a}${e} +`,o+=1;continue}else break}if((e.match(/^(\s*)/)?.[1]?.length||0)>u)f.push(e),a=`${a}${e} +`,o+=1;else break}let p,m=f.slice(1);if(m.length>0){let e=m.map(e=>e.slice(u+s)).join(` +`);e.trim()&&(p=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}let h=t.createToken(l,p);i.push(h)}if(i.length!==0)return{items:i,raw:a}}function h9(e,t,n,r){if(!e||!Array.isArray(e.content))return``;let i=typeof n==`function`?n(r):n,[a,...o]=e.content,s=`${i}${t.renderChildren([a])}`;return o&&o.length>0&&o.forEach((e,n)=>{let r=t.renderChild?.call(t,e,n+1)??t.renderChildren([e]);if(r!=null){let n=r.split(` +`).map(e=>e?t.indent(e):t.indent(``)).join(` +`);s+=e.type===`paragraph`?` + +${n}`:` +${n}`}}),s}function sSe(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var g9=class e extends J7{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function _9(e){return new Kxe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=b7(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(N7(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;dn.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}function v9(e){return _n((t,n)=>({get(){return t(),e},set(t){e=t,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}var cSe=class extends eSe{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=v9(this.view.state),this.reactiveExtensionStorage=v9(this.extensionStorage),this.on(`beforeTransaction`,({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),D(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){let n=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(e){let t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}},lSe=M({name:`EditorContent`,props:{editor:{default:null,type:Object}},setup(e){let t=O(),n=Ko();return ur(()=>{let r=e.editor;r&&r.options.element&&t.value&&zn(()=>{if(!t.value||!r.view.dom?.parentNode)return;let e=k(t.value);t.value.append(...r.view.dom.parentNode.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:e}),r.createNodeViews()})}),ki(()=>{let t=e.editor;t&&(t.contentComponent=null,t.appContext=null)}),{rootEl:t}},render(){return cs(`div`,{ref:e=>{this.rootEl=e}})}}),uSe=(e={})=>{let t=fn();return Ei(()=>{t.value=new cSe(e)}),ki(()=>{var e,n;let r=t.value?.view.dom?.parentNode,i=r?.cloneNode(!0);(e=r?.parentNode)==null||e.replaceChild(i,r),(n=t.value)==null||n.destroy()}),t},dSe=g9.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` + +`):``}),y9=` `,b9=`\xA0`,fSe=g9.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,w7(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===y9||n[0].text===y9||n[0].raw===b9||n[0].text===b9)&&r.length===1&&r[0].type===`text`&&(r[0].text===y9||r[0].text===b9)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?y9:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),pSe=g9.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),x9=(e,t)=>{if(e===`slot`)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);return[e,r,n]},mSe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,hSe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,gSe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,_Se=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,vSe=Y7.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return x9(`strong`,{...w7(this.options.HTMLAttributes,e),children:x9(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:``,close:``}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[u9({find:mSe,type:this.type}),u9({find:gSe,type:this.type})]},addPasteRules(){return[_9({find:hSe,type:this.type}),_9({find:_Se,type:this.type})]}}),ySe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,bSe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,xSe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,SSe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,CSe=Y7.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,w7(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:``,close:``}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[u9({find:ySe,type:this.type}),u9({find:xSe,type:this.type})]},addPasteRules(){return[_9({find:bSe,type:this.type}),_9({find:SSe,type:this.type})]}}),wSe=Y7.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,w7(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),TSe=g9.create({name:`heading`,addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:`inline*`,group:`block`,defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,w7(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>tSe({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),ESe=Object.defineProperty,DSe=(e,t)=>{for(var n in t)ESe(e,n,{get:t[n],enumerable:!0})},OSe=`listItem`,S9=`textStyle`,C9=/^\s*([-+*])\s$/,w9=g9.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,w7(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(OSe,this.editor.getAttributes(S9)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=d9({find:C9,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=d9({find:C9,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(S9),editor:this.editor})),[e]}}),T9=g9.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,w7(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>h9(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});DSe({},{findListItemPos:()=>E9,getNextListDepth:()=>D9,handleBackspace:()=>j9,handleDelete:()=>P9,hasListBefore:()=>O9,hasListItemAfter:()=>kSe,hasListItemBefore:()=>k9,listItemHasSubList:()=>A9,nextListIsDeeper:()=>M9,nextListIsHigher:()=>N9});var E9=(e,t)=>{let{$from:n}=t.selection,r=J5(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},D9=(e,t)=>{let n=E9(e,t);if(!n)return!1;let[,r]=fxe(t,e,n.$pos.pos+4);return r},O9=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},k9=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},A9=(e,t,n)=>{if(!n)return!1;let r=J5(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},j9=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!u7(e.state,t)&&O9(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!u7(e.state,t)||!gxe(e.state))return!1;let r=E9(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=A9(t,e.state,i);return k9(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},M9=(e,t)=>{let n=D9(e,t),r=E9(e,t);return!r||!n?!1:n>r.depth},N9=(e,t)=>{let n=D9(e,t),r=E9(e,t);return!r||!n?!1:n{if(!u7(e.state,t)||!hxe(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:M9(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():N9(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},kSe=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},ASe=Q7.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&P9(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&P9(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&j9(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&j9(e,n,r)&&(t=!0)}),t}}}}),F9=/^(\s*)(\d+)\.\s+(.*)$/,jSe=/^\s/;function MSe(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function NSe(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&MSe(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function PSe(e){let t=[],n=0,r=0;for(;nt;)f.push(e[d]),d+=1;if(f.length>0){let e=I9(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,items:e,raw:f.map(e=>e.raw).join(` +`)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function FSe(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var ISe=`listItem`,L9=`textStyle`,R9=/^(\d+)\.\s$/,z9=g9.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,w7(this.options.HTMLAttributes,n),0]:[`ol`,w7(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?FSe(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(` +`),[i,a]=PSe(r);if(i.length===0)return;let o=I9(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(` +`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ISe,this.editor.getAttributes(L9)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=d9({find:R9,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=d9({find:R9,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(L9)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),LSe=/^\s*(\[([( |x])?\])\s$/,RSe=g9.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,w7(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>h9(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=T7(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[d9({find:LSe,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),zSe=g9.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,w7(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` +`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=m9(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=m9(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Q7.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(w9.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(T9.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(ASe.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(z9.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(RSe.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(zSe.configure(this.options.taskList)),e}});var BSe=w9,VSe=z9,HSe=T9,USe={key:0,class:`text-sm block mb-1 font-medium text-gray-700`},WSe={key:1,class:`border rounded-lg`},GSe={class:`h-10 px-3 flex gap-2 items-center border-b bg-zinc-200 [&>button]:p-1 [&>button]:rounded-md [&>button:hover]:bg-zinc-300`},KSe={class:`focus-within:ring focus-within:ring-zinc-700 rounded-b overflow-hidden [&>div]:overflow-y-auto [&>div]:max-h-48`},qSe=M({__name:`RichtextEditor`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{t}=gz(),n=ya(e,`modelValue`),r=uSe({content:n.value,extensions:[dSe,fSe,pSe,vSe,CSe,wSe,TSe,BSe,VSe,HSe],injectCSS:!1,editorProps:{attributes:{class:`p-3 prose prose-sm prose-gray focus:outline-none`}},onUpdate({editor:e}){n.value=e.getHTML()}});return pr(n,e=>{r.value&&r.value.getHTML()!==e&&r.value.commands.setContent(e)}),Ti(()=>{r.value?.destroy()}),(n,i)=>{let a=Xge,o=qge,s=Wge,c=Vge,l=wz,u=Rge,d=Fge;return F(),I(`div`,null,[e.field.label?(F(),I(`label`,USe,E(e.field.label),1)):V(``,!0),k(r)?(F(),I(`section`,WSe,[R(`header`,GSe,[R(`button`,{title:`Bold`,onClick:i[0]||=e=>k(r).chain().focus().toggleBold().run(),class:ke({"bg-zinc-300 text-blue-500":k(r).isActive(`bold`)})},[z(a,{class:`w-4 h-4`})],2),R(`button`,{title:`Italic`,onClick:i[1]||=e=>k(r).chain().focus().toggleItalic().run(),class:ke({"bg-zinc-300 text-blue-500":k(r).isActive(`italic`)})},[z(o,{class:`w-4 h-4`})],2),R(`button`,{title:`Underline`,onClick:i[2]||=e=>k(r).chain().focus().toggleUnderline().run(),class:ke({"bg-zinc-300 text-blue-500":k(r).isActive(`underline`)})},[z(s,{class:`w-4 h-4`})],2),e.field.inline?V(``,!0):(F(),I(P,{key:0},[z(k(rX).Root,null,{default:j(()=>[z(k(rX).Trigger,{class:`flex outline-none items-center`},{default:j(()=>[z(c,{class:`w-4 h-4`}),z(l,{class:`w-3 h-3`})]),_:1}),z(k(rX).Positioner,null,{default:j(()=>[z(k(rX).Content,{class:`shadow-sm rounded-md bg-white border outline-none overflow-hidden`},{default:j(()=>[z(k(rX).ItemGroup,null,{default:j(()=>[z(k(rX).ItemGroupLabel,{class:`bg-zinc-300 px-3 py-2`},{default:j(()=>[...i[11]||=[B(`Headings`,-1)]]),_:1}),z(k(rX).Item,{value:`h1`,class:`text-2xl flex items-center px-3 py-2 gap-2 cursor-pointer font-bold hover:bg-zinc-100`,onClick:i[3]||=e=>k(r).chain().focus().toggleHeading({level:1}).run()},{default:j(()=>[B(E(k(t)(`Heading 1`)),1)]),_:1}),z(k(rX).Item,{value:`h2`,class:`text-xl flex items-center px-3 py-2 gap-2 font-semibold cursor-pointer hover:bg-zinc-100`,onClick:i[4]||=e=>k(r).chain().focus().toggleHeading({level:2}).run()},{default:j(()=>[B(E(k(t)(`Heading 2`)),1)]),_:1}),z(k(rX).Item,{value:`h2`,class:`text-lg flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100`,onClick:i[5]||=e=>k(r).chain().focus().toggleHeading({level:3}).run()},{default:j(()=>[B(E(k(t)(`Heading 3`)),1)]),_:1}),z(k(rX).Item,{value:`h2`,class:`text-md flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100`,onClick:i[6]||=e=>k(r).chain().focus().toggleHeading({level:4}).run()},{default:j(()=>[B(E(k(t)(`Heading 4`)),1)]),_:1}),z(k(rX).Item,{value:`h2`,class:`text-sm flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100`,onClick:i[7]||=e=>k(r).chain().focus().toggleHeading({level:5}).run()},{default:j(()=>[B(E(k(t)(`Heading 5`)),1)]),_:1}),z(k(rX).Item,{value:`h2`,class:`text-xs flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100`,onClick:i[8]||=e=>k(r).chain().focus().toggleHeading({level:6}).run()},{default:j(()=>[B(E(k(t)(`Heading 6`)),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),R(`button`,{title:`Bullet list`,onClick:i[9]||=e=>k(r).chain().focus().toggleBulletList().run(),class:ke({"bg-zinc-300 text-blue-500":k(r).isActive(`bulletList`)})},[z(u,{class:`w-4 h-4`})],2),R(`button`,{title:`Numbered list`,onClick:i[10]||=e=>k(r).chain().focus().toggleOrderedList().run(),class:ke({"bg-zinc-300 text-blue-500":k(r).isActive(`orderedList`)})},[z(d,{class:`w-4 h-4`})],2)],64))]),R(`div`,KSe,[z(k(lSe),{editor:k(r)},null,8,[`editor`])])])):V(``,!0)])}}}),JSe={class:`flex flex-col gap-2`},YSe={key:0,class:`text-sm font-medium text-gray-700`},XSe={class:`flex flex-col gap-4`},ZSe={class:`flex gap-2`},QSe={class:`relative`},$Se=[`onMousedown`,`onDblclick`],eCe={key:1,class:`flex flex-col gap-3 p-3 border rounded bg-gray-50`},tCe={class:`flex items-center justify-between`},nCe=M({__name:`GradientPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=ya(e,`modelValue`),n={type:`linear`,angle:90,stops:[{color:`#000000ff`,position:0},{color:`#ffffffff`,position:100}]},r=U({get:()=>t.value||n,set:e=>{t.value=e}});function i(){r.value={...r.value}}let a=O(!1),o=O(0),s=U(()=>{if(!r.value)return`linear-gradient(90deg, #000000 0%, #ffffff 100%)`;let{type:e,angle:t,stops:n}=r.value,i=n.map(e=>`${c(e.color)} ${e.position}%`).join(`, `);return e===`linear`?`linear-gradient(${t}deg, ${i})`:`radial-gradient(circle, ${i})`});function c(e){let t=e.replace(`#`,``);return`rgba(${parseInt(t.slice(0,2),16)}, ${parseInt(t.slice(2,4),16)}, ${parseInt(t.slice(4,6),16)}, ${t.length===8?parseInt(t.slice(6,8),16)/255:1})`}function l(e){let t=[...r.value.stops].sort((e,t)=>e.position-t.position),n=t[0],a=t[t.length-1];for(let r=0;r=e){n=t[r],a=t[r+1];break}let s=(e-n.position)/(a.position-n.position),c={color:u(n.color,a.color,s),position:Math.round(e)};r.value.stops.push(c),r.value.stops.sort((e,t)=>e.position-t.position),i(),o.value=r.value.stops.indexOf(c)}function u(e,t,n){let r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16),o=e.length===9?parseInt(e.slice(7,9),16):255,s=parseInt(t.slice(1,3),16),c=parseInt(t.slice(3,5),16),l=parseInt(t.slice(5,7),16),u=t.length===9?parseInt(t.slice(7,9),16):255,d=Math.round(r+(s-r)*n),f=Math.round(i+(c-i)*n),p=Math.round(a+(l-a)*n),m=Math.round(o+(u-o)*n);return`#${d.toString(16).padStart(2,`0`)}${f.toString(16).padStart(2,`0`)}${p.toString(16).padStart(2,`0`)}${m.toString(16).padStart(2,`0`)}`}function d(e){r.value.stops.length<=2||(r.value.stops.splice(e,1),i(),o.value===e?o.value=Math.max(0,e-1):o.value!==null&&o.value>e&&o.value--)}let f=O(!1),p=O(null),m=O(!1),h=O(0);function g(e){let t=Date.now();if(m.value||t-h.value<200){m.value=!1;return}let n=e.currentTarget.getBoundingClientRect();l((e.clientX-n.left)/n.width*100)}function _(e,t){e.preventDefault(),e.stopPropagation(),h.value=Date.now(),f.value=!0,p.value=t,o.value=t,m.value=!1;let n=e.target.parentElement.getBoundingClientRect(),a=e.clientX,s=e=>{if(f.value&&p.value!==null){Math.abs(e.clientX-a)>3&&(m.value=!0);let t=(e.clientX-n.left)/n.width*100,o=Math.max(0,Math.min(100,t));r.value.stops[p.value].position=Math.round(o),i()}},c=()=>{f.value=!1,p.value=null,document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c),setTimeout(()=>{m.value=!1},100)};document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c)}let v=U(()=>o.value!==null&&r.value?r.value.stops[o.value]:null);return pr(()=>v.value?.position,e=>{if(e!==void 0&&o.value!==null&&r.value){let e=r.value.stops[o.value];r.value.stops.sort((e,t)=>e.position-t.position),i(),o.value=r.value.stops.findIndex(t=>t===e)}}),(t,n)=>(F(),I(`div`,JSe,[e.field.label?(F(),I(`label`,YSe,E(e.field.label),1)):V(``,!0),z(k(N0).Root,{open:k(a),"onUpdate:open":n[6]||=e=>dn(a)?a.value=e:null},{default:j(()=>[z(k(N0).Trigger,{"as-child":``},{default:j(()=>[R(`div`,{class:`h-12 rounded border border-zinc-300 cursor-pointer hover:border-zinc-400 transition-colors`,style:Ee({background:k(s)})},null,4)]),_:1}),z(k(N0).Positioner,{class:`w-[var(--reference-width)] !min-w-auto`},{default:j(()=>[z(k(N0).Content,{class:`border border-zinc-300 rounded shadow-lg z-50 bg-white w-full p-2`},{default:j(()=>[R(`div`,XSe,[R(`div`,ZSe,[z(k(i_),{fullWidth:``,variant:k(r).type===`linear`?`accent`:`default`,onClick:n[0]||=()=>{k(r).type=`linear`,i()}},{default:j(()=>[...n[7]||=[B(` Linear `,-1)]]),_:1},8,[`variant`]),z(k(i_),{fullWidth:``,variant:k(r).type===`radial`?`accent`:`default`,onClick:n[1]||=()=>{k(r).type=`radial`,i()}},{default:j(()=>[...n[8]||=[B(` Radial `,-1)]]),_:1},8,[`variant`])]),k(r).type===`linear`?(F(),L(k(L0).Root,{key:0,min:0,max:360,"model-value":[k(r).angle??90],onValueChange:n[2]||=e=>{k(r).angle=e.value[0],i()},class:`relative w-full`},{default:j(()=>[z(k(L0).Label,{class:`text-sm font-medium text-zinc-700 mb-1 block`},{default:j(()=>[B(`Angle: `+E(k(r).angle)+`°`,1)]),_:1}),z(k(L0).Control,{class:`flex-1 flex items-center h-2 select-none touch-none`},{default:j(()=>[z(k(L0).Track,{class:`w-full overflow-hidden h-1 rounded-full bg-gray-100`},{default:j(()=>[z(k(L0).Range,{class:`h-full bg-blue-500 rounded-full`})]),_:1}),z(k(L0).Thumb,{index:0,class:`w-4 h-4 bg-white border-2 border-blue-500 rounded-full shadow-md cursor-pointer hover:scale-110 transition-transform`})]),_:1})]),_:1},8,[`model-value`])):V(``,!0),R(`div`,QSe,[R(`div`,{class:`h-4 rounded relative cursor-crosshair`,style:Ee({background:k(s)}),onClick:g},[(F(!0),I(P,null,Vi(k(r).stops,(e,t)=>(F(),I(`div`,{key:t,class:ke([`absolute w-3 h-3 rounded-full border-2 border-white shadow-md cursor-move active:cursor-grabbing top-1/2 -translate-y-1/2 -translate-x-1/2 hover:scale-110 transition-transform`,{"ring-2 ring-blue-500 scale-110":k(o)===t}]),style:Ee({left:`${e.position}%`,backgroundColor:e.color}),onMousedown:e=>_(e,t),onDblclick:Xc(e=>d(t),[`stop`])},null,46,$Se))),128))],4),n[9]||=R(`p`,{class:`text-xs text-gray-500 mt-1`},` Click to add stop • Drag to move • Double-click stop to remove `,-1)]),k(v)?(F(),I(`div`,eCe,[R(`div`,tCe,[n[10]||=R(`p`,{class:`text-sm font-medium`},`Edit Color Stop`,-1),k(r).stops.length>2?(F(),I(`button`,{key:0,type:`button`,class:`text-xs text-red-600 hover:text-red-700`,onClick:n[3]||=e=>d(k(o))},` Remove `)):V(``,!0)]),z(u2,{modelValue:k(v).color,"onUpdate:modelValue":n[4]||=e=>k(v).color=e,label:`Color`},null,8,[`modelValue`]),z(k(L0).Root,{min:0,max:100,"model-value":[k(v).position],onValueChange:n[5]||=e=>k(v).position=e.value[0],class:`relative w-full`},{default:j(()=>[z(k(L0).Label,{class:`text-sm font-medium text-zinc-700 mb-1 block`},{default:j(()=>[B(`Position: `+E(k(v).position)+`%`,1)]),_:1}),z(k(L0).Control,{class:`flex-1 flex items-center h-2 select-none touch-none`},{default:j(()=>[z(k(L0).Track,{class:`w-full overflow-hidden h-1 rounded-full bg-gray-100`},{default:j(()=>[z(k(L0).Range,{class:`h-full bg-blue-500 rounded-full`})]),_:1}),z(k(L0).Thumb,{index:0,class:`w-4 h-4 bg-white border-2 border-blue-500 rounded-full shadow-md cursor-pointer hover:scale-110 transition-transform`})]),_:1})]),_:1},8,[`model-value`])])):V(``,!0)])]),_:1})]),_:1})]),_:1},8,[`open`])]))}}),rCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function iCe(e,t){return F(),I(`svg`,rCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m4.5 15.75l7.5-7.5l7.5 7.5`},null,-1)]])}var aCe=D({name:`heroicons-chevron-up`,render:iCe}),oCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sCe(e,t){return F(),I(`svg`,oCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M13.181 8.68a4.503 4.503 0 0 1 1.903 6.405m-9.768-2.782L3.56 14.06a4.5 4.5 0 0 0 6.364 6.365l3.129-3.129m5.614-5.615l1.757-1.757a4.5 4.5 0 0 0-6.364-6.365l-4.5 4.5q-.388.39-.661.84m1.903 6.405a4.5 4.5 0 0 1-1.242-.88a4.5 4.5 0 0 1-1.062-1.683m6.587 2.345l5.907 5.907m-5.907-5.907L8.898 8.898M2.991 2.99L8.898 8.9`},null,-1)]])}var cCe=D({name:`heroicons-link-slash`,render:sCe}),lCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uCe(e,t){return F(),I(`svg`,lCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18`},null,-1)]])}var dCe=D({name:`heroicons-arrow-long-up`,render:uCe}),fCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pCe(e,t){return F(),I(`svg`,fCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3`},null,-1)]])}var mCe=D({name:`heroicons-arrow-long-down`,render:pCe}),hCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function gCe(e,t){return F(),I(`svg`,hCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18`},null,-1)]])}var _Ce=D({name:`heroicons-arrow-long-left`,render:gCe}),vCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function yCe(e,t){return F(),I(`svg`,vCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3`},null,-1)]])}var bCe=D({name:`heroicons-arrow-long-right`,render:yCe}),xCe={class:`flex flex-col gap-1`},SCe={key:0,class:`flex items-center justify-between`},CCe={class:`text-sm font-medium text-gray-700`},wCe={class:`flex border border-gray-300 rounded overflow-hidden divide-x`},TCe={class:`grid grid-cols-4 divide-x`},ECe=M({__name:`SpacingField`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=[`top`,`right`,`bottom`,`left`],n={top:dCe,right:bCe,bottom:mCe,left:_Ce},r=ya(e,`modelValue`),i={top:0,right:0,bottom:0,left:0},a=U({get:()=>r.value||i,set:e=>{r.value=e}}),o=O(!0);function s(e,t){o.value?a.value={top:t,right:t,bottom:t,left:t}:a.value={...a.value,[e]:t}}function c(){if(o.value=!o.value,o.value){let e=a.value.top;a.value={top:e,right:e,bottom:e,left:e}}}return Ei(()=>{a.value&&(o.value=a.value.top===a.value.right&&a.value.top===a.value.bottom&&a.value.top===a.value.left)}),(r,i)=>{let l=aCe,u=wz;return F(),I(`div`,xCe,[e.field.label?(F(),I(`div`,SCe,[R(`label`,CCe,E(e.field.label),1)])):V(``,!0),R(`div`,wCe,[R(`div`,TCe,[(F(),I(P,null,Vi(t,t=>z(k(A0).Root,{class:`flex w-full relative group items-center gap-0.5 px-0.5`,"model-value":String(k(a)[t]),min:e.field.min,max:e.field.max,"onUpdate:modelValue":e=>s(t,Number(e))},{default:j(()=>[(F(),L(Ri(n[t]),{class:`w-4 h-4 text-gray-600 flex-none`})),z(k(A0).Input,{class:`flex-1 w-full border-none outline-none text-sm py-1.5`}),z(k(A0).Control,{class:`absolute top-0 right-1 bottom-0 flex flex-col hidden group-hover:flex`},{default:j(()=>[z(k(A0).IncrementTrigger,{class:`flex-1 flex items-center`},{default:j(()=>[z(l,{class:`w-3 h-3 text-gray-600`})]),_:1}),z(k(A0).DecrementTrigger,{class:`flex-1 flex items-center`},{default:j(()=>[z(u,{class:`w-3 h-3 text-gray-600`})]),_:1})]),_:1})]),_:2},1032,[`model-value`,`min`,`max`,`onUpdate:modelValue`])),64))]),R(`button`,{type:`button`,class:ke([`flex-none p-1 rounded hover:bg-gray-100 transition-colors`,{"text-blue-600":k(o),"text-gray-400":!k(o)}]),onClick:c},[k(o)?(F(),L(k(c2),{key:0,class:`w-4 h-4`})):(F(),L(k(cCe),{key:1,class:`w-4 h-4`}))],2)])])}}}),DCe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function OCe(e,t){return F(),I(`svg`,DCe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125`},null,-1)]])}var kCe=D({name:`heroicons-pencil`,render:OCe}),ACe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function jCe(e,t){return F(),I(`svg`,ACe,[...t[0]||=[R(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`m14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.088 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0`},null,-1)]])}var B9=D({name:`heroicons-trash`,render:jCe}),V9=e=>[{value:`xs`,label:e(`Extra Small`)},{value:`sm`,label:e(`Small`)},{value:`base`,label:e(`Base`)},{value:`lg`,label:e(`Large`)},{value:`xl`,label:e(`Extra Large`)},{value:`2xl`,label:e(`2XL`)},{value:`3xl`,label:e(`3XL`)},{value:`4xl`,label:e(`4XL`)},{value:`5xl`,label:e(`5XL`)},{value:`6xl`,label:e(`6XL`)},{value:`7xl`,label:e(`7XL`)},{value:`8xl`,label:e(`8XL`)},{value:`9xl`,label:e(`9XL`)}],H9=e=>[{value:`none`,label:e(`None`)},{value:`tight`,label:e(`Tight`)},{value:`snug`,label:e(`Snug`)},{value:`normal`,label:e(`Normal`)},{value:`relaxed`,label:e(`Relaxed`)},{value:`loose`,label:e(`Loose`)}],U9=e=>[{value:`tighter`,label:e(`Tighter`)},{value:`tight`,label:e(`Tight`)},{value:`normal`,label:e(`Normal`)},{value:`wide`,label:e(`Wide`)},{value:`wider`,label:e(`Wider`)},{value:`widest`,label:e(`Widest`)}],MCe=e=>[{value:`normal`,label:e(`Normal`)},{value:`italic`,label:e(`Italic`)}],W9=e=>[{value:`none`,label:e(`None`)},{value:`capitalize`,label:e(`Capitalize`)},{value:`uppercase`,label:e(`Uppercase`)},{value:`lowercase`,label:e(`Lowercase`)}],NCe=e=>({100:`Thin`,200:`Extra Light`,300:`Light`,400:`Regular`,500:`Medium`,600:`Semi Bold`,700:`Bold`,800:`Extra Bold`,900:`Black`})[e]||e,G9=e=>`${e} - ${NCe(e)}`,PCe={class:`flex flex-col gap-4`},FCe={key:1,class:`pt-4 border-t border-zinc-200`},ICe=M({__name:`TypographyPresetEditor`,props:Zi({canDelete:{type:Boolean,default:!1}},{modelValue:{default:()=>({fontFamily:null,fontStyle:`normal`,fontWeight:400,fontSize:`base`,lineHeight:`normal`,letterSpacing:`normal`,textTransform:`none`})},modelModifiers:{}}),emits:Zi([`delete`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t;function i(){r(`delete`)}let{t:a}=gz(),{findFont:o,isFetched:s}=i2(),c=V9(a),l=H9(a),u=U9(a),d=MCe(a),f=W9(a),p=ya(e,`modelValue`,{get(e){return e&&typeof e.fontWeight==`string`?{...e,fontWeight:parseInt(e.fontWeight,10)}:e},set(e){return e}}),m={id:`fontSize`,label:a(`Font Size`),type:`select`,options:c,responsive:!0},h={id:`lineHeight`,label:a(`Line Height`),type:`select`,options:l,responsive:!0},g=U(()=>{let e=p.value.fontFamily?.styles||[`normal`];return{id:`fontStyle`,label:a(`Font Style`),type:`select`,options:e.map(e=>d.find(t=>t.value===e)||{value:e,label:e})}}),_={id:`letterSpacing`,label:a(`Letter Spacing`),type:`select`,options:u},v={id:`textTransform`,label:a(`Text Transform`),type:`select`,options:f},y=U({get:()=>p.value.fontFamily,set:e=>{if(!e){p.value={...p.value,fontFamily:null,fontWeight:400,fontStyle:`normal`};return}let t=p.value.fontWeight,n=e.weights.includes(t)?t:e.weights.includes(400)?400:e.weights[0],r=p.value.fontStyle,i=e.styles.includes(r)?r:e.styles.includes(`normal`)?`normal`:e.styles[0];p.value={...p.value,fontFamily:{slug:e.slug,name:e.name,weights:e.weights,styles:e.styles},fontWeight:n,fontStyle:i}}}),b=U({get:()=>p.value.fontStyle,set:e=>{p.value={...p.value,fontStyle:e}}}),x=U({get:()=>p.value.fontSize,set:e=>{p.value={...p.value,fontSize:e}}}),S=U({get:()=>p.value.lineHeight,set:e=>{p.value={...p.value,lineHeight:e}}}),C=U({get:()=>p.value.letterSpacing,set:e=>{p.value={...p.value,letterSpacing:e}}}),ee=U({get:()=>p.value.textTransform,set:e=>{p.value={...p.value,textTransform:e}}}),te=U({get:()=>p.value.fontWeight,set:e=>{p.value={...p.value,fontWeight:e}}});pr(()=>({fetched:s.value,fontFamily:p.value.fontFamily}),({fetched:e,fontFamily:t})=>{if(!e||!t)return;let n=o(typeof t==`string`?t:t.slug);n&&(typeof t==`string`||!t.weights||t.weights.length===1)&&(p.value={...p.value,fontFamily:n})},{immediate:!0,deep:!0});let w=U(()=>{let e=p.value.fontFamily?.weights||[400];return{id:`fontWeight`,label:a(`Font Weight`),type:`select`,options:e.map(e=>({value:e,label:G9(String(e))}))}});return(e,t)=>{let r=B9;return F(),I(`div`,PCe,[z(o2,{field:{id:`fontFamily`,label:k(a)(`Font Family`),type:`font`},modelValue:k(y),"onUpdate:modelValue":t[0]||=e=>dn(y)?y.value=e:null},null,8,[`field`,`modelValue`]),z(k(u_),{field:k(g),modelValue:k(b),"onUpdate:modelValue":t[1]||=e=>dn(b)?b.value=e:null},null,8,[`field`,`modelValue`]),p.value.fontFamily?(F(),L(k(u_),{key:0,field:k(w),modelValue:k(te),"onUpdate:modelValue":t[2]||=e=>dn(te)?te.value=e:null},null,8,[`field`,`modelValue`])):V(``,!0),z(k(u_),{field:m,modelValue:k(x),"onUpdate:modelValue":t[3]||=e=>dn(x)?x.value=e:null},null,8,[`modelValue`]),z(k(u_),{field:h,modelValue:k(S),"onUpdate:modelValue":t[4]||=e=>dn(S)?S.value=e:null},null,8,[`modelValue`]),z(k(u_),{field:_,modelValue:k(C),"onUpdate:modelValue":t[5]||=e=>dn(C)?C.value=e:null},null,8,[`modelValue`]),z(k(u_),{field:v,modelValue:k(ee),"onUpdate:modelValue":t[6]||=e=>dn(ee)?ee.value=e:null},null,8,[`modelValue`]),n.canDelete?(F(),I(`div`,FCe,[R(`button`,{type:`button`,class:`w-full flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-red-600 hover:text-red-700 hover:bg-red-50 rounded-lg border border-red-200 hover:border-red-300 transition-colors`,onClick:i},[z(r,{class:`w-4 h-4`}),B(` `+E(k(a)(`Delete Preset`)),1)])])):V(``,!0)])}}}),LCe={class:`flex flex-col gap-1`},RCe={key:0,class:`text-sm font-medium`},zCe={class:`text-xs text-gray-500`},K9=M({__name:`TypographyPresetPreview`,props:{preset:null,label:null},setup(e){let t=e,{t:n}=gz(),r=V9(n),i=H9(n),a=U9(n),o=W9(n),s=U(()=>t.label?t.preset?.name||a2(t.label):``),c=U(()=>{let e=[];if(t.preset?.fontFamily?.name&&e.push(t.preset.fontFamily.name),t.preset?.fontWeight&&e.push(G9(t.preset.fontWeight)),t.preset?.fontSize){let n=typeof t.preset.fontSize==`string`?t.preset.fontSize:t.preset.fontSize._default||t.preset.fontSize[Object.keys(t.preset.fontSize)[0]];if(n){let t=r.find(e=>e.value===n)?.label||n;e.push(t)}}if(t.preset?.lineHeight){let n=typeof t.preset.lineHeight==`string`?t.preset.lineHeight:t.preset.lineHeight._default||t.preset.lineHeight[Object.keys(t.preset.lineHeight)[0]];if(n){let t=i.find(e=>e.value===n)?.label||n;e.push(t)}}if(t.preset?.fontStyle===`italic`&&e.push(n(`Italic`)),t.preset?.letterSpacing&&t.preset.letterSpacing!==`normal`){let n=a.find(e=>e.value===t.preset.letterSpacing)?.label;n&&e.push(n)}if(t.preset?.textTransform&&t.preset.textTransform!==`none`){let n=o.find(e=>e.value===t.preset.textTransform)?.label;n&&e.push(n)}return e.length>0?e.join(` • `):n(`Configure typography`)});return(e,t)=>(F(),I(`div`,LCe,[k(s)?(F(),I(`div`,RCe,E(k(s)),1)):V(``,!0),R(`div`,zCe,E(k(c)),1)]))}}),BCe={class:`text-sm font-medium mb-1 text-gray-700`},VCe={class:`grid gap-2 items-stretch mt-1`},HCe=[`onClick`],UCe=[`onClick`,`title`],WCe={class:`flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between`},GCe={class:`flex items-center gap-2 flex-1 min-w-0`},KCe={class:`text-sm text-gray-600 flex-none`},qCe=[`title`],JCe={class:`flex-1 flex flex-col min-h-0 overflow-y-auto p-4`},YCe=M({__name:`TypographyPresets`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=ya(e,`modelValue`),{t:r}=gz(),i=O(null),a=O(!1),o=O(!1),s=O(``),c=U(()=>Object.keys(t.field.presets||{})),l=U({get(){return!i.value||!n.value?.[i.value]?null:n.value[i.value]},set(e){!i.value||!e||(n.value={...n.value,[i.value]:e})}}),u=U(()=>!i.value||!l.value?``:l.value.name||a2(i.value)),d=U(()=>i.value?!c.value.includes(i.value):!1);function f(e){i.value=e,a.value=!0}function p(){let e=Object.keys(n.value),t=`typography-${e.length+1}`;n.value={...n.value,[t]:structuredClone(cn(n.value[e[0]]))},f(t)}function m(e){return!c.value.includes(e)}function h(e){if(!m(e)||!n.value)return;let{[e]:t,...r}=n.value;n.value=r}function g(){d.value&&(o.value=!0,s.value=l.value?.name||u.value,zn(()=>{let e=document.querySelector(`.preset-name-input`);e?.focus(),e?.select()}))}function _(){l.value&&(l.value={...l.value,name:s.value?.trim()},o.value=!1)}function v(){o.value=!1,s.value=``}function y(e){e.key===`Enter`?_():e.key===`Escape`&&v()}function b(){i.value&&(h(i.value),a.value=!1)}let x=U(()=>i.value!==null&&m(i.value||``));return(t,c)=>{let v=B9,S=d2,C=kCe,ee=q0;return F(),I(`div`,null,[R(`label`,BCe,E(e.field.label),1),R(`div`,VCe,[(F(!0),I(P,null,Vi(n.value,(e,t)=>(F(),I(`div`,{key:t,class:`relative group`},[R(`button`,{class:`w-full px-3 py-2 border border-zinc-300 rounded hover:bg-zinc-50 text-left cursor-pointer`,onClick:e=>f(String(t))},[z(K9,{preset:e,label:String(t)},null,8,[`preset`,`label`])],8,HCe),m(String(t))?(F(),I(`button`,{key:0,type:`button`,class:`absolute top-2 right-2 p-1 rounded-lg bg-white border border-zinc-300 hover:bg-red-50 hover:border-red-400 hover:text-red-600 opacity-0 group-hover:opacity-100 transition-opacity z-10`,onClick:Xc(e=>h(String(t)),[`stop`,`prevent`]),title:k(r)(`Delete preset`)},[z(v,{class:`w-3 h-3`})],8,UCe)):V(``,!0)]))),128)),R(`button`,{class:`flex border-2 border-dashed flex items-center justify-center text-sm gap-2 py-1 rounded border-blue-400 text-blue-400 cursor-pointer`,onClick:p},[z(S,{class:`h-4 w-4`}),R(`span`,null,E(k(r)(`Add preset`)),1)])]),z(k(D0).Root,{open:k(a),"onUpdate:open":c[2]||=e=>dn(a)?a.value=e:null,modal:!1,"close-on-interact-outside":!1},{default:j(()=>[z(k(D0).Positioner,{class:`flex fixed z-50 top-14 left-14 bottom-0 w-75 items-center justify-center`},{default:j(()=>[z(k(D0).Content,{class:`bg-white shadow flex flex-col w-full h-full overflow-hidden`},{default:j(()=>[R(`header`,WCe,[R(`div`,GCe,[R(`span`,KCe,E(k(r)(`Editing`)),1),k(o)?rr((F(),I(`input`,{key:0,"onUpdate:modelValue":c[0]||=e=>dn(s)?s.value=e:null,type:`text`,maxlength:`50`,class:`preset-name-input flex-1 min-w-0 px-2 py-1 text-sm font-medium border border-blue-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500`,onBlur:_,onKeydown:y},null,544)),[[Ic,k(s)]]):(F(),I(`button`,{key:1,type:`button`,class:ke([`flex-1 min-w-0 text-left px-2 py-1 text-sm font-medium rounded truncate`,k(d)?`hover:bg-gray-100 cursor-pointer`:`cursor-default`]),title:k(d)?k(r)(`Click to rename`):k(r)(`Theme preset (cannot be renamed)`),onClick:g},[B(E(k(u))+` `,1),k(d)?(F(),L(C,{key:0,class:`inline-block w-3 h-3 ml-1 text-gray-400`})):V(``,!0)],10,qCe))]),z(k(D0).CloseTrigger,{class:`cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300`},{default:j(()=>[z(ee,{class:`w-5 h-5`})]),_:1})]),R(`div`,JCe,[k(i)&&k(l)?(F(),L(ICe,{key:0,modelValue:k(l),"onUpdate:modelValue":c[1]||=e=>dn(l)?l.value=e:null,"can-delete":k(x),onDelete:b},null,8,[`modelValue`,`can-delete`])):V(``,!0)])]),_:1})]),_:1})]),_:1},8,[`open`])])}}}),XCe={class:`text-sm font-medium mb-1 text-gray-700`},ZCe={key:0},QCe={key:0,class:`flex flex-1 gap-3`},$Ce={class:`flex-1 text-left text-zinc-700`},ewe={key:1},twe={class:`divide-y divide-zinc-200`},nwe=[`onClick`],rwe={key:1,class:`text-sm text-red-400`},iwe=M({__name:`TypographyPicker`,props:Zi({field:null},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let{theme:t}=cz(),{t:n}=gz(),r=U(()=>{if(!t.value)return{};let e=t.value.settingsSchema.flatMap(e=>e.settings).find(e=>e.type===`typography_presets`)?.id;return e&&t.value.settings[e]||{}}),i=U(()=>Object.keys(r.value).length>0),a=ya(e,`modelValue`),o=O(!1),s=U(()=>a.value&&r.value?r.value[a.value]:null),c=U(()=>!a.value||!s.value?null:s.value.name||a2(a.value));function l(e){a.value=e,o.value=!1}return(t,u)=>{let d=q0,f=e2,p=Q0,m=K9;return F(),I(`div`,null,[R(`label`,XCe,E(e.field.label),1),k(i)?(F(),I(`div`,ZCe,[z(k(N0).Root,{open:k(o),"onUpdate:open":u[1]||=e=>dn(o)?o.value=e:null},{default:j(()=>[z(k(N0).Trigger,{class:`border border-zinc-300 rounded w-full flex justify-between h-10 px-3 items-center`},{default:j(()=>[k(s)?(F(),I(`div`,QCe,[R(`div`,$Ce,E(k(c)),1),R(`button`,{class:`ml-auto flex-none mr-1 p-1 rounded-lg hover:bg-zinc-100`,onClick:u[0]||=Xc(e=>a.value=null,[`stop`])},[z(d,{class:`w-4 h-4`})])])):(F(),I(`span`,ewe,E(k(n)(`Select a typography preset`)),1)),z(f,{class:`flex-none h-4 w-4`})]),_:1}),z(k(N0).Positioner,null,{default:j(()=>[z(k(N0).Content,{class:`border border-zinc-300 rounded shadow-md w-[var(--reference-width)] z-50 bg-white -mt-1 overflow-y-auto max-h-[360px]`},{default:j(()=>[R(`div`,twe,[(F(!0),I(P,null,Vi(k(r),(e,t)=>(F(),I(`div`,{key:t,class:ke([`px-3 py-3 hover:bg-zinc-100 relative cursor-pointer`,{"bg-zinc-100":a.value===String(t)}]),onClick:e=>l(String(t))},[a.value===String(t)?(F(),L(p,{key:0,class:`w-5 h-5 absolute top-2 right-2 text-green-400`})):V(``,!0),z(m,{preset:e,label:String(t)},null,8,[`preset`,`label`])],10,nwe))),128))])]),_:1})]),_:1})]),_:1},8,[`open`])])):(F(),I(`div`,rwe,E(k(n)(`No typography presets defined in theme settings.`)),1))])}}}),q9=O(!1);function J9(){let e=pX(),{state:t}=cz();async function n(){if(q9.value)return;q9.value=!0;let n=hpe(e.engine.getPage());n.onSuccess(()=>{e.ui.toast({type:`success`,title:`Theme published successfully`}),e.ui.closeModal(`confirm-publish`),t.haveEdits=!1}),n.onError(()=>{e.ui.toast({type:`error`,title:`Failed to publish theme`})}),await n.execute(),q9.value=!1}return{isPublishing:tn(q9),publish:n}}var awe=`bagisto_visual_editor_confirm_publish`,owe=M({__name:`PublishAction`,setup(e){let{t}=gz(),n=pX(),{isPublishing:r,publish:i}=J9(),{haveEdits:a}=cz();function o(){if(localStorage.getItem(awe)===null){n.ui.openModal(`confirm-publish`);return}i()}return(e,n)=>(F(),L(k(i_),{variant:`primary`,loading:k(r),disabled:!k(a),onClick:o},{default:j(()=>[B(E(k(t)(`Publish`)),1)]),_:1},8,[`loading`,`disabled`]))}}),swe={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function cwe(e,t){return F(),I(`svg`,swe,[...t[0]||=[R(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`},[R(`path`,{d:`M2.036 12.322a1 1 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178`}),R(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0`})],-1)]])}var lwe=D({name:`heroicons-eye`,render:cwe}),uwe=M({__name:`PreviewAction`,setup(e){let{t}=gz(),n=pX();function r(){let e=n.preview.state.previewUrl;window.open(e,`_blank`)}return(e,t)=>{let n=lwe;return F(),L(k(i_),{variant:`secondary`,square:``,onClick:r,title:`Preview in new tab`},{default:j(()=>[z(n)]),_:1})}}}),dwe={class:`w-sm p-4 space-y-6`},fwe={class:`mb-4`},pwe={class:`flex gap-4 justify-end`},mwe=`bagisto_visual_editor_confirm_publish`,hwe=M({__name:`ConfirmPublish`,setup(e){let{t}=gz(),n=pX(),{isPublishing:r,publish:i}=J9(),a=O(!1);function o(){a.value&&localStorage.setItem(mwe,`true`),i()}return(e,i)=>{let s=b2;return F(),I(`div`,dwe,[R(`p`,null,E(k(t)(`publish_warning_line1`)),1),R(`p`,null,E(k(t)(`publish_warning_line2`)),1),R(`div`,fwe,[z(s,{label:k(t)(`Don't ask next time`),modelValue:k(a),"onUpdate:modelValue":i[0]||=e=>dn(a)?a.value=e:null},null,8,[`label`,`modelValue`])]),R(`div`,pwe,[z(k(i_),{disabled:k(r),onClick:i[1]||=e=>k(n).ui.closeModal(`confirm-publish`)},{default:j(()=>[B(E(k(t)(`Cancel`)),1)]),_:1},8,[`disabled`]),z(k(i_),{variant:`primary`,loading:k(r),onClick:o},{default:j(()=>[B(E(k(t)(`Publish`)),1)]),_:1},8,[`loading`])])])}}}),gwe=M({__name:`BackButton`,setup(e){function t(){history.back()}return(e,n)=>{let r=s2;return F(),L(k(i_),{square:``,title:`Back`,onClick:t},{default:j(()=>[z(r,{class:`text-zinc-600`})]),_:1})}}}),{t:_we}=gz();function vwe(e){e.removeHeaderAction(`back-button`),e.removeHeaderAction(`title`),e.registerHeaderAction({id:`back-button`,slot:`left`,render:gwe}),e.registerHeaderAction({id:`title`,slot:`left`,render:xz}),e.registerHeaderAction({id:`tools`,slot:`center`,render:yX}),e.registerHeaderAction({id:`preview`,slot:`right`,render:uwe}),e.registerHeaderAction({id:`publish`,slot:`right`,render:owe}),e.registerSidebarPanel({id:`theme-settings`,title:`Theme settings`,icon:fz,render:Epe}),e.registerSidebarPanel({id:`media`,title:`Medias`,icon:hz,render:kpe}),e.registerModal({id:`confirm-publish`,title:_we(`Publish edits ?`),size:`lg`,render:hwe})}function ywe(e){e.registerPropertyField({type:`category`,render:nme}),e.registerPropertyField({type:`product`,render:yme}),e.registerPropertyField({type:`cms-page`,render:Pme}),e.registerPropertyField({type:`font`,render:o2}),e.registerPropertyField({type:`link`,render:phe}),e.registerPropertyField({type:`color-scheme`,render:whe}),e.registerPropertyField({type:`color-scheme-group`,render:Uhe}),e.registerPropertyField({type:`icon`,render:mge}),e.registerPropertyField({type:`image`,render:Mge}),e.registerPropertyField({type:`richtext`,render:qSe}),e.registerPropertyField({type:`gradient`,render:nCe}),e.registerPropertyField({type:`spacing`,render:ECe}),e.registerPropertyField({type:`typography_presets`,render:YCe}),e.registerPropertyField({type:`typography`,render:iwe})}function bwe(e){vwe(e),ywe(e)}var{t:xwe}=gz();function Swe(e){let t={changes:{added:[],updated:[],removed:[],moved:{},positions:{}},blocks:{},regions:[]};for(let n of e)t.changes.added.push(...n.changes.added),t.changes.updated.push(...n.changes.updated),t.changes.removed.push(...n.changes.removed),Object.assign(t.changes.moved,n.changes.moved||{}),Object.assign(t.changes.positions,n.changes.positions||{}),Object.assign(t.blocks,n.blocks),n.regions&&n.regions.length>0&&(t.regions=n.regions);return t.changes.added=[...new Set(t.changes.added)],t.changes.updated=[...new Set(t.changes.updated)],t.changes.removed=[...new Set(t.changes.removed)],t.changes.added=t.changes.added.filter(e=>!t.changes.removed.includes(e)),t.changes.updated=t.changes.updated.filter(e=>!t.changes.removed.includes(e)),t}function Cwe(e){return e.changes.added.length>0||e.changes.updated.length>0||e.changes.removed.length>0||Object.keys(e.changes.moved||{}).length>0}function wwe(e,t){let n=[];for(let r of e){let i=t[r];if(!i||i.parentId&&e.includes(i.parentId))continue;let a=Twe(r,t);if(a){let e=t[a]?.parentId;e&&n.push(e);continue}if(i.ghost===!0){let e=i.parentId;e&&n.push(e);continue}n.push(r)}return Array.from(new Set(n))}function Twe(e,t){let n=e;for(;n&&t[n];){if(t[n]?.repeated===!0)return n;n=t[n]?.parentId}return null}function Ewe(e,t){let n=new DOMParser().parseFromString(e,`text/html`),r={html:{},css:[],js:[]};n.head.querySelectorAll(`link[rel="stylesheet"]`).forEach(e=>{r.css.push(e.outerHTML)}),n.querySelectorAll(`style`).forEach(e=>{r.css.push(e.outerHTML)}),n.querySelectorAll(`script`).forEach(e=>{r.js.push(e.outerHTML)});for(let e of t){let t=n.querySelector(`[data-block="${e}"]`);t&&(r.html[e]=t.outerHTML)}return r}function Dwe(e,t){let n=[],r=[],i=!1,a=R0(async()=>{if(n.length===0||i)return;let t=[...n];r.length>0&&(t.unshift(...r),r=[]),n=[],i=!0;let o=Swe(t),s=ppe(o);s.onSuccess(t=>{let n=e.engine.getPage().blocks,r=Ewe(t,wwe([...o.changes.added||[],...o.changes.updated||[],...Object.keys(o.changes.moved||{})],n));e.preview.sendMessage(`updates.effects`,{effects:r,...o})}),s.onError(n=>{n.name!==`AbortError`&&(console.error(`Failed to persist changes`,n),e.ui.toast({type:`error`,title:xwe(`Failed to save changes`)}),r=t)}),s.onFinish(()=>{i=!1,n.length>0&&a()}),await s.execute()},300);function o(r){Cwe(r)&&([...r.changes.added,...r.changes.updated].forEach(t=>{let n=r.blocks[t];n.ghost&&n.parentId&&!r.blocks[n.parentId]&&(r.blocks[n.parentId]=e.engine.getBlockById(n.parentId))}),n.push(r),t.haveEdits=!0,a())}function s(t){let{blockId:n,key:r,value:i,oldValue:a}=t,o=e.engine.getBlockById(n);e.preview.sendMessage(`block.property.updated`,{block:o,key:r,value:i,oldValue:a})}e.engine.on(`block:property:set`,s),e.events.on(`updates`,o)}function Owe(e){e.events.on(`ui:block:select`,({blockId:e})=>{uX(`block`,e)}),e.events.on(`ui:block:clear-selection`,()=>{fX(`block`)})}function kwe(e,t,n){let r=dX(`template`),i=r&&n.templates?.find(e=>e.template===r);if(i){let n=new URL(i.previewUrl);n.searchParams.set(`_designMode`,t.theme?.code),n.searchParams.set(`channel`,t.channel),n.searchParams.set(`locale`,t.locale),e.preview.loadUrl(n.href)}else e.preview.loadUrl(n.storefrontUrl)}function Awe(e,t,n){Owe(e),kwe(e,t,n)}function jwe(e,t){e.preview.onReady(()=>{e.preview.onMessage(`craftile.preview.page-data`,({pageData:n})=>{lX.default.done(),e.engine.setPage(n.content),t.pageData={url:n.template.url,template:n.template.name,sources:n.template.sources,settings:n.settings},t.theme&&n.settings&&(t.theme.settings=n.settings),n.preloadedModels&&lz(n.preloadedModels);let r=dX(`block`);r&&(e.engine.getBlockById(r)?e.ui.setSelectedBlock(r):fX(`block`))})})}var Y9=Symbol(`CRAFTILE_EDITOR`);function Mwe(e){return({vueApp:t,editor:n})=>{t.provide(Y9,n);let{state:r}=cz();bwe(n.ui),jwe(n,r),Dwe(n,r),Awe(n,r,e)}}var X9=new Map;function Nwe(e,t){if(t===e||t===`*`)return!0;if(t.endsWith(`/*`)){let n=t.slice(0,-2);return e.startsWith(n+`/`)||e===n}if(t.startsWith(`*/`)){let n=t.slice(2);return e.endsWith(`/`+n)||e===n}let n=X9.get(t);if(!n)try{let e=t.replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`);n=RegExp(`^${e}$`),X9.set(t,n)}catch{return!1}return n.test(e)}function Z9(e,t){return t.some(t=>Nwe(e,t))}function Q9(e,t){let n=e.regions&&e.regions.length>0,r=e.templates&&e.templates.length>0;if(!n&&!r)return!1;let i=!0;n&&(i=t.region?Z9(t.region,e.regions):!1);let a=!0;return r&&(a=t.template?Z9(t.template,e.templates):!1),i&&a}var{blockSchemas:Pwe}=window.editorConfig,Fwe=sz({channels:window.editorConfig.channels,channel:window.editorConfig.defaultChannel,theme:window.editorConfig.theme,templates:window.editorConfig.templates||[],haveEdits:window.editorConfig.haveEdits}),{fetchFonts:Iwe}=i2();Iwe(),lX.default.configure({showSpinner:!1,minimum:.1,speed:400,trickleSpeed:500});var $9=vD({el:`#app`,blockSchemas:Pwe,devices:{presets:[{id:`mobile`,label:`Mobile`,width:376,icon:`mobile`},{id:`tablet`,label:`Tablet`,width:767,icon:`tablet`},{id:`desktop`,label:`Desktop`,width:1280,icon:`desktop`}]},i18n:window.editorConfig.messages.craftile,plugins:[az,Mwe(window.editorConfig)],blockLabelFunction(e,t){let n=null;for(let r of[Lwe])if(n=r(e,t))break;return n??``},blockFilterFunction(e,t){let n={template:Fwe.pageData?.template,region:t.regionId};return Q9(e.meta?.disabledOn||{},n)||((e.meta?.enabledOn?.regions?.length??0)>0||(e.meta?.enabledOn?.templates?.length??0)>0)&&!Q9(e.meta.enabledOn,n)?!1:t.parentId?!e.meta?.isSection:e.meta?.isSection}});window.craftileEditor=$9,window.Vue=fl,document.addEventListener(`DOMContentLoaded`,()=>{lX.default.start(),document.dispatchEvent(new CustomEvent(`visual:editor:ready`,{detail:{editor:$9}}))});var Lwe=(e,t)=>{if(!t)return null;let n=t.properties.find(e=>e.type===`text`);if(!n)return null;let r=e.properties[n.id];return r?Rwe(r):null};function Rwe(e){let t=new DOMParser().parseFromString(e,`text/html`).body.textContent;return t===`undefined`||t===`null`?e:t} \ No newline at end of file diff --git a/public/vendor/bagistoplus/visual/editor/assets/index-DgLZ2f7A.css b/public/vendor/bagistoplus/visual/editor/assets/index-DgLZ2f7A.css new file mode 100644 index 00000000..bd342596 --- /dev/null +++ b/public/vendor/bagistoplus/visual/editor/assets/index-DgLZ2f7A.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{.__craftile,.__craftile :host{--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-green-400:oklch(79.2% .209 151.711);--color-blue-50:oklch(97% .014 254.604);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--animate-fade-in:fadeIn .25s ease-out;--animate-fade-out:fadeOut .25s ease-out}}@layer base,components;@layer utilities{.__craftile .pointer-events-none{pointer-events:none}.__craftile .absolute{position:absolute}.__craftile .fixed{position:fixed}.__craftile .relative{position:relative}.__craftile .inset-0{inset:calc(var(--spacing) * 0)}.__craftile .inset-1{inset:calc(var(--spacing) * 1)}.__craftile .-top-2{top:calc(var(--spacing) * -2)}.__craftile .-top-6{top:calc(var(--spacing) * -6)}.__craftile .top-0{top:calc(var(--spacing) * 0)}.__craftile .top-1\/2{top:50%}.__craftile .top-2{top:calc(var(--spacing) * 2)}.__craftile .top-2\.5{top:calc(var(--spacing) * 2.5)}.__craftile .top-4{top:calc(var(--spacing) * 4)}.__craftile .top-14{top:calc(var(--spacing) * 14)}.__craftile .-right-2{right:calc(var(--spacing) * -2)}.__craftile .right-0{right:calc(var(--spacing) * 0)}.__craftile .right-1{right:calc(var(--spacing) * 1)}.__craftile .right-2{right:calc(var(--spacing) * 2)}.__craftile .right-4{right:calc(var(--spacing) * 4)}.__craftile .bottom-0{bottom:calc(var(--spacing) * 0)}.__craftile .left-3{left:calc(var(--spacing) * 3)}.__craftile .left-14{left:calc(var(--spacing) * 14)}.__craftile .\!z-10{z-index:10!important}.__craftile .\!z-20{z-index:20!important}.__craftile .z-10{z-index:10}.__craftile .z-50{z-index:50}.__craftile .z-\[100\]{z-index:100}.__craftile .col-span-3{grid-column:span 3/span 3}.__craftile .col-start-1{grid-column-start:1}.__craftile .col-start-2{grid-column-start:2}.__craftile .row-span-3{grid-row:span 3/span 3}.__craftile .row-start-1{grid-row-start:1}.__craftile .row-start-2{grid-row-start:2}.__craftile .row-start-3{grid-row-start:3}.__craftile .mx-2{margin-inline:calc(var(--spacing) * 2)}.__craftile .my-2{margin-block:calc(var(--spacing) * 2)}.__craftile .ms-2{margin-inline-start:calc(var(--spacing) * 2)}.__craftile .prose{color:var(--tw-prose-body);max-width:65ch}.__craftile .prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.__craftile .prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.__craftile .prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.__craftile .prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.__craftile .prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.__craftile .prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.__craftile .prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.__craftile .prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.__craftile .prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.__craftile .prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.__craftile .prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.__craftile .prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.__craftile .prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.__craftile .prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.__craftile .prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.__craftile .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.__craftile .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.__craftile .prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.__craftile .prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.__craftile .prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.__craftile .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.__craftile .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.__craftile .prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.__craftile .prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.__craftile .prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.__craftile .prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.__craftile .prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.__craftile .prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.__craftile .prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.__craftile .prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.__craftile .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.__craftile .prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.__craftile .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.__craftile .prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.__craftile .prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.__craftile .prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.__craftile .prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.__craftile .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.__craftile .prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.__craftile .prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.__craftile .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.__craftile .prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.__craftile .prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.__craftile .prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.__craftile .prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.__craftile .prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.__craftile .prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.__craftile .prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.__craftile .prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.__craftile .prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.__craftile .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.__craftile .prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.__craftile .prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.__craftile .prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.__craftile .prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.__craftile .prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.__craftile .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.__craftile .prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.__craftile .prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.__craftile .prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.__craftile .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.__craftile .prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.__craftile .prose-sm{font-size:.875rem;line-height:1.71429}.__craftile .prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.__craftile .prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em;font-size:1.28571em;line-height:1.55556}.__craftile .prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.11111em}.__craftile .prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.8em;font-size:2.14286em;line-height:1.2}.__craftile .prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.6em;margin-bottom:.8em;font-size:1.42857em;line-height:1.4}.__craftile .prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.55556em;margin-bottom:.444444em;font-size:1.28571em;line-height:1.55556}.__craftile .prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.42857em;margin-bottom:.571429em;line-height:1.42857}.__craftile .prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.142857em;padding-inline-end:.357143em;padding-bottom:.142857em;border-radius:.3125rem;padding-inline-start:.357143em;font-size:.857143em}.__craftile .prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em}.__craftile .prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.__craftile .prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.__craftile .prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;border-radius:.25rem;margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em;font-size:.857143em;line-height:1.66667}.__craftile .prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em;padding-inline-start:1.57143em}.__craftile .prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;margin-bottom:.285714em}.__craftile .prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.428571em}.__craftile .prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.__craftile .prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.__craftile .prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.__craftile .prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.__craftile .prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.__craftile .prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.__craftile .prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;padding-inline-start:1.57143em}.__craftile .prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.85714em;margin-bottom:2.85714em}.__craftile .prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.__craftile .prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em;line-height:1.5}.__craftile .prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.__craftile .prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.__craftile .prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.__craftile .prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.__craftile .prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.__craftile .prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.__craftile .prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;font-size:.857143em;line-height:1.33333}.__craftile .prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.__craftile .prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.__craftile .-mt-1{margin-top:calc(var(--spacing) * -1)}.__craftile .mt-1{margin-top:calc(var(--spacing) * 1)}.__craftile .mt-2{margin-top:calc(var(--spacing) * 2)}.__craftile .mt-4{margin-top:calc(var(--spacing) * 4)}.__craftile .mr-1{margin-right:calc(var(--spacing) * 1)}.__craftile .mb-1{margin-bottom:calc(var(--spacing) * 1)}.__craftile .mb-4{margin-bottom:calc(var(--spacing) * 4)}.__craftile .mb-px{margin-bottom:1px}.__craftile .ml-1{margin-left:calc(var(--spacing) * 1)}.__craftile .ml-auto{margin-left:auto}.__craftile .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .hidden{display:none}.__craftile .inline{display:inline}.__craftile .inline-block{display:inline-block}.__craftile .inline-flex{display:inline-flex}.__craftile .aspect-square{aspect-ratio:1}.__craftile .h-1{height:calc(var(--spacing) * 1)}.__craftile .h-2{height:calc(var(--spacing) * 2)}.__craftile .h-2\.5{height:calc(var(--spacing) * 2.5)}.__craftile .h-3{height:calc(var(--spacing) * 3)}.__craftile .h-4{height:calc(var(--spacing) * 4)}.__craftile .h-5{height:calc(var(--spacing) * 5)}.__craftile .h-6{height:calc(var(--spacing) * 6)}.__craftile .h-7{height:calc(var(--spacing) * 7)}.__craftile .h-8{height:calc(var(--spacing) * 8)}.__craftile .h-9{height:calc(var(--spacing) * 9)}.__craftile .h-10{height:calc(var(--spacing) * 10)}.__craftile .h-12{height:calc(var(--spacing) * 12)}.__craftile .h-20{height:calc(var(--spacing) * 20)}.__craftile .h-32{height:calc(var(--spacing) * 32)}.__craftile .h-36{height:calc(var(--spacing) * 36)}.__craftile .h-full{height:100%}.__craftile .max-h-80{max-height:calc(var(--spacing) * 80)}.__craftile .max-h-96{max-height:calc(var(--spacing) * 96)}.__craftile .max-h-\[360px\]{max-height:360px}.__craftile .min-h-0{min-height:calc(var(--spacing) * 0)}.__craftile .min-h-20{min-height:calc(var(--spacing) * 20)}.__craftile .min-h-24{min-height:calc(var(--spacing) * 24)}.__craftile .w-0{width:calc(var(--spacing) * 0)}.__craftile .w-2\.5{width:calc(var(--spacing) * 2.5)}.__craftile .w-3{width:calc(var(--spacing) * 3)}.__craftile .w-4{width:calc(var(--spacing) * 4)}.__craftile .w-5{width:calc(var(--spacing) * 5)}.__craftile .w-6{width:calc(var(--spacing) * 6)}.__craftile .w-7{width:calc(var(--spacing) * 7)}.__craftile .w-8{width:calc(var(--spacing) * 8)}.__craftile .w-56{width:calc(var(--spacing) * 56)}.__craftile .w-60{width:calc(var(--spacing) * 60)}.__craftile .w-64{width:calc(var(--spacing) * 64)}.__craftile .w-75{width:calc(var(--spacing) * 75)}.__craftile .w-\[var\(--reference-width\)\]{width:var(--reference-width)}.__craftile .w-full{width:100%}.__craftile .w-sm{width:var(--container-sm)}.__craftile .max-w-full{max-width:100%}.__craftile .\!min-w-auto{min-width:auto!important}.__craftile .min-w-0{min-width:calc(var(--spacing) * 0)}.__craftile .min-w-8{min-width:calc(var(--spacing) * 8)}.__craftile .min-w-10{min-width:calc(var(--spacing) * 10)}.__craftile .min-w-32{min-width:calc(var(--spacing) * 32)}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.__craftile .-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.__craftile .scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.__craftile .rotate-90{rotate:90deg}.__craftile .transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.__craftile .animate-spin{animation:var(--animate-spin)}.__craftile .cursor-crosshair{cursor:crosshair}.__craftile .cursor-default{cursor:default}.__craftile .cursor-move{cursor:move}.__craftile .cursor-pointer{cursor:pointer}.__craftile .touch-none{touch-action:none}.__craftile .appearance-none{appearance:none}.__craftile .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.__craftile .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.__craftile .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.__craftile .grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.__craftile .flex-col{flex-direction:column}.__craftile .items-center{align-items:center}.__craftile .items-stretch{align-items:stretch}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .justify-end{justify-content:flex-end}.__craftile .justify-start{justify-content:flex-start}.__craftile .gap-0\.5{gap:calc(var(--spacing) * .5)}.__craftile .gap-1{gap:calc(var(--spacing) * 1)}.__craftile .gap-1\.5{gap:calc(var(--spacing) * 1.5)}.__craftile .gap-2{gap:calc(var(--spacing) * 2)}.__craftile .gap-3{gap:calc(var(--spacing) * 3)}.__craftile .gap-4{gap:calc(var(--spacing) * 4)}.__craftile :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.__craftile :where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}.__craftile :where(.divide-zinc-200>:not(:last-child)){border-color:var(--color-zinc-200)}.__craftile .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.__craftile .overflow-hidden{overflow:hidden}.__craftile .overflow-y-auto{overflow-y:auto}.__craftile .overflow-y-hidden{overflow-y:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .rounded-sm{border-radius:var(--radius-sm)}.__craftile .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.__craftile .rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.__craftile .rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-2{border-style:var(--tw-border-style);border-width:2px}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.__craftile .border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-dashed{--tw-border-style:dashed;border-style:dashed}.__craftile .border-none{--tw-border-style:none;border-style:none}.__craftile .border-blue-300{border-color:var(--color-blue-300)}.__craftile .border-blue-400{border-color:var(--color-blue-400)}.__craftile .border-blue-500{border-color:var(--color-blue-500)}.__craftile .border-gray-300{border-color:var(--color-gray-300)}.__craftile .border-neutral-200{border-color:var(--color-neutral-200)}.__craftile .border-red-200{border-color:var(--color-red-200)}.__craftile .border-white{border-color:var(--color-white)}.__craftile .border-zinc-200{border-color:var(--color-zinc-200)}.__craftile .border-zinc-300{border-color:var(--color-zinc-300)}.__craftile .bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.__craftile .bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.__craftile .bg-blue-50{background-color:var(--color-blue-50)}.__craftile .bg-blue-500{background-color:var(--color-blue-500)}.__craftile .bg-gray-50{background-color:var(--color-gray-50)}.__craftile .bg-gray-100{background-color:var(--color-gray-100)}.__craftile .bg-neutral-100{background-color:var(--color-neutral-100)}.__craftile .bg-neutral-200{background-color:var(--color-neutral-200)}.__craftile .bg-transparent{background-color:#0000}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .bg-zinc-50\/50{background-color:#fafafa80}@supports (color:color-mix(in lab, red, red)){.__craftile .bg-zinc-50\/50{background-color:color-mix(in oklab, var(--color-zinc-50) 50%, transparent)}}.__craftile .bg-zinc-100{background-color:var(--color-zinc-100)}.__craftile .bg-zinc-200{background-color:var(--color-zinc-200)}.__craftile .bg-zinc-300{background-color:var(--color-zinc-300)}.__craftile .bg-zinc-700\/30{background-color:#3f3f464d}@supports (color:color-mix(in lab, red, red)){.__craftile .bg-zinc-700\/30{background-color:color-mix(in oklab, var(--color-zinc-700) 30%, transparent)}}.__craftile .bg-none{background-image:none}.__craftile .object-cover{object-fit:cover}.__craftile .object-center{object-position:center}.__craftile .p-0\.5{padding:calc(var(--spacing) * .5)}.__craftile .p-1{padding:calc(var(--spacing) * 1)}.__craftile .p-2{padding:calc(var(--spacing) * 2)}.__craftile .p-3{padding:calc(var(--spacing) * 3)}.__craftile .p-4{padding:calc(var(--spacing) * 4)}.__craftile .p-px{padding:1px}.__craftile .px-0\.5{padding-inline:calc(var(--spacing) * .5)}.__craftile .px-2{padding-inline:calc(var(--spacing) * 2)}.__craftile .px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.__craftile .px-3{padding-inline:calc(var(--spacing) * 3)}.__craftile .px-4{padding-inline:calc(var(--spacing) * 4)}.__craftile .py-1{padding-block:calc(var(--spacing) * 1)}.__craftile .py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.__craftile .py-2{padding-block:calc(var(--spacing) * 2)}.__craftile .py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.__craftile .py-3{padding-block:calc(var(--spacing) * 3)}.__craftile .py-6{padding-block:calc(var(--spacing) * 6)}.__craftile .pt-2{padding-top:calc(var(--spacing) * 2)}.__craftile .pt-4{padding-top:calc(var(--spacing) * 4)}.__craftile .pr-3{padding-right:calc(var(--spacing) * 3)}.__craftile .pl-1{padding-left:calc(var(--spacing) * 1)}.__craftile .pl-2{padding-left:calc(var(--spacing) * 2)}.__craftile .pl-9{padding-left:calc(var(--spacing) * 9)}.__craftile .text-center{text-align:center}.__craftile .text-left{text-align:left}.__craftile .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.__craftile .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.__craftile .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.__craftile .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.__craftile .text-blue-400{color:var(--color-blue-400)}.__craftile .text-blue-500{color:var(--color-blue-500)}.__craftile .text-blue-600{color:var(--color-blue-600)}.__craftile .text-gray-400{color:var(--color-gray-400)}.__craftile .text-gray-500{color:var(--color-gray-500)}.__craftile .text-gray-600{color:var(--color-gray-600)}.__craftile .text-gray-700{color:var(--color-gray-700)}.__craftile .text-gray-900{color:var(--color-gray-900)}.__craftile .text-green-400{color:var(--color-green-400)}.__craftile .text-neutral-700{color:var(--color-neutral-700)}.__craftile .text-red-400{color:var(--color-red-400)}.__craftile .text-red-600{color:var(--color-red-600)}.__craftile .text-white{color:var(--color-white)}.__craftile .text-zinc-200{color:var(--color-zinc-200)}.__craftile .text-zinc-400{color:var(--color-zinc-400)}.__craftile .text-zinc-500{color:var(--color-zinc-500)}.__craftile .text-zinc-600{color:var(--color-zinc-600)}.__craftile .text-zinc-700{color:var(--color-zinc-700)}.__craftile .capitalize{text-transform:capitalize}.__craftile .lowercase{text-transform:lowercase}.__craftile .uppercase{text-transform:uppercase}.__craftile .italic{font-style:italic}.__craftile .underline{text-decoration-line:underline}.__craftile .opacity-0{opacity:0}.__craftile .opacity-25{opacity:.25}.__craftile .opacity-75{opacity:.75}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .ring-blue-500{--tw-ring-color:var(--color-blue-500)}.__craftile .outline-0{outline-style:var(--tw-outline-style);outline-width:0}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .duration-200{--tw-duration:.2s;transition-duration:.2s}.__craftile .forced-color-adjust-none{forced-color-adjust:none}.__craftile .prose-gray{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733)}.__craftile .outline-none{--tw-outline-style:none;outline-style:none}.__craftile .select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.__craftile .group-hover\:block:is(:where(.group):hover *){display:block}.__craftile .group-hover\:flex:is(:where(.group):hover *){display:flex}.__craftile .group-hover\:bg-neutral-900\/10:is(:where(.group):hover *){background-color:#1717171a}@supports (color:color-mix(in lab, red, red)){.__craftile .group-hover\:bg-neutral-900\/10:is(:where(.group):hover *){background-color:color-mix(in oklab, var(--color-neutral-900) 10%, transparent)}}.__craftile .group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.__craftile .first\:border-t:first-child{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .focus-within\:shadow:focus-within{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .focus-within\:ring:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .focus-within\:ring-zinc-700:focus-within{--tw-ring-color:var(--color-zinc-700)}@media (hover:hover){.__craftile .hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.__craftile .hover\:border-red-300:hover{border-color:var(--color-red-300)}.__craftile .hover\:border-red-400:hover{border-color:var(--color-red-400)}.__craftile .hover\:border-zinc-400:hover{border-color:var(--color-zinc-400)}.__craftile .hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.__craftile .hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.__craftile .hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.__craftile .hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.__craftile .hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.__craftile .hover\:bg-neutral-100:hover{background-color:var(--color-neutral-100)}.__craftile .hover\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.__craftile .hover\:bg-neutral-300:hover{background-color:var(--color-neutral-300)}.__craftile .hover\:bg-red-50:hover{background-color:var(--color-red-50)}.__craftile .hover\:bg-zinc-50:hover{background-color:var(--color-zinc-50)}.__craftile .hover\:bg-zinc-100:hover{background-color:var(--color-zinc-100)}.__craftile .hover\:bg-zinc-200:hover{background-color:var(--color-zinc-200)}.__craftile .hover\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.__craftile .hover\:text-blue-800:hover{color:var(--color-blue-800)}.__craftile .hover\:text-gray-800:hover{color:var(--color-gray-800)}.__craftile .hover\:text-red-600:hover{color:var(--color-red-600)}.__craftile .hover\:text-red-700:hover{color:var(--color-red-700)}}.__craftile .focus\:border-transparent:focus{border-color:#0000}.__craftile .focus\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.__craftile .focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\:ring-zinc-700:focus{--tw-ring-color:var(--color-zinc-700)}.__craftile .focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .active\:cursor-grabbing:active{cursor:grabbing}.__craftile .data-\[state\=closed\]\:hidden[data-state=closed]{display:none}.__craftile .data-\[state\=closed\]\:animate-fade-out[data-state=closed]{animation:var(--animate-fade-out)}.__craftile .data-\[state\=open\]\:rotate-180[data-state=open]{rotate:180deg}.__craftile .data-\[state\=open\]\:animate-fade-in[data-state=open]{animation:var(--animate-fade-in)}.__craftile .\[\&\>button\]\:rounded-md>button{border-radius:var(--radius-md)}.__craftile .\[\&\>button\]\:p-1>button{padding:calc(var(--spacing) * 1)}.__craftile .\[\&\>button\:hover\]\:bg-zinc-300>button:hover{background-color:var(--color-zinc-300)}.__craftile .\[\&\>div\]\:max-h-48>div{max-height:calc(var(--spacing) * 48)}.__craftile .\[\&\>div\]\:overflow-y-auto>div{overflow-y:auto}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}#nprogress .peg{opacity:1;width:100px;height:100%;display:block;position:absolute;right:0;transform:rotate(3deg)translateY(-4px);box-shadow:0 0 10px #29d,0 0 5px #29d}#nprogress .spinner{z-index:1031;display:block;position:fixed;top:15px;right:15px}#nprogress .spinner-icon{box-sizing:border-box;border:2px solid #0000;border-color:#29d #0000 #0000 #29d;border-radius:50%;width:18px;height:18px;animation:.4s linear infinite nprogress-spinner}.nprogress-custom-parent{position:relative;overflow:hidden}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#nprogress{pointer-events:none}#nprogress .bar{z-index:99999;background:#3b82f6;width:100%;height:2px;position:fixed;top:54px;left:0}#nprogress .peg{opacity:1;width:100px;height:100%;display:none;position:absolute;right:0;box-shadow:0 0 10px #3b82f6,0 0 5px #3b82f6} diff --git a/public/vendor/bagistoplus/visual/editor/assets/index-GXOfLATq.js b/public/vendor/bagistoplus/visual/editor/assets/index-GXOfLATq.js deleted file mode 100644 index 531ad82c..00000000 --- a/public/vendor/bagistoplus/visual/editor/assets/index-GXOfLATq.js +++ /dev/null @@ -1,100 +0,0 @@ -function xm(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const We={},mc=[],Ur=()=>{},pT=()=>!1,Ap=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),M1=e=>e.startsWith("onUpdate:"),ft=Object.assign,D1=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},PD=Object.prototype.hasOwnProperty,it=(e,t)=>PD.call(e,t),ke=Array.isArray,vc=e=>Qc(e)==="[object Map]",dl=e=>Qc(e)==="[object Set]",A_=e=>Qc(e)==="[object Date]",$D=e=>Qc(e)==="[object RegExp]",Se=e=>typeof e=="function",kt=e=>typeof e=="string",ao=e=>typeof e=="symbol",pt=e=>e!==null&&typeof e=="object",L1=e=>(pt(e)||Se(e))&&Se(e.then)&&Se(e.catch),fT=Object.prototype.toString,Qc=e=>fT.call(e),RD=e=>Qc(e).slice(8,-1),wm=e=>Qc(e)==="[object Object]",_m=e=>kt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bc=xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),km=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},AD=/-\w/g,_n=km(e=>e.replace(AD,t=>t.slice(1).toUpperCase())),ND=/\B([A-Z])/g,sr=km(e=>e.replace(ND,"-$1").toLowerCase()),Np=km(e=>e.charAt(0).toUpperCase()+e.slice(1)),yd=km(e=>e?`on${Np(e)}`:""),qn=(e,t)=>!Object.is(e,t),yc=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Cm=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Kh=e=>{const t=kt(e)?Number(e):NaN;return isNaN(t)?e:t};let N_;const Em=()=>N_||(N_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),MD="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",DD=xm(MD);function Yt(e){if(ke(e)){const t={};for(let n=0;n{if(n){const r=n.split(VD);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ne(e){let t="";if(kt(e))t=e;else if(ke(e))for(let n=0;njs(n,t))}const mT=e=>!!(e&&e.__v_isRef===!0),j=e=>kt(e)?e:e==null?"":ke(e)||pt(e)&&(e.toString===fT||!Se(e.toString))?mT(e)?j(e.value):JSON.stringify(e,vT,2):String(e),vT=(e,t)=>mT(t)?vT(e,t.value):vc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[Xv(r,i)+" =>"]=o,n),{})}:dl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Xv(n))}:ao(t)?Xv(t):pt(t)&&!ke(t)&&!wm(t)?String(t):t,Xv=(e,t="")=>{var n;return ao(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function jD(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}let Sn;class V1{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Sn,!t&&Sn&&(this.index=(Sn.scopes||(Sn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Sn=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(wd){let t=wd;for(wd=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;xd;){let t=xd;for(xd=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function wT(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _T(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),H1(r),qD(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function wy(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kT(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kT(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Wd)||(e.globalVersion=Wd,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wy(e))))return;e.flags|=2;const t=e.dep,n=xt,r=io;xt=e,io=!0;try{wT(e);const o=e.fn(e._value);(t.version===0||qn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{xt=n,io=r,_T(e),e.flags&=-3}}function H1(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)H1(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function qD(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function KD(e,t){e.effect instanceof Gd&&(e=e.effect.fn);const n=new Gd(e);t&&ft(n,t);try{n.run()}catch(o){throw n.stop(),o}const r=n.run.bind(n);return r.effect=n,r}function YD(e){e.effect.stop()}let io=!0;const CT=[];function Mi(){CT.push(io),io=!1}function Di(){const e=CT.pop();io=e===void 0?!0:e}function M_(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xt;xt=void 0;try{t()}finally{xt=n}}}let Wd=0;class XD{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Im{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xt||!io||xt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xt)n=this.activeLink=new XD(xt,this),xt.deps?(n.prevDep=xt.depsTail,xt.depsTail.nextDep=n,xt.depsTail=n):xt.deps=xt.depsTail=n,ET(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=xt.depsTail,n.nextDep=void 0,xt.depsTail.nextDep=n,xt.depsTail=n,xt.deps===n&&(xt.deps=r)}return n}trigger(t){this.version++,Wd++,this.notify(t)}notify(t){F1();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{B1()}}}function ET(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ET(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Yh=new WeakMap,ja=Symbol(""),_y=Symbol(""),qd=Symbol("");function $n(e,t,n){if(io&&xt){let r=Yh.get(e);r||Yh.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Im),o.map=r,o.key=n),o.track()}}function Ci(e,t,n,r,o,i){const s=Yh.get(e);if(!s){Wd++;return}const a=l=>{l&&l.trigger()};if(F1(),t==="clear")s.forEach(a);else{const l=ke(e),c=l&&_m(n);if(l&&n==="length"){const u=Number(r);s.forEach((p,h)=>{(h==="length"||h===qd||!ao(h)&&h>=u)&&a(p)})}else switch((n!==void 0||s.has(void 0))&&a(s.get(n)),c&&a(s.get(qd)),t){case"add":l?c&&a(s.get("length")):(a(s.get(ja)),vc(e)&&a(s.get(_y)));break;case"delete":l||(a(s.get(ja)),vc(e)&&a(s.get(_y)));break;case"set":vc(e)&&a(s.get(ja));break}}B1()}function JD(e,t){const n=Yh.get(e);return n&&n.get(t)}function Il(e){const t=He(e);return t===e?t:($n(t,"iterate",qd),lr(e)?t:t.map(lo))}function Tm(e){return $n(e=He(e),"iterate",qd),e}function ms(e,t){return Jo(e)?Si(e)?Rc(lo(t)):Rc(t):lo(t)}const ZD={__proto__:null,[Symbol.iterator](){return Zv(this,Symbol.iterator,e=>ms(this,e))},concat(...e){return Il(this).concat(...e.map(t=>ke(t)?Il(t):t))},entries(){return Zv(this,"entries",e=>(e[1]=ms(this,e[1]),e))},every(e,t){return fi(this,"every",e,t,void 0,arguments)},filter(e,t){return fi(this,"filter",e,t,n=>n.map(r=>ms(this,r)),arguments)},find(e,t){return fi(this,"find",e,t,n=>ms(this,n),arguments)},findIndex(e,t){return fi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return fi(this,"findLast",e,t,n=>ms(this,n),arguments)},findLastIndex(e,t){return fi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return fi(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qv(this,"includes",e)},indexOf(...e){return Qv(this,"indexOf",e)},join(e){return Il(this).join(e)},lastIndexOf(...e){return Qv(this,"lastIndexOf",e)},map(e,t){return fi(this,"map",e,t,void 0,arguments)},pop(){return Cu(this,"pop")},push(...e){return Cu(this,"push",e)},reduce(e,...t){return D_(this,"reduce",e,t)},reduceRight(e,...t){return D_(this,"reduceRight",e,t)},shift(){return Cu(this,"shift")},some(e,t){return fi(this,"some",e,t,void 0,arguments)},splice(...e){return Cu(this,"splice",e)},toReversed(){return Il(this).toReversed()},toSorted(e){return Il(this).toSorted(e)},toSpliced(...e){return Il(this).toSpliced(...e)},unshift(...e){return Cu(this,"unshift",e)},values(){return Zv(this,"values",e=>ms(this,e))}};function Zv(e,t,n){const r=Tm(e),o=r[t]();return r!==e&&!lr(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const QD=Array.prototype;function fi(e,t,n,r,o,i){const s=Tm(e),a=s!==e&&!lr(e),l=s[t];if(l!==QD[t]){const p=l.apply(e,i);return a?lo(p):p}let c=n;s!==e&&(a?c=function(p,h){return n.call(this,ms(e,p),h,e)}:n.length>2&&(c=function(p,h){return n.call(this,p,h,e)}));const u=l.call(s,c,r);return a&&o?o(u):u}function D_(e,t,n,r){const o=Tm(e);let i=n;return o!==e&&(lr(e)?n.length>3&&(i=function(s,a,l){return n.call(this,s,a,l,e)}):i=function(s,a,l){return n.call(this,s,ms(e,a),l,e)}),o[t](i,...r)}function Qv(e,t,n){const r=He(e);$n(r,"iterate",qd);const o=r[t](...n);return(o===-1||o===!1)&&Mp(n[0])?(n[0]=He(n[0]),r[t](...n)):o}function Cu(e,t,n=[]){Mi(),F1();const r=He(e)[t].apply(e,n);return B1(),Di(),r}const eL=xm("__proto__,__v_isRef,__isVue"),OT=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ao));function tL(e){ao(e)||(e=String(e));const t=He(this);return $n(t,"has",e),t.hasOwnProperty(e)}class IT{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?AT:RT:i?$T:PT).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=ke(t);if(!o){let l;if(s&&(l=ZD[n]))return l;if(n==="hasOwnProperty")return tL}const a=Reflect.get(t,n,Ce(t)?t:r);if((ao(n)?OT.has(n):eL(n))||(o||$n(t,"get",n),i))return a;if(Ce(a)){const l=s&&_m(n)?a:a.value;return o&&pt(l)?Kd(l):l}return pt(a)?o?Kd(a):Tr(a):a}}class TT extends IT{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const s=ke(t)&&_m(n);if(!this._isShallow){const c=Jo(i);if(!lr(r)&&!Jo(r)&&(i=He(i),r=He(r)),!s&&Ce(i)&&!Ce(r))return c||(i.value=r),!0}const a=s?Number(n)e,vf=e=>Reflect.getPrototypeOf(e);function sL(e,t,n){return function(...r){const o=this.__v_raw,i=He(o),s=vc(i),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=o[e](...r),u=n?ky:t?Rc:lo;return!t&&$n(i,"iterate",l?_y:ja),{next(){const{value:p,done:h}=c.next();return h?{value:p,done:h}:{value:a?[u(p[0]),u(p[1])]:u(p),done:h}},[Symbol.iterator](){return this}}}}function bf(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function aL(e,t){const n={get(o){const i=this.__v_raw,s=He(i),a=He(o);e||(qn(o,a)&&$n(s,"get",o),$n(s,"get",a));const{has:l}=vf(s),c=t?ky:e?Rc:lo;if(l.call(s,o))return c(i.get(o));if(l.call(s,a))return c(i.get(a));i!==s&&i.get(o)},get size(){const o=this.__v_raw;return!e&&$n(He(o),"iterate",ja),o.size},has(o){const i=this.__v_raw,s=He(i),a=He(o);return e||(qn(o,a)&&$n(s,"has",o),$n(s,"has",a)),o===a?i.has(o):i.has(o)||i.has(a)},forEach(o,i){const s=this,a=s.__v_raw,l=He(a),c=t?ky:e?Rc:lo;return!e&&$n(l,"iterate",ja),a.forEach((u,p)=>o.call(i,c(u),c(p),s))}};return ft(n,e?{add:bf("add"),set:bf("set"),delete:bf("delete"),clear:bf("clear")}:{add(o){!t&&!lr(o)&&!Jo(o)&&(o=He(o));const i=He(this);return vf(i).has.call(i,o)||(i.add(o),Ci(i,"add",o,o)),this},set(o,i){!t&&!lr(i)&&!Jo(i)&&(i=He(i));const s=He(this),{has:a,get:l}=vf(s);let c=a.call(s,o);c||(o=He(o),c=a.call(s,o));const u=l.call(s,o);return s.set(o,i),c?qn(i,u)&&Ci(s,"set",o,i):Ci(s,"add",o,i),this},delete(o){const i=He(this),{has:s,get:a}=vf(i);let l=s.call(i,o);l||(o=He(o),l=s.call(i,o)),a&&a.call(i,o);const c=i.delete(o);return l&&Ci(i,"delete",o,void 0),c},clear(){const o=He(this),i=o.size!==0,s=o.clear();return i&&Ci(o,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=sL(o,e,t)}),n}function Sm(e,t){const n=aL(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(it(n,o)&&o in r?n:r,o,i)}const lL={get:Sm(!1,!1)},cL={get:Sm(!1,!0)},uL={get:Sm(!0,!1)},dL={get:Sm(!0,!0)},PT=new WeakMap,$T=new WeakMap,RT=new WeakMap,AT=new WeakMap;function pL(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fL(e){return e.__v_skip||!Object.isExtensible(e)?0:pL(RD(e))}function Tr(e){return Jo(e)?e:Pm(e,!1,nL,lL,PT)}function NT(e){return Pm(e,!1,oL,cL,$T)}function Kd(e){return Pm(e,!0,rL,uL,RT)}function hL(e){return Pm(e,!0,iL,dL,AT)}function Pm(e,t,n,r,o){if(!pt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=fL(e);if(i===0)return e;const s=o.get(e);if(s)return s;const a=new Proxy(e,i===2?r:n);return o.set(e,a),a}function Si(e){return Jo(e)?Si(e.__v_raw):!!(e&&e.__v_isReactive)}function Jo(e){return!!(e&&e.__v_isReadonly)}function lr(e){return!!(e&&e.__v_isShallow)}function Mp(e){return e?!!e.__v_raw:!1}function He(e){const t=e&&e.__v_raw;return t?He(t):e}function fe(e){return!it(e,"__v_skip")&&Object.isExtensible(e)&&hT(e,"__v_skip",!0),e}const lo=e=>pt(e)?Tr(e):e,Rc=e=>pt(e)?Kd(e):e;function Ce(e){return e?e.__v_isRef===!0:!1}function Q(e){return MT(e,!1)}function co(e){return MT(e,!0)}function MT(e,t){return Ce(e)?e:new gL(e,t)}class gL{constructor(t,n){this.dep=new Im,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:He(t),this._value=n?t:lo(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||lr(t)||Jo(t);t=r?t:He(t),qn(t,n)&&(this._rawValue=t,this._value=r?t:lo(t),this.dep.trigger())}}function mL(e){e.dep&&e.dep.trigger()}function d(e){return Ce(e)?e.value:e}function pe(e){return Se(e)?e():d(e)}const vL={get:(e,t,n)=>t==="__v_raw"?e:d(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Ce(o)&&!Ce(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function z1(e){return Si(e)?e:new Proxy(e,vL)}class bL{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Im,{get:r,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function U1(e){return new bL(e)}function j1(e){const t=ke(e)?new Array(e.length):{};for(const n in e)t[n]=DT(e,n);return t}class yL{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=He(t);let o=!0,i=t;if(!ke(t)||!_m(String(n)))do o=!Mp(i)||lr(i);while(o&&(i=i.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=d(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ce(this._raw[this._key])){const n=this._object[this._key];if(Ce(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return JD(this._raw,this._key)}}class xL{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function wL(e,t,n){return Ce(e)?e:Se(e)?new xL(e):pt(e)&&arguments.length>1?DT(e,t,n):Q(e)}function DT(e,t,n){return new yL(e,t,n)}class _L{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Im(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wd-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&xt!==this)return xT(this,!0),!0}get value(){const t=this.dep.track();return kT(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function kL(e,t,n=!1){let r,o;return Se(e)?r=e:(r=e.get,o=e.set),new _L(r,o,n)}const CL={GET:"get",HAS:"has",ITERATE:"iterate"},EL={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},yf={},Xh=new WeakMap;let vs;function OL(){return vs}function LT(e,t=!1,n=vs){if(n){let r=Xh.get(n);r||Xh.set(n,r=[]),r.push(e)}}function IL(e,t,n=We){const{immediate:r,deep:o,once:i,scheduler:s,augmentJob:a,call:l}=n,c=v=>o?v:lr(v)||o===!1||o===0?Ei(v,1):Ei(v);let u,p,h,f,g=!1,m=!1;if(Ce(e)?(p=()=>e.value,g=lr(e)):Si(e)?(p=()=>c(e),g=!0):ke(e)?(m=!0,g=e.some(v=>Si(v)||lr(v)),p=()=>e.map(v=>{if(Ce(v))return v.value;if(Si(v))return c(v);if(Se(v))return l?l(v,2):v()})):Se(e)?t?p=l?()=>l(e,2):e:p=()=>{if(h){Mi();try{h()}finally{Di()}}const v=vs;vs=u;try{return l?l(e,3,[f]):e(f)}finally{vs=v}}:p=Ur,t&&o){const v=p,_=o===!0?1/0:o;p=()=>Ei(v(),_)}const b=bT(),w=()=>{u.stop(),b&&b.active&&D1(b.effects,u)};if(i&&t){const v=t;t=(..._)=>{v(..._),w()}}let E=m?new Array(e.length).fill(yf):yf;const k=v=>{if(!(!(u.flags&1)||!u.dirty&&!v))if(t){const _=u.run();if(o||g||(m?_.some((T,N)=>qn(T,E[N])):qn(_,E))){h&&h();const T=vs;vs=u;try{const N=[_,E===yf?void 0:m&&E[0]===yf?[]:E,f];E=_,l?l(t,3,N):t(...N)}finally{vs=T}}}else u.run()};return a&&a(k),u=new Gd(p),u.scheduler=s?()=>s(k,!1):k,f=v=>LT(v,!1,u),h=u.onStop=()=>{const v=Xh.get(u);if(v){if(l)l(v,4);else for(const _ of v)_();Xh.delete(u)}},t?r?k(!0):E=u.run():s?s(k.bind(null,!0),!0):u.run(),w.pause=u.pause.bind(u),w.resume=u.resume.bind(u),w.stop=w,w}function Ei(e,t=1/0,n){if(t<=0||!pt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ce(e))Ei(e.value,t,n);else if(ke(e))for(let r=0;r{Ei(r,t,n)});else if(wm(e)){for(const r in e)Ei(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ei(e[r],t,n)}return e}const VT=[];function TL(e){VT.push(e)}function SL(){VT.pop()}function PL(e,t){}const $L={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},RL={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function eu(e,t,n,r){try{return r?e(...r):e()}catch(o){pl(o,t,n)}}function qr(e,t,n,r){if(Se(e)){const o=eu(e,t,n,r);return o&&L1(o)&&o.catch(i=>{pl(i,t,n)}),o}if(ke(e)){const o=[];for(let i=0;i>>1,o=Kn[r],i=Xd(o);i=Xd(n)?Kn.push(e):Kn.splice(NL(t),0,e),e.flags|=1,BT()}}function BT(){Jh||(Jh=FT.then(HT))}function Yd(e){ke(e)?xc.push(...e):bs&&e.id===-1?bs.splice(Xl+1,0,e):e.flags&1||(xc.push(e),e.flags|=1),BT()}function L_(e,t,n=Fo+1){for(;nXd(n)-Xd(r));if(xc.length=0,bs){bs.push(...t);return}for(bs=t,Xl=0;Xle.id==null?e.flags&2?-1:1/0:e.id;function HT(e){try{for(Fo=0;FoJl.emit(o,...i)),xf=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{zT(i,t)}),setTimeout(()=>{Jl||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,xf=[])},3e3)):xf=[]}let wn=null,$m=null;function Jd(e){const t=wn;return wn=e,$m=e&&e.type.__scopeId||null,t}function ML(e){$m=e}function DL(){$m=null}const LL=e=>O;function O(e,t=wn,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ep(-1);const i=Jd(t);let s;try{s=e(...o)}finally{Jd(i),r._d&&ep(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function yo(e,t){if(wn===null)return e;const n=Vp(wn),r=e.dirs||(e.dirs=[]);for(let o=0;oe.__isTeleport,_d=e=>e&&(e.disabled||e.disabled===""),V_=e=>e&&(e.defer||e.defer===""),F_=e=>typeof SVGElement<"u"&&e instanceof SVGElement,B_=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Cy=(e,t)=>{const n=e&&e.to;return kt(n)?t?t(n):null:n},GT={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,s,a,l,c){const{mc:u,pc:p,pbc:h,o:{insert:f,querySelector:g,createText:m,createComment:b}}=c,w=_d(t.props);let{shapeFlag:E,children:k,dynamicChildren:v}=t;if(e==null){const _=t.el=m(""),T=t.anchor=m("");f(_,n,r),f(T,n,r);const N=(x,I)=>{E&16&&u(k,x,I,o,i,s,a,l)},C=()=>{const x=t.target=Cy(t.props,g),I=WT(x,t,m,f);x&&(s!=="svg"&&F_(x)?s="svg":s!=="mathml"&&B_(x)&&(s="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(x),w||(N(x,I),gh(t,!1)))};w&&(N(n,T),gh(t,!0)),V_(t.props)?(t.el.__isMounted=!1,Wt(()=>{C(),delete t.el.__isMounted},i)):C()}else{if(V_(t.props)&&e.el.__isMounted===!1){Wt(()=>{GT.process(e,t,n,r,o,i,s,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,T=t.target=e.target,N=t.targetAnchor=e.targetAnchor,C=_d(e.props),x=C?n:T,I=C?_:N;if(s==="svg"||F_(T)?s="svg":(s==="mathml"||B_(T))&&(s="mathml"),v?(h(e.dynamicChildren,v,x,o,i,s,a),nx(e,t,!0)):l||p(e,t,x,I,o,i,s,a,!1),w)C?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wf(t,n,_,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=Cy(t.props,g);R&&wf(t,R,null,c,0)}else C&&wf(t,T,N,c,1);gh(t,w)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:s,children:a,anchor:l,targetStart:c,targetAnchor:u,target:p,props:h}=e;if(p&&(o(c),o(u)),i&&o(l),s&16){const f=i||!_d(h);for(let g=0;g{e.isMounted=!0}),on(()=>{e.isUnmounting=!0}),e}const $r=[Function,Array],q1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:$r,onEnter:$r,onAfterEnter:$r,onEnterCancelled:$r,onBeforeLeave:$r,onLeave:$r,onAfterLeave:$r,onLeaveCancelled:$r,onBeforeAppear:$r,onAppear:$r,onAfterAppear:$r,onAppearCancelled:$r},qT=e=>{const t=e.subTree;return t.component?qT(t.component):t},BL={name:"BaseTransition",props:q1,setup(e,{slots:t}){const n=zt(),r=W1();return()=>{const o=t.default&&Rm(t.default(),!0);if(!o||!o.length)return;const i=KT(o),s=He(e),{mode:a}=s;if(r.isLeaving)return eb(i);const l=H_(i);if(!l)return eb(i);let c=Ac(l,s,r,n,p=>c=p);l.type!==Bt&&Li(l,c);let u=n.subTree&&H_(n.subTree);if(u&&u.type!==Bt&&!to(u,l)&&qT(n).type!==Bt){let p=Ac(u,s,r,n);if(Li(u,p),a==="out-in"&&l.type!==Bt)return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,u=void 0},eb(i);a==="in-out"&&l.type!==Bt?p.delayLeave=(h,f,g)=>{const m=XT(r,u);m[String(u.key)]=u,h[wi]=()=>{f(),h[wi]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{g(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function KT(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Bt){t=n;break}}return t}const YT=BL;function XT(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ac(e,t,n,r,o){const{appear:i,mode:s,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:h,onLeave:f,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:b,onAppear:w,onAfterAppear:E,onAppearCancelled:k}=t,v=String(e.key),_=XT(n,e),T=(x,I)=>{x&&qr(x,r,9,I)},N=(x,I)=>{const R=I[1];T(x,I),ke(x)?x.every(M=>M.length<=1)&&R():x.length<=1&&R()},C={mode:s,persisted:a,beforeEnter(x){let I=l;if(!n.isMounted)if(i)I=b||l;else return;x[wi]&&x[wi](!0);const R=_[v];R&&to(e,R)&&R.el[wi]&&R.el[wi](),T(I,[x])},enter(x){let I=c,R=u,M=p;if(!n.isMounted)if(i)I=w||c,R=E||u,M=k||p;else return;let B=!1;const z=x[_f]=J=>{B||(B=!0,J?T(M,[x]):T(R,[x]),C.delayedLeave&&C.delayedLeave(),x[_f]=void 0)};I?N(I,[x,z]):z()},leave(x,I){const R=String(e.key);if(x[_f]&&x[_f](!0),n.isUnmounting)return I();T(h,[x]);let M=!1;const B=x[wi]=z=>{M||(M=!0,I(),z?T(m,[x]):T(g,[x]),x[wi]=void 0,_[R]===e&&delete _[R])};_[R]=e,f?N(f,[x,B]):B()},clone(x){const I=Ac(x,t,n,r,o);return o&&o(I),I}};return C}function eb(e){if(Dp(e))return e=Ir(e),e.children=null,e}function H_(e){if(!Dp(e))return jT(e.type)&&e.children?KT(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Se(n.default))return n.default()}}function Li(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Li(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Rm(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;in.value,set:i=>n.value=i})}return n}const Qh=new WeakMap;function wc(e,t,n,r,o=!1){if(ke(e)){e.forEach((g,m)=>wc(g,t&&(ke(t)?t[m]:t),n,r,o));return}if($s(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&wc(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Vp(r.component):r.el,s=o?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===We?a.refs={}:a.refs,p=a.setupState,h=He(p),f=p===We?pT:g=>it(h,g);if(c!=null&&c!==l){if(z_(t),kt(c))u[c]=null,f(c)&&(p[c]=null);else if(Ce(c)){c.value=null;const g=t;g.k&&(u[g.k]=null)}}if(Se(l))eu(l,a,12,[s,u]);else{const g=kt(l),m=Ce(l);if(g||m){const b=()=>{if(e.f){const w=g?f(l)?p[l]:u[l]:l.value;if(o)ke(w)&&D1(w,i);else if(ke(w))w.includes(i)||w.push(i);else if(g)u[l]=[i],f(l)&&(p[l]=u[l]);else{const E=[i];l.value=E,e.k&&(u[e.k]=E)}}else g?(u[l]=s,f(l)&&(p[l]=s)):m&&(l.value=s,e.k&&(u[e.k]=s))};if(s){const w=()=>{b(),Qh.delete(e)};w.id=-1,Qh.set(e,w),Wt(w,n)}else z_(e),b()}}}function z_(e){const t=Qh.get(e);t&&(t.flags|=8,Qh.delete(e))}let U_=!1;const Tl=()=>{U_||(console.error("Hydration completed but contains mismatches."),U_=!0)},zL=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",UL=e=>e.namespaceURI.includes("MathML"),kf=e=>{if(e.nodeType===1){if(zL(e))return"svg";if(UL(e))return"mathml"}},ac=e=>e.nodeType===8;function jL(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:i,parentNode:s,remove:a,insert:l,createComment:c}}=e,u=(k,v)=>{if(!v.hasChildNodes()){n(null,k,v),Zh(),v._vnode=k;return}p(v.firstChild,k,null,null,null),Zh(),v._vnode=k},p=(k,v,_,T,N,C=!1)=>{C=C||!!v.dynamicChildren;const x=ac(k)&&k.data==="[",I=()=>m(k,v,_,T,N,x),{type:R,ref:M,shapeFlag:B,patchFlag:z}=v;let J=k.nodeType;v.el=k,z===-2&&(C=!1,v.dynamicChildren=null);let q=null;switch(R){case Rs:J!==3?v.children===""?(l(v.el=o(""),s(k),k),q=k):q=I():(k.data!==v.children&&(Tl(),k.data=v.children),q=i(k));break;case Bt:E(k)?(q=i(k),w(v.el=k.content.firstChild,k,_)):J!==8||x?q=I():q=i(k);break;case Wa:if(x&&(k=i(k),J=k.nodeType),J===1||J===3){q=k;const K=!v.children.length;for(let X=0;X{C=C||!!v.dynamicChildren;const{type:x,props:I,patchFlag:R,shapeFlag:M,dirs:B,transition:z}=v,J=x==="input"||x==="option";if(J||R!==-1){B&&Bo(v,null,_,"created");let q=!1;if(E(k)){q=TS(null,z)&&_&&_.vnode.props&&_.vnode.props.appear;const X=k.content.firstChild;if(q){const de=X.getAttribute("class");de&&(X.$cls=de),z.beforeEnter(X)}w(X,k,_),v.el=k=X}if(M&16&&!(I&&(I.innerHTML||I.textContent))){let X=f(k.firstChild,v,k,_,T,N,C);for(;X;){Cf(k,1)||Tl();const de=X;X=X.nextSibling,a(de)}}else if(M&8){let X=v.children;X[0]===` -`&&(k.tagName==="PRE"||k.tagName==="TEXTAREA")&&(X=X.slice(1));const{textContent:de}=k;de!==X&&de!==X.replace(/\r\n|\r/g,` -`)&&(Cf(k,0)||Tl(),k.textContent=v.children)}if(I){if(J||!C||R&48){const X=k.tagName.includes("-");for(const de in I)(J&&(de.endsWith("value")||de==="indeterminate")||Ap(de)&&!bc(de)||de[0]==="."||X)&&r(k,de,null,I[de],void 0,_)}else if(I.onClick)r(k,"onClick",null,I.onClick,void 0,_);else if(R&4&&Si(I.style))for(const X in I.style)I.style[X]}let K;(K=I&&I.onVnodeBeforeMount)&&rr(K,_,v),B&&Bo(v,null,_,"beforeMount"),((K=I&&I.onVnodeMounted)||B||q)&&$S(()=>{K&&rr(K,_,v),q&&z.enter(k),B&&Bo(v,null,_,"mounted")},T)}return k.nextSibling},f=(k,v,_,T,N,C,x)=>{x=x||!!v.dynamicChildren;const I=v.children,R=I.length;for(let M=0;M{const{slotScopeIds:x}=v;x&&(N=N?N.concat(x):x);const I=s(k),R=f(i(k),v,I,_,T,N,C);return R&&ac(R)&&R.data==="]"?i(v.anchor=R):(Tl(),l(v.anchor=c("]"),I,R),R)},m=(k,v,_,T,N,C)=>{if(Cf(k.parentElement,1)||Tl(),v.el=null,C){const R=b(k);for(;;){const M=i(k);if(M&&M!==R)a(M);else break}}const x=i(k),I=s(k);return a(k),n(null,v,I,x,_,T,kf(I),N),_&&(_.vnode.el=v.el,Lm(_,v.el)),x},b=(k,v="[",_="]")=>{let T=0;for(;k;)if(k=i(k),k&&ac(k)&&(k.data===v&&T++,k.data===_)){if(T===0)return i(k);T--}return k},w=(k,v,_)=>{const T=v.parentNode;T&&T.replaceChild(k,v);let N=_;for(;N;)N.vnode.el===v&&(N.vnode.el=N.subTree.el=k),N=N.parent},E=k=>k.nodeType===1&&k.tagName==="TEMPLATE";return[u,p]}const j_="data-allow-mismatch",GL={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Cf(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(j_);)e=e.parentElement;const n=e&&e.getAttribute(j_);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:r.includes(GL[t])}}const WL=Em().requestIdleCallback||(e=>setTimeout(e,1)),qL=Em().cancelIdleCallback||(e=>clearTimeout(e)),KL=(e=1e4)=>t=>{const n=WL(t,{timeout:e});return()=>qL(n)};function YL(e){const{top:t,left:n,bottom:r,right:o}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:s}=window;return(t>0&&t0&&r0&&n0&&o(t,n)=>{const r=new IntersectionObserver(o=>{for(const i of o)if(i.isIntersecting){r.disconnect(),t();break}},e);return n(o=>{if(o instanceof Element){if(YL(o))return t(),r.disconnect(),!1;r.observe(o)}}),()=>r.disconnect()},JL=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},ZL=(e=[])=>(t,n)=>{kt(e)&&(e=[e]);let r=!1;const o=s=>{r||(r=!0,i(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},i=()=>{n(s=>{for(const a of e)s.removeEventListener(a,o)})};return n(s=>{for(const a of e)s.addEventListener(a,o,{once:!0})}),i};function QL(e,t){if(ac(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(ac(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const $s=e=>!!e.type.__asyncLoader;function eV(e){Se(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,hydrate:i,timeout:s,suspensible:a=!0,onError:l}=e;let c=null,u,p=0;const h=()=>(p++,c=null,f()),f=()=>{let g;return c||(g=c=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((b,w)=>{l(m,()=>b(h()),()=>w(m),p+1)});throw m}).then(m=>g!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return P({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(g,m,b){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const E=()=>{w||b()},k=i?()=>{const v=i(E,_=>QL(g,_));v&&(m.bum||(m.bum=[])).push(v)}:E;u?k():f().then(()=>!m.isUnmounted&&k())},get __asyncResolved(){return u},setup(){const g=xn;if(K1(g),u)return()=>Ef(u,g);const m=k=>{c=null,pl(k,g,13,!r)};if(a&&g.suspense||Nc)return f().then(k=>()=>Ef(k,g)).catch(k=>(m(k),()=>r?S(r,{error:k}):null));const b=Q(!1),w=Q(),E=Q(!!o);return o&&setTimeout(()=>{E.value=!1},o),s!=null&&setTimeout(()=>{if(!b.value&&!w.value){const k=new Error(`Async component timed out after ${s}ms.`);m(k),w.value=k}},s),f().then(()=>{b.value=!0,g.parent&&Dp(g.parent.vnode)&&g.parent.update()}).catch(k=>{m(k),w.value=k}),()=>{if(b.value&&u)return Ef(u,g);if(w.value&&r)return S(r,{error:w.value});if(n&&!E.value)return Ef(n,g)}}})}function Ef(e,t){const{ref:n,props:r,children:o,ce:i}=t.vnode,s=S(e,r,o);return s.ref=n,s.ce=i,delete t.vnode.ce,s}const Dp=e=>e.type.__isKeepAlive,tV={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=zt(),r=n.ctx;if(!r.renderer)return()=>{const E=t.default&&t.default();return E&&E.length===1?E[0]:E};const o=new Map,i=new Set;let s=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:p}}}=r,h=p("div");r.activate=(E,k,v,_,T)=>{const N=E.component;c(E,k,v,0,a),l(N.vnode,E,k,v,N,a,_,E.slotScopeIds,T),Wt(()=>{N.isDeactivated=!1,N.a&&yc(N.a);const C=E.props&&E.props.onVnodeMounted;C&&rr(C,N.parent,E)},a)},r.deactivate=E=>{const k=E.component;tg(k.m),tg(k.a),c(E,h,null,1,a),Wt(()=>{k.da&&yc(k.da);const v=E.props&&E.props.onVnodeUnmounted;v&&rr(v,k.parent,E),k.isDeactivated=!0},a)};function f(E){tb(E),u(E,n,a,!0)}function g(E){o.forEach((k,v)=>{const _=My(k.type);_&&!E(_)&&m(v)})}function m(E){const k=o.get(E);k&&(!s||!to(k,s))?f(k):s&&tb(s),o.delete(E),i.delete(E)}st(()=>[e.include,e.exclude],([E,k])=>{E&&g(v=>ed(E,v)),k&&g(v=>!ed(k,v))},{flush:"post",deep:!0});let b=null;const w=()=>{b!=null&&(ng(n.subTree.type)?Wt(()=>{o.set(b,Of(n.subTree))},n.subTree.suspense):o.set(b,Of(n.subTree)))};return Je(w),Mm(w),on(()=>{o.forEach(E=>{const{subTree:k,suspense:v}=n,_=Of(k);if(E.type===_.type&&E.key===_.key){tb(_);const T=_.component.da;T&&Wt(T,v);return}f(E)})}),()=>{if(b=null,!t.default)return s=null;const E=t.default(),k=E[0];if(E.length>1)return s=null,E;if(!Vi(k)||!(k.shapeFlag&4)&&!(k.shapeFlag&128))return s=null,k;let v=Of(k);if(v.type===Bt)return s=null,v;const _=v.type,T=My($s(v)?v.type.__asyncResolved||{}:_),{include:N,exclude:C,max:x}=e;if(N&&(!T||!ed(N,T))||C&&T&&ed(C,T))return v.shapeFlag&=-257,s=v,k;const I=v.key==null?_:v.key,R=o.get(I);return v.el&&(v=Ir(v),k.shapeFlag&128&&(k.ssContent=v)),b=I,R?(v.el=R.el,v.component=R.component,v.transition&&Li(v,v.transition),v.shapeFlag|=512,i.delete(I),i.add(I)):(i.add(I),x&&i.size>parseInt(x,10)&&m(i.values().next().value)),v.shapeFlag|=256,s=v,ng(k.type)?k:v}}},JT=tV;function ed(e,t){return ke(e)?e.some(n=>ed(n,t)):kt(e)?e.split(",").includes(t):$D(e)?(e.lastIndex=0,e.test(t)):!1}function ZT(e,t){eS(e,"a",t)}function QT(e,t){eS(e,"da",t)}function eS(e,t,n=xn){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Am(t,r,n),n){let o=n.parent;for(;o&&o.parent;)Dp(o.parent.vnode)&&nV(r,t,n,o),o=o.parent}}function nV(e,t,n,r){const o=Am(t,e,r,!0);Sr(()=>{D1(r[t],o)},n)}function tb(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Of(e){return e.shapeFlag&128?e.ssContent:e}function Am(e,t,n=xn,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{Mi();const a=el(n),l=qr(t,n,e,s);return a(),Di(),l});return r?o.unshift(i):o.push(i),i}}const Wi=e=>(t,n=xn)=>{(!Nc||e==="sp")&&Am(e,(...r)=>t(...r),n)},Nm=Wi("bm"),Je=Wi("m"),Y1=Wi("bu"),Mm=Wi("u"),on=Wi("bum"),Sr=Wi("um"),tS=Wi("sp"),nS=Wi("rtg"),rS=Wi("rtc");function oS(e,t=xn){Am("ec",e,t)}const X1="components",rV="directives";function iS(e,t){return J1(X1,e,!0,t)||e}const sS=Symbol.for("v-ndc");function Xn(e){return kt(e)?J1(X1,e,!1)||e:e||sS}function oV(e){return J1(rV,e)}function J1(e,t,n=!0,r=!1){const o=wn||xn;if(o){const i=o.type;if(e===X1){const a=My(i,!1);if(a&&(a===t||a===_n(t)||a===Np(_n(t))))return i}const s=G_(o[e]||i[e],t)||G_(o.appContext[e],t);return!s&&r?i:s}}function G_(e,t){return e&&(e[t]||e[_n(t)]||e[Np(_n(t))])}function Ie(e,t,n,r){let o;const i=n&&n[r],s=ke(e);if(s||kt(e)){const a=s&&Si(e);let l=!1,c=!1;a&&(l=!lr(e),c=Jo(e),e=Tm(e)),o=new Array(e.length);for(let u=0,p=e.length;ut(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,c=a.length;l{const i=r.fn(...o);return i&&(i.key=r.key),i}:r.fn)}return e}function L(e,t,n={},r,o){if(wn.ce||wn.parent&&$s(wn.parent)&&wn.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),y(),$(ge,null,[S("slot",n,r&&r())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),y();const s=i&&Z1(i(n)),a=n.key||s&&s.key,l=$(ge,{key:(a&&!ao(a)?a:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Z1(e){return e.some(t=>Vi(t)?!(t.type===Bt||t.type===ge&&!Z1(t.children)):!0)?e:null}function sV(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:yd(r)]=e[r];return n}const Ey=e=>e?DS(e)?Vp(e):Ey(e.parent):null,kd=ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ey(e.parent),$root:e=>Ey(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Q1(e),$forceUpdate:e=>e.f||(e.f=()=>{G1(e.update)}),$nextTick:e=>e.n||(e.n=Nn.bind(e.proxy)),$watch:e=>IV.bind(e)}),nb=(e,t)=>e!==We&&!e.__isScriptSetup&&it(e,t),Oy={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:l}=e;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(nb(r,t))return s[t]=1,r[t];if(o!==We&&it(o,t))return s[t]=2,o[t];if(it(i,t))return s[t]=3,i[t];if(n!==We&&it(n,t))return s[t]=4,n[t];Iy&&(s[t]=0)}}const c=kd[t];let u,p;if(c)return t==="$attrs"&&$n(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==We&&it(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,it(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return nb(o,t)?(o[t]=n,!0):r!==We&&it(r,t)?(r[t]=n,!0):it(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:s}},a){let l;return!!(n[a]||e!==We&&a[0]!=="$"&&it(e,a)||nb(t,a)||it(i,a)||it(r,a)||it(kd,a)||it(o.config.globalProperties,a)||(l=s.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},aV=ft({},Oy,{get(e,t){if(t!==Symbol.unscopables)return Oy.get(e,t,e)},has(e,t){return t[0]!=="_"&&!DD(t)}});function lV(){return null}function cV(){return null}function uV(e){}function dV(e){}function pV(){return null}function fV(){}function hV(e,t){return null}function xo(){return aS().slots}function gV(){return aS().attrs}function aS(e){const t=zt();return t.setupContext||(t.setupContext=FS(t))}function Zd(e){return ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ze(e,t){const n=Zd(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?ke(o)||Se(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n}function at(e,t){return!e||!t?e||t:ke(e)&&ke(t)?e.concat(t):ft({},Zd(e),Zd(t))}function mV(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function vV(e){const t=zt();let n=e();return Ry(),L1(n)&&(n=n.catch(r=>{throw el(t),r})),[n,()=>el(t)]}let Iy=!0;function bV(e){const t=Q1(e),n=e.proxy,r=e.ctx;Iy=!1,t.beforeCreate&&W_(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:l,inject:c,created:u,beforeMount:p,mounted:h,beforeUpdate:f,updated:g,activated:m,deactivated:b,beforeDestroy:w,beforeUnmount:E,destroyed:k,unmounted:v,render:_,renderTracked:T,renderTriggered:N,errorCaptured:C,serverPrefetch:x,expose:I,inheritAttrs:R,components:M,directives:B,filters:z}=t;if(c&&yV(c,r,null),s)for(const K in s){const X=s[K];Se(X)&&(r[K]=X.bind(n))}if(o){const K=o.call(n,n);pt(K)&&(e.data=Tr(K))}if(Iy=!0,i)for(const K in i){const X=i[K],de=Se(X)?X.bind(n,n):Se(X.get)?X.get.bind(n,n):Ur,Ue=!Se(X)&&Se(X.set)?X.set.bind(n):Ur,je=A({get:de,set:Ue});Object.defineProperty(r,K,{enumerable:!0,configurable:!0,get:()=>je.value,set:Ve=>je.value=Ve})}if(a)for(const K in a)lS(a[K],r,n,K);if(l){const K=Se(l)?l.call(n):l;Reflect.ownKeys(K).forEach(X=>{tu(X,K[X])})}u&&W_(u,e,"c");function q(K,X){ke(X)?X.forEach(de=>K(de.bind(n))):X&&K(X.bind(n))}if(q(Nm,p),q(Je,h),q(Y1,f),q(Mm,g),q(ZT,m),q(QT,b),q(oS,C),q(rS,T),q(nS,N),q(on,E),q(Sr,v),q(tS,x),ke(I))if(I.length){const K=e.exposed||(e.exposed={});I.forEach(X=>{Object.defineProperty(K,X,{get:()=>n[X],set:de=>n[X]=de,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Ur&&(e.render=_),R!=null&&(e.inheritAttrs=R),M&&(e.components=M),B&&(e.directives=B),x&&K1(e)}function yV(e,t,n=Ur){ke(e)&&(e=Ty(e));for(const r in e){const o=e[r];let i;pt(o)?"default"in o?i=dt(o.from||r,o.default,!0):i=dt(o.from||r):i=dt(o),Ce(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[r]=i}}function W_(e,t,n){qr(ke(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function lS(e,t,n,r){let o=r.includes(".")?hS(n,r):()=>n[r];if(kt(e)){const i=t[e];Se(i)&&st(o,i)}else if(Se(e))st(o,e.bind(n));else if(pt(e))if(ke(e))e.forEach(i=>lS(i,t,n,r));else{const i=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(i)&&st(o,i,e)}}function Q1(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(c=>eg(l,c,s,!0)),eg(l,t,s)),pt(t)&&i.set(t,l),l}function eg(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&eg(e,i,n,!0),o&&o.forEach(s=>eg(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const a=xV[s]||n&&n[s];e[s]=a?a(e[s],t[s]):t[s]}return e}const xV={data:q_,props:K_,emits:K_,methods:td,computed:td,beforeCreate:Gn,created:Gn,beforeMount:Gn,mounted:Gn,beforeUpdate:Gn,updated:Gn,beforeDestroy:Gn,beforeUnmount:Gn,destroyed:Gn,unmounted:Gn,activated:Gn,deactivated:Gn,errorCaptured:Gn,serverPrefetch:Gn,components:td,directives:td,watch:_V,provide:q_,inject:wV};function q_(e,t){return t?e?function(){return ft(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function wV(e,t){return td(Ty(e),Ty(t))}function Ty(e){if(ke(e)){const t={};for(let n=0;n1)return n&&Se(t)?t.call(r&&r.proxy):t}}function EV(){return!!(zt()||Ga)}const uS=Symbol.for("v-scx"),dS=()=>dt(uS);function pS(e,t){return Lp(e,null,t)}function OV(e,t){return Lp(e,null,{flush:"post"})}function fS(e,t){return Lp(e,null,{flush:"sync"})}function st(e,t,n){return Lp(e,t,n)}function Lp(e,t,n=We){const{immediate:r,deep:o,flush:i,once:s}=n,a=ft({},n),l=t&&r||!t&&i!=="post";let c;if(Nc){if(i==="sync"){const f=dS();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Ur,f.resume=Ur,f.pause=Ur,f}}const u=xn;a.call=(f,g,m)=>qr(f,u,g,m);let p=!1;i==="post"?a.scheduler=f=>{Wt(f,u&&u.suspense)}:i!=="sync"&&(p=!0,a.scheduler=(f,g)=>{g?f():G1(f)}),a.augmentJob=f=>{t&&(f.flags|=4),p&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=IL(e,t,a);return Nc&&(c?c.push(h):l&&h()),h}function IV(e,t,n){const r=this.proxy,o=kt(e)?e.includes(".")?hS(r,e):()=>r[e]:e.bind(r,r);let i;Se(t)?i=t:(i=t.handler,n=t);const s=el(this),a=Lp(o,i.bind(r),n);return s(),a}function hS(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o{let u,p=We,h;return fS(()=>{const f=e[o];qn(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const g=n.set?n.set(f):f;if(!qn(g,u)&&!(p!==We&&qn(f,p)))return;const m=r.vnode.props;m&&(t in m||o in m||i in m)&&(`onUpdate:${t}`in m||`onUpdate:${o}`in m||`onUpdate:${i}`in m)||(u=f,c()),r.emit(`update:${t}`,g),qn(f,g)&&qn(f,p)&&!qn(g,h)&&c(),p=f,h=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||We:a,done:!1}:{done:!0}}}},a}const gS=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_n(t)}Modifiers`]||e[`${sr(t)}Modifiers`];function TV(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||We;let o=n;const i=t.startsWith("update:"),s=i&&gS(r,t.slice(7));s&&(s.trim&&(o=n.map(u=>kt(u)?u.trim():u)),s.number&&(o=n.map(Cm)));let a,l=r[a=yd(t)]||r[a=yd(_n(t))];!l&&i&&(l=r[a=yd(sr(t))]),l&&qr(l,e,6,o);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,qr(c,e,6,o)}}const SV=new WeakMap;function mS(e,t,n=!1){const r=n?SV:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let s={},a=!1;if(!Se(e)){const l=c=>{const u=mS(c,t,!0);u&&(a=!0,ft(s,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(pt(e)&&r.set(e,null),null):(ke(i)?i.forEach(l=>s[l]=null):ft(s,i),pt(e)&&r.set(e,s),s)}function Dm(e,t){return!e||!Ap(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,sr(t))||it(e,t))}function mh(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:s,attrs:a,emit:l,render:c,renderCache:u,props:p,data:h,setupState:f,ctx:g,inheritAttrs:m}=e,b=Jd(e);let w,E;try{if(n.shapeFlag&4){const v=o||r,_=v;w=ir(c.call(_,v,u,p,f,h,g)),E=a}else{const v=t;w=ir(v.length>1?v(p,{attrs:a,slots:s,emit:l}):v(p,null)),E=t.props?a:$V(a)}}catch(v){Cd.length=0,pl(v,e,1),w=S(Bt)}let k=w;if(E&&m!==!1){const v=Object.keys(E),{shapeFlag:_}=k;v.length&&_&7&&(i&&v.some(M1)&&(E=RV(E,i)),k=Ir(k,E,!1,!0))}return n.dirs&&(k=Ir(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&Li(k,n.transition),w=k,Jd(b),w}function PV(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||Ap(n))&&((t||(t={}))[n]=e[n]);return t},RV=(e,t)=>{const n={};for(const r in e)(!M1(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function AV(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Y_(r,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let p=0;pObject.create(vS),yS=e=>Object.getPrototypeOf(e)===vS;function NV(e,t,n,r=!1){const o={},i=bS();e.propsDefaults=Object.create(null),xS(e,t,o,i);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:NT(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function MV(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=He(o),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let p=0;p{l=!0;const[h,f]=wS(p,t,!0);ft(s,h),f&&a.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return pt(e)&&r.set(e,mc),mc;if(ke(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",tx=e=>ke(e)?e.map(ir):[ir(e)],LV=(e,t,n)=>{if(t._n)return t;const r=O((...o)=>tx(t(...o)),n);return r._c=!1,r},_S=(e,t,n)=>{const r=e._ctx;for(const o in e){if(ex(o))continue;const i=e[o];if(Se(i))t[o]=LV(o,i,r);else if(i!=null){const s=tx(i);t[o]=()=>s}}},kS=(e,t)=>{const n=tx(t);e.slots.default=()=>n},CS=(e,t,n)=>{for(const r in t)(n||!ex(r))&&(e[r]=t[r])},VV=(e,t,n)=>{const r=e.slots=bS();if(e.vnode.shapeFlag&32){const o=t._;o?(CS(r,t,n),n&&hT(r,"_",o,!0)):_S(t,r)}else t&&kS(e,t)},FV=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=We;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:CS(o,t,n):(i=!t.$stable,_S(t,o)),s=t}else t&&(kS(e,t),s={default:1});if(i)for(const a in o)!ex(a)&&s[a]==null&&delete o[a]},Wt=$S;function ES(e){return IS(e)}function OS(e){return IS(e,jL)}function IS(e,t){const n=Em();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:s,createText:a,createComment:l,setText:c,setElementText:u,parentNode:p,nextSibling:h,setScopeId:f=Ur,insertStaticContent:g}=e,m=(H,U,W,le=null,ne=null,oe=null,ye=void 0,be=null,ve=!!U.dynamicChildren)=>{if(H===U)return;H&&!to(H,U)&&(le=Xr(H),Ve(H,ne,oe,!0),H=null),U.patchFlag===-2&&(ve=!1,U.dynamicChildren=null);const{type:ae,ref:Te,shapeFlag:xe}=U;switch(ae){case Rs:b(H,U,W,le);break;case Bt:w(H,U,W,le);break;case Wa:H==null&&E(U,W,le,ye);break;case ge:M(H,U,W,le,ne,oe,ye,be,ve);break;default:xe&1?_(H,U,W,le,ne,oe,ye,be,ve):xe&6?B(H,U,W,le,ne,oe,ye,be,ve):(xe&64||xe&128)&&ae.process(H,U,W,le,ne,oe,ye,be,ve,Ro)}Te!=null&&ne?wc(Te,H&&H.ref,oe,U||H,!U):Te==null&&H&&H.ref!=null&&wc(H.ref,null,oe,H,!0)},b=(H,U,W,le)=>{if(H==null)r(U.el=a(U.children),W,le);else{const ne=U.el=H.el;U.children!==H.children&&c(ne,U.children)}},w=(H,U,W,le)=>{H==null?r(U.el=l(U.children||""),W,le):U.el=H.el},E=(H,U,W,le)=>{[H.el,H.anchor]=g(H.children,U,W,le,H.el,H.anchor)},k=({el:H,anchor:U},W,le)=>{let ne;for(;H&&H!==U;)ne=h(H),r(H,W,le),H=ne;r(U,W,le)},v=({el:H,anchor:U})=>{let W;for(;H&&H!==U;)W=h(H),o(H),H=W;o(U)},_=(H,U,W,le,ne,oe,ye,be,ve)=>{if(U.type==="svg"?ye="svg":U.type==="math"&&(ye="mathml"),H==null)T(U,W,le,ne,oe,ye,be,ve);else{const ae=H.el&&H.el._isVueCE?H.el:null;try{ae&&ae._beginPatch(),x(H,U,ne,oe,ye,be,ve)}finally{ae&&ae._endPatch()}}},T=(H,U,W,le,ne,oe,ye,be)=>{let ve,ae;const{props:Te,shapeFlag:xe,transition:Ee,dirs:Ae}=H;if(ve=H.el=s(H.type,oe,Te&&Te.is,Te),xe&8?u(ve,H.children):xe&16&&C(H.children,ve,null,le,ne,rb(H,oe),ye,be),Ae&&Bo(H,null,le,"created"),N(ve,H,H.scopeId,ye,le),Te){for(const bt in Te)bt!=="value"&&!bc(bt)&&i(ve,bt,null,Te[bt],oe,le);"value"in Te&&i(ve,"value",null,Te.value,oe),(ae=Te.onVnodeBeforeMount)&&rr(ae,le,H)}Ae&&Bo(H,null,le,"beforeMount");const Ye=TS(ne,Ee);Ye&&Ee.beforeEnter(ve),r(ve,U,W),((ae=Te&&Te.onVnodeMounted)||Ye||Ae)&&Wt(()=>{ae&&rr(ae,le,H),Ye&&Ee.enter(ve),Ae&&Bo(H,null,le,"mounted")},ne)},N=(H,U,W,le,ne)=>{if(W&&f(H,W),le)for(let oe=0;oe{for(let ae=ve;ae{const be=U.el=H.el;let{patchFlag:ve,dynamicChildren:ae,dirs:Te}=U;ve|=H.patchFlag&16;const xe=H.props||We,Ee=U.props||We;let Ae;if(W&&ya(W,!1),(Ae=Ee.onVnodeBeforeUpdate)&&rr(Ae,W,U,H),Te&&Bo(U,H,W,"beforeUpdate"),W&&ya(W,!0),(xe.innerHTML&&Ee.innerHTML==null||xe.textContent&&Ee.textContent==null)&&u(be,""),ae?I(H.dynamicChildren,ae,be,W,le,rb(U,ne),oe):ye||X(H,U,be,null,W,le,rb(U,ne),oe,!1),ve>0){if(ve&16)R(be,xe,Ee,W,ne);else if(ve&2&&xe.class!==Ee.class&&i(be,"class",null,Ee.class,ne),ve&4&&i(be,"style",xe.style,Ee.style,ne),ve&8){const Ye=U.dynamicProps;for(let bt=0;bt{Ae&&rr(Ae,W,U,H),Te&&Bo(U,H,W,"updated")},le)},I=(H,U,W,le,ne,oe,ye)=>{for(let be=0;be{if(U!==W){if(U!==We)for(const oe in U)!bc(oe)&&!(oe in W)&&i(H,oe,U[oe],null,ne,le);for(const oe in W){if(bc(oe))continue;const ye=W[oe],be=U[oe];ye!==be&&oe!=="value"&&i(H,oe,be,ye,ne,le)}"value"in W&&i(H,"value",U.value,W.value,ne)}},M=(H,U,W,le,ne,oe,ye,be,ve)=>{const ae=U.el=H?H.el:a(""),Te=U.anchor=H?H.anchor:a("");let{patchFlag:xe,dynamicChildren:Ee,slotScopeIds:Ae}=U;Ae&&(be=be?be.concat(Ae):Ae),H==null?(r(ae,W,le),r(Te,W,le),C(U.children||[],W,Te,ne,oe,ye,be,ve)):xe>0&&xe&64&&Ee&&H.dynamicChildren?(I(H.dynamicChildren,Ee,W,ne,oe,ye,be),(U.key!=null||ne&&U===ne.subTree)&&nx(H,U,!0)):X(H,U,W,Te,ne,oe,ye,be,ve)},B=(H,U,W,le,ne,oe,ye,be,ve)=>{U.slotScopeIds=be,H==null?U.shapeFlag&512?ne.ctx.activate(U,W,le,ye,ve):z(U,W,le,ne,oe,ye,ve):J(H,U,ve)},z=(H,U,W,le,ne,oe,ye)=>{const be=H.component=MS(H,le,ne);if(Dp(H)&&(be.ctx.renderer=Ro),LS(be,!1,ye),be.asyncDep){if(ne&&ne.registerDep(be,q,ye),!H.el){const ve=be.subTree=S(Bt);w(null,ve,U,W),H.placeholder=ve.el}}else q(be,H,U,W,ne,oe,ye)},J=(H,U,W)=>{const le=U.component=H.component;if(AV(H,U,W))if(le.asyncDep&&!le.asyncResolved){K(le,U,W);return}else le.next=U,le.update();else U.el=H.el,le.vnode=U},q=(H,U,W,le,ne,oe,ye)=>{const be=()=>{if(H.isMounted){let{next:xe,bu:Ee,u:Ae,parent:Ye,vnode:bt}=H;{const fr=SS(H);if(fr){xe&&(xe.el=bt.el,K(H,xe,ye)),fr.asyncDep.then(()=>{H.isUnmounted||be()});return}}let ct=xe,tr;ya(H,!1),xe?(xe.el=bt.el,K(H,xe,ye)):xe=bt,Ee&&yc(Ee),(tr=xe.props&&xe.props.onVnodeBeforeUpdate)&&rr(tr,Ye,xe,bt),ya(H,!0);const In=mh(H),Jr=H.subTree;H.subTree=In,m(Jr,In,p(Jr.el),Xr(Jr),H,ne,oe),xe.el=In.el,ct===null&&Lm(H,In.el),Ae&&Wt(Ae,ne),(tr=xe.props&&xe.props.onVnodeUpdated)&&Wt(()=>rr(tr,Ye,xe,bt),ne)}else{let xe;const{el:Ee,props:Ae}=U,{bm:Ye,m:bt,parent:ct,root:tr,type:In}=H,Jr=$s(U);if(ya(H,!1),Ye&&yc(Ye),!Jr&&(xe=Ae&&Ae.onVnodeBeforeMount)&&rr(xe,ct,U),ya(H,!0),Ee&&ba){const fr=()=>{H.subTree=mh(H),ba(Ee,H.subTree,H,ne,null)};Jr&&In.__asyncHydrate?In.__asyncHydrate(Ee,H,fr):fr()}else{tr.ce&&tr.ce._def.shadowRoot!==!1&&tr.ce._injectChildStyle(In);const fr=H.subTree=mh(H);m(null,fr,W,le,H,ne,oe),U.el=fr.el}if(bt&&Wt(bt,ne),!Jr&&(xe=Ae&&Ae.onVnodeMounted)){const fr=U;Wt(()=>rr(xe,ct,fr),ne)}(U.shapeFlag&256||ct&&$s(ct.vnode)&&ct.vnode.shapeFlag&256)&&H.a&&Wt(H.a,ne),H.isMounted=!0,U=W=le=null}};H.scope.on();const ve=H.effect=new Gd(be);H.scope.off();const ae=H.update=ve.run.bind(ve),Te=H.job=ve.runIfDirty.bind(ve);Te.i=H,Te.id=H.uid,ve.scheduler=()=>G1(Te),ya(H,!0),ae()},K=(H,U,W)=>{U.component=H;const le=H.vnode.props;H.vnode=U,H.next=null,MV(H,U.props,le,W),FV(H,U.children,W),Mi(),L_(H),Di()},X=(H,U,W,le,ne,oe,ye,be,ve=!1)=>{const ae=H&&H.children,Te=H?H.shapeFlag:0,xe=U.children,{patchFlag:Ee,shapeFlag:Ae}=U;if(Ee>0){if(Ee&128){Ue(ae,xe,W,le,ne,oe,ye,be,ve);return}else if(Ee&256){de(ae,xe,W,le,ne,oe,ye,be,ve);return}}Ae&8?(Te&16&&nn(ae,ne,oe),xe!==ae&&u(W,xe)):Te&16?Ae&16?Ue(ae,xe,W,le,ne,oe,ye,be,ve):nn(ae,ne,oe,!0):(Te&8&&u(W,""),Ae&16&&C(xe,W,le,ne,oe,ye,be,ve))},de=(H,U,W,le,ne,oe,ye,be,ve)=>{H=H||mc,U=U||mc;const ae=H.length,Te=U.length,xe=Math.min(ae,Te);let Ee;for(Ee=0;EeTe?nn(H,ne,oe,!0,!1,xe):C(U,W,le,ne,oe,ye,be,ve,xe)},Ue=(H,U,W,le,ne,oe,ye,be,ve)=>{let ae=0;const Te=U.length;let xe=H.length-1,Ee=Te-1;for(;ae<=xe&&ae<=Ee;){const Ae=H[ae],Ye=U[ae]=ve?ys(U[ae]):ir(U[ae]);if(to(Ae,Ye))m(Ae,Ye,W,null,ne,oe,ye,be,ve);else break;ae++}for(;ae<=xe&&ae<=Ee;){const Ae=H[xe],Ye=U[Ee]=ve?ys(U[Ee]):ir(U[Ee]);if(to(Ae,Ye))m(Ae,Ye,W,null,ne,oe,ye,be,ve);else break;xe--,Ee--}if(ae>xe){if(ae<=Ee){const Ae=Ee+1,Ye=AeEe)for(;ae<=xe;)Ve(H[ae],ne,oe,!0),ae++;else{const Ae=ae,Ye=ae,bt=new Map;for(ae=Ye;ae<=Ee;ae++){const hr=U[ae]=ve?ys(U[ae]):ir(U[ae]);hr.key!=null&&bt.set(hr.key,ae)}let ct,tr=0;const In=Ee-Ye+1;let Jr=!1,fr=0;const ku=new Array(In);for(ae=0;ae=In){Ve(hr,ne,oe,!0);continue}let Ao;if(hr.key!=null)Ao=bt.get(hr.key);else for(ct=Ye;ct<=Ee;ct++)if(ku[ct-Ye]===0&&to(hr,U[ct])){Ao=ct;break}Ao===void 0?Ve(hr,ne,oe,!0):(ku[Ao-Ye]=ae+1,Ao>=fr?fr=Ao:Jr=!0,m(hr,U[Ao],W,null,ne,oe,ye,be,ve),tr++)}const P_=Jr?BV(ku):mc;for(ct=P_.length-1,ae=In-1;ae>=0;ae--){const hr=Ye+ae,Ao=U[hr],$_=U[hr+1],R_=hr+1{const{el:oe,type:ye,transition:be,children:ve,shapeFlag:ae}=H;if(ae&6){je(H.component.subTree,U,W,le);return}if(ae&128){H.suspense.move(U,W,le);return}if(ae&64){ye.move(H,U,W,Ro);return}if(ye===ge){r(oe,U,W);for(let xe=0;xebe.enter(oe),ne);else{const{leave:xe,delayLeave:Ee,afterLeave:Ae}=be,Ye=()=>{H.ctx.isUnmounted?o(oe):r(oe,U,W)},bt=()=>{oe._isLeaving&&oe[wi](!0),xe(oe,()=>{Ye(),Ae&&Ae()})};Ee?Ee(oe,Ye,bt):bt()}else r(oe,U,W)},Ve=(H,U,W,le=!1,ne=!1)=>{const{type:oe,props:ye,ref:be,children:ve,dynamicChildren:ae,shapeFlag:Te,patchFlag:xe,dirs:Ee,cacheIndex:Ae}=H;if(xe===-2&&(ne=!1),be!=null&&(Mi(),wc(be,null,W,H,!0),Di()),Ae!=null&&(U.renderCache[Ae]=void 0),Te&256){U.ctx.deactivate(H);return}const Ye=Te&1&&Ee,bt=!$s(H);let ct;if(bt&&(ct=ye&&ye.onVnodeBeforeUnmount)&&rr(ct,U,H),Te&6)tn(H.component,W,le);else{if(Te&128){H.suspense.unmount(W,le);return}Ye&&Bo(H,null,U,"beforeUnmount"),Te&64?H.type.remove(H,U,W,Ro,le):ae&&!ae.hasOnce&&(oe!==ge||xe>0&&xe&64)?nn(ae,U,W,!1,!0):(oe===ge&&xe&384||!ne&&Te&16)&&nn(ve,U,W),le&&Qe(H)}(bt&&(ct=ye&&ye.onVnodeUnmounted)||Ye)&&Wt(()=>{ct&&rr(ct,U,H),Ye&&Bo(H,null,U,"unmounted")},W)},Qe=H=>{const{type:U,el:W,anchor:le,transition:ne}=H;if(U===ge){Bn(W,le);return}if(U===Wa){v(H);return}const oe=()=>{o(W),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(H.shapeFlag&1&&ne&&!ne.persisted){const{leave:ye,delayLeave:be}=ne,ve=()=>ye(W,oe);be?be(H.el,oe,ve):ve()}else oe()},Bn=(H,U)=>{let W;for(;H!==U;)W=h(H),o(H),H=W;o(U)},tn=(H,U,W)=>{const{bum:le,scope:ne,job:oe,subTree:ye,um:be,m:ve,a:ae}=H;tg(ve),tg(ae),le&&yc(le),ne.stop(),oe&&(oe.flags|=8,Ve(ye,H,U,W)),be&&Wt(be,U),Wt(()=>{H.isUnmounted=!0},U)},nn=(H,U,W,le=!1,ne=!1,oe=0)=>{for(let ye=oe;ye{if(H.shapeFlag&6)return Xr(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const U=h(H.anchor||H.el),W=U&&U[UT];return W?h(W):U};let $o=!1;const Ol=(H,U,W)=>{H==null?U._vnode&&Ve(U._vnode,null,null,!0):m(U._vnode||null,H,U,null,null,null,W),U._vnode=H,$o||($o=!0,L_(),Zh(),$o=!1)},Ro={p:m,um:Ve,m:je,r:Qe,mt:z,mc:C,pc:X,pbc:I,n:Xr,o:e};let va,ba;return t&&([va,ba]=t(Ro)),{render:Ol,hydrate:va,createApp:CV(Ol,va)}}function rb({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ya({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function TS(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function nx(e,t,n=!1){const r=e.children,o=t.children;if(ke(r)&&ke(o))for(let i=0;i>1,e[n[a]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}function SS(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:SS(t)}function tg(e){if(e)for(let t=0;te.__isSuspense;let Py=0;const HV={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,i,s,a,l,c){if(e==null)UV(t,n,r,o,i,s,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}jV(e,t,n,r,o,s,a,l,c)}},hydrate:GV,normalize:WV},zV=HV;function Qd(e,t){const n=e.props&&e.props[t];Se(n)&&n()}function UV(e,t,n,r,o,i,s,a,l){const{p:c,o:{createElement:u}}=l,p=u("div"),h=e.suspense=PS(e,o,r,t,p,n,i,s,a,l);c(null,h.pendingBranch=e.ssContent,p,null,r,h,i,s),h.deps>0?(Qd(e,"onPending"),Qd(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,i,s),_c(h,e.ssFallback)):h.resolve(!1,!0)}function jV(e,t,n,r,o,i,s,a,{p:l,um:c,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const h=t.ssContent,f=t.ssFallback,{activeBranch:g,pendingBranch:m,isInFallback:b,isHydrating:w}=p;if(m)p.pendingBranch=h,to(m,h)?(l(m,h,p.hiddenContainer,null,o,p,i,s,a),p.deps<=0?p.resolve():b&&(w||(l(g,f,n,r,o,null,i,s,a),_c(p,f)))):(p.pendingId=Py++,w?(p.isHydrating=!1,p.activeBranch=m):c(m,o,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),b?(l(null,h,p.hiddenContainer,null,o,p,i,s,a),p.deps<=0?p.resolve():(l(g,f,n,r,o,null,i,s,a),_c(p,f))):g&&to(g,h)?(l(g,h,n,r,o,p,i,s,a),p.resolve(!0)):(l(null,h,p.hiddenContainer,null,o,p,i,s,a),p.deps<=0&&p.resolve()));else if(g&&to(g,h))l(g,h,n,r,o,p,i,s,a),_c(p,h);else if(Qd(t,"onPending"),p.pendingBranch=h,h.shapeFlag&512?p.pendingId=h.component.suspenseId:p.pendingId=Py++,l(null,h,p.hiddenContainer,null,o,p,i,s,a),p.deps<=0)p.resolve();else{const{timeout:E,pendingId:k}=p;E>0?setTimeout(()=>{p.pendingId===k&&p.fallback(f)},E):E===0&&p.fallback(f)}}function PS(e,t,n,r,o,i,s,a,l,c,u=!1){const{p,m:h,um:f,n:g,o:{parentNode:m,remove:b}}=c;let w;const E=qV(e);E&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const k=e.props?Kh(e.props.timeout):void 0,v=i,_={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:o,deps:0,pendingId:Py++,timeout:typeof k=="number"?k:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(T=!1,N=!1){const{vnode:C,activeBranch:x,pendingBranch:I,pendingId:R,effects:M,parentComponent:B,container:z,isInFallback:J}=_;let q=!1;_.isHydrating?_.isHydrating=!1:T||(q=x&&I.transition&&I.transition.mode==="out-in",q&&(x.transition.afterLeave=()=>{R===_.pendingId&&(h(I,z,i===v?g(x):i,0),Yd(M),J&&C.ssFallback&&(C.ssFallback.el=null))}),x&&(m(x.el)===z&&(i=g(x)),f(x,B,_,!0),!q&&J&&C.ssFallback&&Wt(()=>C.ssFallback.el=null,_)),q||h(I,z,i,0)),_c(_,I),_.pendingBranch=null,_.isInFallback=!1;let K=_.parent,X=!1;for(;K;){if(K.pendingBranch){K.effects.push(...M),X=!0;break}K=K.parent}!X&&!q&&Yd(M),_.effects=[],E&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),Qd(C,"onResolve")},fallback(T){if(!_.pendingBranch)return;const{vnode:N,activeBranch:C,parentComponent:x,container:I,namespace:R}=_;Qd(N,"onFallback");const M=g(C),B=()=>{_.isInFallback&&(p(null,T,I,M,x,null,R,a,l),_c(_,T))},z=T.transition&&T.transition.mode==="out-in";z&&(C.transition.afterLeave=B),_.isInFallback=!0,f(C,x,null,!0),z||B()},move(T,N,C){_.activeBranch&&h(_.activeBranch,T,N,C),_.container=T},next(){return _.activeBranch&&g(_.activeBranch)},registerDep(T,N,C){const x=!!_.pendingBranch;x&&_.deps++;const I=T.vnode.el;T.asyncDep.catch(R=>{pl(R,T,0)}).then(R=>{if(T.isUnmounted||_.isUnmounted||_.pendingId!==T.suspenseId)return;T.asyncResolved=!0;const{vnode:M}=T;Ay(T,R,!1),I&&(M.el=I);const B=!I&&T.subTree.el;N(T,M,m(I||T.subTree.el),I?null:g(T.subTree),_,s,C),B&&(M.placeholder=null,b(B)),Lm(T,M.el),x&&--_.deps===0&&_.resolve()})},unmount(T,N){_.isUnmounted=!0,_.activeBranch&&f(_.activeBranch,n,T,N),_.pendingBranch&&f(_.pendingBranch,n,T,N)}};return _}function GV(e,t,n,r,o,i,s,a,l){const c=t.suspense=PS(t,r,n,e.parentNode,document.createElement("div"),null,o,i,s,a,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,i,s);return c.deps===0&&c.resolve(!1,!0),u}function WV(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=J_(r?n.default:n),e.ssFallback=r?J_(n.fallback):S(Bt)}function J_(e){let t;if(Se(e)){const n=Qa&&e._c;n&&(e._d=!1,y()),e=e(),n&&(e._d=!0,t=Rn,RS())}return ke(e)&&(e=PV(e)),e=ir(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function $S(e,t){t&&t.pendingBranch?ke(e)?t.effects.push(...e):t.effects.push(e):Yd(e)}function _c(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,r&&r.subTree===n&&(r.vnode.el=o,Lm(r,o))}function qV(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const ge=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),Bt=Symbol.for("v-cmt"),Wa=Symbol.for("v-stc"),Cd=[];let Rn=null;function y(e=!1){Cd.push(Rn=e?null:[])}function RS(){Cd.pop(),Rn=Cd[Cd.length-1]||null}let Qa=1;function ep(e,t=!1){Qa+=e,e<0&&Rn&&t&&(Rn.hasOnce=!0)}function AS(e){return e.dynamicChildren=Qa>0?Rn||mc:null,RS(),Qa>0&&Rn&&Rn.push(e),e}function V(e,t,n,r,o,i){return AS(D(e,t,n,r,o,i,!0))}function $(e,t,n,r,o){return AS(S(e,t,n,r,o,!0))}function Vi(e){return e?e.__v_isVNode===!0:!1}function to(e,t){return e.type===t.type&&e.key===t.key}function KV(e){}const NS=({key:e})=>e??null,vh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?kt(e)||Ce(e)||Se(e)?{i:wn,r:e,k:t,f:!!n}:e:null);function D(e,t=null,n=null,r=0,o=null,i=e===ge?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&NS(t),ref:t&&vh(t),scopeId:$m,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:wn};return a?(rx(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=kt(n)?8:16),Qa>0&&!s&&Rn&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rn.push(l),l}const S=YV;function YV(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===sS)&&(e=Bt),Vi(e)){const a=Ir(e,t,!0);return n&&rx(a,n),Qa>0&&!i&&Rn&&(a.shapeFlag&6?Rn[Rn.indexOf(e)]=a:Rn.push(a)),a.patchFlag=-2,a}if(rF(e)&&(e=e.__vccOpts),t){t=Fe(t);let{class:a,style:l}=t;a&&!kt(a)&&(t.class=Ne(a)),pt(l)&&(Mp(l)&&!ke(l)&&(l=ft({},l)),t.style=Yt(l))}const s=kt(e)?1:ng(e)?128:jT(e)?64:pt(e)?4:Se(e)?2:0;return D(e,t,n,r,o,s,i,!0)}function Fe(e){return e?Mp(e)||yS(e)?ft({},e):e:null}function Ir(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:s,children:a,transition:l}=e,c=t?F(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&NS(c),ref:t&&t.ref?n&&i?ke(i)?i.concat(vh(t)):[i,vh(t)]:vh(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ge?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ir(e.ssContent),ssFallback:e.ssFallback&&Ir(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Li(u,l.clone(u)),u}function re(e=" ",t=0){return S(Rs,null,e,t)}function XV(e,t){const n=S(Wa,null,e);return n.staticCount=t,n}function Z(e="",t=!1){return t?(y(),$(Bt,null,e)):S(Bt,null,e)}function ir(e){return e==null||typeof e=="boolean"?S(Bt):ke(e)?S(ge,null,e.slice()):Vi(e)?ys(e):S(Rs,null,String(e))}function ys(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ir(e)}function rx(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ke(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),rx(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!yS(t)?t._ctx=wn:o===3&&wn&&(wn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:wn},n=32):(t=String(t),r&64?(n=16,t=[re(t)]):n=8);e.children=t,e.shapeFlag|=n}function F(...e){const t={};for(let n=0;nxn||wn;let rg,$y;{const e=Em(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(s=>s(i)):o[0](i)}};rg=t("__VUE_INSTANCE_SETTERS__",n=>xn=n),$y=t("__VUE_SSR_SETTERS__",n=>Nc=n)}const el=e=>{const t=xn;return rg(e),e.scope.on(),()=>{e.scope.off(),rg(t)}},Ry=()=>{xn&&xn.scope.off(),rg(null)};function DS(e){return e.vnode.shapeFlag&4}let Nc=!1;function LS(e,t=!1,n=!1){t&&$y(t);const{props:r,children:o}=e.vnode,i=DS(e);NV(e,r,i,t),VV(e,o,n||t);const s=i?QV(e,t):void 0;return t&&$y(!1),s}function QV(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Oy);const{setup:r}=n;if(r){Mi();const o=e.setupContext=r.length>1?FS(e):null,i=el(e),s=eu(r,e,0,[e.props,o]),a=L1(s);if(Di(),i(),(a||e.sp)&&!$s(e)&&K1(e),a){if(s.then(Ry,Ry),t)return s.then(l=>{Ay(e,l,t)}).catch(l=>{pl(l,e,0)});e.asyncDep=s}else Ay(e,s,t)}else VS(e,t)}function Ay(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:pt(t)&&(e.setupState=z1(t)),VS(e,n)}let og,Ny;function eF(e){og=e,Ny=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,aV))}}const tF=()=>!og;function VS(e,t,n){const r=e.type;if(!e.render){if(!t&&og&&!r.render){const o=r.template||Q1(e).template;if(o){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=ft(ft({isCustomElement:i,delimiters:a},s),l);r.render=og(o,c)}}e.render=r.render||Ur,Ny&&Ny(e)}{const o=el(e);Mi();try{bV(e)}finally{Di(),o()}}}const nF={get(e,t){return $n(e,"get",""),e[t]}};function FS(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nF),slots:e.slots,emit:e.emit,expose:t}}function Vp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(z1(fe(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in kd)return kd[n](e)},has(t,n){return n in t||n in kd}})):e.proxy}function My(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function rF(e){return Se(e)&&"__vccOpts"in e}const A=(e,t)=>kL(e,t,Nc);function uo(e,t,n){try{ep(-1);const r=arguments.length;return r===2?pt(t)&&!ke(t)?Vi(t)?S(e,null,[t]):S(e,t):S(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Vi(n)&&(n=[n]),S(e,t,n))}finally{ep(1)}}function oF(){}function iF(e,t,n,r){const o=n[r];if(o&&BS(o,e))return o;const i=t();return i.memo=e.slice(),i.cacheIndex=r,n[r]=i}function BS(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r0&&Rn&&Rn.push(e),!0}const HS="3.5.25",sF=Ur,aF=RL,lF=Jl,cF=zT,uF={createComponentInstance:MS,setupComponent:LS,renderComponentRoot:mh,setCurrentRenderingInstance:Jd,isVNode:Vi,normalizeVNode:ir,getComponentPublicInstance:Vp,ensureValidVNode:Z1,pushWarningContext:TL,popWarningContext:SL},dF=uF,pF=null,fF=null,hF=null;let Dy;const Z_=typeof window<"u"&&window.trustedTypes;if(Z_)try{Dy=Z_.createPolicy("vue",{createHTML:e=>e})}catch{}const zS=Dy?e=>Dy.createHTML(e):e=>e,gF="http://www.w3.org/2000/svg",mF="http://www.w3.org/1998/Math/MathML",gi=typeof document<"u"?document:null,Q_=gi&&gi.createElement("template"),US={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?gi.createElementNS(gF,e):t==="mathml"?gi.createElementNS(mF,e):n?gi.createElement(e,{is:n}):gi.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>gi.createTextNode(e),createComment:e=>gi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>gi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{Q_.innerHTML=zS(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const a=Q_.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},is="transition",Eu="animation",Mc=Symbol("_vtc"),jS={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},GS=ft({},q1,jS),vF=e=>(e.displayName="Transition",e.props=GS,e),bF=vF((e,{slots:t})=>uo(YT,WS(e),t)),xa=(e,t=[])=>{ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},ek=e=>e?ke(e)?e.some(t=>t.length>1):e.length>1:!1;function WS(e){const t={};for(const M in e)M in jS||(t[M]=e[M]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=s,appearToClass:u=a,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,g=yF(o),m=g&&g[0],b=g&&g[1],{onBeforeEnter:w,onEnter:E,onEnterCancelled:k,onLeave:v,onLeaveCancelled:_,onBeforeAppear:T=w,onAppear:N=E,onAppearCancelled:C=k}=t,x=(M,B,z,J)=>{M._enterCancelled=J,ps(M,B?u:a),ps(M,B?c:s),z&&z()},I=(M,B)=>{M._isLeaving=!1,ps(M,p),ps(M,f),ps(M,h),B&&B()},R=M=>(B,z)=>{const J=M?N:E,q=()=>x(B,M,z);xa(J,[B,q]),tk(()=>{ps(B,M?l:i),Vo(B,M?u:a),ek(J)||nk(B,r,m,q)})};return ft(t,{onBeforeEnter(M){xa(w,[M]),Vo(M,i),Vo(M,s)},onBeforeAppear(M){xa(T,[M]),Vo(M,l),Vo(M,c)},onEnter:R(!1),onAppear:R(!0),onLeave(M,B){M._isLeaving=!0;const z=()=>I(M,B);Vo(M,p),M._enterCancelled?(Vo(M,h),Ly(M)):(Ly(M),Vo(M,h)),tk(()=>{M._isLeaving&&(ps(M,p),Vo(M,f),ek(v)||nk(M,r,b,z))}),xa(v,[M,z])},onEnterCancelled(M){x(M,!1,void 0,!0),xa(k,[M])},onAppearCancelled(M){x(M,!0,void 0,!0),xa(C,[M])},onLeaveCancelled(M){I(M),xa(_,[M])}})}function yF(e){if(e==null)return null;if(pt(e))return[ob(e.enter),ob(e.leave)];{const t=ob(e);return[t,t]}}function ob(e){return Kh(e)}function Vo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Mc]||(e[Mc]=new Set)).add(t)}function ps(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Mc];n&&(n.delete(t),n.size||(e[Mc]=void 0))}function tk(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xF=0;function nk(e,t,n,r){const o=e._endId=++xF,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:s,timeout:a,propCount:l}=qS(e,t);if(!s)return r();const c=s+"end";let u=0;const p=()=>{e.removeEventListener(c,h),i()},h=f=>{f.target===e&&++u>=l&&p()};setTimeout(()=>{u(n[g]||"").split(", "),o=r(`${is}Delay`),i=r(`${is}Duration`),s=rk(o,i),a=r(`${Eu}Delay`),l=r(`${Eu}Duration`),c=rk(a,l);let u=null,p=0,h=0;t===is?s>0&&(u=is,p=s,h=i.length):t===Eu?c>0&&(u=Eu,p=c,h=l.length):(p=Math.max(s,c),u=p>0?s>c?is:Eu:null,h=u?u===is?i.length:l.length:0);const f=u===is&&/\b(?:transform|all)(?:,|$)/.test(r(`${is}Property`).toString());return{type:u,timeout:p,propCount:h,hasTransform:f}}function rk(e,t){for(;e.lengthok(n)+ok(e[r])))}function ok(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ly(e){return(e?e.ownerDocument:document).body.offsetHeight}function wF(e,t,n){const r=e[Mc];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ig=Symbol("_vod"),KS=Symbol("_vsh"),ox={name:"show",beforeMount(e,{value:t},{transition:n}){e[ig]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ou(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ou(e,!0),r.enter(e)):r.leave(e,()=>{Ou(e,!1)}):Ou(e,t))},beforeUnmount(e,{value:t}){Ou(e,t)}};function Ou(e,t){e.style.display=t?e[ig]:"none",e[KS]=!t}function _F(){ox.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const YS=Symbol("");function kF(e){const t=zt();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>sg(i,o))},r=()=>{const o=e(t.proxy);t.ce?sg(t.ce,o):Vy(t.subTree,o),n(o)};Y1(()=>{Yd(r)}),Je(()=>{st(r,Ur,{flush:"post"});const o=new MutationObserver(r);o.observe(t.subTree.el.parentNode,{childList:!0}),Sr(()=>o.disconnect())})}function Vy(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Vy(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)sg(e.el,t);else if(e.type===ge)e.children.forEach(n=>Vy(n,t));else if(e.type===Wa){let{el:n,anchor:r}=e;for(;n&&(sg(n,t),n!==r);)n=n.nextSibling}}function sg(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const o in t){const i=jD(t[o]);n.setProperty(`--${o}`,i),r+=`--${o}: ${i};`}n[YS]=r}}const CF=/(?:^|;)\s*display\s*:/;function EF(e,t,n){const r=e.style,o=kt(n);let i=!1;if(n&&!o){if(t)if(kt(t))for(const s of t.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&bh(r,a,"")}else for(const s in t)n[s]==null&&bh(r,s,"");for(const s in n)s==="display"&&(i=!0),bh(r,s,n[s])}else if(o){if(t!==n){const s=r[YS];s&&(n+=";"+s),r.cssText=n,i=CF.test(n)}}else t&&e.removeAttribute("style");ig in e&&(e[ig]=i?r.display:"",e[KS]&&(r.display="none"))}const ik=/\s*!important$/;function bh(e,t,n){if(ke(n))n.forEach(r=>bh(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=OF(e,t);ik.test(n)?e.setProperty(sr(r),n.replace(ik,""),"important"):e[r]=n}}const sk=["Webkit","Moz","ms"],ib={};function OF(e,t){const n=ib[t];if(n)return n;let r=_n(t);if(r!=="filter"&&r in e)return ib[t]=r;r=Np(r);for(let o=0;osb||(PF.then(()=>sb=0),sb=Date.now());function RF(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;qr(AF(r,n.value),t,5,[r])};return n.value=e,n.attached=$F(),n}function AF(e,t){if(ke(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const pk=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,XS=(e,t,n,r,o,i)=>{const s=o==="svg";t==="class"?wF(e,r,s):t==="style"?EF(e,n,r):Ap(t)?M1(t)||TF(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):NF(e,t,r,s))?(ck(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&lk(e,t,r,s,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!kt(r))?ck(e,_n(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),lk(e,t,r,s))};function NF(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&pk(t)&&Se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return pk(t)&&kt(n)?!1:t in e}const fk={};function JS(e,t,n){let r=P(e,t);wm(r)&&(r=ft({},r,t));class o extends Vm{constructor(s){super(r,s,n)}}return o.def=r,o}const MF=((e,t)=>JS(e,t,lP)),DF=typeof HTMLElement<"u"?HTMLElement:class{};class Vm extends DF{constructor(t,n={},r=lg){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==lg?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ft({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Vm){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Nn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:s}=r;let a;if(i&&!ke(i))for(const l in i){const c=i[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Kh(this._props[l])),(a||(a=Object.create(null)))[_n(l)]=!0)}this._numberProps=a,this._resolveProps(r),this.shadowRoot&&this._applyStyles(s),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>{r.configureApp=this._def.configureApp,t(this._def=r,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)it(this,r)||Object.defineProperty(this,r,{get:()=>d(n[r])})}_resolveProps(t){const{props:n}=t,r=ke(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&r.includes(o)&&this._setProp(o,this[o]);for(const o of r.map(_n))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(i){this._setProp(o,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):fk;const o=_n(t);n&&this._numberProps&&this._numberProps[o]&&(r=Kh(r)),this._setProp(o,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,o=!1){if(n!==this._props[t]&&(this._dirty=!0,n===fk?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),o&&this._instance&&this._update(),r)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),n===!0?this.setAttribute(sr(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(sr(t),n+""):n||this.removeAttribute(sr(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),aP(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=S(this._def,ft(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const o=(i,s)=>{this.dispatchEvent(new CustomEvent(i,wm(s[0])?ft({detail:s},s[0]):{detail:s}))};r.emit=(i,...s)=>{o(i,s),sr(i)!==i&&o(sr(i),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let o=t.length-1;o>=0;o--){const i=document.createElement("style");r&&i.setAttribute("nonce",r),i.textContent=t[o],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let r=0;r(delete e.props.mode,e),BF=FF({name:"TransitionGroup",props:ft({},GS,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=zt(),r=W1();let o,i;return Mm(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!jF(o[0].el,n.vnode.el,s)){o=[];return}o.forEach(HF),o.forEach(zF);const a=o.filter(UF);Ly(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Vo(c,s),u.transform=u.webkitTransform=u.transitionDuration="";const p=c[ag]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",p),c[ag]=null,ps(c,s))};c.addEventListener("transitionend",p)}),o=[]}),()=>{const s=He(e),a=WS(s);let l=s.tag||ge;if(o=[],i)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:s}=qS(r);return i.removeChild(r),s}const Gs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ke(t)?n=>yc(t,n):t};function GF(e){e.target.composing=!0}function gk(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const jr=Symbol("_assign");function mk(e,t,n){return t&&(e=e.trim()),n&&(e=Cm(e)),e}const Zo={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[jr]=Gs(o);const i=r||o.props&&o.props.type==="number";Oi(e,t?"change":"input",s=>{s.target.composing||e[jr](mk(e.value,n,i))}),(n||i)&&Oi(e,"change",()=>{e.value=mk(e.value,n,i)}),t||(Oi(e,"compositionstart",GF),Oi(e,"compositionend",gk),Oi(e,"change",gk))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},s){if(e[jr]=Gs(s),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Cm(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===l)||(e.value=l))}},Fp={deep:!0,created(e,t,n){e[jr]=Gs(n),Oi(e,"change",()=>{const r=e._modelValue,o=Dc(e),i=e.checked,s=e[jr];if(ke(r)){const a=Om(r,o),l=a!==-1;if(i&&!l)s(r.concat(o));else if(!i&&l){const c=[...r];c.splice(a,1),s(c)}}else if(dl(r)){const a=new Set(r);i?a.add(o):a.delete(o),s(a)}else s(tP(e,i))})},mounted:vk,beforeUpdate(e,t,n){e[jr]=Gs(n),vk(e,t,n)}};function vk(e,{value:t,oldValue:n},r){e._modelValue=t;let o;if(ke(t))o=Om(t,r.props.value)>-1;else if(dl(t))o=t.has(r.props.value);else{if(t===n)return;o=js(t,tP(e,!0))}e.checked!==o&&(e.checked=o)}const ix={created(e,{value:t},n){e.checked=js(t,n.props.value),e[jr]=Gs(n),Oi(e,"change",()=>{e[jr](Dc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[jr]=Gs(r),t!==n&&(e.checked=js(t,r.props.value))}},sx={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=dl(t);Oi(e,"change",()=>{const i=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?Cm(Dc(s)):Dc(s));e[jr](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,Nn(()=>{e._assigning=!1})}),e[jr]=Gs(r)},mounted(e,{value:t}){bk(e,t)},beforeUpdate(e,t,n){e[jr]=Gs(n)},updated(e,{value:t}){e._assigning||bk(e,t)}};function bk(e,t){const n=e.multiple,r=ke(t);if(!(n&&!r&&!dl(t))){for(let o=0,i=e.options.length;oString(c)===String(a)):s.selected=Om(t,a)>-1}else s.selected=t.has(a);else if(js(Dc(s),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Dc(e){return"_value"in e?e._value:e.value}function tP(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const nP={created(e,t,n){If(e,t,n,null,"created")},mounted(e,t,n){If(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){If(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){If(e,t,n,r,"updated")}};function rP(e,t){switch(e){case"SELECT":return sx;case"TEXTAREA":return Zo;default:switch(t){case"checkbox":return Fp;case"radio":return ix;default:return Zo}}}function If(e,t,n,r,o){const s=rP(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}function WF(){Zo.getSSRProps=({value:e})=>({value:e}),ix.getSSRProps=({value:e},t)=>{if(t.props&&js(t.props.value,e))return{checked:!0}},Fp.getSSRProps=({value:e},t)=>{if(ke(e)){if(t.props&&Om(e,t.props.value)>-1)return{checked:!0}}else if(dl(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},nP.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=rP(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const qF=["ctrl","shift","alt","meta"],KF={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>qF.some(n=>e[`${n}Key`]&&!t.includes(n))},It=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=((o,...i)=>{for(let s=0;s{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(o=>{if(!("key"in o))return;const i=sr(o.key);if(t.some(s=>s===i||YF[s]===i))return e(o)}))},oP=ft({patchProp:XS},US);let Ed,yk=!1;function iP(){return Ed||(Ed=ES(oP))}function sP(){return Ed=yk?Ed:OS(oP),yk=!0,Ed}const aP=((...e)=>{iP().render(...e)}),JF=((...e)=>{sP().hydrate(...e)}),lg=((...e)=>{const t=iP().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=uP(r);if(!o)return;const i=t._component;!Se(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=n(o,!1,cP(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t}),lP=((...e)=>{const t=sP().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=uP(r);if(o)return n(o,!0,cP(o))},t});function cP(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function uP(e){return kt(e)?document.querySelector(e):e}let xk=!1;const ZF=()=>{xk||(xk=!0,WF(),_F())};const QF=()=>{},eB=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:YT,BaseTransitionPropsValidators:q1,Comment:Bt,DeprecationTypes:hF,EffectScope:V1,ErrorCodes:$L,ErrorTypeStrings:aF,Fragment:ge,KeepAlive:JT,ReactiveEffect:Gd,Static:Wa,Suspense:zV,Teleport:FL,Text:Rs,TrackOpTypes:CL,Transition:bF,TransitionGroup:Fy,TriggerOpTypes:EL,VueElement:Vm,assertNumber:PL,callWithAsyncErrorHandling:qr,callWithErrorHandling:eu,camelize:_n,capitalize:Np,cloneVNode:Ir,compatUtils:fF,compile:QF,computed:A,createApp:lg,createBlock:$,createCommentVNode:Z,createElementBlock:V,createElementVNode:D,createHydrationRenderer:OS,createPropsRestProxy:mV,createRenderer:ES,createSSRApp:lP,createSlots:iV,createStaticVNode:XV,createTextVNode:re,createVNode:S,customRef:U1,defineAsyncComponent:eV,defineComponent:P,defineCustomElement:JS,defineEmits:cV,defineExpose:uV,defineModel:fV,defineOptions:dV,defineProps:lV,defineSSRCustomElement:MF,defineSlots:pV,devtools:lF,effect:KD,effectScope:GD,getCurrentInstance:zt,getCurrentScope:bT,getCurrentWatcher:OL,getTransitionRawChildren:Rm,guardReactiveProps:Fe,h:uo,handleError:pl,hasInjectionContext:EV,hydrate:JF,hydrateOnIdle:KL,hydrateOnInteraction:ZL,hydrateOnMediaQuery:JL,hydrateOnVisible:XL,initCustomFormatter:oF,initDirectivesForSSR:ZF,inject:dt,isMemoSame:BS,isProxy:Mp,isReactive:Si,isReadonly:Jo,isRef:Ce,isRuntimeOnly:tF,isShallow:lr,isVNode:Vi,markRaw:fe,mergeDefaults:Ze,mergeModels:at,mergeProps:F,nextTick:Nn,nodeOps:US,normalizeClass:Ne,normalizeProps:Be,normalizeStyle:Yt,onActivated:ZT,onBeforeMount:Nm,onBeforeUnmount:on,onBeforeUpdate:Y1,onDeactivated:QT,onErrorCaptured:oS,onMounted:Je,onRenderTracked:rS,onRenderTriggered:nS,onScopeDispose:WD,onServerPrefetch:tS,onUnmounted:Sr,onUpdated:Mm,onWatcherCleanup:LT,openBlock:y,patchProp:XS,popScopeId:DL,provide:tu,proxyRefs:z1,pushScopeId:ML,queuePostFlushCb:Yd,reactive:Tr,readonly:Kd,ref:Q,registerRuntimeCompiler:eF,render:aP,renderList:Ie,renderSlot:L,resolveComponent:iS,resolveDirective:oV,resolveDynamicComponent:Xn,resolveFilter:pF,resolveTransitionHooks:Ac,setBlockTracking:ep,setDevtoolsHook:cF,setTransitionHooks:Li,shallowReactive:NT,shallowReadonly:hL,shallowRef:co,ssrContextKey:uS,ssrUtils:dF,stop:YD,toDisplayString:j,toHandlerKey:yd,toHandlers:sV,toRaw:He,toRef:wL,toRefs:j1,toValue:pe,transformVNodeArgs:KV,triggerRef:mL,unref:d,useAttrs:gV,useCssModule:VF,useCssVars:kF,useHost:ZS,useId:nt,useModel:rt,useSSRContext:dS,useShadowRoot:LF,useSlots:xo,useTemplateRef:HL,useTransitionState:W1,vModelCheckbox:Fp,vModelDynamic:nP,vModelRadio:ix,vModelSelect:sx,vModelText:Zo,vShow:ox,version:HS,warn:sF,watch:st,watchEffect:pS,watchPostEffect:OV,watchSyncEffect:fS,withAsyncContext:vV,withCtx:O,withDefaults:hV,withDirectives:yo,withKeys:XF,withMemo:iF,withModifiers:It,withScopeId:LL},Symbol.toStringTag,{value:"Module"})),Qt=Symbol.for("craftile-editor"),Rt=e=>{const t=Symbol(e);return[n=>tu(t,n),n=>dt(t,n),t]};function tB(e){return e==null?[]:Array.isArray(e)?e:[e]}var ax=e=>e[0],lx=e=>e[e.length-1],nB=(e,t)=>e.indexOf(t)!==-1,dP=(e,...t)=>e.concat(t),pP=(e,...t)=>e.filter(n=>!t.includes(n)),wk=(e,t)=>nB(e,t)?pP(e,t):dP(e,t);function fP(e,t,n={}){const{step:r=1,loop:o=!0}=n,i=t+r,s=e.length,a=s-1;return t===-1?r>0?0:a:i<0?o?a:0:i>=s?o?0:t>s?s:t:i}function rB(e,t,n={}){return e[fP(e,t,n)]}function oB(e,t,n={}){const{step:r=1,loop:o=!0}=n;return fP(e,t,{step:-r,loop:o})}function iB(e,t,n={}){return e[oB(e,t,n)]}var _k=e=>e?.constructor.name==="Array",sB=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(_k(e)&&_k(t))return sB(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;oArray.isArray(e),hP=e=>e!=null&&typeof e=="object",ab=e=>hP(e)&&!aB(e),yh=e=>typeof e=="string",Da=e=>typeof e=="function",lB=e=>e==null,qa=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),cB=e=>Object.prototype.toString.call(e),gP=Function.prototype.toString,uB=gP.call(Object),dB=e=>{if(!hP(e)||cB(e)!="[object Object]"||hB(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=qa(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&gP.call(n)==uB},pB=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,fB=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,hB=e=>pB(e)||fB(e),Tf=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,kk=e=>e,gB=()=>{},By=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},mP=(()=>{let e=0;return()=>(e++,e.toString(36))})();function Fm(e){if(!dB(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Fm(o))}return n}function mB(e,t=Object.is){let n={...e};const r=new Set,o=s=>(r.add(s),()=>r.delete(s)),i=()=>{r.forEach(s=>s())};return{subscribe:o,get:s=>n[s],set:(s,a)=>{t(n[s],a)||(n[s]=a,i())},update:s=>{let a=!1;for(const l in s){const c=s[l];c!==void 0&&!t(n[l],c)&&(n[l]=c,a=!0)}a&&i()},snapshot:()=>({...n})}}function lb(e,t){const n=performance.now();let r;function o(i){if(i-n>=t){e();return}r=requestAnimationFrame(o)}return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)}function Lc(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function vP(e,t){if(e==null)throw new Error(t())}function vB(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var bB=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),bP=()=>{},Bm=e=>typeof e=="object"&&e!==null,yB=2147483647,_e=e=>e?"":void 0,cx=e=>e?"true":void 0,xB=1,wB=9,_B=11,kn=e=>Bm(e)&&e.nodeType===xB&&typeof e.nodeName=="string",ux=e=>Bm(e)&&e.nodeType===wB,kB=e=>Bm(e)&&e===e.window,yP=e=>kn(e)?e.localName||"":"#document";function CB(e){return["html","body","#document"].includes(yP(e))}var EB=e=>Bm(e)&&e.nodeType!==void 0,tp=e=>EB(e)&&e.nodeType===_B&&"host"in e,OB=e=>kn(e)&&e.localName==="input",xP=e=>!!e?.matches("a[href]"),IB=e=>kn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function La(e){if(!e)return!1;const t=e.getRootNode();return kc(t)===e}var TB=/(textarea|select)/;function Hm(e){if(e==null||!kn(e))return!1;try{return OB(e)&&e.selectionStart!=null||TB.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function so(e,t){if(!e||!t||!kn(e)||!kn(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&tp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Pr(e){return ux(e)?e:kB(e)?e.document:e?.ownerDocument??document}function SB(e){return Pr(e).documentElement}function Cn(e){return tp(e)?Cn(e.host):ux(e)?e.defaultView??window:kn(e)?e.ownerDocument?.defaultView??window:window}function kc(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function PB(e){if(yP(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tp(e)&&e.host||SB(e);return tp(t)?t.host:t}var cb=new WeakMap;function Vc(e){return cb.has(e)||cb.set(e,Cn(e).getComputedStyle(e)),cb.get(e)}var zm=()=>typeof document<"u";function $B(){return navigator.userAgentData?.platform??navigator.platform}function RB(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var dx=e=>zm()&&e.test($B()),wP=e=>zm()&&e.test(RB()),AB=e=>zm()&&e.test(navigator.vendor),Ck=()=>zm()&&!!navigator.maxTouchPoints,NB=()=>dx(/^iPhone/i),MB=()=>dx(/^iPad/i)||Bp()&&navigator.maxTouchPoints>1,_P=()=>NB()||MB(),DB=()=>Bp()||_P(),Bp=()=>dx(/^Mac/i),px=()=>DB()&&AB(/apple/i),LB=()=>wP(/Firefox/i),VB=()=>wP(/Android/i);function FB(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Xt(e){return FB(e)?.[0]??e.target}function Hy(e){const t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=e.button===1,r=BB(e);return n||r}function Ek(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function kP(e){return WB(e).isComposing||e.keyCode===229}function BB(e){return Bp()?e.metaKey:e.ctrlKey}function HB(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function zB(e){return e.pointerType===""&&e.isTrusted?!0:VB()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var CP=e=>e.button===0,EP=e=>e.button===2||Bp()&&e.ctrlKey&&e.button===0,UB=e=>e.ctrlKey||e.altKey||e.metaKey,jB=e=>"touches"in e&&e.touches.length>0,GB={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Ok={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Fc(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=GB[o]??o,n==="rtl"&&r==="horizontal"&&o in Ok&&(o=Ok[o]),o}function WB(e){return e.nativeEvent??e}function Sf(e,t="client"){const n=jB(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var vn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function qB(e){return KB(e)?e.form:e.closest("form")}function KB(e){return e.matches("textarea, input, select, button")}function YB(e,t){if(!e)return;const n=qB(e),r=o=>{o.defaultPrevented||t()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}function XB(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const r=Cn(n),o=new r.MutationObserver(()=>t(n.disabled));return o.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>o.disconnect()}function JB(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:r}=t,o=[YB(e,r),XB(e,n)];return()=>o.forEach(i=>i?.())}var OP=e=>kn(e)&&e.tagName==="IFRAME",ZB=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),QB=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,fx="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",hx=(e,t=!1)=>{if(!e)return[];const n=Array.from(e.querySelectorAll(fx));(t==!0||t=="if-empty"&&n.length===0)&&kn(e)&&As(e)&&n.unshift(e);const r=n.filter(As);return r.forEach((o,i)=>{if(OP(o)&&o.contentDocument){const s=o.contentDocument.body;r.splice(i,1,...hx(s))}}),r};function As(e){return!e||e.closest("[inert]")?!1:e.matches(fx)&&IB(e)}function Hp(e,t){if(!e)return[];const n=Array.from(e.querySelectorAll(fx)),r=n.filter(xs);return t&&xs(e)&&r.unshift(e),r.forEach((o,i)=>{if(OP(o)&&o.contentDocument){const s=o.contentDocument.body,a=Hp(s);r.splice(i,1,...a)}}),!r.length&&t?n:r}function xs(e){return e!=null&&e.tabIndex>0?!0:As(e)&&!QB(e)}function IP(e,t){const n=Hp(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function e3(e,t){const n=Hp(e),r=e?.ownerDocument||document,o=t??kc(r);if(!o)return null;const i=n.indexOf(o);return n[i+1]||null}function Iu(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||Hm(e))&&!ZB(e)?0:e.tabIndex}function cg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof n=="function"?n():n),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){const s=Hp(t);i=r?s.filter(r)[0]:s[0]}return i||t||void 0}function TP(e){const t=e.currentTarget;if(!t)return!1;const[n,r]=IP(t);return!(La(n)&&e.shiftKey||La(r)&&!e.shiftKey||!n&&!r)}function gx(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Ke(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}function t3(e,t,n){const r=Ke(()=>{e.removeEventListener(t,o,!0),n()}),o=()=>{r(),n()};return e.addEventListener(t,o,{once:!0,capture:!0}),r}function n3(e,t){if(!e)return;const{attributes:n,callback:r}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(s=>{for(const a of s)a.type==="attributes"&&a.attributeName&&n.includes(a.attributeName)&&r(a)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function SP(e,t){const{defer:n}=t,r=n?Ke:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(n3(i,t))})),()=>{o.forEach(i=>i?.())}}function PP(e){const t=()=>{const n=Cn(e);e.dispatchEvent(new n.MouseEvent("click"))};LB()?t3(e,"keyup",t):queueMicrotask(t)}function ug(e){const t=PB(e);return CB(t)?Pr(t).body:kn(t)&&mx(t)?t:ug(t)}function $P(e,t=[]){const n=ug(e),r=n===e.ownerDocument.body,o=Cn(n);return r?t.concat(o,o.visualViewport||[],mx(n)?n:[]):t.concat(n,$P(n,[]))}var r3=/auto|scroll|overlay|hidden|clip/,o3=new Set(["inline","contents"]);function mx(e){const t=Cn(e),{overflow:n,overflowX:r,overflowY:o,display:i}=t.getComputedStyle(e);return r3.test(n+o+r)&&!o3.has(i)}function i3(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function RP(e,t){const{rootEl:n,...r}=t||{};!e||!n||!mx(n)||!i3(n)||e.scrollIntoView(r)}function s3(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o}=t,i=e?.ownerDocument||document,s=i.body;function a(l){if(l.key!=="Tab")return;let c=null;const[u,p]=IP(e,!0),h=e3(s,n),f=!u&&!p;l.shiftKey&&La(h)?(o?.(),c=p):l.shiftKey&&(La(u)||f)?c=n:!l.shiftKey&&La(n)?(o?.(),c=u):!l.shiftKey&&(La(p)||f)&&(c=h),c&&(l.preventDefault(),typeof r=="function"?r(c):c.focus())}return vn(i,"keydown",a,!0)}function a3(e,t){const{defer:n,triggerElement:r,...o}=t,i=n?Ke:a=>a(),s=[];return s.push(i(()=>{const a=typeof e=="function"?e():e,l=typeof r=="function"?r():r;s.push(s3(a,{triggerElement:l,...o}))})),()=>{s.forEach(a=>a?.())}}function vx(e,t){return Array.from(e?.querySelectorAll(t)??[])}var bx=e=>e.id;function AP(e,t,n=bx){return e.find(r=>n(r)===t)}function yx(e,t,n=bx){const r=AP(e,t,n);return r?e.indexOf(r):-1}function NP(e,t,n=!0){let r=yx(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function MP(e,t,n=!0){let r=yx(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function l3(e,t){const{onEntry:n,measure:r,box:o="border-box"}=t,i=(Array.isArray(e)?e:[e]).filter(kn),s=Cn(i[0]),a=c=>{const u=i.map(p=>r(p));n({rects:u,entries:c})};a([]);const l=new s.ResizeObserver(a);return i.forEach(c=>l.observe(c,{box:o})),()=>l.disconnect()}var c3=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),u3=e=>c3(e.dataset?.valuetext??e.textContent??""),d3=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function p3(e,t,n,r=bx){const o=n?yx(e,n,r):-1;let i=n?bB(e,o):e;return t.length===1&&(i=i.filter(s=>r(s)!==n)),i.find(s=>d3(u3(s),t))}function np(e,t){if(!e)return bP;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function f3(e,t,n){if(!e)return bP;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function h3(e,t){const{state:n,activeId:r,key:o,timeout:i=350,itemToId:s}=t,a=n.keysSoFar+o,l=a.length>1&&Array.from(a).every(f=>f===a[0])?a[0]:a;let c=e.slice();const u=p3(c,l,r,s);function p(){clearTimeout(n.timer),n.timer=-1}function h(f){n.keysSoFar=f,p(),f!==""&&(n.timer=+setTimeout(()=>{h(""),p()},i))}return h(a),u}var rp=Object.assign(h3,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:g3});function g3(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var m3={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function v3(e,t,n){const{signal:r}=t;return[new Promise((o,i)=>{const s=setTimeout(()=>{i(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(s),i(new Error("Promise aborted"))}),e.then(a=>{r.aborted||(clearTimeout(s),o(a))}).catch(a=>{r.aborted||(clearTimeout(s),i(a))})}),()=>t.abort()]}function b3(e,t){const{timeout:n,rootNode:r}=t,o=Cn(r),i=Pr(r),s=new o.AbortController;return v3(new Promise(a=>{const l=e();if(l){a(l);return}const c=new o.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),a(u))});c.observe(i.body,{childList:!0,subtree:!0})}),s,n)}var y3=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),x3=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ik=e=>{const t={};let n;for(;n=x3.exec(e);)t[n[1]]=n[2];return t},w3=(e,t)=>{if(yh(e)){if(yh(t))return`${e};${t}`;e=Ik(e)}else yh(t)&&(t=Ik(t));return Object.assign({},e??{},t??{})};function fl(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=By(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=y3(t[o],n[o]);continue}if(o==="style"){t[o]=w3(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function ru(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function _3(){return{guards:ru(),createMachine:e=>e,choose:e=>function({choose:t}){return t(e)?.actions}}}var Zl=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Zl||{}),ub="__init__";function k3(e){const t=()=>e.getRootNode?.()??document,n=()=>Pr(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>kc(t()),isActiveElement:La,getById:r=>t().getElementById(r)}}function C3(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var sn=()=>e=>Array.from(new Set(e));function E3(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var Tk={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},O3="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function I3(e){return e in Tk?Tk[e]:e.startsWith("on")?`on${E3(e.substr(2))}`:O3.includes(e)?e:e.toLowerCase()}var ii=C3(e=>{const t={};for(const n in e){const r=e[n];n==="children"?typeof r=="string"&&(t.innerHTML=r):t[I3(n)]=e[n]}return t});function dg(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=co(t),o=A(()=>e().value!==void 0),i=co(o.value?e().value:r.value);return{initial:t,ref:i,get(){return o.value?e().value:r.value},set(s){const a=o.value?e().value:r.value,l=Da(s)?s(a):s;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:l,prev:a}),o.value||(r.value=l),n(l,a)||e().onChange?.(l,a)},invoke(s,a){e().onChange?.(s,a)},hash(s){return e().hash?.(s)??String(s)}}}dg.cleanup=e=>{Sr(()=>e())};dg.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function T3(e){const t={current:e};return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var S3=(e,t)=>{st(()=>[...e.map(n=>n())],(n,r)=>{let o=!1;for(let i=0;i{const{id:C,ids:x,getRootNode:I}=pe(t);return k3({id:C,ids:x,getRootNode:I})}),r=(...C)=>{e.debug&&console.log(...C)},o=A(()=>e.props?.({props:Fm(pe(t)),get scope(){return n.value}})??pe(t)),i=P3(o),s=e.context?.({prop:i,bindable:dg,get scope(){return n.value},flush:Sk,getContext(){return a},getComputed(){return v},getRefs(){return g},getEvent(){return h()}}),a={get(C){return s[C]?.get()},set(C,x){s[C]?.set(x)},initial(C){return s[C]?.initial},hash(C){const x=s[C]?.get();return s[C]?.hash(x)}};let l=new Map,c=null,u={current:null},p={current:{type:""}};const h=()=>({...p.current,current(){return p.current},previous(){return u.current}}),f=()=>({..._,matches(...C){const x=_.get();return C.includes(x)},hasTag(C){const x=_.get();return!!e.states[x]?.tags?.includes(C)}}),g=T3(e.refs?.({prop:i,context:a})??{}),m=()=>({state:f(),context:a,event:h(),prop:i,send:N,action:b,guard:w,track:S3,refs:g,computed:v,flush:Sk,get scope(){return n.value},choose:k}),b=C=>{const x=Da(C)?C(m()):C;if(!x)return;const I=x.map(R=>{const M=e.implementations?.actions?.[R];return M||Lc(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of I)R?.(m())},w=C=>Da(C)?C(m()):e.implementations?.guards?.[C](m()),E=C=>{const x=Da(C)?C(m()):C;if(!x)return;const I=x.map(M=>{const B=e.implementations?.effects?.[M];return B||Lc(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of I){const B=M?.(m());B&&R.push(B)}return()=>R.forEach(M=>M?.())},k=C=>tB(C).find(x=>{let I=!x.guard;return yh(x.guard)?I=!!w(x.guard):Da(x.guard)&&(I=x.guard(m())),I}),v=C=>{vP(e.computed,()=>"[zag-js] No computed object found on machine");const x=e.computed[C];return x({context:a,event:h(),prop:i,refs:g,get scope(){return n.value},computed:v})},_=dg(()=>({defaultValue:e.initialState({prop:i}),onChange(C,x){x&&(l.get(x)?.(),l.delete(x)),x&&b(e.states[x]?.exit),b(c?.actions);const I=E(e.states[C]?.effects);if(I&&l.set(C,I),x===ub){b(e.entry);const R=E(e.effects);R&&l.set(ub,R)}b(e.states[C]?.entry)}}));let T=Zl.NotStarted;Je(()=>{const C=T===Zl.Started;T=Zl.Started,r(C?"rehydrating...":"initializing..."),_.invoke(_.initial,ub)}),on(()=>{T=Zl.Stopped,r("unmounting...");const C=l.values();for(const x of C)x?.();l=new Map,b(e.exit)});const N=C=>{if(T!==Zl.Started)return;u.current=p.current,p.current=C;let x=_.get();const I=e.states[x].on?.[C.type]??e.on?.[C.type],R=k(I);if(!R)return;c=R;const M=R.target??x;r("transition",C.type,R.target||x,`(${R.actions})`);const B=M!==x;B?_.set(M):R.reenter&&!B?_.invoke(x,x):b(R.actions)};return e.watch?.(m()),{state:f(),send:N,context:a,prop:i,get scope(){return n.value},refs:g,computed:v,event:h(),getStatus:()=>T}}function P3(e){return function(t){return e.value[t]}}var Sk=e=>{Nn().then(()=>{e()})};const $3=P({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;const r=DP(n.default()),[o,...i]=r;if(Object.keys(t).length>0){delete o.props?.ref;const s=fl(t,o.props??{}),a=Ir(o,s);for(const l in s)l.startsWith("on")&&(a.props||={},a.props[l]=s[l]);return r.length===1?a:[a,...i]}return r}}});function DP(e){return e?e.flatMap(t=>t.type===ge?DP(t.children):[t]):[]}const R3="br, hr, img, input, area, textarea".split(", "),A3=e=>typeof e=="string"&&R3.includes(e),db=e=>P({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>uo($3,n,r):()=>uo(e,n,A3(e)?void 0:r.default?.())}});function N3(){const e=new Map;return new Proxy(db,{apply(t,n,r){return db(r[0])},get(t,n){return e.has(n)||e.set(n,db(n)),e.get(n)}})}const he=N3();function xx(e){const t=pe(e);return t?.$el??t}const M3=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function se(){const e=zt(),t=Q(),n=A(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:xx(t)),r=Object.assign({},e.exposed),o={};for(const s in e.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(r).length>0)for(const s in r)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>r[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=o;function i(s){t.value=s,!(M3(s)||!s)&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s.$el}),e.exposed=o)}return{forwardRef:i,currentRef:t,currentElement:n}}var ar=(e,t=[])=>({parts:(...n)=>{if(D3(t))return ar(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>ar(e,[...t,...n]),omit:(...n)=>ar(e,t.filter(r=>!n.includes(r))),rename:n=>ar(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Sl(e)}"][data-part="${Sl(r)}"]`,`& [data-scope="${Sl(e)}"][data-part="${Sl(r)}"]`].join(", "),attrs:{"data-scope":Sl(e),"data-part":Sl(r)}}}),{})}),Sl=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),D3=e=>e.length===0;const[uCe,_o]=Rt("EnvironmentContext"),ko=A(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),qi=A(()=>({dir:"ltr",locale:"en-US"})),[dCe,Ki]=Rt("LocaleContext"),ra=e=>{const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},L3=["top","right","bottom","left"],Ws=Math.min,vr=Math.max,pg=Math.round,Pf=Math.floor,Wo=e=>({x:e,y:e}),V3={left:"right",right:"left",bottom:"top",top:"bottom"},F3={start:"end",end:"start"};function zy(e,t,n){return vr(e,Ws(t,n))}function Fi(e,t){return typeof e=="function"?e(t):e}function Bi(e){return e.split("-")[0]}function ou(e){return e.split("-")[1]}function wx(e){return e==="x"?"y":"x"}function _x(e){return e==="y"?"height":"width"}const B3=new Set(["top","bottom"]);function zo(e){return B3.has(Bi(e))?"y":"x"}function kx(e){return wx(zo(e))}function H3(e,t,n){n===void 0&&(n=!1);const r=ou(e),o=kx(e),i=_x(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=fg(s)),[s,fg(s)]}function z3(e){const t=fg(e);return[Uy(e),t,Uy(t)]}function Uy(e){return e.replace(/start|end/g,t=>F3[t])}const Pk=["left","right"],$k=["right","left"],U3=["top","bottom"],j3=["bottom","top"];function G3(e,t,n){switch(e){case"top":case"bottom":return n?t?$k:Pk:t?Pk:$k;case"left":case"right":return t?U3:j3;default:return[]}}function W3(e,t,n,r){const o=ou(e);let i=G3(Bi(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Uy)))),i}function fg(e){return e.replace(/left|right|bottom|top/g,t=>V3[t])}function q3(e){return{top:0,right:0,bottom:0,left:0,...e}}function LP(e){return typeof e!="number"?q3(e):{top:e,right:e,bottom:e,left:e}}function hg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Rk(e,t,n){let{reference:r,floating:o}=e;const i=zo(t),s=kx(t),a=_x(s),l=Bi(t),c=i==="y",u=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(ou(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const K3=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=Rk(c,r,l),h=r,f={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Fi(e,t)||{};if(c==null)return{};const p=LP(u),h={x:n,y:r},f=kx(o),g=_x(f),m=await s.getDimensions(c),b=f==="y",w=b?"top":"left",E=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=i.reference[g]+i.reference[f]-h[f]-i.floating[g],_=h[f]-i.reference[f],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=T?T[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(T)))&&(N=a.floating[k]||i.floating[g]);const C=v/2-_/2,x=N/2-m[g]/2-1,I=Ws(p[w],x),R=Ws(p[E],x),M=I,B=N-m[g]-R,z=N/2-m[g]/2+C,J=zy(M,z,B),q=!l.arrow&&ou(o)!=null&&z!==J&&i.reference[g]/2-(zz<=0)){var R,M;const z=(((R=i.flip)==null?void 0:R.index)||0)+1,J=N[z];if(J&&(!(p==="alignment"&&E!==zo(J))||I.every(K=>zo(K.placement)===E?K.overflows[0]>0:!0)))return{data:{index:z,overflows:I},reset:{placement:J}};let q=(M=I.filter(K=>K.overflows[0]<=0).sort((K,X)=>K.overflows[1]-X.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(f){case"bestFit":{var B;const K=(B=I.filter(X=>{if(T){const de=zo(X.placement);return de===E||de==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(de=>de>0).reduce((de,Ue)=>de+Ue,0)]).sort((X,de)=>X[1]-de[1])[0])==null?void 0:B[0];K&&(q=K);break}case"initialPlacement":q=a;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function Ak(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Nk(e){return L3.some(t=>e[t]>=0)}const J3=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Fi(e,t);switch(r){case"referenceHidden":{const i=await op(t,{...o,elementContext:"reference"}),s=Ak(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Nk(s)}}}case"escaped":{const i=await op(t,{...o,altBoundary:!0}),s=Ak(i,n.floating);return{data:{escapedOffsets:s,escaped:Nk(s)}}}default:return{}}}}},VP=new Set(["left","top"]);async function Z3(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Bi(n),a=ou(n),l=zo(n)==="y",c=VP.has(s)?-1:1,u=i&&l?-1:1,p=Fi(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const Q3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Z3(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},e6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...l}=Fi(e,t),c={x:n,y:r},u=await op(t,l),p=zo(Bi(o)),h=wx(p);let f=c[h],g=c[p];if(i){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=f+u[b],k=f-u[w];f=zy(E,f,k)}if(s){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=g+u[b],k=g-u[w];g=zy(E,g,k)}const m=a.fn({...t,[h]:f,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[p]:s}}}}}},t6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Fi(e,t),u={x:n,y:r},p=zo(o),h=wx(p);let f=u[h],g=u[p];const m=Fi(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",v=i.reference[h]-i.floating[k]+b.mainAxis,_=i.reference[h]+i.reference[k]-b.mainAxis;f_&&(f=_)}if(c){var w,E;const k=h==="y"?"width":"height",v=VP.has(Bi(o)),_=i.reference[p]-i.floating[k]+(v&&((w=s.offset)==null?void 0:w[p])||0)+(v?0:b.crossAxis),T=i.reference[p]+i.reference[k]+(v?0:((E=s.offset)==null?void 0:E[p])||0)-(v?b.crossAxis:0);g<_?g=_:g>T&&(g=T)}return{[h]:f,[p]:g}}}},n6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Fi(e,t),u=await op(t,c),p=Bi(o),h=ou(o),f=zo(o)==="y",{width:g,height:m}=i.floating;let b,w;p==="top"||p==="bottom"?(b=p,w=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(w=p,b=h==="end"?"top":"bottom");const E=m-u.top-u.bottom,k=g-u.left-u.right,v=Ws(m-u[b],E),_=Ws(g-u[w],k),T=!t.middlewareData.shift;let N=v,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),T&&!h){const I=vr(u.left,0),R=vr(u.right,0),M=vr(u.top,0),B=vr(u.bottom,0);f?C=g-2*(I!==0||R!==0?I+R:vr(u.left,u.right)):N=m-2*(M!==0||B!==0?M+B:vr(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:N});const x=await s.getDimensions(a.floating);return g!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function Um(){return typeof window<"u"}function iu(e){return FP(e)?(e.nodeName||"").toLowerCase():"#document"}function kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function si(e){var t;return(t=(FP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FP(e){return Um()?e instanceof Node||e instanceof kr(e).Node:!1}function po(e){return Um()?e instanceof Element||e instanceof kr(e).Element:!1}function Qo(e){return Um()?e instanceof HTMLElement||e instanceof kr(e).HTMLElement:!1}function Mk(e){return!Um()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kr(e).ShadowRoot}const r6=new Set(["inline","contents"]);function zp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!r6.has(o)}const o6=new Set(["table","td","th"]);function i6(e){return o6.has(iu(e))}const s6=[":popover-open",":modal"];function jm(e){return s6.some(t=>{try{return e.matches(t)}catch{return!1}})}const a6=["transform","translate","scale","rotate","perspective"],l6=["transform","translate","scale","rotate","perspective","filter"],c6=["paint","layout","strict","content"];function Cx(e){const t=Ex(),n=po(e)?fo(e):e;return a6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||l6.some(r=>(n.willChange||"").includes(r))||c6.some(r=>(n.contain||"").includes(r))}function u6(e){let t=qs(e);for(;Qo(t)&&!Bc(t);){if(Cx(t))return t;if(jm(t))return null;t=qs(t)}return null}function Ex(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const d6=new Set(["html","body","#document"]);function Bc(e){return d6.has(iu(e))}function fo(e){return kr(e).getComputedStyle(e)}function Gm(e){return po(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qs(e){if(iu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mk(e)&&e.host||si(e);return Mk(t)?t.host:t}function BP(e){const t=qs(e);return Bc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qo(t)&&zp(t)?t:BP(t)}function ip(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=BP(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=kr(o);if(i){const a=jy(s);return t.concat(s,s.visualViewport||[],zp(o)?o:[],a&&n?ip(a):[])}return t.concat(o,ip(o,[],n))}function jy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HP(e){const t=fo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qo(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=pg(n)!==i||pg(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ox(e){return po(e)?e:e.contextElement}function Cc(e){const t=Ox(e);if(!Qo(t))return Wo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=HP(t);let s=(i?pg(n.width):n.width)/r,a=(i?pg(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const p6=Wo(0);function zP(e){const t=kr(e);return!Ex()||!t.visualViewport?p6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kr(e)?!1:t}function tl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ox(e);let s=Wo(1);t&&(r?po(r)&&(s=Cc(r)):s=Cc(e));const a=f6(i,n,r)?zP(i):Wo(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(i){const h=kr(i),f=r&&po(r)?kr(r):r;let g=h,m=jy(g);for(;m&&r&&f!==g;){const b=Cc(m),w=m.getBoundingClientRect(),E=fo(m),k=w.left+(m.clientLeft+parseFloat(E.paddingLeft))*b.x,v=w.top+(m.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=k,c+=v,g=kr(m),m=jy(g)}}return hg({width:u,height:p,x:l,y:c})}function Wm(e,t){const n=Gm(e).scrollLeft;return t?t.left+n:tl(si(e)).left+n}function UP(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wm(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function h6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=si(r),a=t?jm(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Wo(1);const u=Wo(0),p=Qo(r);if((p||!p&&!i)&&((iu(r)!=="body"||zp(s))&&(l=Gm(r)),Qo(r))){const f=tl(r);c=Cc(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=s&&!p&&!i?UP(s,l):Wo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function g6(e){return Array.from(e.getClientRects())}function m6(e){const t=si(e),n=Gm(e),r=e.ownerDocument.body,o=vr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Wm(e);const a=-n.scrollTop;return fo(r).direction==="rtl"&&(s+=vr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Dk=25;function v6(e,t){const n=kr(e),r=si(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Ex();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Wm(r);if(c<=0){const u=r.ownerDocument,p=u.body,h=getComputedStyle(p),f=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-f);g<=Dk&&(i-=g)}else c<=Dk&&(i+=c);return{width:i,height:s,x:a,y:l}}const b6=new Set(["absolute","fixed"]);function y6(e,t){const n=tl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Qo(e)?Cc(e):Wo(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Lk(e,t,n){let r;if(t==="viewport")r=v6(e,n);else if(t==="document")r=m6(si(e));else if(po(t))r=y6(t,n);else{const o=zP(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return hg(r)}function jP(e,t){const n=qs(e);return n===t||!po(n)||Bc(n)?!1:fo(n).position==="fixed"||jP(n,t)}function x6(e,t){const n=t.get(e);if(n)return n;let r=ip(e,[],!1).filter(a=>po(a)&&iu(a)!=="body"),o=null;const i=fo(e).position==="fixed";let s=i?qs(e):e;for(;po(s)&&!Bc(s);){const a=fo(s),l=Cx(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&b6.has(o.position)||zp(s)&&!l&&jP(e,s))?r=r.filter(c=>c!==s):o=a,s=qs(s)}return t.set(e,r),r}function w6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?jm(t)?[]:x6(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((l,c)=>{const u=Lk(t,c,o);return l.top=vr(u.top,l.top),l.right=Ws(u.right,l.right),l.bottom=Ws(u.bottom,l.bottom),l.left=vr(u.left,l.left),l},Lk(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function _6(e){const{width:t,height:n}=HP(e);return{width:t,height:n}}function k6(e,t,n){const r=Qo(t),o=si(t),i=n==="fixed",s=tl(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Wo(0);function c(){l.x=Wm(o)}if(r||!r&&!i)if((iu(t)!=="body"||zp(o))&&(a=Gm(t)),r){const f=tl(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?UP(o,a):Wo(0),p=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:p,y:h,width:s.width,height:s.height}}function pb(e){return fo(e).position==="static"}function Vk(e,t){if(!Qo(e)||fo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return si(e)===n&&(n=n.ownerDocument.body),n}function GP(e,t){const n=kr(e);if(jm(e))return n;if(!Qo(e)){let o=qs(e);for(;o&&!Bc(o);){if(po(o)&&!pb(o))return o;o=qs(o)}return n}let r=Vk(e,t);for(;r&&i6(r)&&pb(r);)r=Vk(r,t);return r&&Bc(r)&&pb(r)&&!Cx(r)?n:r||u6(e)||n}const C6=async function(e){const t=this.getOffsetParent||GP,n=this.getDimensions,r=await n(e.floating);return{reference:k6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function E6(e){return fo(e).direction==="rtl"}const O6={convertOffsetParentRelativeRectToViewportRelativeRect:h6,getDocumentElement:si,getClippingRect:w6,getOffsetParent:GP,getElementRects:C6,getClientRects:g6,getDimensions:_6,getScale:Cc,isElement:po,isRTL:E6};function WP(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function I6(e,t){let n=null,r;const o=si(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:h,height:f}=c;if(a||t(),!h||!f)return;const g=Pf(p),m=Pf(o.clientWidth-(u+h)),b=Pf(o.clientHeight-(p+f)),w=Pf(u),E={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:vr(0,Ws(1,l))||1};let k=!0;function v(_){const T=_[0].intersectionRatio;if(T!==l){if(!k)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!WP(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(v,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,E)}n.observe(e)}return s(!0),i}function T6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ox(e),u=o||i?[...c?ip(c):[],...ip(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=c&&a?I6(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g,m=l?tl(e):null;l&&b();function b(){const w=tl(e);m&&!WP(m,w)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const S6=Q3,P6=e6,$6=X3,R6=n6,A6=J3,N6=Y3,M6=t6,D6=(e,t,n)=>{const r=new Map,o={platform:O6,...n},i={...o.platform,_c:r};return K3(e,t,{...o,platform:i})};function Fk(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...o,toJSON:()=>o}}function L6(e){if(!e)return Fk();const{x:t,y:n,width:r,height:o}=e;return Fk(t,n,r,o)}function V6(e,t){return{contextElement:kn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t?.(n);return r||!n?L6(r):n.getBoundingClientRect()}}}var Tu=e=>({variable:e,reference:`var(${e})`}),mi={arrowSize:Tu("--arrow-size"),arrowSizeHalf:Tu("--arrow-size-half"),arrowBg:Tu("--arrow-background"),transformOrigin:Tu("--transform-origin"),arrowOffset:Tu("--arrow-offset")},F6=e=>e==="top"||e==="bottom"?"y":"x";function B6(e,t){return{name:"transformOrigin",fn(n){const{elements:r,middlewareData:o,placement:i,rects:s,y:a}=n,l=i.split("-")[0],c=F6(l),u=o.arrow?.x||0,p=o.arrow?.y||0,h=t?.clientWidth||0,f=t?.clientHeight||0,g=u+h/2,m=p+f/2,b=Math.abs(o.shift?.y||0),w=s.reference.height/2,E=f/2,k=e.offset?.mainAxis??e.gutter,v=typeof k=="number"?k+E:k??E,_=b>v,T={top:`${g}px calc(100% + ${v}px)`,bottom:`${g}px ${-v}px`,left:`calc(100% + ${v}px) ${m}px`,right:`${-v}px ${m}px`}[l],N=`${g}px ${s.reference.y+w-a}px`,C=!!e.overlap&&c==="y"&&_;return r.floating.style.setProperty(mi.transformOrigin.variable,C?N:T),{data:{transformOrigin:C?N:T}}}}}var H6={name:"rects",fn({rects:e}){return{data:e}}},z6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${mi.arrowOffset.reference})`}),{}}}};function U6(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function j6(e){return e.split("-")[0]}var G6={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Bk(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Ix(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function W6(e,t,n){const r=e||t.createElement("div");return N6({element:r,padding:n.arrowPadding})}function q6(e,t){if(!lB(t.offset??t.gutter))return S6(({placement:n})=>{const r=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,i=typeof o=="number"?o+r:o??r,{hasAlign:s}=U6(n),a=s?void 0:t.shift,l=t.offset?.crossAxis??a;return Fm({crossAxis:l,mainAxis:i,alignmentAxis:t.shift})})}function K6(e){if(!e.flip)return;const t=Ix(e.boundary);return $6({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function Y6(e){if(!e.slide&&!e.overlap)return;const t=Ix(e.boundary);return P6({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:M6()})}function X6(e){return R6({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const i=t.floating,s=Math.round(n.reference.width),a=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),i.style.setProperty("--reference-width",`${s}px`),i.style.setProperty("--reference-height",`${a}px`),i.style.setProperty("--available-width",`${o}px`),i.style.setProperty("--available-height",`${r}px`)}})}function J6(e){if(e.hideWhenDetached)return A6({strategy:"referenceHidden",boundary:Ix(e.boundary)??"clippingAncestors"})}function Z6(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Q6(e,t,n={}){const r=V6(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},G6,n),i=t.querySelector("[data-part=arrow]"),s=[q6(i,o),K6(o),Y6(o),W6(i,t.ownerDocument,o),z6(i),B6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),X6(o),J6(o),H6],{placement:a,strategy:l,onComplete:c,onPositioned:u}=o,p=async()=>{if(!r||!t)return;const m=await D6(r,t,{placement:a,middleware:s,strategy:l});c?.(m),u?.({placed:!0});const b=Cn(t),w=Bk(b,m.x),E=Bk(b,m.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${E}px`),o.hideWhenDetached&&(m.middlewareData.hide?.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const k=t.firstElementChild;if(k){const v=Vc(k);t.style.setProperty("--z-index",v.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:p,floatingElement:t}),u?.({placed:!0})):await p()},f=Z6(o.listeners),g=o.listeners?T6(r,t,h,f):gB;return h(),()=>{g?.(),u?.({placed:!1})}}function Ks(e,t,n={}){const{defer:r,...o}=n,i=r?Ke:a=>a(),s=[];return s.push(i(()=>{const a=typeof e=="function"?e():e,l=typeof t=="function"?t():t;s.push(Q6(a,l,o))})),()=>{s.forEach(a=>a?.())}}var e4={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function qm(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:mi.arrowSize.reference,height:mi.arrowSize.reference,[mi.arrowSizeHalf.variable]:`calc(${mi.arrowSize.reference} / 2)`,[mi.arrowOffset.variable]:`calc(${mi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?e4[t.split("-")[0]]:void 0,background:mi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}function t4(e){const t={each(n){for(let r=0;r{try{i.document.addEventListener(n,r,o)}catch{}}),()=>{try{t.removeEventListener(n,r,o)}catch{}}},removeEventListener(n,r,o){t.each(i=>{try{i.document.removeEventListener(n,r,o)}catch{}})}};return t}function n4(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t?.addEventListener(n,r,o)}catch{}return()=>{try{t?.removeEventListener(n,r,o)}catch{}}},removeEventListener:(n,r,o)=>{try{t?.removeEventListener(n,r,o)}catch{}}}}var Hk="pointerdown.outside",zk="focus.outside";function r4(e){for(const t of e)if(kn(t)&&As(t))return!0;return!1}var qP=e=>"clientY"in e;function o4(e,t){if(!qP(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function i4(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Uk(e,t){if(!t||!qP(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,i=o&&e.clientY>t.offsetTop+t.clientHeight,s={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},a={x:e.clientX,y:e.clientY};return i4(s,a)?r||i:!1}function s4(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:i,defer:s}=t;if(!e)return;const a=Pr(e),l=Cn(e),c=t4(l),u=n4(l);function p(E,k){if(!kn(k)||!k.isConnected||so(e,k)||o4(e,E))return!1;const v=a.querySelector(`[aria-controls="${e.id}"]`);if(v){const T=ug(v);if(Uk(E,T))return!1}const _=ug(e);return Uk(E,_)?!1:!n?.(k)}const h=new Set,f=tp(e?.getRootNode());function g(E){function k(v){const _=s&&!Ck()?Ke:C=>C(),T=v??E,N=T?.composedPath?.()??[T?.target];_(()=>{const C=f?N[0]:Xt(E);if(!(!e||!p(E,C))){if(o||i){const x=By(o,i);e.addEventListener(Hk,x,{once:!0})}jk(e,Hk,{bubbles:!1,cancelable:!0,detail:{originalEvent:T,contextmenu:EP(T),focusable:r4(N),target:C}})}})}E.pointerType==="touch"?(h.forEach(v=>v()),h.add(vn(a,"click",k,{once:!0})),h.add(u.addEventListener("click",k,{once:!0})),h.add(c.addEventListener("click",k,{once:!0}))):k()}const m=new Set,b=setTimeout(()=>{m.add(vn(a,"pointerdown",g,!0)),m.add(u.addEventListener("pointerdown",g,!0)),m.add(c.addEventListener("pointerdown",g,!0))},0);function w(E){(s?Ke:k=>k())(()=>{const k=Xt(E);if(!(!e||!p(E,k))){if(r||i){const v=By(r,i);e.addEventListener(zk,v,{once:!0})}jk(e,zk,{bubbles:!1,cancelable:!0,detail:{originalEvent:E,contextmenu:!1,focusable:As(k),target:k}})}})}return Ck()||(m.add(vn(a,"focusin",w,!0)),m.add(u.addEventListener("focusin",w,!0)),m.add(c.addEventListener("focusin",w,!0))),()=>{clearTimeout(b),h.forEach(E=>E()),m.forEach(E=>E())}}function a4(e,t){const{defer:n}=t,r=n?Ke:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(s4(i,t))})),()=>{o.forEach(i=>i?.())}}function jk(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function l4(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return vn(Pr(e),"keydown",n,{capture:!0})}var Gk="layer:request-dismiss",or={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return tt.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>so(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>so(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(tor.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];u4(e,Gk,o=>{r.requestDismiss?.(o),o.defaultPrevented||r?.dismiss()}),c4(e,Gk,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function c4(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function u4(e,t,n){e.addEventListener(t,n,{once:!0})}var Wk;function qk(){or.layers.forEach(({node:e})=>{e.style.pointerEvents=or.isBelowPointerBlockingLayer(e)?"none":"auto"})}function d4(e){e.style.pointerEvents=""}function p4(e,t){const n=Pr(e),r=[];return or.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(Wk=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(o=>{const[i,s]=b3(()=>{const a=o();return kn(a)?a:null},{timeout:1e3});i.then(a=>r.push(np(a,{pointerEvents:"auto"}))),r.push(s)}),()=>{or.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=Wk,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function f4(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Lc("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:i,exclude:s,debug:a,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:i,requestDismiss:o};or.add(c),qk();function u(m){const b=Xt(m.detail.originalEvent);or.isBelowPointerBlockingLayer(e)||or.isInBranch(b)||(t.onPointerDownOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onPointerDownOutside:",m.detail.originalEvent),r?.()))}function p(m){const b=Xt(m.detail.originalEvent);or.isInBranch(b)||(t.onFocusOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onFocusOutside:",m.detail.originalEvent),r?.()))}function h(m){or.isTopMost(e)&&(t.onEscapeKeyDown?.(m),!m.defaultPrevented&&r&&(m.preventDefault(),r()))}function f(m){if(!e)return!1;const b=typeof s=="function"?s():s,w=Array.isArray(b)?b:[b],E=t.persistentElements?.map(k=>k()).filter(kn);return E&&w.push(...E),w.some(k=>so(k,m))||or.isInNestedLayer(e,m)}const g=[i?p4(e,t.persistentElements):void 0,l4(e,h),a4(e,{exclude:f,onFocusOutside:p,onPointerDownOutside:u,defer:t.defer})];return()=>{or.remove(e),qk(),d4(e),g.forEach(m=>m?.())}}function Km(e,t){const{defer:n}=t,r=n?Ke:i=>i(),o=[];return o.push(r(()=>{const i=Da(e)?e():e;o.push(f4(i,t))})),()=>{o.forEach(i=>i?.())}}function h4(e,t={}){const{defer:n}=t,r=n?Ke:i=>i(),o=[];return o.push(r(()=>{const i=Da(e)?e():e;if(!i){Lc("[@zag-js/dismissable] branch node is `null` or `undefined`");return}or.addBranch(i),o.push(()=>{or.removeBranch(i)})})),()=>{o.forEach(i=>i?.())}}const[ur,oa]=Rt("RenderStrategyProps");function g4(e){return!(e.metaKey||!Bp()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var m4=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function v4(e,t,n){const r=n?Xt(n):null,o=Cn(r);return e=e||r instanceof o.HTMLInputElement&&!m4.has(r?.type)||r instanceof o.HTMLTextAreaElement||r instanceof o.HTMLElement&&r.isContentEditable,!(e&&t==="keyboard"&&n instanceof o.KeyboardEvent&&!Reflect.has(b4,n.key))}var hl=null,Gy=new Set,Od=new Map,nl=!1,Wy=!1,b4={Tab:!0,Escape:!0};function Ym(e,t){for(let n of Gy)n(e,t)}function gg(e){nl=!0,g4(e)&&(hl="keyboard",Ym("keyboard",e))}function Br(e){hl="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(nl=!0,Ym("pointer",e))}function KP(e){zB(e)&&(nl=!0,hl="virtual")}function YP(e){const t=Xt(e);t===Cn(t)||t===Pr(t)||(!nl&&!Wy&&(hl="virtual",Ym("virtual",e)),nl=!1,Wy=!1)}function XP(){nl=!1,Wy=!0}function y4(e){if(typeof window>"u"||Od.get(Cn(e)))return;const t=Cn(e),n=Pr(e);let r=t.HTMLElement.prototype.focus;function o(){hl="virtual",Ym("virtual",null),nl=!0,r.apply(this,arguments)}Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:o}),n.addEventListener("keydown",gg,!0),n.addEventListener("keyup",gg,!0),n.addEventListener("click",KP,!0),t.addEventListener("focus",YP,!0),t.addEventListener("blur",XP,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",Br,!0),n.addEventListener("pointermove",Br,!0),n.addEventListener("pointerup",Br,!0)):(n.addEventListener("mousedown",Br,!0),n.addEventListener("mousemove",Br,!0),n.addEventListener("mouseup",Br,!0)),t.addEventListener("beforeunload",()=>{x4(e)},{once:!0}),Od.set(t,{focus:r})}var x4=(e,t)=>{const n=Cn(e),r=Pr(e);Od.has(n)&&(n.HTMLElement.prototype.focus=Od.get(n).focus,r.removeEventListener("keydown",gg,!0),r.removeEventListener("keyup",gg,!0),r.removeEventListener("click",KP,!0),n.removeEventListener("focus",YP,!0),n.removeEventListener("blur",XP,!1),typeof n.PointerEvent<"u"?(r.removeEventListener("pointerdown",Br,!0),r.removeEventListener("pointermove",Br,!0),r.removeEventListener("pointerup",Br,!0)):(r.removeEventListener("mousedown",Br,!0),r.removeEventListener("mousemove",Br,!0),r.removeEventListener("mouseup",Br,!0)),Od.delete(n))};function qy(){return hl==="keyboard"}function w4(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:o}=e;y4(o),r?.({isFocusVisible:n||qy(),modality:hl});const i=(s,a)=>{v4(!!t,s,a)&&r?.({isFocusVisible:qy(),modality:s})};return Gy.add(i),()=>{Gy.delete(i)}}const[JP,ai]=Rt("FieldContext");var _4=Object.defineProperty,k4=(e,t,n)=>t in e?_4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>k4(e,typeof t!="symbol"?t+"":t,n),xh={itemToValue(e){return typeof e=="string"?e:ab(e)&&qa(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:ab(e)&&qa(e,"label")?e.label:xh.itemToValue(e)},isItemDisabled(e){return ab(e)&&qa(e,"disabled")?!!e.disabled:!1}},Tx=class ZP{constructor(t){this.options=t,De(this,"items"),De(this,"indexMap",null),De(this,"copy",n=>new ZP({...this.options,items:n??[...this.items]})),De(this,"isEqual",n=>nu(this.items,n.items)),De(this,"setItems",n=>this.copy(n)),De(this,"getValues",(n=this.items)=>{const r=[];for(const o of n){const i=this.getItemValue(o);i!=null&&r.push(i)}return r}),De(this,"find",n=>{if(n==null)return null;const r=this.indexOf(n);return r!==-1?this.at(r):null}),De(this,"findMany",n=>{const r=[];for(const o of n){const i=this.find(o);i!=null&&r.push(i)}return r}),De(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let r=0;const o=this.group();for(const[,i]of o)for(const s of i){if(r===n)return s;r++}return null}),De(this,"sortFn",(n,r)=>{const o=this.indexOf(n),i=this.indexOf(r);return(o??0)-(i??0)}),De(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),De(this,"getItemValue",n=>n==null?null:this.options.itemToValue?.(n)??xh.itemToValue(n)),De(this,"getItemDisabled",n=>n==null?!1:this.options.isItemDisabled?.(n)??xh.isItemDisabled(n)),De(this,"stringifyItem",n=>n==null?null:this.options.itemToString?.(n)??xh.itemToString(n)),De(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),De(this,"stringifyItems",(n,r=", ")=>{const o=[];for(const i of n){const s=this.stringifyItem(i);s!=null&&o.push(s)}return o.join(r)}),De(this,"stringifyMany",(n,r)=>this.stringifyItems(this.findMany(n),r)),De(this,"has",n=>this.indexOf(n)!==-1),De(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),De(this,"group",()=>{const{groupBy:n,groupSort:r}=this.options;if(!n)return[["",[...this.items]]];const o=new Map;this.items.forEach((s,a)=>{const l=n(s,a);o.has(l)||o.set(l,[]),o.get(l).push(s)});let i=Array.from(o.entries());return r&&i.sort(([s],[a])=>{if(typeof r=="function")return r(s,a);if(Array.isArray(r)){const l=r.indexOf(s),c=r.indexOf(a);return l===-1?1:c===-1?-1:l-c}return r==="asc"?s.localeCompare(a):r==="desc"?a.localeCompare(s):0}),i}),De(this,"getNextValue",(n,r=1,o=!1)=>{let i=this.indexOf(n);if(i===-1)return null;for(i=o?Math.min(i+r,this.size-1):i+r;i<=this.size&&this.getItemDisabled(this.at(i));)i++;return this.getItemValue(this.at(i))}),De(this,"getPreviousValue",(n,r=1,o=!1)=>{let i=this.indexOf(n);if(i===-1)return null;for(i=o?Math.max(i-r,0):i-r;i>=0&&this.getItemDisabled(this.at(i));)i--;return this.getItemValue(this.at(i))}),De(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0;const o=this.group();for(const[,i]of o)for(const s of i){const a=this.getItemValue(s);a!=null&&this.indexMap.set(a,r),r++}}return this.indexMap.get(n)??-1}),De(this,"getByText",(n,r)=>{const o=r!=null?this.indexOf(r):-1,i=n.length===1;for(let s=0;s{const{state:o,currentValue:i,timeout:s=350}=r,a=o.keysSoFar+n,l=a.length>1&&Array.from(a).every(f=>f===a[0])?a[0]:a,c=this.getByText(l,i),u=this.getItemValue(c);function p(){clearTimeout(o.timer),o.timer=-1}function h(f){o.keysSoFar=f,p(),f!==""&&(o.timer=+setTimeout(()=>{h(""),p()},s))}return h(a),u}),De(this,"update",(n,r)=>{let o=this.indexOf(n);return o===-1?this:this.copy([...this.items.slice(0,o),r,...this.items.slice(o+1)])}),De(this,"upsert",(n,r,o="append")=>{let i=this.indexOf(n);return i===-1?(o==="append"?this.append:this.prepend)(r):this.copy([...this.items.slice(0,i),r,...this.items.slice(i+1)])}),De(this,"insert",(n,...r)=>this.copy(Su(this.items,n,...r))),De(this,"insertBefore",(n,...r)=>{let o=this.indexOf(n);if(o===-1)if(this.items.length===0)o=0;else return this;return this.copy(Su(this.items,o,...r))}),De(this,"insertAfter",(n,...r)=>{let o=this.indexOf(n);if(o===-1)if(this.items.length===0)o=0;else return this;return this.copy(Su(this.items,o+1,...r))}),De(this,"prepend",(...n)=>this.copy(Su(this.items,0,...n))),De(this,"append",(...n)=>this.copy(Su(this.items,this.items.length,...n))),De(this,"filter",n=>{const r=this.items.filter((o,i)=>n(this.stringifyItem(o),i,o));return this.copy(r)}),De(this,"remove",(...n)=>{const r=n.map(o=>typeof o=="string"?o:this.getItemValue(o));return this.copy(this.items.filter(o=>{const i=this.getItemValue(o);return i==null?!1:!r.includes(i)}))}),De(this,"move",(n,r)=>{const o=this.indexOf(n);return o===-1?this:this.copy($f(this.items,[o],r))}),De(this,"moveBefore",(n,...r)=>{let o=this.items.findIndex(s=>this.getItemValue(s)===n);if(o===-1)return this;let i=r.map(s=>this.items.findIndex(a=>this.getItemValue(a)===s)).sort((s,a)=>s-a);return this.copy($f(this.items,i,o))}),De(this,"moveAfter",(n,...r)=>{let o=this.items.findIndex(s=>this.getItemValue(s)===n);if(o===-1)return this;let i=r.map(s=>this.items.findIndex(a=>this.getItemValue(a)===s)).sort((s,a)=>s-a);return this.copy($f(this.items,i,o+1))}),De(this,"reorder",(n,r)=>this.copy($f(this.items,[n],r))),De(this,"compareValue",(n,r)=>{const o=this.indexOf(n),i=this.indexOf(r);return oi?1:0}),De(this,"range",(n,r)=>{let o=[],i=n;for(;i!=null;){if(this.find(i)&&o.push(i),i===r)return o;i=this.getNextValue(i)}return[]}),De(this,"getValueRange",(n,r)=>n&&r?this.compareValue(n,r)<=0?this.range(n,r):this.range(r,n):[]),De(this,"toString",()=>{let n="";for(const r of this.items){const o=this.getItemValue(r),i=this.stringifyItem(r),s=this.getItemDisabled(r),a=[o,i,s].filter(Boolean).join(":");n+=a+","}return n}),De(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},C4=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function Su(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function $f(e,t,n){t=[...t].sort((o,i)=>o-i);const r=t.map(o=>e[o]);for(let o=t.length-1;o>=0;o--)e=[...e.slice(0,t[o]),...e.slice(t[o]+1)];return n=Math.max(0,n-t.filter(o=>onew Tx(e),[su,Up]=Rt("PresenceContext");function O4(e,t){const{state:n,send:r,context:o}=e,i=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:i,setNode(s){s&&r({type:"NODE.SET",node:s})},unmount(){r({type:"UNMOUNT"})}}}var I4={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Vc(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const i=t.get("node");if(!o&&i?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Ke(()=>{const s=Rf(t.get("styles"));e.set("unmountAnimationName",s),s==="none"||s===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Ke(()=>{e.set("prevAnimationName",Rf(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{const r=t.get("node");if(!r)return;const o=a=>{(a.composedPath?.()?.[0]??a.target)===r&&e.set("prevAnimationName",Rf(t.get("styles")))},i=a=>{const l=Rf(t.get("styles"));Xt(a)===r&&l===e.get("unmountAnimationName")&&n({type:"UNMOUNT",src:"animationend"})};r.addEventListener("animationstart",o),r.addEventListener("animationcancel",i),r.addEventListener("animationend",i);const s=np(r,{animationFillMode:"forwards"});return()=>{r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",i),r.removeEventListener("animationend",i),gx(()=>s())}}}}};function Rf(e){return e?.animationName||"none"}sn()(["onExitComplete","present","immediate"]);const au=(e,t)=>{const n=Q(!1),r=Q(null),o=A(()=>({present:pe(e).present,onExitComplete:()=>t?.("exitComplete")})),i=wo(I4,o),s=A(()=>O4(i));return st(()=>s.value.present,()=>{s.value.present&&(n.value=!0)}),st(r,()=>{if(r.value){const a=r.value.$el?r.value.$el:r.value;a&&s.value.setNode(a)}}),A(()=>{const a=pe(e);return{present:s.value.present,unmounted:!s.value.present&&!n.value&&a.lazyMount||a?.unmountOnExit&&!s.value?.present&&n.value,presenceProps:{ref:r,hidden:!s.value.present,"data-state":s.value.skip&&a.skipAnimationOnMount?void 0:a?.present?"open":"closed"}}})},[QP,Mn]=Rt("SelectContext"),T4=P({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getClearTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),S4=P({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=Up(),r=A(()=>fl(t.value.getContentProps(),n.value.presenceProps));return se(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),P4=P({__name:"select-context",setup(e){const t=Mn();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),$4=P({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),R4={key:0,value:""},A4=["value","disabled"],N4=P({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=ai();return se(),(r,o)=>(y(),$(d(he).select,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getHiddenSelectProps()),{default:O(()=>[d(t).value.length===0?(y(),V("option",R4)):Z("",!0),(y(!0),V(ge,null,Ie(d(t).collection.items,i=>(y(),V("option",{key:i.value,value:d(t).collection.getItemValue(i),disabled:d(t).collection.getItemDisabled(i)},j(d(t).collection.stringifyItem(i))+" > ",9,A4))),128))]),_:1},16,["aria-describedby"]))}}),M4=P({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[D4,L4]=Rt("SelectItemContext"),V4=P({__name:"select-item-context",setup(e){const t=L4();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[F4,B4]=Rt("SelectItemGroupPropsContext"),H4=P({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=B4();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemGroupLabelProps({htmlFor:d(n).id}),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),z4=P({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Mn(),r=nt(),o=t.id??r;return F4({id:o}),se(),(i,s)=>(y(),$(d(he).div,F(d(n).getItemGroupProps({id:d(o)}),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),[U4,e2]=Rt("SelectItemPropsContext"),j4=P({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=e2();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),G4=P({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=e2();return se(),(r,o)=>(y(),$(d(he).span,F(d(t).getItemTextProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),W4=P({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Mn();return U4(t),D4(A(()=>n.value.getItemState(t))),se(),(r,o)=>(y(),$(d(he).div,F(d(n).getItemProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),q4=P({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),K4=P({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getListProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Y4=P({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Mn(),n=oa(),r=au(A(()=>({...n.value,present:t.value.open})));return su(r),se(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),X4=P({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return QP(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>(y(),$(d(he).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var J4=ar("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),Hn=J4.build(),t2=e=>new Tx(e);t2.empty=()=>new Tx({items:[]});var Z4=e=>e.ids?.root??`select:${e.id}`,Ky=e=>e.ids?.content??`select:${e.id}:content`,Yy=e=>e.ids?.trigger??`select:${e.id}:trigger`,n2=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,Af=e=>e.ids?.label??`select:${e.id}:label`,Q4=e=>e.ids?.control??`select:${e.id}:control`,Xy=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,Jy=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,r2=e=>e.ids?.positioner??`select:${e.id}:positioner`,e8=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,Kk=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,fb=e=>e.getById(Jy(e)),Pu=e=>e.getById(Ky(e)),Va=e=>e.getById(Yy(e)),t8=e=>e.getById(n2(e)),Yk=e=>e.getById(r2(e)),hb=(e,t)=>t==null?null:e.getById(Xy(e,t));function n8(e,t){const{context:n,prop:r,scope:o,state:i,computed:s,send:a}=e,l=r("disabled")||n.get("fieldsetDisabled"),c=!!r("invalid"),u=!!r("required"),p=!!r("readOnly"),h=r("composite"),f=r("collection"),g=i.hasTag("open"),m=i.matches("focused"),b=n.get("highlightedValue"),w=n.get("highlightedItem"),E=n.get("selectedItems"),k=n.get("currentPlacement"),v=s("isTypingAhead"),_=s("isInteractive"),T=b?Xy(o,b):void 0;function N(x){const I=f.getItemDisabled(x.item),R=f.getItemValue(x.item);return vP(R,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:R,disabled:!!(l||I),highlighted:b===R,selected:n.get("value").includes(R)}}const C=qm({...r("positioning"),placement:k});return{open:g,focused:m,empty:n.get("value").length===0,highlightedItem:w,highlightedValue:b,selectedItems:E,hasSelectedItems:s("hasSelectedItems"),value:n.get("value"),valueAsString:s("valueAsString"),collection:f,multiple:!!r("multiple"),disabled:!!l,reposition(x={}){a({type:"POSITIONING.SET",options:x})},focus(){Va(o)?.focus({preventScroll:!0})},setOpen(x){i.hasTag("open")!==x&&a({type:x?"OPEN":"CLOSE"})},selectValue(x){a({type:"ITEM.SELECT",value:x})},setValue(x){a({type:"VALUE.SET",value:x})},selectAll(){a({type:"VALUE.SET",value:f.getValues()})},setHighlightValue(x){a({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){a({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){a(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:N,getRootProps(){return t.element({...Hn.root.attrs,dir:r("dir"),id:Z4(o),"data-invalid":_e(c),"data-readonly":_e(p)})},getLabelProps(){return t.label({dir:r("dir"),id:Af(o),...Hn.label.attrs,"data-disabled":_e(l),"data-invalid":_e(c),"data-readonly":_e(p),"data-required":_e(u),htmlFor:Jy(o),onClick(x){x.defaultPrevented||l||Va(o)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...Hn.control.attrs,dir:r("dir"),id:Q4(o),"data-state":g?"open":"closed","data-focus":_e(m),"data-disabled":_e(l),"data-invalid":_e(c)})},getValueTextProps(){return t.element({...Hn.valueText.attrs,dir:r("dir"),"data-disabled":_e(l),"data-invalid":_e(c),"data-focus":_e(m)})},getTriggerProps(){return t.button({id:Yy(o),disabled:l,dir:r("dir"),type:"button",role:"combobox","aria-controls":Ky(o),"aria-expanded":g,"aria-haspopup":"listbox","data-state":g?"open":"closed","aria-invalid":c,"aria-labelledby":Af(o),...Hn.trigger.attrs,"data-disabled":_e(l),"data-invalid":_e(c),"data-readonly":_e(p),"data-placement":k,"data-placeholder-shown":_e(!s("hasSelectedItems")),onClick(x){_&&(x.defaultPrevented||a({type:"TRIGGER.CLICK"}))},onFocus(){a({type:"TRIGGER.FOCUS"})},onBlur(){a({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!_)return;const I={ArrowUp(){a({type:"TRIGGER.ARROW_UP"})},ArrowDown(R){a({type:R.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){a({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){a({type:"TRIGGER.ARROW_RIGHT"})},Home(){a({type:"TRIGGER.HOME"})},End(){a({type:"TRIGGER.END"})},Enter(){a({type:"TRIGGER.ENTER"})},Space(R){a(v?{type:"TRIGGER.TYPEAHEAD",key:R.key}:{type:"TRIGGER.ENTER"})}}[Fc(x,{dir:r("dir"),orientation:"vertical"})];if(I){I(x),x.preventDefault();return}rp.isValidEvent(x)&&(a({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}})},getIndicatorProps(){return t.element({...Hn.indicator.attrs,dir:r("dir"),"aria-hidden":!0,"data-state":g?"open":"closed","data-disabled":_e(l),"data-invalid":_e(c),"data-readonly":_e(p)})},getItemProps(x){const I=N(x);return t.element({id:Xy(o,I.value),role:"option",...Hn.item.attrs,dir:r("dir"),"data-value":I.value,"aria-selected":I.selected,"data-state":I.selected?"checked":"unchecked","data-highlighted":_e(I.highlighted),"data-disabled":_e(I.disabled),"aria-disabled":cx(I.disabled),onPointerMove(R){I.disabled||R.pointerType!=="mouse"||I.value!==b&&a({type:"ITEM.POINTER_MOVE",value:I.value})},onClick(R){R.defaultPrevented||I.disabled||a({type:"ITEM.CLICK",src:"pointerup",value:I.value})},onPointerLeave(R){I.disabled||x.persistFocus||R.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER")||a({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(x){const I=N(x);return t.element({...Hn.itemText.attrs,"data-state":I.selected?"checked":"unchecked","data-disabled":_e(I.disabled),"data-highlighted":_e(I.highlighted)})},getItemIndicatorProps(x){const I=N(x);return t.element({"aria-hidden":!0,...Hn.itemIndicator.attrs,"data-state":I.selected?"checked":"unchecked",hidden:!I.selected})},getItemGroupLabelProps(x){const{htmlFor:I}=x;return t.element({...Hn.itemGroupLabel.attrs,id:Kk(o,I),dir:r("dir"),role:"presentation"})},getItemGroupProps(x){const{id:I}=x;return t.element({...Hn.itemGroup.attrs,"data-disabled":_e(l),id:e8(o,I),"aria-labelledby":Kk(o,I),role:"group",dir:r("dir")})},getClearTriggerProps(){return t.button({...Hn.clearTrigger.attrs,id:n2(o),type:"button","aria-label":"Clear value","data-invalid":_e(c),disabled:l,hidden:!s("hasSelectedItems"),dir:r("dir"),onClick(x){x.defaultPrevented||a({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const x=n.get("value"),I=r("multiple")?x:x?.[0];return t.select({name:r("name"),form:r("form"),disabled:l,multiple:r("multiple"),required:r("required"),"aria-hidden":!0,id:Jy(o),defaultValue:I,style:m3,tabIndex:-1,onFocus(){Va(o)?.focus({preventScroll:!0})},"aria-labelledby":Af(o)})},getPositionerProps(){return t.element({...Hn.positioner.attrs,dir:r("dir"),id:r2(o),style:C.floating})},getContentProps(){return t.element({hidden:!g,dir:r("dir"),id:Ky(o),role:h?"listbox":"dialog",...Hn.content.attrs,"data-state":g?"open":"closed","data-placement":k,"data-activedescendant":T,"aria-activedescendant":h?T:void 0,"aria-multiselectable":r("multiple")&&h?!0:void 0,"aria-labelledby":Af(o),tabIndex:0,onKeyDown(x){if(!_||!so(x.currentTarget,Xt(x)))return;if(x.key==="Tab"&&!TP(x)){x.preventDefault();return}const I={ArrowUp(){a({type:"CONTENT.ARROW_UP"})},ArrowDown(){a({type:"CONTENT.ARROW_DOWN"})},Home(){a({type:"CONTENT.HOME"})},End(){a({type:"CONTENT.END"})},Enter(){a({type:"ITEM.CLICK",src:"keydown.enter"})},Space(B){v?a({type:"CONTENT.TYPEAHEAD",key:B.key}):I.Enter?.(B)}},R=I[Fc(x)];if(R){R(x),x.preventDefault();return}const M=Xt(x);Hm(M)||rp.isValidEvent(x)&&(a({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}})},getListProps(){return t.element({...Hn.list.attrs,tabIndex:0,role:h?void 0:"listbox","aria-labelledby":Yy(o),"aria-activedescendant":h?void 0:T,"aria-multiselectable":!h&&r("multiple")?!0:void 0})}}}var{and:$u,not:wa,or:r8}=ru(),o8={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??t2.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:nu,onChange(n){const r=e("collection").findMany(n);return e("onValueChange")?.({value:n,items:r})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){e("onHighlightChange")?.({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:{...rp.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get("value").toString()],()=>{r(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{r(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{r(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{r(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:r8("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:$u(wa("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:wa("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:$u(wa("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:wa("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:wa("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:wa("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:wa("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:$u("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:$u("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:$u("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>Xk(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFormControlState({context:e,scope:t}){return JB(fb(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){const n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){const r=()=>Pu(e);let o=!0;return Km(r,{type:"listbox",defer:!0,exclude:[Va(e),t8(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(i){n("onInteractOutside")?.(i),o=!(i.detail.focusable||i.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},computePlacement({context:e,prop:t,scope:n}){const r=t("positioning");return e.set("currentPlacement",r.placement),Ks(()=>Va(n),()=>Yk(n),{defer:!0,...r,onComplete(o){e.set("currentPlacement",o.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:r}){const o=i=>{const s=e.get("highlightedValue");if(s==null||r.current().type.includes("POINTER"))return;const a=Pu(n),l=t("scrollToIndexFn");if(l){const u=t("collection").indexOf(s);l?.({index:u,immediate:i,getElement:()=>hb(n,s)});return}const c=hb(n,s);RP(c,{rootEl:a,block:"nearest"})};return Ke(()=>o(!0)),SP(()=>Pu(n),{defer:!0,attributes:["data-activedescendant"],callback(){o(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){const o=()=>Yk(n);Ks(Va(n),o,{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const r=t("collection").getPreviousValue(n,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightNextItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const r=t("collection").getNextValue(n,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightFirstItem({context:e,prop:t}){const n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){const n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){Ke(()=>{cg({root:Pu(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){Xk(e)&&Ke(()=>{Va(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get("highlightedValue");r==null||!t("collection").has(r)||(t("onSelect")?.({value:r}),r=t("deselectable")&&!t("multiple")&&e.get("value").includes(r)?null:r,e.set("value",o=>r==null?[]:t("multiple")?wk(o,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){const r=t("collection"),o=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.firstValue;e.set("highlightedValue",o)},highlightComputedLastItem({context:e,prop:t,computed:n}){const r=t("collection"),o=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue;e.set("highlightedValue",o)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;const r=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",r)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){const o=t("collection").search(n.key,{state:r.get("typeahead"),currentValue:e.get("highlightedValue")});o!=null&&e.set("highlightedValue",o)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){t("onSelect")?.({value:n.value});const r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",o=>r==null?[]:t("multiple")?wk(o,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(r=>r!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[n]=e.get("value"),r=t("collection").getPreviousValue(n);r&&e.set("value",[r])},selectNextItem({context:e,prop:t}){const[n]=e.get("value"),r=t("collection").getNextValue(n);r&&e.set("value",[r])},selectFirstItem({context:e,prop:t}){const n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){const n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){const o=t("collection").search(n.key,{state:r.get("typeahead"),currentValue:e.get("value")[0]});o!=null&&e.set("value",[o])},scrollContentToTop({prop:e,scope:t}){if(e("scrollToIndexFn")){const n=e("collection").firstValue;e("scrollToIndexFn")?.({index:0,immediate:!0,getElement:()=>hb(t,n)})}else Pu(t)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){const r=fb(n);if(r){if(e.get("value").length===0&&!t("multiple")){r.selectedIndex=-1;return}for(const o of r.options)o.selected=e.get("value").includes(o.value)}},syncCollection({context:e,prop:t}){const n=t("collection"),r=n.find(e.get("highlightedValue"));r&&e.set("highlightedItem",r);const o=n.findMany(e.get("value"));e.set("selectedItems",o)},syncSelectedItems({context:e,prop:t}){const n=t("collection"),r=e.get("selectedItems"),o=e.get("value").map(i=>r.find(s=>n.getItemValue(s)===i)||n.find(i));e.set("selectedItems",o)},syncHighlightedItem({context:e,prop:t}){const n=t("collection"),r=e.get("highlightedValue"),o=r?n.find(r):null;e.set("highlightedItem",o)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=fb(e);if(!t)return;const n=e.getWin(),r=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(r)})}}}};function Xk(e){const t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}sn()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);sn()(["item","persistFocus"]);sn()(["id"]);sn()(["htmlFor"]);const i8=(e,t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=ai(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,hiddenSelect:i?.value.ids.control},disabled:i?.value.disabled,readOnly:i?.value.readOnly,invalid:i?.value.invalid,required:i?.value.required,dir:o.value.dir,value:l.modelValue,getRootNode:r?.value.getRootNode,...ra(l),onValueChange:c=>{t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onHighlightChange:c=>{t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),l.onHighlightChange?.(c)},onOpenChange:c=>{t?.("openChange",c),t?.("update:open",c.open),l.onOpenChange?.(c)},onFocusOutside:c=>{t?.("focusOutside",c),l.onFocusOutside?.(c)},onInteractOutside:c=>{t?.("interactOutside",c),l.onInteractOutside?.(c)},onPointerDownOutside:c=>{t?.("pointerDownOutside",c),l.onPointerDownOutside?.(c)},onSelect(c){t?.("select",c),l.onSelect?.(c)}}}),a=wo(o8,s);return A(()=>n8(a,ii))},s8=P({__name:"select-root",props:Ze({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,r=i8(n,t);return QP(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>(y(),$(d(he).div,F(d(r).getRootProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),a8=P({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Mn();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),l8=P({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=Mn(),r=xo();return se(),(o,i)=>(y(),$(d(he).span,F(d(n).getValueTextProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default",{},()=>[re(j(r.default?.()||d(n).valueAsString||t.placeholder),1)])]),_:3},16,["as-child"]))}}),_a=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:T4,Content:S4,Context:P4,Control:$4,HiddenSelect:N4,Indicator:M4,Item:W4,ItemContext:V4,ItemGroup:z4,ItemGroupLabel:H4,ItemIndicator:j4,ItemText:G4,Label:q4,List:K4,Positioner:Y4,Root:s8,RootProvider:X4,Trigger:a8,ValueText:l8},Symbol.toStringTag,{value:"Module"})),[o2,lu]=Rt("TooltipContext"),c8=P({__name:"tooltip-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=lu();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowTipProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),u8=P({__name:"tooltip-arrow",props:{asChild:{type:Boolean}},setup(e){const t=lu();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),d8=P({__name:"tooltip-content",props:{asChild:{type:Boolean}},setup(e){const t=lu(),n=Up(),r=A(()=>fl(t.value.getContentProps(),n.value.presenceProps));return se(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),p8=P({__name:"tooltip-context",setup(e){const t=lu();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),f8=P({__name:"tooltip-positioner",props:{asChild:{type:Boolean}},setup(e){const t=lu(),n=oa(),r=au(A(()=>({...n.value,present:t.value.open})));return su(r),se(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),h8=P({__name:"tooltip-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return o2(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>L(r.$slots,"default")}});var g8=ar("tooltip").parts("trigger","arrow","arrowTip","positioner","content"),Ru=g8.build(),i2=e=>e.ids?.trigger??`tooltip:${e.id}:trigger`,m8=e=>e.ids?.content??`tooltip:${e.id}:content`,v8=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,s2=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,gb=e=>e.getById(i2(e)),Jk=e=>e.getById(s2(e)),vi=mB({id:null});function b8(e,t){const{state:n,context:r,send:o,scope:i,prop:s,event:a}=e,l=s("id"),c=!!s("aria-label"),u=n.matches("open","closing"),p=i2(i),h=m8(i),f=s("disabled"),g=qm({...s("positioning"),placement:r.get("currentPlacement")});return{open:u,setOpen(m){n.matches("open","closing")!==m&&o({type:m?"open":"close"})},reposition(m={}){o({type:"positioning.set",options:m})},getTriggerProps(){return t.button({...Ru.trigger.attrs,id:p,dir:s("dir"),"data-expanded":_e(u),"data-state":u?"open":"closed","aria-describedby":u?h:void 0,onClick(m){m.defaultPrevented||f||s("closeOnClick")&&o({type:"close",src:"trigger.click"})},onFocus(m){queueMicrotask(()=>{m.defaultPrevented||f||a.src!=="trigger.pointerdown"&&qy()&&o({type:"open",src:"trigger.focus"})})},onBlur(m){m.defaultPrevented||f||l===vi.get("id")&&o({type:"close",src:"trigger.blur"})},onPointerDown(m){m.defaultPrevented||f||CP(m)&&s("closeOnPointerDown")&&l===vi.get("id")&&o({type:"close",src:"trigger.pointerdown"})},onPointerMove(m){m.defaultPrevented||f||m.pointerType!=="touch"&&o({type:"pointer.move"})},onPointerLeave(){f||o({type:"pointer.leave"})},onPointerCancel(){f||o({type:"pointer.leave"})}})},getArrowProps(){return t.element({id:v8(i),...Ru.arrow.attrs,dir:s("dir"),style:g.arrow})},getArrowTipProps(){return t.element({...Ru.arrowTip.attrs,dir:s("dir"),style:g.arrowTip})},getPositionerProps(){return t.element({id:s2(i),...Ru.positioner.attrs,dir:s("dir"),style:g.floating})},getContentProps(){return t.element({...Ru.content.attrs,dir:s("dir"),hidden:!u,"data-state":u?"open":"closed",role:c?void 0:"tooltip",id:c?void 0:h,"data-placement":r.get("currentPlacement"),onPointerEnter(){o({type:"content.pointer.move"})},onPointerLeave(){o({type:"content.pointer.leave"})},style:{pointerEvents:s("interactive")?"auto":"none"}})}}}var{and:y8,not:Zk}=ru(),x8={initialState:({prop:e})=>e("open")||e("defaultOpen")?"open":"closed",props({props:e}){const t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{id:"x",openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:"bottom",...e.positioning}}},effects:["trackFocusVisible","trackStore"],context:({bindable:e})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:!1}))}),watch({track:e,action:t,prop:n}){e([()=>n("disabled")],()=>{t(["closeIfDisabled"])}),e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{closed:{entry:["clearGlobalId"],on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":{actions:["clearPointerMoveOpened"]},"pointer.move":[{guard:y8("noVisibleTooltip",Zk("hasPointerMoveOpened")),target:"opening"},{guard:Zk("hasPointerMoveOpened"),target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}]}},opening:{effects:["trackScroll","trackPointerlockChange","waitForOpenDelay"],on:{"after.openDelay":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"controlled.open":{target:"open"},"controlled.close":{target:"closed"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],"pointer.leave":[{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose","toggleVisibility"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],close:[{guard:"isOpenControlled",actions:["invokeOnClose","toggleVisibility"]},{target:"closed",actions:["invokeOnClose"]}]}},open:{effects:["trackEscapeKey","trackScroll","trackPointerlockChange","trackPositioning"],entry:["setGlobalId"],on:{"controlled.close":{target:"closed"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.leave":[{guard:"isVisible",target:"closing",actions:["clearPointerMoveOpened"]},{guard:"isOpenControlled",actions:["clearPointerMoveOpened","invokeOnClose"]},{target:"closed",actions:["clearPointerMoveOpened","invokeOnClose"]}],"content.pointer.leave":{guard:"isInteractive",target:"closing"},"positioning.set":{actions:["reposition"]}}},closing:{effects:["trackPositioning","waitForCloseDelay"],on:{"after.closeDelay":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"controlled.close":{target:"closed"},"controlled.open":{target:"open"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"pointer.move":[{guard:"isOpenControlled",actions:["setPointerMoveOpened","invokeOnOpen","toggleVisibility"]},{target:"open",actions:["setPointerMoveOpened","invokeOnOpen"]}],"content.pointer.move":{guard:"isInteractive",target:"open"},"positioning.set":{actions:["reposition"]}}}},implementations:{guards:{noVisibleTooltip:()=>vi.get("id")===null,isVisible:({prop:e})=>e("id")===vi.get("id"),isInteractive:({prop:e})=>!!e("interactive"),hasPointerMoveOpened:({context:e})=>e.get("hasPointerMoveOpened"),isOpenControlled:({prop:e})=>e("open")!==void 0},actions:{setGlobalId:({prop:e})=>{vi.set("id",e("id"))},clearGlobalId:({prop:e})=>{e("id")===vi.get("id")&&vi.set("id",null)},invokeOnOpen:({prop:e})=>{e("onOpenChange")?.({open:!0})},invokeOnClose:({prop:e})=>{e("onOpenChange")?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e("disabled")&&t({type:"close",src:"disabled.change"})},reposition:({context:e,event:t,prop:n,scope:r})=>{if(t.type!=="positioning.set")return;const o=()=>Jk(r);return Ks(gb(r),o,{...n("positioning"),...t.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e("open")?"controlled.open":"controlled.close",previousEvent:t})})},setPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!0)},clearPointerMoveOpened:({context:e})=>{e.set("hasPointerMoveOpened",!1)}},effects:{trackFocusVisible:({scope:e})=>w4({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>{e.get("currentPlacement")||e.set("currentPlacement",t("positioning").placement);const r=()=>Jk(n);return Ks(gb(n),r,{...t("positioning"),defer:!0,onComplete(o){e.set("currentPlacement",o.placement)}})},trackPointerlockChange:({send:e,scope:t})=>{const n=t.getDoc();return vn(n,"pointerlockchange",()=>e({type:"close",src:"pointerlock:change"}),!1)},trackScroll:({send:e,prop:t,scope:n})=>{if(!t("closeOnScroll"))return;const r=gb(n);if(!r)return;const o=$P(r).map(i=>vn(i,"scroll",()=>{e({type:"close",src:"scroll"})},{passive:!0,capture:!0}));return()=>{o.forEach(i=>i?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=vi.subscribe(()=>{vi.get("id")!==e("id")&&t({type:"close",src:"id.change"})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t("closeOnEscape")?vn(document,"keydown",n=>{kP(n)||n.key==="Escape"&&(n.stopPropagation(),e({type:"close",src:"keydown.escape"}))},!0):void 0,waitForOpenDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.openDelay"})},t("openDelay"));return()=>clearTimeout(n)},waitForCloseDelay:({send:e,prop:t})=>{const n=setTimeout(()=>{e({type:"after.closeDelay"})},t("closeDelay"));return()=>clearTimeout(n)}}}};sn()(["aria-label","closeDelay","closeOnEscape","closeOnPointerDown","closeOnScroll","closeOnClick","dir","disabled","getRootNode","id","ids","interactive","onOpenChange","defaultOpen","open","openDelay","positioning"]);const w8=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...ra(a),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)}}}),s=wo(x8,i);return A(()=>b8(s,ii))},_8=P({__name:"tooltip-root",props:Ze({"aria-label":{},closeDelay:{},closeOnClick:{type:Boolean},closeOnEscape:{type:Boolean},closeOnPointerDown:{type:Boolean},closeOnScroll:{type:Boolean},defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},interactive:{type:Boolean},open:{type:Boolean},openDelay:{},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnClick:void 0,closeOnEscape:void 0,closeOnPointerDown:void 0,closeOnScroll:void 0,defaultOpen:void 0,disabled:void 0,interactive:void 0,open:void 0}),emits:["openChange","update:open"],setup(e,{emit:t}){const n=e,r=w8(n,t);return o2(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>L(o.$slots,"default")}}),k8=P({__name:"tooltip-trigger",props:{asChild:{type:Boolean}},setup(e){const t=lu();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Pl=Object.freeze(Object.defineProperty({__proto__:null,Arrow:u8,ArrowTip:c8,Content:d8,Context:p8,Positioner:f8,Root:_8,RootProvider:h8,Trigger:k8},Symbol.toStringTag,{value:"Module"}));function jp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&"_default"in e}function a2(e,t){return jp(e)?(t==="fit"&&(t="_default"),e[t]!==void 0?e[t]:e._default):e}function C8(e,t,n){const r=jp(e)?{...e}:{_default:e};return t==="fit"&&(t="_default"),r[t]=n,r}function E8(e,t){return!jp(e)||t==="fit"||t==="_default"?!1:t in e}function O8(e,t){if(t==="_default"||t==="fit")return e;const{[t]:n,...r}=e;return r}function qo(e){return e&&typeof e=="object"&&(e.setup||e.render||e.__vccOpts||e.name||e.__v_skip)}function Pi(e){return typeof e=="string"}function $i(e){return typeof e=="function"&&!qo(e)}function I8(e){return"field"in e&&"operator"in e}function T8(e){return"and"in e||"or"in e}function S8(e,t,n){const{field:r,operator:o,value:i}=e;let s=t?.[r];switch(n&&jp(s)&&(s=a2(s,n)),o){case"equals":return s===i;case"not_equals":return s!==i;case"in":return Array.isArray(i)?i.includes(s):!1;case"not_in":return Array.isArray(i)?!i.includes(s):!0;case"contains":return Array.isArray(s)||typeof s=="string"&&typeof i=="string"?s.includes(i):!1;case"greater_than":{const a=Number(s),l=Number(i);return!Number.isFinite(a)||!Number.isFinite(l)?!1:a>l}case"less_than":{const a=Number(s),l=Number(i);return!Number.isFinite(a)||!Number.isFinite(l)?!1:awh(r,t,n));if(!e||typeof e!="object")return!0;if(T8(e)){if(e.and)return Array.isArray(e.and)?e.and.every(r=>wh(r,t,n)):!0;if(e.or)return Array.isArray(e.or)?e.or.some(r=>wh(r,t,n)):!1}return I8(e)?S8(e,t,n):!0}function Yi(){const e=dt(Qt);if(!e)throw new Error("useUI must be used within a component that has access to CraftileEditor");const t=n=>{e.ui.state.activeSidebarPanel=n};return{toaster:e.ui.toaster,sidebarPanels:A(()=>Array.from(e.ui.state.sidebarPanels.values()).sort((n,r)=>(n.order??0)-(r.order??0))),activeSidebarPanel:A(()=>e.ui.state.activeSidebarPanel),registerSidebarPanel:e.ui.registerSidebarPanel.bind(e.ui),removeSidebarPanel:e.ui.removeSidebarPanel.bind(e.ui),setActiveSidebarPanel:t,headerActions:A(()=>Array.from(e.ui.state.headerActions.values()).sort((n,r)=>(n.order??0)-(r.order??0))),registerHeaderAction:e.ui.registerHeaderAction.bind(e.ui),removeHeaderAction:e.ui.removeHeaderAction.bind(e.ui),configurationPanels:A(()=>Array.from(e.ui.state.configurationPanels.values()).sort((n,r)=>(n.order??0)-(r.order??0))),registerConfigurationPanel:e.ui.registerConfigurationPanel.bind(e.ui),removeConfigurationPanel:e.ui.removeConfigurationPanel.bind(e.ui),modals:A(()=>e.ui.state.modals),openModals:A(()=>e.ui.state.openModals),openModal:e.ui.openModal.bind(e.ui),closeModal:e.ui.closeModal.bind(e.ui),propertyFields:A(()=>e.ui.state.propertyFields),registerPropertyField:e.ui.registerPropertyField.bind(e.ui),removePropertyField:e.ui.removePropertyField.bind(e.ui),keyboardShortcuts:A(()=>e.ui.state.keyboardShortcuts),registerKeyboardShortcut:e.ui.registerKeyboardShortcut.bind(e.ui),removeKeyboardShortcut:e.ui.removeKeyboardShortcut.bind(e.ui)}}function Xm(){const e=dt(Qt);if(!e)throw new Error("useDeviceMode must be used within a component that has access to CraftileEditor");return{currentDevice:A(()=>e.devices.state.currentDevice),currentDeviceData:A(()=>e.devices.getCurrentDeviceData()),savedCustomDevices:A(()=>e.devices.state.savedCustomDevices),devicePresets:e.devices.devicePresets,setDeviceMode:t=>e.devices.setDeviceMode(t),addCustomDevice:t=>e.devices.addCustomDevice(t),removeCustomDevice:t=>e.devices.removeCustomDevice(t),getAllDevices:()=>e.devices.getAllDevices()}}const P8=["type","disabled"],$8={key:0,class:"animate-spin h-4 w-4 absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Vt=P({__name:"Button",props:{variant:{default:"default"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},square:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(e){const t={default:"bg-white text-gray-900 hover:bg-gray-50 border border-gray-200",primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/90",accent:"bg-accent text-accent-foreground hover:bg-accent/90",sutble:"bg-accent-foreground text-accent",destructive:"bg-red-600 text-white hover:bg-red-700"},n={sm:"h-6 px-3 text-xs",md:"h-8 px-4",lg:"h-10 px-6 text-base"},r={sm:"w-6 h-6 text-xs p-0",md:"w-8 h-8 p-0",lg:"w-10 h-10 text-base p-0"},o=e,i=A(()=>o.disabled||o.loading);return(s,a)=>(y(),V("button",{class:Ne(["inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none cursor-pointer relative",[t[s.variant],o.square?r[s.size]:n[s.size],s.fullWidth&&"w-full"]]),type:s.type,disabled:d(i)},[s.loading?(y(),V("svg",$8,[...a[0]||(a[0]=[D("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),D("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):Z("",!0),D("span",{class:Ne(["inline-flex items-center gap-2",{invisible:s.loading}])},[L(s.$slots,"default")],2)],10,P8))}}),R8={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function A8(e,t){return y(),V("svg",R8,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.5 19.5h3m-6.75 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-15a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 4.5v15a2.25 2.25 0 0 0 2.25 2.25"},null,-1)])])}const Zy=fe({name:"heroicons-device-tablet",render:A8}),N8={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function M8(e,t){return y(),V("svg",N8,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"},null,-1)])])}const mg=fe({name:"heroicons-computer-desktop",render:M8}),D8={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function L8(e,t){return y(),V("svg",D8,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"},null,-1)])])}const l2=fe({name:"heroicons-device-phone-mobile",render:L8}),V8={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F8(e,t){return y(),V("svg",V8,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m15 15l6-6m0 0l-6-6m6 6H9a6 6 0 0 0 0 12h3"},null,-1)])])}const c2=fe({name:"heroicons-arrow-uturn-right",render:F8}),u2=P({__name:"PropertyFieldRenderWrapper",props:{renderFn:{type:Function},field:{},value:{},onChange:{type:Function},onBlur:{type:Function},class:{}},setup(e){const t=e,n=Q(),r=()=>{if(n.value&&t.renderFn){n.value.innerHTML="";const o=t.renderFn({field:t.field,value:t.value,onChange:t.onChange,onBlur:t.onBlur});n.value.appendChild(o)}};return Je(()=>{r()}),st(()=>t.value,()=>{r()}),(o,i)=>(y(),V("div",{ref_key:"containerRef",ref:n,class:Ne(t.class)},null,2))}}),B8={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H8(e,t){return y(),V("svg",B8,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m4.5 12.75l6 6l9-13.5"},null,-1)])])}const z8=fe({name:"heroicons-check",render:H8}),U8=P({__name:"Tooltip",props:{title:{}},setup(e){return(t,n)=>(y(),$(d(Pl).Root,{"open-delay":100,positioning:{placement:"top"}},{default:O(()=>[S(d(Pl).Trigger,null,{default:O(()=>[L(t.$slots,"default")]),_:3}),S(d(Pl).Positioner,null,{default:O(()=>[S(d(Pl).Content,{class:"relative w-max bg-white border border-gray-300/60 rounded-md shadow-sm text-sm font-medium px-2 py-1 text-gray-700 data-[state=open]:animate-enter data-[state=closed]:animate-exit"},{default:O(()=>[S(d(Pl).Arrow,{style:{"--arrow-size":"12px","--arrow-background":"white"}},{default:O(()=>[S(d(Pl).ArrowTip,{class:"border-l border-t border-gray-300/60"})]),_:1}),re(" "+j(t.title),1)]),_:1})]),_:1})]),_:3}))}}),j8={class:"relative"},G8={class:"flex items-center justify-end gap-3 absolute right-0 top-0"},W8={key:2,class:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md"},q8={class:"text-sm text-red-600"},K8={class:"font-mono"},Y8=P({__name:"ResponsivePropertyField",props:{field:{},modelValue:{},currentDevice:{},availableDevices:{}},emits:["update:modelValue","changeDevice"],setup(e,{emit:t}){const n=e,r=t,o={desktop:mg,tablet:Zy,mobile:l2},i=m=>o[m||"desktop"]||mg,s=A(()=>n.availableDevices.find(m=>m.id===n.currentDevice)||n.availableDevices[0]),a=A(()=>E8(n.modelValue,n.currentDevice)),l=A(()=>a2(n.modelValue,n.currentDevice)),c=m=>{const b=C8(n.modelValue,n.currentDevice,m);r("update:modelValue",b)},u=()=>{if(!jp(n.modelValue))return;const m=O8(n.modelValue,n.currentDevice);r("update:modelValue",m)},p=m=>{const[b]=m.value;b&&b!==n.currentDevice&&r("changeDevice",b)},h=A(()=>E4({items:n.availableDevices.map(m=>({label:m.label,value:m.id,icon:m.icon}))})),{propertyFields:f}=Yi(),g=A(()=>f.value.get(n.field.type)?.render);return(m,b)=>{const w=c2,E=U8,k=z8,v=u2;return y(),V("div",j8,[D("div",G8,[S(E,{title:"Reset to default value"},{default:O(()=>[d(a)?(y(),V("button",{key:0,onClick:u,class:"hover:text-gray-600 text-gray-400 transition-colors cursor-pointer"},[S(w,{class:"w-3 h-3 rotate-180"})])):Z("",!0)]),_:1}),d(a)?(y(),$(E,{key:0,title:"Customized for this breakpoint"},{default:O(()=>[...b[0]||(b[0]=[D("div",{class:"size-1.5 bg-green-800 rotate-45"},null,-1)])]),_:1})):Z("",!0),S(d(_a).Root,{"model-value":[m.currentDevice],collection:d(h),onValueChange:p,positioning:{strategy:"fixed",placement:"bottom-end"}},{default:O(()=>[S(d(_a).Trigger,{class:"flex items-center gap-1 relative"},{default:O(()=>[(y(),$(Xn(i(d(s).icon)),{class:"w-4 h-4 text-gray-600"}))]),_:1}),S(d(_a).Positioner,{class:""},{default:O(()=>[S(d(_a).Content,{class:"bg-white border border-gray-200 rounded-lg shadow-lg p-1 min-w-[160px] z-50"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(h).items,_=>(y(),$(d(_a).Item,{key:_.value,item:_,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded cursor-pointer data-[state=checked]:bg-accent/10 data-[state=checked]:text-accent"},{default:O(()=>[S(d(_a).ItemText,{class:"flex items-center gap-2"},{default:O(()=>[(y(),$(Xn(i(_.icon)),{class:"w-4 h-4"})),re(" "+j(_.label),1)]),_:2},1024),S(d(_a).ItemIndicator,{class:"ml-auto"},{default:O(()=>[S(k,{class:"w-4 h-4 text-accent"})]),_:1})]),_:2},1032,["item"]))),128))]),_:1})]),_:1})]),_:1},8,["model-value","collection"])]),D("div",null,[d(qo)(d(g))||d(Pi)(d(g))?(y(),$(Xn(d(g)),{key:0,field:m.field,"model-value":d(l),"onUpdate:modelValue":c},null,8,["field","model-value"])):d($i)(d(g))?(y(),$(v,{key:1,"render-fn":d(g),field:m.field,value:d(l),"on-change":c},null,8,["render-fn","field","value"])):(y(),V("div",W8,[D("p",q8,[b[1]||(b[1]=re(" Unknown field type: ",-1)),D("code",K8,j(m.field.type),1)])]))])])}}}),X8={key:1},J8={key:2,class:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md"},Z8={class:"text-sm text-red-600"},Q8={class:"font-mono"},eH={key:2,class:"text-[0.625rem] text-gray-500 mt-1 italic"},ws=P({__name:"PropertyField",props:{field:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,{propertyFields:o}=Yi(),{currentDevice:i,devicePresets:s,setDeviceMode:a}=Xm(),l=A(()=>{const f={id:"_default",label:"All devices",width:0,icon:"desktop"},g=s.filter(m=>m.id!=="fit");return[f,...g]}),c=A(()=>i.value==="fit"?"_default":i.value),u=A(()=>o.value.get(n.field.type)?.render),p=f=>{r("update:modelValue",f)},h=f=>{a(f==="_default"?"fit":f)};return(f,g)=>{const m=u2;return y(),V("div",null,[f.field.responsive?(y(),$(Y8,{key:0,field:f.field,"model-value":f.modelValue,"current-device":d(c),"available-devices":d(l),"onUpdate:modelValue":p,onChangeDevice:h},null,8,["field","model-value","current-device","available-devices"])):(y(),V("div",X8,[d(qo)(d(u))||d(Pi)(d(u))?(y(),$(Xn(d(u)),{key:0,field:f.field,"model-value":f.modelValue,"onUpdate:modelValue":p},null,8,["field","model-value"])):d($i)(d(u))?(y(),$(m,{key:1,"render-fn":d(u),field:f.field,value:f.modelValue,"on-change":p},null,8,["render-fn","field","value"])):(y(),V("div",J8,[D("p",Z8,[g[0]||(g[0]=re(" Unknown field type: ",-1)),D("code",Q8,j(f.field.type),1)])]))])),f.field.info?(y(),V("p",eH,j(f.field.info),1)):Z("",!0)])}}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{.__craftile,.__craftile :host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-green-800:oklch(44.8% .119 151.328);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-slate-400:oklch(70.4% .04 256.788);--color-gray-50:var(--color-gray-50,oklch(98.5% 0 0));--color-gray-100:var(--color-gray-100,oklch(96.7% .001 286.375));--color-gray-200:var(--color-gray-200,oklch(92% .004 286.32));--color-gray-300:var(--color-gray-300,oklch(87.1% .006 286.286));--color-gray-400:var(--color-gray-400,oklch(70.5% .015 286.067));--color-gray-500:var(--color-gray-500,oklch(55.2% .016 285.938));--color-gray-600:var(--color-gray-600,oklch(44.2% .017 285.786));--color-gray-700:var(--color-gray-700,oklch(37% .013 285.805));--color-gray-800:var(--color-gray-800,oklch(37% .013 285.805));--color-gray-900:var(--color-gray-900,oklch(37% .013 285.805));--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-semibold:600;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-primary:var(--color-primary,oklch(14.7% .004 49.25));--color-primary-foreground:var(--color-primary-foreground,oklch(98.5% 0 0));--color-secondary:var(--color-secondary,oklch(92% .004 286.32));--color-secondary-foreground:var(--color-secondary-foreground,oklch(37% .013 285.805));--color-accent:var(--color-accent,oklch(54.6% .245 262.881));--color-accent-foreground:var(--color-accent-foreground,oklch(93.2% .032 255.585));--animate-enter:enter .1s ease-out;--animate-exit:exit .1s ease-out}}@layer base{.__craftile *,.__craftile :after,.__craftile :before,.__craftile ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.__craftile ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.__craftile,.__craftile :host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}.__craftile hr{height:0;color:inherit;border-top-width:1px}.__craftile abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.__craftile h1,.__craftile h2,.__craftile h3,.__craftile h4,.__craftile h5,.__craftile h6{font-size:inherit;font-weight:inherit}.__craftile a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.__craftile b,.__craftile strong{font-weight:bolder}.__craftile code,.__craftile kbd,.__craftile samp,.__craftile pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}.__craftile small{font-size:80%}.__craftile sub,.__craftile sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.__craftile sub{bottom:-.25em}.__craftile sup{top:-.5em}.__craftile table{text-indent:0;border-color:inherit;border-collapse:collapse}.__craftile :-moz-focusring{outline:auto}.__craftile progress{vertical-align:baseline}.__craftile summary{display:list-item}.__craftile ol,.__craftile ul,.__craftile menu{list-style:none}.__craftile img,.__craftile svg,.__craftile video,.__craftile canvas,.__craftile audio,.__craftile iframe,.__craftile embed,.__craftile object{vertical-align:middle;display:block}.__craftile img,.__craftile video{max-width:100%;height:auto}.__craftile button,.__craftile input,.__craftile select,.__craftile optgroup,.__craftile textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.__craftile ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.__craftile :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.__craftile :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.__craftile ::file-selector-button{margin-inline-end:4px}.__craftile ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.__craftile ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.__craftile ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.__craftile textarea{resize:vertical}.__craftile ::-webkit-search-decoration{-webkit-appearance:none}.__craftile ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.__craftile ::-webkit-datetime-edit{display:inline-flex}.__craftile ::-webkit-datetime-edit-fields-wrapper{padding:0}.__craftile ::-webkit-datetime-edit{padding-block:0}.__craftile ::-webkit-datetime-edit-year-field{padding-block:0}.__craftile ::-webkit-datetime-edit-month-field{padding-block:0}.__craftile ::-webkit-datetime-edit-day-field{padding-block:0}.__craftile ::-webkit-datetime-edit-hour-field{padding-block:0}.__craftile ::-webkit-datetime-edit-minute-field{padding-block:0}.__craftile ::-webkit-datetime-edit-second-field{padding-block:0}.__craftile ::-webkit-datetime-edit-millisecond-field{padding-block:0}.__craftile ::-webkit-datetime-edit-meridiem-field{padding-block:0}.__craftile ::-webkit-calendar-picker-indicator{line-height:1}.__craftile :-moz-ui-invalid{box-shadow:none}.__craftile button,.__craftile input:where([type=button],[type=reset],[type=submit]){appearance:button}.__craftile ::file-selector-button{appearance:button}.__craftile ::-webkit-inner-spin-button{height:auto}.__craftile ::-webkit-outer-spin-button{height:auto}.__craftile [hidden]:where(:not([hidden=until-found])){display:none!important}.__craftile *,.__craftile :after,.__craftile :before,.__craftile ::backdrop{border-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile ::file-selector-button{border-color:var(--color-gray-200,oklch(92% .004 286.32))}}@layer components{.__craftile .ghost-block{border-radius:var(--radius-md);border-style:var(--tw-border-style);--tw-border-style:dashed;border-style:dashed;border-width:2px;border-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .ghost-block{border-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))80%,transparent)}}.__craftile .ghost-block{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .ghost-block{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))20%,transparent)}}.__craftile .ghost-block{opacity:.3}.__craftile .property-field-enter-active,.__craftile .property-field-leave-active{transition:all .2s;overflow:hidden}.__craftile .property-field-enter-from,.__craftile .property-field-leave-to{opacity:0;max-height:0}.__craftile .property-field-enter-to,.__craftile .property-field-leave-from{opacity:1;max-height:200px}}@layer utilities{.__craftile .pointer-events-auto{pointer-events:auto}.__craftile .pointer-events-none{pointer-events:none}.__craftile .invisible{visibility:hidden}.__craftile .visible{visibility:visible}.__craftile .sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.__craftile .absolute{position:absolute}.__craftile .fixed{position:fixed}.__craftile .relative{position:relative}.__craftile .static{position:static}.__craftile .inset-0{inset:calc(var(--spacing)*0)}.__craftile .-top-2{top:calc(var(--spacing)*-2)}.__craftile .-top-\\[18\\.5px\\]{top:-18.5px}.__craftile .-top-\\[19px\\]{top:-19px}.__craftile .top-0{top:calc(var(--spacing)*0)}.__craftile .top-1\\/2{top:50%}.__craftile .top-4{top:calc(var(--spacing)*4)}.__craftile .-right-2{right:calc(var(--spacing)*-2)}.__craftile .right-0{right:calc(var(--spacing)*0)}.__craftile .right-4{right:calc(var(--spacing)*4)}.__craftile .-bottom-2{bottom:calc(var(--spacing)*-2)}.__craftile .-left-2{left:calc(var(--spacing)*-2)}.__craftile .-left-\\[1px\\]{left:-1px}.__craftile .left-0{left:calc(var(--spacing)*0)}.__craftile .left-1\\/2{left:50%}.__craftile .\\!z-10{z-index:10!important}.__craftile .\\!z-\\[1100\\]{z-index:1100!important}.__craftile .z-10{z-index:10}.__craftile .z-50{z-index:50}.__craftile .z-\\[1000\\]{z-index:1000}.__craftile .container{width:100%}@media (min-width:40rem){.__craftile .container{max-width:40rem}}@media (min-width:48rem){.__craftile .container{max-width:48rem}}@media (min-width:64rem){.__craftile .container{max-width:64rem}}@media (min-width:80rem){.__craftile .container{max-width:80rem}}@media (min-width:96rem){.__craftile .container{max-width:96rem}}.__craftile .m-0{margin:calc(var(--spacing)*0)}.__craftile .mx-0{margin-inline:calc(var(--spacing)*0)}.__craftile .mx-2{margin-inline:calc(var(--spacing)*2)}.__craftile .mx-auto{margin-inline:auto}.__craftile .my-1{margin-block:calc(var(--spacing)*1)}.__craftile .my-2{margin-block:calc(var(--spacing)*2)}.__craftile .mt-0{margin-top:calc(var(--spacing)*0)}.__craftile .mt-1{margin-top:calc(var(--spacing)*1)}.__craftile .mt-2{margin-top:calc(var(--spacing)*2)}.__craftile .mt-3{margin-top:calc(var(--spacing)*3)}.__craftile .mt-4{margin-top:calc(var(--spacing)*4)}.__craftile .mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.__craftile .mr-1{margin-right:calc(var(--spacing)*1)}.__craftile .mb-1{margin-bottom:calc(var(--spacing)*1)}.__craftile .mb-2{margin-bottom:calc(var(--spacing)*2)}.__craftile .mb-3{margin-bottom:calc(var(--spacing)*3)}.__craftile .mb-4{margin-bottom:calc(var(--spacing)*4)}.__craftile .ml-3{margin-left:calc(var(--spacing)*3)}.__craftile .ml-auto{margin-left:auto}.__craftile .box-border{box-sizing:border-box}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .hidden{display:none}.__craftile .inline-flex{display:inline-flex}.__craftile .aspect-square{aspect-ratio:1}.__craftile .size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.__craftile .h-1\\.5{height:calc(var(--spacing)*1.5)}.__craftile .h-3{height:calc(var(--spacing)*3)}.__craftile .h-3\\.5{height:calc(var(--spacing)*3.5)}.__craftile .h-4{height:calc(var(--spacing)*4)}.__craftile .h-5{height:calc(var(--spacing)*5)}.__craftile .h-6{height:calc(var(--spacing)*6)}.__craftile .h-8{height:calc(var(--spacing)*8)}.__craftile .h-10{height:calc(var(--spacing)*10)}.__craftile .h-12{height:calc(var(--spacing)*12)}.__craftile .h-14{height:calc(var(--spacing)*14)}.__craftile .h-16{height:calc(var(--spacing)*16)}.__craftile .h-\\[2px\\]{height:2px}.__craftile .h-\\[520px\\]{height:520px}.__craftile .h-full{height:100%}.__craftile .h-px{height:1px}.__craftile .max-h-\\[90vh\\]{max-height:90vh}.__craftile .max-h-\\[calc\\(100vh-2rem\\)\\]{max-height:calc(100vh - 2rem)}.__craftile .w-0{width:calc(var(--spacing)*0)}.__craftile .w-3{width:calc(var(--spacing)*3)}.__craftile .w-3\\.5{width:calc(var(--spacing)*3.5)}.__craftile .w-4{width:calc(var(--spacing)*4)}.__craftile .w-5{width:calc(var(--spacing)*5)}.__craftile .w-6{width:calc(var(--spacing)*6)}.__craftile .w-8{width:calc(var(--spacing)*8)}.__craftile .w-10{width:calc(var(--spacing)*10)}.__craftile .w-12{width:calc(var(--spacing)*12)}.__craftile .w-14{width:calc(var(--spacing)*14)}.__craftile .w-16{width:calc(var(--spacing)*16)}.__craftile .w-60{width:calc(var(--spacing)*60)}.__craftile .w-72{width:calc(var(--spacing)*72)}.__craftile .w-75{width:calc(var(--spacing)*75)}.__craftile .w-\\[640px\\]{width:640px}.__craftile .w-full{width:100%}.__craftile .w-max{width:max-content}.__craftile .max-w-2xl{max-width:var(--container-2xl)}.__craftile .max-w-\\[120px\\]{max-width:120px}.__craftile .max-w-\\[calc\\(100vw-2rem\\)\\]{max-width:calc(100vw - 2rem)}.__craftile .max-w-lg{max-width:var(--container-lg)}.__craftile .max-w-md{max-width:var(--container-md)}.__craftile .max-w-sm{max-width:var(--container-sm)}.__craftile .max-w-xl{max-width:var(--container-xl)}.__craftile .max-w-xs{max-width:var(--container-xs)}.__craftile .min-w-0{min-width:calc(var(--spacing)*0)}.__craftile .min-w-96{min-width:calc(var(--spacing)*96)}.__craftile .min-w-\\[160px\\]{min-width:160px}.__craftile .min-w-\\[180px\\]{min-width:180px}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .shrink-0{flex-shrink:0}.__craftile .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .rotate-45{rotate:45deg}.__craftile .rotate-90{rotate:90deg}.__craftile .rotate-180{rotate:180deg}.__craftile .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.__craftile .animate-spin{animation:var(--animate-spin)}.__craftile .cursor-grab{cursor:grab}.__craftile .cursor-pointer{cursor:pointer}.__craftile .resize{resize:both}.__craftile .flex-col{flex-direction:column}.__craftile .flex-wrap{flex-wrap:wrap}.__craftile .items-center{align-items:center}.__craftile .items-start{align-items:flex-start}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .justify-end{justify-content:flex-end}.__craftile .gap-0\\.5{gap:calc(var(--spacing)*.5)}.__craftile .gap-1{gap:calc(var(--spacing)*1)}.__craftile .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.__craftile .gap-2{gap:calc(var(--spacing)*2)}.__craftile .gap-3{gap:calc(var(--spacing)*3)}.__craftile .gap-4{gap:calc(var(--spacing)*4)}.__craftile :where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.__craftile :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.__craftile .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.__craftile .overflow-auto{overflow:auto}.__craftile .overflow-hidden{overflow:hidden}.__craftile .overflow-y-auto{overflow-y:auto}.__craftile .overflow-y-hidden{overflow-y:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .rounded-xs{border-radius:var(--radius-xs)}.__craftile .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-0{border-style:var(--tw-border-style);border-width:0}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.__craftile .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-dashed{--tw-border-style:dashed;border-style:dashed}.__craftile .border-solid{--tw-border-style:solid;border-style:solid}.__craftile .border-\\[none\\]{border-color:none}.__craftile .border-amber-200{border-color:var(--color-amber-200)}.__craftile .border-amber-300{border-color:var(--color-amber-300)}.__craftile .border-blue-200{border-color:var(--color-blue-200)}.__craftile .border-blue-300{border-color:var(--color-blue-300)}.__craftile .border-blue-500{border-color:var(--color-blue-500)}.__craftile .border-gray-100{border-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .border-gray-200{border-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .border-gray-300,.__craftile .border-gray-300\\/60{border-color:var(--color-gray-300,oklch(87.1% .006 286.286))}@supports (color:color-mix(in lab,red,red)){.__craftile .border-gray-300\\/60{border-color:color-mix(in oklab,var(--color-gray-300,oklch(87.1% .006 286.286))60%,transparent)}}.__craftile .border-red-200{border-color:var(--color-red-200)}.__craftile .border-red-300{border-color:var(--color-red-300)}.__craftile .border-slate-400{border-color:var(--color-slate-400)}.__craftile .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.__craftile .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.__craftile .bg-accent{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .bg-accent-foreground{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .bg-accent\\/8{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))8%,transparent)}}.__craftile .bg-accent\\/70{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-accent\\/70{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))70%,transparent)}}.__craftile .bg-amber-50{background-color:var(--color-amber-50)}.__craftile .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.__craftile .bg-blue-50{background-color:var(--color-blue-50)}.__craftile .bg-blue-500{background-color:var(--color-blue-500)}.__craftile .bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.__craftile .bg-blue-500\\/90{background-color:#3080ffe6}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/90{background-color:color-mix(in oklab,var(--color-blue-500)90%,transparent)}}.__craftile .bg-blue-500\\/95{background-color:#3080fff2}@supports (color:color-mix(in lab,red,red)){.__craftile .bg-blue-500\\/95{background-color:color-mix(in oklab,var(--color-blue-500)95%,transparent)}}.__craftile .bg-gray-50{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .bg-gray-100{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .bg-gray-200{background-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .bg-gray-800{background-color:var(--color-gray-800,oklch(37% .013 285.805))}.__craftile .bg-green-800{background-color:var(--color-green-800)}.__craftile .bg-primary{background-color:var(--color-primary,oklch(14.7% .004 49.25))}.__craftile .bg-red-50{background-color:var(--color-red-50)}.__craftile .bg-red-600{background-color:var(--color-red-600)}.__craftile .bg-secondary{background-color:var(--color-secondary,oklch(92% .004 286.32))}.__craftile .bg-transparent{background-color:#0000}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .fill-current{fill:currentColor}.__craftile .object-contain{object-fit:contain}.__craftile .p-0{padding:calc(var(--spacing)*0)}.__craftile .p-0\\.5{padding:calc(var(--spacing)*.5)}.__craftile .p-1{padding:calc(var(--spacing)*1)}.__craftile .p-1\\.5{padding:calc(var(--spacing)*1.5)}.__craftile .p-2{padding:calc(var(--spacing)*2)}.__craftile .p-3{padding:calc(var(--spacing)*3)}.__craftile .p-4{padding:calc(var(--spacing)*4)}.__craftile .p-6{padding:calc(var(--spacing)*6)}.__craftile .p-\\[2px\\]{padding:2px}.__craftile .px-1{padding-inline:calc(var(--spacing)*1)}.__craftile .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.__craftile .px-2{padding-inline:calc(var(--spacing)*2)}.__craftile .px-3{padding-inline:calc(var(--spacing)*3)}.__craftile .px-4{padding-inline:calc(var(--spacing)*4)}.__craftile .px-6{padding-inline:calc(var(--spacing)*6)}.__craftile .py-0\\.5{padding-block:calc(var(--spacing)*.5)}.__craftile .py-1{padding-block:calc(var(--spacing)*1)}.__craftile .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.__craftile .py-2{padding-block:calc(var(--spacing)*2)}.__craftile .py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.__craftile .py-3{padding-block:calc(var(--spacing)*3)}.__craftile .py-4{padding-block:calc(var(--spacing)*4)}.__craftile .py-8{padding-block:calc(var(--spacing)*8)}.__craftile .pb-1{padding-bottom:calc(var(--spacing)*1)}.__craftile .text-center{text-align:center}.__craftile .text-left{text-align:left}.__craftile .font-mono{font-family:var(--font-mono)}.__craftile .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.__craftile .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.__craftile .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .text-\\[0\\.6rem\\],.__craftile .text-\\[0\\.60rem\\]{font-size:.6rem}.__craftile .text-\\[0\\.625rem\\]{font-size:.625rem}.__craftile .text-\\[13px\\]{font-size:13px}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.__craftile .text-ellipsis{text-overflow:ellipsis}.__craftile .whitespace-nowrap{white-space:nowrap}.__craftile .text-accent{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .text-accent\\!{color:var(--color-accent,oklch(54.6% .245 262.881))!important}.__craftile .text-accent-foreground{color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .text-accent\\/90{color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .text-accent\\/90{color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))90%,transparent)}}.__craftile .text-amber-700{color:var(--color-amber-700)}.__craftile .text-amber-800{color:var(--color-amber-800)}.__craftile .text-blue-700{color:var(--color-blue-700)}.__craftile .text-blue-800{color:var(--color-blue-800)}.__craftile .text-gray-400{color:var(--color-gray-400,oklch(70.5% .015 286.067))}.__craftile .text-gray-500{color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .text-gray-600{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .text-gray-700{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .text-gray-800{color:var(--color-gray-800,oklch(37% .013 285.805))}.__craftile .text-gray-900{color:var(--color-gray-900,oklch(37% .013 285.805))}.__craftile .text-primary-foreground{color:var(--color-primary-foreground,oklch(98.5% 0 0))}.__craftile .text-red-600{color:var(--color-red-600)}.__craftile .text-red-700{color:var(--color-red-700)}.__craftile .text-red-800{color:var(--color-red-800)}.__craftile .text-secondary-foreground{color:var(--color-secondary-foreground,oklch(37% .013 285.805))}.__craftile .text-white{color:var(--color-white)}.__craftile .capitalize{text-transform:capitalize}.__craftile .italic{font-style:italic}.__craftile .opacity-0{opacity:0}.__craftile .opacity-25{opacity:.25}.__craftile .opacity-70{opacity:.7}.__craftile .opacity-75{opacity:.75}.__craftile .opacity-80{opacity:.8}.__craftile .opacity-90{opacity:.9}.__craftile .opacity-100{opacity:1}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-black\\/25{--tw-shadow-color:#00000040}@supports (color:color-mix(in lab,red,red)){.__craftile .shadow-black\\/25{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)25%,transparent)var(--tw-shadow-alpha),transparent)}}.__craftile .ring-white\\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.__craftile .ring-white\\/10{--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.__craftile .filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.__craftile .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-\\[background\\]{transition-property:background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .duration-100{--tw-duration:.1s;transition-duration:.1s}.__craftile .duration-200{--tw-duration:.2s;transition-duration:.2s}.__craftile .duration-300{--tw-duration:.3s;transition-duration:.3s}.__craftile .duration-\\[0\\.2s\\]{--tw-duration:.2s;transition-duration:.2s}.__craftile .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.__craftile .not-last\\:border-b:not(:last-child){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media (hover:hover){.__craftile .group-hover\\:flex:is(:where(.group):hover *){display:flex}.__craftile .group-hover\\:w-full:is(:where(.group):hover *){width:100%}.__craftile .group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.__craftile .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.__craftile .last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.__craftile .hover\\:bg-accent-foreground:hover{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .hover\\:bg-accent\\/90:hover{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))90%,transparent)}}.__craftile .hover\\:bg-amber-100:hover{background-color:var(--color-amber-100)}.__craftile .hover\\:bg-blue-100:hover{background-color:var(--color-blue-100)}.__craftile .hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.__craftile .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200,oklch(92% .004 286.32))}.__craftile .hover\\:bg-primary\\/90:hover{background-color:var(--color-primary,oklch(14.7% .004 49.25))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary,oklch(14.7% .004 49.25))90%,transparent)}}.__craftile .hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.__craftile .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.__craftile .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.__craftile .hover\\:bg-secondary\\/90:hover{background-color:var(--color-secondary,oklch(92% .004 286.32))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:bg-secondary\\/90:hover{background-color:color-mix(in oklab,var(--color-secondary,oklch(92% .004 286.32))90%,transparent)}}.__craftile .hover\\:text-accent:hover{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .hover\\:text-gray-600:hover{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .hover\\:text-gray-700:hover{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .hover\\:text-red-600:hover{color:var(--color-red-600)}.__craftile .hover\\:opacity-100:hover{opacity:1}.__craftile .hover\\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .hover\\:ring-accent\\/40:hover{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .hover\\:ring-accent\\/40:hover{--tw-ring-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))40%,transparent)}}}.__craftile .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .focus-visible\\:border-transparent:focus-visible{border-color:#0000}.__craftile .focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.__craftile .focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.__craftile .active\\:cursor-grabbing:active{cursor:grabbing}@media (hover:hover){.__craftile .hover\\:enabled\\:bg-gray-500:hover:enabled{background-color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .hover\\:enabled\\:bg-red-800:hover:enabled{background-color:var(--color-red-800)}.__craftile .hover\\:enabled\\:text-gray-100:hover:enabled{color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .hover\\:enabled\\:text-red-200:hover:enabled{color:var(--color-red-200)}}.__craftile .active\\:enabled\\:bg-gray-600:active:enabled{background-color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .disabled\\:pointer-events-none:disabled{pointer-events:none}.__craftile .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.__craftile .disabled\\:text-gray-600:disabled{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .disabled\\:opacity-50:disabled{opacity:.5}.__craftile .data-selected\\:border[data-selected]{border-style:var(--tw-border-style);border-width:1px}.__craftile .data-selected\\:border-b-2[data-selected]{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.__craftile .data-selected\\:border-accent[data-selected],.__craftile .data-selected\\:border-accent\\/20[data-selected]{border-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:border-accent\\/20[data-selected]{border-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))20%,transparent)}}.__craftile .data-selected\\:bg-accent\\/10[data-selected]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:bg-accent\\/10[data-selected]{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}.__craftile .data-selected\\:bg-white[data-selected]{background-color:var(--color-white)}.__craftile .data-selected\\:text-accent[data-selected]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-selected\\:shadow[data-selected]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media (hover:hover){.__craftile .data-selected\\:hover\\:bg-accent\\/10[data-selected]:hover{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-selected\\:hover\\:bg-accent\\/10[data-selected]:hover{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}}.__craftile .data-\\[disabled\\]\\:cursor-not-allowed[data-disabled]{cursor:not-allowed}.__craftile .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.__craftile .data-\\[state\\=checked\\]\\:bg-accent\\/10[data-state=checked]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}@supports (color:color-mix(in lab,red,red)){.__craftile .data-\\[state\\=checked\\]\\:bg-accent\\/10[data-state=checked]{background-color:color-mix(in oklab,var(--color-accent,oklch(54.6% .245 262.881))10%,transparent)}}.__craftile .data-\\[state\\=checked\\]\\:text-accent[data-state=checked]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=closed\\]\\:animate-exit[data-state=closed]{animation:var(--animate-exit)}.__craftile .data-\\[state\\=open\\]\\:rotate-180[data-state=open]{rotate:180deg}.__craftile .data-\\[state\\=open\\]\\:animate-enter[data-state=open]{animation:var(--animate-enter)}.__craftile .\\[\\&_svg\\]\\:h-full svg{height:100%}.__craftile .\\[\\&_svg\\]\\:w-full svg{width:100%}.__craftile .\\[\\&_svg\\]\\:fill-current svg{fill:currentColor}.__craftile .\\[\\&\\>svg\\]\\:h-4>svg{height:calc(var(--spacing)*4)}.__craftile .\\[\\&\\>svg\\]\\:w-3\\.5>svg{width:calc(var(--spacing)*3.5)}.__craftile .\\[\\&\\>svg\\]\\:w-4>svg{width:calc(var(--spacing)*4)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:0;transform:scale(.95)translateY(-10px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes exit{0%{opacity:1;transform:scale(1)translateY(0)}to{opacity:0;transform:scale(.95)translateY(-10px)}}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const sp=()=>crypto.randomUUID?crypto.randomUUID():Date.now().toString(36)+Math.random().toString(36).substr(2),ut=e=>e.id||e.name;let d2=class{listeners=new Map;on(t,n){return this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n),()=>{this.off(t,n)}}off(t,n){const r=this.listeners.get(t);r&&(r.delete(n),r.size===0&&this.listeners.delete(t))}once(t,n){const r=o=>{n(o),this.off(t,r)};this.on(t,r)}emit(t,...n){const r=this.listeners.get(t);if(r){const o=n[0];r.forEach(i=>{try{i(o)}catch(s){console.error(`Error in event listener for '${String(t)}':`,s)}})}}removeAllListeners(t){t?this.listeners.delete(t):this.listeners.clear()}},tH=class{schemas=new Map;patternCache=new Map;register(t,n){if(this.schemas.has(t))throw new Error(`Block type '${t}' is already registered`);this.schemas.set(t,n)}registerMany(t){for(const[n,r]of Object.entries(t))this.register(n,r)}unregister(t){return this.schemas.delete(t)}get(t){return this.schemas.get(t)}has(t){return this.schemas.has(t)}getAll(){const t={};for(const[n,r]of this.schemas.entries())t[n]=r;return t}find(t){const n=[];for(const[r,o]of this.schemas.entries())t(r,o)&&n.push(r);return n}canBeChild(t,n){const r=this.get(n);return!r||!r.accepts?!1:this.get(t)?.private===!0?r.accepts.includes(t):r.accepts.some(o=>this.matchesPattern(t,o))}getTypes(){return Array.from(this.schemas.keys())}matchesPattern(t,n){if(n==="*")return!0;if(!this.patternCache.has(n)){const r="^"+n.replace(/\*/g,"__WILDCARD__").replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/__WILDCARD__/g,".*")+"$";this.patternCache.set(n,new RegExp(r))}return this.patternCache.get(n).test(t)}},nH=class{history=[];currentIndex=-1;maxHistorySize;constructor(t=100){this.maxHistorySize=t}addCommand(t){this.currentIndex=this.maxHistorySize&&(this.history.shift(),this.currentIndex--),this.history.push(t),this.currentIndex++}undo(){if(!this.canUndo())return null;const t=this.history[this.currentIndex];return t.revert(),this.currentIndex--,t}redo(){if(!this.canRedo())return null;this.currentIndex++;const t=this.history[this.currentIndex];return t.apply(),t}canUndo(){return this.currentIndex>=0}canRedo(){return this.currentIndex=0&&this.index<=n.children.length?(n.children.splice(this.index,0,this.blockId),this.actualIndex=this.index):(n.children.push(this.blockId),this.actualIndex=n.children.length-1)}else{const n=this.regionId||ut(this.page.regions[0]);let r=this.page.regions.find(o=>ut(o)===n);r||(r={id:n,name:n,blocks:[]},this.page.regions.push(r)),this.index!==void 0&&this.index>=0&&this.index<=r.blocks.length?(r.blocks.splice(this.index,0,this.blockId),this.actualIndex=this.index):(r.blocks.push(this.blockId),this.actualIndex=r.blocks.length-1)}this.emit("block:insert",{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId,index:this.actualIndex,regionId:this.regionId||ut(this.page.regions[0])})}revert(){if(this.insertedBlock){if(delete this.page.blocks[this.blockId],this.parentId){const t=this.page.blocks[this.parentId];t&&this.actualIndex!==void 0&&t.children.splice(this.actualIndex,1)}else{const t=this.regionId||ut(this.page.regions[0]),n=this.page.regions.find(r=>ut(r)===t);n&&this.actualIndex!==void 0&&n.blocks.splice(this.actualIndex,1)}this.emit("block:remove",{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId})}}getBlockId(){return this.blockId}getInsertedBlock(){return this.insertedBlock}buildProperties(t){const n={};if(t?.properties)for(const r of t.properties)r.default!==void 0&&(n[r.id]=r.default);return n}},Qk=class{page;blockType;presetIndex;presetData;parentId;regionId;index;blockId;properties;insertedBlock;actualIndex;blocksManager;emit;createdBlockIds=[];constructor(t,n){if(this.page=t,this.blockType=n.blockType,this.presetIndex=n.presetIndex,this.presetData=n.presetData,this.parentId=n.parentId,this.regionId=n.regionId,this.index=n.index,this.blockId=sp(),this.blocksManager=n.blocksManager,this.emit=n.emit,n.presetIndex===void 0&&!n.presetData)throw new Error("Either presetIndex or presetData must be provided");const r=this.blocksManager.get(this.blockType);if(!r)throw new Error(`Block type '${this.blockType}' not found`);let o;if(n.presetData)o=n.presetData.properties;else if(n.presetIndex!==void 0){const i=r.presets?.[n.presetIndex];if(!i)throw new Error(`Preset at index ${n.presetIndex} not found for block type '${this.blockType}'`);o=i.properties}this.properties=this.buildProperties(r,o)}apply(){const t=this.blocksManager.get(this.blockType);if(this.presetData)this.insertedBlock={type:this.blockType,id:this.blockId,name:this.presetData.name||t?.meta?.name||this.blockType,semanticId:this.presetData.semanticId||this.presetData.id,properties:this.properties,children:[],parentId:void 0,static:this.presetData.static,disabled:this.presetData.disabled,repeated:this.presetData.repeated,ghost:this.presetData.ghost},this.page.blocks[this.blockId]=this.insertedBlock,this.createdBlockIds.push(this.blockId),this.presetData.children&&this.presetData.children.length>0&&(this.insertedBlock.children=this.createChildrenFromPreset(this.presetData.children,this.blockId));else if(this.presetIndex!==void 0){const n=t?.presets?.[this.presetIndex];if(!n)throw new Error(`Preset at index ${this.presetIndex} not found`);this.insertedBlock={type:this.blockType,id:this.blockId,name:n.name,properties:this.properties,children:[],parentId:void 0},this.page.blocks[this.blockId]=this.insertedBlock,this.createdBlockIds.push(this.blockId),n.children&&n.children.length>0&&(this.insertedBlock.children=this.createChildrenFromPreset(n.children,this.blockId))}if(!this.insertedBlock)throw new Error("Failed to create block");if(this.parentId){const n=this.page.blocks[this.parentId];if(!n)throw new Error(`Parent block not found: ${this.parentId}`);this.insertedBlock.parentId=n.id,this.index!==void 0&&this.index>=0&&this.index<=n.children.length?(n.children.splice(this.index,0,this.blockId),this.actualIndex=this.index):(n.children.push(this.blockId),this.actualIndex=n.children.length-1)}else{const n=this.regionId||ut(this.page.regions[0]);let r=this.page.regions.find(o=>ut(o)===n);r||(r={id:n,name:n,blocks:[]},this.page.regions.push(r)),this.index!==void 0&&this.index>=0&&this.index<=r.blocks.length?(r.blocks.splice(this.index,0,this.blockId),this.actualIndex=this.index):(r.blocks.push(this.blockId),this.actualIndex=r.blocks.length-1)}this.emit("block:insert",{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId,index:this.actualIndex,regionId:this.regionId||ut(this.page.regions[0])})}revert(){if(this.insertedBlock){for(const t of this.createdBlockIds)delete this.page.blocks[t];if(this.parentId){const t=this.page.blocks[this.parentId];t&&this.actualIndex!==void 0&&t.children.splice(this.actualIndex,1)}else{const t=this.regionId||ut(this.page.regions[0]),n=this.page.regions.find(r=>ut(r)===t);n&&this.actualIndex!==void 0&&n.blocks.splice(this.actualIndex,1)}this.emit("block:remove",{blockId:this.blockId,block:this.insertedBlock,parentId:this.parentId})}}getBlockId(){return this.blockId}getInsertedBlock(){return this.insertedBlock}createChildrenFromPreset(t,n){const r=[];for(const o of t){const i=sp(),s=this.blocksManager.get(o.type);if(!s){console.warn(`Block type '${o.type}' not found, skipping child`);continue}const a=this.buildProperties(s,o.properties),l={type:o.type,id:i,name:o.name||s.meta?.name||o.type,semanticId:o.semanticId||o.id,properties:a,children:[],parentId:n,static:o.static,disabled:o.disabled,repeated:o.repeated,ghost:o.ghost};this.page.blocks[i]=l,this.createdBlockIds.push(i),o.children&&o.children.length>0&&(l.children=this.createChildrenFromPreset(o.children,i)),r.push(i)}return r}buildProperties(t,n){const r={};if(t?.properties)for(const o of t.properties)o.default!==void 0&&(r[o.id]=o.default);return n&&Object.assign(r,n),r}},oH=class{page;blockId;removedBlock;originalIndex;originalParentId;regionId;emit;constructor(t,n){this.page=t,this.blockId=n.blockId,this.emit=n.emit}apply(){if(this.removedBlock=this.page.blocks[this.blockId],!this.removedBlock)throw new Error(`Block not found: ${this.blockId}`);if(this.originalParentId=this.removedBlock.parentId,this.originalParentId){const t=this.page.blocks[this.originalParentId];t&&(this.originalIndex=t.children.indexOf(this.blockId),this.originalIndex!==-1&&t.children.splice(this.originalIndex,1))}else{const t=this.page.regions.find(n=>n.blocks.includes(this.blockId));t&&(this.originalIndex=t.blocks.indexOf(this.blockId),this.regionId=ut(t),t.blocks.splice(this.originalIndex,1))}delete this.page.blocks[this.blockId],this.emit("block:remove",{blockId:this.blockId,block:this.removedBlock,parentId:this.originalParentId})}revert(){if(!(!this.removedBlock||this.originalIndex===void 0)){if(this.page.blocks[this.blockId]=this.removedBlock,this.originalParentId){const t=this.page.blocks[this.originalParentId];t&&t.children.splice(this.originalIndex,0,this.blockId)}else if(this.regionId){const t=this.page.regions.find(n=>ut(n)===this.regionId);t&&t.blocks.splice(this.originalIndex,0,this.blockId)}this.emit("block:insert",{blockId:this.blockId,block:this.removedBlock,parentId:this.originalParentId,index:this.originalIndex,regionId:this.regionId})}}getBlockId(){return this.blockId}getRemovedBlock(){return this.removedBlock}},iH=class{page;blockId;targetParentId;targetIndex;targetRegionId;blockToMove;originalParentId;originalIndex;originalRegionId;emit;constructor(t,n){this.page=t,this.blockId=n.blockId,this.targetParentId=n.targetParentId,this.targetIndex=n.targetIndex,this.targetRegionId=n.targetRegionId,this.emit=n.emit}apply(){if(this.blockToMove=this.page.blocks[this.blockId],!this.blockToMove)throw new Error(`Block not found: ${this.blockId}`);if(this.targetParentId&&!this.page.blocks[this.targetParentId])throw new Error(`Target parent not found: ${this.targetParentId}`);if(this.originalParentId=this.blockToMove.parentId,this.originalParentId){const t=this.page.blocks[this.originalParentId];t&&(this.originalIndex=t.children.indexOf(this.blockId),this.originalIndex!==-1&&t.children.splice(this.originalIndex,1))}else{const t=this.page.regions.find(n=>n.blocks.includes(this.blockId));t&&(this.originalIndex=t.blocks.indexOf(this.blockId),this.originalRegionId=ut(t),t.blocks.splice(this.originalIndex,1))}if(this.targetParentId){const t=this.page.blocks[this.targetParentId];this.blockToMove.parentId=this.targetParentId,this.targetIndex!==void 0&&this.targetIndex>=0&&this.targetIndex<=t.children.length?t.children.splice(this.targetIndex,0,this.blockId):t.children.push(this.blockId)}else{this.blockToMove.parentId=void 0;const t=this.targetRegionId||ut(this.page.regions[0])||"main";let n=this.page.regions.find(r=>ut(r)===t);n||(n={id:t,name:t,blocks:[]},this.page.regions.push(n)),this.targetIndex!==void 0&&this.targetIndex>=0&&this.targetIndex<=n.blocks.length?n.blocks.splice(this.targetIndex,0,this.blockId):n.blocks.push(this.blockId)}this.emit("block:move",{blockId:this.blockId,targetParentId:this.targetParentId,targetIndex:this.targetIndex,targetRegionId:this.targetRegionId,sourceParentId:this.originalParentId||null,sourceRegionId:this.originalRegionId||null,sourceIndex:this.originalIndex})}revert(){if(!(!this.blockToMove||this.originalIndex===void 0)){if(this.blockToMove.parentId){const t=this.page.blocks[this.blockToMove.parentId];if(t){const n=t.children.indexOf(this.blockId);n!==-1&&t.children.splice(n,1)}}else{const t=this.page.regions.find(n=>n.blocks.includes(this.blockId));if(t){const n=t.blocks.indexOf(this.blockId);n!==-1&&t.blocks.splice(n,1)}}if(this.blockToMove.parentId=this.originalParentId,this.originalParentId){const t=this.page.blocks[this.originalParentId];t&&t.children.splice(this.originalIndex,0,this.blockId)}else if(this.originalRegionId){const t=this.page.regions.find(n=>ut(n)===this.originalRegionId);t&&t.blocks.splice(this.originalIndex,0,this.blockId)}this.emit("block:move",{blockId:this.blockId,targetParentId:this.originalParentId,targetIndex:this.originalIndex,targetRegionId:this.originalRegionId,sourceParentId:this.targetParentId||null,sourceRegionId:this.targetRegionId||null,sourceIndex:this.targetIndex||0})}}getBlockId(){return this.blockId}getTargetParentId(){return this.targetParentId}getTargetIndex(){return this.targetIndex}getTargetRegionId(){return this.targetRegionId}getSourceParentId(){return this.originalParentId||null}getSourceRegionId(){return this.originalRegionId||null}getSourceIndex(){return this.originalIndex}},sH=class{page;blockId;targetDisabled;originalDisabled;block;emit;constructor(t,n){this.page=t,this.blockId=n.blockId,this.targetDisabled=n.disabled,this.emit=n.emit}apply(){if(this.block=this.page.blocks[this.blockId],!this.block)throw new Error(`Block not found: ${this.blockId}`);this.originalDisabled=this.block.disabled,this.targetDisabled!==void 0?this.block.disabled=this.targetDisabled:this.block.disabled=!this.block.disabled,this.emit("block:toggle",{blockId:this.blockId,disabled:this.block.disabled??!1,oldValue:this.originalDisabled})}revert(){this.block&&(this.originalDisabled!==void 0?this.block.disabled=this.originalDisabled:this.block.disabled=!this.block.disabled,this.emit("block:toggle",{blockId:this.blockId,disabled:this.block.disabled??!1,oldValue:this.targetDisabled!==void 0?this.targetDisabled:!this.originalDisabled}))}getBlockId(){return this.blockId}getOriginalDisabled(){return this.originalDisabled}getNewDisabled(){return this.block?.disabled}},aH=class{page;blockId;propertyKey;propertyValue;originalValue;block;emit;constructor(t,n){this.page=t,this.blockId=n.blockId,this.propertyKey=n.propertyKey,this.propertyValue=n.propertyValue,this.emit=n.emit}apply(){if(this.block=this.page.blocks[this.blockId],!this.block)throw new Error(`Block not found: ${this.blockId}`);this.block.properties||(this.block.properties={}),this.originalValue=this.block.properties[this.propertyKey],this.block.properties[this.propertyKey]=this.propertyValue,this.emit("block:property:set",{blockId:this.blockId,key:this.propertyKey,value:this.propertyValue,oldValue:this.originalValue})}revert(){!this.block||!this.block.properties||(this.originalValue!==void 0?this.block.properties[this.propertyKey]=this.originalValue:delete this.block.properties[this.propertyKey],this.emit("block:property:set",{blockId:this.blockId,key:this.propertyKey,value:this.originalValue,oldValue:this.propertyValue}))}getBlockId(){return this.blockId}getPropertyKey(){return this.propertyKey}getPropertyValue(){return this.propertyValue}getOriginalValue(){return this.originalValue}},lH=class{page;blockId;duplicatedBlockId;duplicatedBlock;parentId;insertIndex;regionId;emit;constructor(t,n){this.page=t,this.blockId=n.blockId,this.emit=n.emit}apply(){const t=this.page.blocks[this.blockId];if(!t)throw new Error(`Block not found: ${this.blockId}`);this.duplicatedBlockId=sp(),this.duplicatedBlock=this.cloneBlockWithNewIds(t,this.duplicatedBlockId,t.parentId),this.determineInsertLocation(),this.insertDuplicatedBlock(),this.emit("block:duplicate",{originalBlockId:this.blockId,newBlockId:this.duplicatedBlockId,newBlock:this.duplicatedBlock,parentId:this.parentId||void 0,index:this.insertIndex,regionId:this.regionId||void 0})}revert(){!this.duplicatedBlock||!this.duplicatedBlockId||this.removeDuplicatedBlock()}getBlockId(){return this.blockId}getDuplicatedBlockId(){return this.duplicatedBlockId}getDuplicatedBlock(){return this.duplicatedBlock}getParentId(){return this.parentId}getInsertIndex(){return this.insertIndex}getRegionId(){return this.regionId}cloneBlockWithNewIds(t,n,r){const o={...structuredClone(t),id:n,parentId:r,children:[]};if(t.children&&t.children.length>0)for(const i of t.children){const s=this.page.blocks[i];if(s){const a=sp();this.cloneBlockWithNewIds(s,a,n),o.children.push(a)}}return this.page.blocks[n]=o,o}determineInsertLocation(){const t=this.page.blocks[this.blockId];if(!t)throw new Error(`Block not found: ${this.blockId}`);if(this.parentId=t.parentId||null,this.parentId){const n=this.page.blocks[this.parentId];if(n){const r=n.children.indexOf(this.blockId);this.insertIndex=r!==-1?r+1:n.children.length}else this.insertIndex=0}else{const n=this.page.regions.find(r=>r.blocks.includes(this.blockId));if(n){const r=n.blocks.indexOf(this.blockId);this.regionId=ut(n),this.insertIndex=r+1}else this.regionId=ut(this.page.regions[0])||"main",this.insertIndex=this.page.regions[0].blocks.length||0}}insertDuplicatedBlock(){if(this.duplicatedBlock)if(this.parentId){const t=this.page.blocks[this.parentId];if(!t)throw new Error(`Parent block not found: ${this.parentId}`);t.children.splice(this.insertIndex,0,this.duplicatedBlockId)}else{let t=this.page.regions.find(n=>n.name===this.regionId);t||(t={name:this.regionId||"main",blocks:[]},this.page.regions.push(t)),t.blocks.splice(this.insertIndex,0,this.duplicatedBlockId)}}removeDuplicatedBlock(){if(this.duplicatedBlockId){if(this.removeBlockAndChildren(this.duplicatedBlockId),this.parentId){const t=this.page.blocks[this.parentId];if(t){const n=t.children.indexOf(this.duplicatedBlockId);n!==-1&&t.children.splice(n,1)}}else if(this.page.regions){const t=this.page.regions.find(n=>n.name===this.regionId);if(t){const n=t.blocks.indexOf(this.duplicatedBlockId);n!==-1&&t.blocks.splice(n,1)}}}}removeBlockAndChildren(t){const n=this.page.blocks[t];if(n){for(const r of n.children)this.removeBlockAndChildren(r);delete this.page.blocks[t]}}},cH=class{page;blockId;newName;oldName;block;emit;constructor(t,n){if(this.page=t,this.blockId=n.blockId,this.newName=n.name,this.emit=n.emit,this.block=this.page.blocks[this.blockId],!this.block)throw new Error(`Block not found: ${this.blockId}`);this.oldName=this.block.name}apply(){if(!this.block)throw new Error(`Block not found: ${this.blockId}`);this.block.name=this.newName,this.emit("block:update",{blockId:this.blockId,block:this.block,property:"name",value:this.newName,oldValue:this.oldName})}revert(){this.block&&(this.block.name=this.oldName,this.emit("block:update",{blockId:this.blockId,block:this.block,property:"name",value:this.oldName,oldValue:this.newName}))}},Qy=class extends d2{page;blocksManager;historyManager;constructor(t={}){super(),this.blocksManager=t.blocksManager||new tH,this.historyManager=new nH,this.setPage(t.page?t.page:{blocks:{},regions:[{id:"main",name:"main",blocks:[]}]}),t.blockSchemas&&t.blockSchemas.length>0&&t.blockSchemas.forEach(n=>{this.blocksManager.register(n.type,n)})}insertBlock(t,n){const r=this.blocksManager.get(t);if(!r)throw new Error(`Block type '${t}' is not registered`);if(n?.parentId){const i=this.page.blocks[n.parentId];if(!i)throw new Error(`Parent block not found: ${n.parentId}`);if(!this.blocksManager.canBeChild(t,i.type))throw new Error(`Block type '${t}' cannot be a child of '${i.type}'`)}const o=new rH(this.page,{blockType:t,parentId:n?.parentId,regionId:n?.regionId,index:n?.index,blockSchema:r,emit:this.emit.bind(this)});return o.apply(),this.historyManager.addCommand(o),o.getBlockId()}insertBlockFromPreset(t,n,r){const o=this.blocksManager.get(t);if(!o)throw new Error(`Block type '${t}' is not registered`);if(!o.presets||!o.presets[n])throw new Error(`Preset at index ${n} not found for block type '${t}'`);if(r?.parentId){const s=this.page.blocks[r.parentId];if(!s)throw new Error(`Parent block not found: ${r.parentId}`);if(!this.blocksManager.canBeChild(t,s.type))throw new Error(`Block type '${t}' cannot be a child of '${s.type}'`)}const i=new Qk(this.page,{blockType:t,presetIndex:n,parentId:r?.parentId,regionId:r?.regionId,index:r?.index,blocksManager:this.blocksManager,emit:this.emit.bind(this)});return i.apply(),this.historyManager.addCommand(i),i.getBlockId()}removeBlock(t){const n=new oH(this.page,{blockId:t,emit:this.emit.bind(this)});n.apply(),this.historyManager.addCommand(n)}moveBlock(t,n){const r=this.page.blocks[t];if(n?.targetParentId){const i=this.page.blocks[n.targetParentId];if(!i)throw new Error(`Target parent block not found: ${n.targetParentId}`);if(!this.blocksManager.canBeChild(r.type,i.type))throw new Error(`Block type '${r.type}' cannot be a child of '${i.type}'`)}const o=new iH(this.page,{blockId:t,targetParentId:n?.targetParentId,targetIndex:n?.targetIndex,targetRegionId:n?.targetRegionId,emit:this.emit.bind(this)});o.apply(),this.historyManager.addCommand(o)}toggleBlock(t,n){const r=new sH(this.page,{blockId:t,disabled:n,emit:this.emit.bind(this)});r.apply(),this.historyManager.addCommand(r)}setBlockProperty(t,n,r){const o=new aH(this.page,{blockId:t,propertyKey:n,propertyValue:r,emit:this.emit.bind(this)});o.apply(),this.historyManager.addCommand(o)}setBlockName(t,n){const r=new cH(this.page,{blockId:t,name:n,emit:this.emit.bind(this)});r.apply(),this.historyManager.addCommand(r)}duplicateBlock(t){const n=new lH(this.page,{blockId:t,emit:this.emit.bind(this)});return n.apply(),this.historyManager.addCommand(n),n.getDuplicatedBlockId()}getBlockById(t){return this.page.blocks[t]}exportBlockAsNestedStructure(t){const n=this.page.blocks[t];if(!n)throw new Error(`Block not found: ${t}`);const r={type:n.type,id:n.id,semanticId:n.semanticId,properties:structuredClone(n.properties),name:n.name,static:n.static,disabled:n.disabled,repeated:n.repeated,children:[]};return n.children&&n.children.length>0&&(r.children=n.children.map(o=>this.exportBlockAsNestedStructure(o))),r}pasteBlock(t,n){if(!this.blocksManager.get(t.type))throw new Error(`Block type '${t.type}' is not registered`);if(n?.parentId){const o=this.page.blocks[n.parentId];if(!o)throw new Error(`Parent block not found: ${n.parentId}`);if(!this.blocksManager.canBeChild(t.type,o.type))throw new Error(`Block type '${t.type}' cannot be a child of '${o.type}'`)}const r=new Qk(this.page,{blockType:t.type,presetData:t,parentId:n?.parentId,regionId:n?.regionId,index:n?.index,blocksManager:this.blocksManager,emit:this.emit.bind(this)});return r.apply(),this.historyManager.addCommand(r),r.getBlockId()}getPage(){return structuredClone(this.page)}setPage(t){const n=structuredClone(this.page);this.page=structuredClone(t),this.page.regions.length===0&&(this.page.regions=[{id:"main",name:"main",blocks:Object.keys(this.page.blocks)}]),this.page.regions.length===0&&(this.page.regions=[{id:"main",name:"main",blocks:Object.values(this.page.blocks).filter(r=>!r.parentId).map(r=>r.id)}]),this.initializeParentChildRelationships(),this.historyManager.clear(),this.emit("page:set",{previousPage:n,newPage:structuredClone(this.page)})}getBlocksManager(){return this.blocksManager}getBlockSchemas(){return this.blocksManager.getAll()}getBlockSchema(t){return this.blocksManager.get(t)}undo(){const t=this.historyManager.undo();return t!==null&&this.emit("undo",{command:t}),t!==null}redo(){const t=this.historyManager.redo();return t!==null&&this.emit("redo",{command:t}),t!==null}canUndo(){return this.historyManager.canUndo()}canRedo(){return this.historyManager.canRedo()}initializeParentChildRelationships(){const t=n=>{n.children&&n.children.length>0&&n.children.forEach(r=>{const o=this.page.blocks[r];o&&(o.parentId||(o.parentId=n.id),t(o))})};Object.values(this.page.blocks).forEach(t)}};const Gp=P({__name:"RenderFunctionWrapper",props:{renderFn:{type:Function}},setup(e){const t=dt(Qt),n=e,r=Q(),o=()=>{if(!r.value||!n.renderFn)return;r.value.innerHTML="";const i=n.renderFn({editor:t});r.value.appendChild(i)};return Je(()=>{o()}),st(()=>n.renderFn,()=>{o()}),(i,s)=>(y(),V("div",{ref_key:"containerRef",ref:r},null,512))}}),uH={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function dH(e,t){return y(),V("svg",uH,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6 18L18 6M6 6l12 12"},null,-1)])])}const Sx=fe({name:"heroicons-x-mark",render:dH}),[p2,Wp]=Rt("AccordionContext"),pH=P({__name:"accordion-context",setup(e){const t=Wp();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[f2,qp]=Rt("CollapsibleContext"),fH=P({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=qp();return se(),(n,r)=>d(t).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getContentProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),hH=P({__name:"collapsible-context",setup(e){const t=qp();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),gH=P({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return f2(n),se(),(r,o)=>(y(),$(d(he).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var mH=ar("collapsible").parts("root","trigger","content","indicator"),Nf=mH.build(),vH=e=>e.ids?.root??`collapsible:${e.id}`,e0=e=>e.ids?.content??`collapsible:${e.id}:content`,bH=e=>e.ids?.trigger??`collapsible:${e.id}:trigger`,Mf=e=>e.getById(e0(e));function yH(e,t){const{state:n,send:r,context:o,scope:i,prop:s}=e,a=n.matches("open")||n.matches("closing"),l=n.matches("open"),{width:c,height:u}=o.get("size"),p=!!s("disabled"),h=!o.get("initial")&&l,f="ltr";return{disabled:p,visible:a,open:l,measureSize(){r({type:"size.measure"})},setOpen(g){n.matches("open")!==g&&r({type:g?"open":"close"})},getRootProps(){return t.element({...Nf.root.attrs,"data-state":l?"open":"closed",dir:f,id:vH(i)})},getContentProps(){return t.element({...Nf.content.attrs,"data-collapsible":"","data-state":h?void 0:l?"open":"closed",id:e0(i),"data-disabled":_e(p),hidden:!a,style:{"--height":u!=null?`${u}px`:void 0,"--width":c!=null?`${c}px`:void 0}})},getTriggerProps(){return t.element({...Nf.trigger.attrs,id:bH(i),dir:f,type:"button","data-state":l?"open":"closed","data-disabled":_e(p),"aria-controls":e0(i),"aria-expanded":a||!1,onClick(g){g.defaultPrevented||p||r({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...Nf.indicator.attrs,dir:f,"data-state":l?"open":"closed","data-disabled":_e(p)})}}}var xH={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const r=Ke(()=>{const o=Mf(t);if(!o)return;const i=Vc(o).animationName;if(!i||i==="none"){e({type:"animation.end"});return}const s=a=>{Xt(a)===o&&e({type:"animation.end"})};o.addEventListener("animationend",s),n=()=>{o.removeEventListener("animationend",s)}});return()=>{r(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const r=Ke(()=>{const o=Mf(t);if(!o)return;const i=Vc(o).animationName;if(!i||i==="none"){e({type:"animation.end"});return}const s=l=>{Xt(l)===o&&e({type:"animation.end"})};o.addEventListener("animationend",s);const a=np(o,{animationFillMode:"forwards"});n=()=>{o.removeEventListener("animationend",s),gx(()=>a())}});return()=>{r(),n?.()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=Mf(t);if(!n)return;const{height:r,width:o}=n.getBoundingClientRect();e.set("size",{height:r,width:o})},computeSize:({refs:e,scope:t,context:n})=>{e.get("cleanup")?.();const r=Ke(()=>{const o=Mf(t);if(!o)return;const i=o.hidden;o.style.animationName="none",o.style.animationDuration="0s",o.hidden=!1;const s=o.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(o.style.animationName="",o.style.animationDuration=""),o.hidden=i});e.set("cleanup",r)},invokeOnOpen:({prop:e})=>{e("onOpenChange")?.({open:!0})},invokeOnClose:({prop:e})=>{e("onOpenChange")?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};sn()(["dir","disabled","getRootNode","id","ids","onExitComplete","onOpenChange","defaultOpen","open"]);const wH=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const c=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...ra(c),onExitComplete:()=>{t?.("exitComplete"),c.onExitComplete?.()},onOpenChange:u=>{t?.("openChange",u),t?.("update:open",u.open),c.onOpenChange?.(u)}}}),s=wo(xH,i),a=A(()=>yH(s,ii)),l=Q(!1);return st(()=>a.value.visible,()=>{a.value.visible&&(l.value=!0)}),A(()=>{const c=pe(e);return{...a.value,unmounted:!a.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!a.value.visible&&l.value}})},_H=P({__name:"collapsible-root",props:Ze({defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const n=wH(e,t);return f2(n),se(),(r,o)=>(y(),$(d(he).div,F(d(n).getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),kH=P({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=qp();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),CH=P({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=qp();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),h2=Object.freeze(Object.defineProperty({__proto__:null,Content:fH,Context:hH,Indicator:CH,Root:_H,RootProvider:gH,Trigger:kH},Symbol.toStringTag,{value:"Module"})),EH=()=>(e,t)=>t.reduce((n,r)=>{const[o,i]=n,s=r;return i[s]!==void 0&&(o[s]=i[s]),delete i[s],[o,i]},[{},{...e}]),[OH,Px]=Rt("AccordionItemPropsContext"),IH=P({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=EH(),n=Wp(),r=Px(),o=A(()=>{const i=n.value.getItemContentProps(r),[,s]=t(i,["hidden","data-state"]);return s});return se(),(i,s)=>(y(),$(d(h2).Content,F(o.value,{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),[TH,SH]=Rt("AccordionItemContext"),PH=P({__name:"accordion-item-context",setup(e){const t=SH();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),$H=P({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Wp(),n=Px();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),RH=P({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Wp(),n=Px(),r=qp(),o=A(()=>{const{"aria-controls":i,...s}=t.value.getItemTriggerProps(n);return{...s,...r.value.unmounted?{}:{"aria-controls":i}}});return se(),(i,s)=>(y(),$(d(he).button,F(o.value,{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),AH=P({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Wp(),n=e,r=A(()=>t.value.getItemState(n)),o=oa(),i=A(()=>t.value.getItemContentProps(n));return TH(r),OH(n),se(),(s,a)=>(y(),$(d(h2).Root,F(d(t).getItemProps(n),{open:r.value.expanded,"lazy-mount":d(o).lazyMount,"unmount-on-exit":d(o).unmountOnExit,ids:{content:i.value.id}}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),NH=P({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return p2(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>(y(),$(d(he).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var MH=ar("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),Au=MH.build(),vg=e=>e.ids?.root??`accordion:${e.id}`,DH=(e,t)=>e.ids?.item?.(t)??`accordion:${e.id}:item:${t}`,eC=(e,t)=>e.ids?.itemContent?.(t)??`accordion:${e.id}:content:${t}`,bg=(e,t)=>e.ids?.itemTrigger?.(t)??`accordion:${e.id}:trigger:${t}`,LH=e=>e.getById(vg(e)),Jm=e=>{const t=`[aria-controls][data-ownedby='${CSS.escape(vg(e))}']:not([disabled])`;return vx(LH(e),t)},VH=e=>ax(Jm(e)),FH=e=>lx(Jm(e)),BH=(e,t)=>NP(Jm(e),bg(e,t)),HH=(e,t)=>MP(Jm(e),bg(e,t));function zH(e,t){const{send:n,context:r,prop:o,scope:i,computed:s}=e,a=r.get("focusedValue"),l=r.get("value"),c=o("multiple");function u(h){let f=h;!c&&f.length>1&&(f=[f[0]]),n({type:"VALUE.SET",value:f})}function p(h){return{expanded:l.includes(h.value),focused:a===h.value,disabled:!!(h.disabled??o("disabled"))}}return{focusedValue:a,value:l,setValue:u,getItemState:p,getRootProps(){return t.element({...Au.root.attrs,dir:o("dir"),id:vg(i),"data-orientation":o("orientation")})},getItemProps(h){const f=p(h);return t.element({...Au.item.attrs,dir:o("dir"),id:DH(i,h.value),"data-state":f.expanded?"open":"closed","data-focus":_e(f.focused),"data-disabled":_e(f.disabled),"data-orientation":o("orientation")})},getItemContentProps(h){const f=p(h);return t.element({...Au.itemContent.attrs,dir:o("dir"),role:"region",id:eC(i,h.value),"aria-labelledby":bg(i,h.value),hidden:!f.expanded,"data-state":f.expanded?"open":"closed","data-disabled":_e(f.disabled),"data-focus":_e(f.focused),"data-orientation":o("orientation")})},getItemIndicatorProps(h){const f=p(h);return t.element({...Au.itemIndicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":_e(f.disabled),"data-focus":_e(f.focused),"data-orientation":o("orientation")})},getItemTriggerProps(h){const{value:f}=h,g=p(h);return t.button({...Au.itemTrigger.attrs,type:"button",dir:o("dir"),id:bg(i,f),"aria-controls":eC(i,f),"aria-expanded":g.expanded,disabled:g.disabled,"data-orientation":o("orientation"),"aria-disabled":g.disabled,"data-state":g.expanded?"open":"closed","data-ownedby":vg(i),onFocus(){g.disabled||n({type:"TRIGGER.FOCUS",value:f})},onBlur(){g.disabled||n({type:"TRIGGER.BLUR"})},onClick(m){g.disabled||(px()&&m.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:f}))},onKeyDown(m){if(m.defaultPrevented||g.disabled)return;const b={ArrowDown(){s("isHorizontal")||n({type:"GOTO.NEXT",value:f})},ArrowUp(){s("isHorizontal")||n({type:"GOTO.PREV",value:f})},ArrowRight(){s("isHorizontal")&&n({type:"GOTO.NEXT",value:f})},ArrowLeft(){s("isHorizontal")&&n({type:"GOTO.PREV",value:f})},Home(){n({type:"GOTO.FIRST",value:f})},End(){n({type:"GOTO.LAST",value:f})}},w=Fc(m,{dir:o("dir"),orientation:o("orientation")}),E=b[w];E&&(E(m),m.preventDefault())}})}}}var{and:UH,not:jH}=ru(),GH={props({props:e}){return{collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){e("onFocusChange")?.({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){e("onValueChange")?.({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:UH("isExpanded","canToggle"),actions:["collapse"]},{guard:jH("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){const r=t("multiple")?pP(e.get("value"),n.value):[];e.set("value",r)},expand({context:e,prop:t,event:n}){const r=t("multiple")?dP(e.get("value"),n.value):[n.value];e.set("value",r)},focusFirstTrigger({scope:e}){VH(e)?.focus()},focusLastTrigger({scope:e}){FH(e)?.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");n&&BH(t,n)?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");n&&HH(t,n)?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(Lc("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};sn()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);sn()(["value","disabled"]);const WH=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:a.modelValue,...ra(a),onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a?.onValueChange?.(l)}}}),s=wo(GH,i);return A(()=>zH(s,ii))},qH=P({__name:"accordion-root",props:Ze({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,r=WH(n,t);return p2(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>(y(),$(d(he).div,F(d(r).getRootProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Ho=Object.freeze(Object.defineProperty({__proto__:null,Context:pH,Item:AH,ItemContent:IH,ItemContext:PH,ItemIndicator:$H,ItemTrigger:RH,Root:qH,RootProvider:NH},Symbol.toStringTag,{value:"Module"}));var nd=(e,t)=>({x:e,y:t});function KH(e){const{x:t,y:n,width:r,height:o}=e,i=t+r/2,s=n+o/2;return{x:t,y:n,width:r,height:o,minX:t,minY:n,maxX:t+r,maxY:n+o,midX:i,midY:s,center:nd(i,s)}}function YH(e){const t=nd(e.minX,e.minY),n=nd(e.maxX,e.minY),r=nd(e.maxX,e.maxY),o=nd(e.minX,e.maxY);return{top:t,right:n,bottom:r,left:o}}function XH(e,t){const n=KH(e),{top:r,right:o,left:i,bottom:s}=YH(n),[a]=t.split("-");return{top:[i,r,o,s],right:[r,o,s,i],bottom:[r,i,s,o],left:[o,r,i,s]}[a]}function JH(e,t){const{x:n,y:r}=t;let o=!1;for(let i=0,s=e.length-1;ir!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(o=!o)}return o}var $l=new WeakMap,Df=new WeakMap,Lf={},mb=0,g2=e=>e&&(e.host||g2(e.parentNode)),ZH=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=g2(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),QH=new Set(["script","output","status","next-route-announcer"]),e7=e=>QH.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),t7=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o}=t,i=ZH(n,Array.isArray(e)?e:[e]);Lf[r]||(Lf[r]=new WeakMap);const s=Lf[r],a=[],l=new Set,c=new Set(i),u=h=>{!h||l.has(h)||(l.add(h),u(h.parentNode))};i.forEach(u);const p=h=>{!h||c.has(h)||Array.prototype.forEach.call(h.children,f=>{if(l.has(f))p(f);else try{if(e7(f))return;const g=f.getAttribute(o)==="true",m=($l.get(f)||0)+1,b=(s.get(f)||0)+1;$l.set(f,m),s.set(f,b),a.push(f),m===1&&g&&Df.set(f,!0),b===1&&f.setAttribute(r,""),g||f.setAttribute(o,"true")}catch(g){console.error("[zag-js > ariaHidden] cannot operate on ",f,g)}})};return p(n),l.clear(),mb++,()=>{a.forEach(h=>{const f=$l.get(h)-1,g=s.get(h)-1;$l.set(h,f),s.set(h,g),f||(Df.has(h)||h.removeAttribute(o),Df.delete(h)),g||h.removeAttribute(r)}),mb--,mb||($l=new WeakMap,$l=new WeakMap,Df=new WeakMap,Lf={})}},n7=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,r7=(e,t=n7(e),n="data-aria-hidden")=>{if(t)return t7(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden"})},o7=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function m2(e,t={}){const{defer:n=!0}=t,r=n?o7:i=>i(),o=[];return o.push(r(()=>{const i=(typeof e=="function"?e():e).filter(Boolean);i.length!==0&&o.push(r7(i))})),()=>{o.forEach(i=>i?.())}}const v2=P({__name:"presence",props:Ze({immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{immediate:void 0,lazyMount:void 0,present:void 0,skipAnimationOnMount:void 0,unmountOnExit:void 0}),emits:["exitComplete"],setup(e,{emit:t}){const n=au(e,t);return su(n),se(),(r,o)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(n).presenceProps,{"as-child":r.asChild,"data-scope":"presence","data-part":"root"}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[b2,ia]=Rt("DialogContext"),i7=P({__name:"dialog-backdrop",props:{asChild:{type:Boolean}},setup(e){const t=ia(),n=oa();return se(),(r,o)=>(y(),$(d(v2),F(d(t).getBackdropProps(),{present:d(t).open,"lazy-mount":d(n).lazyMount,"unmount-on-exit":d(n).unmountOnExit}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["present","lazy-mount","unmount-on-exit"]))}}),s7=P({__name:"dialog-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ia();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getCloseTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),a7=P({__name:"dialog-content",props:{asChild:{type:Boolean}},setup(e){const t=ia(),n=Up(),r=A(()=>fl(t.value.getContentProps(),n.value.presenceProps));return se(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),l7=P({__name:"dialog-context",setup(e){const t=ia();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),c7=P({__name:"dialog-description",props:{asChild:{type:Boolean}},setup(e){const t=ia();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getDescriptionProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),u7=P({__name:"dialog-positioner",props:{asChild:{type:Boolean}},setup(e){const t=ia(),n=oa(),r=au(A(()=>({...n.value,present:t.value.open})));return su(r),se(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),d7=P({__name:"dialog-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return b2(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>L(r.$slots,"default")}});var p7=Object.defineProperty,f7=(e,t,n)=>t in e?p7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>f7(e,typeof t!="symbol"?t+"":t,n),tC={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},h7=[],g7=class{constructor(t,n){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"listenerCleanups",[]),At(this,"handleFocus",o=>{const i=Xt(o),s=this.findContainerIndex(i,o)>=0;if(s||ux(i))s&&(this.state.mostRecentlyFocusedNode=i);else{o.stopImmediatePropagation();let a,l=!0;if(this.state.mostRecentlyFocusedNode)if(Iu(this.state.mostRecentlyFocusedNode)>0){const c=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:u}=this.state.containerGroups[c];if(u.length>0){const p=u.findIndex(h=>h===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1=0&&(a=u[p-1],l=!1))}}else this.state.containerGroups.some(c=>c.tabbableNodes.some(u=>Iu(u)>0))||(l=!1);else l=!1;l&&(a=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),a?this.tryFocus(a):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),At(this,"handlePointerDown",o=>{const i=Xt(o);if(!(this.findContainerIndex(i,o)>=0)){if(Mu(this.config.clickOutsideDeactivates,o)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Mu(this.config.allowOutsideClick,o)||o.preventDefault()}}),At(this,"handleClick",o=>{const i=Xt(o);this.findContainerIndex(i,o)>=0||Mu(this.config.clickOutsideDeactivates,o)||Mu(this.config.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())}),At(this,"handleTabKey",o=>{if(this.config.isKeyForward(o)||this.config.isKeyBackward(o)){this.state.recentNavEvent=o;const i=this.config.isKeyBackward(o),s=this.findNextNavNode({event:o,isBackward:i});if(!s)return;Nu(o)&&o.preventDefault(),this.tryFocus(s)}}),At(this,"handleEscapeKey",o=>{m7(o)&&Mu(this.config.escapeDeactivates,o)!==!1&&(o.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const o=this.doc.defaultView||window;this._mutationObserver=new o.MutationObserver(i=>{i.some(s=>Array.from(s.removedNodes).some(a=>a===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),At(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(o=>{this._mutationObserver?.observe(o,{subtree:!0,childList:!0})})}),At(this,"getInitialFocusNode",()=>{let o=this.getNodeForOption("initialFocus",{hasFallback:!0});if(o===!1)return!1;if(o===void 0||o&&!As(o)){const i=kc(this.doc);if(i&&this.findContainerIndex(i)>=0)o=i;else{const s=this.state.tabbableGroups[0];o=s&&s.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else o===null&&(o=this.getNodeForOption("fallbackFocus"));if(!o)throw new Error("Your focus-trap needs to have at least one focusable element");return o.isConnected||(o=this.getNodeForOption("fallbackFocus")),o}),At(this,"tryFocus",o=>{if(o!==!1&&o!==kc(this.doc)){if(!o||!o.focus){this.tryFocus(this.getInitialFocusNode());return}o.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=o,v7(o)&&o.select()}}),At(this,"deactivate",o=>{if(!this.state.active)return this;const i={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...o};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),tC.deactivateTrap(this.trapStack,this);const s=this.getOption(i,"onDeactivate"),a=this.getOption(i,"onPostDeactivate"),l=this.getOption(i,"checkCanReturnFocus"),c=this.getOption(i,"returnFocus","returnFocusOnDeactivate");s?.();const u=()=>{nC(()=>{if(c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}a?.()})};if(c&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(u,u),this}return u(),this}),At(this,"pause",o=>{if(this.state.paused||!this.state.active)return this;const i=this.getOption(o,"onPause"),s=this.getOption(o,"onPostPause");return this.state.paused=!0,i?.(),this.removeListeners(),this.updateObservedNodes(),s?.(),this}),At(this,"unpause",o=>{if(!this.state.paused||!this.state.active)return this;const i=this.getOption(o,"onUnpause"),s=this.getOption(o,"onPostUnpause");return this.state.paused=!1,i?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s?.(),this}),At(this,"updateContainerElements",o=>(this.state.containers=Array.isArray(o)?o.filter(Boolean):[o].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",o=>{const i=this.getNodeForOption("setReturnFocus",{params:[o]});return i||(i===!1?!1:o)}),At(this,"getOption",(o,i,s)=>o&&o[i]!==void 0?o[i]:this.config[s||i]),At(this,"getNodeForOption",(o,{hasFallback:i=!1,params:s=[]}={})=>{let a=this.config[o];if(typeof a=="function"&&(a=a(...s)),a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error(`\`${o}\` was specified but was not a node, or did not return a node`)}let l=a;if(typeof a=="string"){try{l=this.doc.querySelector(a)}catch(c){throw new Error(`\`${o}\` appears to be an invalid selector; error="${c.message}"`)}if(!l&&!i)throw new Error(`\`${o}\` as selector refers to no known node`)}return l}),At(this,"findNextNavNode",o=>{const{event:i,isBackward:s=!1}=o,a=o.target||Xt(i);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const c=this.findContainerIndex(a,i),u=c>=0?this.state.containerGroups[c]:void 0;if(c<0)s?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:h})=>a===h);if(p<0&&(u?.container===a||As(a)&&!xs(a)&&!u?.nextTabbableNode(a,!1))&&(p=c),p>=0){const h=p===0?this.state.tabbableGroups.length-1:p-1,f=this.state.tabbableGroups[h];l=Iu(a)>=0?f.lastTabbableNode:f.lastDomTabbableNode}else Nu(i)||(l=u?.nextTabbableNode(a,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:h})=>a===h);if(p<0&&(u?.container===a||As(a)&&!xs(a)&&!u?.nextTabbableNode(a))&&(p=c),p>=0){const h=p===this.state.tabbableGroups.length-1?0:p+1,f=this.state.tabbableGroups[h];l=Iu(a)>=0?f.firstTabbableNode:f.firstDomTabbableNode}else Nu(i)||(l=u?.nextTabbableNode(a))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=n.trapStack||h7;const r={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(o){return Nu(o)&&!o.shiftKey},isKeyBackward(o){return Nu(o)&&o.shiftKey},...n};this.doc=r.document||Pr(Array.isArray(t)?t[0]:t),this.config=r,this.updateContainerElements(t),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(t,n){const r=typeof n?.composedPath=="function"?n.composedPath():void 0;return this.state.containerGroups.findIndex(({container:o,tabbableNodes:i})=>o.contains(t)||r?.includes(o)||i.find(s=>s===t))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(t=>{const n=Hp(t),r=hx(t),o=n.length>0?n[0]:void 0,i=n.length>0?n[n.length-1]:void 0,s=r.find(u=>xs(u)),a=r.slice().reverse().find(u=>xs(u)),l=!!n.find(u=>Iu(u)>0);function c(u,p=!0){const h=n.indexOf(u);return h<0?p?r.slice(r.indexOf(u)+1).find(f=>xs(f)):r.slice(0,r.indexOf(u)).reverse().find(f=>xs(f)):n[h+(p?1:-1)]}return{container:t,tabbableNodes:n,focusableNodes:r,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:i,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(t=>t.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(t=>t.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return tC.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?nC(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(vn(this.doc,"focusin",this.handleFocus,!0),vn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),vn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),vn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),vn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),vn(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(t=>t()),this.listenerCleanups=[],this}activate(t){if(this.state.active)return this;const n=this.getOption(t,"onActivate"),r=this.getOption(t,"onPostActivate"),o=this.getOption(t,"checkCanFocusTrap");o||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=kc(this.doc),n?.();const i=()=>{o&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.()};return o?(o(this.state.containers.concat()).then(i,i),this):(i(),this)}},Nu=e=>e.key==="Tab",Mu=(e,...t)=>typeof e=="function"?e(...t):e,m7=e=>!e.isComposing&&e.key==="Escape",nC=e=>setTimeout(e,0),v7=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function y2(e,t={}){let n;const r=Ke(()=>{const o=typeof e=="function"?e():e;if(o){n=new g7(o,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o,...t,document:Pr(o)});try{n.activate()}catch{}}});return function(){n?.deactivate(),r()}}var vb="data-scroll-lock";function b7(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function x2(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:o}=t;if(o.hasAttribute(vb))return;const i=n.innerWidth-r.clientWidth;o.setAttribute(vb,"");const s=()=>f3(r,"--scrollbar-width",`${i}px`),a=b7(r),l=()=>np(o,{overflow:"hidden",[a]:`${i}px`}),c=()=>{const{scrollX:p,scrollY:h,visualViewport:f}=n,g=f?.offsetLeft??0,m=f?.offsetTop??0,b=np(o,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(m))}px`,left:`${-(p-Math.floor(g))}px`,right:"0",[a]:`${i}px`});return()=>{b?.(),n.scrollTo({left:p,top:h,behavior:"instant"})}},u=[s(),_P()?c():l()];return()=>{u.forEach(p=>p?.()),o.removeAttribute(vb)}}var y7=ar("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),ka=y7.build(),w2=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,_2=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,t0=e=>e.ids?.content??`dialog:${e.id}:content`,k2=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,n0=e=>e.ids?.title??`dialog:${e.id}:title`,r0=e=>e.ids?.description??`dialog:${e.id}:description`,C2=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,Vf=e=>e.getById(t0(e)),x7=e=>e.getById(w2(e)),w7=e=>e.getById(_2(e)),_7=e=>e.getById(k2(e)),k7=e=>e.getById(n0(e)),C7=e=>e.getById(r0(e)),E7=e=>e.getById(C2(e));function O7(e,t){const{state:n,send:r,context:o,prop:i,scope:s}=e,a=i("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&r({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...ka.trigger.attrs,dir:i("dir"),id:k2(s),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":t0(s),onClick(c){c.defaultPrevented||r({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...ka.backdrop.attrs,dir:i("dir"),hidden:!l,id:_2(s),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...ka.positioner.attrs,dir:i("dir"),id:w2(s),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){const c=o.get("rendered");return t.element({...ka.content.attrs,dir:i("dir"),role:i("role"),hidden:!l,id:t0(s),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":a||void 0,"aria-labelledby":a||!c.title?void 0:n0(s),"aria-describedby":c.description?r0(s):void 0})},getTitleProps(){return t.element({...ka.title.attrs,dir:i("dir"),id:n0(s)})},getDescriptionProps(){return t.element({...ka.description.attrs,dir:i("dir"),id:r0(s)})},getCloseTriggerProps(){return t.button({...ka.closeTrigger.attrs,dir:i("dir"),id:C2(s),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),r({type:"CLOSE"}))}})}}}var I7={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>E7(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return{role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Km(()=>Vf(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[_7(e)],onInteractOutside(r){n("onInteractOutside")?.(r),n("closeOnInteractOutside")||r.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(r){n("onEscapeKeyDown")?.(r),n("closeOnEscape")||r.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return x2(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?y2(()=>Vf(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:n=>t("finalFocusEl")?.()??n}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?m2(()=>[Vf(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Ke(()=>{e.set("rendered",{title:!!k7(t),description:!!C7(t)})})},syncZIndex({scope:e}){Ke(()=>{const t=Vf(e);if(!t)return;const n=Vc(t);[x7(e),w7(e)].forEach(r=>{r?.style.setProperty("--z-index",n.zIndex),r?.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};sn()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const T7=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...ra(e),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)},onEscapeKeyDown:l=>{t?.("escapeKeyDown",l),a.onEscapeKeyDown?.(l)},onFocusOutside:l=>{t?.("focusOutside",l),a.onFocusOutside?.(l)},onInteractOutside:l=>{t?.("interactOutside",l),a.onInteractOutside?.(l)},onPointerDownOutside:l=>{t?.("pointerDownOutside",l),a.onPointerDownOutside?.(l)},onRequestDismiss:l=>{t?.("requestDismiss",l),a.onRequestDismiss?.(l)}}}),s=wo(I7,i);return A(()=>O7(s,ii))},S7=P({__name:"dialog-root",props:Ze({"aria-label":{},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},preventScroll:{type:Boolean},restoreFocus:{type:Boolean},role:{},trapFocus:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,preventScroll:void 0,restoreFocus:void 0,trapFocus:void 0}),emits:["escapeKeyDown","focusOutside","interactOutside","openChange","pointerDownOutside","requestDismiss","update:open"],setup(e,{emit:t}){const n=e,r=T7(n,t);return b2(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>L(o.$slots,"default")}}),P7=P({__name:"dialog-title",props:{asChild:{type:Boolean}},setup(e){const t=ia();return se(),(n,r)=>(y(),$(d(he).h2,F(d(t).getTitleProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),$7=P({__name:"dialog-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ia();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ca=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:i7,CloseTrigger:s7,Content:a7,Context:l7,Description:c7,Positioner:u7,Root:S7,RootProvider:d7,Title:P7,Trigger:$7},Symbol.toStringTag,{value:"Module"})),R7=P({__name:"field-context",setup(e){const t=ai();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),A7=P({__name:"field-error-text",props:{asChild:{type:Boolean}},setup(e){const t=ai();return se(),(n,r)=>d(t).invalid?(y(),$(d(he).span,F({key:0},d(t).getErrorTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"])):Z("",!0)}}),N7=P({__name:"field-helper-text",props:{asChild:{type:Boolean}},setup(e){const t=ai();return se(),(n,r)=>(y(),$(d(he).span,F(d(t).getHelperTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),M7=P({__name:"field-input",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=ai(),r=t;return se(),(o,i)=>(y(),$(d(he).input,F(d(n).getInputProps(),{"as-child":o.asChild,value:o.modelValue,onInput:i[0]||(i[0]=s=>r("update:modelValue",s.target.value))}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child","value"]))}}),D7=P({__name:"field-label",props:{asChild:{type:Boolean}},setup(e){const t=ai();return se(),(n,r)=>(y(),$(d(he).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),L7=P({__name:"field-required-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ai();return se(),(n,r)=>d(t).required?(y(),$(d(he).span,F({key:0},d(t).getRequiredIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default",{},()=>[r[0]||(r[0]=re("*",-1))])]),_:3},16,["as-child"])):L(n.$slots,"fallback",{key:1})}}),V7=P({__name:"field-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return JP(n),se(),(r,o)=>(y(),$(d(he).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),F7=ar("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),ss=F7.build(),B7=(e={})=>{const t=_o(ko),n=Tr({hasErrorText:!1,hasHelperText:!1}),r=nt(),o=A(()=>pe(e).id??r),i=Q(null),s=A(()=>pe(e).ids?.control??`field::${o.value}`),a=A(()=>pe(e).ids?.errorText??`field::${o.value}::error-text`),l=A(()=>pe(e).ids?.helperText??`field::${o.value}::helper-text`),c=A(()=>pe(e).ids?.label??`field::${o.value}::label`);Je(()=>{const v=xx(i);if(!v)return;const _=()=>{const C=t.value.getRootNode();n.hasErrorText=!!C.getElementById(a.value),n.hasHelperText=!!C.getElementById(l.value)};_();const T=t.value.getWindow(),N=new T.MutationObserver(_);N.observe(v,{childList:!0,subtree:!0}),on(()=>{N.disconnect()})});const u=()=>{const v=pe(e);return{...ss.root.attrs,id:s.value,role:"group","data-disabled":_e(v.disabled),"data-invalid":_e(v.invalid),"data-readonly":_e(v.readOnly)}},p=()=>{const v=pe(e);return{...ss.label.attrs,id:c.value,"data-disabled":_e(v.disabled),"data-invalid":_e(v.invalid),"data-readonly":_e(v.readOnly),"data-required":_e(v.required),htmlFor:o.value}},h=A(()=>{const v=pe(e),_=[];return n.hasErrorText&&v.invalid&&_.push(a.value),n.hasHelperText&&_.push(l.value),_}),f=()=>{const v=pe(e);return{"aria-describedby":h.value.join(" ")||void 0,"aria-invalid":cx(v.invalid),"data-invalid":_e(v.invalid),"data-required":_e(v.required),"data-readonly":_e(v.readOnly),id:o.value,required:v.required,disabled:v.disabled,readOnly:v.readOnly}},g=()=>({...f(),...ss.input.attrs}),m=()=>({...f(),...ss.textarea.attrs}),b=()=>({...f(),...ss.select.attrs}),w=()=>{const v=pe(e);return{id:l.value,...ss.helperText.attrs,"data-disabled":_e(v.disabled)}},E=()=>({id:a.value,...ss.errorText.attrs,"aria-live":"polite"}),k=()=>({"aria-hidden":!0,...ss.requiredIndicator.attrs});return A(()=>{const v=pe(e);return{ariaDescribedby:h.value.join(" ")||void 0,ids:{control:o.value,label:c.value,errorText:a.value,helperText:l.value},refs:{rootRef:i},disabled:v.disabled,invalid:v.invalid,readOnly:v.readOnly,required:v.required,getLabelProps:p,getRootProps:u,getInputProps:g,getTextareaProps:m,getSelectProps:b,getHelperTextProps:w,getErrorTextProps:E,getRequiredIndicatorProps:k}})},H7=P({__name:"field-root",props:Ze({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){const t=B7(e);return JP(t),se(),(n,r)=>(y(),$(d(he).div,F(d(t).getRootProps(),{ref:d(t).refs.rootRef,"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),z7=P({__name:"field-select",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=ai(),r=t;return se(),(o,i)=>(y(),$(d(he).select,F(d(n).getSelectProps(),{value:o.modelValue,onChange:i[0]||(i[0]=s=>r("update:modelValue",s.target.value)),"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["value","as-child"]))}});var U7=e=>{if(!e)return;const t=Vc(e),n=Cn(e),r=Pr(e),o=()=>{requestAnimationFrame(()=>{e.style.height="auto";let c;t.boxSizing==="content-box"?c=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):c=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&c>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),c=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${c}px`})};e.addEventListener("input",o),e.form?.addEventListener("reset",o);const i=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(i,"value");Object.defineProperty(e,"value",{...s,set(){s?.set?.apply(this,arguments),o()}});const a=new n.ResizeObserver(()=>{requestAnimationFrame(()=>o())});a.observe(e);const l=new n.MutationObserver(()=>o());return l.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),r.fonts?.addEventListener("loadingdone",o),()=>{e.removeEventListener("input",o),e.form?.removeEventListener("reset",o),r.fonts?.removeEventListener("loadingdone",o),a.disconnect(),l.disconnect()}};const j7=P({__name:"field-textarea",props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=ai(),o=t,i=Q();return Je(()=>{const s=xx(i);if(!s||!n.autoresize)return;const a=U7(s);on(()=>a?.())}),se(),(s,a)=>(y(),$(d(he).textarea,F({ref_key:"textareaRef",ref:i},d(r).getTextareaProps(),{value:s.modelValue,onInput:a[0]||(a[0]=l=>o("update:modelValue",l.target.value)),style:n.autoresize?{resize:"none",overflow:"hidden"}:void 0,"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["value","style","as-child"]))}}),rC=Object.freeze(Object.defineProperty({__proto__:null,Context:R7,ErrorText:A7,HelperText:N7,Input:M7,Label:D7,RequiredIndicator:L7,Root:H7,RootProvider:V7,Select:z7,Textarea:j7},Symbol.toStringTag,{value:"Module"})),[E2,an]=Rt("MenuContext"),G7=P({__name:"menu-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowTipProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),W7=P({__name:"menu-arrow",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[$x,q7]=Rt("MenuItemContext"),[Zm,O2]=Rt("MenuItemPropsContext"),K7=P({__name:"menu-checkbox-item",props:Ze({checked:{type:Boolean},value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{checked:void 0,disabled:void 0,closeOnSelect:void 0}),emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,o=an(),i=A(()=>({...n,type:"checkbox",onCheckedChange:a=>r("update:checked",a)})),s=A(()=>o.value.getOptionItemState(i.value));return $x(s),Zm(i),se(),(a,l)=>(y(),$(d(he).div,F(d(o).getOptionItemProps(i.value),{"as-child":a.asChild}),{default:O(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),Y7=P({__name:"menu-content",props:{asChild:{type:Boolean}},setup(e){const t=an(),n=Up(),r=A(()=>fl(t.value.getContentProps(),n.value.presenceProps));return se(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),X7=P({__name:"menu-context-trigger",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getContextTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),J7=P({__name:"menu-context",setup(e){const t=an();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Z7=P({__name:"menu-indicator",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Q7=P({__name:"menu-item-context",setup(e){const t=q7();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[I2,T2]=Rt("MenuItemGroupContext"),ez=P({__name:"menu-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=an(),n=T2();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemGroupLabelProps({htmlFor:d(n).id}),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),tz=P({__name:"menu-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=an(),r=nt(),o=t.id??r,i=A(()=>({id:o}));return I2(i),se(),(s,a)=>(y(),$(d(he).div,F(d(n).getItemGroupProps(i.value),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}}),nz=P({__name:"menu-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=an(),n=O2();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),rz=P({__name:"menu-item-text",props:{asChild:{type:Boolean}},setup(e){const t=an(),n=O2();return se(),(r,o)=>(y(),$(d(he).div,F(d(t).getItemTextProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),oz=P({__name:"menu-item",props:Ze({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),emits:["select"],setup(e,{emit:t}){const n=e,r=t,o=an(),i=A(()=>o.value.getItemState(n));return Zm(A(()=>n)),$x(i),Je(()=>{const s=o.value.addItemListener({id:i.value.id,onSelect:()=>r("select")});on(()=>s?.())}),se(),(s,a)=>(y(),$(d(he).div,F(d(o).getItemProps(n),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}}),iz=P({__name:"menu-positioner",props:{asChild:{type:Boolean}},setup(e){const t=an(),n=oa(),r=au(A(()=>({...n.value,present:t.value.open})));return su(r),se(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),sz=P({__name:"menu-radio-item-group",props:{id:{},modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=an(),i=nt(),s=n.id??i,a=A(()=>({id:s,value:n.modelValue,onValueChange:l=>r("update:modelValue",l.value)}));return I2(a),se(),(l,c)=>(y(),$(d(he).div,F(d(o).getItemGroupProps(a.value),{"as-child":l.asChild}),{default:O(()=>[L(l.$slots,"default")]),_:3},16,["as-child"]))}}),az=P({__name:"menu-radio-item",props:Ze({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),setup(e){const t=e,n=an(),r=T2(),o=A(()=>({...t,checked:r.value.value===t.value,type:"radio",onCheckedChange:()=>r.value.onValueChange?.({value:t.value})})),i=A(()=>n.value.getOptionItemState(o.value));return $x(i),Zm(o),se(),(s,a)=>(y(),$(d(he).div,F(d(n).getOptionItemProps(o.value),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}}),[S2,P2]=Rt("MenuMachineContext"),[$2,lz]=Rt("MenuTriggerItemContext"),cz=P({__name:"menu-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,{value:{machine:n,api:r}}=t,o=an(),i=P2();return Je(()=>{i&&(o.value.setChild(n),r.value.setParent(i))}),$2(A(()=>o.value.getTriggerItemProps(r.value))),S2(n),E2(r),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(s,a)=>L(s.$slots,"default")}});var uz=ar("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),zn=uz.build(),yg=e=>e.ids?.trigger??`menu:${e.id}:trigger`,R2=e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,Id=e=>e.ids?.content??`menu:${e.id}:content`,dz=e=>e.ids?.arrow??`menu:${e.id}:arrow`,A2=e=>e.ids?.positioner??`menu:${e.id}:popper`,pz=(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,ap=(e,t)=>`${e.id}/${t}`,Ea=e=>e?.dataset.value??null,oC=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,fs=e=>e.getById(Id(e)),iC=e=>e.getById(A2(e)),Ff=e=>e.getById(yg(e)),fz=(e,t)=>t?e.getById(ap(e,t)):null,bb=e=>e.getById(R2(e)),Kp=e=>{const t=`[role^="menuitem"][data-ownedby=${CSS.escape(Id(e))}]:not([data-disabled])`;return vx(fs(e),t)},hz=e=>ax(Kp(e)),gz=e=>lx(Kp(e)),Rx=(e,t)=>t?e.id===t||e.dataset.value===t:!1,mz=(e,t)=>{const n=Kp(e),r=n.findIndex(o=>Rx(o,t.value));return rB(n,r,{loop:t.loop??t.loopFocus})},vz=(e,t)=>{const n=Kp(e),r=n.findIndex(o=>Rx(o,t.value));return iB(n,r,{loop:t.loop??t.loopFocus})},bz=(e,t)=>{const n=Kp(e),r=n.find(o=>Rx(o,t.value));return rp(n,{state:t.typeaheadState,key:t.key,activeId:r?.id??null})},Bf=e=>kn(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),yz=e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("aria-controls"),o0="menu:select";function xz(e,t){if(!e)return;const n=Cn(e),r=new n.CustomEvent(o0,{detail:{value:t}});e.dispatchEvent(r)}function wz(e,t){const{context:n,send:r,state:o,computed:i,prop:s,scope:a}=e,l=o.hasTag("open"),c=n.get("isSubmenu"),u=i("isTypingAhead"),p=s("composite"),h=n.get("currentPlacement"),f=n.get("anchorPoint"),g=n.get("highlightedValue"),m=qm({...s("positioning"),placement:f?"bottom":h});function b(v){return{id:ap(a,v.value),disabled:!!v.disabled,highlighted:g===v.value}}function w(v){const _=v.valueText??v.value;return{...v,id:v.value,valueText:_}}function E(v){return{...b(w(v)),checked:!!v.checked}}function k(v){const{closeOnSelect:_,valueText:T,value:N}=v,C=b(v),x=ap(a,N);return t.element({...zn.item.attrs,id:x,role:"menuitem","aria-disabled":cx(C.disabled),"data-disabled":_e(C.disabled),"data-ownedby":Id(a),"data-highlighted":_e(C.highlighted),"data-value":N,"data-valuetext":T,onDragStart(I){I.currentTarget.matches("a[href]")&&I.preventDefault()},onPointerMove(I){if(C.disabled||I.pointerType!=="mouse")return;const R=I.currentTarget;C.highlighted||r({type:"ITEM_POINTERMOVE",id:x,target:R,closeOnSelect:_})},onPointerLeave(I){if(C.disabled||I.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER"))return;const R=I.currentTarget;r({type:"ITEM_POINTERLEAVE",id:x,target:R,closeOnSelect:_})},onPointerDown(I){if(C.disabled)return;const R=I.currentTarget;r({type:"ITEM_POINTERDOWN",target:R,id:x,closeOnSelect:_})},onClick(I){if(Ek(I)||Hy(I)||C.disabled)return;const R=I.currentTarget;r({type:"ITEM_CLICK",target:R,id:x,closeOnSelect:_})}})}return{highlightedValue:g,open:l,setOpen(v){o.hasTag("open")!==v&&r({type:v?"OPEN":"CLOSE"})},setHighlightedValue(v){r({type:"HIGHLIGHTED.SET",value:v})},setParent(v){r({type:"PARENT.SET",value:v,id:v.prop("id")})},setChild(v){r({type:"CHILD.SET",value:v,id:v.prop("id")})},reposition(v={}){r({type:"POSITIONING.SET",options:v})},addItemListener(v){const _=a.getById(v.id);if(!_)return;const T=()=>v.onSelect?.();return _.addEventListener(o0,T),()=>_.removeEventListener(o0,T)},getContextTriggerProps(){return t.element({...zn.contextTrigger.attrs,dir:s("dir"),id:R2(a),"data-state":l?"open":"closed",onPointerDown(v){if(v.pointerType==="mouse")return;const _=Sf(v);r({type:"CONTEXT_MENU_START",point:_})},onPointerCancel(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(v){const _=Sf(v);r({type:"CONTEXT_MENU",point:_}),v.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(v){const _=v.getTriggerProps();return fl(k({value:_.id}),_)},getTriggerProps(){return t.button({...c?zn.triggerItem.attrs:zn.trigger.attrs,"data-placement":n.get("currentPlacement"),type:"button",dir:s("dir"),id:yg(a),"data-uid":s("id"),"aria-haspopup":p?"menu":"dialog","aria-controls":Id(a),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(v){if(v.pointerType!=="mouse"||Bf(v.currentTarget)||!c)return;const _=Sf(v);r({type:"TRIGGER_POINTERMOVE",target:v.currentTarget,point:_})},onPointerLeave(v){if(Bf(v.currentTarget)||v.pointerType!=="mouse"||!c)return;const _=Sf(v);r({type:"TRIGGER_POINTERLEAVE",target:v.currentTarget,point:_})},onPointerDown(v){Bf(v.currentTarget)||EP(v)||v.preventDefault()},onClick(v){v.defaultPrevented||Bf(v.currentTarget)||r({type:"TRIGGER_CLICK",target:v.currentTarget})},onBlur(){r({type:"TRIGGER_BLUR"})},onFocus(){r({type:"TRIGGER_FOCUS"})},onKeyDown(v){if(v.defaultPrevented)return;const _={ArrowDown(){r({type:"ARROW_DOWN"})},ArrowUp(){r({type:"ARROW_UP"})},Enter(){r({type:"ARROW_DOWN",src:"enter"})},Space(){r({type:"ARROW_DOWN",src:"space"})}},T=Fc(v,{orientation:"vertical",dir:s("dir")}),N=_[T];N&&(v.preventDefault(),N(v))}})},getIndicatorProps(){return t.element({...zn.indicator.attrs,dir:s("dir"),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...zn.positioner.attrs,dir:s("dir"),id:A2(a),style:m.floating})},getArrowProps(){return t.element({id:dz(a),...zn.arrow.attrs,dir:s("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...zn.arrowTip.attrs,dir:s("dir"),style:m.arrowTip})},getContentProps(){return t.element({...zn.content.attrs,id:Id(a),"aria-label":s("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:p?"menu":"dialog",tabIndex:0,dir:s("dir"),"aria-activedescendant":i("highlightedId")||void 0,"aria-labelledby":yg(a),"data-placement":h,onPointerEnter(v){v.pointerType==="mouse"&&r({type:"MENU_POINTERENTER"})},onKeyDown(v){if(v.defaultPrevented||!so(v.currentTarget,Xt(v)))return;const _=Xt(v);if(!(_?.closest("[role=menu]")===v.currentTarget||_===v.currentTarget))return;if(v.key==="Tab"&&!TP(v)){v.preventDefault();return}const T={ArrowDown(){r({type:"ARROW_DOWN"})},ArrowUp(){r({type:"ARROW_UP"})},ArrowLeft(){r({type:"ARROW_LEFT"})},ArrowRight(){r({type:"ARROW_RIGHT"})},Enter(){r({type:"ENTER"})},Space(x){u?r({type:"TYPEAHEAD",key:x.key}):T.Enter?.(x)},Home(){r({type:"HOME"})},End(){r({type:"END"})}},N=Fc(v,{dir:s("dir")}),C=T[N];if(C){C(v),v.stopPropagation(),v.preventDefault();return}s("typeahead")&&HB(v)&&(UB(v)||Hm(_)||(r({type:"TYPEAHEAD",key:v.key}),v.preventDefault()))}})},getSeparatorProps(){return t.element({...zn.separator.attrs,role:"separator",dir:s("dir"),"aria-orientation":"horizontal"})},getItemState:b,getItemProps:k,getOptionItemState:E,getOptionItemProps(v){const{type:_,disabled:T,closeOnSelect:N}=v,C=w(v),x=E(v);return{...k(C),...t.element({"data-type":_,...zn.item.attrs,dir:s("dir"),"data-value":C.value,role:`menuitem${_}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(I){if(T||Ek(I)||Hy(I))return;const R=I.currentTarget;r({type:"ITEM_CLICK",target:R,option:C,closeOnSelect:N})}})}},getItemIndicatorProps(v){const _=E(kk(v)),T=_.checked?"checked":"unchecked";return t.element({...zn.itemIndicator.attrs,dir:s("dir"),"data-disabled":_e(_.disabled),"data-highlighted":_e(_.highlighted),"data-state":qa(v,"checked")?T:void 0,hidden:qa(v,"checked")?!_.checked:void 0})},getItemTextProps(v){const _=E(kk(v)),T=_.checked?"checked":"unchecked";return t.element({...zn.itemText.attrs,dir:s("dir"),"data-disabled":_e(_.disabled),"data-highlighted":_e(_.highlighted),"data-state":qa(v,"checked")?T:void 0})},getItemGroupLabelProps(v){return t.element({...zn.itemGroupLabel.attrs,id:oC(a,v.htmlFor),dir:s("dir")})},getItemGroupProps(v){return t.element({id:pz(a,v.id),...zn.itemGroup.attrs,dir:s("dir"),"aria-labelledby":oC(a,v.id),role:"group"})}}}var{not:Rr,and:Rl,or:_z}=ru(),kz={props({props:e}){return{closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){PP(t.node)},...e,positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){t("onHighlightChange")?.({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n?.x}, y: ${n?.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:{...rp.defaultOptions},positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>Ez(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:r}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>r("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:Rr("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:_z("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:Rl(Rr("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:Rr("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:Rl("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:Rr("isPointerSuspended"),actions:["setHighlightedItem","focusMenu"]},{actions:["setLastHighlightedItem"]}],ITEM_POINTERLEAVE:{guard:Rl(Rr("isPointerSuspended"),Rr("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:Rl(Rr("isTriggerItemHighlighted"),Rr("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Rl(Rr("isTriggerItemHighlighted"),Rr("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Rl(Rr("isTriggerItemHighlighted"),Rr("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing"},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e("closeOnSelect")),isTriggerItem:({event:e})=>yz(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>!!(e.target??t.getById(n("highlightedId")))?.hasAttribute("aria-controls"),isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>Hm(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>e.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:({event:e})=>e.previousEvent?.type==="ARROW_UP",isArrowDownEvent:({event:e})=>e.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type==="OPEN_AUTOFOCUS"},effects:{waitForOpenDelay({send:e}){const t=setTimeout(()=>{e({type:"DELAY.OPEN"})},100);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){const t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},300);return()=>clearTimeout(t)},waitForLongPress({send:e}){const t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:r}){if(bb(n))return;const o={...t("positioning"),...r.get("positioningOverride")};e.set("currentPlacement",o.placement);const i=()=>iC(n);return Ks(Ff(n),i,{...o,defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}})},trackInteractOutside({refs:e,scope:t,prop:n,context:r,send:o}){const i=()=>fs(t);let s=!0;return Km(i,{type:"menu",defer:!0,exclude:[Ff(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(a){n("onFocusOutside")?.(a);const l=Xt(a.detail.originalEvent);if(so(bb(t),l)){a.preventDefault();return}},onEscapeKeyDown(a){n("onEscapeKeyDown")?.(a),r.get("isSubmenu")&&a.preventDefault(),sC({parent:e.get("parent")})},onPointerDownOutside(a){n("onPointerDownOutside")?.(a);const l=Xt(a.detail.originalEvent);if(so(bb(t),l)&&a.detail.contextmenu){a.preventDefault();return}s=!a.detail.focusable},onDismiss(){o({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},trackPointerMove({context:e,scope:t,send:n,refs:r,flush:o}){const i=r.get("parent");o(()=>{i.context.set("suspendPointer",!0)});const s=t.getDoc();return vn(s,"pointermove",a=>{Cz(e.get("intentPolygon"),{x:a.clientX,y:a.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),i.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){const r=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;const o=t.getById(n("highlightedId")),i=fs(t);RP(o,{rootEl:i,block:"nearest"})};return Ke(()=>r()),SP(()=>fs(t),{defer:!0,attributes:["aria-activedescendant"],callback:r})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>nu(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;const r=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:r,gutter:0})},reposition({context:e,scope:t,prop:n,event:r,refs:o}){const i=()=>iC(t),s=e.get("anchorPoint"),a=s?()=>({width:0,height:0,...s}):void 0,l={...n("positioning"),...o.get("positioningOverride")};Ks(Ff(t),i,{...l,defer:!0,getAnchorRect:a,...r.options??{},listeners:!1,onComplete(c){e.set("currentPlacement",c.placement)}})},setOptionState({event:e}){if(!e.option)return;const{checked:t,onCheckedChange:n,type:r}=e.option;r==="radio"?n?.(!0):r==="checkbox"&&n?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:n,context:r}){const o=e.getById(t("highlightedId"));if(!o||o.dataset.disabled)return;const i=r.get("highlightedValue");xP(o)?n("navigate")?.({value:i,node:o,href:o.href}):queueMicrotask(()=>o.click())},setIntentPolygon({context:e,scope:t,event:n}){const r=fs(t),o=e.get("currentPlacement");if(!r||!o)return;const i=r.getBoundingClientRect(),s=XH(i,o);if(!s)return;const a=j6(o)==="right"?-5:5;e.set("intentPolygon",[{...n.point,x:n.point.x+a},...s])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){const n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){const n=t.value||Ea(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){Ke(()=>{const t=fs(e);cg({root:t,enabled:!so(t,e.getActiveElement()),filter(n){return!n.role?.startsWith("menuitem")}})?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(fs(t)?queueMicrotask:Ke)(()=>{const n=hz(t);n&&e.set("highlightedValue",Ea(n))})},highlightLastItem({context:e,scope:t}){(fs(t)?queueMicrotask:Ke)(()=>{const n=gz(t);n&&e.set("highlightedValue",Ea(n))})},highlightNextItem({context:e,scope:t,event:n,prop:r}){const o=mz(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:r("loopFocus")});e.set("highlightedValue",Ea(o))},highlightPrevItem({context:e,scope:t,event:n,prop:r}){const o=vz(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:r("loopFocus")});e.set("highlightedValue",Ea(o))},invokeOnSelect({context:e,prop:t,scope:n}){const r=e.get("highlightedValue");if(r==null)return;const o=fz(n,r);xz(o,r),t("onSelect")?.({value:r})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>Ff(e)?.focus({preventScroll:!0}))},highlightMatchedItem({scope:e,context:t,event:n,refs:r}){const o=bz(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:r.get("typeaheadState")});o&&t.set("highlightedValue",Ea(o))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){const n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeRootMenu({refs:e}){sC({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){const r=t.getById(n("highlightedId"))?.getAttribute("data-uid"),o=e.get("children");(r?o[r]:null)?.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){e.get("parent")?.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",Ea(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){e.get("parent")?.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};function sC(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function Cz(e,t){return e?JH(e,t):!1}function Ez(e,t,n){const r=Object.keys(e).length>0;if(!t)return null;if(!r)return ap(n,t);for(const o in e){const i=e[o],s=yg(i.scope);if(s===t)return s}return ap(n,t)}sn()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]);sn()(["closeOnSelect","disabled","value","valueText"]);sn()(["htmlFor"]);sn()(["id"]);sn()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);const Oz=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...ra(a),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)},onEscapeKeyDown:l=>{t?.("escapeKeyDown",l),a.onEscapeKeyDown?.(l)},onFocusOutside:l=>{t?.("focusOutside",l),a.onFocusOutside?.(l)},onHighlightChange:l=>{t?.("highlightChange",l),t?.("update:highlightedValue",l.highlightedValue),a.onHighlightChange?.(l)},onInteractOutside:l=>{t?.("interactOutside",l),a.onInteractOutside?.(l)},onPointerDownOutside:l=>{t?.("pointerDownOutside",l),a.onPointerDownOutside?.(l)},onSelect:l=>{t?.("select",l),a.onSelect?.(l)}}}),s=wo(kz,i);return{api:A(()=>wz(s,ii)),machine:s}},Iz=P({__name:"menu-root",props:Ze({anchorPoint:{},"aria-label":{},closeOnSelect:{type:Boolean},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},highlightedValue:{},id:{},ids:{},loopFocus:{type:Boolean},navigate:{type:Function},open:{type:Boolean},positioning:{},typeahead:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,loopFocus:void 0,open:void 0,typeahead:void 0}),emits:["escapeKeyDown","focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","requestDismiss","select","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,r=t,{api:o,machine:i}=Oz(n,r),s=an(),a=P2();return Je(()=>{a&&(s.value.setChild(i),o.value.setParent(a))}),$2(A(()=>s.value.getTriggerItemProps(o.value))),S2(i),E2(o),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(l,c)=>L(l.$slots,"default")}}),Tz=P({__name:"menu-separator",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).hr,F(d(t).getSeparatorProps(),{"as-child":n.asChild}),null,16,["as-child"]))}}),Sz=P({__name:"menu-trigger-item",props:{asChild:{type:Boolean}},setup(e){const t=lz();return Zm(A(()=>({value:t.value?.["data-value"]}))),se(),(n,r)=>(y(),$(d(he).div,F(d(t),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Pz=P({__name:"menu-trigger",props:{asChild:{type:Boolean}},setup(e){const t=an();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),yt=Object.freeze(Object.defineProperty({__proto__:null,Arrow:W7,ArrowTip:G7,CheckboxItem:K7,Content:Y7,Context:J7,ContextTrigger:X7,Indicator:Z7,Item:oz,ItemContext:Q7,ItemGroup:tz,ItemGroupLabel:ez,ItemIndicator:nz,ItemText:rz,Positioner:iz,RadioItem:az,RadioItemGroup:sz,Root:Iz,RootProvider:cz,Separator:Tz,Trigger:Pz,TriggerItem:Sz},Symbol.toStringTag,{value:"Module"})),[N2,Co]=Rt("PopoverContext"),$z=P({__name:"popover-anchor",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getAnchorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Rz=P({__name:"popover-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowTipProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Az=P({__name:"popover-arrow",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getArrowProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Nz=P({__name:"popover-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getCloseTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Mz=P({__name:"popover-content",props:{asChild:{type:Boolean}},setup(e){const t=Co(),n=Up(),r=A(()=>fl(t.value.getContentProps(),n.value.presenceProps));return se(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Dz=P({__name:"popover-context",setup(e){const t=Co();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Lz=P({__name:"popover-description",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getDescriptionProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vz=P({__name:"popover-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Fz=P({__name:"popover-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Co(),n=oa(),r=au(A(()=>({...n.value,present:t.value.open})));return su(r),se(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(he).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Bz=P({__name:"popover-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return N2(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>L(r.$slots,"default")}});var Hz=ar("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),No=Hz.build(),M2=e=>e.ids?.anchor??`popover:${e.id}:anchor`,D2=e=>e.ids?.trigger??`popover:${e.id}:trigger`,i0=e=>e.ids?.content??`popover:${e.id}:content`,L2=e=>e.ids?.positioner??`popover:${e.id}:popper`,zz=e=>e.ids?.arrow??`popover:${e.id}:arrow`,s0=e=>e.ids?.title??`popover:${e.id}:title`,a0=e=>e.ids?.description??`popover:${e.id}:desc`,Uz=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,aC=e=>e.getById(M2(e)),Al=e=>e.getById(D2(e)),Nl=e=>e.getById(i0(e)),lC=e=>e.getById(L2(e)),jz=e=>e.getById(s0(e)),Gz=e=>e.getById(a0(e));function Wz(e,t){const{state:n,context:r,send:o,computed:i,prop:s,scope:a}=e,l=n.matches("open"),c=r.get("currentPlacement"),u=i("currentPortalled"),p=r.get("renderedElements"),h=qm({...s("positioning"),placement:c});return{portalled:u,open:l,setOpen(f){n.matches("open")!==f&&o({type:f?"OPEN":"CLOSE"})},reposition(f={}){o({type:"POSITIONING.SET",options:f})},getArrowProps(){return t.element({id:zz(a),...No.arrow.attrs,dir:s("dir"),style:h.arrow})},getArrowTipProps(){return t.element({...No.arrowTip.attrs,dir:s("dir"),style:h.arrowTip})},getAnchorProps(){return t.element({...No.anchor.attrs,dir:s("dir"),id:M2(a)})},getTriggerProps(){return t.button({...No.trigger.attrs,dir:s("dir"),type:"button","data-placement":c,id:D2(a),"aria-haspopup":"dialog","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":i0(a),onPointerDown(f){CP(f)&&px()&&f.currentTarget.focus()},onClick(f){f.defaultPrevented||o({type:"TOGGLE"})},onBlur(f){o({type:"TRIGGER_BLUR",target:f.relatedTarget})}})},getIndicatorProps(){return t.element({...No.indicator.attrs,dir:s("dir"),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({id:L2(a),...No.positioner.attrs,dir:s("dir"),style:h.floating})},getContentProps(){return t.element({...No.content.attrs,dir:s("dir"),id:i0(a),tabIndex:-1,role:"dialog",hidden:!l,"data-state":l?"open":"closed","data-expanded":_e(l),"aria-labelledby":p.title?s0(a):void 0,"aria-describedby":p.description?a0(a):void 0,"data-placement":c})},getTitleProps(){return t.element({...No.title.attrs,id:s0(a),dir:s("dir")})},getDescriptionProps(){return t.element({...No.description.attrs,id:a0(a),dir:s("dir")})},getCloseTriggerProps(){return t.button({...No.closeTrigger.attrs,dir:s("dir"),id:Uz(a),type:"button","aria-label":"close",onClick(f){f.defaultPrevented||(f.stopPropagation(),o({type:"CLOSE"}))}})}}}var qz={props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,...e,positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){e.set("currentPlacement",t("positioning").placement);const r=aC(n)??Al(n);return Ks(r,()=>lC(n),{...t("positioning"),defer:!0,onComplete(o){e.set("currentPlacement",o.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Nl(n);let o=!0;return Km(r,{type:"popover",pointerBlocking:t("modal"),exclude:Al(n),defer:!0,onEscapeKeyDown(i){t("onEscapeKeyDown")?.(i),!t("closeOnEscape")&&i.preventDefault()},onInteractOutside(i){t("onInteractOutside")?.(i),!i.defaultPrevented&&(o=!(i.detail.focusable||i.detail.contextmenu),t("closeOnInteractOutside")||i.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:a3(()=>Nl(t),{triggerElement:Al(t),defer:!0,onFocus(n){n.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?m2(()=>[Nl(t),Al(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return x2(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?y2(()=>Nl(t),{initialFocus:()=>cg({root:Nl(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")})}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){const o=aC(n)??Al(n);Ks(o,()=>lC(n),{...t("positioning"),...e.options,defer:!0,listeners:!1,onComplete(i){r.set("currentPlacement",i.placement)}})},checkRenderedElements({context:e,scope:t}){Ke(()=>{Object.assign(e.get("renderedElements"),{title:!!jz(t),description:!!Gz(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Ke(()=>{cg({root:Nl(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")})?.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){const n=e.restoreFocus??e.previousEvent?.restoreFocus;n!=null&&!n||Ke(()=>{Al(t)?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};sn()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const V2=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...ra(a),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)},onEscapeKeyDown:l=>{t?.("escapeKeyDown",l),a.onEscapeKeyDown?.(l)},onFocusOutside:l=>{t?.("focusOutside",l),a.onFocusOutside?.(l)},onInteractOutside:l=>{t?.("interactOutside",l),a.onInteractOutside?.(l)},onPointerDownOutside:l=>{t?.("pointerDownOutside",l),a.onPointerDownOutside?.(l)}}}),s=wo(qz,i);return A(()=>Wz(s,ii))},Kz=P({__name:"popover-root",props:Ze({autoFocus:{type:Boolean},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},portalled:{type:Boolean},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{autoFocus:void 0,closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,portalled:void 0}),emits:["escapeKeyDown","focusOutside","interactOutside","openChange","pointerDownOutside","requestDismiss","update:open"],setup(e,{emit:t}){const n=e,r=V2(n,t);return N2(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>L(o.$slots,"default")}}),Yz=P({__name:"popover-title",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getTitleProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Xz=P({__name:"popover-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Co();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),_i=Object.freeze(Object.defineProperty({__proto__:null,Anchor:$z,Arrow:Az,ArrowTip:Rz,CloseTrigger:Nz,Content:Mz,Context:Dz,Description:Lz,Indicator:Vz,Positioner:Fz,Root:Kz,RootProvider:Bz,Title:Yz,Trigger:Xz},Symbol.toStringTag,{value:"Module"})),[F2,Yp]=Rt("TabsContext"),Jz=P({__name:"tab-content",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=Yp(),r=oa();return se(),(o,i)=>(y(),$(d(v2),F(d(n).getContentProps(t),{present:d(n).value===t.value,"lazy-mount":d(r).lazyMount,"unmount-on-exit":d(r).unmountOnExit,immediate:!0}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["present","lazy-mount","unmount-on-exit"]))}}),Zz=P({__name:"tab-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Yp();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Qz=P({__name:"tab-list",props:{asChild:{type:Boolean}},setup(e){const t=Yp();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getListProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),eU=P({__name:"tab-trigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Yp();return se(),(r,o)=>(y(),$(d(he).button,F(d(n).getTriggerProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),tU=P({__name:"tabs-context",setup(e){const t=Yp();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),nU=P({__name:"tabs-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return F2(n),ur(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),se(),(r,o)=>(y(),$(d(he).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var rU=ar("tabs").parts("root","list","trigger","content","indicator"),Du=rU.build(),oU=e=>e.ids?.root??`tabs:${e.id}`,Td=e=>e.ids?.list??`tabs:${e.id}:list`,l0=(e,t)=>e.ids?.content?.(t)??`tabs:${e.id}:content-${t}`,Ka=(e,t)=>e.ids?.trigger?.(t)??`tabs:${e.id}:trigger-${t}`,B2=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,iU=e=>e.getById(Td(e)),sU=(e,t)=>e.getById(l0(e,t)),_h=(e,t)=>e.getById(Ka(e,t)),cC=e=>e.getById(B2(e)),Xp=e=>{const t=`[role=tab][data-ownedby='${CSS.escape(Td(e))}']:not([disabled])`;return vx(iU(e),t)},aU=e=>ax(Xp(e)),lU=e=>lx(Xp(e)),cU=(e,t)=>NP(Xp(e),Ka(e,t.value),t.loopFocus),uU=(e,t)=>MP(Xp(e),Ka(e,t.value),t.loopFocus),H2=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),dU=(e,t)=>{const n=AP(Xp(e),Ka(e,t));return z2(H2(n))},z2=e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`});function pU(e,t){const{state:n,send:r,context:o,prop:i,scope:s}=e,a=i("translations"),l=n.matches("focused"),c=i("orientation")==="vertical",u=i("orientation")==="horizontal",p=i("composite");function h(f){return{selected:o.get("value")===f.value,focused:o.get("focusedValue")===f.value,disabled:!!f.disabled}}return{value:o.get("value"),focusedValue:o.get("focusedValue"),setValue(f){r({type:"SET_VALUE",value:f})},clearValue(){r({type:"CLEAR_VALUE"})},setIndicatorRect(f){const g=Ka(s,f);r({type:"SET_INDICATOR_RECT",id:g})},syncTabIndex(){r({type:"SYNC_TAB_INDEX"})},selectNext(f){r({type:"TAB_FOCUS",value:f,src:"selectNext"}),r({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(f){r({type:"TAB_FOCUS",value:f,src:"selectPrev"}),r({type:"ARROW_PREV",src:"selectPrev"})},focus(){const f=o.get("value");f&&_h(s,f)?.focus()},getRootProps(){return t.element({...Du.root.attrs,id:oU(s),"data-orientation":i("orientation"),"data-focus":_e(l),dir:i("dir")})},getListProps(){return t.element({...Du.list.attrs,id:Td(s),role:"tablist",dir:i("dir"),"data-focus":_e(l),"aria-orientation":i("orientation"),"data-orientation":i("orientation"),"aria-label":a?.listLabel,onKeyDown(f){if(f.defaultPrevented||kP(f)||!so(f.currentTarget,Xt(f)))return;const g={ArrowDown(){u||r({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){u||r({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){c||r({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){c||r({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){r({type:"HOME"})},End(){r({type:"END"})}};let m=Fc(f,{dir:i("dir"),orientation:i("orientation")});const b=g[m];if(b){f.preventDefault(),b(f);return}}})},getTriggerState:h,getTriggerProps(f){const{value:g,disabled:m}=f,b=h(f);return t.button({...Du.trigger.attrs,role:"tab",type:"button",disabled:m,dir:i("dir"),"data-orientation":i("orientation"),"data-disabled":_e(m),"aria-disabled":m,"data-value":g,"aria-selected":b.selected,"data-selected":_e(b.selected),"data-focus":_e(b.focused),"aria-controls":b.selected?l0(s,g):void 0,"data-ownedby":Td(s),"data-ssr":_e(o.get("ssr")),id:Ka(s,g),tabIndex:b.selected&&p?0:-1,onFocus(){r({type:"TAB_FOCUS",value:g})},onBlur(w){w.relatedTarget?.getAttribute("role")!=="tab"&&r({type:"TAB_BLUR"})},onClick(w){w.defaultPrevented||Hy(w)||m||(px()&&w.currentTarget.focus(),r({type:"TAB_CLICK",value:g}))}})},getContentProps(f){const{value:g}=f,m=o.get("value")===g;return t.element({...Du.content.attrs,dir:i("dir"),id:l0(s,g),tabIndex:p?0:-1,"aria-labelledby":Ka(s,g),role:"tabpanel","data-ownedby":Td(s),"data-selected":_e(m),"data-orientation":i("orientation"),hidden:!m})},getIndicatorProps(){const f=o.get("indicatorRect"),g=o.get("indicatorTransition");return t.element({id:B2(s),...Du.indicator.attrs,dir:i("dir"),"data-orientation":i("orientation"),style:{"--transition-property":"left, right, top, bottom, width, height","--left":f.left,"--top":f.top,"--width":f.width,"--height":f.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:g?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[u?"left":"top"]:u?"var(--left)":"var(--top)"}})}}}var{createMachine:fU}=_3(),hU=fU({props({props:e}){return{dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){PP(t.node)},defaultValue:null,...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){e("onValueChange")?.({value:n})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(n){e("onFocusChange")?.({focusedValue:n})}})),ssr:t(()=>({defaultValue:!0})),indicatorTransition:t(()=>({defaultValue:!1})),indicatorRect:t(()=>({defaultValue:{left:"0px",top:"0px",width:"0px",height:"0px"}}))}},watch({context:e,prop:t,track:n,action:r}){n([()=>e.get("value")],()=>{r(["allowIndicatorTransition","syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),n([()=>t("dir"),()=>t("orientation")],()=>{r(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){Ke(()=>{const n=e.get("focusedValue");if(!n)return;const r=t("deselectable")&&e.get("value")===n?null:n;e.set("value",r)})},setFocusedValue({context:e,event:t,flush:n}){t.value!=null&&n(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:n}){const r=n("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",r?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){Ke(()=>{aU(e)?.focus()})},focusLastTab({scope:e}){Ke(()=>{lU(e)?.focus()})},focusNextTab({context:e,prop:t,scope:n,event:r}){const o=r.value??e.get("focusedValue");if(!o)return;const i=cU(n,{value:o,loopFocus:t("loopFocus")});Ke(()=>{t("composite")?i?.focus():i?.dataset.value!=null&&e.set("focusedValue",i.dataset.value)})},focusPrevTab({context:e,prop:t,scope:n,event:r}){const o=r.value??e.get("focusedValue");if(!o)return;const i=uU(n,{value:o,loopFocus:t("loopFocus")});Ke(()=>{t("composite")?i?.focus():i?.dataset.value!=null&&e.set("focusedValue",i.dataset.value)})},syncTabIndex({context:e,scope:t}){Ke(()=>{const n=e.get("value");if(!n)return;const r=sU(t,n);r&&(hx(r).length>0?r.removeAttribute("tabindex"):r.setAttribute("tabindex","0"))})},cleanupObserver({refs:e}){const t=e.get("indicatorCleanup");t&&t()},allowIndicatorTransition({context:e}){e.set("indicatorTransition",!0)},setIndicatorRect({context:e,event:t,scope:n}){const r=t.id??e.get("value");if(cC(n)){if(!r){e.set("indicatorTransition",!1);return}_h(n,r)&&(e.set("indicatorRect",dU(n,r)),gx(()=>{e.set("indicatorTransition",!1)}))}},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:n}){const r=t.get("indicatorCleanup");r&&r();const o=e.get("value");if(!o){e.set("indicatorTransition",!1);return}const i=_h(n,o),s=cC(n);if(!i||!s)return;const a=l3([i],{measure(l){return H2(l)},onEntry({rects:l}){const[c]=l;e.set("indicatorRect",z2(c))}});t.set("indicatorCleanup",a)},navigateIfNeeded({context:e,prop:t,scope:n}){const r=e.get("value");if(!r)return;const o=_h(n,r);xP(o)&&t("navigate")?.({value:r,node:o,href:o.href})}}}});sn()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);sn()(["disabled","value"]);sn()(["value"]);const gU=(e={},t)=>{const n=nt(),r=_o(ko),o=Ki(qi),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...ra(a),onFocusChange:l=>{t?.("focusChange",l),a.onFocusChange?.(l)},onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a.onValueChange?.(l)}}}),s=wo(hU,i);return A(()=>pU(s,ii))},mU=P({__name:"tabs-root",props:Ze({activationMode:{},composite:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},id:{},ids:{},loopFocus:{type:Boolean},modelValue:{},navigate:{type:Function},orientation:{},translations:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{composite:void 0,deselectable:void 0,loopFocus:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,r=gU(n,t);return F2(r),ur(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),se(),(o,i)=>(y(),$(d(he).div,F(d(r).getRootProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Ii=Object.freeze(Object.defineProperty({__proto__:null,Content:Jz,Context:tU,Indicator:Zz,List:Qz,Root:mU,RootProvider:nU,Trigger:eU},Symbol.toStringTag,{value:"Module"}));var vU=ar("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Ql=vU.build(),bU=e=>`toast-group:${e}`,uC=(e,t)=>e.getById(`toast-group:${t}`),U2=e=>`toast:${e.id}`,dC=e=>e.getById(U2(e)),pC=e=>`toast:${e.id}:title`,fC=e=>`toast:${e.id}:description`,yU=e=>`toast${e.id}:close`,hC={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function yb(e,t){return e??hC[t]??hC.DEFAULT}var xU=e=>typeof e=="string"?{left:e,right:e,bottom:e,top:e}:e;function wU(e,t){const{prop:n,computed:r,context:o}=e,{offsets:i,gap:s}=n("store").attrs,a=o.get("heights"),l=xU(i),c=n("dir")==="rtl",u=t.replace("-start",c?"-right":"-left").replace("-end",c?"-left":"-right"),p=u.includes("right"),h=u.includes("left"),f={position:"fixed",pointerEvents:r("count")>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${s}px`,"--first-height":`${a[0]?.height||0}px`,zIndex:yB};let g="center";if(p&&(g="flex-end"),h&&(g="flex-start"),f.alignItems=g,u.includes("top")){const m=l.top;f.top=`max(env(safe-area-inset-top, 0px), ${m})`}if(u.includes("bottom")){const m=l.bottom;f.bottom=`max(env(safe-area-inset-bottom, 0px), ${m})`}if(!u.includes("left")){const m=l.right;f.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${m})`}if(!u.includes("right")){const m=l.left;f.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${m})`}return f}function _U(e,t){const{prop:n,context:r,computed:o}=e,i=n("parent"),s=i.computed("placement"),{gap:a}=i.prop("store").attrs,[l]=s.split("-"),c=r.get("mounted"),u=r.get("remainingTime"),p=o("height"),h=o("frontmost"),f=!h,g=!n("stacked"),m=n("stacked"),b=n("type")==="loading"?Number.MAX_SAFE_INTEGER:u,w=o("heightIndex")*a+o("heightBefore"),E={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${n("removeDelay")}ms`,"--duration":`${b}ms`,"--initial-height":`${p}px`,"--offset":`${w}px`,"--index":n("index"),"--z-index":o("zIndex"),"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},k=v=>Object.assign(E,v);return l==="top"?k({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):l==="bottom"&&k({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),c&&(k({"--y":"0","--opacity":"1"}),m&&k({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||k({"--opacity":"0",pointerEvents:"none"}),f&&g&&(k({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||k({"--y":"calc(var(--sign) * 40%)"})),f&&m&&!t&&k({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),h&&!t&&k({"--y":"calc(var(--lift) * -100%)"}),E}function kU(e,t){const{computed:n}=e,r={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},o=i=>Object.assign(r,i);return n("frontmost")&&!t&&o({height:"calc(var(--initial-height) + 80%)"}),r}function CU(){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function EU(e,t){const{context:n,prop:r,send:o,refs:i,computed:s}=e;return{getCount(){return n.get("toasts").length},getToasts(){return n.get("toasts")},getGroupProps(a={}){const{label:l="Notifications"}=a,{hotkey:c}=r("store").attrs,u=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s("placement"),[h,f="center"]=p.split("-");return t.element({...Ql.group.attrs,dir:r("dir"),tabIndex:-1,"aria-label":`${p} ${l} ${u}`,id:bU(p),"data-placement":p,"data-side":h,"data-align":f,"aria-live":"polite",role:"region",style:wU(e,p),onMouseMove(){o({type:"REGION.POINTER_ENTER",placement:p})},onMouseLeave(){o({type:"REGION.POINTER_LEAVE",placement:p})},onFocus(g){o({type:"REGION.FOCUS",target:g.relatedTarget})},onBlur(g){i.get("isFocusWithin")&&!so(g.currentTarget,g.relatedTarget)&&queueMicrotask(()=>o({type:"REGION.BLUR"}))}})},subscribe(a){return r("store").subscribe(()=>a(n.get("toasts")))}}}var OU={props({props:e}){return{dir:"ltr",id:mP(),...e,store:e.store}},initialState({prop:e}){return e("store").attrs.overlap?"overlap":"stack"},refs(){return{lastFocusedEl:null,isFocusWithin:!1,dismissableCleanup:void 0}},context({bindable:e}){return{toasts:e(()=>({defaultValue:[],sync:!0,hash:t=>t.map(n=>n.id).join(",")})),heights:e(()=>({defaultValue:[],sync:!0}))}},computed:{count:({context:e})=>e.get("toasts").length,overlap:({prop:e})=>e("store").attrs.overlap,placement:({prop:e})=>e("store").attrs.placement},effects:["subscribeToStore","trackDocumentVisibility","trackHotKeyPress"],watch({track:e,context:t,action:n}){e([()=>t.hash("toasts")],()=>{queueMicrotask(()=>{n(["collapsedIfEmpty","setDismissableBranch"])})})},exit:["clearDismissableBranch","clearLastFocusedEl"],on:{"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:"isOverlapping",target:"overlap",actions:["collapseToasts","resumeToasts","restoreLastFocusedEl"]},{target:"stack",actions:["resumeToasts","restoreLastFocusedEl"]}],"TOAST.REMOVE":{actions:["removeToast","removeHeight"]},"TOAST.PAUSE":{actions:["pauseToasts"]}},states:{stack:{on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts","collapseToasts"]},{actions:["resumeToasts"]}],"REGION.OVERLAP":{target:"overlap",actions:["collapseToasts"]},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["pauseToasts"]}}},overlap:{on:{"REGION.STACK":{target:"stack",actions:["expandToasts"]},"REGION.POINTER_ENTER":{target:"stack",actions:["pauseToasts","expandToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts","expandToasts"]}}}},implementations:{guards:{isOverlapping:({computed:e})=>e("overlap")},effects:{subscribeToStore({context:e,prop:t}){return t("store").subscribe(n=>{if(n.dismiss){e.set("toasts",r=>r.filter(o=>o.id!==n.id));return}e.set("toasts",r=>{const o=r.findIndex(i=>i.id===n.id);return o!==-1?[...r.slice(0,o),{...r[o],...n},...r.slice(o+1)]:[n,...r]})})},trackHotKeyPress({prop:e,send:t}){return vn(document,"keydown",n=>{const{hotkey:r}=e("store").attrs;r.every(o=>n[o]||n.code===o)&&t({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility({prop:e,send:t,scope:n}){const{pauseOnPageIdle:r}=e("store").attrs;if(!r)return;const o=n.getDoc();return vn(o,"visibilitychange",()=>{const i=o.visibilityState==="hidden";t({type:i?"PAUSE_ALL":"RESUME_ALL"})})}},actions:{setDismissableBranch({refs:e,context:t,computed:n,scope:r}){const o=t.get("toasts"),i=n("placement"),s=o.length>0;if(!s){e.get("dismissableCleanup")?.();return}if(s&&e.get("dismissableCleanup"))return;const a=h4(()=>uC(r,i),{defer:!0});e.set("dismissableCleanup",a)},clearDismissableBranch({refs:e}){e.get("dismissableCleanup")?.()},focusRegionEl({scope:e,computed:t}){queueMicrotask(()=>{uC(e,t("placement"))?.focus()})},pauseToasts({prop:e}){e("store").pause()},resumeToasts({prop:e}){e("store").resume()},expandToasts({prop:e}){e("store").expand()},collapseToasts({prop:e}){e("store").collapse()},removeToast({prop:e,event:t}){e("store").remove(t.id)},removeHeight({event:e,context:t}){e?.id!=null&&queueMicrotask(()=>{t.set("heights",n=>n.filter(r=>r.id!==e.id))})},collapsedIfEmpty({send:e,computed:t}){!t("overlap")||t("count")>1||e({type:"REGION.OVERLAP"})},setLastFocusedEl({refs:e,event:t}){e.get("isFocusWithin")||!t.target||(e.set("isFocusWithin",!0),e.set("lastFocusedEl",t.target))},restoreLastFocusedEl({refs:e}){e.get("lastFocusedEl")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))},clearLastFocusedEl({refs:e}){e.get("lastFocusedEl")&&(e.get("lastFocusedEl")?.focus({preventScroll:!0}),e.set("lastFocusedEl",null),e.set("isFocusWithin",!1))}}}};function IU(e,t){const{state:n,send:r,prop:o,scope:i,context:s,computed:a}=e,l=n.hasTag("visible"),c=n.hasTag("paused"),u=s.get("mounted"),p=a("frontmost"),h=o("parent").computed("placement"),f=o("type"),g=o("stacked"),m=o("title"),b=o("description"),w=o("action"),[E,k="center"]=h.split("-");return{type:f,title:m,description:b,placement:h,visible:l,paused:c,closable:!!o("closable"),pause(){r({type:"PAUSE"})},resume(){r({type:"RESUME"})},dismiss(){r({type:"DISMISS",src:"programmatic"})},getRootProps(){return t.element({...Ql.root.attrs,dir:o("dir"),id:U2(i),"data-state":l?"open":"closed","data-type":f,"data-placement":h,"data-align":k,"data-side":E,"data-mounted":_e(u),"data-paused":_e(c),"data-first":_e(p),"data-sibling":_e(!p),"data-stack":_e(g),"data-overlap":_e(!g),role:"status","aria-atomic":"true","aria-describedby":b?fC(i):void 0,"aria-labelledby":m?pC(i):void 0,tabIndex:0,style:_U(e,l),onKeyDown(v){v.defaultPrevented||v.key=="Escape"&&(r({type:"DISMISS",src:"keyboard"}),v.preventDefault())}})},getGhostBeforeProps(){return t.element({"data-ghost":"before",style:kU(e,l)})},getGhostAfterProps(){return t.element({"data-ghost":"after",style:CU()})},getTitleProps(){return t.element({...Ql.title.attrs,id:pC(i)})},getDescriptionProps(){return t.element({...Ql.description.attrs,id:fC(i)})},getActionTriggerProps(){return t.button({...Ql.actionTrigger.attrs,type:"button",onClick(v){v.defaultPrevented||(w?.onClick?.(),r({type:"DISMISS",src:"user"}))}})},getCloseTriggerProps(){return t.button({id:yU(i),...Ql.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(v){v.defaultPrevented||r({type:"DISMISS",src:"user"})}})}}}var{not:TU}=ru(),SU={props({props:e}){return vB(e,["id","type","parent","removeDelay"],"toast"),{closable:!0,...e,duration:yb(e.duration,e.type)}},initialState({prop:e}){return e("type")==="loading"||e("duration")===1/0?"visible:persist":"visible"},context({prop:e,bindable:t}){return{remainingTime:t(()=>({defaultValue:yb(e("duration"),e("type"))})),createdAt:t(()=>({defaultValue:Date.now()})),mounted:t(()=>({defaultValue:!1})),initialHeight:t(()=>({defaultValue:0}))}},refs(){return{closeTimerStartTime:Date.now(),lastCloseStartTimerStartTime:0}},computed:{zIndex:({prop:e})=>{const t=e("parent").context.get("toasts"),n=t.findIndex(r=>r.id===e("id"));return t.length-n},height:({prop:e})=>e("parent").context.get("heights").find(t=>t.id===e("id"))?.height??0,heightIndex:({prop:e})=>e("parent").context.get("heights").findIndex(t=>t.id===e("id")),frontmost:({prop:e})=>e("index")===0,heightBefore:({prop:e})=>{const t=e("parent").context.get("heights"),n=t.findIndex(r=>r.id===e("id"));return t.reduce((r,o,i)=>i>=n?r:r+o.height,0)},shouldPersist:({prop:e})=>e("type")==="loading"||e("duration")===1/0},watch({track:e,prop:t,send:n}){e([()=>t("message")],()=>{const r=t("message");r&&n({type:r,src:"programmatic"})}),e([()=>t("type"),()=>t("duration")],()=>{n({type:"UPDATE"})})},on:{UPDATE:[{guard:"shouldPersist",target:"visible:persist",actions:["resetCloseTimer"]},{target:"visible:updating",actions:["resetCloseTimer"]}],MEASURE:{actions:["measureHeight"]}},entry:["setMounted","measureHeight","invokeOnVisible"],effects:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],effects:["waitForNextTick"],on:{SHOW:{target:"visible"}}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:TU("isLoadingType"),target:"visible",actions:["setCloseTimer"]},DISMISS:{target:"dismissing"}}},visible:{tags:["visible"],effects:["waitForDuration"],on:{DISMISS:{target:"dismissing"},PAUSE:{target:"visible:persist",actions:["syncRemainingTime"]}}},dismissing:{entry:["invokeOnDismiss"],effects:["waitForRemoveDelay"],on:{REMOVE:{target:"unmounted",actions:["notifyParentToRemove"]}}},unmounted:{entry:["invokeOnUnmount"]}},implementations:{effects:{waitForRemoveDelay({prop:e,send:t}){return lb(()=>{t({type:"REMOVE",src:"timer"})},e("removeDelay"))},waitForDuration({send:e,context:t,computed:n}){if(!n("shouldPersist"))return lb(()=>{e({type:"DISMISS",src:"timer"})},t.get("remainingTime"))},waitForNextTick({send:e}){return lb(()=>{e({type:"SHOW",src:"timer"})},0)},trackHeight({scope:e,prop:t}){let n;return Ke(()=>{const r=dC(e);if(!r)return;const o=()=>{const a=r.style.height;r.style.height="auto";const l=r.getBoundingClientRect().height;r.style.height=a;const c={id:t("id"),height:l};gC(t("parent"),c)},i=e.getWin(),s=new i.MutationObserver(o);s.observe(r,{childList:!0,subtree:!0,characterData:!0}),n=()=>s.disconnect()}),()=>n?.()}},guards:{isLoadingType:({prop:e})=>e("type")==="loading",shouldPersist:({computed:e})=>e("shouldPersist")},actions:{setMounted({context:e}){Ke(()=>{e.set("mounted",!0)})},measureHeight({scope:e,prop:t,context:n}){queueMicrotask(()=>{const r=dC(e);if(!r)return;const o=r.style.height;r.style.height="auto";const i=r.getBoundingClientRect().height;r.style.height=o,n.set("initialHeight",i);const s={id:t("id"),height:i};gC(t("parent"),s)})},setCloseTimer({refs:e}){e.set("closeTimerStartTime",Date.now())},resetCloseTimer({context:e,refs:t,prop:n}){t.set("closeTimerStartTime",Date.now()),e.set("remainingTime",yb(n("duration"),n("type")))},syncRemainingTime({context:e,refs:t}){e.set("remainingTime",n=>{const r=t.get("closeTimerStartTime"),o=Date.now()-r;return t.set("lastCloseStartTimerStartTime",Date.now()),n-o})},notifyParentToRemove({prop:e}){e("parent").send({type:"TOAST.REMOVE",id:e("id")})},invokeOnDismiss({prop:e,event:t}){e("onStatusChange")?.({status:"dismissing",src:t.src})},invokeOnUnmount({prop:e}){e("onStatusChange")?.({status:"unmounted"})},invokeOnVisible({prop:e}){e("onStatusChange")?.({status:"visible"})}}}};function gC(e,t){const{id:n,height:r}=t;e.context.set("heights",o=>o.find(i=>i.id===n)?o.map(i=>i.id===n?{...i,height:r}:i):[{id:n,height:r},...o])}var PU=(e,t)=>({...t,...Fm(e)});function $U(e={}){const t=PU(e,{placement:"bottom",overlap:!1,max:24,gap:16,offsets:"1rem",hotkey:["altKey","KeyT"],removeDelay:200,pauseOnPageIdle:!0});let n=[],r=[],o=new Set,i=[];const s=h=>(n.push(h),()=>{const f=n.indexOf(h);n.splice(f,1)}),a=h=>(n.forEach(f=>f(h)),h),l=h=>{if(r.length>=t.max){i.push(h);return}a(h),r.unshift(h)},c=()=>{for(;i.length>0&&r.length{const f=h.id??`toast:${mP()}`,g=r.find(m=>m.id===f);return o.has(f)&&o.delete(f),g?r=r.map(m=>m.id===f?a({...m,...h,id:f}):m):l({id:f,duration:t.duration,removeDelay:t.removeDelay,type:"info",...h,stacked:!t.overlap,gap:t.gap}),f},p=h=>(o.add(h),h?(n.forEach(f=>f({id:h,dismiss:!0})),r=r.filter(f=>f.id!==h),c()):(r.forEach(f=>{n.forEach(g=>g({id:f.id,dismiss:!0}))}),r=[],i=[]),h);return{attrs:t,subscribe:s,create:u,update:(h,f)=>u({id:h,...f}),remove:p,dismiss:h=>{h!=null?r=r.map(f=>f.id===h?a({...f,message:"DISMISS"}):f):r=r.map(f=>a({...f,message:"DISMISS"}))},error:h=>u({...h,type:"error"}),success:h=>u({...h,type:"success"}),info:h=>u({...h,type:"info"}),warning:h=>u({...h,type:"warning"}),loading:h=>u({...h,type:"loading"}),getVisibleToasts:()=>r.filter(h=>!o.has(h.id)),getCount:()=>r.length,promise:(h,f,g={})=>{if(!f||!f.loading){Lc("[zag-js > toast] toaster.promise() requires at least a 'loading' option to be specified");return}const m=u({...g,...f.loading,promise:h,type:"loading"});let b=!0,w;const E=Tf(h).then(async k=>{if(w=["resolve",k],RU(k)&&!k.ok){b=!1;const v=Tf(f.error,`HTTP Error! status: ${k.status}`);u({...g,...v,id:m,type:"error"})}else if(f.success!==void 0){b=!1;const v=Tf(f.success,k);u({...g,...v,id:m,type:"success"})}}).catch(async k=>{if(w=["reject",k],f.error!==void 0){b=!1;const v=Tf(f.error,k);u({...g,...v,id:m,type:"error"})}}).finally(()=>{b&&p(m),f.finally?.()});return{id:m,unwrap:()=>new Promise((k,v)=>E.then(()=>w[0]==="reject"?v(w[1]):k(w[1])).catch(v))}},pause:h=>{h!=null?r=r.map(f=>f.id===h?a({...f,message:"PAUSE"}):f):r=r.map(f=>a({...f,message:"PAUSE"}))},resume:h=>{h!=null?r=r.map(f=>f.id===h?a({...f,message:"RESUME"}):f):r=r.map(f=>a({...f,message:"RESUME"}))},isVisible:h=>!o.has(h)&&!!r.find(f=>f.id===h),isDismissed:h=>o.has(h),expand:()=>{r=r.map(h=>a({...h,stacked:!0}))},collapse:()=>{r=r.map(h=>a({...h,stacked:!1}))}}}var RU=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",mC={connect:EU,machine:OU};const AU=e=>$U(e),[NU,cu]=Rt("ToastContext"),MU=P({__name:"toast-action-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cu();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getActionTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),DU=P({__name:"toast-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=cu();return se(),(n,r)=>(y(),$(d(he).button,F(d(t).getCloseTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),LU=P({__name:"toast-context",setup(e){const t=cu();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),VU=P({__name:"toast-description",props:{asChild:{type:Boolean}},setup(e){const t=cu();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getDescriptionProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),FU=P({__name:"toast-root",props:{asChild:{type:Boolean}},setup(e){const t=cu();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getRootProps(),{"as-child":n.asChild}),{default:O(()=>[D("div",Be(Fe(d(t).getGhostBeforeProps())),null,16),L(n.$slots,"default"),D("div",Be(Fe(d(t).getGhostAfterProps())),null,16)]),_:3},16,["as-child"]))}}),BU=P({__name:"toast-title",props:{asChild:{type:Boolean}},setup(e){const t=cu();return se(),(n,r)=>(y(),$(d(he).div,F(d(t).getTitleProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),HU=P({__name:"toaster-item",props:{value:{},index:{},parent:{}},setup(e){const t=e,n=_o(ko),r=A(()=>({...t.value,index:t.index,parent:t.parent,getRootNode:n?.value.getRootNode})),o=wo(SU,r),i=A(()=>IU(o,ii));return NU(i),se(),(s,a)=>L(s.$slots,"default",Be(Fe(t.value)))}}),zU=P({__name:"toaster",props:{toaster:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ki(qi),r=_o(ko),o=wo(mC.machine,{store:t.toaster,id:nt(),dir:n?.value.dir,getRootNode:r?.value.getRootNode}),i=A(()=>mC.connect(o,ii));return se(),(s,a)=>(y(),$(d(he).div,Be(Fe(i.value.getGroupProps())),{default:O(()=>[(y(!0),V(ge,null,Ie(i.value.getToasts(),(l,c)=>(y(),$(HU,{key:l.id,value:l,parent:d(o),index:c},{default:O(u=>[L(s.$slots,"default",F({ref_for:!0},u))]),_:3},8,["value","parent","index"]))),128))]),_:3},16))}}),Lu=Object.freeze(Object.defineProperty({__proto__:null,ActionTrigger:MU,CloseTrigger:DU,Context:LU,Description:VU,Root:FU,Title:BU},Symbol.toStringTag,{value:"Module"})),UU={key:1,class:"border-b px-6 py-4 flex items-center justify-between"},jU=P({__name:"Modals",setup(e){const t=dt(Qt),{openModals:n,modals:r,closeModal:o}=Yi(),i=A(()=>n.value.reduce((l,c)=>{const u=r.value.get(c);return u&&(l[c]=u),l},{})),s=l=>({xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"max-w-[calc(100vw-2rem)] w-full max-h-[calc(100vh-2rem)] h-full"})[l]||"max-w-md",a=(l,c)=>{l.open||o(c)};return(l,c)=>{const u=Sx,p=Gp;return y(!0),V(ge,null,Ie(d(n),h=>(y(),V(ge,{key:h},[d(i)[h]?(y(),$(d(Ca).Root,{key:0,open:!0,onOpenChange:f=>a(f,h),modal:!0},{default:O(()=>[S(d(Ca).Backdrop,{class:"fixed inset-0 bg-black/50 z-50"}),S(d(Ca).Positioner,{class:"fixed inset-0 z-50 flex items-center justify-center p-4"},{default:O(()=>[S(d(Ca).Content,{class:Ne(`relative bg-white rounded-lg shadow-xl ${s(d(i)[h]?.size)} ${d(i)[h]?.size!=="full"?"max-h-[90vh]":""} overflow-auto`)},{default:O(()=>[d(i)[h].title?Z("",!0):(y(),$(d(Ca).CloseTrigger,{key:0,class:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded p-1 z-10",onClick:f=>d(o)(h)},{default:O(()=>[S(u,{class:"w-5 h-5"})]),_:1},8,["onClick"])),d(i)[h].title?(y(),V("div",UU,[S(d(Ca).Title,{class:"text-lg font-semibold text-gray-900"},{default:O(()=>[re(j(d(i)[h].title),1)]),_:2},1024),S(d(Ca).CloseTrigger,{class:"text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 rounded p-1",onClick:f=>d(o)(h)},{default:O(()=>[S(u,{class:"w-5 h-5"})]),_:1},8,["onClick"])])):Z("",!0),d(qo)(d(i)[h].render)||d(Pi)(d(i)[h].render)?(y(),$(Xn(d(i)[h].render),{key:2,"modal-id":h,editor:d(t)},null,8,["modal-id","editor"])):d($i)(d(i)[h].render)?(y(),$(p,{key:3,"render-fn":d(i)[h].render},null,8,["render-fn"])):Z("",!0)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1032,["onOpenChange"])):Z("",!0)],64))),128)}}}),vC={header:{undo:"Undo",redo:"Redo",auto:"Auto",apply:"Apply",devicePreview:"Device Preview",customDeviceSize:"Custom Size",deviceWidthPx:"Width (px)",savedCustomDevices:"Saved custom devices",enableInspector:"Enable inspection mode",disableInspector:"Disable inspection mode"},block:{show:"Show",hide:"Hide",copy:"Copy",pasteAfter:"Paste After",duplicate:"Duplicate",remove:"Remove",moveToNext:"Move to Next",moveToPrevious:"Move to Previous",enable:"Enable",disable:"Disable",insertBlockBefore:"Insert Block Before",insertBlockAfter:"Insert Block After",insertSiblingBefore:"Insert Sibling Before",insertSiblingAfter:"Insert Sibling After",copyAsJson:"Copy as JSON"},layers:{title:"Layers",header:"Page content",collapseAll:"Collapse all blocks",addBlockToBlock:"Add block",addBlockToRegion:"Add block"},blocksPopover:{searchPlaceholder:"Search blocks...",tabBlocks:"Blocks",tabSaved:"Saved",noBlocksAvailable:"No blocks available",noBlocksFound:"No blocks found",hoverToSeeDetails:"Hover over a block to see details",noPreviewAvailable:"No preview available"},configPanels:{properties:"Properties",selectedBlock:"Select a block to edit its properties",noProperties:"This block has no editable properties",unknownFieldType:"Unknown field type"},common:{block:"Block",custom:"Custom",close:"Close",default:"Default"}};function GU(e,t){const n={...e};for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],i=n[r];o&&typeof o=="object"&&!Array.isArray(o)&&i&&typeof i=="object"&&!Array.isArray(i)?n[r]={...i,...o}:o!==void 0&&(n[r]=o)}return n}function WU(e,t){return t.split(".").reduce((n,r)=>n&&n[r]!==void 0?n[r]:void 0,e)}function qU(e){return e?GU(vC,e):vC}function KU(e){return function(t){const n=WU(e,t);return n===void 0?(console.warn(`Translation key "${t}" not found, returning key as fallback`),t):typeof n!="string"?(console.warn(`Translation key "${t}" does not point to a string value`),t):n}}function Dn(){const e=dt(Qt);if(!e)throw new Error("useI18n must be used within a component that has access to CraftileEditor");return{t:KU(e.i18n)}}const YU={class:"group pointer-events-auto relative flex w-full min-w-96 max-w-lg justify-between gap-4 overflow-hidden rounded-lg border p-3 shadow-lg transition-all"},XU={class:"flex-1 min-w-0"},JU={key:1,class:"mt-3 flex gap-2"},ZU={class:"flex items-start"},QU={class:"sr-only"},ej=P({__name:"Toasts",setup(e){const{t}=Dn(),{toaster:n}=Yi(),r=i=>{switch(i){case"error":return"bg-red-50 border-red-200 text-red-800";case"warning":return"bg-amber-50 border-amber-200 text-amber-800";case"success":return"bg-blue-50 border-blue-200 text-blue-800";default:return"bg-gray-50 border-gray-200 text-gray-800"}},o=i=>{switch(i){case"error":return"border-red-300 text-red-700 hover:bg-red-100";case"warning":return"border-amber-300 text-amber-700 hover:bg-amber-100";case"success":return"border-blue-300 text-blue-700 hover:bg-blue-100";default:return"border-gray-300 text-gray-700 hover:bg-gray-100"}};return(i,s)=>{const a=Sx;return y(),$(d(zU),{toaster:d(n)},{default:O(l=>[S(d(Lu).Root,{class:Ne(r(l.type||"info"))},{default:O(()=>[D("div",YU,[D("div",XU,[S(d(Lu).Title,{class:"text-sm font-medium"},{default:O(()=>[re(j(l.title),1)]),_:2},1024),l.description?(y(),$(d(Lu).Description,{key:0,class:"mt-1 text-sm opacity-90"},{default:O(()=>[re(j(l.description),1)]),_:2},1024)):Z("",!0),l.action?(y(),V("div",JU,[S(d(Lu).ActionTrigger,{class:Ne(["inline-flex items-center px-2 py-1 text-xs font-medium rounded border transition-colors",o(l.type||"info")])},{default:O(()=>[re(j(l.action.label),1)]),_:2},1032,["class"])])):Z("",!0)]),D("div",ZU,[S(d(Lu).CloseTrigger,{class:"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md opacity-70 hover:opacity-100 transition-opacity"},{default:O(()=>[S(a,{class:"h-4 w-4"}),D("span",QU,j(d(t)("common.close")),1)]),_:1})])])]),_:2},1032,["class"])]),_:1},8,["toaster"])}}}),tj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nj(e,t){return y(),V("svg",tj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m19.5 8.25l-7.5 7.5l-7.5-7.5"},null,-1)])])}const Ax=fe({name:"heroicons-chevron-down",render:nj}),rj={key:0,class:"text-center text-gray-500 py-8"},oj={key:0},ij={key:1},sj={key:1,class:"h-full flex"},aj={class:"w-60 border-r overflow-y-auto"},lj={class:"text-xs font-medium text-gray-700"},cj={class:"pb-1"},uj=["onClick","onMouseenter"],dj=["innerHTML"],pj={class:"flex-1 min-w-0"},fj={class:"text-xs text-gray-900 truncate"},hj={class:"flex-1 p-2 bg-gray-50"},gj={key:0,class:"h-full flex flex-col"},mj={class:"flex items-start gap-2 mb-2"},vj=["innerHTML"],bj={class:"flex-1"},yj={class:"font-semibold text-base text-gray-900"},xj={key:0,class:"text-xs text-gray-600"},wj={class:"flex-1 bg-white rounded overflow-hidden flex items-center justify-center"},_j=["src","alt"],kj={key:1,class:"text-center text-gray-400 text-sm p-4"},Cj={class:"mb-2"},Ej={class:"text-xs"},Oj={key:1,class:"h-full flex items-center justify-center text-gray-400 text-sm"},Ij=P({__name:"BlocksList",props:{blocksByCategory:{},searchQuery:{}},emits:["blockSelect"],setup(e,{emit:t}){const n=e,r=t,{t:o}=Dn(),i=A(()=>Object.keys(n.blocksByCategory).sort((c,u)=>c.localeCompare(u))),s=Q(null),a=c=>{s.value=c},l=()=>{s.value=null};return(c,u)=>{const p=Ax;return Object.keys(c.blocksByCategory).length===0?(y(),V("div",rj,[c.searchQuery.trim()?(y(),V("p",oj,j(d(o)("blocksPopover.noBlocksFound"))+' "'+j(c.searchQuery)+'"',1)):(y(),V("p",ij,j(d(o)("blocksPopover.noBlocksAvailable")),1))])):(y(),V("div",sj,[D("div",aj,[S(d(Ho).Root,{class:"w-full",defaultValue:d(i),multiple:""},{default:O(()=>[(y(!0),V(ge,null,Ie(d(i),h=>(y(),$(d(Ho).Item,{key:h,value:h,class:"border-b border-gray-100 last:border-b-0"},{default:O(()=>[S(d(Ho).ItemTrigger,{class:"flex w-full items-center justify-between px-3 py-2 text-left hover:bg-gray-50 transition-colors"},{default:O(()=>[D("span",lj,j(h),1),S(d(Ho).ItemIndicator,{class:"transition-transform duration-200"},{default:O(()=>[S(p,{class:"w-3 h-3 text-gray-500"})]),_:1})]),_:2},1024),S(d(Ho).ItemContent,{class:"overflow-hidden"},{default:O(()=>[D("div",cj,[(y(!0),V(ge,null,Ie(c.blocksByCategory[h],f=>(y(),V("button",{key:f.blockType+"-"+(f.presetIndex??"default"),onClick:g=>r("blockSelect",f),onMouseenter:g=>a(f),onMouseleave:l,class:Ne(["flex items-center gap-2 px-3 py-2 w-full hover:bg-gray-50 transition-colors text-left",{"bg-gray-50":d(s)===f}])},[D("div",{class:"flex-none w-5 h-5 flex items-center justify-center text-gray-600 text-sm",innerHTML:f.icon||""},null,8,dj),D("div",pj,[D("div",fj,j(f.name),1)])],42,uj))),128))])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["defaultValue"])]),D("div",hj,[d(s)?(y(),V("div",gj,[D("div",mj,[D("div",{class:"flex-none w-12 h-12 flex items-center justify-center text-gray-600 text-2xl bg-white rounded border",innerHTML:d(s).icon||""},null,8,vj),D("div",bj,[D("h3",yj,j(d(s).name),1),d(s).description?(y(),V("p",xj,j(d(s).description),1)):Z("",!0)])]),D("div",wj,[d(s).previewImageUrl?(y(),V("img",{key:0,src:d(s).previewImageUrl,alt:`Preview of ${d(s).name}`,class:"w-full h-full object-contain"},null,8,_j)):(y(),V("div",kj,[D("div",Cj,j(d(o)("blocksPopover.noPreviewAvailable")),1),D("div",Ej,j(d(s).blockType),1)]))])])):(y(),V("div",Oj,j(d(o)("blocksPopover.hoverToSeeDetails")),1))])]))}}});function j2(){const e=dt(Qt);if(!e)throw new Error("useEventBus must be used within a component that has access to CraftileEditor");return e.events}function Tj(e,t){const n=e instanceof Qy;let r,o;if(n)r=e,o=!0;else{const B=e||{},{autoSync:z=!0,...J}=B;r=new Qy(J),o=z}const i=Q({blocks:{},regions:[{name:"main",blocks:[]}]}),s=A(()=>i.value.blocks),a=A(()=>i.value.regions),l=Q(r.canUndo()),c=Q(r.canRedo()),u=A(()=>{const B=[];for(const z of a.value)for(const J of z.blocks){const q=s.value[J];q&&B.push(q)}return B}),p=B=>s.value[B],h=B=>Object.values(s.value).filter(z=>z.type===B),f=B=>{const z=s.value[B];return z?z.children.map(J=>s.value[J]).filter(Boolean):[]},g=()=>{const B=He(r.getPage());i.value=B,Nn(()=>{l.value=r.canUndo(),c.value=r.canRedo()})};g();const m=[];o&&["page:set","block:insert","block:remove","block:move","block:toggle","block:duplicate","block:property:set","block:update","undo","redo"].forEach(B=>{const z=r.on(B,()=>{g()});m.push(z)});const b=(B,z)=>{const J=r.insertBlock(B,z);return o||g(),J},w=(B,z,J)=>{const q=r.insertBlockFromPreset(B,z,J);return o||g(),q},E=B=>{r.removeBlock(B),o||g()},k=(B,z)=>{r.moveBlock(B,z),o||g()},v=(B,z,J)=>{r.setBlockProperty(B,z,J),o||g()},_=(B,z)=>{r.setBlockName(B,z),o||g()},T=(B,z)=>{r.toggleBlock(B,z),o||g()},N=B=>{const z=r.duplicateBlock(B);return o||g(),z},C=(B,z)=>{const J=r.pasteBlock(B,z);return o||g(),J},x=()=>{const B=r.undo();return o||g(),B},I=()=>{const B=r.redo();return o||g(),B},R=()=>{g()},M=()=>{m.forEach(B=>B()),m.length=0};return Sr(()=>{M()}),{page:i,blocks:s,regions:a,engine:r,rootLevelBlocks:u,getBlockById:p,getBlocksByType:h,getChildrenBlocks:f,insertBlock:b,insertBlockFromPreset:w,removeBlock:E,moveBlock:k,setBlockProperty:v,setBlockName:_,toggleBlock:T,duplicateBlock:N,pasteBlock:C,undo:x,redo:I,canUndo:l,canRedo:c,refresh:R,destroy:M}}function dr(){const e=dt(Qt);if(!e)throw new Error("useCraftileEngine must be used within a component that has access to CraftileEditor");return Tj(e.engine)}function uu(){const e=dt(Qt);if(!e)throw new Error("useBlocksPopover must be used within a component that has access to CraftileEditor");return{open:({anchor:t,context:n})=>{e.events.emit("blocks-popover:open",{anchor:t,context:n})},close:()=>{e.events.emit("blocks-popover:close")},getAllowedBlockSchemas:t=>{const n=e.engine.getBlocksManager(),r=Object.values(n.getAll());if(t.parentId){const o=e.engine.getBlockById(t.parentId);if(!o)return[];let i=r.filter(s=>n.canBeChild(s.type,o.type));return e.blockFilterFunction&&(i=i.filter(s=>e.blockFilterFunction(s,t))),i}return e.blockFilterFunction?r.filter(o=>e.blockFilterFunction(o,t)):r},expandPresetsToBlockOptions:t=>{const n=[];for(const r of t)r.presets&&r.presets.length>0?r.presets.forEach((o,i)=>{n.push({blockType:r.type,presetIndex:i,name:o.name,icon:o.icon||r.meta?.icon,category:o.category||r.meta?.category||"Other",description:o.description||r.meta?.description,previewImageUrl:o.previewImageUrl||r.meta?.previewImageUrl})}):n.push({blockType:r.type,name:r.meta?.name||r.type.replace(/-/g," ").replace(/\b\w/g,o=>o.toUpperCase()),icon:r.meta?.icon,category:r.meta?.category||"Other",description:r.meta?.description,previewImageUrl:r.meta?.previewImageUrl});return n},getInsertionContext:(t,n)=>{const r=e.engine.getBlockById(t);if(!r)return{regionId:"main"};if(r.parentId){const o=e.engine.getBlockById(r.parentId);if(o){const i=o.children.indexOf(t),s=n==="before"?i:i+1;return{parentId:r.parentId,index:s}}}for(const o of e.engine.getPage().regions){const i=o.blocks.indexOf(t);if(i!==-1){const s=n==="before"?i:i+1;return{regionId:ut(o),index:s}}}return{regionId:"main"}}}}function Nx(){const e=dt(Qt);if(!e)throw new Error("useLayersPanel must be used within a component that has access to CraftileEditor");const t=A(()=>e.ui.state.layersPanel.expandedBlocks),n=(a,l)=>{l?e.ui.state.layersPanel.expandedBlocks.add(a):e.ui.state.layersPanel.expandedBlocks.delete(a)},r=a=>e.ui.state.layersPanel.expandedBlocks.has(a),o=a=>{const l=!r(a);return n(a,l),l},i=a=>{a.forEach(l=>{e.ui.state.layersPanel.expandedBlocks.add(l)})},s=a=>{a.forEach(l=>{e.ui.state.layersPanel.expandedBlocks.delete(l)})};return{expandedBlocks:t,setExpanded:n,isExpanded:r,toggleExpanded:o,expandAll:i,collapseAll:s,collapseRegion:a=>{const l=e.engine.getPage(),c=l.regions.find(p=>ut(p)===a);if(!c)return;const u=p=>{const h=l.blocks[p];if(!h||!h.children)return[];let f=[];return h.children.forEach(g=>{f.push(g),f.push(...u(g))}),f};c.blocks.forEach(p=>{const h=[p,...u(p)];s(h)})},expandAncestors:a=>{const l=e.engine.getPage(),c=l.blocks[a];if(!c)return;let u=c.parentId;for(;u;)e.ui.state.layersPanel.expandedBlocks.add(u),u=l.blocks[u]?.parentId}}}const Sj={key:1,class:"flex-1 overflow-hidden"},Pj=P({__name:"BlocksPopover",setup(e){const{t}=Dn(),n=j2(),{engine:r,insertBlock:o,insertBlockFromPreset:i}=dr(),{getAllowedBlockSchemas:s,expandPresetsToBlockOptions:a}=uu(),{setExpanded:l}=Nx(),c=Q(null),u=Q(null),p=Q(""),h=Q([]),f=A(()=>h.value.length>0),g=V2({id:"blocks-popover",portalled:!0,closeOnInteractOutside:!0,positioning:{placement:"left-start",strategy:"fixed",slide:!0,offset:{crossAxis:-32},flip:["left","right"],fitViewport:!0,getAnchorRect:()=>c.value?.getBoundingClientRect()??null}}),m=A(()=>{if(!u.value)return[];const _=s(u.value);return a(_)}),b=A(()=>{const _={};return m.value.forEach(T=>{const N=T.category||"Other";_[N]||(_[N]=[]),_[N].push(T)}),_}),w=A(()=>{const _=p.value.trim().toLowerCase();if(!_)return b.value;const T={};return Object.entries(b.value).forEach(([N,C])=>{const x=C.filter(I=>{const R=I.name.toLowerCase(),M=(I.description||"").toLowerCase();return R.includes(_)||M.includes(_)});x.length>0&&(T[N]=x)}),T}),E=_=>{if(!u.value)return;let T;_.presetIndex!==void 0?T=i(_.blockType,_.presetIndex,{parentId:u.value.parentId,regionId:u.value.regionId,index:u.value.index}):T=o(_.blockType,{parentId:u.value.parentId,regionId:u.value.regionId,index:u.value.index});const N=r.getBlocksManager().get(_.blockType);N?.accepts&&N.accepts.length>0&&l(T,!0),v()},k=({anchor:_,context:T})=>{c.value=_,u.value=T||null,g.value.setOpen(!0),g.value.reposition()},v=()=>{g.value.setOpen(!1),u.value=null,c.value=null};return Je(()=>{n.on("blocks-popover:open",k),n.on("blocks-popover:close",v)}),Sr(()=>{n.off("blocks-popover:open",k),n.off("blocks-popover:close",v)}),(_,T)=>{const N=Ij;return y(),$(d(_i).RootProvider,{value:d(g)},{default:O(()=>[S(d(_i).Positioner,{class:"!z-[1100]"},{default:O(()=>[S(d(_i).Content,{class:"bg-white shadow rounded-md w-[640px] h-[520px] border flex flex-col"},{default:O(()=>[S(d(rC).Root,{class:"flex-none p-2"},{default:O(()=>[S(d(rC).Input,{modelValue:d(p),"onUpdate:modelValue":T[0]||(T[0]=C=>Ce(p)?p.value=C:null),class:"rounded border w-full text-sm h-8 px-3 focus-visible:ring-2 focus-visible:border-transparent focus-visible:ring-accent focus-visible:outline-none",placeholder:d(t)("blocksPopover.searchPlaceholder")},null,8,["modelValue","placeholder"])]),_:1}),d(f)?(y(),$(d(Ii).Root,{key:0,class:"flex-1 flex flex-col overflow-hidden",defaultValue:"blocks"},{default:O(()=>[S(d(Ii).List,{class:"flex flex-none bg-gray-100 p-[2px] rounded mx-2"},{default:O(()=>[S(d(Ii).Trigger,{value:"blocks",class:"flex-1 py-1.5 rounded data-selected:bg-white data-selected:shadow"},{default:O(()=>[re(j(d(t)("blocksPopover.tabBlocks")),1)]),_:1}),S(d(Ii).Trigger,{value:"saved",class:"flex-1 py-1.5 rounded data-selected:bg-white data-selected:shadow"},{default:O(()=>[re(j(d(t)("blocksPopover.tabSaved")),1)]),_:1})]),_:1}),S(d(Ii).Content,{value:"blocks",class:"flex-1 overflow-hidden mt-2"},{default:O(()=>[S(N,{"blocks-by-category":d(w),"search-query":d(p),onBlockSelect:E},null,8,["blocks-by-category","search-query"])]),_:1})]),_:1})):(y(),V("div",Sj,[S(N,{"blocks-by-category":d(w),"search-query":d(p),onBlockSelect:E},null,8,["blocks-by-category","search-query"])]))]),_:1})]),_:1})]),_:1},8,["value"])}}}),$j={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Rj(e,t){return y(),V("svg",$j,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"},null,-1)])])}const Aj=fe({name:"heroicons-adjustments-horizontal",render:Rj}),Nj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Mj(e,t){return y(),V("svg",Nj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.088 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const Mx=fe({name:"heroicons-trash",render:Mj}),Dj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lj(e,t){return y(),V("svg",Dj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3.98 8.223A10.5 10.5 0 0 0 1.934 12c1.292 4.339 5.31 7.5 10.066 7.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.499a10.52 10.52 0 0 1-4.293 5.773M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"},null,-1)])])}const Dx=fe({name:"heroicons-eye-slash",render:Lj}),Vj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fj(e,t){return y(),V("svg",Vj,[...t[0]||(t[0]=[D("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[D("path",{d:"M2.036 12.322a1 1 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178"}),D("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"})],-1)])])}const Lx=fe({name:"heroicons-eye",render:Fj}),Bj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hj(e,t){return y(),V("svg",Bj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"},null,-1)])])}const zj=fe({name:"heroicons-arrow-long-right",render:Hj}),Uj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function jj(e,t){return y(),V("svg",Uj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18"},null,-1)])])}const Gj=fe({name:"heroicons-arrow-long-left",render:jj}),Wj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function qj(e,t){return y(),V("svg",Wj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9 9 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9 9 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"},null,-1)])])}const G2=fe({name:"heroicons-document-duplicate",render:qj}),Kj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Yj(e,t){return y(),V("svg",Kj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 6.75a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5m0 6a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5m0 6a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5"},null,-1)])])}const Xj=fe({name:"heroicons-ellipsis-vertical",render:Yj}),Jj={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Zj(e,t){return y(),V("svg",Jj,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.75 19.5L8.25 12l7.5-7.5"},null,-1)])])}const Qj=fe({name:"heroicons-chevron-left",render:Zj});function sa(){const e=dt(Qt);if(!e)throw new Error("useSelectedBlock must be used within a component that has access to CraftileEditor");const{regions:t,blocks:n,moveBlock:r,duplicateBlock:o,toggleBlock:i,removeBlock:s}=dr(),a=A(()=>!!e.ui.state.selectedBlockId),l=A(()=>e.ui.state.selectedBlockId),c=A(()=>e.ui.state.selectedBlockId&&n.value[e.ui.state.selectedBlockId]||null),u=m=>{e.ui.setSelectedBlock(m)},p=()=>{e.ui.clearSelectedBlock(),e.inspector.clearSelectedBlock()},h=A(()=>{if(!c.value)return null;const m=c.value;for(const b of t.value){const w=b.blocks.indexOf(m.id);if(w!==-1)return{parentType:"region",parentId:ut(b),currentIndex:w,siblingCount:b.blocks.length}}if(m.parentId){const b=n.value[m.parentId];if(b){const w=b.children.indexOf(m.id);if(w!==-1)return{parentType:"block",parentId:m.parentId,currentIndex:w,siblingCount:b.children.length}}}return null}),f=A(()=>!c.value||c.value?.static?!1:h.value&&h.value.currentIndex>0),g=A(()=>!c.value||c.value?.static?!1:h.value&&h.value.currentIndex{if(!c.value||!h.value)return;const m=h.value.currentIndex-1;h.value.parentType==="region"?r(c.value.id,{targetRegionId:h.value.parentId,targetIndex:m}):h.value.parentType==="block"&&r(c.value.id,{targetParentId:h.value.parentId,targetIndex:m})},moveToNext:()=>{if(!c.value||!h.value)return;const m=h.value.currentIndex+1;h.value.parentType==="region"?r(c.value.id,{targetRegionId:h.value.parentId,targetIndex:m}):h.value.parentType==="block"&&r(c.value.id,{targetParentId:h.value.parentId,targetIndex:m})},duplicate:()=>{l.value&&o(l.value)},toggle:()=>{l.value&&i(l.value)},remove:()=>{l.value&&(s(l.value),p())}}}const eG={key:0,class:"border-b border-gray-200 bg-white px-3 py-2 flex-none"},tG={class:"flex items-center gap-2"},nG=["aria-label"],rG={class:"flex-1 min-w-0"},oG=P({__name:"ConfigurationHeader",props:{isOverlay:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Dn(),{engine:r,moveBlock:o,duplicateBlock:i,toggleBlock:s,removeBlock:a,setBlockName:l}=dr(),{selectedBlock:c,clearSelection:u}=sa(),p=A(()=>c.value?c.value.name?c.value.name:r.getBlockSchema(c.value.type)?.meta?.name||c.value.type:""),h=Q(!1),f=Q(""),g=Q(null);function m(){c.value&&(f.value=p.value,h.value=!0,Nn(()=>{g.value?.focus(),g.value?.select()}))}function b(){if(!c.value||!f.value.trim()){w();return}const R=f.value.trim();R!==p.value&&l(c.value.id,R),h.value=!1}function w(){h.value=!1,f.value=""}function E(R){R.key==="Enter"?(R.preventDefault(),b()):R.key==="Escape"&&(R.preventDefault(),w())}const k=A(()=>{if(!c.value)return null;const R=r.getPage(),M=c.value;for(const B of R.regions){const z=B.blocks.indexOf(M.id);if(z!==-1)return{parentType:"region",parentId:ut(B),currentIndex:z,siblingCount:B.blocks.length}}if(M.parentId){const B=R.blocks[M.parentId];if(B){const z=B.children.indexOf(M.id);if(z!==-1)return{parentType:"block",parentId:M.parentId,currentIndex:z,siblingCount:B.children.length}}}return null}),v=A(()=>!c.value||c.value?.static?!1:k.value&&k.value.currentIndex>0),_=A(()=>!c.value||c.value?.static?!1:k.value&&k.value.currentIndex{const B=Qj,z=Xj,J=G2,q=Gj,K=zj,X=Lx,de=Dx,Ue=Mx;return d(c)?(y(),V("div",eG,[D("div",tG,[t.isOverlay?(y(),V("button",{key:0,onClick:M[0]||(M[0]=(...je)=>d(u)&&d(u)(...je)),class:"flex-none flex items-center justify-center w-8 h-8 rounded-md hover:bg-gray-100 transition-colors","aria-label":d(n)("common.close")},[S(B,{class:"w-4 h-4 text-gray-600"})],8,nG)):Z("",!0),D("div",rG,[d(h)?yo((y(),V("input",{key:0,ref_key:"nameInputRef",ref:g,"onUpdate:modelValue":M[1]||(M[1]=je=>Ce(f)?f.value=je:null),type:"text",onBlur:b,onKeydown:E,class:"w-full text-sm font-medium text-gray-900 px-2 py-1 rounded border border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"},null,544)),[[Zo,d(f)]]):(y(),V("button",{key:1,onClick:m,class:"w-full text-left text-sm font-medium text-gray-900 truncate capitalize px-2 py-1 rounded hover:bg-gray-100 transition-colors"},j(d(p)),1))]),S(d(yt).Root,{positioning:{strategy:"fixed",placement:"bottom-end"}},{default:O(()=>[S(d(yt).Trigger,{class:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-gray-100 transition-colors"},{default:O(()=>[S(z,{class:"w-4 h-4 text-gray-600"})]),_:1}),S(d(yt).Positioner,{class:"!z-10"},{default:O(()=>[S(d(yt).Content,{class:"bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[160px] focus:outline-none"},{default:O(()=>[S(d(yt).Item,{value:"duplicate",disabled:d(c).static,onSelect:T,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(J,{class:"w-4 h-4"}),re(" "+j(d(n)("block.duplicate")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"move-next",disabled:!d(v),onSelect:C,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(q,{class:"w-4 h-4"}),re(" "+j(d(n)("block.moveToPrevious")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"move-next",disabled:!d(_),onSelect:N,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(K,{class:"w-4 h-4"}),re(" "+j(d(n)("block.moveToNext")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"toggle",onSelect:x,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer"},{default:O(()=>[d(c).disabled?(y(),$(X,{key:0,class:"w-4 h-4"})):(y(),$(de,{key:1,class:"w-4 h-4"})),re(" "+j(d(c).disabled?d(n)("block.enable"):d(n)("block.disable")),1)]),_:1}),S(d(yt).Item,{value:"remove",disabled:d(c).static,onSelect:I,class:"flex items-center gap-2 px-3 py-2 text-sm text-red-600 hover:bg-red-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(Ue,{class:"w-4 h-4"}),re(" "+j(d(n)("block.remove")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})])])):Z("",!0)}}}),iG={class:"h-full w-full flex flex-col bg-white relative"},sG={class:"flex-1 overflow-y-auto"},aG={key:1,class:"flex-1 overflow-y-auto"},lG={key:1,class:"h-full flex flex-col items-center justify-center p-6 text-center"},cG={class:"w-16 h-16 bg-gray-100 rounded-lg flex items-center justify-center mb-4"},uG={class:"text-lg font-medium text-gray-900 mb-2"},dG={class:"text-sm text-gray-500 max-w-xs"},W2=P({__name:"ConfigurationPanels",props:{isOverlay:{type:Boolean,default:!1}},setup(e){const t=dt(Qt),{t:n}=Dn(),{configurationPanels:r}=Yi(),{hasSelection:o}=sa(),i=Q("properties"),s=A(()=>r.value.length>=2),a=A(()=>o.value&&r.value.length>0?r.value[0]:null);return(l,c)=>{const u=oG,p=Gp,h=Aj;return y(),V("div",iG,[S(u,{"is-overlay":l.isOverlay,class:"flex-none"},null,8,["is-overlay"]),d(o)?(y(),V(ge,{key:0},[d(s)?(y(),$(d(Ii).Root,{key:0,modelValue:d(i),"onUpdate:modelValue":c[0]||(c[0]=f=>Ce(i)?i.value=f:null),class:"flex-1 flex flex-col overflow-y-hidden"},{default:O(()=>[S(d(Ii).List,{class:"flex border-b flex-none"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(r),f=>(y(),$(d(Ii).Trigger,{key:f.id,value:f.id,class:"flex items-center gap-0.5 px-1.5 py-2 text-xs font-medium transition-colors text-gray-500 data-selected:border-b-2 data-selected:border-accent data-selected:text-accent hover:text-gray-700"},{default:O(()=>[f.icon&&(d(qo)(f.icon)||d(Pi)(f.icon))?(y(),$(Xn(f.icon),{key:0,editor:d(t),class:"w-3 h-3"},null,8,["editor"])):f.icon&&d($i)(f.icon)?(y(),$(p,{key:1,"render-fn":f.icon,class:"w-3 h-3"},null,8,["render-fn"])):Z("",!0),re(" "+j(f.title),1)]),_:2},1032,["value"]))),128))]),_:1}),D("div",sG,[(y(!0),V(ge,null,Ie(d(r),f=>(y(),$(d(Ii).Content,{key:f.id,value:f.id},{default:O(()=>[d(qo)(f.render)||d(Pi)(f.render)?(y(),$(Xn(f.render),{editor:d(t),key:f.id},null,8,["editor"])):d($i)(f.render)?(y(),$(p,{key:1,"render-fn":f.render,class:"h-full"},null,8,["render-fn"])):Z("",!0)]),_:2},1032,["value"]))),128))])]),_:1},8,["modelValue"])):d(a)?(y(),V("div",aG,[d(qo)(d(a).render)||d(Pi)(d(a).render)?(y(),$(Xn(d(a).render),{key:0,editor:d(t)},null,8,["editor"])):d($i)(d(a).render)?(y(),$(p,{key:1,"render-fn":d(a).render},null,8,["render-fn"])):Z("",!0)])):Z("",!0)],64)):(y(),V("div",lG,[D("div",cG,[S(h,{class:"w-8 h-8 text-gray-400"})]),D("h3",uG,j(d(n)("configPanels.properties")),1),D("p",dG,j(d(n)("configPanels.selectedBlock")),1)]))])}}}),pG={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function fG(e,t){return y(),V("svg",pG,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.286a1.5 1.5 0 0 0 1.492-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25m2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75zM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6m3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711","clip-rule":"evenodd"},null,-1)])])}const hG=fe({name:"heroicons-trash16-solid",render:fG}),gG={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function mG(e,t){return y(),V("svg",gG,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M3.28 2.22a.75.75 0 0 0-1.06 1.06l10.5 10.5a.75.75 0 1 0 1.06-1.06l-1.322-1.323a7 7 0 0 0 2.16-3.11a.87.87 0 0 0 0-.567A7.003 7.003 0 0 0 4.82 3.76zm3.196 3.195l1.135 1.136A1.502 1.502 0 0 1 9.45 8.389l1.136 1.135a3 3 0 0 0-4.109-4.109","clip-rule":"evenodd"},null,-1),D("path",{fill:"currentColor",d:"m7.812 10.994l1.816 1.816A7.003 7.003 0 0 1 1.38 8.28a.87.87 0 0 1 0-.566a7 7 0 0 1 1.113-2.039l2.513 2.513a3 3 0 0 0 2.806 2.806"},null,-1)])])}const vG=fe({name:"heroicons-eye-slash16-solid",render:mG}),bG={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function yG(e,t){return y(),V("svg",bG,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M5.5 3.5A1.5 1.5 0 0 1 7 2h2.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 1 .439 1.061V9.5A1.5 1.5 0 0 1 12 11V8.621a3 3 0 0 0-.879-2.121L9 4.379A3 3 0 0 0 6.879 3.5z"},null,-1),D("path",{fill:"currentColor",d:"M4 5a1.5 1.5 0 0 0-1.5 1.5v6A1.5 1.5 0 0 0 4 14h5a1.5 1.5 0 0 0 1.5-1.5V8.621a1.5 1.5 0 0 0-.44-1.06L7.94 5.439A1.5 1.5 0 0 0 6.878 5z"},null,-1)])])}const xG=fe({name:"heroicons-document-duplicate16-solid",render:yG}),wG={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function _G(e,t){return y(),V("svg",wG,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M8 2a.75.75 0 0 1 .75.75v8.69l1.22-1.22a.75.75 0 1 1 1.06 1.06l-2.5 2.5a.75.75 0 0 1-1.06 0l-2.5-2.5a.75.75 0 1 1 1.06-1.06l1.22 1.22V2.75A.75.75 0 0 1 8 2","clip-rule":"evenodd"},null,-1)])])}const kG=fe({name:"heroicons-arrow-long-down16-solid",render:_G}),CG=["disabled","title"],EG=P({__name:"PreviewToolbarButton",props:{disabled:{type:Boolean,default:!1},title:{},variant:{default:"default"}},emits:["click"],setup(e){const t=e,n=A(()=>`w-6 h-6 flex items-center justify-center border-0 bg-transparent rounded-md cursor-pointer relative disabled:text-gray-600 disabled:cursor-not-allowed [&>svg]:w-3.5 &[&>svg]:h-3.5 ${{default:"text-gray-400 hover:enabled:bg-gray-500 hover:enabled:text-gray-100 active:enabled:bg-gray-600",danger:"text-gray-400 hover:enabled:bg-red-800 hover:enabled:text-red-200 active:enabled:bg-gray-600"}[t.variant]}`);return(r,o)=>(y(),V("button",{disabled:r.disabled,title:r.title,class:Ne(n.value),onClick:o[0]||(o[0]=It(i=>r.$emit("click",i),["stop"]))},[L(r.$slots,"default")],10,CG))}}),OG={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function IG(e,t){return y(),V("svg",OG,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M8 14a.75.75 0 0 0 .75-.75V4.56l1.22 1.22a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0l-2.5 2.5a.75.75 0 0 0 1.06 1.06l1.22-1.22v8.69c0 .414.336.75.75.75","clip-rule":"evenodd"},null,-1)])])}const TG=fe({name:"heroicons-arrow-long-up16-solid",render:IG});function Qm(){const e=dt(Qt);if(!e)throw new Error("useInspector must be used within a component that has access to CraftileEditor");const t=A(()=>e.inspector.state.enabled),n=A(()=>e.inspector.state.hoveredBlockRect),r=A(()=>e.inspector.state.hoveredParentRect),o=A(()=>e.inspector.state.hoveredBlockId),i=A(()=>e.inspector.state.selectedBlockRect),s=A(()=>e.inspector.state.parentFlexDirection),a=A(()=>e.inspector.state.iframeRect);return{isEnabled:t,iframeRect:a,hoveredBlockId:o,hoveredBlockRect:n,hoveredParentRect:r,selectedBlockRect:i,parentFlexDirection:s,enable:()=>e.inspector.enable(),disable:()=>e.inspector.disable(),toggle:()=>e.inspector.toggle(),updateIframeRect:l=>e.inspector.setIframeRect(l),clearHoveredBlock:()=>e.inspector.clearHoveredBlock()}}const SG={key:0,class:"absolute -top-[18.5px] left-0 bg-blue-500/95 text-white px-1 py-0.5 font-semibold text-[0.6rem] flex items-center gap-0.5 pointer-events-none whitespace-nowrap shadow-lg rounded-t"},PG=["innerHTML"],$G=P({__name:"SelectedBlockOverlay",props:{zoomScale:{default:1}},setup(e){const t=e,{t:n}=Dn(),{engine:r,getBlockById:o}=dr(),{isEnabled:i,selectedBlockRect:s,iframeRect:a}=Qm(),{selectedBlock:l,canMoveToPrevious:c,canMoveToNext:u,moveToPrevious:p,moveToNext:h,duplicate:f,toggle:g,remove:m}=sa(),b=Q(),w=Q({width:200,height:42}),E=A(()=>i.value&&s.value&&a.value&&!l.value?.disabled&&!l.value?.ghost),k=A(()=>l.value?.static===!0),v=A(()=>{if(!l.value)return{name:n("common.block"),icon:""};const I=o(l.value.id);if(!I)return{name:n("common.block"),icon:""};const R=r.getBlockSchema(I.type);return{name:R?.meta?.name||I.type||n("common.block"),icon:R?.meta?.icon||""}}),_=A(()=>v.value.name),T=A(()=>v.value.icon),N=A(()=>{if(!s.value||!_.value)return!1;const I=20+_.value.length*7+20;return s.value.width>=I}),C=A(()=>!s.value||!a.value?{}:{position:"absolute",left:`${s.value.left}px`,top:`${s.value.top}px`,width:`${s.value.width}px`,height:`${s.value.height}px`});st([b,E],async()=>{if(b.value&&E.value&&(await Nn(),b.value)){const I=b.value.getBoundingClientRect();w.value={width:I.width,height:I.height}}},{immediate:!0});const x=A(()=>{if(!s.value||!a.value)return{};const I=s.value,R=a.value,{width:M,height:B}=w.value,z=2,J=t.zoomScale,q=I.width*J,K=I.top-R.top{const M=TG,B=EG,z=kG,J=xG,q=vG,K=hG;return d(E)?(y(),V("div",{key:0,class:"absolute inset-0 w-full h-full pointer-events-none z-10",style:Yt(d(C))},[d(N)?(y(),V("div",SG,[D("span",{class:"w-3 h-3 flex items-center justify-center [&_svg]:w-full [&_svg]:h-full [&_svg]:fill-current",innerHTML:d(T)},null,8,PG),D("span",null,j(d(_)),1)])):Z("",!0),R[0]||(R[0]=D("div",{class:"absolute inset-0 border border-blue-500 bg-blue-500/5"},null,-1)),D("div",{ref_key:"toolbarElement",ref:b,class:"absolute flex gap-0.5 bg-gray-800 rounded p-0.5 shadow-lg shadow-black/25 ring-1 ring-white/10 z-10 pointer-events-auto",style:Yt(d(x))},[d(k)?Z("",!0):(y(),$(B,{key:0,disabled:!d(c),title:d(n)("block.moveToPrevious"),onClick:d(p)},{default:O(()=>[S(M,{class:"w-3.5 h-3.5"})]),_:1},8,["disabled","title","onClick"])),d(k)?Z("",!0):(y(),$(B,{key:1,disabled:!d(u),title:d(n)("block.moveToNext"),onClick:d(h)},{default:O(()=>[S(z)]),_:1},8,["disabled","title","onClick"])),d(k)?Z("",!0):(y(),$(B,{key:2,title:d(n)("block.duplicate"),onClick:d(f)},{default:O(()=>[S(J)]),_:1},8,["title","onClick"])),S(B,{title:d(n)("block.disable"),onClick:d(g)},{default:O(()=>[S(q)]),_:1},8,["title","onClick"]),d(k)?Z("",!0):(y(),$(B,{key:3,variant:"danger",title:d(n)("block.remove"),onClick:d(m)},{default:O(()=>[S(K)]),_:1},8,["title","onClick"]))],4)],4)):Z("",!0)}}}),RG={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function AG(e,t){return y(),V("svg",RG,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 4.5v15m7.5-7.5h-15"},null,-1)])])}const ev=fe({name:"heroicons-plus",render:AG}),NG={key:0,class:"absolute top-0 left-0 w-full h-full pointer-events-none z-[1000]"},MG={class:"bg-blue-500 text-white px-1 py-0.5 rounded-t font-medium text-[0.60rem] flex items-center gap-0.5 pointer-events-none absolute -left-[1px] -top-[19px]"},DG=["innerHTML"],LG=P({__name:"HoveredBlockOverlay",emits:["insertBefore","insertAfter","buttonEnter","buttonLeave"],setup(e,{emit:t}){const n=t,{t:r}=Dn(),{engine:o,getBlockById:i}=dr(),{isEnabled:s,iframeRect:a,hoveredBlockId:l,hoveredBlockRect:c,hoveredParentRect:u,parentFlexDirection:p}=Qm(),{selectedBlockId:h}=sa(),f=A(()=>s.value&&l.value&&l.value!==h.value),g=A(()=>{if(!l.value)return{name:r("common.block"),icon:""};const k=i(l.value);if(!k)return{name:r("common.block"),icon:""};const v=o.getBlockSchema(k.type);return{name:v?.meta?.name||k.type||r("common.block"),icon:v?.meta?.icon||""}}),m=A(()=>g.value.name),b=A(()=>g.value.icon),w=A(()=>!u.value||!a.value?{}:{position:"absolute",left:`${u.value.left}px`,top:`${u.value.top}px`,width:`${u.value.width}px`,height:`${u.value.height}px`}),E=A(()=>!c.value||!a.value?{}:{position:"absolute",left:`${c.value.left}px`,top:`${c.value.top}px`,width:`${c.value.width}px`,height:`${c.value.height}px`});return(k,v)=>{const _=ev;return d(f)?(y(),V("div",NG,[d(u)?(y(),V("div",{key:0,class:"border border-dashed border-slate-400 bg-transparent pointer-events-none box-border absolute",style:Yt(d(w))},null,4)):Z("",!0),D("div",{class:"border border-dashed border-blue-500 bg-transparent pointer-events-none box-border relative",style:Yt(d(E))},[D("div",MG,[D("span",{class:"w-3 h-3 flex items-center justify-center [&_svg]:w-full [&_svg]:h-full [&_svg]:fill-current",innerHTML:d(b)},null,8,DG),D("span",null,j(d(m)),1)]),D("button",{class:Ne(["w-4 h-4 bg-blue-500/90 border border-white/20 rounded-full flex items-center justify-center text-white cursor-pointer pointer-events-auto opacity-80 shadow-sm hover:opacity-100 hover:bg-blue-500 absolute",{"-top-2 left-1/2 -translate-x-1/2":d(p)==="column","-left-2 top-1/2 -translate-y-1/2":d(p)==="row"}]),onMouseenter:v[0]||(v[0]=T=>n("buttonEnter",d(l))),onMouseleave:v[1]||(v[1]=T=>n("buttonLeave",d(l))),onClick:v[2]||(v[2]=It(T=>n("insertBefore",d(l),T),["stop"]))},[S(_,{class:"w-3 h-3 fill-current"})],34),D("button",{class:Ne(["w-4 h-4 bg-blue-500/90 border border-white/20 rounded-full flex items-center justify-center text-white cursor-pointer pointer-events-auto opacity-80 shadow-sm hover:opacity-100 hover:bg-blue-500 absolute",{"-bottom-2 left-1/2 -translate-x-1/2":d(p)==="column","-right-2 top-1/2 -translate-y-1/2":d(p)==="row"}]),onMouseenter:v[3]||(v[3]=T=>n("buttonEnter",d(l))),onMouseleave:v[4]||(v[4]=T=>n("buttonLeave",d(l))),onClick:v[5]||(v[5]=It(T=>n("insertAfter",d(l),T),["stop"]))},[S(_,{class:"w-3 h-3 fill-current"})],34)],4)])):Z("",!0)}}});function VG(){const e=dt(Qt);if(!e)throw new Error("usePreview must be used within a component that has access to CraftileEditor");const t=A(()=>e.preview.state.previewUrl),n=A(()=>e.preview.state.isIframeReady),r=A(()=>e.preview.state.previewFrame);return{currentPreviewUrl:t,isIframeReady:n,previewFrame:r,registerFrame:e.preview._registerFrame.bind(e.preview),onMessage:e.preview.onMessage.bind(e.preview),sendMessage:e.preview.sendMessage.bind(e.preview),loadUrl:e.preview.loadUrl.bind(e.preview),loadFromHtml:e.preview.loadFromHtml.bind(e.preview),reload:e.preview.reload.bind(e.preview),getFrame:e.preview.getFrame.bind(e.preview)}}const FG=["src"],BG=P({__name:"PreviewCanvas",setup(e){const{currentDeviceData:t}=Xm(),{currentPreviewUrl:n,registerFrame:r,sendMessage:o}=VG(),{updateIframeRect:i,clearHoveredBlock:s}=Qm(),{open:a,getInsertionContext:l}=uu(),{clearSelection:c}=sa(),u=Q(),p=Q(),h=A(()=>t.value?.width),f=()=>p.value?.getBoundingClientRect().width||0,g=A(()=>{const T=f();if(T<=0||!h.value||h.value===0||h.value<=T)return 1;const N=T/h.value;return Math.min(N,1)}),m=A(()=>{const T=g.value,N=h.value===0?"100%":`${h.value}px`,C=h.value===0?"none":`scale(${T})`;return{width:N,height:`${100/T}%`,transform:C,transformOrigin:"0 0"}}),b=()=>{if(u.value){const T=u.value.getBoundingClientRect();i(T)}},w=T=>{c(),s(),r(T.target),b()},E=T=>{o("craftile.inspector.overlay-button-enter",{blockId:T})},k=T=>{o("craftile.inspector.overlay-button-leave",{blockId:T})},v=(T,N)=>{const C=l(T,"before");a({anchor:N.target,context:C})},_=(T,N)=>{const C=l(T,"after");a({anchor:N.target,context:C})};return Je(()=>{window.addEventListener("scroll",b)}),Sr(()=>{window.removeEventListener("scroll",b)}),(T,N)=>{const C=LG,x=$G;return y(),V("div",{ref_key:"previewWrapper",ref:p,class:"h-full w-full relative preview-wrapper overflow-hidden"},[D("div",{ref_key:"canvasContainer",ref:u,class:"bg-white mx-auto rounded-xs relative transition-transform duration-300 ease-out",style:Yt(d(m))},[D("iframe",{ref:"previewFrame",src:d(n),class:"w-full h-full border-0 preview-iframe",onLoad:w},null,40,FG),S(C,{onButtonEnter:E,onButtonLeave:k,onInsertBefore:v,onInsertAfter:_}),S(x)],4)],512)}}}),HG=P({__name:"AddBlockBtn",props:{blockId:{}},setup(e){const t=e,{open:n,getInsertionContext:r}=uu(),o=Q(null);function i(){o.value&&n({anchor:o.value,context:r(t.blockId,"after")})}return(s,a)=>{const l=ev;return y(),V("div",{ref_key:"el",ref:o,class:"relative flex items-center w-full h-1.5 transition-colors group rounded"},[a[0]||(a[0]=D("div",{class:"h-[2px] w-0 bg-accent/70 group-hover:w-full transition-[width] duration-100 absolute left-1/2 transform -translate-x-1/2"},null,-1)),D("button",{class:"bg-accent text-accent-foreground h-4 w-4 hidden group-hover:flex items-center justify-center absolute left-1/2 transform -translate-x-1/2 rounded-full cursor-pointer hover:ring-2 hover:ring-accent/40",onClick:i},[S(l,{class:"w-3 h-3"})])],512)}}}),zG={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function UG(e,t){return y(),V("svg",zG,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"},null,-1)])])}const jG=fe({name:"heroicons-code-bracket",render:UG}),GG={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function WG(e,t){return y(),V("svg",GG,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0l3-3m-3 3V2.25"},null,-1)])])}const qG=fe({name:"heroicons-arrow-down-on-square",render:WG}),KG={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function YG(e,t){return y(),V("svg",KG,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15m0-3l-3-3m0 0l-3 3m3-3V15"},null,-1)])])}const XG=fe({name:"heroicons-arrow-up-on-square",render:YG}),JG={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ZG(e,t){return y(),V("svg",JG,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3"},null,-1)])])}const QG=fe({name:"heroicons-arrow-long-down",render:ZG}),eW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function tW(e,t){return y(),V("svg",eW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18"},null,-1)])])}const nW=fe({name:"heroicons-arrow-long-up",render:tW}),rW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oW(e,t){return y(),V("svg",rW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0q.083.292.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0q.002-.32.084-.612m7.332 0q.969.073 1.927.184c1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48 48 0 0 1 1.927-.184"},null,-1)])])}const iW=fe({name:"heroicons-clipboard",render:oW}),sW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function aW(e,t){return y(),V("svg",sW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192q.56-.045 1.124-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48 48 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.25 2.25 0 0 0 15 2.25h-1.5a2.25 2.25 0 0 0-2.15 1.586m5.8 0q.099.316.1.664v.75h-6V4.5q.001-.348.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9"},null,-1)])])}const lW=fe({name:"heroicons-clipboard-document",render:aW});function q2(e){const{engine:t,blocks:n,getBlockById:r,getChildrenBlocks:o,setBlockProperty:i,toggleBlock:s,removeBlock:a,duplicateBlock:l,moveBlock:c,regions:u}=dr(),p=A(()=>r(e)),h=A(()=>p.value?.properties||{}),f=A(()=>p.value?.type),g=A(()=>p.value?.disabled),m=A(()=>{if(p.value)return t.getBlockSchema(p.value.type)}),b=A(()=>{if(w.value)return w.value.children?.indexOf(e)??-1;for(const C of u.value){const x=C.blocks.indexOf(e);if(x!==-1)return x}}),w=A(()=>{if(p.value){for(const C of u.value)if(C.blocks.includes(e))return;for(const C of Object.values(n.value))if(C.children?.includes(e))return C}}),E=A(()=>o(e)),k=A(()=>{if(!(b.value===void 0||b.value<=0)){if(w.value){const C=w.value.children[b.value-1];return r(C)}for(const C of u.value)if(C.blocks.includes(e)){const x=C.blocks[b.value-1];return r(x)}}}),v=A(()=>{if(!(b.value===void 0||b.value<0)){if(w.value){if(b.value>=w.value.children.length-1)return;const C=w.value.children[b.value+1];return r(C)}for(const C of u.value)if(C.blocks.includes(e)){if(b.value>=C.blocks.length-1)return;const x=C.blocks[b.value+1];return r(x)}}}),_=A(()=>w.value===void 0),T=A(()=>E.value.length>0),N=A(()=>m.value?.accepts&&m.value.accepts.length>0||T.value);return{block:p,properties:h,type:f,disabled:g,schema:m,index:b,parent:w,children:E,isRootLevel:_,hasChildren:T,canHaveChildren:N,previousSibling:k,nextSibling:v,setProperty:(C,x)=>{i(e,C,x)},toggle:C=>{s(e,C)},remove:()=>{a(e)},duplicate:()=>l(e),moveChild:(C,x)=>{c(C,{targetParentId:e,targetIndex:x})}}}function cW(){const e=dt(Qt);if(!e)throw new Error("useClipboard must be used within a component that has access to CraftileEditor");const{engine:t,pasteBlock:n}=dr(),r=e.ui,o=A(()=>r.state.clipboard.copiedBlock),i=A(()=>o.value!==null);function s(p){try{const h=t.exportBlockAsNestedStructure(p);r.copyBlock(h)}catch(h){console.error("Failed to copy block:",h)}}function a(p){const h=o.value;if(!h)return!1;const f=t.getBlockById(p);if(!f)return!1;if(f.parentId){const g=t.getBlockById(f.parentId);if(!g||!t.getBlocksManager().canBeChild(h.type,g.type)||g.static)return!1}return!0}function l(p){const h=o.value;if(!h||!a(p))return;const f=He(h),g=t.getBlockById(p).parentId;let m;if(g)m=t.getBlockById(g).children.indexOf(p)+1,n(f,{parentId:g,index:m});else{const b=t.getPage();for(const w of b.regions){const E=w.blocks.indexOf(p);if(E!==-1){m=E+1,n(f,{regionId:ut(w),index:m});break}}}}function c(){r.clearClipboard()}function u(p){try{const h=t.exportBlockAsNestedStructure(p),f=JSON.stringify(h,null,2);navigator.clipboard.writeText(f).then(()=>{r.toast({title:"Block copied as JSON",type:"success"})},g=>{console.error("Failed to copy to clipboard:",g),r.toast({title:"Failed to copy to clipboard",type:"error"})})}catch(h){console.error("Failed to export block:",h),r.toast({title:"Failed to export block",type:"error"})}}return{copiedBlock:o,hasCopiedBlock:i,copyBlock:s,canPasteAfter:a,pasteBlockAfter:l,clearClipboard:c,copyBlockAsJSON:u}}const uW=P({__name:"BlockContextMenu",props:{blockId:{}},setup(e){const t=e,{t:n}=Dn(),{engine:r,moveBlock:o,duplicateBlock:i,toggleBlock:s,removeBlock:a}=dr(),{open:l,getInsertionContext:c}=uu(),{block:u,nextSibling:p,previousSibling:h}=q2(t.blockId),{copyBlock:f,canPasteAfter:g,pasteBlockAfter:m,hasCopiedBlock:b,copyBlockAsJSON:w}=cW(),E=A(()=>u.value?.static===!0),k=A(()=>!u.value?.parentId),v=A(()=>{if(!u.value)return null;const Qe=r.getPage(),Bn=u.value;for(const tn of Qe.regions){const nn=tn.blocks.indexOf(Bn.id);if(nn!==-1)return{parentType:"region",parentId:ut(tn),currentIndex:nn,siblingCount:tn.blocks.length}}if(Bn.parentId){const tn=Qe.blocks[Bn.parentId];if(tn){const nn=tn.children.indexOf(Bn.id);if(nn!==-1)return{parentType:"block",parentId:Bn.parentId,currentIndex:nn,siblingCount:tn.children.length}}}return null}),_=A(()=>!u.value||E.value?!1:v.value&&v.value.currentIndex>0),T=A(()=>!u.value||E.value?!1:v.value&&v.value.currentIndex!h.value||h.value.static!==!0),C=A(()=>!p.value||p.value.static!==!0),x=Q(null);function I(){i(t.blockId)}function R(){s(t.blockId)}function M(){if(!u.value||!v.value)return;const Qe=v.value.currentIndex-1;v.value.parentType==="region"?o(t.blockId,{targetRegionId:v.value.parentId,targetIndex:Qe}):v.value.parentType==="block"&&o(t.blockId,{targetParentId:v.value.parentId,targetIndex:Qe})}function B(){if(!u.value||!v.value)return;const Qe=v.value.currentIndex+1;v.value.parentType==="region"?o(t.blockId,{targetRegionId:v.value.parentId,targetIndex:Qe}):v.value.parentType==="block"&&o(t.blockId,{targetParentId:v.value.parentId,targetIndex:Qe})}function z(){if(!x.value?.$el)return;const Qe=c(t.blockId,"before");l({anchor:x.value.$el,context:Qe})}function J(){if(!x.value?.$el)return;const Qe=c(t.blockId,"after");l({anchor:x.value.$el,context:Qe})}function q(){!u.value||E.value||a(t.blockId)}const K=A(()=>k.value?n("block.insertBlockBefore"):n("block.insertSiblingBefore")),X=A(()=>k.value?n("block.insertBlockAfter"):n("block.insertSiblingAfter"));function de(){f(t.blockId)}const Ue=A(()=>b.value&&g(t.blockId));function je(){m(t.blockId)}function Ve(){w(t.blockId)}return(Qe,Bn)=>{const tn=lW,nn=iW,Xr=G2,$o=Lx,Ol=Dx,Ro=nW,va=QG,ba=XG,H=qG,U=jG,W=Mx;return d(u)?(y(),$(d(yt).Root,{key:0},{default:O(()=>[S(d(yt).ContextTrigger,{ref_key:"contextTriggerRef",ref:x,"as-child":""},{default:O(()=>[L(Qe.$slots,"default")]),_:3},512),S(d(yt).Positioner,null,{default:O(()=>[S(d(yt).Content,{class:"bg-white rounded-lg shadow-lg border border-gray-200 py-1 min-w-[180px] focus:outline-none z-50"},{default:O(()=>[S(d(yt).Item,{value:"copy",onSelect:de,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer"},{default:O(()=>[S(tn,{class:"w-4 h-4"}),re(" "+j(d(n)("block.copy")),1)]),_:1}),S(d(yt).Item,{value:"paste-after",disabled:!d(Ue),onSelect:je,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(nn,{class:"w-4 h-4"}),re(" "+j(d(n)("block.pasteAfter")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"duplicate",disabled:d(E),onSelect:I,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(Xr,{class:"w-4 h-4"}),re(" "+j(d(n)("block.duplicate")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"toggle",onSelect:R,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer"},{default:O(()=>[d(u).disabled?(y(),$($o,{key:0,class:"w-4 h-4"})):(y(),$(Ol,{key:1,class:"w-4 h-4"})),re(" "+j(d(u).disabled?d(n)("block.enable"):d(n)("block.disable")),1)]),_:1}),S(d(yt).Separator,{class:"my-1 h-px bg-gray-200"}),S(d(yt).Item,{value:"move-previous",disabled:!d(_),onSelect:M,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(Ro,{class:"w-4 h-4"}),re(" "+j(d(n)("block.moveToPrevious")),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"move-next",disabled:!d(T),onSelect:B,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(va,{class:"w-4 h-4"}),re(" "+j(d(n)("block.moveToNext")),1)]),_:1},8,["disabled"]),S(d(yt).Separator,{class:"my-1 h-px bg-gray-200"}),S(d(yt).Item,{value:"insert-before",disabled:!d(N),onSelect:z,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(ba,{class:"w-4 h-4"}),re(" "+j(d(K)),1)]),_:1},8,["disabled"]),S(d(yt).Item,{value:"insert-after",disabled:!d(C),onSelect:J,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(H,{class:"w-4 h-4"}),re(" "+j(d(X)),1)]),_:1},8,["disabled"]),S(d(yt).Separator,{class:"my-1 h-px bg-gray-200"}),S(d(yt).Item,{value:"copy-as-json",onSelect:Ve,class:"flex items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer"},{default:O(()=>[S(U,{class:"w-4 h-4"}),re(" "+j(d(n)("block.copyAsJson")),1)]),_:1}),S(d(yt).Item,{value:"remove",disabled:d(E),onSelect:q,class:"flex items-center gap-2 px-3 py-2 text-sm text-red-600 hover:bg-red-50 cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"},{default:O(()=>[S(W,{class:"w-4 h-4"}),re(" "+j(d(n)("block.remove")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:3})):Z("",!0)}}}),dW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pW(e,t){return y(),V("svg",dW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25"},null,-1)])])}const fW=fe({name:"heroicons-lock-closed",render:pW}),hW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gW(e,t){return y(),V("svg",hW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5m0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25m9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25"},null,-1)])])}const mW=fe({name:"heroicons-squares-plus",render:gW}),vW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bW(e,t){return y(),V("svg",vW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"},null,-1)])])}const yW=fe({name:"heroicons-arrow-path",render:bW}),xW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function wW(e,t){return y(),V("svg",xW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"},null,-1)])])}const _W=fe({name:"heroicons-cube",render:wW}),kW={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function CW(e,t){return y(),V("svg",kW,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m8.25 4.5l7.5 7.5l-7.5 7.5"},null,-1)])])}const EW=fe({name:"heroicons-chevron-right",render:CW});var OW=Object.defineProperty,xg=Object.getOwnPropertySymbols,K2=Object.prototype.hasOwnProperty,Y2=Object.prototype.propertyIsEnumerable,bC=(e,t,n)=>t in e?OW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))K2.call(t,n)&&bC(e,n,t[n]);if(xg)for(var n of xg(t))Y2.call(t,n)&&bC(e,n,t[n]);return e},X2=(e,t)=>{var n={};for(var r in e)K2.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xg)for(var r of xg(e))t.indexOf(r)<0&&Y2.call(e,r)&&(n[r]=e[r]);return n};const J2="[vue-draggable-plus]: ";function IW(e){console.warn(J2+e)}function TW(e){console.error(J2+e)}function yC(e,t,n){return n>=0&&nn?n.toUpperCase():"")}function PW(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[SW(n)]=e[n]),t),{})}function xC(e,t){return Array.isArray(e)&&e.splice(t,1),e}function wC(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function $W(e){return typeof e>"u"}function RW(e){return typeof e=="string"}function _C(e,t,n){const r=e.children[n];e.insertBefore(t,r)}function xb(e){e.parentNode&&e.parentNode.removeChild(e)}function AW(e,t=document){var n;let r=null;return typeof t?.querySelector=="function"?r=(n=t?.querySelector)==null?void 0:n.call(t,e):r=document.querySelector(e),r||IW(`Element not found: ${e}`),r}function NW(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}function MW(e,t){const n=lc({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=NW(e[r],t[r]):n[r]=t[r]}),n}function DW(e){return e instanceof HTMLElement}function kC(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function LW(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const VW=Object.assign;function CC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ei(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function HW(e,t){if(e==null)return{};var n=BW(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var zW="1.15.2";function Ri(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Xi=Ri(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Jp=Ri(/Edge/i),EC=Ri(/firefox/i),Sd=Ri(/safari/i)&&!Ri(/chrome/i)&&!Ri(/android/i),Z2=Ri(/iP(ad|od|hone)/i),Q2=Ri(/chrome/i)&&Ri(/android/i),e$={capture:!1,passive:!1};function ot(e,t,n){e.addEventListener(t,n,!Xi&&e$)}function et(e,t,n){e.removeEventListener(t,n,!Xi&&e$)}function wg(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function UW(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function eo(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&wg(e,t):wg(e,t))||r&&e===n)return e;if(e===n)break}while(e=UW(e))}return null}var OC=/\s+/g;function gr(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(OC," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(OC," ")}}function $e(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function Ec(e,t){var n="";if(typeof e=="string")n=e;else do{var r=$e(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function t$(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,i=r.length;if(n)for(;o=i,!s)return r;if(r===Ko())break;r=Is(r,!1)}return!1}function Hc(e,t,n,r){for(var o=0,i=0,s=e.children;i2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=HW(n,JW);Zp.pluginEvent.bind(Re)(e,t,ei({dragEl:me,parentEl:Lt,ghostEl:Me,rootEl:$t,nextEl:Na,lastDownEl:Ch,cloneEl:Mt,cloneHidden:Es,dragStarted:rd,putSortable:gn,activeSortable:Re.active,originalEvent:r,oldIndex:cc,oldDraggableIndex:$d,newIndex:mr,newDraggableIndex:_s,hideGhostForTarget:c$,unhideGhostForTarget:u$,cloneNowHidden:function(){Es=!0},cloneNowShown:function(){Es=!1},dispatchSortableEvent:function(i){Wn({sortable:t,name:i,originalEvent:r})}},o))};function Wn(e){XW(ei({putSortable:gn,cloneEl:Mt,targetEl:me,rootEl:$t,oldIndex:cc,oldDraggableIndex:$d,newIndex:mr,newDraggableIndex:_s},e))}var me,Lt,Me,$t,Na,Ch,Mt,Es,cc,mr,$d,_s,Hf,gn,ec=!1,_g=!1,kg=[],Oa,Zr,kb,Cb,SC,PC,rd,Dl,Rd,Ad=!1,zf=!1,Eh,Tn,Eb=[],c0=!1,Cg=[],tv=typeof document<"u",Uf=Z2,$C=Jp||Xi?"cssFloat":"float",ZW=tv&&!Q2&&!Z2&&"draggable"in document.createElement("div"),s$=(function(){if(tv){if(Xi)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),a$=function(e,t){var n=$e(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Hc(e,0,t),i=Hc(e,1,t),s=o&&$e(o),a=i&&$e(i),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+qt(o).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+qt(i).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var u=s.float==="left"?"left":"right";return i&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||l>=r&&n[$C]==="none"||i&&n[$C]==="none"&&l+c>r)?"vertical":"horizontal"},QW=function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,i=n?e.width:e.height,s=n?t.left:t.top,a=n?t.right:t.bottom,l=n?t.width:t.height;return r===s||o===a||r+i/2===s+l/2},e9=function(e,t){var n;return kg.some(function(r){var o=r[xr].options.emptyInsertThreshold;if(!(!o||Vx(r))){var i=qt(r),s=e>=i.left-o&&e<=i.right+o,a=t>=i.top-o&&t<=i.bottom+o;if(s&&a)return n=r}}),n},l$=function(e){function t(o,i){return function(s,a,l,c){var u=s.options.group.name&&a.options.group.name&&s.options.group.name===a.options.group.name;if(o==null&&(i||u))return!0;if(o==null||o===!1)return!1;if(i&&o==="clone")return o;if(typeof o=="function")return t(o(s,a,l,c),i)(s,a,l,c);var p=(i?s:a).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var n={},r=e.group;(!r||kh(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},c$=function(){!s$&&Me&&$e(Me,"display","none")},u$=function(){!s$&&Me&&$e(Me,"display","")};tv&&!Q2&&document.addEventListener("click",function(e){if(_g)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_g=!1,!1},!0);var Ia=function(e){if(me){e=e.touches?e.touches[0]:e;var t=e9(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[xr]._onDragOver(n)}}},t9=function(e){me&&me.parentNode[xr]._isOutsideThisEl(e.target)};function Re(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Hi({},t),e[xr]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return a$(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Re.supportPointer!==!1&&"PointerEvent"in window&&!Sd,emptyInsertThreshold:5};Zp.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);l$(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:ZW,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ot(e,"pointerdown",this._onTapStart):(ot(e,"mousedown",this._onTapStart),ot(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ot(e,"dragover",this),ot(e,"dragenter",this)),kg.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Hi(this,qW())}Re.prototype={constructor:Re,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Dl=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,me):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,i=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,a=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,c=r.filter;if(c9(n),!me&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||r.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&Sd&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=eo(a,r.draggable,n,!1),!(a&&a.animated)&&Ch!==a)){if(cc=Dr(a),$d=Dr(a,r.draggable),typeof c=="function"){if(c.call(this,e,a,this)){Wn({sortable:t,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),nr("filter",t,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=eo(l,u.trim(),n,!1),u)return Wn({sortable:t,rootEl:u,name:"filter",targetEl:a,fromEl:n,toEl:n}),nr("filter",t,{evt:e}),!0}),c)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!eo(l,r.handle,n,!1)||this._prepareDragStart(e,s,a)}}},_prepareDragStart:function(e,t,n){var r=this,o=r.el,i=r.options,s=o.ownerDocument,a;if(n&&!me&&n.parentNode===o){var l=qt(n);if($t=o,me=n,Lt=me.parentNode,Na=me.nextSibling,Ch=n,Hf=i.group,Re.dragged=me,Oa={target:me,clientX:(t||e).clientX,clientY:(t||e).clientY},SC=Oa.clientX-l.left,PC=Oa.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,me.style["will-change"]="all",a=function(){if(nr("delayEnded",r,{evt:e}),Re.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!EC&&r.nativeDraggable&&(me.draggable=!0),r._triggerDragStart(e,t),Wn({sortable:r,name:"choose",originalEvent:e}),gr(me,i.chosenClass,!0)},i.ignore.split(",").forEach(function(c){t$(me,c.trim(),Ob)}),ot(s,"dragover",Ia),ot(s,"mousemove",Ia),ot(s,"touchmove",Ia),ot(s,"mouseup",r._onDrop),ot(s,"touchend",r._onDrop),ot(s,"touchcancel",r._onDrop),EC&&this.nativeDraggable&&(this.options.touchStartThreshold=4,me.draggable=!0),nr("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Jp||Xi))){if(Re.eventCanceled){this._onDrop();return}ot(s,"mouseup",r._disableDelayedDrag),ot(s,"touchend",r._disableDelayedDrag),ot(s,"touchcancel",r._disableDelayedDrag),ot(s,"mousemove",r._delayedDragTouchMoveHandler),ot(s,"touchmove",r._delayedDragTouchMoveHandler),i.supportPointer&&ot(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(a,i.delay)}else a()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){me&&Ob(me),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;et(e,"mouseup",this._disableDelayedDrag),et(e,"touchend",this._disableDelayedDrag),et(e,"touchcancel",this._disableDelayedDrag),et(e,"mousemove",this._delayedDragTouchMoveHandler),et(e,"touchmove",this._delayedDragTouchMoveHandler),et(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?ot(document,"pointermove",this._onTouchMove):t?ot(document,"touchmove",this._onTouchMove):ot(document,"mousemove",this._onTouchMove):(ot(me,"dragend",this),ot($t,"dragstart",this._onDragStart));try{document.selection?Oh(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(ec=!1,$t&&me){nr("dragStarted",this,{evt:t}),this.nativeDraggable&&ot(document,"dragover",t9);var n=this.options;!e&&gr(me,n.dragClass,!1),gr(me,n.ghostClass,!0),Re.active=this,e&&this._appendGhost(),Wn({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Zr){this._lastX=Zr.clientX,this._lastY=Zr.clientY,c$();for(var e=document.elementFromPoint(Zr.clientX,Zr.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Zr.clientX,Zr.clientY),e!==t);)t=e;if(me.parentNode[xr]._isOutsideThisEl(e),t)do{if(t[xr]){var n=void 0;if(n=t[xr]._onDragOver({clientX:Zr.clientX,clientY:Zr.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);u$()}},_onTouchMove:function(e){if(Oa){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,i=Me&&Ec(Me,!0),s=Me&&i&&i.a,a=Me&&i&&i.d,l=Uf&&Tn&&TC(Tn),c=(o.clientX-Oa.clientX+r.x)/(s||1)+(l?l[0]-Eb[0]:0)/(s||1),u=(o.clientY-Oa.clientY+r.y)/(a||1)+(l?l[1]-Eb[1]:0)/(a||1);if(!Re.active&&!ec){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(Wn({rootEl:Lt,name:"add",toEl:Lt,fromEl:$t,originalEvent:e}),Wn({sortable:this,name:"remove",toEl:Lt,originalEvent:e}),Wn({rootEl:Lt,name:"sort",toEl:Lt,fromEl:$t,originalEvent:e}),Wn({sortable:this,name:"sort",toEl:Lt,originalEvent:e})),gn&&gn.save()):mr!==cc&&mr>=0&&(Wn({sortable:this,name:"update",toEl:Lt,originalEvent:e}),Wn({sortable:this,name:"sort",toEl:Lt,originalEvent:e})),Re.active&&((mr==null||mr===-1)&&(mr=cc,_s=$d),Wn({sortable:this,name:"end",toEl:Lt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){nr("nulling",this),$t=me=Lt=Me=Na=Mt=Ch=Es=Oa=Zr=rd=mr=_s=cc=$d=Dl=Rd=gn=Hf=Re.dragged=Re.ghost=Re.clone=Re.active=null,Cg.forEach(function(e){e.checked=!0}),Cg.length=kb=Cb=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":me&&(this._onDragOver(e),n9(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,o=n.length,i=this.options;ro.right+i||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>o.bottom+i||e.clientX>r.right&&e.clientY>r.top}function s9(e,t,n,r,o,i,s,a){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,p=r?n.bottom:n.right,h=!1;if(!s){if(a&&Ehu+c*i/2:lp-Eh)return-Rd}else if(l>u+c*(1-o)/2&&lp-c*i/2)?l>u+c/2?1:-1:0}function a9(e){return Dr(me){if(J&&o?.length!==M.childNodes.length)return R.insertBefore(J,q.nextSibling),!0;const X=M.childNodes[K];J=M?.replaceChild(q,X)})}}catch(J){B=J}finally{o=null}Nn(()=>{if(AC(),B)throw B})}const w={onUpdate:m,onStart:h,onAdd:f,onRemove:g,onEnd:b};function E(C){const x=d(i);return C||(C=RW(x)?AW(x,r?.$el):x),C&&!DW(C)&&(C=C.$el),C||TW("Root element not found"),C}function k(){var C;const x=(C=d(a))!=null?C:{},{immediate:I,clone:R}=x,M=X2(x,["immediate","clone"]);return kC(M,(B,z)=>{LW(B)&&(M[B]=(J,...q)=>{const K=h9();return VW(J,K),z(J,...q)})}),MW(s===null?{}:w,M)}const v=C=>{C=E(C),l&&_.destroy(),l=new Re(C,k())};st(()=>a,()=>{l&&kC(k(),(C,x)=>{l?.option(C,x)})},{deep:!0});const _={option:(C,x)=>l?.option(C,x),destroy:()=>{l?.destroy(),l=null},save:()=>l?.save(),toArray:()=>l?.toArray(),closest:(...C)=>l?.closest(...C)},T=()=>_?.option("disabled",!0),N=()=>_?.option("disabled",!1);return f9(()=>{c&&v()}),p9(_.destroy),lc({start:v,pause:T,resume:N},_)}const f0=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],m9=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...f0.map(e=>`on${e.replace(/^\S/,t=>t.toUpperCase())}`)],h$=P({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:m9,emits:["update:modelValue",...f0],setup(e,{slots:t,emit:n,expose:r,attrs:o}){const i=f0.reduce((u,p)=>{const h=`on${p.replace(/^\S/,f=>f.toUpperCase())}`;return u[h]=(...f)=>n(p,...f),u},{}),s=A(()=>{const u=j1(e),{modelValue:p}=u,h=X2(u,["modelValue"]),f=Object.entries(h).reduce((g,[m,b])=>{const w=d(b);return w!==void 0&&(g[m]=w),g},{});return lc(lc({},i),PW(lc(lc({},o),f)))}),a=A({get:()=>e.modelValue,set:u=>n("update:modelValue",u)}),l=Q(),c=Tr(g9(e.target||l,a,s));return r(c),()=>{var u;return uo(e.tag||"div",{ref:l},(u=t?.default)==null?void 0:u.call(t,c))}}}),v9=(e,t)=>e.name?e.name:t?.meta?.name?t.meta.name:e.type.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase());function b9(){const e=dt(Qt),{engine:t,getBlockById:n}=dr(),r=e?.blockLabelFunction,o=s=>{const a=n(s);if(!a||!r)return"";const l=t.getBlockSchema(a.type);return r(a,l)},i=s=>{const a=n(s);if(!a)return"Unknown Block";const l=t.getBlockSchema(a.type);return v9(a,l)};return{getBlockLabel:o,getBlockSchemaName:i,getBlockLabelReactive:s=>A(()=>o(s)),getBlockSchemaNameReactive:s=>A(()=>i(s))}}const y9=["data-block-id"],x9=["data-block-id","data-selected"],w9={key:1,class:"w-5 h-full"},_9={class:"w-4 h-4 mr-1 flex items-center justify-center relative"},k9=["innerHTML"],C9={class:"flex-1 flex items-center gap-1 min-w-0"},E9={class:"shrink-0"},O9={key:0,class:"italic text-gray-500 truncate text-xs"},I9={class:"flex items-center gap-0.5"},T9=["title"],S9=["title"],P9={key:0,class:"ml-3 space-y-1"},$9={key:0,class:""},R9=P({__name:"BlockItem",props:{blockId:{},level:{},isDragging:{type:Boolean}},setup(e){const t=e,{t:n}=Dn(),r=Q(!1),{block:o,children:i,hasChildren:s,canHaveChildren:a,nextSibling:l,toggle:c,moveChild:u,schema:p}=q2(t.blockId),{isExpanded:h,toggleExpanded:f}=Nx(),{getBlockLabelReactive:g,getBlockSchemaNameReactive:m}=b9(),{selectedBlockId:b,selectBlock:w}=sa(),{open:E}=uu(),{engine:k,moveBlock:v,removeBlock:_,blocks:T}=dr(),N=A(()=>b.value===t.blockId),C=A(()=>h(t.blockId)),x=A(()=>o.value?.static===!0),I=A(()=>o.value?.repeated===!0),R=A(()=>o.value?.ghost===!0),M=m(t.blockId),B=g(t.blockId),z=A(()=>p.value?.meta?.icon),J=A(()=>!l.value||l.value.static!==!0);function q(je){const Ve=je.target,Qe={parentId:t.blockId,index:0};E({anchor:Ve,context:Qe})}function K(je){if(je.related&&je.related.classList.contains("is-static"))return!1;if(!je.drag||!je.target||!je.to)return!0;const Ve=je.dragged.getAttribute?.("data-block-id");if(!Ve)return!1;const Qe=T.value[Ve];if(!Qe)return!1;const Bn=je.to?.parentElement?.closest?.("[data-block-id]")?.getAttribute?.("data-block-id");if(!Bn)return!1;const tn=T.value[Bn];return tn?k.getBlocksManager().canBeChild(Qe.type,tn.type):!1}function X(je){const{oldIndex:Ve,newIndex:Qe,from:Bn,to:tn}=je;if(typeof Qe>"u")return;const nn=je.item?.getAttribute?.("data-block-id");if(!nn)return;const Xr=Bn===tn;if(Xr&&Ve===Qe)return;if(Xr){u(nn,Qe);return}const $o=tn?.parentElement?.closest?.("[data-block-id]")?.getAttribute?.("data-block-id");$o&&v(nn,{targetParentId:$o,targetIndex:Qe})}function de(je){return K(je)}function Ue(){_(t.blockId)}return(je,Ve)=>{const Qe=EW,Bn=_W,tn=yW,nn=mW,Xr=fW,$o=Dx,Ol=Lx,Ro=Mx,va=uW,ba=iS("BlockItem",!0),H=ev,U=HG;return d(o)?(y(),V("div",{key:0,class:Ne({"bg-gray-100":d(r),"is-static":d(x)}),"data-block-id":d(o).id},[S(va,{"block-id":d(o).id},{default:O(()=>[D("div",{"data-block-id":d(o).id,"data-selected":d(N)?"true":void 0,class:Ne(["flex items-center h-8 text-sm hover:bg-gray-50 data-selected:bg-accent/10 data-selected:border data-selected:border-accent/20 data-selected:hover:bg-accent/10 cursor-pointer rounded-md group transition-all duration-200",{"text-gray-700":!d(o).disabled&&!d(R),"text-gray-500":d(R)&&!d(o).disabled,"text-gray-400":d(o).disabled}]),onClick:Ve[3]||(Ve[3]=W=>d(w)(d(o).id))},[d(a)?(y(),V("button",{key:0,onClick:Ve[0]||(Ve[0]=It(()=>d(f)(t.blockId),["stop"])),class:"h-full mr-0.5 px-1 flex items-center justify-center hover:bg-gray-200 rounded cursor-pointer"},[S(Qe,{class:Ne(["w-3 h-3 transition-transform duration-200",{"rotate-90":d(C)}])},null,8,["class"])])):(y(),V("div",w9)),D("div",_9,[d(R)?(y(),$(Bn,{key:0,class:Ne([{"group-hover:opacity-0":d(x)},"w-4 h-4 transition-opacity text-gray-400"])},null,8,["class"])):d(I)?(y(),$(tn,{key:1,class:Ne([{"group-hover:opacity-0":d(x)},"w-4 h-4 transition-opacity"])},null,8,["class"])):d(z)?(y(),V("span",{key:2,innerHTML:d(z),class:Ne([{"group-hover:opacity-0":d(x)},"[&>svg]:w-4 [&>svg]:h-4 h-4 w-4 transition-opacity"])},null,10,k9)):(y(),$(nn,{key:3,class:Ne([{"group-hover:opacity-0":d(x)},"transition-opacity"])},null,8,["class"])),d(x)?(y(),$(Xr,{key:4,class:"w-4 h-4 absolute opacity-0 group-hover:opacity-100 transition-opacity text-gray-400"})):Z("",!0)]),D("div",C9,[D("span",E9,j(d(M)),1),d(B)?(y(),V("span",O9,"- "+j(d(B)),1)):Z("",!0)]),D("div",I9,[D("button",{onClick:Ve[1]||(Ve[1]=It(()=>d(c)(),["stop"])),class:Ne(["p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",{"opacity-100":d(o).disabled,"opacity-0 group-hover:opacity-100":!d(o).disabled}]),title:d(o).disabled?d(n)("block.show"):d(n)("block.hide")},[d(o).disabled?(y(),$($o,{key:0,class:"w-4 h-4"})):(y(),$(Ol,{key:1,class:"w-4 h-4"}))],10,T9),d(x)?Z("",!0):(y(),V("button",{key:0,onClick:Ve[2]||(Ve[2]=It(()=>Ue(),["stop"])),class:"p-1 hover:bg-red-100 rounded text-gray-500 hover:text-red-600 transition-colors opacity-0 group-hover:opacity-100",title:d(n)("block.remove")},[S(Ro,{class:"w-4 h-4"})],8,S9))])],10,x9)]),_:1},8,["block-id"]),d(a)&&d(C)?(y(),V("div",P9,[S(d(h$),{"model-value":d(o).children,animation:200,group:{name:"blocks",pull:!0,put:K},"ghost-class":"ghost-block","chosen-class":"chosen-block","drag-class":"drag-block",filter:".is-static",onEnd:X,onMove:de},{default:O(()=>[(y(!0),V(ge,null,Ie(d(i),W=>(y(),$(ba,{key:W.id,"block-id":W.id,level:je.level+1},null,8,["block-id","level"]))),128))]),_:1},8,["model-value","group"]),d(s)?Z("",!0):(y(),V("div",$9,[D("button",{onClick:Ve[4]||(Ve[4]=W=>q(W)),class:"flex items-center gap-1.5 w-full p-1.5 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded transition-colors"},[S(H,{class:"w-3 h-3"}),D("span",null,j(d(n)("layers.addBlockToBlock")),1)])]))])):Z("",!0),d(J)?(y(),$(U,{key:`add-block-${d(o).id}`,"block-id":d(o).id,onMouseenter:Ve[5]||(Ve[5]=W=>r.value=!0),onMouseleave:Ve[6]||(Ve[6]=W=>r.value=!1)},null,8,["block-id"])):Z("",!0)],10,y9)):Z("",!0)}}}),nv=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},A9={},N9={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"w-4 h-4"};function M9(e,t){return y(),V("svg",N9,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M4 2a2 2 0 0 0-2 2v10h2V4h10V2zm4 4a2 2 0 0 0-2 2v10h2V8h10V6zm12 6v8h-8v-8zm0-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2m-1 7h-6v-2h6z"},null,-1)])])}const D9=nv(A9,[["render",M9]]),Vu={small:640,medium:768,large:1024,extraLarge:1280,extraExtraLarge:1536};function g$(){const e=Q(0),t=()=>{e.value=window.innerWidth},n=A(()=>e.value>=Vu.small),r=A(()=>e.value>=Vu.medium),o=A(()=>e.value>=Vu.large),i=A(()=>e.value>=Vu.extraLarge),s=A(()=>e.value>=Vu.extraExtraLarge);return Je(()=>{t(),window.addEventListener("resize",t)}),Sr(()=>{window.removeEventListener("resize",t)}),{width:e,isSmall:n,isMedium:r,isLarge:o,isExtraLarge:i,isExtraExtraLarge:s}}const L9={class:"h-full flex flex-col overflow-y-hidden relative"},V9={class:"flex-none h-12 flex items-center border-b px-4"},F9={class:"flex-1 overflow-y-auto"},B9={class:"flex items-center justify-between"},H9={class:"text-sm capitalize"},z9=["title","onClick"],U9={class:"my-2"},j9={key:0,class:"flex items-center justify-center py-2"},G9=["onClick"],W9={key:0,class:"absolute inset-0 z-10"},q9=P({__name:"LayersPanel",setup(e){const{t}=Dn(),{regions:n,moveBlock:r}=dr(),{collapseRegion:o,expandAncestors:i}=Nx(),{open:s}=uu(),a=j2(),{isExtraExtraLarge:l}=g$(),{hasSelection:c}=sa();a.on("ui:block:select",g=>{i(g.blockId),Nn(()=>{const m=document.querySelector(`[data-block-id="${g.blockId}"]`);m&&m.scrollIntoView({behavior:"smooth",block:"nearest"})})});const u=A(()=>Array.isArray(n.value)?n.value:[]);function p(g,m){const{oldIndex:b,newIndex:w}=g;if(typeof w>"u"||b===w)return;const E=u.value.find(v=>ut(v)===m);if(!E)return;const k=E.blocks[b];k&&r(k,{targetRegionId:m,targetIndex:w})}function h(g){if(g.related&&g.related.classList.contains("is-static"))return!1}function f(g,m){const b=g.target;s({anchor:b,context:{regionId:m,index:0}})}return(g,m)=>{const b=R9,w=ev,E=W2;return y(),V("div",L9,[D("div",V9,[D("h2",null,j(d(t)("layers.header")),1)]),D("div",F9,[(y(!0),V(ge,null,Ie(d(u),k=>(y(),V("div",{key:d(ut)(k),class:"not-last:border-b px-4 mt-2"},[D("div",B9,[D("h3",H9,j(k.name),1),k.blocks.length>0?(y(),V("button",{key:0,class:"p-1 hover:bg-gray-200 rounded text-gray-500 hover:text-gray-700 transition-colors",title:d(t)("layers.collapseAll"),onClick:v=>d(o)(d(ut)(k))},[S(D9,{class:"w-4 h-4"})],8,z9)):Z("",!0)]),D("div",U9,[S(d(h$),{"model-value":k.blocks,animation:200,"ghost-class":"ghost-block","chosen-class":"chosen-block","drag-class":"drag-block",filter:".is-static",onEnd:v=>p(v,d(ut)(k)),onMove:h},{default:O(()=>[(y(!0),V(ge,null,Ie(k.blocks,v=>(y(),$(b,{key:v,"block-id":v,level:0},null,8,["block-id"]))),128))]),_:2},1032,["model-value","onEnd"]),k.blocks.length===0?(y(),V("div",j9,[D("button",{onClick:v=>f(v,d(ut)(k)),class:"flex w-full items-center gap-2 px-2 py-1 text-sm text-accent/90 hover:text-accent hover:bg-accent-foreground rounded-lg transition-colors cursor-pointer"},[S(w,{class:"w-4 h-4"}),re(" "+j(d(t)("layers.addBlockToRegion")),1)],8,G9)])):Z("",!0)])]))),128))]),d(c)&&!d(l)?(y(),V("div",W9,[S(E,{"is-overlay":""})])):Z("",!0)])}}}),K9={class:"h-full w-75 border-r flex-none relative"},Y9=P({__name:"Panels",setup(e){const t=dt(Qt),{activeSidebarPanel:n,sidebarPanels:r}=Yi(),o=A(()=>r.value.find(i=>i.id===n.value));return(i,s)=>{const a=q9,l=Gp;return y(),V("aside",K9,[d(n)==="layers"?(y(),$(a,{key:0,class:"h-full"})):d(o)?(y(),V(ge,{key:1},[d(qo)(d(o).render)||d(Pi)(d(o).render)?(y(),$(Xn(d(o).render),{key:0,editor:d(t),class:"h-full"},null,8,["editor"])):d($i)(d(o).render)?(y(),$(l,{key:1,"render-fn":d(o).render,class:"h-full"},null,8,["render-fn"])):Z("",!0)],64)):Z("",!0)])}}}),X9={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function J9(e,t){return y(),V("svg",X9,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6.429 9.75L2.25 12l4.179 2.25m0-4.5l5.571 3l5.571-3m-11.142 0L2.25 7.5L12 2.25l9.75 5.25l-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0l4.179 2.25L12 21.75L2.25 16.5l4.179-2.25m11.142 0l-5.571 3l-5.571-3"},null,-1)])])}const Z9=fe({name:"heroicons-square3-stack3d",render:J9}),Q9={class:"h-full w-14 border-r bg-white"},eq={class:"flex flex-col gap-1 p-1.5"},tq=["title"],nq=["onClick","title"],rq={key:2},oq=P({__name:"Sidebar",setup(e){const{t}=Dn(),{activeSidebarPanel:n,setActiveSidebarPanel:r,sidebarPanels:o}=Yi(),i=dt(Qt);return(s,a)=>{const l=Z9,c=Gp;return y(),V("div",Q9,[D("div",eq,[D("button",{onClick:a[0]||(a[0]=u=>d(r)("layers")),class:Ne(["aspect-square flex items-center justify-center rounded-md cursor-pointer transition-colors",d(n)==="layers"?"bg-accent-foreground text-accent":"hover:bg-gray-100 text-gray-700"]),title:d(t)("layers.title")},[S(l,{class:"w-5"})],10,tq),(y(!0),V(ge,null,Ie(d(o),u=>(y(),V("button",{key:"panel-icon-"+u.id,onClick:p=>d(r)(u.id),class:Ne(["aspect-square flex items-center justify-center rounded-md cursor-pointer transition-colors text-sm font-medium",d(n)===u.id?"bg-accent-foreground text-accent":"hover:bg-gray-100 text-gray-700"]),title:u.title},[u.icon&&(d(qo)(u.icon)||d(Pi)(u.icon))?(y(),$(Xn(u.icon),{key:0,editor:d(i),class:"w-5 h-5"},null,8,["editor"])):u.icon&&d($i)(u.icon)?(y(),$(c,{key:1,"render-fn":u.icon,class:"w-5 h-5"},null,8,["render-fn"])):(y(),V("span",rq,j(u.title.charAt(0).toUpperCase()),1))],10,nq))),128))])])}}}),iq=P({__name:"HeaderActionRenderer",props:{action:{}},setup(e){const t=e,n=dt(Qt),r=Q(!1),o=()=>{r.value=!r.value},i=s=>{t.action.button&&t.action.button.onClick(s,{toggleLoading:o,editor:n})};return(s,a)=>{const l=Vt,c=Gp;return y(),$(JT,null,[s.action.button?(y(),$(l,{key:0,variant:s.action.button.variant||"default",loading:d(r),onClick:i},{default:O(()=>[re(j(s.action.button.text),1)]),_:1},8,["variant","loading"])):d(qo)(s.action.render)||d(Pi)(s.action.render)?(y(),$(Xn(s.action.render),{key:1,editor:d(n)},null,8,["editor"])):d($i)(s.action.render)?(y(),$(c,{key:2,"render-fn":s.action.render},null,8,["render-fn"])):Z("",!0)],1024)}}}),sq={class:"h-14 flex items-center justify-between relative z-50 px-4 border-b bg-white"},aq={class:"flex items-center gap-2"},lq={class:"flex items-center gap-2"},cq={class:"flex items-center gap-2"},uq=P({__name:"Header",setup(e){const{headerActions:t}=Yi(),n=A(()=>t.value.filter(i=>i.slot==="left")),r=A(()=>t.value.filter(i=>i.slot==="center")),o=A(()=>t.value.filter(i=>i.slot==="right"));return(i,s)=>{const a=iq;return y(),V("header",sq,[D("div",aq,[(y(!0),V(ge,null,Ie(d(n),l=>(y(),$(a,{key:l.id,action:l},null,8,["action"]))),128))]),D("div",lq,[(y(!0),V(ge,null,Ie(d(r),l=>(y(),$(a,{key:l.id,action:l},null,8,["action"]))),128))]),D("div",cq,[(y(!0),V(ge,null,Ie(d(o),l=>(y(),$(a,{key:l.id,action:l},null,8,["action"]))),128))])])}}}),dq={class:"h-full w-full flex flex-col overflow-hidden"},pq={class:"flex-1 flex overflow-hidden relative"},fq={class:"flex-1 p-3 bg-gray-100 overflow-auto preview-container flex justify-center"},hq={key:0,class:"h-full flex-none overflow-y-hidden w-75 border-l"},gq=P({__name:"Editor",setup(e){const{isExtraExtraLarge:t}=g$(),{keyboardShortcuts:n}=Yi(),r=dt(Qt),o=i=>{const s=[i.ctrlKey&&"ctrl",i.metaKey&&"meta",i.shiftKey&&"shift",i.altKey&&"alt",i.key.toLowerCase()].filter(Boolean).join("+"),a=n.value.get(s);a&&(i.preventDefault(),i.stopPropagation(),a.handler({editor:r}))};return(i,s)=>{const a=uq,l=oq,c=Y9,u=BG,p=W2,h=Pj,f=ej,g=jU;return y(),V("div",{class:"__craftile",style:{height:"100%",width:"100%"},tabindex:"0",onKeydown:o},[D("div",dq,[S(a),D("main",pq,[S(l),S(c),D("div",fq,[S(u)]),d(t)?(y(),V("aside",hq,[S(p)])):Z("",!0)])]),S(h),S(f),S(g)],32)}}});let mq=class{events;state;toaster;constructor(t){this.events=t,this.state=Tr({activeSidebarPanel:"layers",sidebarPanels:new Map,headerActions:new Map,configurationPanels:new Map,modals:new Map,openModals:[],keyboardShortcuts:new Map,propertyFields:new Map,selectedBlockId:null,layersPanel:{expandedBlocks:new Set},clipboard:{copiedBlock:null}}),this.toaster=AU({placement:"bottom",overlap:!0,gap:16})}generateId(t){return t+"-"+(Date.now().toString(36)+Math.random().toString(36).substr(2))}setSelectedBlock(t){const n=this.state.selectedBlockId;this.state.selectedBlockId=t,t!==null&&t!==n&&this.events.emit("ui:block:select",{blockId:t})}clearSelectedBlock(){this.state.selectedBlockId&&(this.state.selectedBlockId=null,this.events.emit("ui:block:clear-selection",{blockId:null}))}toast(t){typeof t=="string"?this.toaster.create({description:t,type:"info"}):this.toaster.create(t)}registerSidebarPanel(t){const n={...t,id:t.id||this.generateId("sidebar-panel"),render:typeof t.render=="object"?fe(t.render):t.render,icon:t.icon&&typeof t.icon=="object"?fe(t.icon):t.icon};this.state.sidebarPanels.set(n.id,n)}removeSidebarPanel(t){this.state.sidebarPanels.delete(t)}registerHeaderAction(t){if(!t.render&&!t.button)throw new Error("HeaderAction must have either a render or button configuration");if(t.render&&t.button)throw new Error("HeaderAction cannot have both render and button configurations");const n={...t,id:t.id||this.generateId("header-action"),render:typeof t.render=="object"?fe(t.render):t.render};this.state.headerActions.set(n.id,n)}removeHeaderAction(t){this.state.headerActions.delete(t)}registerConfigurationPanel(t){const n={...t,id:t.id||this.generateId("config-panel"),render:typeof t.render=="object"?fe(t.render):t.render,icon:t.icon&&typeof t.icon=="object"?fe(t.icon):t.icon};this.state.configurationPanels.set(n.id,n)}removeConfigurationPanel(t){this.state.configurationPanels.delete(t)}registerPropertyField(t){const n={...t,render:typeof t.render=="object"?fe(t.render):t.render};this.state.propertyFields.set(t.type,n)}removePropertyField(t){this.state.propertyFields.delete(t)}registerModal(t){const n={...t,id:t.id||this.generateId("modal"),render:typeof t.render=="object"?fe(t.render):t.render};this.state.modals.set(n.id,n)}unregisterModal(t){this.state.modals.delete(t),this.closeModal(t)}openModal(t){this.state.openModals.includes(t)||(this.state.openModals.push(t),this.events.emit("ui:modal:open",{modalId:t}))}closeModal(t){const n=this.state.openModals.indexOf(t);n>=0&&(this.state.openModals.splice(n,1),this.events.emit("ui:modal:close",{modalId:t}))}registerKeyboardShortcut(t){this.state.keyboardShortcuts.set(t.key,t)}removeKeyboardShortcut(t){this.state.keyboardShortcuts.delete(t)}copyBlock(t){this.state.clipboard.copiedBlock=t,this.events.emit("ui:clipboard:copy",{block:t})}getCopiedBlock(){return this.state.clipboard.copiedBlock}clearClipboard(){this.state.clipboard.copiedBlock=null,this.events.emit("ui:clipboard:clear",{})}};const vq={class:"text-xs whitespace-nowrap capitalize max-w-[120px] overflow-hidden text-ellipsis"},bq={class:"flex items-center justify-between px-4 py-3 border-b border-solid"},yq={class:"text-sm font-semibold text-gray-900 m-0"},xq={class:"rounded cursor-pointer text-gray-500 transition-all duration-200 flex items-center justify-center p-1 hover:text-gray-700"},wq={class:"flex flex-col gap-1 p-2"},_q=["onClick"],kq={class:"text-xs ml-auto"},Cq={class:"px-4 py-3 border-t"},Eq={class:"text-[13px] font-semibold text-gray-700 mt-0 mb-3 mx-0"},Oq={class:"flex flex-wrap gap-2"},Iq={class:"flex-1"},Tq={for:"custom-width",class:"block text-xs text-gray-500 mb-1"},Sq={class:"mt-4"},Pq={class:"flex flex-col gap-1 mt-2"},$q=["onClick"],Rq={class:"flex-1"},Aq=["onClick"],Nq={inheritAttrs:!1},Mq=P({...Nq,__name:"DeviceModeSwitcher",setup(e){const{t}=Dn(),{currentDevice:n,currentDeviceData:r,devicePresets:o,savedCustomDevices:i,setDeviceMode:s,addCustomDevice:a,removeCustomDevice:l}=Xm(),c=Q(!1),u=Q(768),p={desktop:mg,tablet:Zy,mobile:l2},h=w=>p[w||"desktop"]||mg,f=()=>h(r.value.icon),g=w=>{s(w),c.value=!1},m=()=>{const w=`custom-${u.value}`;a({id:w,label:`${t("common.custom")} ${u.value}px`,width:u.value}),s(w),c.value=!1},b=w=>{l(w)};return(w,E)=>{const k=Ax,v=Vt,_=Sx,T=Zy;return y(),$(d(_i).Root,{open:d(c),"onUpdate:open":E[1]||(E[1]=N=>Ce(c)?c.value=N:null),positioning:{placement:"top-end",gutter:0}},{default:O(()=>[S(d(_i).Trigger,{"as-child":""},{default:O(()=>[S(v,{class:"gap-1"},{default:O(()=>[(y(),$(Xn(f()),{class:"device-icon"})),D("span",vq,j(d(r).label),1),S(d(_i).Indicator,{"as-child":""},{default:O(()=>[S(k,{class:"w-3.5 h-3.5 transition-transform duration-200 data-[state=open]:rotate-180"})]),_:1})]),_:1})]),_:1}),S(d(_i).Positioner,null,{default:O(()=>[S(d(_i).Content,{class:"w-72 border shadow-xs overflow-hidden mt-1 rounded-lg bg-white"},{default:O(()=>[D("div",bq,[D("h4",yq,j(d(t)("header.devicePreview")),1),S(d(_i).CloseTrigger,{"as-child":""},{default:O(()=>[D("button",xq,[S(_,{class:"w-4 h-4"})])]),_:1})]),D("div",wq,[(y(!0),V(ge,null,Ie(d(o),N=>(y(),V("button",{key:N.id,class:Ne(["flex items-center gap-2 cursor-pointer text-left text-sm text-gray-700 transition-[background] duration-[0.2s] px-3 py-2.5 rounded-md border-[none]",{"text-accent! bg-accent/8":d(n)===N.id}]),onClick:C=>g(N.id)},[(y(),$(Xn(h(N.icon)),{class:"w-5 h-5"})),D("span",null,j(N.label),1),D("span",kq,j(N.width===0?d(t)("header.auto"):N.width+"px"),1)],10,_q))),128))]),D("div",Cq,[D("h5",Eq,j(d(t)("header.customDeviceSize")),1),D("div",Oq,[D("div",Iq,[D("label",Tq,j(d(t)("header.deviceWidthPx")),1),yo(D("input",{"onUpdate:modelValue":E[0]||(E[0]=N=>Ce(u)?u.value=N:null),type:"number",id:"custom-width",min:"320",max:"2560",class:"w-full border rounded text-sm px-3 py-2"},null,512),[[Zo,d(u)]])]),D("button",{class:"w-full text-accent-foreground bg-accent rounded text-[13px] font-medium cursor-pointer transition-[background] duration-[0.2s] mt-2 p-2 border-[none]",onClick:m},j(d(t)("header.apply")),1)]),D("div",Sq,[D("h5",null,j(d(t)("header.savedCustomDevices")),1),D("div",Pq,[(y(!0),V(ge,null,Ie(d(i),(N,C)=>(y(),V("div",{key:C,role:"button",class:Ne(["flex items-center gap-2 rounded text-left text-sm text-gray-700 px-3 py-2 cursor-pointer",{"text-accent! bg-accent/8":d(n)===`custom-${N.width}`}]),onClick:x=>g(`custom-${N.width}`)},[S(T,{class:"w-5 h-5 flex-none"}),D("span",Rq,j(N.width)+"px",1),D("button",{class:"flex-none rounded cursor-pointer text-gray-500 flex items-center justify-center transition-all duration-[0.2s] p-1 border-[none] hover:text-red-600",onClick:It(x=>b(N.id),["stop"])},[S(_)],8,Aq)],10,$q))),128))])])])]),_:1})]),_:1})]),_:1},8,["open"])}}}),Dq={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lq(e,t){return y(),V("svg",Dq,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"},null,-1)])])}const Vq=fe({name:"heroicons-arrow-left",render:Lq}),Fq={};function Bq(e,t){const n=Vq,r=Vt;return y(),$(r,{square:"",title:"Back"},{default:O(()=>[S(n)]),_:1})}const Hq=nv(Fq,[["render",Bq]]),zq=P({__name:"RedoButton",setup(e){const{t}=Dn(),{redo:n,canRedo:r}=dr(),o=()=>{n()};return(i,s)=>{const a=c2,l=Vt;return y(),$(l,{square:"",disabled:!d(r),onClick:o,title:d(t)("header.redo")},{default:O(()=>[S(a)]),_:1},8,["disabled","title"])}}}),Uq={},jq={class:"text-xl"};function Gq(e,t){return y(),V("h1",jq,"Craftile Editor")}const Wq=nv(Uq,[["render",Gq]]),qq={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Kq(e,t){return y(),V("svg",qq,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9 15L3 9m0 0l6-6M3 9h12a6 6 0 0 1 0 12h-3"},null,-1)])])}const Yq=fe({name:"heroicons-arrow-uturn-left",render:Kq}),Xq=P({__name:"UndoButton",setup(e){const{t}=Dn(),{undo:n,canUndo:r}=dr(),o=()=>{n()};return(i,s)=>{const a=Yq,l=Vt;return y(),$(l,{square:"",disabled:!d(r),onClick:o,title:d(t)("header.undo")},{default:O(()=>[S(a)]),_:1},8,["disabled","title"])}}}),Jq={},Zq={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Qq(e,t){return y(),V("svg",Zq,[...t[0]||(t[0]=[D("g",{fill:"none"},[D("path",{d:"m12.594 23.258l-.012.002l-.071.035l-.02.004l-.014-.004l-.071-.036q-.016-.004-.024.006l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.016-.018m.264-.113l-.014.002l-.184.093l-.01.01l-.003.011l.018.43l.005.012l.008.008l.201.092q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.003-.011l.018-.43l-.003-.012l-.01-.01z"}),D("path",{fill:"currentColor",d:"M10.611 10.611a1 1 0 0 1 1.11-.208l8.839 3.889a1 1 0 0 1-.14 1.88l-3.338.91l-.91 3.338a1 1 0 0 1-1.88.14l-3.89-8.84a1 1 0 0 1 .209-1.109M17 3a3 3 0 0 1 3 3v3a1 1 0 1 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h3a1 1 0 1 1 0 2H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3zm-3.73 10.269l1.715 3.9l.318-1.164a1 1 0 0 1 .701-.702l1.165-.318l-3.9-1.716Z"})],-1)])])}const eK=nv(Jq,[["render",Qq]]),tK=P({__name:"ToggleInspector",setup(e){const{t}=Dn(),{isEnabled:n,toggle:r}=Qm();return(o,i)=>{const s=eK,a=Vt;return y(),$(a,{onClick:d(r),variant:d(n)?"sutble":"default",square:"",title:d(n)?d(t)("header.disableInspector"):d(t)("header.enableInspector")},{default:O(()=>[S(s,{class:"w-4 h-4"})]),_:1},8,["onClick","variant","title"])}}});function nK(e){e.registerHeaderAction({id:"back-button",slot:"left",render:Hq,order:-20}),e.registerHeaderAction({id:"title",slot:"left",render:Wq,order:-10}),e.registerHeaderAction({id:"device-mode",slot:"right",render:Mq,order:-40}),e.registerHeaderAction({id:"inspection-mode",slot:"right",render:tK,order:-30}),e.registerHeaderAction({id:"undo",slot:"right",render:Xq,order:-20}),e.registerHeaderAction({id:"redo",slot:"right",render:zq,order:-10})}const MC=({editor:e})=>{const t=e.engine;t&&t.canUndo()&&t.undo()},Pb=({editor:e})=>{const t=e.engine;t&&t.canRedo()&&t.redo()};function rK(e){e.registerKeyboardShortcut({key:"ctrl+z",handler:MC}),e.registerKeyboardShortcut({key:"meta+z",handler:MC}),e.registerKeyboardShortcut({key:"ctrl+y",handler:Pb}),e.registerKeyboardShortcut({key:"ctrl+shift+z",handler:Pb}),e.registerKeyboardShortcut({key:"meta+shift+z",handler:Pb})}class oK{state;devicePresets;constructor(t={}){const n={id:"fit",label:"Auto",width:0,icon:"desktop"},r=t.presets?.filter(s=>s.id!=="fit");r&&r.length>0?this.devicePresets=[n,...r]:this.devicePresets=[n,{id:"desktop",label:"Desktop",width:1440,icon:"desktop"},{id:"laptop",label:"Laptop",width:1024,icon:"desktop"},{id:"tablet",label:"Tablet",width:768,icon:"tablet"},{id:"mobile",label:"Mobile",width:375,icon:"mobile"},{id:"mobile-sm",label:"Small Mobile",width:320,icon:"mobile"}];const o=t.default||"fit",i=this.devicePresets.some(s=>s.id===o);this.state=Tr({currentDevice:i?o:"fit",savedCustomDevices:[]})}getCurrentDeviceData(){const t=this.devicePresets.find(r=>r.id===this.state.currentDevice);return t||this.state.savedCustomDevices.find(r=>r.id===this.state.currentDevice)||this.devicePresets[0]}setDeviceMode(t){this.state.currentDevice=t}addCustomDevice(t){this.state.savedCustomDevices.push(t)}removeCustomDevice(t){const n=this.state.savedCustomDevices.findIndex(r=>r.id===t);n>-1&&this.state.savedCustomDevices.splice(n,1),this.state.currentDevice===t&&(this.state.currentDevice="fit")}getAllDevices(){return[...this.devicePresets,...this.state.savedCustomDevices]}}const iK={key:0},sK={class:"text-sm font-medium text-gray-700 capitalize"},aK={class:"p-3"},lK={key:1,class:"p-4"},cK={key:1,class:"text-center py-8"},uK={class:"text-sm text-gray-500"},dK=P({__name:"PropertiesPanel",setup(e){const{t}=Dn(),{selectedBlock:n}=sa(),{engine:r,setBlockProperty:o}=dr(),{currentDevice:i}=Xm(),s=A(()=>{if(!n.value)return[];const h=r.getBlockSchema(n.value.type);if(!h||!h.properties)return[];const f=i.value==="fit"?"_default":i.value;return h.properties.filter(g=>g.visibleIf?wh(g.visibleIf,n.value?.properties||{},f):!0)}),a=A(()=>s.value.some(h=>h.group)),l=A(()=>{if(!a.value)return[];const h=new Map;return s.value.forEach(f=>{const g=f.group||"default",m=f.group||t("common.default");h.has(g)||h.set(g,{id:g,label:m,fields:[]}),h.get(g).fields.push(f)}),Array.from(h.values())}),c=A(()=>l.value.length===0?[]:[l.value[0].id]),u=h=>n.value?.properties?.[h];function p(h,f){if(!n.value)return;const g=m=>{const b=He(m);return Array.isArray(b)?b.map(g):b&&typeof b=="object"&&b.constructor===Object?Object.fromEntries(Object.entries(b).map(([w,E])=>[w,g(E)])):b};o(n.value.id,h,g(f))}return(h,f)=>{const g=Ax,m=ws;return d(n)?(y(),V("div",iK,[d(s).length>0?(y(),V(ge,{key:0},[d(a)?(y(),$(d(Ho).Root,{key:0,class:"w-full","default-value":d(c),multiple:""},{default:O(()=>[(y(!0),V(ge,null,Ie(d(l),b=>(y(),$(d(Ho).Item,{key:b.id,value:b.id,class:"border-b border-gray-100"},{default:O(()=>[S(d(Ho).ItemTrigger,{class:"flex w-full items-center justify-between p-3 text-left hover:bg-gray-50 transition-colors"},{default:O(()=>[D("span",sK,j(b.label),1),S(d(Ho).ItemIndicator,{class:"transition-transform duration-200 data-[state=open]:rotate-180"},{default:O(()=>[S(g,{class:"w-4 h-4 text-gray-500"})]),_:1})]),_:2},1024),S(d(Ho).ItemContent,{class:"overflow-hidden"},{default:O(()=>[D("div",aK,[S(Fy,{name:"property-field",tag:"div",class:"space-y-4"},{default:O(()=>[(y(!0),V(ge,null,Ie(b.fields,w=>(y(),$(m,{key:w.id,field:w,"model-value":u(w.id),"onUpdate:modelValue":E=>p(w.id,E)},null,8,["field","model-value","onUpdate:modelValue"]))),128))]),_:2},1024)])]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["default-value"])):(y(),V("div",lK,[S(Fy,{name:"property-field",tag:"div",class:"space-y-4"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(s),b=>(y(),$(m,{key:b.id,field:b,"model-value":u(b.id),"onUpdate:modelValue":w=>p(b.id,w)},null,8,["field","model-value","onUpdate:modelValue"]))),128))]),_:1})]))],64)):(y(),V("div",cK,[D("p",uK,j(d(t)("configPanels.noProperties")),1)]))])):Z("",!0)}}});function pK(e){e.registerConfigurationPanel({id:"properties",title:"Properties",render:dK,order:-10})}class fK{editor;plugins=new Set;constructor(t){this.editor=t}setupPlugins(t){this.plugins.forEach(n=>{n({vueApp:t,editor:this.editor})})}register(t){return this.plugins.add(t),this}unregister(t){return this.plugins.delete(t),this}getAllPlugins(){return Array.from(this.plugins.values())}}class hK{handlers=new Map;targetWindow;targetOrigin;fallbackHandler;constructor(t,n="*"){this.targetWindow=t,this.targetOrigin=n,window.addEventListener("message",this.handleMessage.bind(this))}handleMessage(t){const n=t.data;if(!n.type)return;const r=this.handlers.get(n.type);r?r.forEach(o=>o(n.payload,t)):this.fallbackHandler&&this.fallbackHandler(t.data,t)}send(t,n){const r={type:t,payload:n};this.targetWindow.postMessage(r,this.targetOrigin)}listen(t,n){return this.handlers.has(t)||this.handlers.set(t,[]),this.handlers.get(t).push(n),()=>{const r=this.handlers.get(t);if(r){const o=r.indexOf(n);o>-1&&r.splice(o,1)}}}registerFallbackHandler(t){this.fallbackHandler=t}}function gK(e,t="*"){return new hK(e.contentWindow,t)}class mK{state;messenger;readyListenerInitialized=!1;readyCallbacks=[];constructor(){this.state=Tr({previewUrl:"about:blank",previewFrame:null,isIframeReady:!1,messageQueue:[]})}loadUrl(t){this.state.previewUrl=t}loadFromHtml(t){const n=new Blob([t],{type:"text/html"}),r=URL.createObjectURL(n);this.state.previewUrl=r,setTimeout(()=>URL.revokeObjectURL(r),1e3)}reload(){this.state.previewFrame&&this.state.previewFrame.contentWindow?.location.reload()}getFrame(){return this.state.previewFrame}_registerFrame(t){this.state.previewFrame=t,this.messenger=gK(t),this.readyListenerInitialized||(this.messenger.listen("craftile.preview.ready",()=>{this.state.isIframeReady=!0,this.runReadyCallbacks(),this.flushMessageQueue()}),this.readyListenerInitialized=!0)}sendMessage(t,n){this.state.isIframeReady?this.messenger.send(t,n):this.state.messageQueue.push({type:t,payload:n})}onMessage(t,n){return this.messenger.listen(t,n)}onReady(t){this.readyCallbacks.push(t)}runReadyCallbacks(){this.readyCallbacks.forEach(t=>t.call(this)),this.readyCallbacks=[]}flushMessageQueue(){if(this.state.isIframeReady&&this.state.previewFrame?.contentWindow)for(;this.state.messageQueue.length>0;){const t=this.state.messageQueue.shift();this.messenger.send(t.type,t.payload)}}}function vK(e,t){const n={added:new Set,updated:new Set,removed:new Set,moved:new Map,blocksToInclude:new Set};let r=null;const o=[],i=()=>{if(n.added.size||n.updated.size||n.removed.size||n.moved.size){const l=e.getPage();Array.from(n.blocksToInclude).forEach(u=>{let p=l.blocks[u];for(;p;){if(p.repeated&&p.parentId){n.blocksToInclude.add(p.parentId);break}p=p.parentId?l.blocks[p.parentId]:void 0}});const c={};n.blocksToInclude.forEach(u=>{l.blocks[u]&&(c[u]=structuredClone(l.blocks[u]))}),t?.onUpdates({blocks:c,regions:structuredClone(l.regions),changes:{added:Array.from(n.added),updated:Array.from(n.updated),removed:Array.from(n.removed),moved:Object.fromEntries(n.moved)}}),n.added.clear(),n.updated.clear(),n.removed.clear(),n.moved.clear(),n.blocksToInclude.clear()}},s=()=>{r&&clearTimeout(r),r=setTimeout(i,t?.debounceMs||0)},a=(l,c)=>{c.add(l);const u=e.getPage().blocks[l];u?.children&&u.children.forEach(p=>{a(p,c)})};return o.push(e.on("block:insert",({blockId:l,parentId:c})=>{n.added.add(l),a(l,n.blocksToInclude),c&&n.blocksToInclude.add(c),s()})),o.push(e.on("block:remove",({blockId:l,parentId:c})=>{n.added.delete(l),n.updated.delete(l),n.removed.add(l),n.blocksToInclude.delete(l),c&&n.blocksToInclude.add(c),s()})),o.push(e.on("block:property:set",({blockId:l})=>{n.added.has(l)||n.updated.add(l),n.blocksToInclude.add(l),s()})),o.push(e.on("block:move",({blockId:l,sourceParentId:c,targetParentId:u,targetIndex:p,targetRegionId:h})=>{n.moved.set(l,{toRegion:h,toParent:u,toIndex:p??0}),n.blocksToInclude.add(l),c&&n.blocksToInclude.add(c),u&&n.blocksToInclude.add(u),s()})),o.push(e.on("block:toggle",({blockId:l})=>{n.added.has(l)||n.updated.add(l),n.blocksToInclude.add(l);const c=e.getPage().blocks[l];c?.parentId&&n.blocksToInclude.add(c.parentId),s()})),o.push(e.on("block:duplicate",({newBlockId:l,parentId:c})=>{n.added.add(l),a(l,n.blocksToInclude),c&&n.blocksToInclude.add(c),s()})),o.push(e.on("block:update",({blockId:l})=>{n.added.has(l)||n.updated.add(l),n.blocksToInclude.add(l),s()})),()=>{r&&clearTimeout(r),o.forEach(l=>l())}}class bK{state;events;preview;ui;engine;constructor(t,n,r,o){this.events=t,this.preview=n,this.ui=r,this.engine=o,this.state=Tr({enabled:!0,hoveredBlockId:null,hoveredBlockRect:null,hoveredParentRect:null,parentFlexDirection:"column",selectedBlockId:null,selectedBlockRect:null,iframeRect:null}),this.preview.onReady(()=>{this.preview.onMessage("craftile.preview.block-hover",i=>{this.setHoveredBlock(i.blockId,i.blockRect,i.parentRect),this.state.parentFlexDirection=i.parentFlexDirection}),this.preview.onMessage("craftile.preview.block-select",i=>{this.setSelectedBlock(i.blockId,i.blockRect),this.ui.setSelectedBlock(i.blockId)}),this.preview.onMessage("craftile.preview.update-selected-block",i=>{this.state.selectedBlockId&&this.setSelectedBlock(i.blockId,i.blockRect)}),this.preview.onMessage("craftile.preview.block-leave",()=>{this.clearHoveredBlock()})}),this.events.on("ui:block:select",i=>{this.engine.getPage().blocks[i.blockId]?.ghost!==!0&&this.preview.sendMessage("craftile.editor.select-block",{blockId:i.blockId})}),this.events.on("ui:block:clear-selection",()=>{this.preview.sendMessage("craftile.editor.deselect-block"),this.clearSelectedBlock()})}enable(){this.state.enabled=!0,this.events.emit("inspector:enabled",{}),this.preview.sendMessage("craftile.inspector.enable")}disable(){this.state.enabled=!1,this.events.emit("inspector:disabled",{}),this.preview.sendMessage("craftile.inspector.disable")}toggle(){this.state.enabled?this.disable():this.enable()}setHoveredBlock(t,n,r){this.state.hoveredBlockId=t,this.state.hoveredBlockRect=n,this.state.hoveredParentRect=r||null}setSelectedBlock(t,n){this.state.selectedBlockId=t,this.state.selectedBlockRect=n}clearHoveredBlock(){this.state.hoveredBlockId=null,this.state.hoveredBlockRect=null,this.state.hoveredParentRect=null}clearSelectedBlock(){this.state.selectedBlockId=null,this.state.selectedBlockRect=null}setIframeRect(t){this.state.iframeRect=t}}class yK{engine;ui;i18n;events;devices;preview;plugins;inspector;blockLabelFunction;blockFilterFunction;previewUpdateDelay;vueApp=null;constructor(t={}){this.engine=new Qy({blockSchemas:t.blockSchemas,page:t.initialPage}),this.events=new d2,this.i18n=qU(t.i18n),this.devices=new oK(t.devices),this.preview=new mK,this.ui=new mq(this.events),this.plugins=new fK(this),this.inspector=new bK(this.events,this.preview,this.ui,this.engine),this.blockLabelFunction=t.blockLabelFunction,this.blockFilterFunction=t.blockFilterFunction,this.previewUpdateDelay=t.previewUpdateDelay,t.plugins?.forEach(n=>this.plugins.register(n)),this.setup()}getActiveBlock(){return this.ui.state.selectedBlockId?this.engine.getBlockById(this.ui.state.selectedBlockId):void 0}getBlockProperty(t,n){const r=this.engine.getBlockById(t);return r?r.properties[n]:null}setBlockProperty(t,n,r){return this.engine.setBlockProperty(t,n,r)}setup(){nK(this.ui),rK(this.ui),pK(this.ui),this.vueApp=lg({setup:()=>{tu(Qt,this);const t=this.setupEngineWatcher(this.previewUpdateDelay??150);return on(t),()=>uo(gq)}}),this.plugins.setupPlugins(this.vueApp)}setupEngineWatcher(t){return vK(this.engine,{debounceMs:t,onUpdates:n=>{this.preview.sendMessage("craftile.editor.updates",n),this.events.emit("updates",n)}})}mount(t){this.vueApp.mount(t)}}function xK(e={}){const{el:t,...n}=e,r=new yK(n);return t&&r.mount(t),r}(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.__craftile *,.__craftile :before,.__craftile :after,.__craftile ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{.__craftile,.__craftile :host{--color-blue-500:oklch(62.3% .214 259.815);--color-gray-50:var(--color-gray-50,oklch(98.5% 0 0));--color-gray-100:var(--color-gray-100,oklch(96.7% .001 286.375));--color-gray-200:var(--color-gray-200,oklch(92% .004 286.32));--color-gray-300:var(--color-gray-300,oklch(87.1% .006 286.286));--color-gray-400:var(--color-gray-400,oklch(70.5% .015 286.067));--color-gray-500:var(--color-gray-500,oklch(55.2% .016 285.938));--color-gray-600:var(--color-gray-600,oklch(44.2% .017 285.786));--color-gray-700:var(--color-gray-700,oklch(37% .013 285.805));--color-gray-800:var(--color-gray-800,oklch(37% .013 285.805));--color-gray-900:var(--color-gray-900,oklch(37% .013 285.805));--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-accent:var(--color-accent,oklch(54.6% .245 262.881));--color-accent-foreground:var(--color-accent-foreground,oklch(93.2% .032 255.585))}}@layer base,components;@layer utilities{.__craftile .relative{position:relative}.__craftile .\\!z-20{z-index:20!important}.__craftile .z-50{z-index:50}.__craftile .mt-3{margin-top:calc(var(--spacing)*3)}.__craftile .mb-1{margin-bottom:calc(var(--spacing)*1)}.__craftile .mb-2{margin-bottom:calc(var(--spacing)*2)}.__craftile .ml-2{margin-left:calc(var(--spacing)*2)}.__craftile .ml-auto{margin-left:auto}.__craftile .block{display:block}.__craftile .flex{display:flex}.__craftile .grid{display:grid}.__craftile .inline-flex{display:inline-flex}.__craftile .h-1{height:calc(var(--spacing)*1)}.__craftile .h-2{height:calc(var(--spacing)*2)}.__craftile .h-2\\.5{height:calc(var(--spacing)*2.5)}.__craftile .h-3{height:calc(var(--spacing)*3)}.__craftile .h-4{height:calc(var(--spacing)*4)}.__craftile .h-6{height:calc(var(--spacing)*6)}.__craftile .h-7{height:calc(var(--spacing)*7)}.__craftile .h-8{height:calc(var(--spacing)*8)}.__craftile .h-9{height:calc(var(--spacing)*9)}.__craftile .h-10{height:calc(var(--spacing)*10)}.__craftile .h-36{height:calc(var(--spacing)*36)}.__craftile .h-full{height:100%}.__craftile .max-h-60{max-height:calc(var(--spacing)*60)}.__craftile .w-0{width:calc(var(--spacing)*0)}.__craftile .w-2\\.5{width:calc(var(--spacing)*2.5)}.__craftile .w-3{width:calc(var(--spacing)*3)}.__craftile .w-4{width:calc(var(--spacing)*4)}.__craftile .w-6{width:calc(var(--spacing)*6)}.__craftile .w-7{width:calc(var(--spacing)*7)}.__craftile .w-8{width:calc(var(--spacing)*8)}.__craftile .w-16{width:calc(var(--spacing)*16)}.__craftile .w-60{width:calc(var(--spacing)*60)}.__craftile .w-\\[var\\(--reference-width\\)\\]{width:var(--reference-width)}.__craftile .w-full{width:100%}.__craftile .min-w-8{min-width:calc(var(--spacing)*8)}.__craftile .min-w-10{min-width:calc(var(--spacing)*10)}.__craftile .flex-1{flex:1}.__craftile .flex-none{flex:none}.__craftile .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .cursor-pointer{cursor:pointer}.__craftile .touch-none{touch-action:none}.__craftile .appearance-none{appearance:none}.__craftile .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.__craftile .flex-col{flex-direction:column}.__craftile .items-center{align-items:center}.__craftile .justify-between{justify-content:space-between}.__craftile .justify-center{justify-content:center}.__craftile .gap-1{gap:calc(var(--spacing)*1)}.__craftile .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.__craftile .gap-2{gap:calc(var(--spacing)*2)}.__craftile .gap-3{gap:calc(var(--spacing)*3)}.__craftile .gap-4{gap:calc(var(--spacing)*4)}.__craftile .overflow-auto{overflow:auto}.__craftile .overflow-hidden{overflow:hidden}.__craftile .rounded{border-radius:.25rem}.__craftile .rounded-full{border-radius:3.40282e38px}.__craftile .rounded-lg{border-radius:var(--radius-lg)}.__craftile .rounded-md{border-radius:var(--radius-md)}.__craftile .border{border-style:var(--tw-border-style);border-width:1px}.__craftile .border-2{border-style:var(--tw-border-style);border-width:2px}.__craftile .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.__craftile .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.__craftile .border-accent{border-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .border-gray-300{border-color:var(--color-gray-300,oklch(87.1% .006 286.286))}.__craftile .border-white{border-color:var(--color-white)}.__craftile .bg-accent{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .bg-gray-100{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}.__craftile .bg-gray-300{background-color:var(--color-gray-300,oklch(87.1% .006 286.286))}.__craftile .bg-white{background-color:var(--color-white)}.__craftile .bg-none{background-image:none}.__craftile .p-0\\.5{padding:calc(var(--spacing)*.5)}.__craftile .p-4{padding:calc(var(--spacing)*4)}.__craftile .px-1{padding-inline:calc(var(--spacing)*1)}.__craftile .px-2{padding-inline:calc(var(--spacing)*2)}.__craftile .px-3{padding-inline:calc(var(--spacing)*3)}.__craftile .py-1{padding-block:calc(var(--spacing)*1)}.__craftile .py-2{padding-block:calc(var(--spacing)*2)}.__craftile .pl-1{padding-left:calc(var(--spacing)*1)}.__craftile .text-center{text-align:center}.__craftile .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.__craftile .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.__craftile .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.__craftile .text-accent{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .text-gray-400{color:var(--color-gray-400,oklch(70.5% .015 286.067))}.__craftile .text-gray-500{color:var(--color-gray-500,oklch(55.2% .016 285.938))}.__craftile .text-gray-600{color:var(--color-gray-600,oklch(44.2% .017 285.786))}.__craftile .text-gray-700{color:var(--color-gray-700,oklch(37% .013 285.805))}.__craftile .text-gray-900{color:var(--color-gray-900,oklch(37% .013 285.805))}.__craftile .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .outline-0{outline-style:var(--tw-outline-style);outline-width:0}.__craftile .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.__craftile .forced-color-adjust-none{forced-color-adjust:none}.__craftile .outline-none{--tw-outline-style:none;outline-style:none}.__craftile .select-none{-webkit-user-select:none;user-select:none}.__craftile .focus-within\\:border-transparent:focus-within{border-color:#0000}.__craftile .focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus-within\\:ring-accent:focus-within{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus-within\\:outline-none:focus-within{--tw-outline-style:none;outline-style:none}@media (hover:hover){.__craftile .hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.__craftile .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50,oklch(98.5% 0 0))}.__craftile .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100,oklch(96.7% .001 286.375))}}.__craftile .focus\\:border-transparent:focus{border-color:#0000}.__craftile .focus\\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.__craftile .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.__craftile .data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.__craftile .data-\\[state\\=checked\\]\\:border-accent[data-state=checked]{border-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:bg-accent[data-state=checked]{background-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:bg-accent-foreground[data-state=checked]{background-color:var(--color-accent-foreground,oklch(93.2% .032 255.585))}.__craftile .data-\\[state\\=checked\\]\\:bg-white[data-state=checked]{background-color:var(--color-white)}.__craftile .data-\\[state\\=checked\\]\\:text-accent[data-state=checked]{color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=checked\\]\\:shadow[data-state=checked]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.__craftile .data-\\[state\\=checked\\]\\:outline-4[data-state=checked]{outline-style:var(--tw-outline-style);outline-width:4px}.__craftile .data-\\[state\\=checked\\]\\:-outline-offset-8[data-state=checked]{outline-offset:-8px}.__craftile .data-\\[state\\=checked\\]\\:outline-accent[data-state=checked]{outline-color:var(--color-accent,oklch(54.6% .245 262.881))}.__craftile .data-\\[state\\=closed\\]\\:hidden[data-state=closed]{display:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();const Ut=e=>{const t=Symbol(e);return[n=>tu(t,n),n=>dt(t,n),t]},[m$,Ln]=Ut("FieldContext"),wK=P({__name:"field-context",setup(e){const t=Ln();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}});function _K(e){return e==null?[]:Array.isArray(e)?e:[e]}var kK=e=>e[0],CK=e=>e[e.length-1],EK=(e,t)=>e.indexOf(t)!==-1,OK=(e,...t)=>e.concat(t),IK=(e,...t)=>e.filter(n=>!t.includes(n)),DC=(e,t)=>EK(e,t)?IK(e,t):OK(e,t),LC=e=>e?.constructor.name==="Array",TK=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(LC(e)&&LC(t))return TK(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;oArray.isArray(e),v$=e=>e!=null&&typeof e=="object",$b=e=>v$(e)&&!SK(e),Nd=e=>typeof e=="string",uc=e=>typeof e=="function",PK=e=>e==null,Th=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),$K=e=>Object.prototype.toString.call(e),b$=Function.prototype.toString,RK=b$.call(Object),AK=e=>{if(!v$(e)||$K(e)!="[object Object]"||DK(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Th(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&b$.call(n)==RK},NK=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,MK=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,DK=e=>NK(e)||MK(e),LK=()=>{},Og=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},y$=(e,t)=>{try{return e()}catch(n){return n instanceof Error&&Error.captureStackTrace?.(n,y$),t?.()}},{floor:x$,abs:Ig,round:rv,min:VK,max:FK,pow:BK,sign:HK}=Math,h0=e=>Number.isNaN(e),aa=e=>h0(e)?0:e,w$=(e,t)=>(e%t+t)%t,zK=(e,t)=>(e%t+t)%t,UK=(e,t,n)=>e===0?n:t[e-1],jK=(e,t,n)=>e===t.length-1?n:t[e+1],GK=(e,t)=>aa(e)>=t,WK=(e,t)=>aa(e)<=t,_$=(e,t,n)=>{const r=aa(e),o=t==null||r>=t,i=n==null||r<=n;return o&&i},qK=(e,t,n)=>rv((aa(e)-t)/n)*n+t,dn=(e,t,n)=>VK(FK(aa(e),t),n),ov=(e,t,n)=>(aa(e)-t)/(n-t),Hx=(e,t,n,r)=>dn(qK(e*(n-t)+t,t,r),t,n),VC=(e,t)=>{let n=e,r=t.toString(),o=r.indexOf("."),i=o>=0?r.length-o:0;if(i>0){let s=BK(10,i);n=rv(n*s)/s}return n},Md=(e,t)=>typeof t=="number"?x$(e*t+.5)/t:rv(e),lp=(e,t,n,r)=>{const o=t!=null?Number(t):0,i=Number(n),s=(e-o)%r;let a=Ig(s)*2>=r?e+HK(s)*(r-Ig(s)):e-s;if(a=VC(a,r),!h0(o)&&ai){const l=x$((i-o)/r),c=o+l*r;a=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)];function k$(e,t){const n=UK(e,t.values,t.min),r=jK(e,t.values,t.max);let o=t.values.slice();return function(i){let s=lp(i,n,r,t.step);return o=sd(o,e,i),o[e]=s,o}}function KK(e,t){const n=t.values[e]+t.step;return k$(e,t)(n)}function YK(e,t){const n=t.values[e]-t.step;return k$(e,t)(n)}var XK=(e,t)=>{let n=e.findIndex(i=>t-i<0);if(n===0)return n;if(n===-1)return e.length-1;let r=e[n-1],o=e[n];return Ig(r-t)e.map((o,i)=>({min:i===0?t:e[i-1]+r,max:i===e.length-1?n:e[i+1]-r,value:o})),g0=(e,t)=>{const[n,r]=e,[o,i]=t;return s=>n===r||o===i?o:o+(i-o)/(r-n)*(s-n)},wt=(e,t=0,n=10)=>{const r=Math.pow(n,t);return rv(e*r)/r},FC=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},E$=(e,t,n)=>{let r=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const o=10**Math.max(FC(e),FC(n));e=Math.round(e*o),n=Math.round(n*o),r=t==="+"?e+n:e-n,r/=o}return r},JK=(e,t)=>E$(aa(e),"+",t),ZK=(e,t)=>E$(aa(e),"-",t),BC=e=>e!=null?`${e}px`:void 0;function zx(e){if(!AK(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=zx(o))}return n}function QK(e,t){const n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=o)}return n}function m0(...e){e.length===1?e[0]:e[1],e.length!==2||e[0]}function O$(e,t){if(e==null)throw new Error(t())}var HC=e=>Math.max(0,Math.min(1,e)),eY=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),Rb=(...e)=>t=>e.reduce((n,r)=>r(n),t),ad=()=>{},iv=e=>typeof e=="object"&&e!==null,tY=2147483647,G=e=>e?"":void 0,cp=e=>e?"true":void 0,nY=1,rY=9,oY=11,Jn=e=>iv(e)&&e.nodeType===nY&&typeof e.nodeName=="string",I$=e=>iv(e)&&e.nodeType===rY,iY=e=>iv(e)&&e===e.window,T$=e=>Jn(e)?e.localName||"":"#document";function sY(e){return["html","body","#document"].includes(T$(e))}var aY=e=>iv(e)&&e.nodeType!==void 0,up=e=>aY(e)&&e.nodeType===oY&&"host"in e,lY=e=>Jn(e)&&e.localName==="input",cY=e=>Jn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Tg(e){if(!e)return!1;const t=e.getRootNode();return S$(t)===e}var uY=/(textarea|select)/;function dY(e){if(e==null||!Jn(e))return!1;try{return lY(e)&&e.selectionStart!=null||uY.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function zc(e,t){if(!e||!t||!Jn(e)||!Jn(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&up(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Eo(e){return I$(e)?e:iY(e)?e.document:e?.ownerDocument??document}function pY(e){return Eo(e).documentElement}function rn(e){return up(e)?rn(e.host):I$(e)?e.defaultView??window:Jn(e)?e.ownerDocument?.defaultView??window:window}function S$(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function fY(e){if(T$(e)==="html")return e;const t=e.assignedSlot||e.parentNode||up(e)&&e.host||pY(e);return up(t)?t.host:t}var Ab=new WeakMap;function Ux(e){return Ab.has(e)||Ab.set(e,rn(e).getComputedStyle(e)),Ab.get(e)}var sv=()=>typeof document<"u";function hY(){return navigator.userAgentData?.platform??navigator.platform}function gY(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var jx=e=>sv()&&e.test(hY()),mY=e=>sv()&&e.test(gY()),vY=e=>sv()&&e.test(navigator.vendor),zC=()=>sv()&&!!navigator.maxTouchPoints,bY=()=>jx(/^iPhone/i),yY=()=>jx(/^iPad/i)||av()&&navigator.maxTouchPoints>1,Gx=()=>bY()||yY(),xY=()=>av()||Gx(),av=()=>jx(/^Mac/i),lv=()=>xY()&&vY(/apple/i),wY=()=>mY(/Android/i);function _Y(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function ho(e){return _Y(e)?.[0]??e.target}function kY(e){return TY(e).isComposing||e.keyCode===229}function CY(e){return e.pointerType===""&&e.isTrusted?!0:wY()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}var Ns=e=>e.button===0,EY=e=>e.button===2||av()&&e.ctrlKey&&e.button===0,dp=e=>e.ctrlKey||e.altKey||e.metaKey,OY=e=>"touches"in e&&e.touches.length>0,IY={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},UC={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function pp(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=IY[o]??o,n==="rtl"&&r==="horizontal"&&o in UC&&(o=UC[o]),o}function TY(e){return e.nativeEvent??e}var SY=new Set(["PageUp","PageDown"]),PY=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function Sg(e){return e.ctrlKey||e.metaKey?.1:SY.has(e.key)||e.shiftKey&&PY.has(e.key)?10:1}function rl(e,t="client"){const n=OY(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Kt=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function P$(e,t){const{type:n="HTMLInputElement",property:r="value"}=t,o=rn(e)[n].prototype;return Object.getOwnPropertyDescriptor(o,r)??{}}function $Y(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function Qp(e,t,n="value"){if(!e)return;const r=$Y(e);r&&P$(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function $$(e,t){e&&(P$(e,{type:"HTMLInputElement",property:"checked"}).set?.call(e,t),t?e.setAttribute("checked",""):e.removeAttribute("checked"))}function R$(e,t){const{value:n,bubbles:r=!0}=t;if(!e)return;const o=rn(e);e instanceof o.HTMLInputElement&&(Qp(e,`${n}`),e.dispatchEvent(new o.Event("input",{bubbles:r})))}function A$(e,t){const{checked:n,bubbles:r=!0}=t;if(!e)return;const o=rn(e);e instanceof o.HTMLInputElement&&($$(e,n),e.dispatchEvent(new o.Event("click",{bubbles:r})))}function RY(e){return AY(e)?e.form:e.closest("form")}function AY(e){return e.matches("textarea, input, select, button")}function NY(e,t){if(!e)return;const n=RY(e),r=o=>{o.defaultPrevented||t()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}function MY(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const r=rn(n),o=new r.MutationObserver(()=>t(n.disabled));return o.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>o.disconnect()}function du(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:r}=t,o=[NY(e,r),MY(e,n)];return()=>o.forEach(i=>i?.())}var DY=e=>Jn(e)&&e.tagName==="IFRAME",LY=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,N$="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function Wx(e){return!e||e.closest("[inert]")?!1:e.matches(N$)&&cY(e)}function qx(e,t){if(!e)return[];const n=Array.from(e.querySelectorAll(N$)).filter(VY);return n.forEach((r,o)=>{if(DY(r)&&r.contentDocument){const i=r.contentDocument.body,s=qx(i);n.splice(o,1,...s)}}),n.length,n}function VY(e){return e!=null&&e.tabIndex>0?!0:Wx(e)&&!LY(e)}function FY(e,t){const n=qx(e),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function M$(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof n=="function"?n():n),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){const s=qx(t);i=r?s.filter(r)[0]:s[0]}return i||t||void 0}function BY(e){const t=e.currentTarget;if(!t)return!1;const[n,r]=FY(t);return!(Tg(n)&&e.shiftKey||Tg(r)&&!e.shiftKey||!n&&!r)}function D$(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(r=>r())}}function Ht(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}function HY(e,t){if(!e)return;const{attributes:n,callback:r}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(s=>{for(const a of s)a.type==="attributes"&&a.attributeName&&n.includes(a.attributeName)&&r(a)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function L$(e,t){const{defer:n}=t,r=n?Ht:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(HY(i,t))})),()=>{o.forEach(i=>i?.())}}function v0(e){const t=fY(e);return sY(t)?Eo(t).body:Jn(t)&&V$(t)?t:v0(t)}var zY=/auto|scroll|overlay|hidden|clip/,UY=new Set(["inline","contents"]);function V$(e){const t=rn(e),{overflow:n,overflowX:r,overflowY:o,display:i}=t.getComputedStyle(e);return zY.test(n+o+r)&&!UY.has(i)}function jY(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function GY(e,t){const{rootEl:n,...r}=t||{};!e||!n||!V$(n)||!jY(n)||e.scrollIntoView(r)}function Kx(e,t){const{left:n,top:r,width:o,height:i}=t.getBoundingClientRect(),s={x:e.x-n,y:e.y-r},a={x:HC(s.x/o),y:HC(s.y/i)};function l(c={}){const{dir:u="ltr",orientation:p="horizontal",inverted:h}=c,f=typeof h=="object"?h.x:h,g=typeof h=="object"?h.y:h;return p==="horizontal"?u==="rtl"||f?1-a.x:a.x:g?1-a.y:a.y}return{offset:s,percent:a,getPercentValue:l}}function WY(e,t){const n=e.body,r="pointerLockElement"in e||"mozPointerLockElement"in e,o=()=>!!e.pointerLockElement;function i(){}function s(l){o(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}const a=[Kt(e,"pointerlockchange",i,!1),Kt(e,"pointerlockerror",s,!1)];return()=>{a.forEach(l=>l()),e.exitPointerLock()}}var dc="default",b0="",Sh=new WeakMap;function qY(e={}){const{target:t,doc:n}=e,r=n??document,o=r.documentElement;return Gx()?(dc==="default"&&(b0=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),dc="disabled"):t&&(Sh.set(t,t.style.userSelect),t.style.userSelect="none"),()=>KY({target:t,doc:r})}function KY(e={}){const{target:t,doc:n}=e,r=(n??document).documentElement;if(Gx()){if(dc!=="disabled")return;dc="restoring",setTimeout(()=>{D$(()=>{dc==="restoring"&&(r.style.webkitUserSelect==="none"&&(r.style.webkitUserSelect=b0||""),b0="",dc="default")})},300)}else if(t&&Sh.has(t)){const o=Sh.get(t);t.style.userSelect==="none"&&(t.style.userSelect=o??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Sh.delete(t)}}function F$(e={}){const{defer:t,target:n,...r}=e,o=t?Ht:s=>s(),i=[];return i.push(o(()=>{const s=typeof n=="function"?n():n;i.push(qY({...r,target:s}))})),()=>{i.forEach(s=>s?.())}}function B$(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=a=>{const l=rl(a),c=Math.sqrt(l.x**2+l.y**2),u=a.pointerType==="touch"?10:5;if(!(c{const l=rl(a);r({point:l,event:a})},s=[Kt(e,"pointermove",o,!1),Kt(e,"pointerup",i,!1),Kt(e,"pointercancel",i,!1),Kt(e,"contextmenu",i,!1),F$({doc:e})];return()=>{s.forEach(a=>a())}}function YY(e){const{pointerNode:t,keyboardNode:n=t,onPress:r,onPressStart:o,onPressEnd:i,isValidKey:s=w=>w.key==="Enter"}=e;if(!t)return ad;const a=rn(t);let l=ad,c=ad,u=ad;const p=w=>({point:rl(w),event:w});function h(w){o?.(p(w))}function f(w){i?.(p(w))}const g=Kt(t,"pointerdown",w=>{c();const E=Kt(a,"pointerup",v=>{const _=ho(v);zc(t,_)?r?.(p(v)):i?.(p(v))},{passive:!r,once:!0}),k=Kt(a,"pointercancel",f,{passive:!i,once:!0});c=Rb(E,k),Tg(n)&&w.pointerType==="mouse"&&w.preventDefault(),h(w)},{passive:!o}),m=Kt(n,"focus",b);l=Rb(g,m);function b(){const w=_=>{if(!s(_))return;const T=C=>{if(!s(C))return;const x=new a.PointerEvent("pointerup"),I=p(x);r?.(I),i?.(I)};c(),c=Kt(n,"keyup",T);const N=new a.PointerEvent("pointerdown");h(N)},E=()=>{const _=new a.PointerEvent("pointercancel");f(_)},k=Kt(n,"keydown",w),v=Kt(n,"blur",E);u=Rb(k,v)}return()=>{l(),c(),u()}}function Pg(e,t){return Array.from(e?.querySelectorAll(t)??[])}function XY(e,t){return e?.querySelector(t)??null}var Yx=e=>e.id;function JY(e,t,n=Yx){return e.find(r=>n(r)===t)}function ZY(e,t,n=Yx){const r=JY(e,t,n);return r?e.indexOf(r):-1}function H$(e,t){const{onEntry:n,measure:r,box:o="border-box"}=t,i=(Array.isArray(e)?e:[e]).filter(Jn),s=rn(i[0]),a=c=>{const u=i.map(p=>r(p));n({rects:u,entries:c})};a([]);const l=new s.ResizeObserver(a);return i.forEach(c=>l.observe(c,{box:o})),()=>l.disconnect()}var QY=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),eX=e=>QY(e.dataset?.valuetext??e.textContent??""),tX=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function nX(e,t,n,r=Yx){const o=n?ZY(e,n,r):-1;let i=n?eY(e,o):e;return t.length===1&&(i=i.filter(s=>r(s)!==n)),i.find(s=>tX(eX(s),t))}function z$(e,t){if(!e)return ad;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function rX(e,t){const{state:n,activeId:r,key:o,timeout:i=350,itemToId:s}=t,a=n.keysSoFar+o,l=a.length>1&&Array.from(a).every(f=>f===a[0])?a[0]:a;let c=e.slice();const u=nX(c,l,r,s);function p(){clearTimeout(n.timer),n.timer=-1}function h(f){n.keysSoFar=f,p(),f!==""&&(n.timer=+setTimeout(()=>{h(""),p()},i))}return h(a),u}var y0=Object.assign(rX,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:oX});function oX(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var cv={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function iX(e,t,n){const{signal:r}=t;return[new Promise((o,i)=>{const s=setTimeout(()=>{i(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(s),i(new Error("Promise aborted"))}),e.then(a=>{r.aborted||(clearTimeout(s),o(a))}).catch(a=>{r.aborted||(clearTimeout(s),i(a))})}),()=>t.abort()]}function sX(e,t){const{timeout:n,rootNode:r}=t,o=rn(r),i=Eo(r),s=new o.AbortController;return iX(new Promise(a=>{const l=e();if(l){a(l);return}const c=new o.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),a(u))});c.observe(i.body,{childList:!0,subtree:!0})}),s,n)}var aX=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),lX=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,jC=e=>{const t={};let n;for(;n=lX.exec(e);)t[n[1]]=n[2];return t},cX=(e,t)=>{if(Nd(e)){if(Nd(t))return`${e};${t}`;e=jC(e)}else Nd(t)&&(t=jC(t));return Object.assign({},e??{},t??{})};function Xx(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Og(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=aX(t[o],n[o]);continue}if(o==="style"){t[o]=cX(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function x0(e,t,n){let r=[],o;return i=>{const s=e(i);return(s.length!==r.length||s.some((a,l)=>!gl(r[l],a)))&&(r=s,o=t(s,i)),o}}function ef(){return{and:(...e)=>function(t){return e.every(n=>t.guard(n))},or:(...e)=>function(t){return e.some(n=>t.guard(n))},not:e=>function(t){return!t.guard(e)}}}function uX(){return{guards:ef(),createMachine:e=>e,choose:e=>function({choose:t}){return t(e)?.actions}}}var tc=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(tc||{}),Nb="__init__";function dX(e){const t=()=>e.getRootNode?.()??document,n=()=>Eo(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>S$(t()),isActiveElement:Tg,getById:r=>t().getElementById(r)}}function pX(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var On=()=>e=>Array.from(new Set(e));function fX(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var GC={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},hX="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function gX(e){return e in GC?GC[e]:e.startsWith("on")?`on${fX(e.substr(2))}`:hX.includes(e)?e:e.toLowerCase()}var pu=pX(e=>{const t={};for(const n in e){const r=e[n];n==="children"?typeof r=="string"&&(t.innerHTML=r):t[gX(n)]=e[n]}return t});function $g(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=co(t),o=A(()=>e().value!==void 0),i=co(o.value?e().value:r.value);return{initial:t,ref:i,get(){return o.value?e().value:r.value},set(s){const a=o.value?e().value:r.value,l=uc(s)?s(a):s;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:l,prev:a}),o.value||(r.value=l),n(l,a)||e().onChange?.(l,a)},invoke(s,a){e().onChange?.(s,a)},hash(s){return e().hash?.(s)??String(s)}}}$g.cleanup=e=>{Sr(()=>e())};$g.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function mX(e){const t={current:e};return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var vX=(e,t)=>{st(()=>[...e.map(n=>n())],(n,r)=>{let o=!1;for(let i=0;i{const{id:C,ids:x,getRootNode:I}=pe(t);return dX({id:C,ids:x,getRootNode:I})}),r=(...C)=>{e.debug&&console.log(...C)},o=A(()=>e.props?.({props:zx(pe(t)),get scope(){return n.value}})??pe(t)),i=bX(o),s=e.context?.({prop:i,bindable:$g,get scope(){return n.value},flush:WC,getContext(){return a},getComputed(){return v},getRefs(){return g},getEvent(){return h()}}),a={get(C){return s[C]?.get()},set(C,x){s[C]?.set(x)},initial(C){return s[C]?.initial},hash(C){const x=s[C]?.get();return s[C]?.hash(x)}};let l=new Map,c=null,u={current:null},p={current:{type:""}};const h=()=>({...p.current,current(){return p.current},previous(){return u.current}}),f=()=>({..._,matches(...C){const x=_.get();return C.includes(x)},hasTag(C){const x=_.get();return!!e.states[x]?.tags?.includes(C)}}),g=mX(e.refs?.({prop:i,context:a})??{}),m=()=>({state:f(),context:a,event:h(),prop:i,send:N,action:b,guard:w,track:vX,refs:g,computed:v,flush:WC,get scope(){return n.value},choose:k}),b=C=>{const x=uc(C)?C(m()):C;if(!x)return;const I=x.map(R=>{const M=e.implementations?.actions?.[R];return M||m0(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of I)R?.(m())},w=C=>uc(C)?C(m()):e.implementations?.guards?.[C](m()),E=C=>{const x=uc(C)?C(m()):C;if(!x)return;const I=x.map(M=>{const B=e.implementations?.effects?.[M];return B||m0(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of I){const B=M?.(m());B&&R.push(B)}return()=>R.forEach(M=>M?.())},k=C=>_K(C).find(x=>{let I=!x.guard;return Nd(x.guard)?I=!!w(x.guard):uc(x.guard)&&(I=x.guard(m())),I}),v=C=>{O$(e.computed,()=>"[zag-js] No computed object found on machine");const x=e.computed[C];return x({context:a,event:h(),prop:i,refs:g,get scope(){return n.value},computed:v})},_=$g(()=>({defaultValue:e.initialState({prop:i}),onChange(C,x){x&&(l.get(x)?.(),l.delete(x)),x&&b(e.states[x]?.exit),b(c?.actions);const I=E(e.states[C]?.effects);if(I&&l.set(C,I),x===Nb){b(e.entry);const R=E(e.effects);R&&l.set(Nb,R)}b(e.states[C]?.entry)}}));let T=tc.NotStarted;Je(()=>{const C=T===tc.Started;T=tc.Started,r(C?"rehydrating...":"initializing..."),_.invoke(_.initial,Nb)}),on(()=>{T=tc.Stopped,r("unmounting...");const C=l.values();for(const x of C)x?.();l=new Map,b(e.exit)});const N=C=>{if(T!==tc.Started)return;u.current=p.current,p.current=C;let x=_.get();const I=e.states[x].on?.[C.type]??e.on?.[C.type],R=k(I);if(!R)return;c=R;const M=R.target??x;r("transition",C.type,R.target||x,`(${R.actions})`);const B=M!==x;B?_.set(M):R.reenter&&!B?_.invoke(x,x):b(R.actions)};return e.watch?.(m()),{state:f(),send:N,context:a,prop:i,get scope(){return n.value},refs:g,computed:v,event:h(),getStatus:()=>T}}function bX(e){return function(t){return e.value[t]}}var WC=e=>{Nn().then(()=>{e()})};const yX=P({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;const r=U$(n.default()),[o,...i]=r;if(Object.keys(t).length>0){delete o.props?.ref;const s=Xx(t,o.props??{}),a=Ir(o,s);for(const l in s)l.startsWith("on")&&(a.props||={},a.props[l]=s[l]);return r.length===1?a:[a,...i]}return r}}});function U$(e){return e?e.flatMap(t=>t.type===ge?U$(t.children):[t]):[]}const xX="br, hr, img, input, area, textarea".split(", "),wX=e=>typeof e=="string"&&xX.includes(e),Mb=e=>P({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>uo(yX,n,r):()=>uo(e,n,wX(e)?void 0:r.default?.())}});function _X(){const e=new Map;return new Proxy(Mb,{apply(t,n,r){return Mb(r[0])},get(t,n){return e.has(n)||e.set(n,Mb(n)),e.get(n)}})}const ce=_X();function Jx(e){const t=pe(e);return t?.$el??t}const kX=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function ue(){const e=zt(),t=Q(),n=A(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Jx(t)),r=Object.assign({},e.exposed),o={};for(const s in e.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(r).length>0)for(const s in r)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>r[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=o;function i(s){t.value=s,!(kX(s)||!s)&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s.$el}),e.exposed=o)}return{forwardRef:i,currentRef:t,currentElement:n}}const CX=P({__name:"field-error-text",props:{asChild:{type:Boolean}},setup(e){const t=Ln();return ue(),(n,r)=>d(t).invalid?(y(),$(d(ce).span,F({key:0},d(t).getErrorTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"])):Z("",!0)}}),EX=P({__name:"field-helper-text",props:{asChild:{type:Boolean}},setup(e){const t=Ln();return ue(),(n,r)=>(y(),$(d(ce).span,F(d(t).getHelperTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),OX=P({__name:"field-input",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=Ln(),r=t;return ue(),(o,i)=>(y(),$(d(ce).input,F(d(n).getInputProps(),{"as-child":o.asChild,value:o.modelValue,onInput:i[0]||(i[0]=s=>r("update:modelValue",s.target.value))}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child","value"]))}}),IX=P({__name:"field-label",props:{asChild:{type:Boolean}},setup(e){const t=Ln();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),TX=P({__name:"field-required-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Ln();return ue(),(n,r)=>d(t).required?(y(),$(d(ce).span,F({key:0},d(t).getRequiredIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default",{},()=>[r[0]||(r[0]=re("*",-1))])]),_:3},16,["as-child"])):L(n.$slots,"fallback",{key:1})}}),SX=P({__name:"field-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return m$(n),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[OCe,vl]=Ut("EnvironmentContext"),bl=A(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}));var no=(e,t=[])=>({parts:(...n)=>{if(PX(t))return no(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>no(e,[...t,...n]),omit:(...n)=>no(e,t.filter(r=>!n.includes(r))),rename:n=>no(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ll(e)}"][data-part="${Ll(r)}"]`,`& [data-scope="${Ll(e)}"][data-part="${Ll(r)}"]`].join(", "),attrs:{"data-scope":Ll(e),"data-part":Ll(r)}}}),{})}),Ll=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),PX=e=>e.length===0;const $X=no("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),as=$X.build(),RX=(e={})=>{const t=vl(bl),n=Tr({hasErrorText:!1,hasHelperText:!1}),r=nt(),o=A(()=>pe(e).id??r),i=Q(null),s=A(()=>pe(e).ids?.control??`field::${o.value}`),a=A(()=>pe(e).ids?.errorText??`field::${o.value}::error-text`),l=A(()=>pe(e).ids?.helperText??`field::${o.value}::helper-text`),c=A(()=>pe(e).ids?.label??`field::${o.value}::label`);Je(()=>{const v=Jx(i);if(!v)return;const _=()=>{const C=t.value.getRootNode();n.hasErrorText=!!C.getElementById(a.value),n.hasHelperText=!!C.getElementById(l.value)};_();const T=t.value.getWindow(),N=new T.MutationObserver(_);N.observe(v,{childList:!0,subtree:!0}),on(()=>{N.disconnect()})});const u=()=>{const v=pe(e);return{...as.root.attrs,id:s.value,role:"group","data-disabled":G(v.disabled),"data-invalid":G(v.invalid),"data-readonly":G(v.readOnly)}},p=()=>{const v=pe(e);return{...as.label.attrs,id:c.value,"data-disabled":G(v.disabled),"data-invalid":G(v.invalid),"data-readonly":G(v.readOnly),"data-required":G(v.required),htmlFor:o.value}},h=A(()=>{const v=pe(e),_=[];return n.hasErrorText&&v.invalid&&_.push(a.value),n.hasHelperText&&_.push(l.value),_}),f=()=>{const v=pe(e);return{"aria-describedby":h.value.join(" ")||void 0,"aria-invalid":cp(v.invalid),"data-invalid":G(v.invalid),"data-required":G(v.required),"data-readonly":G(v.readOnly),id:o.value,required:v.required,disabled:v.disabled,readOnly:v.readOnly}},g=()=>({...f(),...as.input.attrs}),m=()=>({...f(),...as.textarea.attrs}),b=()=>({...f(),...as.select.attrs}),w=()=>{const v=pe(e);return{id:l.value,...as.helperText.attrs,"data-disabled":G(v.disabled)}},E=()=>({id:a.value,...as.errorText.attrs,"aria-live":"polite"}),k=()=>({"aria-hidden":!0,...as.requiredIndicator.attrs});return A(()=>{const v=pe(e);return{ariaDescribedby:h.value.join(" ")||void 0,ids:{control:o.value,label:c.value,errorText:a.value,helperText:l.value},refs:{rootRef:i},disabled:v.disabled,invalid:v.invalid,readOnly:v.readOnly,required:v.required,getLabelProps:p,getRootProps:u,getInputProps:g,getTextareaProps:m,getSelectProps:b,getHelperTextProps:w,getErrorTextProps:E,getRequiredIndicatorProps:k}})},AX=P({__name:"field-root",props:Ze({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){const t=RX(e);return m$(t),ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getRootProps(),{ref:d(t).refs.rootRef,"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),NX=P({__name:"field-select",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=Ln(),r=t;return ue(),(o,i)=>(y(),$(d(ce).select,F(d(n).getSelectProps(),{value:o.modelValue,onChange:i[0]||(i[0]=s=>r("update:modelValue",s.target.value)),"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["value","as-child"]))}});var MX=e=>{if(!e)return;const t=Ux(e),n=rn(e),r=Eo(e),o=()=>{requestAnimationFrame(()=>{e.style.height="auto";let c;t.boxSizing==="content-box"?c=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):c=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&c>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),c=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${c}px`})};e.addEventListener("input",o),e.form?.addEventListener("reset",o);const i=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(i,"value");Object.defineProperty(e,"value",{...s,set(){s?.set?.apply(this,arguments),o()}});const a=new n.ResizeObserver(()=>{requestAnimationFrame(()=>o())});a.observe(e);const l=new n.MutationObserver(()=>o());return l.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),r.fonts?.addEventListener("loadingdone",o),()=>{e.removeEventListener("input",o),e.form?.removeEventListener("reset",o),r.fonts?.removeEventListener("loadingdone",o),a.disconnect(),l.disconnect()}};const DX=P({__name:"field-textarea",props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=Ln(),o=t,i=Q();return Je(()=>{const s=Jx(i);if(!s||!n.autoresize)return;const a=MX(s);on(()=>a?.())}),ue(),(s,a)=>(y(),$(d(ce).textarea,F({ref_key:"textareaRef",ref:i},d(r).getTextareaProps(),{value:s.modelValue,onInput:a[0]||(a[0]=l=>o("update:modelValue",l.target.value)),style:n.autoresize?{resize:"none",overflow:"hidden"}:void 0,"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["value","style","as-child"]))}}),Oc=Object.freeze(Object.defineProperty({__proto__:null,Context:wK,ErrorText:CX,HelperText:EX,Input:OX,Label:IX,RequiredIndicator:TX,Root:AX,RootProvider:SX,Select:NX,Textarea:DX},Symbol.toStringTag,{value:"Module"})),LX=P({__name:"Text",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue");return(n,r)=>(y(),$(d(Oc).Root,null,{default:O(()=>[S(d(Oc).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(n.field.label),1)]),_:1}),S(d(Oc).Input,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),class:"w-full h-9 px-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent",placeholder:n.field.placeholder},null,8,["modelValue","placeholder"])]),_:1}))}}),VX=P({__name:"Textarea",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue");return(n,r)=>(y(),$(d(Oc).Root,null,{default:O(()=>[S(d(Oc).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(n.field.label||n.field.id),1)]),_:1}),S(d(Oc).Textarea,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),class:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical",rows:n.field.rows||3,placeholder:n.field.placeholder},null,8,["modelValue","rows","placeholder"])]),_:1}))}}),[j$,tf]=Ut("SwitchContext"),FX=P({__name:"switch-context",setup(e){const t=tf();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),BX=P({__name:"switch-control",props:{asChild:{type:Boolean}},setup(e){const t=tf();return ue(),(n,r)=>(y(),$(d(ce).span,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),HX=P({__name:"switch-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=tf(),n=Ln();return ue(),(r,o)=>(y(),$(d(ce).input,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getHiddenInputProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["aria-describedby","as-child"]))}}),zX=P({__name:"switch-label",props:{asChild:{type:Boolean}},setup(e){const t=tf();return ue(),(n,r)=>(y(),$(d(ce).span,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),UX=P({__name:"switch-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return j$(n),ue(),(r,o)=>(y(),$(d(ce).label,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});function jX(e){return!(e.metaKey||!av()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}var GX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function WX(e,t,n){const r=n?ho(n):null,o=rn(r);return e=e||r instanceof o.HTMLInputElement&&!GX.has(r?.type)||r instanceof o.HTMLTextAreaElement||r instanceof o.HTMLElement&&r.isContentEditable,!(e&&t==="keyboard"&&n instanceof o.KeyboardEvent&&!Reflect.has(qX,n.key))}var yl=null,w0=new Set,Dd=new Map,ol=!1,_0=!1,qX={Tab:!0,Escape:!0};function uv(e,t){for(let n of w0)n(e,t)}function Rg(e){ol=!0,jX(e)&&(yl="keyboard",uv("keyboard",e))}function Hr(e){yl="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(ol=!0,uv("pointer",e))}function G$(e){CY(e)&&(ol=!0,yl="virtual")}function W$(e){const t=ho(e);t===rn(t)||t===Eo(t)||(!ol&&!_0&&(yl="virtual",uv("virtual",e)),ol=!1,_0=!1)}function q$(){ol=!1,_0=!0}function KX(e){if(typeof window>"u"||Dd.get(rn(e)))return;const t=rn(e),n=Eo(e);let r=t.HTMLElement.prototype.focus;function o(){yl="virtual",uv("virtual",null),ol=!0,r.apply(this,arguments)}Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:o}),n.addEventListener("keydown",Rg,!0),n.addEventListener("keyup",Rg,!0),n.addEventListener("click",G$,!0),t.addEventListener("focus",W$,!0),t.addEventListener("blur",q$,!1),typeof t.PointerEvent<"u"?(n.addEventListener("pointerdown",Hr,!0),n.addEventListener("pointermove",Hr,!0),n.addEventListener("pointerup",Hr,!0)):(n.addEventListener("mousedown",Hr,!0),n.addEventListener("mousemove",Hr,!0),n.addEventListener("mouseup",Hr,!0)),t.addEventListener("beforeunload",()=>{YX(e)},{once:!0}),Dd.set(t,{focus:r})}var YX=(e,t)=>{const n=rn(e),r=Eo(e);Dd.has(n)&&(n.HTMLElement.prototype.focus=Dd.get(n).focus,r.removeEventListener("keydown",Rg,!0),r.removeEventListener("keyup",Rg,!0),r.removeEventListener("click",G$,!0),n.removeEventListener("focus",W$,!0),n.removeEventListener("blur",q$,!1),typeof n.PointerEvent<"u"?(r.removeEventListener("pointerdown",Hr,!0),r.removeEventListener("pointermove",Hr,!0),r.removeEventListener("pointerup",Hr,!0)):(r.removeEventListener("mousedown",Hr,!0),r.removeEventListener("mousemove",Hr,!0),r.removeEventListener("mouseup",Hr,!0)),Dd.delete(n))};function Ag(){return yl==="keyboard"}function K$(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:o}=e;KX(o),r?.({isFocusVisible:n||Ag(),modality:yl});const i=(s,a)=>{WX(!!t,s,a)&&r?.({isFocusVisible:Ag(),modality:s})};return w0.add(i),()=>{w0.delete(i)}}var XX=no("switch").parts("root","label","control","thumb"),Gf=XX.build(),Y$=e=>e.ids?.root??`switch:${e.id}`,qC=e=>e.ids?.label??`switch:${e.id}:label`,JX=e=>e.ids?.thumb??`switch:${e.id}:thumb`,ZX=e=>e.ids?.control??`switch:${e.id}:control`,k0=e=>e.ids?.hiddenInput??`switch:${e.id}:input`,QX=e=>e.getById(Y$(e)),pc=e=>e.getById(k0(e));function eJ(e,t){const{context:n,send:r,prop:o,scope:i}=e,s=!!o("disabled"),a=!!o("readOnly"),l=!!o("required"),c=!!n.get("checked"),u=!s&&n.get("focused"),p=!s&&n.get("focusVisible"),h={"data-active":G(n.get("active")),"data-focus":G(u),"data-focus-visible":G(p),"data-readonly":G(a),"data-hover":G(n.get("hovered")),"data-disabled":G(s),"data-state":c?"checked":"unchecked","data-invalid":G(o("invalid")),"data-required":G(l)};return{checked:c,disabled:s,focused:u,setChecked(f){r({type:"CHECKED.SET",checked:f,isTrusted:!1})},toggleChecked(){r({type:"CHECKED.TOGGLE",checked:c,isTrusted:!1})},getRootProps(){return t.label({...Gf.root.attrs,...h,dir:o("dir"),id:Y$(i),htmlFor:k0(i),onPointerMove(){s||r({type:"CONTEXT.SET",context:{hovered:!0}})},onPointerLeave(){s||r({type:"CONTEXT.SET",context:{hovered:!1}})},onClick(f){s||(ho(f)===pc(i)&&f.stopPropagation(),lv()&&pc(i)?.focus())}})},getLabelProps(){return t.element({...Gf.label.attrs,...h,dir:o("dir"),id:qC(i)})},getThumbProps(){return t.element({...Gf.thumb.attrs,...h,dir:o("dir"),id:JX(i),"aria-hidden":!0})},getControlProps(){return t.element({...Gf.control.attrs,...h,dir:o("dir"),id:ZX(i),"aria-hidden":!0})},getHiddenInputProps(){return t.input({id:k0(i),type:"checkbox",required:o("required"),defaultChecked:c,disabled:s,"aria-labelledby":qC(i),"aria-invalid":o("invalid"),name:o("name"),form:o("form"),value:o("value"),style:cv,onFocus(){const f=Ag();r({type:"CONTEXT.SET",context:{focused:!0,focusVisible:f}})},onBlur(){r({type:"CONTEXT.SET",context:{focused:!1,focusVisible:!1}})},onClick(f){if(a){f.preventDefault();return}const g=f.currentTarget.checked;r({type:"CHECKED.SET",checked:g,isTrusted:!0})}})}}}var{not:KC}=ef(),tJ={props({props:e}){return{defaultChecked:!1,label:"switch",value:"on",...e}},initialState(){return"ready"},context({prop:e,bindable:t}){return{checked:t(()=>({defaultValue:e("defaultChecked"),value:e("checked"),onChange(n){e("onCheckedChange")?.({checked:n})}})),fieldsetDisabled:t(()=>({defaultValue:!1})),focusVisible:t(()=>({defaultValue:!1})),active:t(()=>({defaultValue:!1})),focused:t(()=>({defaultValue:!1})),hovered:t(()=>({defaultValue:!1}))}},computed:{isDisabled:({context:e,prop:t})=>t("disabled")||e.get("fieldsetDisabled")},watch({track:e,prop:t,context:n,action:r}){e([()=>t("disabled")],()=>{r(["removeFocusIfNeeded"])}),e([()=>n.get("checked")],()=>{r(["syncInputElement"])})},effects:["trackFormControlState","trackPressEvent","trackFocusVisible"],on:{"CHECKED.TOGGLE":[{guard:KC("isTrusted"),actions:["toggleChecked","dispatchChangeEvent"]},{actions:["toggleChecked"]}],"CHECKED.SET":[{guard:KC("isTrusted"),actions:["setChecked","dispatchChangeEvent"]},{actions:["setChecked"]}],"CONTEXT.SET":{actions:["setContext"]}},states:{ready:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackPressEvent({computed:e,scope:t,context:n}){if(!e("isDisabled"))return YY({pointerNode:QX(t),keyboardNode:pc(t),isValidKey:r=>r.key===" ",onPress:()=>n.set("active",!1),onPressStart:()=>n.set("active",!0),onPressEnd:()=>n.set("active",!1)})},trackFocusVisible({computed:e,scope:t}){if(!e("isDisabled"))return K$({root:t.getRootNode()})},trackFormControlState({context:e,send:t,scope:n}){return du(pc(n),{onFieldsetDisabledChange(r){e.set("fieldsetDisabled",r)},onFormReset(){const r=e.initial("checked");t({type:"CHECKED.SET",checked:!!r,src:"form-reset"})}})}},actions:{setContext({context:e,event:t}){for(const n in t.context)e.set(n,t.context[n])},syncInputElement({context:e,scope:t}){const n=pc(t);n&&$$(n,!!e.get("checked"))},removeFocusIfNeeded({context:e,prop:t}){t("disabled")&&e.set("focused",!1)},setChecked({context:e,event:t}){e.set("checked",t.checked)},toggleChecked({context:e}){e.set("checked",!e.get("checked"))},dispatchChangeEvent({context:e,scope:t}){const n=pc(t);A$(n,{checked:e.get("checked")})}}}};On()(["checked","defaultChecked","dir","disabled","form","getRootNode","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]);const xl=A(()=>({dir:"ltr",locale:"en-US"})),[ICe,wl]=Ut("LocaleContext"),fu=e=>{const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},nJ=(e={},t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=Ln(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,hiddenInput:i?.value.ids.control},disabled:i?.value.disabled,readOnly:i?.value.readOnly,invalid:i?.value.invalid,required:i?.value.required,dir:o.value.dir,getRootNode:r?.value.getRootNode,...fu(l),onCheckedChange(c){t?.("checkedChange",c),t?.("update:checked",c.checked),l.onCheckedChange?.(c)}}}),a=ml(tJ,s);return A(()=>eJ(a,pu))},rJ=P({__name:"switch-root",props:Ze({checked:{type:Boolean},defaultChecked:{type:Boolean},disabled:{type:Boolean},form:{},id:{},ids:{},invalid:{type:Boolean},label:{},name:{},readOnly:{type:Boolean},required:{type:Boolean},value:{},asChild:{type:Boolean}},{checked:void 0,defaultChecked:void 0,disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),emits:["checkedChange","update:checked"],setup(e,{emit:t}){const n=nJ(e,t);return j$(n),ue(),(r,o)=>(y(),$(d(ce).label,F(d(n).getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),oJ=P({__name:"switch-thumb",props:{asChild:{type:Boolean}},setup(e){const t=tf();return ue(),(n,r)=>(y(),$(d(ce).span,F(d(t).getThumbProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Fu=Object.freeze(Object.defineProperty({__proto__:null,Context:FX,Control:BX,HiddenInput:HX,Label:zX,Root:rJ,RootProvider:UX,Thumb:oJ},Symbol.toStringTag,{value:"Module"})),iJ={key:1,class:"flex items-center cursor-pointer gap-2"},sJ={class:"text-sm font-medium text-gray-700"},aJ=P({__name:"Boolean",props:at({field:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=A(()=>t.field.variant||"checkbox"),r=rt(e,"modelValue");return(o,i)=>n.value==="switch"?(y(),$(d(Fu).Root,{key:0,checked:r.value,"onUpdate:checked":i[0]||(i[0]=s=>r.value=s),class:"flex items-center cursor-pointer gap-2"},{default:O(()=>[S(d(Fu).Control,{class:"w-8 h-4 p-0.5 inline-flex items-center bg-gray-300 rounded-full data-[state=checked]:bg-accent relative transition-colors"},{default:O(()=>[S(d(Fu).Thumb,{class:"w-3 h-3 bg-white rounded-full shadow-sm data-[state=checked]:translate-x-4 transition-transform"})]),_:1}),S(d(Fu).Label,{class:"text-sm font-medium text-gray-700"},{default:O(()=>[re(j(o.field.label),1)]),_:1}),S(d(Fu).HiddenInput)]),_:1},8,["checked"])):(y(),V("label",iJ,[yo(D("input",{type:"checkbox","onUpdate:modelValue":i[1]||(i[1]=s=>r.value=s),class:"w-4 h-4 rounded border-gray-300 focus:outline-none text-accent focus:ring-accent focus:ring-2"},null,512),[[Fp,r.value]]),D("span",sJ,j(o.field.label),1)]))}}),lJ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function cJ(e,t){return y(),V("svg",lJ,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m4.5 12.75l6 6l9-13.5"},null,-1)])])}const uJ=fe({name:"heroicons-check",render:cJ}),dJ={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function pJ(e,t){return y(),V("svg",dJ,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m19.5 8.25l-7.5 7.5l-7.5-7.5"},null,-1)])])}const X$=fe({name:"heroicons-chevron-down",render:pJ});var fJ=Object.defineProperty,hJ=(e,t,n)=>t in e?fJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Le=(e,t,n)=>hJ(e,typeof t!="symbol"?t+"":t,n),Ph={itemToValue(e){return typeof e=="string"?e:$b(e)&&Th(e,"value")?e.value:""},itemToString(e){return typeof e=="string"?e:$b(e)&&Th(e,"label")?e.label:Ph.itemToValue(e)},isItemDisabled(e){return $b(e)&&Th(e,"disabled")?!!e.disabled:!1}},Zx=class J${constructor(t){this.options=t,Le(this,"items"),Le(this,"indexMap",null),Le(this,"copy",n=>new J$({...this.options,items:n??[...this.items]})),Le(this,"isEqual",n=>gl(this.items,n.items)),Le(this,"setItems",n=>this.copy(n)),Le(this,"getValues",(n=this.items)=>{const r=[];for(const o of n){const i=this.getItemValue(o);i!=null&&r.push(i)}return r}),Le(this,"find",n=>{if(n==null)return null;const r=this.indexOf(n);return r!==-1?this.at(r):null}),Le(this,"findMany",n=>{const r=[];for(const o of n){const i=this.find(o);i!=null&&r.push(i)}return r}),Le(this,"at",n=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[n]??null;let r=0;const o=this.group();for(const[,i]of o)for(const s of i){if(r===n)return s;r++}return null}),Le(this,"sortFn",(n,r)=>{const o=this.indexOf(n),i=this.indexOf(r);return(o??0)-(i??0)}),Le(this,"sort",n=>[...n].sort(this.sortFn.bind(this))),Le(this,"getItemValue",n=>n==null?null:this.options.itemToValue?.(n)??Ph.itemToValue(n)),Le(this,"getItemDisabled",n=>n==null?!1:this.options.isItemDisabled?.(n)??Ph.isItemDisabled(n)),Le(this,"stringifyItem",n=>n==null?null:this.options.itemToString?.(n)??Ph.itemToString(n)),Le(this,"stringify",n=>n==null?null:this.stringifyItem(this.find(n))),Le(this,"stringifyItems",(n,r=", ")=>{const o=[];for(const i of n){const s=this.stringifyItem(i);s!=null&&o.push(s)}return o.join(r)}),Le(this,"stringifyMany",(n,r)=>this.stringifyItems(this.findMany(n),r)),Le(this,"has",n=>this.indexOf(n)!==-1),Le(this,"hasItem",n=>n==null?!1:this.has(this.getItemValue(n))),Le(this,"group",()=>{const{groupBy:n,groupSort:r}=this.options;if(!n)return[["",[...this.items]]];const o=new Map;this.items.forEach((s,a)=>{const l=n(s,a);o.has(l)||o.set(l,[]),o.get(l).push(s)});let i=Array.from(o.entries());return r&&i.sort(([s],[a])=>{if(typeof r=="function")return r(s,a);if(Array.isArray(r)){const l=r.indexOf(s),c=r.indexOf(a);return l===-1?1:c===-1?-1:l-c}return r==="asc"?s.localeCompare(a):r==="desc"?a.localeCompare(s):0}),i}),Le(this,"getNextValue",(n,r=1,o=!1)=>{let i=this.indexOf(n);if(i===-1)return null;for(i=o?Math.min(i+r,this.size-1):i+r;i<=this.size&&this.getItemDisabled(this.at(i));)i++;return this.getItemValue(this.at(i))}),Le(this,"getPreviousValue",(n,r=1,o=!1)=>{let i=this.indexOf(n);if(i===-1)return null;for(i=o?Math.max(i-r,0):i-r;i>=0&&this.getItemDisabled(this.at(i));)i--;return this.getItemValue(this.at(i))}),Le(this,"indexOf",n=>{if(n==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(r=>this.getItemValue(r)===n);if(!this.indexMap){this.indexMap=new Map;let r=0;const o=this.group();for(const[,i]of o)for(const s of i){const a=this.getItemValue(s);a!=null&&this.indexMap.set(a,r),r++}}return this.indexMap.get(n)??-1}),Le(this,"getByText",(n,r)=>{const o=r!=null?this.indexOf(r):-1,i=n.length===1;for(let s=0;s{const{state:o,currentValue:i,timeout:s=350}=r,a=o.keysSoFar+n,l=a.length>1&&Array.from(a).every(f=>f===a[0])?a[0]:a,c=this.getByText(l,i),u=this.getItemValue(c);function p(){clearTimeout(o.timer),o.timer=-1}function h(f){o.keysSoFar=f,p(),f!==""&&(o.timer=+setTimeout(()=>{h(""),p()},s))}return h(a),u}),Le(this,"update",(n,r)=>{let o=this.indexOf(n);return o===-1?this:this.copy([...this.items.slice(0,o),r,...this.items.slice(o+1)])}),Le(this,"upsert",(n,r,o="append")=>{let i=this.indexOf(n);return i===-1?(o==="append"?this.append:this.prepend)(r):this.copy([...this.items.slice(0,i),r,...this.items.slice(i+1)])}),Le(this,"insert",(n,...r)=>this.copy(Bu(this.items,n,...r))),Le(this,"insertBefore",(n,...r)=>{let o=this.indexOf(n);if(o===-1)if(this.items.length===0)o=0;else return this;return this.copy(Bu(this.items,o,...r))}),Le(this,"insertAfter",(n,...r)=>{let o=this.indexOf(n);if(o===-1)if(this.items.length===0)o=0;else return this;return this.copy(Bu(this.items,o+1,...r))}),Le(this,"prepend",(...n)=>this.copy(Bu(this.items,0,...n))),Le(this,"append",(...n)=>this.copy(Bu(this.items,this.items.length,...n))),Le(this,"filter",n=>{const r=this.items.filter((o,i)=>n(this.stringifyItem(o),i,o));return this.copy(r)}),Le(this,"remove",(...n)=>{const r=n.map(o=>typeof o=="string"?o:this.getItemValue(o));return this.copy(this.items.filter(o=>{const i=this.getItemValue(o);return i==null?!1:!r.includes(i)}))}),Le(this,"move",(n,r)=>{const o=this.indexOf(n);return o===-1?this:this.copy(Wf(this.items,[o],r))}),Le(this,"moveBefore",(n,...r)=>{let o=this.items.findIndex(s=>this.getItemValue(s)===n);if(o===-1)return this;let i=r.map(s=>this.items.findIndex(a=>this.getItemValue(a)===s)).sort((s,a)=>s-a);return this.copy(Wf(this.items,i,o))}),Le(this,"moveAfter",(n,...r)=>{let o=this.items.findIndex(s=>this.getItemValue(s)===n);if(o===-1)return this;let i=r.map(s=>this.items.findIndex(a=>this.getItemValue(a)===s)).sort((s,a)=>s-a);return this.copy(Wf(this.items,i,o+1))}),Le(this,"reorder",(n,r)=>this.copy(Wf(this.items,[n],r))),Le(this,"compareValue",(n,r)=>{const o=this.indexOf(n),i=this.indexOf(r);return oi?1:0}),Le(this,"range",(n,r)=>{let o=[],i=n;for(;i!=null;){if(this.find(i)&&o.push(i),i===r)return o;i=this.getNextValue(i)}return[]}),Le(this,"getValueRange",(n,r)=>n&&r?this.compareValue(n,r)<=0?this.range(n,r):this.range(r,n):[]),Le(this,"toString",()=>{let n="";for(const r of this.items){const o=this.getItemValue(r),i=this.stringifyItem(r),s=this.getItemDisabled(r),a=[o,i,s].filter(Boolean).join(":");n+=a+","}return n}),Le(this,"toJSON",()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let t=0;for(;this.getItemDisabled(this.at(t));)t++;return this.getItemValue(this.at(t))}get lastValue(){let t=this.size-1;for(;this.getItemDisabled(this.at(t));)t--;return this.getItemValue(this.at(t))}*[Symbol.iterator](){yield*this.items}},gJ=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function Bu(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Wf(e,t,n){t=[...t].sort((o,i)=>o-i);const r=t.map(o=>e[o]);for(let o=t.length-1;o>=0;o--)e=[...e.slice(0,t[o]),...e.slice(t[o]+1)];return n=Math.max(0,n-t.filter(o=>onew Zx(e),[Z$,Vn]=Ut("SelectContext"),vJ=P({__name:"select-clear-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getClearTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[Q$,eR]=Ut("PresenceContext"),bJ=P({__name:"select-content",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=eR(),r=A(()=>Xx(t.value.getContentProps(),n.value.presenceProps));return ue(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(ce).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),yJ=P({__name:"select-context",setup(e){const t=Vn();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),xJ=P({__name:"select-control",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wJ={key:0,value:""},_J=["value","disabled"],kJ=P({__name:"select-hidden-select",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=Ln();return ue(),(r,o)=>(y(),$(d(ce).select,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getHiddenSelectProps()),{default:O(()=>[d(t).value.length===0?(y(),V("option",wJ)):Z("",!0),(y(!0),V(ge,null,Ie(d(t).collection.items,i=>(y(),V("option",{key:i.value,value:d(t).collection.getItemValue(i),disabled:d(t).collection.getItemDisabled(i)},j(d(t).collection.stringifyItem(i))+" > ",9,_J))),128))]),_:1},16,["aria-describedby"]))}}),CJ=P({__name:"select-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[EJ,OJ]=Ut("SelectItemContext"),IJ=P({__name:"select-item-context",setup(e){const t=OJ();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[TJ,SJ]=Ut("SelectItemGroupPropsContext"),PJ=P({__name:"select-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=SJ();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getItemGroupLabelProps({htmlFor:d(n).id}),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),$J=P({__name:"select-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=Vn(),r=nt(),o=t.id??r;return TJ({id:o}),ue(),(i,s)=>(y(),$(d(ce).div,F(d(n).getItemGroupProps({id:d(o)}),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),[RJ,tR]=Ut("SelectItemPropsContext"),AJ=P({__name:"select-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=tR();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),NJ=P({__name:"select-item-text",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=tR();return ue(),(r,o)=>(y(),$(d(ce).span,F(d(t).getItemTextProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),MJ=P({__name:"select-item",props:{item:{},persistFocus:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Vn();return RJ(t),EJ(A(()=>n.value.getItemState(t))),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getItemProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),DJ=P({__name:"select-label",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),LJ=P({__name:"select-list",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getListProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[dv,nR]=Ut("RenderStrategyProps");function VJ(e,t){const{state:n,send:r,context:o}=e,i=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:i,setNode(s){s&&r({type:"NODE.SET",node:s})},unmount(){r({type:"UNMOUNT"})}}}var FJ={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Ux(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const i=t.get("node");if(!o&&i?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Ht(()=>{const s=qf(t.get("styles"));e.set("unmountAnimationName",s),s==="none"||s===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Ht(()=>{e.set("prevAnimationName",qf(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{const r=t.get("node");if(!r)return;const o=a=>{(a.composedPath?.()?.[0]??a.target)===r&&e.set("prevAnimationName",qf(t.get("styles")))},i=a=>{const l=qf(t.get("styles"));ho(a)===r&&l===e.get("unmountAnimationName")&&n({type:"UNMOUNT",src:"animationend"})};r.addEventListener("animationstart",o),r.addEventListener("animationcancel",i),r.addEventListener("animationend",i);const s=z$(r,{animationFillMode:"forwards"});return()=>{r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",i),r.removeEventListener("animationend",i),D$(()=>s())}}}}};function qf(e){return e?.animationName||"none"}On()(["onExitComplete","present","immediate"]);const rR=(e,t)=>{const n=Q(!1),r=Q(null),o=A(()=>({present:pe(e).present,onExitComplete:()=>t?.("exitComplete")})),i=ml(FJ,o),s=A(()=>VJ(i));return st(()=>s.value.present,()=>{s.value.present&&(n.value=!0)}),st(r,()=>{if(r.value){const a=r.value.$el?r.value.$el:r.value;a&&s.value.setNode(a)}}),A(()=>{const a=pe(e);return{present:s.value.present,unmounted:!s.value.present&&!n.value&&a.lazyMount||a?.unmountOnExit&&!s.value?.present&&n.value,presenceProps:{ref:r,hidden:!s.value.present,"data-state":s.value.skip&&a.skipAnimationOnMount?void 0:a?.present?"open":"closed"}}})},BJ=P({__name:"select-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Vn(),n=nR(),r=rR(A(()=>({...n.value,present:t.value.open})));return Q$(r),ue(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(ce).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),HJ=P({__name:"select-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return Z$(n),dv(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),zJ=["top","right","bottom","left"],Ys=Math.min,br=Math.max,Ng=Math.round,Kf=Math.floor,Yo=e=>({x:e,y:e}),UJ={left:"right",right:"left",bottom:"top",top:"bottom"},jJ={start:"end",end:"start"};function C0(e,t,n){return br(e,Ys(t,n))}function zi(e,t){return typeof e=="function"?e(t):e}function Ui(e){return e.split("-")[0]}function hu(e){return e.split("-")[1]}function Qx(e){return e==="x"?"y":"x"}function ew(e){return e==="y"?"height":"width"}const GJ=new Set(["top","bottom"]);function Uo(e){return GJ.has(Ui(e))?"y":"x"}function tw(e){return Qx(Uo(e))}function WJ(e,t,n){n===void 0&&(n=!1);const r=hu(e),o=tw(e),i=ew(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Mg(s)),[s,Mg(s)]}function qJ(e){const t=Mg(e);return[E0(e),t,E0(t)]}function E0(e){return e.replace(/start|end/g,t=>jJ[t])}const YC=["left","right"],XC=["right","left"],KJ=["top","bottom"],YJ=["bottom","top"];function XJ(e,t,n){switch(e){case"top":case"bottom":return n?t?XC:YC:t?YC:XC;case"left":case"right":return t?KJ:YJ;default:return[]}}function JJ(e,t,n,r){const o=hu(e);let i=XJ(Ui(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(E0)))),i}function Mg(e){return e.replace(/left|right|bottom|top/g,t=>UJ[t])}function ZJ(e){return{top:0,right:0,bottom:0,left:0,...e}}function oR(e){return typeof e!="number"?ZJ(e):{top:e,right:e,bottom:e,left:e}}function Dg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function JC(e,t,n){let{reference:r,floating:o}=e;const i=Uo(t),s=tw(t),a=ew(s),l=Ui(t),c=i==="y",u=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(hu(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const QJ=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=JC(c,r,l),h=r,f={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=zi(e,t)||{};if(c==null)return{};const p=oR(u),h={x:n,y:r},f=tw(o),g=ew(f),m=await s.getDimensions(c),b=f==="y",w=b?"top":"left",E=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=i.reference[g]+i.reference[f]-h[f]-i.floating[g],_=h[f]-i.reference[f],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=T?T[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(T)))&&(N=a.floating[k]||i.floating[g]);const C=v/2-_/2,x=N/2-m[g]/2-1,I=Ys(p[w],x),R=Ys(p[E],x),M=I,B=N-m[g]-R,z=N/2-m[g]/2+C,J=C0(M,z,B),q=!l.arrow&&hu(o)!=null&&z!==J&&i.reference[g]/2-(zz<=0)){var R,M;const z=(((R=i.flip)==null?void 0:R.index)||0)+1,J=N[z];if(J&&(!(p==="alignment"&&E!==Uo(J))||I.every(K=>Uo(K.placement)===E?K.overflows[0]>0:!0)))return{data:{index:z,overflows:I},reset:{placement:J}};let q=(M=I.filter(K=>K.overflows[0]<=0).sort((K,X)=>K.overflows[1]-X.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(f){case"bestFit":{var B;const K=(B=I.filter(X=>{if(T){const de=Uo(X.placement);return de===E||de==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(de=>de>0).reduce((de,Ue)=>de+Ue,0)]).sort((X,de)=>X[1]-de[1])[0])==null?void 0:B[0];K&&(q=K);break}case"initialPlacement":q=a;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function ZC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QC(e){return zJ.some(t=>e[t]>=0)}const nZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=zi(e,t);switch(r){case"referenceHidden":{const i=await fp(t,{...o,elementContext:"reference"}),s=ZC(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:QC(s)}}}case"escaped":{const i=await fp(t,{...o,altBoundary:!0}),s=ZC(i,n.floating);return{data:{escapedOffsets:s,escaped:QC(s)}}}default:return{}}}}},iR=new Set(["left","top"]);async function rZ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ui(n),a=hu(n),l=Uo(n)==="y",c=iR.has(s)?-1:1,u=i&&l?-1:1,p=zi(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const oZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await rZ(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},iZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...l}=zi(e,t),c={x:n,y:r},u=await fp(t,l),p=Uo(Ui(o)),h=Qx(p);let f=c[h],g=c[p];if(i){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=f+u[b],k=f-u[w];f=C0(E,f,k)}if(s){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=g+u[b],k=g-u[w];g=C0(E,g,k)}const m=a.fn({...t,[h]:f,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[p]:s}}}}}},sZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=zi(e,t),u={x:n,y:r},p=Uo(o),h=Qx(p);let f=u[h],g=u[p];const m=zi(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",v=i.reference[h]-i.floating[k]+b.mainAxis,_=i.reference[h]+i.reference[k]-b.mainAxis;f_&&(f=_)}if(c){var w,E;const k=h==="y"?"width":"height",v=iR.has(Ui(o)),_=i.reference[p]-i.floating[k]+(v&&((w=s.offset)==null?void 0:w[p])||0)+(v?0:b.crossAxis),T=i.reference[p]+i.reference[k]+(v?0:((E=s.offset)==null?void 0:E[p])||0)-(v?b.crossAxis:0);g<_?g=_:g>T&&(g=T)}return{[h]:f,[p]:g}}}},aZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=zi(e,t),u=await fp(t,c),p=Ui(o),h=hu(o),f=Uo(o)==="y",{width:g,height:m}=i.floating;let b,w;p==="top"||p==="bottom"?(b=p,w=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(w=p,b=h==="end"?"top":"bottom");const E=m-u.top-u.bottom,k=g-u.left-u.right,v=Ys(m-u[b],E),_=Ys(g-u[w],k),T=!t.middlewareData.shift;let N=v,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),T&&!h){const I=br(u.left,0),R=br(u.right,0),M=br(u.top,0),B=br(u.bottom,0);f?C=g-2*(I!==0||R!==0?I+R:br(u.left,u.right)):N=m-2*(M!==0||B!==0?M+B:br(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:N});const x=await s.getDimensions(a.floating);return g!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function pv(){return typeof window<"u"}function gu(e){return sR(e)?(e.nodeName||"").toLowerCase():"#document"}function Cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function li(e){var t;return(t=(sR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sR(e){return pv()?e instanceof Node||e instanceof Cr(e).Node:!1}function go(e){return pv()?e instanceof Element||e instanceof Cr(e).Element:!1}function ti(e){return pv()?e instanceof HTMLElement||e instanceof Cr(e).HTMLElement:!1}function eE(e){return!pv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cr(e).ShadowRoot}const lZ=new Set(["inline","contents"]);function nf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=mo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lZ.has(o)}const cZ=new Set(["table","td","th"]);function uZ(e){return cZ.has(gu(e))}const dZ=[":popover-open",":modal"];function fv(e){return dZ.some(t=>{try{return e.matches(t)}catch{return!1}})}const pZ=["transform","translate","scale","rotate","perspective"],fZ=["transform","translate","scale","rotate","perspective","filter"],hZ=["paint","layout","strict","content"];function nw(e){const t=rw(),n=go(e)?mo(e):e;return pZ.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fZ.some(r=>(n.willChange||"").includes(r))||hZ.some(r=>(n.contain||"").includes(r))}function gZ(e){let t=Xs(e);for(;ti(t)&&!Uc(t);){if(nw(t))return t;if(fv(t))return null;t=Xs(t)}return null}function rw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mZ=new Set(["html","body","#document"]);function Uc(e){return mZ.has(gu(e))}function mo(e){return Cr(e).getComputedStyle(e)}function hv(e){return go(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xs(e){if(gu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eE(e)&&e.host||li(e);return eE(t)?t.host:t}function aR(e){const t=Xs(e);return Uc(t)?e.ownerDocument?e.ownerDocument.body:e.body:ti(t)&&nf(t)?t:aR(t)}function hp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=aR(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Cr(o);if(i){const a=O0(s);return t.concat(s,s.visualViewport||[],nf(o)?o:[],a&&n?hp(a):[])}return t.concat(o,hp(o,[],n))}function O0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lR(e){const t=mo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ti(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ng(n)!==i||Ng(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function ow(e){return go(e)?e:e.contextElement}function Ic(e){const t=ow(e);if(!ti(t))return Yo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=lR(t);let s=(i?Ng(n.width):n.width)/r,a=(i?Ng(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const vZ=Yo(0);function cR(e){const t=Cr(e);return!rw()||!t.visualViewport?vZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Cr(e)?!1:t}function il(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ow(e);let s=Yo(1);t&&(r?go(r)&&(s=Ic(r)):s=Ic(e));const a=bZ(i,n,r)?cR(i):Yo(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(i){const h=Cr(i),f=r&&go(r)?Cr(r):r;let g=h,m=O0(g);for(;m&&r&&f!==g;){const b=Ic(m),w=m.getBoundingClientRect(),E=mo(m),k=w.left+(m.clientLeft+parseFloat(E.paddingLeft))*b.x,v=w.top+(m.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=k,c+=v,g=Cr(m),m=O0(g)}}return Dg({width:u,height:p,x:l,y:c})}function gv(e,t){const n=hv(e).scrollLeft;return t?t.left+n:il(li(e)).left+n}function uR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-gv(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function yZ(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=li(r),a=t?fv(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Yo(1);const u=Yo(0),p=ti(r);if((p||!p&&!i)&&((gu(r)!=="body"||nf(s))&&(l=hv(r)),ti(r))){const f=il(r);c=Ic(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=s&&!p&&!i?uR(s,l):Yo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function xZ(e){return Array.from(e.getClientRects())}function wZ(e){const t=li(e),n=hv(e),r=e.ownerDocument.body,o=br(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=br(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+gv(e);const a=-n.scrollTop;return mo(r).direction==="rtl"&&(s+=br(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const tE=25;function _Z(e,t){const n=Cr(e),r=li(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=rw();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=gv(r);if(c<=0){const u=r.ownerDocument,p=u.body,h=getComputedStyle(p),f=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-f);g<=tE&&(i-=g)}else c<=tE&&(i+=c);return{width:i,height:s,x:a,y:l}}const kZ=new Set(["absolute","fixed"]);function CZ(e,t){const n=il(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ti(e)?Ic(e):Yo(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function nE(e,t,n){let r;if(t==="viewport")r=_Z(e,n);else if(t==="document")r=wZ(li(e));else if(go(t))r=CZ(t,n);else{const o=cR(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Dg(r)}function dR(e,t){const n=Xs(e);return n===t||!go(n)||Uc(n)?!1:mo(n).position==="fixed"||dR(n,t)}function EZ(e,t){const n=t.get(e);if(n)return n;let r=hp(e,[],!1).filter(a=>go(a)&&gu(a)!=="body"),o=null;const i=mo(e).position==="fixed";let s=i?Xs(e):e;for(;go(s)&&!Uc(s);){const a=mo(s),l=nw(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&o&&kZ.has(o.position)||nf(s)&&!l&&dR(e,s))?r=r.filter(c=>c!==s):o=a,s=Xs(s)}return t.set(e,r),r}function OZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?fv(t)?[]:EZ(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((l,c)=>{const u=nE(t,c,o);return l.top=br(u.top,l.top),l.right=Ys(u.right,l.right),l.bottom=Ys(u.bottom,l.bottom),l.left=br(u.left,l.left),l},nE(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function IZ(e){const{width:t,height:n}=lR(e);return{width:t,height:n}}function TZ(e,t,n){const r=ti(t),o=li(t),i=n==="fixed",s=il(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Yo(0);function c(){l.x=gv(o)}if(r||!r&&!i)if((gu(t)!=="body"||nf(o))&&(a=hv(t)),r){const f=il(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?uR(o,a):Yo(0),p=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:p,y:h,width:s.width,height:s.height}}function Db(e){return mo(e).position==="static"}function rE(e,t){if(!ti(e)||mo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return li(e)===n&&(n=n.ownerDocument.body),n}function pR(e,t){const n=Cr(e);if(fv(e))return n;if(!ti(e)){let o=Xs(e);for(;o&&!Uc(o);){if(go(o)&&!Db(o))return o;o=Xs(o)}return n}let r=rE(e,t);for(;r&&uZ(r)&&Db(r);)r=rE(r,t);return r&&Uc(r)&&Db(r)&&!nw(r)?n:r||gZ(e)||n}const SZ=async function(e){const t=this.getOffsetParent||pR,n=this.getDimensions,r=await n(e.floating);return{reference:TZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PZ(e){return mo(e).direction==="rtl"}const $Z={convertOffsetParentRelativeRectToViewportRelativeRect:yZ,getDocumentElement:li,getClippingRect:OZ,getOffsetParent:pR,getElementRects:SZ,getClientRects:xZ,getDimensions:IZ,getScale:Ic,isElement:go,isRTL:PZ};function fR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RZ(e,t){let n=null,r;const o=li(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:h,height:f}=c;if(a||t(),!h||!f)return;const g=Kf(p),m=Kf(o.clientWidth-(u+h)),b=Kf(o.clientHeight-(p+f)),w=Kf(u),E={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:br(0,Ys(1,l))||1};let k=!0;function v(_){const T=_[0].intersectionRatio;if(T!==l){if(!k)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!fR(c,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(v,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,E)}n.observe(e)}return s(!0),i}function AZ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ow(e),u=o||i?[...c?hp(c):[],...hp(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=c&&a?RZ(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g,m=l?il(e):null;l&&b();function b(){const w=il(e);m&&!fR(m,w)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const NZ=oZ,MZ=iZ,DZ=tZ,LZ=aZ,VZ=nZ,FZ=eZ,BZ=sZ,HZ=(e,t,n)=>{const r=new Map,o={platform:$Z,...n},i={...o.platform,_c:r};return QJ(e,t,{...o,platform:i})};function oE(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...o,toJSON:()=>o}}function zZ(e){if(!e)return oE();const{x:t,y:n,width:r,height:o}=e;return oE(t,n,r,o)}function UZ(e,t){return{contextElement:Jn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t?.(n);return r||!n?zZ(r):n.getBoundingClientRect()}}}var Hu=e=>({variable:e,reference:`var(${e})`}),bi={arrowSize:Hu("--arrow-size"),arrowSizeHalf:Hu("--arrow-size-half"),arrowBg:Hu("--arrow-background"),transformOrigin:Hu("--transform-origin"),arrowOffset:Hu("--arrow-offset")},jZ=e=>e==="top"||e==="bottom"?"y":"x";function GZ(e,t){return{name:"transformOrigin",fn(n){const{elements:r,middlewareData:o,placement:i,rects:s,y:a}=n,l=i.split("-")[0],c=jZ(l),u=o.arrow?.x||0,p=o.arrow?.y||0,h=t?.clientWidth||0,f=t?.clientHeight||0,g=u+h/2,m=p+f/2,b=Math.abs(o.shift?.y||0),w=s.reference.height/2,E=f/2,k=e.offset?.mainAxis??e.gutter,v=typeof k=="number"?k+E:k??E,_=b>v,T={top:`${g}px calc(100% + ${v}px)`,bottom:`${g}px ${-v}px`,left:`calc(100% + ${v}px) ${m}px`,right:`${-v}px ${m}px`}[l],N=`${g}px ${s.reference.y+w-a}px`,C=!!e.overlap&&c==="y"&&_;return r.floating.style.setProperty(bi.transformOrigin.variable,C?N:T),{data:{transformOrigin:C?N:T}}}}}var WZ={name:"rects",fn({rects:e}){return{data:e}}},qZ=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${bi.arrowOffset.reference})`}),{}}}};function KZ(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var YZ={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function iE(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function iw(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function XZ(e,t,n){const r=e||t.createElement("div");return FZ({element:r,padding:n.arrowPadding})}function JZ(e,t){if(!PK(t.offset??t.gutter))return NZ(({placement:n})=>{const r=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,i=typeof o=="number"?o+r:o??r,{hasAlign:s}=KZ(n),a=s?void 0:t.shift,l=t.offset?.crossAxis??a;return zx({crossAxis:l,mainAxis:i,alignmentAxis:t.shift})})}function ZZ(e){if(!e.flip)return;const t=iw(e.boundary);return DZ({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function QZ(e){if(!e.slide&&!e.overlap)return;const t=iw(e.boundary);return MZ({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:BZ()})}function eQ(e){return LZ({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const i=t.floating,s=Math.round(n.reference.width),a=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),i.style.setProperty("--reference-width",`${s}px`),i.style.setProperty("--reference-height",`${a}px`),i.style.setProperty("--available-width",`${o}px`),i.style.setProperty("--available-height",`${r}px`)}})}function tQ(e){if(e.hideWhenDetached)return VZ({strategy:"referenceHidden",boundary:iw(e.boundary)??"clippingAncestors"})}function nQ(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function rQ(e,t,n={}){const r=UZ(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},YZ,n),i=t.querySelector("[data-part=arrow]"),s=[JZ(i,o),ZZ(o),QZ(o),XZ(i,t.ownerDocument,o),qZ(i),GZ({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),eQ(o),tQ(o),WZ],{placement:a,strategy:l,onComplete:c,onPositioned:u}=o,p=async()=>{if(!r||!t)return;const m=await HZ(r,t,{placement:a,middleware:s,strategy:l});c?.(m),u?.({placed:!0});const b=rn(t),w=iE(b,m.x),E=iE(b,m.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${E}px`),o.hideWhenDetached&&(m.middlewareData.hide?.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const k=t.firstElementChild;if(k){const v=Ux(k);t.style.setProperty("--z-index",v.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:p,floatingElement:t}),u?.({placed:!0})):await p()},f=nQ(o.listeners),g=o.listeners?AZ(r,t,h,f):LK;return h(),()=>{g?.(),u?.({placed:!1})}}function I0(e,t,n={}){const{defer:r,...o}=n,i=r?Ht:a=>a(),s=[];return s.push(i(()=>{const a=typeof e=="function"?e():e,l=typeof t=="function"?t():t;s.push(rQ(a,l,o))})),()=>{s.forEach(a=>a?.())}}var oQ={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function hR(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:bi.arrowSize.reference,height:bi.arrowSize.reference,[bi.arrowSizeHalf.variable]:`calc(${bi.arrowSize.reference} / 2)`,[bi.arrowOffset.variable]:`calc(${bi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?oQ[t.split("-")[0]]:void 0,background:bi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}function iQ(e){const t={each(n){for(let r=0;r{try{i.document.addEventListener(n,r,o)}catch{}}),()=>{try{t.removeEventListener(n,r,o)}catch{}}},removeEventListener(n,r,o){t.each(i=>{try{i.document.removeEventListener(n,r,o)}catch{}})}};return t}function sQ(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t?.addEventListener(n,r,o)}catch{}return()=>{try{t?.removeEventListener(n,r,o)}catch{}}},removeEventListener:(n,r,o)=>{try{t?.removeEventListener(n,r,o)}catch{}}}}var sE="pointerdown.outside",aE="focus.outside";function aQ(e){for(const t of e)if(Jn(t)&&Wx(t))return!0;return!1}var gR=e=>"clientY"in e;function lQ(e,t){if(!gR(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function cQ(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function lE(e,t){if(!t||!gR(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,i=o&&e.clientY>t.offsetTop+t.clientHeight,s={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},a={x:e.clientX,y:e.clientY};return cQ(s,a)?r||i:!1}function uQ(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:i,defer:s}=t;if(!e)return;const a=Eo(e),l=rn(e),c=iQ(l),u=sQ(l);function p(E,k){if(!Jn(k)||!k.isConnected||zc(e,k)||lQ(e,E))return!1;const v=a.querySelector(`[aria-controls="${e.id}"]`);if(v){const T=v0(v);if(lE(E,T))return!1}const _=v0(e);return lE(E,_)?!1:!n?.(k)}const h=new Set,f=up(e?.getRootNode());function g(E){function k(v){const _=s&&!zC()?Ht:C=>C(),T=v??E,N=T?.composedPath?.()??[T?.target];_(()=>{const C=f?N[0]:ho(E);if(!(!e||!p(E,C))){if(o||i){const x=Og(o,i);e.addEventListener(sE,x,{once:!0})}cE(e,sE,{bubbles:!1,cancelable:!0,detail:{originalEvent:T,contextmenu:EY(T),focusable:aQ(N),target:C}})}})}E.pointerType==="touch"?(h.forEach(v=>v()),h.add(Kt(a,"click",k,{once:!0})),h.add(u.addEventListener("click",k,{once:!0})),h.add(c.addEventListener("click",k,{once:!0}))):k()}const m=new Set,b=setTimeout(()=>{m.add(Kt(a,"pointerdown",g,!0)),m.add(u.addEventListener("pointerdown",g,!0)),m.add(c.addEventListener("pointerdown",g,!0))},0);function w(E){(s?Ht:k=>k())(()=>{const k=ho(E);if(!(!e||!p(E,k))){if(r||i){const v=Og(r,i);e.addEventListener(aE,v,{once:!0})}cE(e,aE,{bubbles:!1,cancelable:!0,detail:{originalEvent:E,contextmenu:!1,focusable:Wx(k),target:k}})}})}return zC()||(m.add(Kt(a,"focusin",w,!0)),m.add(u.addEventListener("focusin",w,!0)),m.add(c.addEventListener("focusin",w,!0))),()=>{clearTimeout(b),h.forEach(E=>E()),m.forEach(E=>E())}}function dQ(e,t){const{defer:n}=t,r=n?Ht:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(uQ(i,t))})),()=>{o.forEach(i=>i?.())}}function cE(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function pQ(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return Kt(Eo(e),"keydown",n,{capture:!0})}var uE="layer:request-dismiss",Lr={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return tt.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>zc(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>zc(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(tLr.dismiss(n.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];hQ(e,uE,o=>{r.requestDismiss?.(o),o.defaultPrevented||r?.dismiss()}),fQ(e,uE,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function fQ(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function hQ(e,t,n){e.addEventListener(t,n,{once:!0})}var dE;function pE(){Lr.layers.forEach(({node:e})=>{e.style.pointerEvents=Lr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function gQ(e){e.style.pointerEvents=""}function mQ(e,t){const n=Eo(e),r=[];return Lr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(dE=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(o=>{const[i,s]=sX(()=>{const a=o();return Jn(a)?a:null},{timeout:1e3});i.then(a=>r.push(z$(a,{pointerEvents:"auto"}))),r.push(s)}),()=>{Lr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=dE,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function vQ(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){m0("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:i,exclude:s,debug:a,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:i,requestDismiss:o};Lr.add(c),pE();function u(m){const b=ho(m.detail.originalEvent);Lr.isBelowPointerBlockingLayer(e)||Lr.isInBranch(b)||(t.onPointerDownOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onPointerDownOutside:",m.detail.originalEvent),r?.()))}function p(m){const b=ho(m.detail.originalEvent);Lr.isInBranch(b)||(t.onFocusOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onFocusOutside:",m.detail.originalEvent),r?.()))}function h(m){Lr.isTopMost(e)&&(t.onEscapeKeyDown?.(m),!m.defaultPrevented&&r&&(m.preventDefault(),r()))}function f(m){if(!e)return!1;const b=typeof s=="function"?s():s,w=Array.isArray(b)?b:[b],E=t.persistentElements?.map(k=>k()).filter(Jn);return E&&w.push(...E),w.some(k=>zc(k,m))||Lr.isInNestedLayer(e,m)}const g=[i?mQ(e,t.persistentElements):void 0,pQ(e,h),dQ(e,{exclude:f,onFocusOutside:p,onPointerDownOutside:u,defer:t.defer})];return()=>{Lr.remove(e),pE(),gQ(e),g.forEach(m=>m?.())}}function mR(e,t){const{defer:n}=t,r=n?Ht:i=>i(),o=[];return o.push(r(()=>{const i=uc(e)?e():e;o.push(vQ(i,t))})),()=>{o.forEach(i=>i?.())}}var bQ=no("select").parts("label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"),Un=bQ.build(),vR=e=>new Zx(e);vR.empty=()=>new Zx({items:[]});var yQ=e=>e.ids?.root??`select:${e.id}`,T0=e=>e.ids?.content??`select:${e.id}:content`,S0=e=>e.ids?.trigger??`select:${e.id}:trigger`,bR=e=>e.ids?.clearTrigger??`select:${e.id}:clear-trigger`,Yf=e=>e.ids?.label??`select:${e.id}:label`,xQ=e=>e.ids?.control??`select:${e.id}:control`,P0=(e,t)=>e.ids?.item?.(t)??`select:${e.id}:option:${t}`,$0=e=>e.ids?.hiddenSelect??`select:${e.id}:select`,yR=e=>e.ids?.positioner??`select:${e.id}:positioner`,wQ=(e,t)=>e.ids?.itemGroup?.(t)??`select:${e.id}:optgroup:${t}`,fE=(e,t)=>e.ids?.itemGroupLabel?.(t)??`select:${e.id}:optgroup-label:${t}`,Lb=e=>e.getById($0(e)),zu=e=>e.getById(T0(e)),Fa=e=>e.getById(S0(e)),_Q=e=>e.getById(bR(e)),hE=e=>e.getById(yR(e)),Vb=(e,t)=>t==null?null:e.getById(P0(e,t));function kQ(e,t){const{context:n,prop:r,scope:o,state:i,computed:s,send:a}=e,l=r("disabled")||n.get("fieldsetDisabled"),c=!!r("invalid"),u=!!r("required"),p=!!r("readOnly"),h=r("composite"),f=r("collection"),g=i.hasTag("open"),m=i.matches("focused"),b=n.get("highlightedValue"),w=n.get("highlightedItem"),E=n.get("selectedItems"),k=n.get("currentPlacement"),v=s("isTypingAhead"),_=s("isInteractive"),T=b?P0(o,b):void 0;function N(x){const I=f.getItemDisabled(x.item),R=f.getItemValue(x.item);return O$(R,()=>`[zag-js] No value found for item ${JSON.stringify(x.item)}`),{value:R,disabled:!!(l||I),highlighted:b===R,selected:n.get("value").includes(R)}}const C=hR({...r("positioning"),placement:k});return{open:g,focused:m,empty:n.get("value").length===0,highlightedItem:w,highlightedValue:b,selectedItems:E,hasSelectedItems:s("hasSelectedItems"),value:n.get("value"),valueAsString:s("valueAsString"),collection:f,multiple:!!r("multiple"),disabled:!!l,reposition(x={}){a({type:"POSITIONING.SET",options:x})},focus(){Fa(o)?.focus({preventScroll:!0})},setOpen(x){i.hasTag("open")!==x&&a({type:x?"OPEN":"CLOSE"})},selectValue(x){a({type:"ITEM.SELECT",value:x})},setValue(x){a({type:"VALUE.SET",value:x})},selectAll(){a({type:"VALUE.SET",value:f.getValues()})},setHighlightValue(x){a({type:"HIGHLIGHTED_VALUE.SET",value:x})},clearHighlightValue(){a({type:"HIGHLIGHTED_VALUE.CLEAR"})},clearValue(x){a(x?{type:"ITEM.CLEAR",value:x}:{type:"VALUE.CLEAR"})},getItemState:N,getRootProps(){return t.element({...Un.root.attrs,dir:r("dir"),id:yQ(o),"data-invalid":G(c),"data-readonly":G(p)})},getLabelProps(){return t.label({dir:r("dir"),id:Yf(o),...Un.label.attrs,"data-disabled":G(l),"data-invalid":G(c),"data-readonly":G(p),"data-required":G(u),htmlFor:$0(o),onClick(x){x.defaultPrevented||l||Fa(o)?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...Un.control.attrs,dir:r("dir"),id:xQ(o),"data-state":g?"open":"closed","data-focus":G(m),"data-disabled":G(l),"data-invalid":G(c)})},getValueTextProps(){return t.element({...Un.valueText.attrs,dir:r("dir"),"data-disabled":G(l),"data-invalid":G(c),"data-focus":G(m)})},getTriggerProps(){return t.button({id:S0(o),disabled:l,dir:r("dir"),type:"button",role:"combobox","aria-controls":T0(o),"aria-expanded":g,"aria-haspopup":"listbox","data-state":g?"open":"closed","aria-invalid":c,"aria-labelledby":Yf(o),...Un.trigger.attrs,"data-disabled":G(l),"data-invalid":G(c),"data-readonly":G(p),"data-placement":k,"data-placeholder-shown":G(!s("hasSelectedItems")),onClick(x){_&&(x.defaultPrevented||a({type:"TRIGGER.CLICK"}))},onFocus(){a({type:"TRIGGER.FOCUS"})},onBlur(){a({type:"TRIGGER.BLUR"})},onKeyDown(x){if(x.defaultPrevented||!_)return;const I={ArrowUp(){a({type:"TRIGGER.ARROW_UP"})},ArrowDown(R){a({type:R.altKey?"OPEN":"TRIGGER.ARROW_DOWN"})},ArrowLeft(){a({type:"TRIGGER.ARROW_LEFT"})},ArrowRight(){a({type:"TRIGGER.ARROW_RIGHT"})},Home(){a({type:"TRIGGER.HOME"})},End(){a({type:"TRIGGER.END"})},Enter(){a({type:"TRIGGER.ENTER"})},Space(R){a(v?{type:"TRIGGER.TYPEAHEAD",key:R.key}:{type:"TRIGGER.ENTER"})}}[pp(x,{dir:r("dir"),orientation:"vertical"})];if(I){I(x),x.preventDefault();return}y0.isValidEvent(x)&&(a({type:"TRIGGER.TYPEAHEAD",key:x.key}),x.preventDefault())}})},getIndicatorProps(){return t.element({...Un.indicator.attrs,dir:r("dir"),"aria-hidden":!0,"data-state":g?"open":"closed","data-disabled":G(l),"data-invalid":G(c),"data-readonly":G(p)})},getItemProps(x){const I=N(x);return t.element({id:P0(o,I.value),role:"option",...Un.item.attrs,dir:r("dir"),"data-value":I.value,"aria-selected":I.selected,"data-state":I.selected?"checked":"unchecked","data-highlighted":G(I.highlighted),"data-disabled":G(I.disabled),"aria-disabled":cp(I.disabled),onPointerMove(R){I.disabled||R.pointerType!=="mouse"||I.value!==b&&a({type:"ITEM.POINTER_MOVE",value:I.value})},onClick(R){R.defaultPrevented||I.disabled||a({type:"ITEM.CLICK",src:"pointerup",value:I.value})},onPointerLeave(R){I.disabled||x.persistFocus||R.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER")||a({type:"ITEM.POINTER_LEAVE"})}})},getItemTextProps(x){const I=N(x);return t.element({...Un.itemText.attrs,"data-state":I.selected?"checked":"unchecked","data-disabled":G(I.disabled),"data-highlighted":G(I.highlighted)})},getItemIndicatorProps(x){const I=N(x);return t.element({"aria-hidden":!0,...Un.itemIndicator.attrs,"data-state":I.selected?"checked":"unchecked",hidden:!I.selected})},getItemGroupLabelProps(x){const{htmlFor:I}=x;return t.element({...Un.itemGroupLabel.attrs,id:fE(o,I),dir:r("dir"),role:"presentation"})},getItemGroupProps(x){const{id:I}=x;return t.element({...Un.itemGroup.attrs,"data-disabled":G(l),id:wQ(o,I),"aria-labelledby":fE(o,I),role:"group",dir:r("dir")})},getClearTriggerProps(){return t.button({...Un.clearTrigger.attrs,id:bR(o),type:"button","aria-label":"Clear value","data-invalid":G(c),disabled:l,hidden:!s("hasSelectedItems"),dir:r("dir"),onClick(x){x.defaultPrevented||a({type:"CLEAR.CLICK"})}})},getHiddenSelectProps(){const x=n.get("value"),I=r("multiple")?x:x?.[0];return t.select({name:r("name"),form:r("form"),disabled:l,multiple:r("multiple"),required:r("required"),"aria-hidden":!0,id:$0(o),defaultValue:I,style:cv,tabIndex:-1,onFocus(){Fa(o)?.focus({preventScroll:!0})},"aria-labelledby":Yf(o)})},getPositionerProps(){return t.element({...Un.positioner.attrs,dir:r("dir"),id:yR(o),style:C.floating})},getContentProps(){return t.element({hidden:!g,dir:r("dir"),id:T0(o),role:h?"listbox":"dialog",...Un.content.attrs,"data-state":g?"open":"closed","data-placement":k,"data-activedescendant":T,"aria-activedescendant":h?T:void 0,"aria-multiselectable":r("multiple")&&h?!0:void 0,"aria-labelledby":Yf(o),tabIndex:0,onKeyDown(x){if(!_||!zc(x.currentTarget,ho(x)))return;if(x.key==="Tab"&&!BY(x)){x.preventDefault();return}const I={ArrowUp(){a({type:"CONTENT.ARROW_UP"})},ArrowDown(){a({type:"CONTENT.ARROW_DOWN"})},Home(){a({type:"CONTENT.HOME"})},End(){a({type:"CONTENT.END"})},Enter(){a({type:"ITEM.CLICK",src:"keydown.enter"})},Space(B){v?a({type:"CONTENT.TYPEAHEAD",key:B.key}):I.Enter?.(B)}},R=I[pp(x)];if(R){R(x),x.preventDefault();return}const M=ho(x);dY(M)||y0.isValidEvent(x)&&(a({type:"CONTENT.TYPEAHEAD",key:x.key}),x.preventDefault())}})},getListProps(){return t.element({...Un.list.attrs,tabIndex:0,role:h?void 0:"listbox","aria-labelledby":S0(o),"aria-activedescendant":h?void 0:T,"aria-multiselectable":!h&&r("multiple")?!0:void 0})}}}var{and:Uu,not:Ta,or:CQ}=ef(),EQ={props({props:e}){return{loopFocus:!1,closeOnSelect:!e.multiple,composite:!0,defaultValue:[],...e,collection:e.collection??vR.empty(),positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:gl,onChange(n){const r=e("collection").findMany(n);return e("onValueChange")?.({value:n,items:r})}})),highlightedValue:t(()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(n){e("onHighlightChange")?.({highlightedValue:n,highlightedItem:e("collection").find(n),highlightedIndex:e("collection").indexOf(n)})}})),currentPlacement:t(()=>({defaultValue:void 0})),fieldsetDisabled:t(()=>({defaultValue:!1})),highlightedItem:t(()=>({defaultValue:null})),selectedItems:t(()=>{const n=e("value")??e("defaultValue")??[];return{defaultValue:e("collection").findMany(n)}})}},refs(){return{typeahead:{...y0.defaultOptions}}},computed:{hasSelectedItems:({context:e})=>e.get("value").length>0,isTypingAhead:({refs:e})=>e.get("typeahead").keysSoFar!=="",isDisabled:({prop:e,context:t})=>!!e("disabled")||!!t.get("fieldsetDisabled"),isInteractive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e,prop:t})=>t("collection").stringifyItems(e.get("selectedItems"))},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},entry:["syncSelectElement"],watch({context:e,prop:t,track:n,action:r}){n([()=>e.get("value").toString()],()=>{r(["syncSelectedItems","syncSelectElement","dispatchChangeEvent"])}),n([()=>t("open")],()=>{r(["toggleVisibility"])}),n([()=>e.get("highlightedValue")],()=>{r(["syncHighlightedItem"])}),n([()=>t("collection").toString()],()=>{r(["syncCollection"])})},on:{"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedItem"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedItem"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setSelectedItems"]},"VALUE.CLEAR":{actions:["clearSelectedItems"]},"CLEAR.CLICK":{actions:["clearSelectedItems","focusTriggerEl"]}},effects:["trackFormControlState"],states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{target:"open",actions:["setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus","highlightFirstSelectedItem"]}],"TRIGGER.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}]}},focused:{tags:["closed"],on:{"CONTROLLED.OPEN":[{guard:"isTriggerClickEvent",target:"open",actions:["setInitialFocus","highlightFirstSelectedItem"]},{guard:"isTriggerArrowUpEvent",target:"open",actions:["setInitialFocus","highlightComputedLastItem"]},{guard:CQ("isTriggerArrowDownEvent","isTriggerEnterEvent"),target:"open",actions:["setInitialFocus","highlightComputedFirstItem"]},{target:"open",actions:["setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen"]}],"TRIGGER.BLUR":{target:"idle"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightFirstSelectedItem"]}],"TRIGGER.ENTER":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_UP":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedLastItem"]}],"TRIGGER.ARROW_DOWN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitialFocus","invokeOnOpen","highlightComputedFirstItem"]}],"TRIGGER.ARROW_LEFT":[{guard:Uu(Ta("multiple"),"hasSelectedItems"),actions:["selectPreviousItem"]},{guard:Ta("multiple"),actions:["selectLastItem"]}],"TRIGGER.ARROW_RIGHT":[{guard:Uu(Ta("multiple"),"hasSelectedItems"),actions:["selectNextItem"]},{guard:Ta("multiple"),actions:["selectFirstItem"]}],"TRIGGER.HOME":{guard:Ta("multiple"),actions:["selectFirstItem"]},"TRIGGER.END":{guard:Ta("multiple"),actions:["selectLastItem"]},"TRIGGER.TYPEAHEAD":{guard:Ta("multiple"),actions:["selectMatchingItem"]}}},open:{tags:["open"],exit:["scrollContentToTop"],effects:["trackDismissableElement","computePlacement","scrollToHighlightedItem"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"focused",actions:["focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["clearHighlightedItem"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"restoreFocus",target:"focused",actions:["invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{target:"idle",actions:["invokeOnClose","clearHighlightedItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"focused",actions:["invokeOnClose","clearHighlightedItem"]}],"ITEM.CLICK":[{guard:Uu("closeOnSelect","isOpenControlled"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["selectHighlightedItem","invokeOnClose","focusTriggerEl","clearHighlightedItem"]},{actions:["selectHighlightedItem"]}],"CONTENT.HOME":{actions:["highlightFirstItem"]},"CONTENT.END":{actions:["highlightLastItem"]},"CONTENT.ARROW_DOWN":[{guard:Uu("hasHighlightedItem","loop","isLastItemHighlighted"),actions:["highlightFirstItem"]},{guard:"hasHighlightedItem",actions:["highlightNextItem"]},{actions:["highlightFirstItem"]}],"CONTENT.ARROW_UP":[{guard:Uu("hasHighlightedItem","loop","isFirstItemHighlighted"),actions:["highlightLastItem"]},{guard:"hasHighlightedItem",actions:["highlightPreviousItem"]},{actions:["highlightLastItem"]}],"CONTENT.TYPEAHEAD":{actions:["highlightMatchingItem"]},"ITEM.POINTER_MOVE":{actions:["highlightItem"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedItem"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{loop:({prop:e})=>!!e("loopFocus"),multiple:({prop:e})=>!!e("multiple"),hasSelectedItems:({computed:e})=>!!e("hasSelectedItems"),hasHighlightedItem:({context:e})=>e.get("highlightedValue")!=null,isFirstItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").firstValue,isLastItemHighlighted:({context:e,prop:t})=>e.get("highlightedValue")===t("collection").lastValue,closeOnSelect:({prop:e,event:t})=>!!(t.closeOnSelect??e("closeOnSelect")),restoreFocus:({event:e})=>gE(e),isOpenControlled:({prop:e})=>e("open")!==void 0,isTriggerClickEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.CLICK",isTriggerEnterEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ENTER",isTriggerArrowUpEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_UP",isTriggerArrowDownEvent:({event:e})=>e.previousEvent?.type==="TRIGGER.ARROW_DOWN"},effects:{trackFormControlState({context:e,scope:t}){return du(Lb(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){const n=e.initial("value");e.set("value",n)}})},trackDismissableElement({scope:e,send:t,prop:n}){const r=()=>zu(e);let o=!0;return mR(r,{type:"listbox",defer:!0,exclude:[Fa(e),_Q(e)],onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onInteractOutside(i){n("onInteractOutside")?.(i),o=!(i.detail.focusable||i.detail.contextmenu)},onDismiss(){t({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},computePlacement({context:e,prop:t,scope:n}){const r=t("positioning");return e.set("currentPlacement",r.placement),I0(()=>Fa(n),()=>hE(n),{defer:!0,...r,onComplete(o){e.set("currentPlacement",o.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n,event:r}){const o=i=>{const s=e.get("highlightedValue");if(s==null||r.current().type.includes("POINTER"))return;const a=zu(n),l=t("scrollToIndexFn");if(l){const u=t("collection").indexOf(s);l?.({index:u,immediate:i,getElement:()=>Vb(n,s)});return}const c=Vb(n,s);GY(c,{rootEl:a,block:"nearest"})};return Ht(()=>o(!0)),L$(()=>zu(n),{defer:!0,attributes:["data-activedescendant"],callback(){o(!1)}})}},actions:{reposition({context:e,prop:t,scope:n,event:r}){const o=()=>hE(n);I0(Fa(n),o,{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(i){e.set("currentPlacement",i.placement)}})},toggleVisibility({send:e,prop:t,event:n}){e({type:t("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})},highlightPreviousItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const r=t("collection").getPreviousValue(n,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightNextItem({context:e,prop:t}){const n=e.get("highlightedValue");if(n==null)return;const r=t("collection").getNextValue(n,1,t("loopFocus"));r!=null&&e.set("highlightedValue",r)},highlightFirstItem({context:e,prop:t}){const n=t("collection").firstValue;e.set("highlightedValue",n)},highlightLastItem({context:e,prop:t}){const n=t("collection").lastValue;e.set("highlightedValue",n)},setInitialFocus({scope:e}){Ht(()=>{M$({root:zu(e)})?.focus({preventScroll:!0})})},focusTriggerEl({event:e,scope:t}){gE(e)&&Ht(()=>{Fa(t)?.focus({preventScroll:!0})})},selectHighlightedItem({context:e,prop:t,event:n}){let r=n.value??e.get("highlightedValue");r==null||!t("collection").has(r)||(t("onSelect")?.({value:r}),r=t("deselectable")&&!t("multiple")&&e.get("value").includes(r)?null:r,e.set("value",o=>r==null?[]:t("multiple")?DC(o,r):[r]))},highlightComputedFirstItem({context:e,prop:t,computed:n}){const r=t("collection"),o=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.firstValue;e.set("highlightedValue",o)},highlightComputedLastItem({context:e,prop:t,computed:n}){const r=t("collection"),o=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue;e.set("highlightedValue",o)},highlightFirstSelectedItem({context:e,prop:t,computed:n}){if(!n("hasSelectedItems"))return;const r=t("collection").sort(e.get("value"))[0];e.set("highlightedValue",r)},highlightItem({context:e,event:t}){e.set("highlightedValue",t.value)},highlightMatchingItem({context:e,prop:t,event:n,refs:r}){const o=t("collection").search(n.key,{state:r.get("typeahead"),currentValue:e.get("highlightedValue")});o!=null&&e.set("highlightedValue",o)},setHighlightedItem({context:e,event:t}){e.set("highlightedValue",t.value)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},selectItem({context:e,prop:t,event:n}){t("onSelect")?.({value:n.value});const r=t("deselectable")&&!t("multiple")&&e.get("value").includes(n.value)?null:n.value;e.set("value",o=>r==null?[]:t("multiple")?DC(o,r):[r])},clearItem({context:e,event:t}){e.set("value",n=>n.filter(r=>r!==t.value))},setSelectedItems({context:e,event:t}){e.set("value",t.value)},clearSelectedItems({context:e}){e.set("value",[])},selectPreviousItem({context:e,prop:t}){const[n]=e.get("value"),r=t("collection").getPreviousValue(n);r&&e.set("value",[r])},selectNextItem({context:e,prop:t}){const[n]=e.get("value"),r=t("collection").getNextValue(n);r&&e.set("value",[r])},selectFirstItem({context:e,prop:t}){const n=t("collection").firstValue;n&&e.set("value",[n])},selectLastItem({context:e,prop:t}){const n=t("collection").lastValue;n&&e.set("value",[n])},selectMatchingItem({context:e,prop:t,event:n,refs:r}){const o=t("collection").search(n.key,{state:r.get("typeahead"),currentValue:e.get("value")[0]});o!=null&&e.set("value",[o])},scrollContentToTop({prop:e,scope:t}){if(e("scrollToIndexFn")){const n=e("collection").firstValue;e("scrollToIndexFn")?.({index:0,immediate:!0,getElement:()=>Vb(t,n)})}else zu(t)?.scrollTo(0,0)},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},syncSelectElement({context:e,prop:t,scope:n}){const r=Lb(n);if(r){if(e.get("value").length===0&&!t("multiple")){r.selectedIndex=-1;return}for(const o of r.options)o.selected=e.get("value").includes(o.value)}},syncCollection({context:e,prop:t}){const n=t("collection"),r=n.find(e.get("highlightedValue"));r&&e.set("highlightedItem",r);const o=n.findMany(e.get("value"));e.set("selectedItems",o)},syncSelectedItems({context:e,prop:t}){const n=t("collection"),r=e.get("selectedItems"),o=e.get("value").map(i=>r.find(s=>n.getItemValue(s)===i)||n.find(i));e.set("selectedItems",o)},syncHighlightedItem({context:e,prop:t}){const n=t("collection"),r=e.get("highlightedValue"),o=r?n.find(r):null;e.set("highlightedItem",o)},dispatchChangeEvent({scope:e}){queueMicrotask(()=>{const t=Lb(e);if(!t)return;const n=e.getWin(),r=new n.Event("change",{bubbles:!0,composed:!0});t.dispatchEvent(r)})}}}};function gE(e){const t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null||!!t}On()(["closeOnSelect","collection","composite","defaultHighlightedValue","defaultOpen","defaultValue","deselectable","dir","disabled","form","getRootNode","highlightedValue","id","ids","invalid","loopFocus","multiple","name","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","onValueChange","open","positioning","readOnly","required","scrollToIndexFn","value"]);On()(["item","persistFocus"]);On()(["id"]);On()(["htmlFor"]);const OQ=(e,t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=Ln(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,hiddenSelect:i?.value.ids.control},disabled:i?.value.disabled,readOnly:i?.value.readOnly,invalid:i?.value.invalid,required:i?.value.required,dir:o.value.dir,value:l.modelValue,getRootNode:r?.value.getRootNode,...fu(l),onValueChange:c=>{t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onHighlightChange:c=>{t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),l.onHighlightChange?.(c)},onOpenChange:c=>{t?.("openChange",c),t?.("update:open",c.open),l.onOpenChange?.(c)},onFocusOutside:c=>{t?.("focusOutside",c),l.onFocusOutside?.(c)},onInteractOutside:c=>{t?.("interactOutside",c),l.onInteractOutside?.(c)},onPointerDownOutside:c=>{t?.("pointerDownOutside",c),l.onPointerDownOutside?.(c)},onSelect(c){t?.("select",c),l.onSelect?.(c)}}}),a=ml(EQ,s);return A(()=>kQ(a,pu))},IQ=P({__name:"select-root",props:Ze({closeOnSelect:{type:Boolean},collection:{},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},defaultValue:{},deselectable:{type:Boolean},disabled:{type:Boolean},form:{},highlightedValue:{},id:{},ids:{},invalid:{type:Boolean},loopFocus:{type:Boolean},modelValue:{},multiple:{type:Boolean},name:{},open:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},scrollToIndexFn:{type:Function},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,deselectable:void 0,disabled:void 0,invalid:void 0,loopFocus:void 0,multiple:void 0,open:void 0,readOnly:void 0,required:void 0}),emits:["focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","select","valueChange","update:modelValue","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,r=OQ(n,t);return Z$(r),dv(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ue(),(o,i)=>(y(),$(d(ce).div,F(d(r).getRootProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),TQ=P({__name:"select-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Vn();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),SQ=P({__name:"select-value-text",props:{placeholder:{},asChild:{type:Boolean}},setup(e){const t=e,n=Vn(),r=xo();return ue(),(o,i)=>(y(),$(d(ce).span,F(d(n).getValueTextProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default",{},()=>[re(j(r.default?.()||d(n).valueAsString||t.placeholder),1)])]),_:3},16,["as-child"]))}}),Qr=Object.freeze(Object.defineProperty({__proto__:null,ClearTrigger:vJ,Content:bJ,Context:yJ,Control:xJ,HiddenSelect:kJ,Indicator:CJ,Item:MJ,ItemContext:IJ,ItemGroup:$J,ItemGroupLabel:PJ,ItemIndicator:AJ,ItemText:NJ,Label:DJ,List:LJ,Positioner:BJ,Root:IQ,RootProvider:HJ,Trigger:TQ,ValueText:SQ},Symbol.toStringTag,{value:"Module"})),PQ={key:0},$Q={class:"block text-sm font-medium text-gray-700 mb-1"},RQ={class:"flex rounded-lg border border-gray-300 bg-gray-100 p-0.5"},AQ=["data-state","onClick"],NQ=P({__name:"Select",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=rt(e,"modelValue"),r=A(()=>t.field.variant||"select"),o=A(()=>mJ({items:t.field.options?.map(s=>({label:s.label||s.value,value:s.value}))||[]})),i=A({get:()=>n.value?[n.value]:[],set:s=>{n.value=s[0]||null}});return(s,a)=>{const l=X$,c=uJ;return r.value==="segment"?(y(),V("div",PQ,[D("label",$Q,j(s.field.label),1),D("div",RQ,[(y(!0),V(ge,null,Ie(s.field.options,u=>(y(),V("button",{class:"flex-1 h-9 text-center cursor-pointer rounded text-sm data-[state=checked]:bg-white data-[state=checked]:shadow","data-state":n.value===u.value?"checked":"unchecked",onClick:p=>n.value=u.value},j(u.label||u.value),9,AQ))),256))])])):(y(),$(d(Qr).Root,{key:1,modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=u=>i.value=u),collection:o.value,positioning:{gutter:2}},{default:O(()=>[S(d(Qr).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(s.field.label),1)]),_:1}),S(d(Qr).Control,{class:"w-full"},{default:O(()=>[S(d(Qr).Trigger,{class:"flex items-center justify-between w-full px-3 py-2 border border-gray-300 rounded-md bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent"},{default:O(()=>[S(d(Qr).ValueText,{class:"text-sm text-gray-900",placeholder:s.field.placeholder||"Select an option..."},null,8,["placeholder"]),S(d(Qr).Indicator,{class:"ml-2"},{default:O(()=>[S(l,{class:"w-4 h-4 text-gray-400"})]),_:1})]),_:1})]),_:1}),S(d(Qr).Positioner,{class:"w-[var(--reference-width)]"},{default:O(()=>[S(d(Qr).Content,{class:"bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto z-50"},{default:O(()=>[(y(!0),V(ge,null,Ie(o.value.items,u=>(y(),$(d(Qr).Item,{key:u.value,item:u,class:"flex items-center px-3 py-2 text-sm text-gray-900 hover:bg-gray-100 cursor-pointer data-[state=checked]:bg-accent-foreground data-[state=checked]:text-accent"},{default:O(()=>[S(d(Qr).ItemText,null,{default:O(()=>[re(j(u.label),1)]),_:2},1024),S(d(Qr).ItemIndicator,{class:"ml-auto"},{default:O(()=>[S(c,{class:"w-4 h-4 text-accent"})]),_:1})]),_:2},1032,["item"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue","collection"]))}}}),[xR,_l]=Ut("RadioGroupContext"),MQ=P({__name:"radio-group-context",setup(e){const t=_l();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),DQ=P({__name:"radio-group-indicator",props:{asChild:{type:Boolean}},setup(e){const t=_l();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[LQ,VQ]=Ut("RadioGroupItemContext"),FQ=P({__name:"radio-group-item-context",setup(e){const t=VQ();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[BQ,sw]=Ut("RadioGroupItemPropsContext"),HQ=P({__name:"radio-group-item-control",props:{asChild:{type:Boolean}},setup(e){const t=_l(),n=sw();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getItemControlProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),zQ=P({__name:"radio-group-item-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=_l(),n=sw();return ue(),(r,o)=>(y(),$(d(ce).input,F(d(t).getItemHiddenInputProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),UQ=P({__name:"radio-group-item-text",props:{asChild:{type:Boolean}},setup(e){const t=_l(),n=sw();return ue(),(r,o)=>(y(),$(d(ce).span,F(d(t).getItemTextProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),jQ=P({__name:"radio-group-item",props:{value:{},disabled:{type:Boolean},invalid:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=_l();return BQ(t),LQ(A(()=>n.value.getItemState(t))),ue(),(r,o)=>(y(),$(d(ce).label,F(d(n).getItemProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),GQ=P({__name:"radio-group-label",props:{asChild:{type:Boolean}},setup(e){const t=_l();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),WQ=P({__name:"radio-group-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return xR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var qQ=no("radio-group").parts("root","label","item","itemText","itemControl","indicator"),Vl=qQ.build(),Lg=e=>e.ids?.root??`radio-group:${e.id}`,mE=e=>e.ids?.label??`radio-group:${e.id}:label`,wR=(e,t)=>e.ids?.item?.(t)??`radio-group:${e.id}:radio:${t}`,R0=(e,t)=>e.ids?.itemHiddenInput?.(t)??`radio-group:${e.id}:radio:input:${t}`,KQ=(e,t)=>e.ids?.itemControl?.(t)??`radio-group:${e.id}:radio:control:${t}`,YQ=(e,t)=>e.ids?.itemLabel?.(t)??`radio-group:${e.id}:radio:label:${t}`,_R=e=>e.ids?.indicator??`radio-group:${e.id}:indicator`,mv=e=>e.getById(Lg(e)),XQ=(e,t)=>e.getById(R0(e,t)),JQ=e=>e.getById(_R(e)),ZQ=e=>mv(e)?.querySelector("input:not(:disabled)"),QQ=e=>mv(e)?.querySelector("input:not(:disabled):checked"),vE=e=>{const t=`input[type=radio][data-ownedby='${CSS.escape(Lg(e))}']:not([disabled])`;return Pg(mv(e),t)},eee=(e,t)=>{if(t)return e.getById(wR(e,t))},tee=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),nee=e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`});function ree(e,t){const{context:n,send:r,computed:o,prop:i,scope:s,refs:a}=e,l=o("isDisabled"),c=i("readOnly");function u(f){return{value:f.value,invalid:!!f.invalid,disabled:!!f.disabled||l,checked:n.get("value")===f.value,focused:n.get("focusedValue")===f.value,focusVisible:a.get("focusVisibleValue")===f.value,hovered:n.get("hoveredValue")===f.value,active:n.get("activeValue")===f.value}}function p(f){const g=u(f);return{"data-focus":G(g.focused),"data-focus-visible":G(g.focusVisible),"data-disabled":G(g.disabled),"data-readonly":G(c),"data-state":g.checked?"checked":"unchecked","data-hover":G(g.hovered),"data-invalid":G(g.invalid),"data-orientation":i("orientation"),"data-ssr":G(n.get("ssr"))}}const h=()=>{(QQ(s)??ZQ(s))?.focus()};return{focus:h,value:n.get("value"),setValue(f){r({type:"SET_VALUE",value:f,isTrusted:!1})},clearValue(){r({type:"SET_VALUE",value:null,isTrusted:!1})},getRootProps(){return t.element({...Vl.root.attrs,role:"radiogroup",id:Lg(s),"aria-labelledby":mE(s),"data-orientation":i("orientation"),"data-disabled":G(l),"aria-orientation":i("orientation"),dir:i("dir"),style:{position:"relative"}})},getLabelProps(){return t.element({...Vl.label.attrs,dir:i("dir"),"data-orientation":i("orientation"),"data-disabled":G(l),id:mE(s),onClick:h})},getItemState:u,getItemProps(f){const g=u(f);return t.label({...Vl.item.attrs,dir:i("dir"),id:wR(s,f.value),htmlFor:R0(s,f.value),...p(f),onPointerMove(){g.disabled||g.hovered||r({type:"SET_HOVERED",value:f.value,hovered:!0})},onPointerLeave(){g.disabled||r({type:"SET_HOVERED",value:null})},onPointerDown(m){g.disabled||Ns(m)&&(g.focused&&m.pointerType==="mouse"&&m.preventDefault(),r({type:"SET_ACTIVE",value:f.value,active:!0}))},onPointerUp(){g.disabled||r({type:"SET_ACTIVE",value:null})},onClick(){!g.disabled&&lv()&&XQ(s,f.value)?.focus()}})},getItemTextProps(f){return t.element({...Vl.itemText.attrs,dir:i("dir"),id:YQ(s,f.value),...p(f)})},getItemControlProps(f){const g=u(f);return t.element({...Vl.itemControl.attrs,dir:i("dir"),id:KQ(s,f.value),"data-active":G(g.active),"aria-hidden":!0,...p(f)})},getItemHiddenInputProps(f){const g=u(f);return t.input({"data-ownedby":Lg(s),id:R0(s,f.value),type:"radio",name:i("name")||i("id"),form:i("form"),value:f.value,onClick(m){if(c){m.preventDefault();return}m.currentTarget.checked&&r({type:"SET_VALUE",value:f.value,isTrusted:!0})},onBlur(){r({type:"SET_FOCUSED",value:null,focused:!1})},onFocus(){const m=Ag();r({type:"SET_FOCUSED",value:f.value,focused:!0,focusVisible:m})},onKeyDown(m){m.defaultPrevented||m.key===" "&&r({type:"SET_ACTIVE",value:f.value,active:!0})},onKeyUp(m){m.defaultPrevented||m.key===" "&&r({type:"SET_ACTIVE",value:null})},disabled:g.disabled||c,defaultChecked:g.checked,style:cv})},getIndicatorProps(){const f=n.get("indicatorRect");return t.element({id:_R(s),...Vl.indicator.attrs,dir:i("dir"),hidden:n.get("value")==null,"data-disabled":G(l),"data-orientation":i("orientation"),style:{"--transition-property":"left, top, width, height","--left":f?.left,"--top":f?.top,"--width":f?.width,"--height":f?.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:n.get("canIndicatorTransition")?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[i("orientation")==="horizontal"?"left":"top"]:i("orientation")==="horizontal"?"var(--left)":"var(--top)"}})}}}var{not:oee}=ef(),iee={props({props:e}){return{orientation:"vertical",...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){e("onValueChange")?.({value:n})}})),activeValue:t(()=>({defaultValue:null})),focusedValue:t(()=>({defaultValue:null})),hoveredValue:t(()=>({defaultValue:null})),indicatorRect:t(()=>({defaultValue:{}})),canIndicatorTransition:t(()=>({defaultValue:!1})),fieldsetDisabled:t(()=>({defaultValue:!1})),ssr:t(()=>({defaultValue:!0}))}},refs(){return{indicatorCleanup:null,focusVisibleValue:null}},computed:{isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled")},entry:["syncIndicatorRect","syncSsr"],exit:["cleanupObserver"],effects:["trackFormControlState","trackFocusVisible"],watch({track:e,action:t,context:n}){e([()=>n.get("value")],()=>{t(["setIndicatorTransition","syncIndicatorRect","syncInputElements"])})},on:{SET_VALUE:[{guard:oee("isTrusted"),actions:["setValue","dispatchChangeEvent"]},{actions:["setValue"]}],SET_HOVERED:{actions:["setHovered"]},SET_ACTIVE:{actions:["setActive"]},SET_FOCUSED:{actions:["setFocused"]}},states:{idle:{}},implementations:{guards:{isTrusted:({event:e})=>!!e.isTrusted},effects:{trackFormControlState({context:e,scope:t}){return du(mv(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackFocusVisible({scope:e}){return K$({root:e.getRootNode?.()})}},actions:{setValue({context:e,event:t}){e.set("value",t.value)},setHovered({context:e,event:t}){e.set("hoveredValue",t.value)},setActive({context:e,event:t}){e.set("activeValue",t.value)},setFocused({context:e,event:t,refs:n}){e.set("focusedValue",t.value),n.set("focusVisibleValue",t.focusVisible?t.value:null)},syncInputElements({context:e,scope:t}){vE(t).forEach(n=>{n.checked=n.value===e.get("value")})},setIndicatorTransition({context:e}){e.set("canIndicatorTransition",Nd(e.get("value")))},cleanupObserver({refs:e}){e.get("indicatorCleanup")?.()},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,scope:t,refs:n}){if(n.get("indicatorCleanup")?.(),!JQ(t))return;const r=e.get("value"),o=eee(t,r);if(r==null||!o){e.set("canIndicatorTransition",!1),e.set("indicatorRect",{});return}const i=H$([o],{measure(s){return tee(s)},onEntry({rects:s}){e.set("indicatorRect",nee(s[0]))}});n.set("indicatorCleanup",i)},dispatchChangeEvent({context:e,scope:t}){vE(t).forEach(n=>{const r=n.value===e.get("value");r!==n.checked&&A$(n,{checked:r})})}}}};On()(["dir","disabled","form","getRootNode","id","ids","name","onValueChange","orientation","readOnly","value","defaultValue"]);On()(["value","disabled","invalid"]);const see=(e={},t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...fu(a),onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a.onValueChange?.(l)}}}),s=ml(iee,i);return A(()=>ree(s,pu))},aee=P({__name:"radio-group-root",props:Ze({defaultValue:{},disabled:{type:Boolean},form:{},id:{},ids:{},modelValue:{},name:{},orientation:{},readOnly:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,readOnly:void 0}),emits:["valueChange","update:modelValue"],setup(e,{emit:t}){const n=see(e,t);return xR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Sa=Object.freeze(Object.defineProperty({__proto__:null,Context:MQ,Indicator:DQ,Item:jQ,ItemContext:FQ,ItemControl:HQ,ItemHiddenInput:zQ,ItemText:UQ,Label:GQ,Root:aee,RootProvider:WQ},Symbol.toStringTag,{value:"Module"})),lee=P({__name:"Radio",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue");return(n,r)=>(y(),$(d(Sa).Root,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),class:"relative gap-1 flex flex-col"},{default:O(()=>[S(d(Sa).Label,{class:"text-sm font-medium text-gray-700"},{default:O(()=>[re(j(n.field.label),1)]),_:1}),(y(!0),V(ge,null,Ie(n.field.options,o=>(y(),$(d(Sa).Item,{key:o.value,value:o.value,class:"flex items-center gap-2 cursor-pointer"},{default:O(()=>[S(d(Sa).Indicator),S(d(Sa).ItemControl,{class:"w-4 h-4 border border-gray-300 rounded-full data-[state=checked]:border-accent data-[state=checked]:outline-accent data-[state=checked]:outline-4 data-[state=checked]:-outline-offset-8"}),S(d(Sa).ItemText,{class:"text-sm text-gray-700"},{default:O(()=>[re(j(o.label||o.value),1)]),_:2},1024),S(d(Sa).ItemHiddenInput)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]))}}),[kR,Oo]=Ut("SliderContext"),cee=P({__name:"slider-context",setup(e){const t=Oo();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),uee=P({__name:"slider-control",props:{asChild:{type:Boolean}},setup(e){const t=Oo();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[dee,CR]=Ut("SliderThumbPropsContext"),pee=P({__name:"slider-dragging-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Oo(),n=CR(),r=xo();return ue(),(o,i)=>(y(),$(d(ce).span,F(d(t).getDraggingIndicatorProps(d(n)),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default",{},()=>[re(j(r.default?.()||d(t).getThumbValue(d(n).index)),1)])]),_:3},16,["as-child"]))}}),fee=P({__name:"slider-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Oo(),n=CR();return ue(),(r,o)=>(y(),$(d(ce).input,F(d(t).getHiddenInputProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),hee=P({__name:"slider-label",props:{asChild:{type:Boolean}},setup(e){const t=Oo();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),gee=P({__name:"slider-marker-group",props:{asChild:{type:Boolean}},setup(e){const t=Oo();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getMarkerGroupProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),mee=P({__name:"slider-marker",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=Oo();return ue(),(r,o)=>(y(),$(d(ce).span,F(d(n).getMarkerProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),vee=P({__name:"slider-range",props:{asChild:{type:Boolean}},setup(e){const t=Oo();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getRangeProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),bee=P({__name:"slider-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return kR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var yee=no("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator"),Mo=yee.build(),ER=e=>e.ids?.root??`slider:${e.id}`,OR=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,A0=(e,t)=>e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,IR=e=>e.ids?.control??`slider:${e.id}:control`,xee=e=>e.ids?.track??`slider:${e.id}:track`,wee=e=>e.ids?.range??`slider:${e.id}:range`,bE=e=>e.ids?.label??`slider:${e.id}:label`,_ee=e=>e.ids?.valueText??`slider:${e.id}:value-text`,kee=(e,t)=>e.ids?.marker?.(t)??`slider:${e.id}:marker:${t}`,Cee=e=>e.getById(ER(e)),Eee=(e,t)=>e.getById(OR(e,t)),TR=e=>Pg(PR(e),"[role=slider]"),Oee=e=>TR(e)[0],SR=(e,t)=>e.getById(A0(e,t)),PR=e=>e.getById(IR(e)),yE=(e,t)=>{const{prop:n,scope:r}=e,o=PR(r);if(!o)return;const i=Kx(t,o).getPercentValue({orientation:n("orientation"),dir:n("dir"),inverted:{y:!0}});return Hx(i,n("min"),n("max"),n("step"))},Iee=(e,t)=>{t.forEach((n,r)=>{const o=SR(e,r);o&&R$(o,{value:n})})},Tee=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function See(e){const t=e[0],n=e[e.length-1];return[t,n]}function Pee(e){const{prop:t,computed:n}=e,r=n("valuePercent"),[o,i]=See(r);if(r.length===1){if(t("origin")==="center"){const s=r[0]<50,a=s?`${r[0]}%`:"50%",l=s?"50%":`${100-r[0]}%`;return{start:a,end:l}}return t("origin")==="end"?{start:`${i}%`,end:"0%"}:{start:"0%",end:`${100-i}%`}}return{start:`${o}%`,end:`${100-i}%`}}function $ee(e){const{computed:t}=e,n=t("isVertical"),r=t("isRtl");return n?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[r?"right":"left"]:"var(--slider-range-start)",[r?"left":"right"]:"var(--slider-range-end)"}}function Ree(e,t){const{context:n,prop:r}=e,{height:o=0}=n.get("thumbSize")??{},i=g0([r("min"),r("max")],[-o/2,o/2]);return parseFloat(i(t).toFixed(2))}function Aee(e,t){const{computed:n,context:r,prop:o}=e,{width:i=0}=r.get("thumbSize")??{};if(n("isRtl")){const a=g0([o("max"),o("min")],[-i/2,i/2]);return-1*parseFloat(a(t).toFixed(2))}const s=g0([o("min"),o("max")],[-i/2,i/2]);return parseFloat(s(t).toFixed(2))}function Nee(e,t,n){const{computed:r,prop:o}=e;if(o("thumbAlignment")==="center")return`${t}%`;const i=r("isVertical")?Ree(e,n):Aee(e,n);return`calc(${t}% - ${i}px)`}function $R(e,t){const{prop:n}=e,r=ov(t,n("min"),n("max"))*100;return Nee(e,r,t)}function RR(e){const{computed:t,prop:n}=e;let r="visible";return n("thumbAlignment")==="contain"&&!t("hasMeasuredThumbSize")&&(r="hidden"),r}function xE(e,t){const{computed:n}=e,r=n("isVertical")?"bottom":"insetInlineStart";return{visibility:RR(e),position:"absolute",transform:"var(--slider-thumb-transform)",[r]:`var(--slider-thumb-offset-${t})`}}function Mee(){return{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"}}function Dee(e){const{context:t,computed:n}=e,r=n("isVertical"),o=n("isRtl"),i=Pee(e),s=t.get("thumbSize");return{...t.get("value").reduce((a,l,c)=>{const u=$R(e,l);return{...a,[`--slider-thumb-offset-${c}`]:u}},{}),"--slider-thumb-width":BC(s?.width),"--slider-thumb-height":BC(s?.height),"--slider-thumb-transform":r?"translateY(50%)":o?"translateX(50%)":"translateX(-50%)","--slider-range-start":i.start,"--slider-range-end":i.end}}function Lee(e,t){const{computed:n}=e,r=n("isHorizontal"),o=n("isRtl");return{visibility:RR(e),position:"absolute",pointerEvents:"none",[r?"insetInlineStart":"bottom"]:$R(e,t),translate:"var(--translate-x) var(--translate-y)","--translate-x":r?o?"50%":"-50%":"0%","--translate-y":r?"0%":"50%"}}function Vee(){return{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}function Fee(e,t){return t.map((n,r)=>N0(e,n,r))}function Ms(e,t){const{context:n,prop:r}=e,o=r("step")*r("minStepsBetweenThumbs");return C$(n.get("value"),r("min"),r("max"),o)[t]}function N0(e,t,n){const{prop:r}=e,o=Ms(e,n),i=lp(t,r("min"),r("max"),r("step"));return dn(i,o.min,o.max)}function Bee(e,t,n){const{context:r,prop:o}=e,i=t??r.get("focusedIndex"),s=Ms(e,i),a=YK(i,{...s,step:n??o("step"),values:r.get("value")});return a[i]=dn(a[i],s.min,s.max),a}function Hee(e,t,n){const{context:r,prop:o}=e,i=t??r.get("focusedIndex"),s=Ms(e,i),a=KK(i,{...s,step:n??o("step"),values:r.get("value")});return a[i]=dn(a[i],s.min,s.max),a}function zee(e,t){const{context:n}=e;return XK(n.get("value"),t)}function Uee(e,t){const{state:n,send:r,context:o,prop:i,computed:s,scope:a}=e,l=i("aria-label"),c=i("aria-labelledby"),u=o.get("value"),p=o.get("focusedIndex"),h=n.matches("focus"),f=n.matches("dragging"),g=s("isDisabled"),m=i("invalid"),b=s("isInteractive"),w=i("orientation")==="horizontal",E=i("orientation")==="vertical";function k(_){return ov(_,i("min"),i("max"))}function v(_){return Hx(_,i("min"),i("max"),i("step"))}return{value:u,dragging:f,focused:h,setValue(_){r({type:"SET_VALUE",value:_})},getThumbValue(_){return u[_]},setThumbValue(_,T){r({type:"SET_VALUE",index:_,value:T})},getValuePercent:k,getPercentValue:v,getThumbPercent(_){return k(u[_])},setThumbPercent(_,T){const N=v(T);r({type:"SET_VALUE",index:_,value:N})},getThumbMin(_){return Ms(e,_).min},getThumbMax(_){return Ms(e,_).max},increment(_){r({type:"INCREMENT",index:_})},decrement(_){r({type:"DECREMENT",index:_})},focus(){b&&r({type:"FOCUS",index:0})},getLabelProps(){return t.label({...Mo.label.attrs,dir:i("dir"),"data-disabled":G(g),"data-orientation":i("orientation"),"data-invalid":G(m),"data-dragging":G(f),"data-focus":G(h),id:bE(a),htmlFor:A0(a,0),onClick(_){b&&(_.preventDefault(),Oee(a)?.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}})},getRootProps(){return t.element({...Mo.root.attrs,"data-disabled":G(g),"data-orientation":i("orientation"),"data-dragging":G(f),"data-invalid":G(m),"data-focus":G(h),id:ER(a),dir:i("dir"),style:Dee(e)})},getValueTextProps(){return t.element({...Mo.valueText.attrs,dir:i("dir"),"data-disabled":G(g),"data-orientation":i("orientation"),"data-invalid":G(m),"data-focus":G(h),id:_ee(a)})},getTrackProps(){return t.element({...Mo.track.attrs,dir:i("dir"),id:xee(a),"data-disabled":G(g),"data-invalid":G(m),"data-dragging":G(f),"data-orientation":i("orientation"),"data-focus":G(h),style:{position:"relative"}})},getThumbProps(_){const{index:T=0,name:N}=_,C=u[T],x=Ms(e,T),I=i("getAriaValueText")?.({value:C,index:T}),R=Array.isArray(l)?l[T]:l,M=Array.isArray(c)?c[T]:c;return t.element({...Mo.thumb.attrs,dir:i("dir"),"data-index":T,"data-name":N,id:OR(a,T),"data-disabled":G(g),"data-orientation":i("orientation"),"data-focus":G(h&&p===T),"data-dragging":G(f&&p===T),draggable:!1,"aria-disabled":cp(g),"aria-label":R,"aria-labelledby":M??bE(a),"aria-orientation":i("orientation"),"aria-valuemax":x.max,"aria-valuemin":x.min,"aria-valuenow":u[T],"aria-valuetext":I,role:"slider",tabIndex:g?void 0:0,style:xE(e,T),onPointerDown(B){b&&Ns(B)&&(r({type:"THUMB_POINTER_DOWN",index:T}),B.stopPropagation())},onBlur(){b&&r({type:"BLUR"})},onFocus(){b&&r({type:"FOCUS",index:T})},onKeyDown(B){if(B.defaultPrevented||!b)return;const z=Sg(B)*i("step"),J={ArrowUp(){w||r({type:"ARROW_INC",step:z,src:"ArrowUp"})},ArrowDown(){w||r({type:"ARROW_DEC",step:z,src:"ArrowDown"})},ArrowLeft(){E||r({type:"ARROW_DEC",step:z,src:"ArrowLeft"})},ArrowRight(){E||r({type:"ARROW_INC",step:z,src:"ArrowRight"})},PageUp(){r({type:"ARROW_INC",step:z,src:"PageUp"})},PageDown(){r({type:"ARROW_DEC",step:z,src:"PageDown"})},Home(){r({type:"HOME"})},End(){r({type:"END"})}},q=pp(B,{dir:i("dir"),orientation:i("orientation")}),K=J[q];K&&(K(B),B.preventDefault(),B.stopPropagation())}})},getHiddenInputProps(_){const{index:T=0,name:N}=_;return t.input({name:N??(i("name")?i("name")+(u.length>1?"[]":""):void 0),form:i("form"),type:"text",hidden:!0,defaultValue:u[T],id:A0(a,T)})},getRangeProps(){return t.element({id:wee(a),...Mo.range.attrs,dir:i("dir"),"data-dragging":G(f),"data-focus":G(h),"data-invalid":G(m),"data-disabled":G(g),"data-orientation":i("orientation"),style:$ee(e)})},getControlProps(){return t.element({...Mo.control.attrs,dir:i("dir"),id:IR(a),"data-dragging":G(f),"data-disabled":G(g),"data-orientation":i("orientation"),"data-invalid":G(m),"data-focus":G(h),style:Mee(),onPointerDown(_){if(!b||!Ns(_)||dp(_))return;const T=rl(_);r({type:"POINTER_DOWN",point:T}),_.preventDefault(),_.stopPropagation()}})},getMarkerGroupProps(){return t.element({...Mo.markerGroup.attrs,role:"presentation",dir:i("dir"),"aria-hidden":!0,"data-orientation":i("orientation"),style:Vee()})},getMarkerProps(_){const T=Lee(e,_.value);let N;return _.valueCK(u)?N="over-value":N="at-value",t.element({...Mo.marker.attrs,id:kee(a,_.value),role:"presentation",dir:i("dir"),"data-orientation":i("orientation"),"data-value":_.value,"data-disabled":G(g),"data-state":N,style:T})},getDraggingIndicatorProps(_){const{index:T=0}=_,N=T===p&&f;return t.element({...Mo.draggingIndicator.attrs,role:"presentation",dir:i("dir"),hidden:!N,"data-orientation":i("orientation"),"data-state":N?"open":"closed",style:xE(e,T)})}}}var jee=(e,t)=>e?.width===t?.width&&e?.height===t?.height,wE=(e,t,n,r,o)=>C$(e,t,n,o*r).map(i=>{const s=lp(i.value,i.min,i.max,r),a=dn(s,i.min,i.max);if(!_$(a,t,n))throw new Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return a}),Gee={props({props:e}){const t=e.min??0,n=e.max??100,r=e.step??1,o=e.defaultValue??[t],i=e.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",minStepsBetweenThumbs:i,...e,defaultValue:wE(o,t,n,r,i),value:e.value?wE(e.value,t,n,r,i):void 0,max:n,step:r,min:t}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{thumbSize:t(()=>({defaultValue:e("thumbSize")||null})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:gl,hash(r){return r.join(",")},onChange(r){e("onValueChange")?.({value:r})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(r){const o=n();e("onFocusChange")?.({focusedIndex:r,value:o.get("value")})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal",isVertical:({prop:e})=>e("orientation")==="vertical",isRtl:({prop:e})=>e("orientation")==="horizontal"&&e("dir")==="rtl",isDisabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled"),isInteractive:({prop:e,computed:t})=>!(e("readOnly")||t("isDisabled")),hasMeasuredThumbSize:({context:e})=>e.get("thumbSize")!=null,valuePercent:x0(({context:e,prop:t})=>[e.get("value"),t("min"),t("max")],([e,t,n])=>e.map(r=>100*ov(r,t,n)))},watch({track:e,action:t,context:n}){e([()=>n.hash("value")],()=>{t(["syncInputElements","dispatchChangeEvent"])})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],INCREMENT:{actions:["incrementThumbAtIndex"]},DECREMENT:{actions:["decrementThumbAtIndex"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd"]},POINTER_MOVE:{actions:["setPointerValue"]}}}},implementations:{guards:{hasIndex:({event:e})=>e.index!=null},effects:{trackFormControlState({context:e,scope:t}){return du(Cee(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackPointerMove({scope:e,send:t}){return B$(e.getDoc(),{onPointerMove(n){t({type:"POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"POINTER_UP"})}})},trackThumbSize({context:e,scope:t,prop:n}){if(!(n("thumbAlignment")!=="contain"||n("thumbSize")))return H$(TR(t),{box:"border-box",measure(r){return Tee(r)},onEntry({rects:r}){if(r.length===0)return;const o=QK(r[0],["width","height"]);jee(e.get("thumbSize"),o)||e.set("thumbSize",o)}})}},actions:{dispatchChangeEvent({context:e,scope:t}){Iee(t,e.get("value"))},syncInputElements({context:e,scope:t}){e.get("value").forEach((n,r)=>{const o=SR(t,r);Qp(o,n.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e("onValueChangeEnd")?.({value:t.get("value")})})},setClosestThumbIndex(e){const{context:t,event:n}=e,r=yE(e,n.point);if(r==null)return;const o=zee(e,r);t.set("focusedIndex",o)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setPointerValue(e){queueMicrotask(()=>{const{context:t,event:n}=e,r=yE(e,n.point);if(r==null)return;const o=t.get("focusedIndex"),i=N0(e,r,o);t.set("value",s=>sd(s,o,i))})},focusActiveThumb({scope:e,context:t}){Ht(()=>{Eee(e,t.get("focusedIndex"))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){const{context:t,event:n}=e,r=Bee(e,n.index,n.step);t.set("value",r)},incrementThumbAtIndex(e){const{context:t,event:n}=e,r=Hee(e,n.index,n.step);t.set("value",r)},setFocusedThumbToMin(e){const{context:t}=e,n=t.get("focusedIndex"),{min:r}=Ms(e,n);t.set("value",o=>sd(o,n,r))},setFocusedThumbToMax(e){const{context:t}=e,n=t.get("focusedIndex"),{max:r}=Ms(e,n);t.set("value",o=>sd(o,n,r))},setValueAtIndex(e){const{context:t,event:n}=e,r=N0(e,n.value,n.index);t.set("value",o=>sd(o,n.index,r))},setValue(e){const{context:t,event:n}=e,r=Fee(e,n.value);t.set("value",r)}}}};On()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);On()(["index","name"]);const Wee=(e={},t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...fu(a),onFocusChange:l=>{t?.("focusChange",l),a.onFocusChange?.(l)},onValueChangeEnd:l=>{t?.("valueChangeEnd",l),a.onValueChangeEnd?.(l)},onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a.onValueChange?.(l)}}}),s=ml(Gee,i);return A(()=>Uee(s,pu))},qee=P({__name:"slider-root",props:Ze({"aria-label":{},"aria-labelledby":{},defaultValue:{},dir:{},disabled:{type:Boolean},form:{},getAriaValueText:{type:Function},getRootNode:{type:Function},id:{},ids:{},invalid:{type:Boolean},max:{},min:{},minStepsBetweenThumbs:{},modelValue:{},name:{},orientation:{},origin:{},readOnly:{type:Boolean},step:{},thumbAlignment:{},thumbSize:{},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0}),emits:["focusChange","valueChange","valueChangeEnd","update:modelValue"],setup(e,{emit:t}){const n=Wee(e,t);return kR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Kee=P({__name:"slider-thumb",props:{index:{},name:{},asChild:{type:Boolean}},setup(e){const t=e,n=Oo();return dee(t),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getThumbProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Yee=P({__name:"slider-track",props:{asChild:{type:Boolean}},setup(e){const t=Oo();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getTrackProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Xee=P({__name:"slider-value-text",props:{asChild:{type:Boolean}},setup(e){const t=Oo(),n=xo();return ue(),(r,o)=>(y(),$(d(ce).span,F(d(t).getValueTextProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default",{},()=>[re(j(n.default?.()||d(t).value.join(", ")),1)])]),_:3},16,["as-child"]))}}),Fl=Object.freeze(Object.defineProperty({__proto__:null,Context:cee,Control:uee,DraggingIndicator:pee,HiddenInput:fee,Label:hee,Marker:mee,MarkerGroup:gee,Range:vee,Root:qee,RootProvider:bee,Thumb:Kee,Track:Yee,ValueText:Xee},Symbol.toStringTag,{value:"Module"})),[AR,la]=Ut("NumberInputContext"),Jee=P({__name:"number-input-context",setup(e){const t=la();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Zee=P({__name:"number-input-control",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Qee=P({__name:"number-input-decrement-trigger",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getDecrementTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ete=P({__name:"number-input-increment-trigger",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getIncrementTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),tte=P({__name:"number-input-input",props:{asChild:{type:Boolean}},setup(e){const t=la(),n=Ln();return ue(),(r,o)=>(y(),$(d(ce).input,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getInputProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["aria-describedby","as-child"]))}}),nte=P({__name:"number-input-label",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),rte=P({__name:"number-input-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return AR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});let Fb=new Map,M0=!1;try{M0=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Vg=!1;try{Vg=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const NR={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class ote{format(t){let n="";if(!M0&&this.options.signDisplay!=null?n=ste(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Vg){var r;let{unit:o,unitDisplay:i="short",locale:s}=this.resolvedOptions();if(!o)return n;let a=(r=NR[o])===null||r===void 0?void 0:r[i];n+=a[s]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!M0&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Vg&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=ite(t,n),this.options=n}}function ite(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Vg){var r;let{unit:s,unitDisplay:a="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=NR[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((s,a)=>s[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=e.format(-n),i=e.format(n),s=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(n)}}const ate=new RegExp("^.*\\(.*\\).*$"),lte=["latn","arab","hanidec","deva","beng","fullwide"];class MR{parse(t){return Bb(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Bb(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Bb(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const _E=new Map;function Bb(e,t,n){let r=kE(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let o of lte)if(o!==r.options.numberingSystem){let i=kE(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(i.isValidPartialNumber(n))return i}}return r}function kE(e,t){let n=e+(t?Object.entries(t).sort((o,i)=>o[0]-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var o,i;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)+2,20)};return new MR(this.locale,s).parse(new ote(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&ate.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=Bl(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=Bl(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=Bl(t," ",this.symbols.group),t=Bl(t,/\u00A0/g,this.symbols.group)),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=Bl(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,n.roundingIncrement!==1&&n.roundingIncrement!=null&&(n.maximumFractionDigits==null&&n.minimumFractionDigits==null?(n.maximumFractionDigits=0,n.minimumFractionDigits=0):n.maximumFractionDigits==null?n.maximumFractionDigits=n.minimumFractionDigits:n.minimumFractionDigits==null&&(n.minimumFractionDigits=n.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=dte(t,this.formatter,this.options,n);var r,o;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const CE=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),ute=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function dte(e,t,n,r){var o,i,s,a;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),u=l.formatToParts(10000.111),p=ute.map(C=>l.formatToParts(C));var h;let f=(h=(o=c.find(C=>C.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&h!==void 0?h:"-",g=(i=u.find(C=>C.type==="plusSign"))===null||i===void 0?void 0:i.value;!g&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(g="+");let m=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(C=>C.type==="decimal"))===null||s===void 0?void 0:s.value,b=(a=c.find(C=>C.type==="group"))===null||a===void 0?void 0:a.value,w=c.filter(C=>!CE.has(C.type)).map(C=>EE(C.value)),E=p.flatMap(C=>C.filter(x=>!CE.has(x.type)).map(x=>EE(x.value))),k=[...new Set([...w,...E])].sort((C,x)=>x.length-C.length),v=k.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${k.join("|")}|[\\p{White_Space}]`,"gu"),_=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),T=new Map(_.map((C,x)=>[C,x])),N=new RegExp(`[${_.join("")}]`,"g");return{minusSign:f,plusSign:g,decimal:m,group:b,literals:v,numeral:N,index:C=>String(T.get(C))}}function Bl(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function EE(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var pte=no("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),ls=pte.build(),fte=e=>e.ids?.root??`number-input:${e.id}`,ld=e=>e.ids?.input??`number-input:${e.id}:input`,DR=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,LR=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,hte=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,VR=e=>`number-input:${e.id}:cursor`,gte=e=>e.ids?.label??`number-input:${e.id}:label`,cd=e=>e.getById(ld(e)),mte=e=>e.getById(DR(e)),vte=e=>e.getById(LR(e)),FR=e=>e.getDoc().getElementById(VR(e)),bte=(e,t)=>{let n=null;return t==="increment"&&(n=mte(e)),t==="decrement"&&(n=vte(e)),n},yte=(e,t)=>{if(!lv())return _te(e,t),()=>{FR(e)?.remove()}},xte=e=>{const t=e.getDoc(),n=t.documentElement,r=t.body;return r.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{r.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),r.style.length||r.removeAttribute("style")}},wte=(e,t)=>{const{point:n,isRtl:r,event:o}=t,i=e.getWin(),s=Md(o.movementX,i.devicePixelRatio),a=Md(o.movementY,i.devicePixelRatio);let l=s>0?"increment":s<0?"decrement":null;r&&l==="increment"&&(l="decrement"),r&&l==="decrement"&&(l="increment");const c={x:n.x+s,y:n.y+a},u=i.innerWidth,p=Md(7.5,i.devicePixelRatio);return c.x=zK(c.x+p,u)-p,{hint:l,point:c}},_te=(e,t)=>{const n=e.getDoc(),r=n.createElement("div");r.className="scrubber--cursor",r.id=VR(e),Object.assign(r.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:tY,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),r.innerHTML=` - - - - - - `,n.body.appendChild(r)};function kte(e,t){const{state:n,send:r,prop:o,scope:i,computed:s}=e,a=n.hasTag("focus"),l=s("isDisabled"),c=!!o("readOnly"),u=!!o("required"),p=n.matches("scrubbing"),h=s("isValueEmpty"),f=s("isOutOfRange")||!!o("invalid"),g=l||!s("canIncrement")||c,m=l||!s("canDecrement")||c,b=o("translations");return{focused:a,invalid:f,empty:h,value:s("formattedValue"),valueAsNumber:s("valueAsNumber"),setValue(w){r({type:"VALUE.SET",value:w})},clearValue(){r({type:"VALUE.CLEAR"})},increment(){r({type:"VALUE.INCREMENT"})},decrement(){r({type:"VALUE.DECREMENT"})},setToMax(){r({type:"VALUE.SET",value:o("max")})},setToMin(){r({type:"VALUE.SET",value:o("min")})},focus(){cd(i)?.focus()},getRootProps(){return t.element({id:fte(i),...ls.root.attrs,dir:o("dir"),"data-disabled":G(l),"data-focus":G(a),"data-invalid":G(f),"data-scrubbing":G(p)})},getLabelProps(){return t.label({...ls.label.attrs,dir:o("dir"),"data-disabled":G(l),"data-focus":G(a),"data-invalid":G(f),"data-required":G(u),"data-scrubbing":G(p),id:gte(i),htmlFor:ld(i)})},getControlProps(){return t.element({...ls.control.attrs,dir:o("dir"),role:"group","aria-disabled":l,"data-focus":G(a),"data-disabled":G(l),"data-invalid":G(f),"data-scrubbing":G(p),"aria-invalid":cp(f)})},getValueTextProps(){return t.element({...ls.valueText.attrs,dir:o("dir"),"data-disabled":G(l),"data-invalid":G(f),"data-focus":G(a),"data-scrubbing":G(p)})},getInputProps(){return t.input({...ls.input.attrs,dir:o("dir"),name:o("name"),form:o("form"),id:ld(i),role:"spinbutton",defaultValue:s("formattedValue"),pattern:o("formatOptions")?void 0:o("pattern"),inputMode:o("inputMode"),"aria-invalid":cp(f),"data-invalid":G(f),disabled:l,"data-disabled":G(l),readOnly:c,required:o("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":o("min"),"aria-valuemax":o("max"),"aria-valuenow":Number.isNaN(s("valueAsNumber"))?void 0:s("valueAsNumber"),"aria-valuetext":s("valueText"),"data-scrubbing":G(p),onFocus(){r({type:"INPUT.FOCUS"})},onBlur(){r({type:"INPUT.BLUR"})},onInput(w){r({type:"INPUT.CHANGE",target:w.currentTarget,hint:"set"})},onBeforeInput(w){try{const{selectionStart:E,selectionEnd:k,value:v}=w.currentTarget,_=v.slice(0,E)+(w.data??"")+v.slice(k);s("parser").isValidPartialNumber(_)||w.preventDefault()}catch{}},onKeyDown(w){if(w.defaultPrevented||c||kY(w))return;const E=Sg(w)*o("step"),k={ArrowUp(){r({type:"INPUT.ARROW_UP",step:E}),w.preventDefault()},ArrowDown(){r({type:"INPUT.ARROW_DOWN",step:E}),w.preventDefault()},Home(){dp(w)||(r({type:"INPUT.HOME"}),w.preventDefault())},End(){dp(w)||(r({type:"INPUT.END"}),w.preventDefault())},Enter(){r({type:"INPUT.ENTER"})}}[w.key];k?.(w)}})},getDecrementTriggerProps(){return t.button({...ls.decrementTrigger.attrs,dir:o("dir"),id:LR(i),disabled:m,"data-disabled":G(m),"aria-label":b.decrementLabel,type:"button",tabIndex:-1,"aria-controls":ld(i),"data-scrubbing":G(p),onPointerDown(w){m||Ns(w)&&(r({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){r({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:w.pointerType})},onPointerLeave(){m||r({type:"TRIGGER.PRESS_UP",hint:"decrement"})}})},getIncrementTriggerProps(){return t.button({...ls.incrementTrigger.attrs,dir:o("dir"),id:DR(i),disabled:g,"data-disabled":G(g),"aria-label":b.incrementLabel,type:"button",tabIndex:-1,"aria-controls":ld(i),"data-scrubbing":G(p),onPointerDown(w){g||!Ns(w)||(r({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){r({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})},onPointerLeave(w){r({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})}})},getScrubberProps(){return t.element({...ls.scrubber.attrs,dir:o("dir"),"data-disabled":G(l),id:hte(i),role:"presentation","data-scrubbing":G(p),onMouseDown(w){if(l||!Ns(w))return;const E=rl(w),k=rn(w.currentTarget).devicePixelRatio;E.x=E.x-Md(7.5,k),E.y=E.y-Md(7.5,k),r({type:"SCRUBBER.PRESS_DOWN",point:E}),w.preventDefault()},style:{cursor:l?void 0:"ew-resize"}})}}}function Cte(e,t){if(!(!e||!t.isActiveElement(e)))try{const{selectionStart:n,selectionEnd:r,value:o}=e,i=o.substring(0,n),s=o.substring(r);return{start:n,end:r,value:o,beforeTxt:i,afterTxt:s}}catch{}}function Ete(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){e.setSelectionRange(e.value.length,e.value.length);return}try{const{value:r}=e,{beforeTxt:o="",afterTxt:i="",start:s}=t;let a=r.length;if(r.endsWith(i))a=r.length-i.length;else if(r.startsWith(o))a=o.length;else if(s!=null){const l=o[s-1],c=r.indexOf(l,s-1);c!==-1&&(a=c+1)}e.setSelectionRange(a,a)}catch{}}}var Ote=(e,t={})=>new Intl.NumberFormat(e,t),Ite=(e,t={})=>new MR(e,t),Hb=(e,t)=>{const{prop:n,computed:r}=t;return n("formatOptions")?e===""?Number.NaN:r("parser").parse(e):parseFloat(e)},Pa=(e,t)=>{const{prop:n,computed:r}=t;return Number.isNaN(e)?"":n("formatOptions")?r("formatter").format(e):e.toString()},Tte=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:Ste,guards:Pte,createMachine:$te}=uX(),{not:OE,and:IE}=Pte,Rte=$te({props({props:e}){const t=Tte(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(r){const o=n(),i=Hb(r,{computed:o,prop:e});e("onValueChange")?.({value:r,valueAsNumber:i})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(r){return r?`x:${r.x}, y:${r.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Hb(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>Pa(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>WK(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>GK(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!_$(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>e("translations").valueText?.(t.get("value")),formatter:x0(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>Ote(e,t)),parser:x0(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>Ite(e,t))},watch({track:e,action:t,context:n,computed:r,prop:o}){e([()=>n.get("value"),()=>o("locale")],()=>{t(["syncInputElement"])}),e([()=>r("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:IE("clampValueOnBlur",OE("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:OE("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:Ste([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:IE("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){const t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){const t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){const n=cd(t);return du(n,{onFieldsetDisabledChange(r){e.set("fieldsetDisabled",r)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){const n=e.get("scrubberCursorPoint");return yte(t,n)},preventTextSelection({scope:e}){return xte(e)},trackButtonDisabled({context:e,scope:t,send:n}){const r=e.get("hint"),o=bte(t,r);return L$(o,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const r=cd(e);if(!r||!e.isActiveElement(r)||!n("allowMouseWheel"))return;function o(i){i.preventDefault();const s=Math.sign(i.deltaY)*-1;s===1?t({type:"VALUE.INCREMENT"}):s===-1&&t({type:"VALUE.DECREMENT"})}return Kt(r,"wheel",o,{passive:!1})},activatePointerLock({scope:e}){if(!lv())return WY(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:r}){const o=e.getDoc();function i(a){const l=n.get("scrubberCursorPoint"),c=r("isRtl"),u=wte(e,{point:l,isRtl:c,event:a});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function s(){t({type:"SCRUBBER.POINTER_UP"})}return Og(Kt(o,"mousemove",i,!1),Kt(o,"mouseup",s,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=cd(e);e.isActiveElement(n)||Ht(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:r}){let o=JK(r("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(o=dn(o,n("min"),n("max"))),e.set("value",Pa(o,{computed:r,prop:n}))},decrement({context:e,event:t,prop:n,computed:r}){let o=ZK(r("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(o=dn(o,n("min"),n("max"))),e.set("value",Pa(o,{computed:r,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const r=dn(n("valueAsNumber"),t("min"),t("max"));e.set("value",Pa(r,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:r}){let o=Hb(t.value,{computed:r,prop:n});n("allowOverflow")||(o=dn(o,n("min"),n("max"))),e.set("value",Pa(o,{computed:r,prop:n}))},setValue({context:e,event:t}){const n=t.target?.value??t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){const r=Pa(t("max"),{computed:n,prop:t});e.set("value",r)},decrementToMin({context:e,prop:t,computed:n}){const r=Pa(t("min"),{computed:n,prop:t});e.set("value",r)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){t("onFocusChange")?.({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){t("onFocusChange")?.({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){if(n.type==="INPUT.CHANGE")return;const r=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";t("onValueInvalid")?.({reason:r,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:r}){const o=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),i=cd(r),s=Cte(i,r);Ht(()=>{Qp(i,o),Ete(i,s,r)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){const n=FR(t),r=e.get("scrubberCursorPoint");!n||!r||(n.style.transform=`translate3d(${r.x}px, ${r.y}px, 0px)`)}}}});On()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);const Ate=(e={},t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=Ln(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,input:i?.value.ids.control},disabled:i?.value.disabled,readOnly:i?.value.readOnly,required:i?.value.required,invalid:i?.value.invalid,dir:o.value.dir,locale:o.value.locale,value:l.modelValue,getRootNode:r?.value.getRootNode,...fu(l),onValueChange:c=>{t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onFocusChange:c=>{t?.("focusChange",c),l.onFocusChange?.(c)},onValueInvalid:c=>{t?.("valueInvalid",c),l.onValueInvalid?.(c)}}}),a=ml(Rte,s);return A(()=>kte(a,pu))},Nte=P({__name:"number-input-root",props:Ze({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const n=Ate(e,t);return AR(n),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Mte=P({__name:"number-input-scrubber",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getScrubberProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Dte=P({__name:"number-input-value-text",props:{asChild:{type:Boolean}},setup(e){const t=la();return ue(),(n,r)=>(y(),$(d(ce).span,F(d(t).getValueTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ki=Object.freeze(Object.defineProperty({__proto__:null,Context:Jee,Control:Zee,DecrementTrigger:Qee,IncrementTrigger:ete,Input:tte,Label:nte,Root:Nte,RootProvider:rte,Scrubber:Mte,ValueText:Dte},Symbol.toStringTag,{value:"Module"})),Lte={class:"flex items-center gap-4"},Vte={key:0,class:"px-1 text-sm text-gray-500 border-gray-300"},Fte=P({__name:"Range",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=A(()=>t.field.min||0),r=A(()=>t.field.max||100),o=A(()=>t.field.step||1),i=rt(e,"modelValue"),s=A({get:()=>[i.value??t.field.default??t.field.min??0],set:l=>{i.value=l[0]}}),a=A({get:()=>(i.value??t.field.default??t.field.min??0).toString(),set:l=>{const c=parseFloat(l);i.value=isNaN(c)?void 0:c}});return(l,c)=>(y(),$(d(Fl).Root,{modelValue:s.value,"onUpdate:modelValue":c[1]||(c[1]=u=>s.value=u),min:n.value,max:r.value,step:o.value,class:"relative w-full"},{default:O(()=>[S(d(Fl).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(l.field.label),1)]),_:1}),D("div",Lte,[S(d(Fl).Control,{class:"flex-1 flex items-center h-2 select-none touch-none"},{default:O(()=>[S(d(Fl).Track,{class:"flex-1 overflow-hidden h-1 rounded-full bg-gray-100"},{default:O(()=>[S(d(Fl).Range,{class:"h-1 bg-accent"})]),_:1}),(y(),$(d(Fl).Thumb,{index:0,key:0,class:"h-4 w-4 bg-white rounded-full shadow outline-none border-2 border-accent"}))]),_:1}),S(d(ki).Root,{modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=u=>a.value=u),min:n.value,max:r.value,step:o.value,class:"flex-none w-16"},{default:O(()=>[S(d(ki).Control,{class:"flex items-center h-8 border border-gray-300 rounded overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-accent focus-within:border-transparent"},{default:O(()=>[S(d(ki).Input,{class:"w-full px-2 text-sm focus:outline-none appearance-none"}),l.field.unit?(y(),V("div",Vte,j(l.field.unit),1)):Z("",!0)]),_:1})]),_:1},8,["modelValue","min","max","step"])])]),_:1},8,["modelValue","min","max","step"]))}}),Bte={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hte(e,t){return y(),V("svg",Bte,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m15 11.25l1.5 1.5l.75-.75V8.758l2.276-.61a3 3 0 1 0-3.675-3.675l-.61 2.277H12l-.75.75l1.5 1.5M15 11.25l-8.47 8.47c-.34.34-.8.53-1.28.53s-.94.19-1.28.53l-.97.97l-.75-.75l.97-.97c.34-.34.53-.8.53-1.28s.19-.94.53-1.28L12.75 9M15 11.25L12.75 9"},null,-1)])])}const zte=fe({name:"heroicons-eye-dropper",render:Hte});var Ute=Object.defineProperty,jte=(e,t,n)=>t in e?Ute(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aw=(e,t,n)=>jte(e,t+"",n),Gte=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,0),rgb(${n},255,0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,255),rgb(${n},255,255))`,WebkitMaskImage:r,maskImage:r}}},Wte=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},0),rgb(255,${n},0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},255),rgb(255,${n},255))`,WebkitMaskImage:r,maskImage:r}}},qte=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,0,${n}),rgb(255,0,${n}))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,255,${n}),rgb(255,255,${n}))`,WebkitMaskImage:r,maskImage:r}}},Kte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,`linear-gradient(to ${e[+!t]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,`hsl(${n}, 100%, 50%)`].join(",")}}),Yte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]}, hsla(0,0%,0%,${n}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${n}) 100%)`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,"hsl(0, 0%, 50%)"].join(",")}}),Xte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{backgroundImage:[`linear-gradient(to ${e[+!t]},hsl(0,0%,${n}%),hsla(0,0%,${n}%,0))`,`linear-gradient(to ${e[Number(t)]},hsl(0,100%,${n}%),hsl(60,100%,${n}%),hsl(120,100%,${n}%),hsl(180,100%,${n}%),hsl(240,100%,${n}%),hsl(300,100%,${n}%),hsl(360,100%,${n}%))`].join(",")}}),Jte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,`hsl(${n}, 100%, 50%)`].join(",")}}),Zte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,0%,${n}),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,0%),hsl(0,0%,100%))`].join(",")}}),Qte=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,100%,${n}),hsla(0,0%,100%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,"#000"].join(",")}});function TE(e,t){const{xChannel:n,yChannel:r,dir:o="ltr"}=t,{zChannel:i}=e.getColorAxes({xChannel:n,yChannel:r}),s=e.getChannelValue(i),{minValue:a,maxValue:l}=e.getChannelRange(i),c=["top",o==="rtl"?"left":"right"];let u=!1,p={areaStyles:{},areaGradientStyles:{}},h=(s-a)/(l-a),f=e.getFormat()==="hsla";switch(i){case"red":{u=n==="green",p=Gte(c,u,s);break}case"green":{u=n==="red",p=Wte(c,u,s);break}case"blue":{u=n==="red",p=qte(c,u,s);break}case"hue":{u=n!=="saturation",f?p=Kte(c,u,s):p=Jte(c,u,s);break}case"saturation":{u=n==="hue",f?p=Yte(c,u,h):p=Zte(c,u,h);break}case"brightness":{u=n==="hue",p=Qte(c,u,h);break}case"lightness":{u=n==="hue",p=Xte(c,u,s);break}}return p}var ene=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},lw=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(e){if(e in this)return this[e];throw new Error("Unsupported color channel: "+e)}getChannelValuePercent(e,t){const n=t??this.getChannelValue(e),{minValue:r,maxValue:o}=this.getChannelRange(e);return ov(n,r,o)}getChannelPercentValue(e,t){const{minValue:n,maxValue:r,step:o}=this.getChannelRange(e),i=Hx(t,n,r,o);return lp(i,n,r,o)}withChannelValue(e,t){const{minValue:n,maxValue:r}=this.getChannelRange(e);if(e in this){let o=this.clone();return o[e]=dn(t,n,r),o}throw new Error("Unsupported color channel: "+e)}getColorAxes(e){let{xChannel:t,yChannel:n}=e,r=t||this.getChannels().find(s=>s!==n),o=n||this.getChannels().find(s=>s!==r),i=this.getChannels().find(s=>s!==r&&s!==o);return{xChannel:r,yChannel:o,zChannel:i}}incrementChannel(e,t){const{minValue:n,maxValue:r,step:o}=this.getChannelRange(e),i=lp(dn(this.getChannelValue(e)+t,n,r),n,r,o);return this.withChannelValue(e,i)}decrementChannel(e,t){return this.incrementChannel(e,-t)}isEqual(e){return ene(this.toJSON(),e.toJSON())&&this.getChannelValue("alpha")===e.getChannelValue("alpha")}},tne=/^#[\da-f]+$/i,nne=/^rgba?\((.*)\)$/,rne=/[^#]/gi,BR=class $h extends lw{constructor(t,n,r,o){super(),this.red=t,this.green=n,this.blue=r,this.alpha=o}static parse(t){let n=[];if(tne.test(t)&&[4,5,7,9].includes(t.length)){const o=(t.length<6?t.replace(rne,"$&$&"):t).slice(1).split("");for(;o.length>0;)n.push(parseInt(o.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const r=t.match(nne);return r?.[1]&&(n=r[1].split(",").map(o=>Number(o.trim())).map((o,i)=>dn(o,0,i<3?255:1))),n.length<3?void 0:new $h(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,r=this.blue/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o,a=i===0?0:s/i;let l=0;if(s!==0){switch(i){case t:l=(n-r)/s+(nNumber(a.trim().replace("%","")));return new Rh(w$(r,360),dn(o,0,100),dn(i,0,100),dn(s??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${wt(this.saturation,2)}%, ${wt(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${wt(this.saturation,2)}%, ${wt(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,r=n+t*Math.min(n,1-n);return t=r===0?0:2*(1-n/r),new dw(wt(this.hue,2),wt(t*100,2),wt(r*100,2),wt(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,r=this.lightness/100,o=n*Math.min(r,1-r),i=(s,a=(s+t/30)%12)=>r-o*Math.max(Math.min(a-3,9-a,1),-1);return new cw(Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255),wt(this.alpha,2))}clone(){return new Rh(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let r=this.getChannelFormatOptions(t),o=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(o/=100),new Intl.NumberFormat(n,r).format(o)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return Rh.colorChannels}};aw(HR,"colorChannels",["hue","saturation","lightness"]);var uw=HR,ine=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,zR=class Ah extends lw{constructor(t,n,r,o){super(),this.hue=t,this.saturation=n,this.brightness=r,this.alpha=o}static parse(t){let n;if(n=t.match(ine)){const[r,o,i,s]=(n[1]??n[2]).split(",").map(a=>Number(a.trim().replace("%","")));return new Ah(w$(r,360),dn(o,0,100),dn(i,0,100),dn(s??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${wt(this.saturation,2)}%, ${wt(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${wt(this.saturation,2)}%, ${wt(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,r=n*(1-t/2);return t=r===0||r===1?0:(n-r)/Math.min(r,1-r),new uw(wt(this.hue,2),wt(t*100,2),wt(r*100,2),wt(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,r=this.brightness/100,o=(i,s=(i+t/60)%6)=>r-n*r*Math.max(Math.min(s,4-s,1),0);return new cw(Math.round(o(5)*255),Math.round(o(3)*255),Math.round(o(1)*255),wt(this.alpha,2))}clone(){return new Ah(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let r=this.getChannelFormatOptions(t),o=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(o/=100),new Intl.NumberFormat(n,r).format(o)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return Ah.colorChannels}};aw(zR,"colorChannels",["hue","saturation","brightness"]);var dw=zR,sne="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",ane=e=>{const t=new Map,n=e.split(",");for(let r=0;r{if(SE.has(e))return Js(SE.get(e));const t=cw.parse(e)||dw.parse(e)||uw.parse(e);if(!t){const n=new Error("Invalid color value: "+e);throw Error.captureStackTrace?.(n,Js),n}return t},PE=e=>typeof e=="string"?Js(e):e,UR=no("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]),St=UR.build(),lne=e=>e.ids?.root??`color-picker:${e.id}`,$E=e=>e.ids?.label??`color-picker:${e.id}:label`,D0=e=>e.ids?.hiddenInput??`color-picker:${e.id}:hidden-input`,jR=e=>e.ids?.control??`color-picker:${e.id}:control`,GR=e=>e.ids?.trigger??`color-picker:${e.id}:trigger`,L0=e=>e.ids?.content??`color-picker:${e.id}:content`,WR=e=>e.ids?.positioner??`color-picker:${e.id}:positioner`,cne=e=>e.ids?.formatSelect??`color-picker:${e.id}:format-select`,qR=e=>e.ids?.area??`color-picker:${e.id}:area`,une=e=>e.ids?.areaGradient??`color-picker:${e.id}:area-gradient`,KR=e=>e.ids?.areaThumb??`color-picker:${e.id}:area-thumb`,YR=(e,t)=>e.ids?.channelSliderTrack?.(t)??`color-picker:${e.id}:slider-track:${t}`,V0=(e,t)=>e.ids?.channelSliderThumb?.(t)??`color-picker:${e.id}:slider-thumb:${t}`,Nh=e=>e.getById(L0(e)),dne=e=>e.getById(KR(e)),pne=(e,t)=>e.getById(V0(e,t)),fne=e=>e.getById(cne(e)),RE=e=>e.getById(D0(e)),hne=e=>e.getById(qR(e)),gne=(e,t,n)=>{const r=hne(e);if(!r)return;const{getPercentValue:o}=Kx(t,r);return{x:o({dir:n,orientation:"horizontal"}),y:o({orientation:"vertical"})}},XR=e=>e.getById(jR(e)),zb=e=>e.getById(GR(e)),mne=e=>e.getById(WR(e)),vne=(e,t)=>e.getById(YR(e,t)),bne=(e,t,n,r)=>{const o=vne(e,n);if(!o)return;const{getPercentValue:i}=Kx(t,o);return{x:i({dir:r,orientation:"horizontal"}),y:i({orientation:"vertical"})}},yne=e=>[...Pg(Nh(e),"input[data-channel]"),...Pg(XR(e),"input[data-channel]")];function xne(e,t){switch(t){case"hue":return Js(`hsl(${e.getChannelValue("hue")}, 100%, 50%)`);case"lightness":case"brightness":case"saturation":case"red":case"green":case"blue":return e.withChannelValue("alpha",1);case"alpha":return e;default:throw new Error("Unknown color channel: "+t)}}function F0(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}function wne(e,t){switch(t){case"hex":const n=Js("#000000"),r=Js("#FFFFFF");return{minValue:n.toHexInt(),maxValue:r.toHexInt(),pageSize:10,step:1};case"css":return;case"hue":case"saturation":case"lightness":return e.toFormat("hsla").getChannelRange(t);case"brightness":return e.toFormat("hsba").getChannelRange(t);case"red":case"green":case"blue":return e.toFormat("rgba").getChannelRange(t);default:return e.getChannelRange(t)}}function _ne(e,t){return e==="vertical"?"top":t==="ltr"?"right":"left"}var kne=e=>{const{channel:t,value:n,dir:r,orientation:o}=e,i=_ne(o,r),{minValue:s,maxValue:a}=n.getChannelRange(t);switch(t){case"hue":return`linear-gradient(to ${i}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;case"lightness":{let l=n.withChannelValue(t,s).toString("css"),c=n.withChannelValue(t,(a-s)/2).toString("css"),u=n.withChannelValue(t,a).toString("css");return`linear-gradient(to ${i}, ${l}, ${c}, ${u})`}case"saturation":case"brightness":case"red":case"green":case"blue":case"alpha":{let l=n.withChannelValue(t,s).toString("css"),c=n.withChannelValue(t,a).toString("css");return`linear-gradient(to ${i}, ${l}, ${c})`}default:throw new Error("Unknown color channel: "+t)}};function Cne(e,t){const{context:n,send:r,prop:o,computed:i,state:s,scope:a}=e,l=n.get("value"),c=n.get("format"),u=i("areaValue"),p=i("valueAsString"),h=i("disabled"),f=!!o("readOnly"),g=!!o("invalid"),m=!!o("required"),b=i("interactive"),w=s.hasTag("dragging"),E=s.hasTag("open"),k=s.hasTag("focused"),v=C=>{const x=u.getChannels();return{xChannel:C.xChannel??x[1],yChannel:C.yChannel??x[2]}},_=n.get("currentPlacement"),T=hR({...o("positioning"),placement:_});function N(C){const x=PE(C.value).toFormat(n.get("format"));return{value:x,valueAsString:x.toString("hex"),checked:x.isEqual(l),disabled:C.disabled||!b}}return{dragging:w,open:E,valueAsString:p,value:l,inline:!!o("inline"),setOpen(C){o("inline")||s.hasTag("open")===C||r({type:C?"OPEN":"CLOSE"})},setValue(C){r({type:"VALUE.SET",value:PE(C),src:"set-color"})},getChannelValue(C){return F0(l,C)},getChannelValueText(C,x){return l.formatChannelValue(C,x)},setChannelValue(C,x){const I=l.withChannelValue(C,x);r({type:"VALUE.SET",value:I,src:"set-channel"})},format:n.get("format"),setFormat(C){const x=l.toFormat(C);r({type:"VALUE.SET",value:x,src:"set-format"})},alpha:l.getChannelValue("alpha"),setAlpha(C){const x=l.withChannelValue("alpha",C);r({type:"VALUE.SET",value:x,src:"set-alpha"})},getRootProps(){return t.element({...St.root.attrs,dir:o("dir"),id:lne(a),"data-disabled":G(h),"data-readonly":G(f),"data-invalid":G(g),style:{"--value":l.toString("css")}})},getLabelProps(){return t.element({...St.label.attrs,dir:o("dir"),id:$E(a),htmlFor:D0(a),"data-disabled":G(h),"data-readonly":G(f),"data-invalid":G(g),"data-required":G(m),"data-focus":G(k),onClick(C){C.preventDefault(),XY(XR(a),"[data-channel=hex]")?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...St.control.attrs,id:jR(a),dir:o("dir"),"data-disabled":G(h),"data-readonly":G(f),"data-invalid":G(g),"data-state":E?"open":"closed","data-focus":G(k)})},getTriggerProps(){return t.button({...St.trigger.attrs,id:GR(a),dir:o("dir"),disabled:h,"aria-label":`select color. current color is ${p}`,"aria-controls":L0(a),"aria-labelledby":$E(a),"data-disabled":G(h),"data-readonly":G(f),"data-invalid":G(g),"data-placement":_,"aria-expanded":G(E),"data-state":E?"open":"closed","data-focus":G(k),type:"button",onClick(){b&&r({type:"TRIGGER.CLICK"})},onBlur(){b&&r({type:"TRIGGER.BLUR"})},style:{position:"relative"}})},getPositionerProps(){return t.element({...St.positioner.attrs,id:WR(a),dir:o("dir"),style:T.floating})},getContentProps(){return t.element({...St.content.attrs,id:L0(a),dir:o("dir"),tabIndex:-1,"data-placement":_,"data-state":E?"open":"closed",hidden:!E})},getValueTextProps(){return t.element({...St.valueText.attrs,dir:o("dir"),"data-disabled":G(h),"data-focus":G(k)})},getAreaProps(C={}){const{xChannel:x,yChannel:I}=v(C),{areaStyles:R}=TE(u,{xChannel:x,yChannel:I,dir:o("dir")});return t.element({...St.area.attrs,id:qR(a),role:"group","data-invalid":G(g),"data-disabled":G(h),"data-readonly":G(f),onPointerDown(M){if(!b||!Ns(M)||dp(M))return;const B=rl(M);r({type:"AREA.POINTER_DOWN",point:B,channel:{xChannel:x,yChannel:I},id:"area"}),M.preventDefault()},style:{position:"relative",touchAction:"none",forcedColorAdjust:"none",...R}})},getAreaBackgroundProps(C={}){const{xChannel:x,yChannel:I}=v(C),{areaGradientStyles:R}=TE(u,{xChannel:x,yChannel:I,dir:o("dir")});return t.element({...St.areaBackground.attrs,id:une(a),"data-invalid":G(g),"data-disabled":G(h),"data-readonly":G(f),style:{position:"relative",touchAction:"none",forcedColorAdjust:"none",...R}})},getAreaThumbProps(C={}){const{xChannel:x,yChannel:I}=v(C),R={xChannel:x,yChannel:I},M=u.getChannelValuePercent(x),B=1-u.getChannelValuePercent(I),z=o("dir")==="rtl"?1-M:M,J=u.getChannelValue(x),q=u.getChannelValue(I),K=u.withChannelValue("alpha",1).toString("css");return t.element({...St.areaThumb.attrs,id:KR(a),dir:o("dir"),tabIndex:h?void 0:0,"data-disabled":G(h),"data-invalid":G(g),"data-readonly":G(f),role:"slider","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":J,"aria-label":`${x} and ${I}`,"aria-roledescription":"2d slider","aria-valuetext":`${x} ${J}, ${I} ${q}`,style:{position:"absolute",left:`${z*100}%`,top:`${B*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",forcedColorAdjust:"none","--color":K,background:K},onFocus(){b&&r({type:"AREA.FOCUS",id:"area",channel:R})},onKeyDown(X){if(X.defaultPrevented||!b)return;const de=Sg(X),Ue={ArrowUp(){r({type:"AREA.ARROW_UP",channel:R,step:de})},ArrowDown(){r({type:"AREA.ARROW_DOWN",channel:R,step:de})},ArrowLeft(){r({type:"AREA.ARROW_LEFT",channel:R,step:de})},ArrowRight(){r({type:"AREA.ARROW_RIGHT",channel:R,step:de})},PageUp(){r({type:"AREA.PAGE_UP",channel:R,step:de})},PageDown(){r({type:"AREA.PAGE_DOWN",channel:R,step:de})},Escape(je){je.stopPropagation()}}[pp(X,{dir:o("dir")})];Ue&&(Ue(X),X.preventDefault())}})},getTransparencyGridProps(C={}){const{size:x="12px"}=C;return t.element({...St.transparencyGrid.attrs,style:{"--size":x,width:"100%",height:"100%",position:"absolute",backgroundColor:"#fff",backgroundImage:"conic-gradient(#eeeeee 0 25%, transparent 0 50%, #eeeeee 0 75%, transparent 0)",backgroundSize:"var(--size) var(--size)",inset:"0px",zIndex:"auto",pointerEvents:"none"}})},getChannelSliderProps(C){const{orientation:x="horizontal",channel:I,format:R}=C;return t.element({...St.channelSlider.attrs,"data-channel":I,"data-orientation":x,role:"presentation",onPointerDown(M){if(!b||!Ns(M)||dp(M))return;const B=rl(M);r({type:"CHANNEL_SLIDER.POINTER_DOWN",channel:I,format:R,point:B,id:I,orientation:x}),M.preventDefault()},style:{position:"relative",touchAction:"none"}})},getChannelSliderTrackProps(C){const{orientation:x="horizontal",channel:I,format:R}=C,M=R?l.toFormat(R):u;return t.element({...St.channelSliderTrack.attrs,id:YR(a,I),role:"group","data-channel":I,"data-orientation":x,style:{position:"relative",forcedColorAdjust:"none",backgroundImage:kne({orientation:x,channel:I,dir:o("dir"),value:M})}})},getChannelSliderLabelProps(C){const{channel:x}=C;return t.element({...St.channelSliderLabel.attrs,"data-channel":x,onClick(I){if(!b)return;I.preventDefault();const R=V0(a,x);a.getById(R)?.focus({preventScroll:!0})},style:{userSelect:"none",WebkitUserSelect:"none"}})},getChannelSliderValueTextProps(C){return t.element({...St.channelSliderValueText.attrs,"data-channel":C.channel})},getChannelSliderThumbProps(C){const{orientation:x="horizontal",channel:I,format:R}=C,M=R?l.toFormat(R):u,B=M.getChannelRange(I),z=M.getChannelValue(I),J=(z-B.minValue)/(B.maxValue-B.minValue),q=o("dir")==="rtl",K=x==="horizontal"&&q?1-J:J,X=x==="horizontal"?{left:`${K*100}%`,top:"50%"}:{top:`${J*100}%`,left:"50%"};return t.element({...St.channelSliderThumb.attrs,id:V0(a,I),role:"slider","aria-label":I,tabIndex:h?void 0:0,"data-channel":I,"data-disabled":G(h),"data-orientation":x,"aria-disabled":G(h),"aria-orientation":x,"aria-valuemax":B.maxValue,"aria-valuemin":B.minValue,"aria-valuenow":z,"aria-valuetext":`${I} ${z}`,style:{forcedColorAdjust:"none",position:"absolute",background:xne(u,I).toString("css"),...X},onFocus(){b&&r({type:"CHANNEL_SLIDER.FOCUS",channel:I})},onKeyDown(de){if(de.defaultPrevented||!b)return;const Ue=Sg(de)*B.step,je={ArrowUp(){r({type:"CHANNEL_SLIDER.ARROW_UP",channel:I,step:Ue})},ArrowDown(){r({type:"CHANNEL_SLIDER.ARROW_DOWN",channel:I,step:Ue})},ArrowLeft(){r({type:"CHANNEL_SLIDER.ARROW_LEFT",channel:I,step:Ue})},ArrowRight(){r({type:"CHANNEL_SLIDER.ARROW_RIGHT",channel:I,step:Ue})},PageUp(){r({type:"CHANNEL_SLIDER.PAGE_UP",channel:I})},PageDown(){r({type:"CHANNEL_SLIDER.PAGE_DOWN",channel:I})},Home(){r({type:"CHANNEL_SLIDER.HOME",channel:I})},End(){r({type:"CHANNEL_SLIDER.END",channel:I})},Escape(Ve){Ve.stopPropagation()}}[pp(de,{dir:o("dir")})];je&&(je(de),de.preventDefault())}})},getChannelInputProps(C){const{channel:x}=C,I=x==="hex"||x==="css",R=wne(l,x);return t.input({...St.channelInput.attrs,dir:o("dir"),type:I?"text":"number","data-channel":x,"aria-label":x,spellCheck:!1,autoComplete:"off",disabled:h,"data-disabled":G(h),"data-invalid":G(g),"data-readonly":G(f),readOnly:f,defaultValue:F0(l,x),min:R?.minValue,max:R?.maxValue,step:R?.step,onBeforeInput(M){I||!b||M.currentTarget.value.match(/[^0-9.]/g)&&M.preventDefault()},onFocus(M){b&&(r({type:"CHANNEL_INPUT.FOCUS",channel:x}),M.currentTarget.select())},onBlur(M){if(!b)return;const B=I?M.currentTarget.value:M.currentTarget.valueAsNumber;r({type:"CHANNEL_INPUT.BLUR",channel:x,value:B,isTextField:I})},onKeyDown(M){if(!M.defaultPrevented&&b&&M.key==="Enter"){const B=I?M.currentTarget.value:M.currentTarget.valueAsNumber;r({type:"CHANNEL_INPUT.CHANGE",channel:x,value:B,isTextField:I}),M.preventDefault()}},style:{appearance:"none",WebkitAppearance:"none",MozAppearance:"textfield"}})},getHiddenInputProps(){return t.input({type:"text",disabled:h,name:o("name"),tabIndex:-1,readOnly:f,required:m,id:D0(a),style:cv,defaultValue:p})},getEyeDropperTriggerProps(){return t.button({...St.eyeDropperTrigger.attrs,type:"button",dir:o("dir"),disabled:h,"data-disabled":G(h),"data-invalid":G(g),"data-readonly":G(f),"aria-label":"Pick a color from the screen",onClick(){b&&r({type:"EYEDROPPER.CLICK"})}})},getSwatchGroupProps(){return t.element({...St.swatchGroup.attrs,role:"group"})},getSwatchTriggerState:N,getSwatchTriggerProps(C){const x=N(C);return t.button({...St.swatchTrigger.attrs,disabled:x.disabled,dir:o("dir"),type:"button","aria-label":`select ${x.valueAsString} as the color`,"data-state":x.checked?"checked":"unchecked","data-value":x.valueAsString,"data-disabled":G(x.disabled),onClick(){x.disabled||r({type:"SWATCH_TRIGGER.CLICK",value:x.value})},style:{"--color":x.valueAsString,position:"relative"}})},getSwatchIndicatorProps(C){const x=N(C);return t.element({...St.swatchIndicator.attrs,dir:o("dir"),hidden:!x.checked})},getSwatchProps(C){const{respectAlpha:x=!0}=C,I=N(C),R=I.value.toString(x?"css":"hex");return t.element({...St.swatch.attrs,dir:o("dir"),"data-state":I.checked?"checked":"unchecked","data-value":I.valueAsString,style:{"--color":R,position:"relative",background:R}})},getFormatTriggerProps(){return t.button({...St.formatTrigger.attrs,dir:o("dir"),type:"button","aria-label":`change color format to ${AE(c)}`,onClick(C){if(C.currentTarget.disabled)return;const x=AE(c);r({type:"FORMAT.SET",format:x,src:"format-trigger"})}})},getFormatSelectProps(){return t.select({...St.formatSelect.attrs,"aria-label":"change color format",dir:o("dir"),defaultValue:o("format"),disabled:h,onChange(C){const x=One(C.currentTarget.value);r({type:"FORMAT.SET",format:x,src:"format-select"})}})}}}var Mh=["hsba","hsla","rgba"],Ene=new RegExp(`^(${Mh.join("|")})$`);function AE(e){const t=Mh.indexOf(e);return Mh[t+1]??Mh[0]}function One(e){if(Ene.test(e))return e;throw new Error(`Unsupported color format: ${e}`)}var Fg=e=>Js(e),Ine=/^[0-9a-fA-F]{3,8}$/;function Tne(e){return Ine.test(e)}function Sne(e){return e.startsWith("#")?e:Tne(e)?`#${e}`:e}var{and:Pne}=ef(),$ne={props({props:e}){return{dir:"ltr",defaultValue:Fg("#000000"),defaultFormat:"rgba",openAutoFocus:!0,...e,positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},context({prop:e,bindable:t,getContext:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual(r,o){return r.toString("css")===o?.toString("css")},hash(r){return r.toString("css")},onChange(r){const o=n(),i=r.toString(o.get("format"));e("onValueChange")?.({value:r,valueAsString:i})}})),format:t(()=>({defaultValue:e("defaultFormat"),value:e("format"),onChange(r){e("onFormatChange")?.({format:r})}})),activeId:t(()=>({defaultValue:null})),activeChannel:t(()=>({defaultValue:null})),activeOrientation:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),restoreFocus:t(()=>({defaultValue:!0})),currentPlacement:t(()=>({defaultValue:void 0}))}},computed:{rtl:({prop:e})=>e("dir")==="rtl",disabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e})=>e.get("value").toString(e.get("format")),areaValue:({context:e})=>{const t=e.get("format").startsWith("hsl")?"hsla":"hsba";return e.get("value").toFormat(t)}},effects:["trackFormControl"],watch({prop:e,context:t,action:n,track:r}){r([()=>t.hash("value")],()=>{n(["syncInputElements","dispatchChangeEvent"])}),r([()=>t.get("format")],()=>{n(["syncFormatSelectElement"])}),r([()=>e("open")],()=>{n(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setValue"]},"FORMAT.SET":{actions:["setFormat"]},"CHANNEL_INPUT.CHANGE":{actions:["setChannelColorFromInput"]},"EYEDROPPER.CLICK":{actions:["openEyeDropper"]},"SWATCH_TRIGGER.CLICK":{actions:["setValue"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{target:"focused",actions:["setActiveChannel"]}}},focused:{tags:["closed","focused"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_INPUT.BLUR":{target:"idle",actions:["setChannelColorFromInput"]},"TRIGGER.BLUR":{target:"idle"}}},open:{tags:["open"],effects:["trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"AREA.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setAreaColorFromPoint","focusAreaThumb"]},"AREA.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_SLIDER.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.FOCUS":{actions:["setActiveChannel"]},"AREA.ARROW_LEFT":{actions:["decrementAreaXChannel"]},"AREA.ARROW_RIGHT":{actions:["incrementAreaXChannel"]},"AREA.ARROW_UP":{actions:["incrementAreaYChannel"]},"AREA.ARROW_DOWN":{actions:["decrementAreaYChannel"]},"AREA.PAGE_UP":{actions:["incrementAreaXChannel"]},"AREA.PAGE_DOWN":{actions:["decrementAreaXChannel"]},"CHANNEL_SLIDER.ARROW_LEFT":{actions:["decrementChannel"]},"CHANNEL_SLIDER.ARROW_RIGHT":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.PAGE_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.PAGE_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.HOME":{actions:["setChannelToMin"]},"CHANNEL_SLIDER.END":{actions:["setChannelToMax"]},"CHANNEL_INPUT.BLUR":{actions:["setChannelColorFromInput"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"SWATCH_TRIGGER.CLICK":[{guard:Pne("isOpenControlled","closeOnSelect"),actions:["setValue","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setValue","invokeOnClose","setReturnFocus"]},{actions:["setValue"]}]}},"open:dragging":{tags:["open"],exit:["clearActiveChannel"],effects:["trackPointerMove","disableTextSelection","trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"AREA.POINTER_MOVE":{actions:["setAreaColorFromPoint","focusAreaThumb"]},"AREA.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},"CHANNEL_SLIDER.POINTER_MOVE":{actions:["setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}]}}},implementations:{guards:{closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus")},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning")?.placement);const r=zb(n);return I0(r,()=>mne(n),{...t("positioning"),defer:!0,onComplete(o){e.set("currentPlacement",o.placement)}})},trackDismissableElement({context:e,scope:t,prop:n,send:r}){return n("inline")?void 0:mR(()=>Nh(t),{type:"popover",exclude:zb(t),defer:!0,onInteractOutside(o){n("onInteractOutside")?.(o),!o.defaultPrevented&&e.set("restoreFocus",!(o.detail.focusable||o.detail.contextmenu))},onPointerDownOutside:n("onPointerDownOutside"),onFocusOutside:n("onFocusOutside"),onDismiss(){r({type:"INTERACT_OUTSIDE"})}})},trackFormControl({context:e,scope:t,send:n}){const r=RE(t);return du(r,{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){n({type:"VALUE.SET",value:e.initial("value"),src:"form.reset"})}})},trackPointerMove({context:e,scope:t,event:n,send:r}){return B$(t.getDoc(),{onPointerMove({point:o}){const i=e.get("activeId")==="area"?"AREA.POINTER_MOVE":"CHANNEL_SLIDER.POINTER_MOVE";r({type:i,point:o,format:n.format})},onPointerUp(){const o=e.get("activeId")==="area"?"AREA.POINTER_UP":"CHANNEL_SLIDER.POINTER_UP";r({type:o})}})},disableTextSelection({scope:e}){return F$({doc:e.getDoc(),target:Nh(e)})}},actions:{openEyeDropper({scope:e,context:t}){const n=e.getWin();"EyeDropper"in n&&new n.EyeDropper().open().then(({sRGBHex:r})=>{const o=t.get("value").getFormat(),i=Js(r).toFormat(o);t.set("value",i)}).catch(()=>{})},setActiveChannel({context:e,event:t}){e.set("activeId",t.id),t.channel&&e.set("activeChannel",t.channel),t.orientation&&e.set("activeOrientation",t.orientation)},clearActiveChannel({context:e}){e.set("activeChannel",null),e.set("activeId",null),e.set("activeOrientation",null)},setAreaColorFromPoint({context:e,event:t,computed:n,scope:r,prop:o}){const i=t.format?e.get("value").toFormat(t.format):n("areaValue"),{xChannel:s,yChannel:a}=t.channel||e.get("activeChannel"),l=gne(r,t.point,o("dir"));if(!l)return;const c=i.getChannelPercentValue(s,l.x),u=i.getChannelPercentValue(a,1-l.y),p=i.withChannelValue(s,c).withChannelValue(a,u);e.set("value",p)},setChannelColorFromPoint({context:e,event:t,computed:n,scope:r,prop:o}){const i=t.channel||e.get("activeId"),s=t.format?e.get("value").toFormat(t.format):n("areaValue"),a=bne(r,t.point,i,o("dir"));if(!a)return;const l=(e.get("activeOrientation")||"horizontal")==="horizontal"?a.x:a.y,c=s.getChannelPercentValue(i,l),u=s.withChannelValue(i,c);e.set("value",u)},setValue({context:e,event:t}){e.set("value",t.value)},setFormat({context:e,event:t}){e.set("format",t.format)},dispatchChangeEvent({scope:e,computed:t}){R$(RE(e),{value:t("valueAsString")})},syncInputElements({context:e,scope:t}){NE(t,e.get("value"))},invokeOnChangeEnd({context:e,prop:t,computed:n}){t("onValueChangeEnd")?.({value:e.get("value"),valueAsString:n("valueAsString")})},setChannelColorFromInput({context:e,event:t,scope:n,prop:r}){const{channel:o,isTextField:i,value:s}=t,a=e.get("value").getChannelValue("alpha");let l;if(o==="alpha"){let c=parseFloat(s);c=Number.isNaN(c)?a:c,l=e.get("value").withChannelValue("alpha",c)}else if(i)l=y$(()=>{const c=o==="hex"?Sne(s):s;return Fg(c).withChannelValue("alpha",a)},()=>e.get("value"));else{const c=e.get("value").toFormat(e.get("format")),u=Number.isNaN(s)?c.getChannelValue(o):s;l=c.withChannelValue(o,u)}NE(n,e.get("value"),l),e.set("value",l),r("onValueChangeEnd")?.({value:l,valueAsString:l.toString(e.get("format"))})},incrementChannel({context:e,event:t}){const n=e.get("value").incrementChannel(t.channel,t.step);e.set("value",n)},decrementChannel({context:e,event:t}){const n=e.get("value").decrementChannel(t.channel,t.step);e.set("value",n)},incrementAreaXChannel({context:e,event:t,computed:n}){const{xChannel:r}=t.channel,o=n("areaValue").incrementChannel(r,t.step);e.set("value",o)},decrementAreaXChannel({context:e,event:t,computed:n}){const{xChannel:r}=t.channel,o=n("areaValue").decrementChannel(r,t.step);e.set("value",o)},incrementAreaYChannel({context:e,event:t,computed:n}){const{yChannel:r}=t.channel,o=n("areaValue").incrementChannel(r,t.step);e.set("value",o)},decrementAreaYChannel({context:e,event:t,computed:n}){const{yChannel:r}=t.channel,o=n("areaValue").decrementChannel(r,t.step);e.set("value",o)},setChannelToMax({context:e,event:t}){const n=e.get("value"),r=n.getChannelRange(t.channel),o=n.withChannelValue(t.channel,r.maxValue);e.set("value",o)},setChannelToMin({context:e,event:t}){const n=e.get("value"),r=n.getChannelRange(t.channel),o=n.withChannelValue(t.channel,r.minValue);e.set("value",o)},focusAreaThumb({scope:e}){Ht(()=>{dne(e)?.focus({preventScroll:!0})})},focusChannelThumb({event:e,scope:t}){Ht(()=>{pne(t,e.channel)?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e("openAutoFocus")&&Ht(()=>{M$({root:Nh(t),getInitialEl:e("initialFocusEl")})?.focus({preventScroll:!0})})},setReturnFocus({scope:e}){Ht(()=>{zb(e)?.focus({preventScroll:!0})})},syncFormatSelectElement({context:e,scope:t}){Rne(t,e.get("format"))},invokeOnOpen({prop:e}){e("inline")||e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("inline")||e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};function NE(e,t,n){const r=yne(e);Ht(()=>{r.forEach(o=>{const i=o.dataset.channel;Qp(o,F0(n||t,i))})})}function Rne(e,t){const n=fne(e);n&&Ht(()=>Qp(n,t))}On()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);On()(["xChannel","yChannel"]);On()(["channel","orientation"]);On()(["value","disabled"]);On()(["value","respectAlpha"]);On()(["size"]);const[Ane,JR]=Ut("ColorPickerAreaPropsContext"),[ZR,Ct]=Ut("ColorPickerContext"),Nne=P({__name:"color-picker-area-background",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=JR();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getAreaBackgroundProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Mne=P({__name:"color-picker-area-thumb",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=JR();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getAreaThumbProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Dne=P({__name:"color-picker-area",props:{xChannel:{},yChannel:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return Ane(t),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getAreaProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Lne=P({__name:"color-picker-channel-input",props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return ue(),(r,o)=>(y(),$(d(ce).input,F(d(n).getChannelInputProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[Vne,vv]=Ut("ColorPickerChannelPropsContext"),Fne=P({__name:"color-picker-channel-slider-label",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=vv();return ue(),(r,o)=>(y(),$(d(ce).label,F(d(t).getChannelSliderLabelProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[Bne,pw]=Ut("ColorPickerFormatProps"),Hne=P({__name:"color-picker-channel-slider-thumb",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=pw(),r=vv(),o=A(()=>({...r,...n}));return ue(),(i,s)=>(y(),$(d(ce).div,F(d(t).getChannelSliderThumbProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),zne=P({__name:"color-picker-channel-slider-track",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=pw(),r=vv(),o=A(()=>({...r,...n}));return ue(),(i,s)=>(y(),$(d(ce).div,F(d(t).getChannelSliderTrackProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Une=P({__name:"color-picker-channel-slider-value-text",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=vv(),r=xo(),o=wl(xl);return ue(),(i,s)=>(y(),$(d(ce).span,F(d(t).getChannelSliderValueTextProps(d(n)),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default",{},()=>[re(j(r.default?.()||d(t).getChannelValueText(d(n).channel,d(o).locale)),1)])]),_:3},16,["as-child"]))}}),jne=P({__name:"color-picker-channel-slider",props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(),r=pw(),o=A(()=>({...t,...r}));return Vne(t),ue(),(i,s)=>(y(),$(d(ce).div,F(d(n).getChannelSliderProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Gne=P({__name:"color-picker-content",props:{immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Ct(),n=eR(),r=A(()=>Xx(t.value.getContentProps(),n.value.presenceProps));return ue(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(ce).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Wne=P({__name:"color-picker-context",setup(e){const t=Ct();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),qne=P({__name:"color-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Kne=P({__name:"color-picker-eye-dropper-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getEyeDropperTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Yne=P({__name:"color-picker-format-select",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).select,Be(Fe(d(t).getFormatSelectProps())),{default:O(()=>[(y(),V(ge,null,Ie(["rgba","hsla","hsba"],o=>S(d(ce).option,{key:o,value:o},{default:O(()=>[re(j(o),1)]),_:2},1032,["value"])),64))]),_:1},16))}}),Xne=P({__name:"color-picker-format-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getFormatTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Jne=P({__name:"color-picker-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=Ln();return ue(),(r,o)=>(y(),$(d(ce).input,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getHiddenInputProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["aria-describedby","as-child"]))}}),Zne=P({__name:"color-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Qne=P({__name:"color-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=nR(),r=rR(A(()=>({...n.value,present:t.value.open})));return Q$(r),ue(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(ce).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),ere=P({__name:"color-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return ZR(n),dv(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ue(),(r,o)=>(y(),$(d(ce).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),tre=(e={},t)=>{const n=nt(),r=vl(bl),o=wl(xl),i=Ln(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,input:i?.value.ids.control},disabled:i?.value.disabled,invalid:i?.value.invalid,readOnly:i?.value.readOnly,required:i?.value.required,dir:o.value.dir,value:l.modelValue,getRootNode:r?.value.getRootNode,...fu(l),onOpenChange(c){t?.("openChange",c),t?.("update:open",c.open),l.onOpenChange?.(c)},onValueChange(c){t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onFocusOutside:c=>{t?.("focusOutside",c),l.onFocusOutside?.(c)},onFormatChange:c=>{t?.("formatChange",c),t?.("update:format",c.format),l.onFormatChange?.(c)},onInteractOutside:c=>{t?.("interactOutside",c),l.onInteractOutside?.(c)},onPointerDownOutside:c=>{t?.("pointerDownOutside",c),l.onPointerDownOutside?.(c)},onValueChangeEnd:c=>{t?.("valueChangeEnd",c),l.onValueChangeEnd?.(c)}}}),a=ml($ne,s);return A(()=>Cne(a,pu))},nre=P({__name:"color-picker-root",props:Ze({closeOnSelect:{type:Boolean},defaultFormat:{},defaultOpen:{type:Boolean},defaultValue:{},disabled:{type:Boolean},format:{},id:{},ids:{},initialFocusEl:{type:Function},invalid:{type:Boolean},modelValue:{},name:{},open:{type:Boolean},openAutoFocus:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,invalid:void 0,open:void 0,openAutoFocus:void 0,readOnly:void 0,required:void 0,inline:void 0}),emits:["focusOutside","formatChange","interactOutside","openChange","pointerDownOutside","valueChange","valueChangeEnd","update:modelValue","update:open","update:format"],setup(e,{emit:t}){const n=e,r=tre(n,t);return ZR(r),dv(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ue(),(o,i)=>(y(),$(d(ce).div,F(d(r).getRootProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),QR=UR.extendWith("view"),rre=P({__name:"color-picker-swatch-group",props:{asChild:{type:Boolean}},setup(e){return ue(),(t,n)=>(y(),$(d(ce).div,F(d(QR).build().swatchGroup.attrs,{"as-child":t.asChild}),{default:O(()=>[L(t.$slots,"default")]),_:3},16,["as-child"]))}}),[eA,ore]=Ut("ColorPickerSwatchPropsContext"),ire=P({__name:"color-picker-swatch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Ct(),n=ore();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(t).getSwatchIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),sre=P({__name:"color-picker-swatch-trigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return ue(),(r,o)=>(y(),$(d(ce).button,F(d(n).getSwatchTriggerProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),are=P({__name:"color-picker-swatch",props:{value:{},respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return eA(t),ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getSwatchProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),lre=P({__name:"color-picker-transparency-grid",props:{size:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return ue(),(r,o)=>(y(),$(d(ce).div,F(d(n).getTransparencyGridProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),cre=P({__name:"color-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ct();return ue(),(n,r)=>(y(),$(d(ce).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ure=P({__name:"color-picker-value-swatch",props:{respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(),r=A(()=>({value:n.value.value,respectAlpha:t.respectAlpha}));return eA(r.value),ue(),(o,i)=>(y(),$(d(ce).div,F(d(n).getSwatchProps(r.value),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),dre=P({__name:"color-picker-value-text",props:{format:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct(),r=xo();ue();const o=A(()=>t.format?n.value.value.toString(t.format):n.value.valueAsString);return(i,s)=>(y(),$(d(ce).span,F(d(n).getValueTextProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default",{},()=>[re(j(r.default?.()||o.value),1)])]),_:3},16,["as-child"]))}}),pre=P({__name:"color-picker-view",props:{format:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ct();return Bne(t),ue(),(r,o)=>d(n).format===r.format?(y(),$(d(ce).div,F({key:0},d(QR).build().view.attrs,{"data-format":r.format,"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["data-format","as-child"])):Z("",!0)}}),ht=Object.freeze(Object.defineProperty({__proto__:null,Area:Dne,AreaBackground:Nne,AreaThumb:Mne,ChannelInput:Lne,ChannelSlider:jne,ChannelSliderLabel:Fne,ChannelSliderThumb:Hne,ChannelSliderTrack:zne,ChannelSliderValueText:Une,Content:Gne,Context:Wne,Control:qne,EyeDropperTrigger:Kne,FormatSelect:Yne,FormatTrigger:Xne,HiddenInput:Jne,Label:Zne,Positioner:Qne,Root:nre,RootProvider:ere,Swatch:are,SwatchGroup:rre,SwatchIndicator:ire,SwatchTrigger:sre,TransparencyGrid:lre,Trigger:cre,ValueSwatch:ure,ValueText:dre,View:pre},Symbol.toStringTag,{value:"Module"})),fre={class:"flex gap-2"},hre={class:"flex flex-col gap-2 w-full"},gre={key:0,class:"mt-3"},ME=8,mre=P({__name:"Color",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Q([]),n=rt(e,"modelValue",{get:o=>{try{return Fg(o||"#000000")}catch{return Fg("#000000")}},set:o=>o.toString("hexa")}),r=o=>{const i=t.value.findIndex(s=>s.toHexInt()===o.value.toHexInt());i!==-1&&t.value.splice(i,1),t.value.unshift(o.value),t.value.length>ME&&(t.value=t.value.slice(0,ME))};return(o,i)=>{const s=zte;return y(),$(d(ht).Root,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a),format:"rgba",class:"flex flex-col gap-1.5",onValueChange:r},{default:O(()=>[S(d(ht).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(o.field.label),1)]),_:1}),S(d(ht).Control,{class:"flex gap-2"},{default:O(()=>[S(d(ht).Trigger,{class:"appearance-none rounded cursor-pointer inline-flex items-center justify-center outline-none h-10 min-w-10 gap-2 border border-gray-300"},{default:O(()=>[S(d(ht).TransparencyGrid,{class:"rounded"}),S(d(ht).ValueSwatch,{class:"h-7 w-7 rounded shadow"})]),_:1}),S(d(ht).ChannelInput,{channel:"hex",class:"appearance-none rounded bg-none outline-0 relative w-full border px-3 h-10 min-w-10 focus:ring focus:ring-accent"})]),_:1}),S(d(ht).Positioner,{class:"w-60 !z-20 pl-1"},{default:O(()=>[S(d(ht).Content,{class:"flex flex-col p-4 gap-3 rounded bg-white border shadow-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out data-[state=closed]:hidden"},{default:O(()=>[S(d(ht).Area,{class:"rounded overflow-hidden h-36 touch-none forced-color-adjust-none"},{default:O(()=>[S(d(ht).AreaBackground,{class:"h-full rounded"}),S(d(ht).AreaThumb,{class:"rounded-full w-2.5 h-2.5 outline-none border-2 border-white"})]),_:1}),D("div",fre,[S(d(ht).EyeDropperTrigger,{class:"appearance-none rounded cursor-pointer inline-flex outline-none relative select-none items-center justify-center border h-8 min-w-8"},{default:O(()=>[S(s,{class:"w-4 h-4"})]),_:1}),D("div",hre,[S(d(ht).ChannelSlider,{channel:"hue",class:"rounded w-full"},{default:O(()=>[S(d(ht).ChannelSliderTrack,{class:"h-2.5 rounded"}),S(d(ht).ChannelSliderThumb,{class:"h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2"})]),_:1}),S(d(ht).ChannelSlider,{channel:"alpha",class:"rounded w-full"},{default:O(()=>[S(d(ht).TransparencyGrid),S(d(ht).ChannelSliderTrack,{class:"h-2.5 rounded"}),S(d(ht).ChannelSliderThumb,{class:"h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2"})]),_:1})])]),S(d(ht).View,{format:"rgba",class:"flex gap-3"},{default:O(()=>[S(d(ht).ChannelInput,{channel:"hex",class:"flex-1 border px-3 h-8 w-0 rounded outline-0 focus:ring focus:ring-accent"}),S(d(ht).ChannelInput,{channel:"alpha",class:"flex-none border px-3 h-8 rounded outline-0 focus:ring-2 focus:ring-accent"})]),_:1}),t.value.length>0?(y(),V("div",gre,[i[1]||(i[1]=D("div",{class:"text-xs font-medium text-gray-600 mb-2"},"Recent Colors",-1)),S(d(ht).SwatchGroup,{class:"grid grid-cols-8 gap-1"},{default:O(()=>[(y(!0),V(ge,null,Ie(t.value,a=>(y(),$(d(ht).SwatchTrigger,{key:a.toHexInt(),value:a,class:"w-6 h-6 rounded border border-gray-300 cursor-pointer hover:scale-110 transition-transform"},{default:O(()=>[S(d(ht).Swatch,{value:a,class:"w-full h-full rounded"},null,8,["value"])]),_:2},1032,["value"]))),128))]),_:1})])):Z("",!0)]),_:1})]),_:1}),S(d(ht).HiddenInput)]),_:1},8,["modelValue"])}}}),vre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bre(e,t){return y(),V("svg",vre,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m4.5 15.75l7.5-7.5l7.5 7.5"},null,-1)])])}const yre=fe({name:"heroicons-chevron-up",render:bre}),xre={class:"flex flex-col border-l border-gray-300"},wre=P({__name:"Number",props:at({field:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue"),n=A({get:()=>t.value?.toString()??"",set:r=>{const o=parseFloat(r);t.value=isNaN(o)?void 0:o}});return(r,o)=>{const i=yre,s=X$;return y(),$(d(ki).Root,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=a=>n.value=a),min:r.field.min,max:r.field.max,step:r.field.step},{default:O(()=>[S(d(ki).Label,{class:"block text-sm font-medium text-gray-700 mb-1"},{default:O(()=>[re(j(r.field.label),1)]),_:1}),S(d(ki).Control,{class:"flex items-center h-9 border border-gray-300 rounded-md overflow-hidden focus-within:ring-2 focus-within:ring-accent focus-within:border-transparent"},{default:O(()=>[S(d(ki).Input,{class:"flex-1 px-3 focus:outline-none",placeholder:r.field.placeholder},null,8,["placeholder"]),D("div",xre,[S(d(ki).IncrementTrigger,{class:"px-2 py-1 hover:bg-gray-100 cursor-pointer"},{default:O(()=>[S(i,{class:"w-3 h-3 text-gray-600"})]),_:1}),S(d(ki).DecrementTrigger,{class:"px-2 py-1 hover:bg-gray-100 cursor-pointer border-t border-gray-300"},{default:O(()=>[S(s,{class:"w-3 h-3 text-gray-600"})]),_:1})])]),_:1})]),_:1},8,["modelValue","min","max","step"])}}}),_re=({editor:e})=>{const t={text:LX,textarea:VX,boolean:aJ,select:NQ,radio:lee,range:Fte,color:mre,number:wre};for(const[n,r]of Object.entries(t))e.ui.registerPropertyField({type:n,render:r})};let Gt=null;function kre(e={}){return Gt=Tr({channels:e.channels||[],channel:"default",locale:"en",theme:e.theme||null,templates:e.templates||[],pageData:null,images:e.images||[],categories:e.categories||new Map,products:e.products||new Map,cmsPages:e.cmsPages||new Map,haveEdits:e.haveEdits||!1}),Gt}function Dt(){if(!Gt)throw new Error("State not initialized. Make sure to call createState first.");function e(s){const a=Gt.categories.get(s);if(a&&a.translations){const l=a.translations.find(c=>c.locale===Gt.locale);if(l)return{...a,name:l.name,slug:l.slug}}return a}function t(){return Array.from(Gt.categories.values()).map(s=>{if(s.translations){const a=s.translations.find(l=>l.locale===Gt.locale);if(a)return{...s,name:a.name,slug:a.slug}}return s})}function n(s){return Gt.products.get(s)}function r(){return Array.from(Gt.products.values())}function o(s){const a=Gt.cmsPages.get(s);if(a&&a.translations){const l=a.translations.find(c=>c.locale===Gt.locale);if(l)return{...a,url_key:l.url_key,page_title:l.page_title}}return a}function i(){return Array.from(Gt.cmsPages.values()).map(s=>{if(s.translations){const a=s.translations.find(l=>l.locale===Gt.locale);if(a)return{...s,url_key:a.url_key,page_title:a.page_title}}return s})}return{state:Gt,...j1(Gt),currentTemplate:A(()=>{const s=Gt.pageData?.template;return Gt.templates.find(a=>a.template===s)||null}),getCategory:e,getCategories:t,getProduct:n,getProducts:r,getCmsPage:o,getCmsPages:i}}function Cre(e){e.categories&&e.categories.forEach(t=>{Gt.categories.set(t.id,t)}),e.products&&e.products.forEach(t=>{Gt.products.set(t.id,t)}),e.cms_pages&&e.cms_pages.forEach(t=>{Gt.cmsPages.set(t.id,t)})}const Ere={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ore(e,t){return y(),V("svg",Ere,[...t[0]||(t[0]=[D("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[D("path",{d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"}),D("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"})],-1)])])}const Ire=fe({name:"heroicons-cog-6-tooth",render:Ore}),Tre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Sre(e,t){return y(),V("svg",Tre,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m2.25 15.75l5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5m10.5-11.25h.008v.008h-.008zm.375 0a.375.375 0 1 1-.75 0a.375.375 0 0 1 .75 0"},null,-1)])])}const Pre=fe({name:"heroicons-photo",render:Sre});function Et(){const e=window.editorConfig.messages||{};return{t:n=>e[n]||n}}const $re={class:"pl-2"},Rre={class:"font-medium text-base"},Are={class:"text-gray-700 text-xs"},Nre={key:0,class:"text-gray-500"},Mre=P({__name:"HeaderTitle",setup(e){const{theme:t}=Dt(),{t:n}=Et();return(r,o)=>(y(),V("div",$re,[D("h1",Rre,j(d(n)("title")),1),D("h2",Are,[re(j(d(t)?.name)+" ",1),d(t)?.version?(y(),V("span",Nre,"(v"+j(d(t).version)+")",1)):Z("",!0)])]))}}),Dre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Lre(e,t){return y(),V("svg",Dre,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m19.5 8.25l-7.5 7.5l-7.5-7.5"},null,-1)])])}const mu=fe({name:"heroicons-chevron-down",render:Lre}),Vre={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fre(e,t){return y(),V("svg",Vre,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12.75 3.03v.568c0 .334.148.65.405.864l1.068.89c.442.369.535 1.01.216 1.49l-.51.766a2.25 2.25 0 0 1-1.161.886l-.143.048a1.107 1.107 0 0 0-.57 1.664a1.108 1.108 0 0 1-.427 1.605L9 13.125l.423 1.059a.956.956 0 0 1-1.652.928l-.679-.906a1.125 1.125 0 0 0-1.906.172L4.5 15.75l-.612.153M12.75 3.031a9 9 0 0 0-8.862 12.872M12.75 3.031a9 9 0 0 1 6.69 14.036m0 0l-.177-.529A2.25 2.25 0 0 0 17.128 15H16.5l-.324-.324a1.453 1.453 0 0 0-2.328.377l-.036.073a1.6 1.6 0 0 1-.982.816l-.99.282c-.55.157-.894.702-.8 1.267l.073.438c.08.474.49.821.97.821c.846 0 1.598.542 1.865 1.345l.215.643m5.276-3.67a9 9 0 0 1-5.276 3.67m0 0a9 9 0 0 1-10.275-4.835M15.75 9c0 .896-.393 1.7-1.016 2.25"},null,-1)])])}const Bre=fe({name:"heroicons-globe-asia-australia",render:Fre});function Hre(e){return e==null?[]:Array.isArray(e)?e:[e]}var fw=e=>e[0],hw=e=>e[e.length-1],zre=(e,...t)=>e.concat(t),Ure=(e,...t)=>e.filter(n=>!t.includes(n));function tA(e,t,n={}){const{step:r=1,loop:o=!0}=n,i=t+r,s=e.length,a=s-1;return t===-1?r>0?0:a:i<0?o?a:0:i>=s?o?0:t>s?s:t:i}function jre(e,t,n={}){return e[tA(e,t,n)]}function Gre(e,t,n={}){const{step:r=1,loop:o=!0}=n;return tA(e,t,{step:-r,loop:o})}function Wre(e,t,n={}){return e[Gre(e,t,n)]}var DE=e=>e?.constructor.name==="Array",qre=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(DE(e)&&DE(t))return qre(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;oe!=null&&typeof e=="object",Dh=e=>typeof e=="string",fc=e=>typeof e=="function",Yre=e=>e==null,Lh=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Xre=e=>Object.prototype.toString.call(e),nA=Function.prototype.toString,Jre=nA.call(Object),Zre=e=>{if(!Kre(e)||Xre(e)!="[object Object]"||toe(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Lh(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&nA.call(n)==Jre},Qre=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,eoe=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,toe=e=>Qre(e)||eoe(e),LE=e=>e,noe=()=>{},Bg=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},rA=(e,t)=>{try{return e()}catch(n){return n instanceof Error&&Error.captureStackTrace?.(n,rA),t?.()}},{floor:oA,abs:Hg,round:bv,min:roe,max:ooe,pow:ioe,sign:soe}=Math,B0=e=>Number.isNaN(e),ca=e=>B0(e)?0:e,iA=(e,t)=>(e%t+t)%t,aoe=(e,t)=>(e%t+t)%t,loe=(e,t,n)=>e===0?n:t[e-1],coe=(e,t,n)=>e===t.length-1?n:t[e+1],uoe=(e,t)=>ca(e)>=t,doe=(e,t)=>ca(e)<=t,sA=(e,t,n)=>{const r=ca(e),o=t==null||r>=t,i=n==null||r<=n;return o&&i},poe=(e,t,n)=>bv((ca(e)-t)/n)*n+t,pn=(e,t,n)=>roe(ooe(ca(e),t),n),yv=(e,t,n)=>(ca(e)-t)/(n-t),gw=(e,t,n,r)=>pn(poe(e*(n-t)+t,t,r),t,n),VE=(e,t)=>{let n=e,r=t.toString(),o=r.indexOf("."),i=o>=0?r.length-o:0;if(i>0){let s=ioe(10,i);n=bv(n*s)/s}return n},Ld=(e,t)=>typeof t=="number"?oA(e*t+.5)/t:bv(e),gp=(e,t,n,r)=>{const o=t!=null?Number(t):0,i=Number(n),s=(e-o)%r;let a=Hg(s)*2>=r?e+soe(s)*(r-Hg(s)):e-s;if(a=VE(a,r),!B0(o)&&ai){const l=oA((i-o)/r),c=o+l*r;a=l<=0||ce[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)];function aA(e,t){const n=loe(e,t.values,t.min),r=coe(e,t.values,t.max);let o=t.values.slice();return function(s){let a=gp(s,n,r,t.step);return o=ud(o,e,s),o[e]=a,o}}function foe(e,t){const n=t.values[e]+t.step;return aA(e,t)(n)}function hoe(e,t){const n=t.values[e]-t.step;return aA(e,t)(n)}var goe=(e,t)=>{let n=e.findIndex(i=>t-i<0);if(n===0)return n;if(n===-1)return e.length-1;let r=e[n-1],o=e[n];return Hg(r-t)e.map((o,i)=>({min:i===0?t:e[i-1]+r,max:i===e.length-1?n:e[i+1]-r,value:o})),H0=(e,t)=>{const[n,r]=e,[o,i]=t;return s=>n===r||o===i?o:o+(i-o)/(r-n)*(s-n)},_t=(e,t=0,n=10)=>{const r=Math.pow(n,t);return bv(e*r)/r},FE=e=>{if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n},cA=(e,t,n)=>{let r=t==="+"?e+n:e-n;if(e%1!==0||n%1!==0){const o=10**Math.max(FE(e),FE(n));e=Math.round(e*o),n=Math.round(n*o),r=t==="+"?e+n:e-n,r/=o}return r},moe=(e,t)=>cA(ca(e),"+",t),voe=(e,t)=>cA(ca(e),"-",t),BE=e=>e!=null?`${e}px`:void 0;function mw(e){if(!Zre(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=mw(o))}return n}function boe(e,t){const n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=o)}return n}function zg(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function yoe(e,t){if(e==null)throw new Error(t())}var HE=e=>Math.max(0,Math.min(1,e)),xoe=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]),uA=()=>{},xv=e=>typeof e=="object"&&e!==null,woe=2147483647,Y=e=>e?"":void 0,mp=e=>e?"true":void 0,_oe=1,koe=9,Coe=11,En=e=>xv(e)&&e.nodeType===_oe&&typeof e.nodeName=="string",vw=e=>xv(e)&&e.nodeType===koe,Eoe=e=>xv(e)&&e===e.window,dA=e=>En(e)?e.localName||"":"#document";function Ooe(e){return["html","body","#document"].includes(dA(e))}var Ioe=e=>xv(e)&&e.nodeType!==void 0,vp=e=>Ioe(e)&&e.nodeType===Coe&&"host"in e,Toe=e=>En(e)&&e.localName==="input",Soe=e=>!!e?.matches("a[href]"),Poe=e=>En(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ba(e){if(!e)return!1;const t=e.getRootNode();return Tc(t)===e}var $oe=/(textarea|select)/;function bw(e){if(e==null||!En(e))return!1;try{return Toe(e)&&e.selectionStart!=null||$oe.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function Ds(e,t){if(!e||!t||!En(e)||!En(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&vp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ci(e){return vw(e)?e:Eoe(e)?e.document:e?.ownerDocument??document}function Roe(e){return ci(e).documentElement}function pr(e){return vp(e)?pr(e.host):vw(e)?e.defaultView??window:En(e)?e.ownerDocument?.defaultView??window:window}function Tc(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function Aoe(e){if(dA(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vp(e)&&e.host||Roe(e);return vp(t)?t.host:t}var Ub=new WeakMap;function jc(e){return Ub.has(e)||Ub.set(e,pr(e).getComputedStyle(e)),Ub.get(e)}var wv=()=>typeof document<"u";function Noe(){return navigator.userAgentData?.platform??navigator.platform}function Moe(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}var yw=e=>wv()&&e.test(Noe()),Doe=e=>wv()&&e.test(Moe()),Loe=e=>wv()&&e.test(navigator.vendor),zE=()=>wv()&&!!navigator.maxTouchPoints,Voe=()=>yw(/^iPhone/i),Foe=()=>yw(/^iPad/i)||kv()&&navigator.maxTouchPoints>1,_v=()=>Voe()||Foe(),Boe=()=>kv()||_v(),kv=()=>yw(/^Mac/i),Cv=()=>Boe()&&Loe(/apple/i),Hoe=()=>Doe(/Firefox/i);function zoe(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Yn(e){return zoe(e)?.[0]??e.target}function UE(e){const t=e.currentTarget;if(!t||!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const r=e.button===1,o=joe(e);return r||o}function jE(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}function Uoe(e){return Koe(e).isComposing||e.keyCode===229}function joe(e){return kv()?e.metaKey:e.ctrlKey}function Goe(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ls=e=>e.button===0,pA=e=>e.button===2||kv()&&e.ctrlKey&&e.button===0,Gc=e=>e.ctrlKey||e.altKey||e.metaKey,Woe=e=>"touches"in e&&e.touches.length>0,qoe={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},GE={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Wc(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=qoe[o]??o,n==="rtl"&&r==="horizontal"&&o in GE&&(o=GE[o]),o}function Koe(e){return e.nativeEvent??e}var Yoe=new Set(["PageUp","PageDown"]),Xoe=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function Ug(e){return e.ctrlKey||e.metaKey?.1:Yoe.has(e.key)||e.shiftKey&&Xoe.has(e.key)?10:1}function jo(e,t="client"){const n=Woe(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Ft=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function Joe(e,t){const{type:n="HTMLInputElement",property:r="value"}=t,o=pr(e)[n].prototype;return Object.getOwnPropertyDescriptor(o,r)??{}}function Zoe(e){if(e.localName==="input")return"HTMLInputElement";if(e.localName==="textarea")return"HTMLTextAreaElement";if(e.localName==="select")return"HTMLSelectElement"}function rf(e,t,n="value"){if(!e)return;const r=Zoe(e);r&&Joe(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function fA(e,t){const{value:n,bubbles:r=!0}=t;if(!e)return;const o=pr(e);e instanceof o.HTMLInputElement&&(rf(e,`${n}`),e.dispatchEvent(new o.Event("input",{bubbles:r})))}function Qoe(e){return eie(e)?e.form:e.closest("form")}function eie(e){return e.matches("textarea, input, select, button")}function tie(e,t){if(!e)return;const n=Qoe(e),r=o=>{o.defaultPrevented||t()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}function nie(e,t){const n=e?.closest("fieldset");if(!n)return;t(n.disabled);const r=pr(n),o=new r.MutationObserver(()=>t(n.disabled));return o.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>o.disconnect()}function xw(e,t){if(!e)return;const{onFieldsetDisabledChange:n,onFormReset:r}=t,o=[tie(e,r),nie(e,n)];return()=>o.forEach(i=>i?.())}var hA=e=>En(e)&&e.tagName==="IFRAME",rie=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),oie=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,ww="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",gA=(e,t=!1)=>{if(!e)return[];const n=Array.from(e.querySelectorAll(ww));(t==!0||t=="if-empty"&&n.length===0)&&En(e)&&Vs(e)&&n.unshift(e);const o=n.filter(Vs);return o.forEach((i,s)=>{if(hA(i)&&i.contentDocument){const a=i.contentDocument.body;o.splice(s,1,...gA(a))}}),o};function Vs(e){return!e||e.closest("[inert]")?!1:e.matches(ww)&&Poe(e)}function of(e,t){if(!e)return[];const n=Array.from(e.querySelectorAll(ww)),r=n.filter(ks);return t&&ks(e)&&r.unshift(e),r.forEach((o,i)=>{if(hA(o)&&o.contentDocument){const s=o.contentDocument.body,a=of(s);r.splice(i,1,...a)}}),!r.length&&t?n:r}function ks(e){return e!=null&&e.tabIndex>0?!0:Vs(e)&&!oie(e)}function mA(e,t){const n=of(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function iie(e,t){const n=of(e),r=e?.ownerDocument||document,o=t??Tc(r);if(!o)return null;const i=n.indexOf(o);return n[i+1]||null}function ju(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||bw(e))&&!rie(e)?0:e.tabIndex}function jg(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof n=="function"?n():n),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){const s=of(t);i=r?s.filter(r)[0]:s[0]}return i||t||void 0}function sie(e){const t=e.currentTarget;if(!t)return!1;const[n,r]=mA(t);return!(Ba(n)&&e.shiftKey||Ba(r)&&!e.shiftKey||!n&&!r)}function _w(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function tt(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}function aie(e,t,n){const r=tt(()=>{e.removeEventListener(t,o,!0),n()}),o=()=>{r(),n()};return e.addEventListener(t,o,{once:!0,capture:!0}),r}function lie(e,t){if(!e)return;const{attributes:n,callback:r}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(s=>{for(const a of s)a.type==="attributes"&&a.attributeName&&n.includes(a.attributeName)&&r(a)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function vA(e,t){const{defer:n}=t,r=n?tt:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(lie(i,t))})),()=>{o.forEach(i=>i?.())}}function cie(e){const t=()=>{const n=pr(e);e.dispatchEvent(new n.MouseEvent("click"))};Hoe()?aie(e,"keyup",t):queueMicrotask(t)}function z0(e){const t=Aoe(e);return Ooe(t)?ci(t).body:En(t)&&bA(t)?t:z0(t)}var uie=/auto|scroll|overlay|hidden|clip/,die=new Set(["inline","contents"]);function bA(e){const t=pr(e),{overflow:n,overflowX:r,overflowY:o,display:i}=t.getComputedStyle(e);return uie.test(n+o+r)&&!die.has(i)}function pie(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function fie(e,t){const{rootEl:n,...r}=t||{};!e||!n||!bA(n)||!pie(n)||e.scrollIntoView(r)}function kw(e,t){const{left:n,top:r,width:o,height:i}=t.getBoundingClientRect(),s={x:e.x-n,y:e.y-r},a={x:HE(s.x/o),y:HE(s.y/i)};function l(c={}){const{dir:u="ltr",orientation:p="horizontal",inverted:h}=c,f=typeof h=="object"?h.x:h,g=typeof h=="object"?h.y:h;return p==="horizontal"?u==="rtl"||f?1-a.x:a.x:g?1-a.y:a.y}return{offset:s,percent:a,getPercentValue:l}}function hie(e,t){const n=e.body,r="pointerLockElement"in e||"mozPointerLockElement"in e,o=()=>!!e.pointerLockElement;function i(){}function s(l){o(),console.error("PointerLock error occurred:",l),e.exitPointerLock()}if(!r)return;try{n.requestPointerLock()}catch{}const a=[Ft(e,"pointerlockchange",i,!1),Ft(e,"pointerlockerror",s,!1)];return()=>{a.forEach(l=>l()),e.exitPointerLock()}}var hc="default",U0="",Vh=new WeakMap;function gie(e={}){const{target:t,doc:n}=e,r=n??document,o=r.documentElement;return _v()?(hc==="default"&&(U0=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),hc="disabled"):t&&(Vh.set(t,t.style.userSelect),t.style.userSelect="none"),()=>mie({target:t,doc:r})}function mie(e={}){const{target:t,doc:n}=e,o=(n??document).documentElement;if(_v()){if(hc!=="disabled")return;hc="restoring",setTimeout(()=>{_w(()=>{hc==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=U0||""),U0="",hc="default")})},300)}else if(t&&Vh.has(t)){const i=Vh.get(t);t.style.userSelect==="none"&&(t.style.userSelect=i??""),t.getAttribute("style")===""&&t.removeAttribute("style"),Vh.delete(t)}}function yA(e={}){const{defer:t,target:n,...r}=e,o=t?tt:s=>s(),i=[];return i.push(o(()=>{const s=typeof n=="function"?n():n;i.push(gie({...r,target:s}))})),()=>{i.forEach(s=>s?.())}}function xA(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=a=>{const l=jo(a),c=Math.sqrt(l.x**2+l.y**2),u=a.pointerType==="touch"?10:5;if(!(c{const l=jo(a);r({point:l,event:a})},s=[Ft(e,"pointermove",o,!1),Ft(e,"pointerup",i,!1),Ft(e,"pointercancel",i,!1),Ft(e,"contextmenu",i,!1),yA({doc:e})];return()=>{s.forEach(a=>a())}}function vie(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o}=t,i=e?.ownerDocument||document,s=i.body;function a(l){if(l.key!=="Tab")return;let c=null;const[u,p]=mA(e,!0),h=iie(s,n),f=!u&&!p;l.shiftKey&&Ba(h)?(o?.(),c=p):l.shiftKey&&(Ba(u)||f)?c=n:!l.shiftKey&&Ba(n)?(o?.(),c=u):!l.shiftKey&&(Ba(p)||f)&&(c=h),c&&(l.preventDefault(),typeof r=="function"?r(c):c.focus())}return Ft(i,"keydown",a,!0)}function bie(e,t){const{defer:n,triggerElement:r,...o}=t,i=n?tt:a=>a(),s=[];return s.push(i(()=>{const a=typeof e=="function"?e():e,l=typeof r=="function"?r():r;s.push(vie(a,{triggerElement:l,...o}))})),()=>{s.forEach(a=>a?.())}}function bp(e,t){return Array.from(e?.querySelectorAll(t)??[])}function yie(e,t){return e?.querySelector(t)??null}var Cw=e=>e.id;function xie(e,t,n=Cw){return e.find(r=>n(r)===t)}function Ew(e,t,n=Cw){const r=xie(e,t,n);return r?e.indexOf(r):-1}function wie(e,t,n=!0){let r=Ew(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function _ie(e,t,n=!0){let r=Ew(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function kie(e,t){const{onEntry:n,measure:r,box:o="border-box"}=t,i=(Array.isArray(e)?e:[e]).filter(En),s=pr(i[0]),a=c=>{const u=i.map(p=>r(p));n({rects:u,entries:c})};a([]);const l=new s.ResizeObserver(a);return i.forEach(c=>l.observe(c,{box:o})),()=>l.disconnect()}var Cie=e=>e.split("").map(t=>{const n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),Eie=e=>Cie(e.dataset?.valuetext??e.textContent??""),Oie=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase());function Iie(e,t,n,r=Cw){const o=n?Ew(e,n,r):-1;let i=n?xoe(e,o):e;return t.length===1&&(i=i.filter(a=>r(a)!==n)),i.find(a=>Oie(Eie(a),t))}function yp(e,t){if(!e)return uA;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function Tie(e,t,n){if(!e)return uA;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function Sie(e,t){const{state:n,activeId:r,key:o,timeout:i=350,itemToId:s}=t,a=n.keysSoFar+o,c=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a;let u=e.slice();const p=Iie(u,c,r,s);function h(){clearTimeout(n.timer),n.timer=-1}function f(g){n.keysSoFar=g,h(),g!==""&&(n.timer=+setTimeout(()=>{f(""),h()},i))}return f(a),p}var wA=Object.assign(Sie,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:Pie});function Pie(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var $ie={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"};function Rie(e,t,n){const{signal:r}=t;return[new Promise((s,a)=>{const l=setTimeout(()=>{a(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(l),a(new Error("Promise aborted"))}),e.then(c=>{r.aborted||(clearTimeout(l),s(c))}).catch(c=>{r.aborted||(clearTimeout(l),a(c))})}),()=>t.abort()]}function Aie(e,t){const{timeout:n,rootNode:r}=t,o=pr(r),i=ci(r),s=new o.AbortController;return Rie(new Promise(a=>{const l=e();if(l){a(l);return}const c=new o.MutationObserver(()=>{const u=e();u&&u.isConnected&&(c.disconnect(),a(u))});c.observe(i.body,{childList:!0,subtree:!0})}),s,n)}var Nie=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),Mie=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,WE=e=>{const t={};let n;for(;n=Mie.exec(e);)t[n[1]]=n[2];return t},Die=(e,t)=>{if(Dh(e)){if(Dh(t))return`${e};${t}`;e=WE(e)}else Dh(t)&&(t=WE(t));return Object.assign({},e??{},t??{})};function bu(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Bg(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=Nie(t[o],n[o]);continue}if(o==="style"){t[o]=Die(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function j0(e,t,n){let r=[],o;return i=>{const s=e(i);return(s.length!==r.length||s.some((l,c)=>!vu(r[c],l)))&&(r=s,o=t(s,i)),o}}function Ev(){return{and:(...e)=>function(n){return e.every(r=>n.guard(r))},or:(...e)=>function(n){return e.some(r=>n.guard(r))},not:e=>function(n){return!n.guard(e)}}}function Lie(){return{guards:Ev(),createMachine:e=>e,choose:e=>function({choose:n}){return n(e)?.actions}}}var nc=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(nc||{}),jb="__init__";function Vie(e){const t=()=>e.getRootNode?.()??document,n=()=>ci(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>Tc(t()),isActiveElement:Ba,getById:s=>t().getElementById(s)}}function Fie(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var en=()=>e=>Array.from(new Set(e));function Bie(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var qE={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},Hie="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function zie(e){return e in qE?qE[e]:e.startsWith("on")?`on${Bie(e.substr(2))}`:Hie.includes(e)?e:e.toLowerCase()}var ua=Fie(e=>{const t={};for(const n in e){const r=e[n];n==="children"?typeof r=="string"&&(t.innerHTML=r):t[zie(n)]=e[n]}return t});function Gg(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=co(t),o=A(()=>e().value!==void 0),i=co(o.value?e().value:r.value);return{initial:t,ref:i,get(){return o.value?e().value:r.value},set(s){const a=o.value?e().value:r.value,l=fc(s)?s(a):s;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:l,prev:a}),o.value||(r.value=l),n(l,a)||e().onChange?.(l,a)},invoke(s,a){e().onChange?.(s,a)},hash(s){return e().hash?.(s)??String(s)}}}Gg.cleanup=e=>{Sr(()=>e())};Gg.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function Uie(e){const t={current:e};return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var jie=(e,t)=>{st(()=>[...e.map(n=>n())],(n,r)=>{let o=!1;for(let i=0;i{const{id:C,ids:x,getRootNode:I}=pe(t);return Vie({id:C,ids:x,getRootNode:I})}),r=(...C)=>{e.debug&&console.log(...C)},o=A(()=>e.props?.({props:mw(pe(t)),get scope(){return n.value}})??pe(t)),i=Gie(o),s=e.context?.({prop:i,bindable:Gg,get scope(){return n.value},flush:KE,getContext(){return a},getComputed(){return v},getRefs(){return g},getEvent(){return h()}}),a={get(C){return s[C]?.get()},set(C,x){s[C]?.set(x)},initial(C){return s[C]?.initial},hash(C){const x=s[C]?.get();return s[C]?.hash(x)}};let l=new Map,c=null,u={current:null},p={current:{type:""}};const h=()=>({...p.current,current(){return p.current},previous(){return u.current}}),f=()=>({..._,matches(...C){const x=_.get();return C.includes(x)},hasTag(C){const x=_.get();return!!e.states[x]?.tags?.includes(C)}}),g=Uie(e.refs?.({prop:i,context:a})??{}),m=()=>({state:f(),context:a,event:h(),prop:i,send:N,action:b,guard:w,track:jie,refs:g,computed:v,flush:KE,get scope(){return n.value},choose:k}),b=C=>{const x=fc(C)?C(m()):C;if(!x)return;const I=x.map(R=>{const M=e.implementations?.actions?.[R];return M||zg(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of I)R?.(m())},w=C=>fc(C)?C(m()):e.implementations?.guards?.[C](m()),E=C=>{const x=fc(C)?C(m()):C;if(!x)return;const I=x.map(M=>{const B=e.implementations?.effects?.[M];return B||zg(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of I){const B=M?.(m());B&&R.push(B)}return()=>R.forEach(M=>M?.())},k=C=>Hre(C).find(x=>{let I=!x.guard;return Dh(x.guard)?I=!!w(x.guard):fc(x.guard)&&(I=x.guard(m())),I}),v=C=>{yoe(e.computed,()=>"[zag-js] No computed object found on machine");const x=e.computed[C];return x({context:a,event:h(),prop:i,refs:g,get scope(){return n.value},computed:v})},_=Gg(()=>({defaultValue:e.initialState({prop:i}),onChange(C,x){x&&(l.get(x)?.(),l.delete(x)),x&&b(e.states[x]?.exit),b(c?.actions);const I=E(e.states[C]?.effects);if(I&&l.set(C,I),x===jb){b(e.entry);const R=E(e.effects);R&&l.set(jb,R)}b(e.states[C]?.entry)}}));let T=nc.NotStarted;Je(()=>{const C=T===nc.Started;T=nc.Started,r(C?"rehydrating...":"initializing..."),_.invoke(_.initial,jb)}),on(()=>{T=nc.Stopped,r("unmounting...");const C=l.values();for(const x of C)x?.();l=new Map,b(e.exit)});const N=C=>{if(T!==nc.Started)return;u.current=p.current,p.current=C;let x=_.get();const I=e.states[x].on?.[C.type]??e.on?.[C.type],R=k(I);if(!R)return;c=R;const M=R.target??x;r("transition",C.type,R.target||x,`(${R.actions})`);const B=M!==x;B?_.set(M):R.reenter&&!B?_.invoke(x,x):b(R.actions)};return e.watch?.(m()),{state:f(),send:N,context:a,prop:i,get scope(){return n.value},refs:g,computed:v,event:h(),getStatus:()=>T}}function Gie(e){return function(n){return e.value[n]}}var KE=e=>{Nn().then(()=>{e()})};const Wie=P({name:"Dynamic",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;const r=_A(n.default()),[o,...i]=r;if(Object.keys(t).length>0){delete o.props?.ref;const s=bu(t,o.props??{}),a=Ir(o,s);for(const l in s)l.startsWith("on")&&(a.props||={},a.props[l]=s[l]);return r.length===1?a:[a,...i]}return r}}});function _A(e){return e?e.flatMap(t=>t.type===ge?_A(t.children):[t]):[]}const qie="br, hr, img, input, area, textarea".split(", "),Kie=e=>typeof e=="string"&&qie.includes(e),Gb=e=>P({name:"Polymorphic",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1}},setup(t,{attrs:n,slots:r}){return t.asChild?()=>uo(Wie,n,r):()=>uo(e,n,Kie(e)?void 0:r.default?.())}});function Yie(){const e=new Map;return new Proxy(Gb,{apply(n,r,o){return Gb(o[0])},get(n,r){return e.has(r)||e.set(r,Gb(r)),e.get(r)}})}const te=Yie(),Tt=e=>{const t=Symbol(e);return[o=>tu(t,o),o=>dt(t,o),t]},[kA,ln]=Tt("MenuContext");function Ow(e){const t=pe(e);return t?.$el??t}const Xie=e=>Object.prototype.hasOwnProperty.call(e,"nodeName")&&typeof e.nodeName=="string";function ee(){const e=zt(),t=Q(),n=A(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:Ow(t)),r=Object.assign({},e.exposed),o={};for(const s in e.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>e.props[s]});if(Object.keys(r).length>0)for(const s in r)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>r[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=o;function i(s){t.value=s,!(Xie(s)||!s)&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s.$el}),e.exposed=o)}return{forwardRef:i,currentRef:t,currentElement:n}}const Jie=P({__name:"menu-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getArrowTipProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Zie=P({__name:"menu-arrow",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getArrowProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[Iw,Qie]=Tt("MenuItemContext"),[Ov,CA]=Tt("MenuItemPropsContext"),ese=P({__name:"menu-checkbox-item",props:Ze({checked:{type:Boolean},value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{checked:void 0,disabled:void 0,closeOnSelect:void 0}),emits:["update:checked"],setup(e,{emit:t}){const n=e,r=t,o=ln(),i=A(()=>({...n,type:"checkbox",onCheckedChange:a=>r("update:checked",a)})),s=A(()=>o.value.getOptionItemState(i.value));return Iw(s),Ov(i),ee(),(a,l)=>(y(),$(d(te).div,F(d(o).getOptionItemProps(i.value),{"as-child":a.asChild}),{default:O(()=>[L(a.$slots,"default")]),_:3},16,["as-child"]))}}),[sf,Iv]=Tt("PresenceContext"),tse=P({__name:"menu-content",props:{asChild:{type:Boolean}},setup(e){const t=ln(),n=Iv(),r=A(()=>bu(t.value.getContentProps(),n.value.presenceProps));return ee(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),nse=P({__name:"menu-context-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getContextTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),rse=P({__name:"menu-context",setup(e){const t=ln();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),ose=P({__name:"menu-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ise=P({__name:"menu-item-context",setup(e){const t=Qie();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[EA,OA]=Tt("MenuItemGroupContext"),sse=P({__name:"menu-item-group-label",props:{asChild:{type:Boolean}},setup(e){const t=ln(),n=OA();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getItemGroupLabelProps({htmlFor:d(n).id}),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),ase=P({__name:"menu-item-group",props:{id:{},asChild:{type:Boolean}},setup(e){const t=e,n=ln(),r=nt(),o=t.id??r,i=A(()=>({id:o}));return EA(i),ee(),(s,a)=>(y(),$(d(te).div,F(d(n).getItemGroupProps(i.value),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}}),lse=P({__name:"menu-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=ln(),n=CA();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),cse=P({__name:"menu-item-text",props:{asChild:{type:Boolean}},setup(e){const t=ln(),n=CA();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getItemTextProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),use=P({__name:"menu-item",props:Ze({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),emits:["select"],setup(e,{emit:t}){const n=e,r=t,o=ln(),i=A(()=>o.value.getItemState(n));return Ov(A(()=>n)),Iw(i),Je(()=>{const s=o.value.addItemListener({id:i.value.id,onSelect:()=>r("select")});on(()=>s?.())}),ee(),(s,a)=>(y(),$(d(te).div,F(d(o).getItemProps(n),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}});function dse(e,t){const{state:n,send:r,context:o}=e,i=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:i,setNode(s){s&&r({type:"NODE.SET",node:s})},unmount(){r({type:"UNMOUNT"})}}}var pse={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",jc(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const i=t.get("node");if(!o&&i?.ownerDocument.visibilityState==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});tt(()=>{const s=Xf(t.get("styles"));e.set("unmountAnimationName",s),s==="none"||s===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{tt(()=>{e.set("prevAnimationName",Xf(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n})=>{const r=t.get("node");if(!r)return;const o=a=>{(a.composedPath?.()?.[0]??a.target)===r&&e.set("prevAnimationName",Xf(t.get("styles")))},i=a=>{const l=Xf(t.get("styles"));Yn(a)===r&&l===e.get("unmountAnimationName")&&n({type:"UNMOUNT",src:"animationend"})};r.addEventListener("animationstart",o),r.addEventListener("animationcancel",i),r.addEventListener("animationend",i);const s=yp(r,{animationFillMode:"forwards"});return()=>{r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",i),r.removeEventListener("animationend",i),_w(()=>s())}}}}};function Xf(e){return e?.animationName||"none"}en()(["onExitComplete","present","immediate"]);const af=(e,t)=>{const n=Q(!1),r=Q(null),o=A(()=>({present:pe(e).present,onExitComplete:()=>t?.("exitComplete")})),i=Ji(pse,o),s=A(()=>dse(i));return st(()=>s.value.present,()=>{s.value.present&&(n.value=!0)}),st(r,()=>{if(r.value){const a=r.value.$el?r.value.$el:r.value;a&&s.value.setNode(a)}}),A(()=>{const a=pe(e);return{present:s.value.present,unmounted:!s.value.present&&!n.value&&a.lazyMount||a?.unmountOnExit&&!s.value?.present&&n.value,presenceProps:{ref:r,hidden:!s.value.present,"data-state":s.value.skip&&a.skipAnimationOnMount?void 0:a?.present?"open":"closed"}}})},[ui,yu]=Tt("RenderStrategyProps"),fse=P({__name:"menu-positioner",props:{asChild:{type:Boolean}},setup(e){const t=ln(),n=yu(),r=af(A(()=>({...n.value,present:t.value.open})));return sf(r),ee(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),hse=P({__name:"menu-radio-item-group",props:{id:{},modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=ln(),i=nt(),s=n.id??i,a=A(()=>({id:s,value:n.modelValue,onValueChange:l=>r("update:modelValue",l.value)}));return EA(a),ee(),(l,c)=>(y(),$(d(te).div,F(d(o).getItemGroupProps(a.value),{"as-child":l.asChild}),{default:O(()=>[L(l.$slots,"default")]),_:3},16,["as-child"]))}}),gse=P({__name:"menu-radio-item",props:Ze({value:{},disabled:{type:Boolean},valueText:{},closeOnSelect:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,closeOnSelect:void 0}),setup(e){const t=e,n=ln(),r=OA(),o=A(()=>({...t,checked:r.value.value===t.value,type:"radio",onCheckedChange:()=>r.value.onValueChange?.({value:t.value})})),i=A(()=>n.value.getOptionItemState(o.value));return Iw(i),Ov(o),ee(),(s,a)=>(y(),$(d(te).div,F(d(n).getOptionItemProps(o.value),{"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["as-child"]))}}),[IA,TA]=Tt("MenuMachineContext"),[SA,mse]=Tt("MenuTriggerItemContext"),vse=P({__name:"menu-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,{value:{machine:n,api:r}}=t,o=ln(),i=TA();return Je(()=>{i&&(o.value.setChild(n),r.value.setParent(i))}),SA(A(()=>o.value.getTriggerItemProps(r.value))),IA(n),kA(r),ui(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ee(),(s,a)=>L(s.$slots,"default")}});var _r=(e,t=[])=>({parts:(...n)=>{if(bse(t))return _r(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>_r(e,[...t,...n]),omit:(...n)=>_r(e,t.filter(r=>!n.includes(r))),rename:n=>_r(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Hl(e)}"][data-part="${Hl(r)}"]`,`& [data-scope="${Hl(e)}"][data-part="${Hl(r)}"]`].join(", "),attrs:{"data-scope":Hl(e),"data-part":Hl(r)}}}),{})}),Hl=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),bse=e=>e.length===0;const yse=["top","right","bottom","left"],Zs=Math.min,yr=Math.max,Wg=Math.round,Jf=Math.floor,Xo=e=>({x:e,y:e}),xse={left:"right",right:"left",bottom:"top",top:"bottom"},wse={start:"end",end:"start"};function G0(e,t,n){return yr(e,Zs(t,n))}function ji(e,t){return typeof e=="function"?e(t):e}function Gi(e){return e.split("-")[0]}function xu(e){return e.split("-")[1]}function Tw(e){return e==="x"?"y":"x"}function Sw(e){return e==="y"?"height":"width"}const _se=new Set(["top","bottom"]);function Go(e){return _se.has(Gi(e))?"y":"x"}function Pw(e){return Tw(Go(e))}function kse(e,t,n){n===void 0&&(n=!1);const r=xu(e),o=Pw(e),i=Sw(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=qg(s)),[s,qg(s)]}function Cse(e){const t=qg(e);return[W0(e),t,W0(t)]}function W0(e){return e.replace(/start|end/g,t=>wse[t])}const YE=["left","right"],XE=["right","left"],Ese=["top","bottom"],Ose=["bottom","top"];function Ise(e,t,n){switch(e){case"top":case"bottom":return n?t?XE:YE:t?YE:XE;case"left":case"right":return t?Ese:Ose;default:return[]}}function Tse(e,t,n,r){const o=xu(e);let i=Ise(Gi(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(W0)))),i}function qg(e){return e.replace(/left|right|bottom|top/g,t=>xse[t])}function Sse(e){return{top:0,right:0,bottom:0,left:0,...e}}function PA(e){return typeof e!="number"?Sse(e):{top:e,right:e,bottom:e,left:e}}function Kg(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function JE(e,t,n){let{reference:r,floating:o}=e;const i=Go(t),s=Pw(t),a=Sw(s),l=Gi(t),c=i==="y",u=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(xu(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1);break}return f}const Pse=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:p}=JE(c,r,l),h=r,f={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=ji(e,t)||{};if(c==null)return{};const p=PA(u),h={x:n,y:r},f=Pw(o),g=Sw(f),m=await s.getDimensions(c),b=f==="y",w=b?"top":"left",E=b?"bottom":"right",k=b?"clientHeight":"clientWidth",v=i.reference[g]+i.reference[f]-h[f]-i.floating[g],_=h[f]-i.reference[f],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let N=T?T[k]:0;(!N||!await(s.isElement==null?void 0:s.isElement(T)))&&(N=a.floating[k]||i.floating[g]);const C=v/2-_/2,x=N/2-m[g]/2-1,I=Zs(p[w],x),R=Zs(p[E],x),M=I,B=N-m[g]-R,z=N/2-m[g]/2+C,J=G0(M,z,B),q=!l.arrow&&xu(o)!=null&&z!==J&&i.reference[g]/2-(zz<=0)){var R,M;const z=(((R=i.flip)==null?void 0:R.index)||0)+1,J=N[z];if(J&&(!(p==="alignment"?E!==Go(J):!1)||I.every(X=>Go(X.placement)===E?X.overflows[0]>0:!0)))return{data:{index:z,overflows:I},reset:{placement:J}};let q=(M=I.filter(K=>K.overflows[0]<=0).sort((K,X)=>K.overflows[1]-X.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(f){case"bestFit":{var B;const K=(B=I.filter(X=>{if(T){const de=Go(X.placement);return de===E||de==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(de=>de>0).reduce((de,Ue)=>de+Ue,0)]).sort((X,de)=>X[1]-de[1])[0])==null?void 0:B[0];K&&(q=K);break}case"initialPlacement":q=a;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function ZE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function QE(e){return yse.some(t=>e[t]>=0)}const Ase=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ji(e,t);switch(r){case"referenceHidden":{const i=await xp(t,{...o,elementContext:"reference"}),s=ZE(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:QE(s)}}}case"escaped":{const i=await xp(t,{...o,altBoundary:!0}),s=ZE(i,n.floating);return{data:{escapedOffsets:s,escaped:QE(s)}}}default:return{}}}}},$A=new Set(["left","top"]);async function Nse(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Gi(n),a=xu(n),l=Go(n)==="y",c=$A.has(s)?-1:1,u=i&&l?-1:1,p=ji(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const Mse=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Nse(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Dse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...l}=ji(e,t),c={x:n,y:r},u=await xp(t,l),p=Go(Gi(o)),h=Tw(p);let f=c[h],g=c[p];if(i){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=f+u[b],k=f-u[w];f=G0(E,f,k)}if(s){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=g+u[b],k=g-u[w];g=G0(E,g,k)}const m=a.fn({...t,[h]:f,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:i,[p]:s}}}}}},Lse=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ji(e,t),u={x:n,y:r},p=Go(o),h=Tw(p);let f=u[h],g=u[p];const m=ji(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const k=h==="y"?"height":"width",v=i.reference[h]-i.floating[k]+b.mainAxis,_=i.reference[h]+i.reference[k]-b.mainAxis;f_&&(f=_)}if(c){var w,E;const k=h==="y"?"width":"height",v=$A.has(Gi(o)),_=i.reference[p]-i.floating[k]+(v&&((w=s.offset)==null?void 0:w[p])||0)+(v?0:b.crossAxis),T=i.reference[p]+i.reference[k]+(v?0:((E=s.offset)==null?void 0:E[p])||0)-(v?b.crossAxis:0);g<_?g=_:g>T&&(g=T)}return{[h]:f,[p]:g}}}},Vse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=ji(e,t),u=await xp(t,c),p=Gi(o),h=xu(o),f=Go(o)==="y",{width:g,height:m}=i.floating;let b,w;p==="top"||p==="bottom"?(b=p,w=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(w=p,b=h==="end"?"top":"bottom");const E=m-u.top-u.bottom,k=g-u.left-u.right,v=Zs(m-u[b],E),_=Zs(g-u[w],k),T=!t.middlewareData.shift;let N=v,C=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),T&&!h){const I=yr(u.left,0),R=yr(u.right,0),M=yr(u.top,0),B=yr(u.bottom,0);f?C=g-2*(I!==0||R!==0?I+R:yr(u.left,u.right)):N=m-2*(M!==0||B!==0?M+B:yr(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:N});const x=await s.getDimensions(a.floating);return g!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function Tv(){return typeof window<"u"}function wu(e){return RA(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function di(e){var t;return(t=(RA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function RA(e){return Tv()?e instanceof Node||e instanceof Er(e).Node:!1}function vo(e){return Tv()?e instanceof Element||e instanceof Er(e).Element:!1}function ni(e){return Tv()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function eO(e){return!Tv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}const Fse=new Set(["inline","contents"]);function lf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Fse.has(o)}const Bse=new Set(["table","td","th"]);function Hse(e){return Bse.has(wu(e))}const zse=[":popover-open",":modal"];function Sv(e){return zse.some(t=>{try{return e.matches(t)}catch{return!1}})}const Use=["transform","translate","scale","rotate","perspective"],jse=["transform","translate","scale","rotate","perspective","filter"],Gse=["paint","layout","strict","content"];function $w(e){const t=Rw(),n=vo(e)?bo(e):e;return Use.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jse.some(r=>(n.willChange||"").includes(r))||Gse.some(r=>(n.contain||"").includes(r))}function Wse(e){let t=Qs(e);for(;ni(t)&&!qc(t);){if($w(t))return t;if(Sv(t))return null;t=Qs(t)}return null}function Rw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const qse=new Set(["html","body","#document"]);function qc(e){return qse.has(wu(e))}function bo(e){return Er(e).getComputedStyle(e)}function Pv(e){return vo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qs(e){if(wu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eO(e)&&e.host||di(e);return eO(t)?t.host:t}function AA(e){const t=Qs(e);return qc(t)?e.ownerDocument?e.ownerDocument.body:e.body:ni(t)&&lf(t)?t:AA(t)}function wp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=AA(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Er(o);if(i){const a=q0(s);return t.concat(s,s.visualViewport||[],lf(o)?o:[],a&&n?wp(a):[])}return t.concat(o,wp(o,[],n))}function q0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function NA(e){const t=bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ni(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Wg(n)!==i||Wg(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Aw(e){return vo(e)?e:e.contextElement}function Sc(e){const t=Aw(e);if(!ni(t))return Xo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=NA(t);let s=(i?Wg(n.width):n.width)/r,a=(i?Wg(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Kse=Xo(0);function MA(e){const t=Er(e);return!Rw()||!t.visualViewport?Kse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Er(e)?!1:t}function sl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Aw(e);let s=Xo(1);t&&(r?vo(r)&&(s=Sc(r)):s=Sc(e));const a=Yse(i,n,r)?MA(i):Xo(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(i){const h=Er(i),f=r&&vo(r)?Er(r):r;let g=h,m=q0(g);for(;m&&r&&f!==g;){const b=Sc(m),w=m.getBoundingClientRect(),E=bo(m),k=w.left+(m.clientLeft+parseFloat(E.paddingLeft))*b.x,v=w.top+(m.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,p*=b.y,l+=k,c+=v,g=Er(m),m=q0(g)}}return Kg({width:u,height:p,x:l,y:c})}function $v(e,t){const n=Pv(e).scrollLeft;return t?t.left+n:sl(di(e)).left+n}function DA(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$v(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Xse(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=di(r),a=t?Sv(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xo(1);const u=Xo(0),p=ni(r);if((p||!p&&!i)&&((wu(r)!=="body"||lf(s))&&(l=Pv(r)),ni(r))){const f=sl(r);c=Sc(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=s&&!p&&!i?DA(s,l):Xo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function Jse(e){return Array.from(e.getClientRects())}function Zse(e){const t=di(e),n=Pv(e),r=e.ownerDocument.body,o=yr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=yr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+$v(e);const a=-n.scrollTop;return bo(r).direction==="rtl"&&(s+=yr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const tO=25;function Qse(e,t){const n=Er(e),r=di(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Rw();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=$v(r);if(c<=0){const u=r.ownerDocument,p=u.body,h=getComputedStyle(p),f=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-f);g<=tO&&(i-=g)}else c<=tO&&(i+=c);return{width:i,height:s,x:a,y:l}}const eae=new Set(["absolute","fixed"]);function tae(e,t){const n=sl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ni(e)?Sc(e):Xo(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function nO(e,t,n){let r;if(t==="viewport")r=Qse(e,n);else if(t==="document")r=Zse(di(e));else if(vo(t))r=tae(t,n);else{const o=MA(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Kg(r)}function LA(e,t){const n=Qs(e);return n===t||!vo(n)||qc(n)?!1:bo(n).position==="fixed"||LA(n,t)}function nae(e,t){const n=t.get(e);if(n)return n;let r=wp(e,[],!1).filter(a=>vo(a)&&wu(a)!=="body"),o=null;const i=bo(e).position==="fixed";let s=i?Qs(e):e;for(;vo(s)&&!qc(s);){const a=bo(s),l=$w(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&eae.has(o.position)||lf(s)&&!l&&LA(e,s))?r=r.filter(u=>u!==s):o=a,s=Qs(s)}return t.set(e,r),r}function rae(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Sv(t)?[]:nae(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const p=nO(t,u,o);return c.top=yr(p.top,c.top),c.right=Zs(p.right,c.right),c.bottom=Zs(p.bottom,c.bottom),c.left=yr(p.left,c.left),c},nO(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function oae(e){const{width:t,height:n}=NA(e);return{width:t,height:n}}function iae(e,t,n){const r=ni(t),o=di(t),i=n==="fixed",s=sl(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Xo(0);function c(){l.x=$v(o)}if(r||!r&&!i)if((wu(t)!=="body"||lf(o))&&(a=Pv(t)),r){const f=sl(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?DA(o,a):Xo(0),p=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:p,y:h,width:s.width,height:s.height}}function Wb(e){return bo(e).position==="static"}function rO(e,t){if(!ni(e)||bo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return di(e)===n&&(n=n.ownerDocument.body),n}function VA(e,t){const n=Er(e);if(Sv(e))return n;if(!ni(e)){let o=Qs(e);for(;o&&!qc(o);){if(vo(o)&&!Wb(o))return o;o=Qs(o)}return n}let r=rO(e,t);for(;r&&Hse(r)&&Wb(r);)r=rO(r,t);return r&&qc(r)&&Wb(r)&&!$w(r)?n:r||Wse(e)||n}const sae=async function(e){const t=this.getOffsetParent||VA,n=this.getDimensions,r=await n(e.floating);return{reference:iae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aae(e){return bo(e).direction==="rtl"}const lae={convertOffsetParentRelativeRectToViewportRelativeRect:Xse,getDocumentElement:di,getClippingRect:rae,getOffsetParent:VA,getElementRects:sae,getClientRects:Jse,getDimensions:oae,getScale:Sc,isElement:vo,isRTL:aae};function FA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cae(e,t){let n=null,r;const o=di(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:p,width:h,height:f}=c;if(a||t(),!h||!f)return;const g=Jf(p),m=Jf(o.clientWidth-(u+h)),b=Jf(o.clientHeight-(p+f)),w=Jf(u),k={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:yr(0,Zs(1,l))||1};let v=!0;function _(T){const N=T[0].intersectionRatio;if(N!==l){if(!v)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!FA(c,e.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver(_,{...k,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,k)}n.observe(e)}return s(!0),i}function uae(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Aw(e),u=o||i?[...c?wp(c):[],...wp(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=c&&a?cae(c,n):null;let h=-1,f=null;s&&(f=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g,m=l?sl(e):null;l&&b();function b(){const w=sl(e);m&&!FA(m,w)&&n(),m=w,g=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const dae=Mse,pae=Dse,fae=Rse,hae=Vse,gae=Ase,mae=$se,vae=Lse,bae=(e,t,n)=>{const r=new Map,o={platform:lae,...n},i={...o.platform,_c:r};return Pse(e,t,{...o,platform:i})};function oO(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...o,toJSON:()=>o}}function yae(e){if(!e)return oO();const{x:t,y:n,width:r,height:o}=e;return oO(t,n,r,o)}function xae(e,t){return{contextElement:En(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t?.(n);return r||!n?yae(r):n.getBoundingClientRect()}}}var Gu=e=>({variable:e,reference:`var(${e})`}),yi={arrowSize:Gu("--arrow-size"),arrowSizeHalf:Gu("--arrow-size-half"),arrowBg:Gu("--arrow-background"),transformOrigin:Gu("--transform-origin"),arrowOffset:Gu("--arrow-offset")},wae=e=>e==="top"||e==="bottom"?"y":"x";function _ae(e,t){return{name:"transformOrigin",fn(n){const{elements:r,middlewareData:o,placement:i,rects:s,y:a}=n,l=i.split("-")[0],c=wae(l),u=o.arrow?.x||0,p=o.arrow?.y||0,h=t?.clientWidth||0,f=t?.clientHeight||0,g=u+h/2,m=p+f/2,b=Math.abs(o.shift?.y||0),w=s.reference.height/2,E=f/2,k=e.offset?.mainAxis??e.gutter,v=typeof k=="number"?k+E:k??E,_=b>v,T={top:`${g}px calc(100% + ${v}px)`,bottom:`${g}px ${-v}px`,left:`calc(100% + ${v}px) ${m}px`,right:`${-v}px ${m}px`}[l],N=`${g}px ${s.reference.y+w-a}px`,C=!!e.overlap&&c==="y"&&_;return r.floating.style.setProperty(yi.transformOrigin.variable,C?N:T),{data:{transformOrigin:C?N:T}}}}}var kae={name:"rects",fn({rects:e}){return{data:e}}},Cae=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${yi.arrowOffset.reference})`}),{}}}};function Eae(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Oae(e){return e.split("-")[0]}var Iae={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function iO(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Nw(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function Tae(e,t,n){const r=e||t.createElement("div");return mae({element:r,padding:n.arrowPadding})}function Sae(e,t){if(!Yre(t.offset??t.gutter))return dae(({placement:n})=>{const r=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,i=typeof o=="number"?o+r:o??r,{hasAlign:s}=Eae(n),a=s?void 0:t.shift,l=t.offset?.crossAxis??a;return mw({crossAxis:l,mainAxis:i,alignmentAxis:t.shift})})}function Pae(e){if(!e.flip)return;const t=Nw(e.boundary);return fae({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function $ae(e){if(!e.slide&&!e.overlap)return;const t=Nw(e.boundary);return pae({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:vae()})}function Rae(e){return hae({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const i=t.floating,s=Math.round(n.reference.width),a=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),i.style.setProperty("--reference-width",`${s}px`),i.style.setProperty("--reference-height",`${a}px`),i.style.setProperty("--available-width",`${o}px`),i.style.setProperty("--available-height",`${r}px`)}})}function Aae(e){if(e.hideWhenDetached)return gae({strategy:"referenceHidden",boundary:Nw(e.boundary)??"clippingAncestors"})}function Nae(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function Mae(e,t,n={}){const r=xae(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},Iae,n),i=t.querySelector("[data-part=arrow]"),s=[Sae(i,o),Pae(o),$ae(o),Tae(i,t.ownerDocument,o),Cae(i),_ae({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),Rae(o),Aae(o),kae],{placement:a,strategy:l,onComplete:c,onPositioned:u}=o,p=async()=>{if(!r||!t)return;const m=await bae(r,t,{placement:a,middleware:s,strategy:l});c?.(m),u?.({placed:!0});const b=pr(t),w=iO(b,m.x),E=iO(b,m.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${E}px`),o.hideWhenDetached&&(m.middlewareData.hide?.referenceHidden?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const k=t.firstElementChild;if(k){const v=jc(k);t.style.setProperty("--z-index",v.zIndex)}},h=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:p,floatingElement:t}),u?.({placed:!0})):await p()},f=Nae(o.listeners),g=o.listeners?uae(r,t,h,f):noe;return h(),()=>{g?.(),u?.({placed:!1})}}function _p(e,t,n={}){const{defer:r,...o}=n,i=r?tt:a=>a(),s=[];return s.push(i(()=>{const a=typeof e=="function"?e():e,l=typeof t=="function"?t():t;s.push(Mae(a,l,o))})),()=>{s.forEach(a=>a?.())}}var Dae={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function Mw(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:yi.arrowSize.reference,height:yi.arrowSize.reference,[yi.arrowSizeHalf.variable]:`calc(${yi.arrowSize.reference} / 2)`,[yi.arrowOffset.variable]:`calc(${yi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?Dae[t.split("-")[0]]:void 0,background:yi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}function Lae(e){const t={each(n){for(let r=0;r{try{i.document.addEventListener(n,r,o)}catch{}}),()=>{try{t.removeEventListener(n,r,o)}catch{}}},removeEventListener(n,r,o){t.each(i=>{try{i.document.removeEventListener(n,r,o)}catch{}})}};return t}function Vae(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t?.addEventListener(n,r,o)}catch{}return()=>{try{t?.removeEventListener(n,r,o)}catch{}}},removeEventListener:(n,r,o)=>{try{t?.removeEventListener(n,r,o)}catch{}}}}var sO="pointerdown.outside",aO="focus.outside";function Fae(e){for(const t of e)if(En(t)&&Vs(t))return!0;return!1}var BA=e=>"clientY"in e;function Bae(e,t){if(!BA(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Hae(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function lO(e,t){if(!t||!BA(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,i=o&&e.clientY>t.offsetTop+t.clientHeight,s={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},a={x:e.clientX,y:e.clientY};return Hae(s,a)?r||i:!1}function zae(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:i,defer:s}=t;if(!e)return;const a=ci(e),l=pr(e),c=Lae(l),u=Vae(l);function p(E,k){if(!En(k)||!k.isConnected||Ds(e,k)||Bae(e,E))return!1;const v=a.querySelector(`[aria-controls="${e.id}"]`);if(v){const T=z0(v);if(lO(E,T))return!1}const _=z0(e);return lO(E,_)?!1:!n?.(k)}const h=new Set,f=vp(e?.getRootNode());function g(E){function k(v){const _=s&&!zE()?tt:C=>C(),T=v??E,N=T?.composedPath?.()??[T?.target];_(()=>{const C=f?N[0]:Yn(E);if(!(!e||!p(E,C))){if(o||i){const x=Bg(o,i);e.addEventListener(sO,x,{once:!0})}cO(e,sO,{bubbles:!1,cancelable:!0,detail:{originalEvent:T,contextmenu:pA(T),focusable:Fae(N),target:C}})}})}E.pointerType==="touch"?(h.forEach(v=>v()),h.add(Ft(a,"click",k,{once:!0})),h.add(u.addEventListener("click",k,{once:!0})),h.add(c.addEventListener("click",k,{once:!0}))):k()}const m=new Set,b=setTimeout(()=>{m.add(Ft(a,"pointerdown",g,!0)),m.add(u.addEventListener("pointerdown",g,!0)),m.add(c.addEventListener("pointerdown",g,!0))},0);function w(E){(s?tt:v=>v())(()=>{const v=Yn(E);if(!(!e||!p(E,v))){if(r||i){const _=Bg(r,i);e.addEventListener(aO,_,{once:!0})}cO(e,aO,{bubbles:!1,cancelable:!0,detail:{originalEvent:E,contextmenu:!1,focusable:Vs(v),target:v}})}})}return zE()||(m.add(Ft(a,"focusin",w,!0)),m.add(u.addEventListener("focusin",w,!0)),m.add(c.addEventListener("focusin",w,!0))),()=>{clearTimeout(b),h.forEach(E=>E()),m.forEach(E=>E())}}function Uae(e,t){const{defer:n}=t,r=n?tt:i=>i(),o=[];return o.push(r(()=>{const i=typeof e=="function"?e():e;o.push(zae(i,t))})),()=>{o.forEach(i=>i?.())}}function cO(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function jae(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return Ft(ci(e),"keydown",n,{capture:!0})}var uO="layer:request-dismiss",Vr={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return tt.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Ds(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ds(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(tVr.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];Wae(e,uO,o=>{r.requestDismiss?.(o),o.defaultPrevented||r?.dismiss()}),Gae(e,uO,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Gae(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function Wae(e,t,n){e.addEventListener(t,n,{once:!0})}var dO;function pO(){Vr.layers.forEach(({node:e})=>{e.style.pointerEvents=Vr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function qae(e){e.style.pointerEvents=""}function Kae(e,t){const n=ci(e),r=[];return Vr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(dO=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t?.forEach(o=>{const[i,s]=Aie(()=>{const a=o();return En(a)?a:null},{timeout:1e3});i.then(a=>r.push(yp(a,{pointerEvents:"auto"}))),r.push(s)}),()=>{Vr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=dO,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function Yae(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){zg("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:i,exclude:s,debug:a,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:i,requestDismiss:o};Vr.add(c),pO();function u(m){const b=Yn(m.detail.originalEvent);Vr.isBelowPointerBlockingLayer(e)||Vr.isInBranch(b)||(t.onPointerDownOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onPointerDownOutside:",m.detail.originalEvent),r?.()))}function p(m){const b=Yn(m.detail.originalEvent);Vr.isInBranch(b)||(t.onFocusOutside?.(m),t.onInteractOutside?.(m),!m.defaultPrevented&&(a&&console.log("onFocusOutside:",m.detail.originalEvent),r?.()))}function h(m){Vr.isTopMost(e)&&(t.onEscapeKeyDown?.(m),!m.defaultPrevented&&r&&(m.preventDefault(),r()))}function f(m){if(!e)return!1;const b=typeof s=="function"?s():s,w=Array.isArray(b)?b:[b],E=t.persistentElements?.map(k=>k()).filter(En);return E&&w.push(...E),w.some(k=>Ds(k,m))||Vr.isInNestedLayer(e,m)}const g=[i?Kae(e,t.persistentElements):void 0,jae(e,h),Uae(e,{exclude:f,onFocusOutside:p,onPointerDownOutside:u,defer:t.defer})];return()=>{Vr.remove(e),pO(),qae(e),g.forEach(m=>m?.())}}function Rv(e,t){const{defer:n}=t,r=n?tt:i=>i(),o=[];return o.push(r(()=>{const i=fc(e)?e():e;o.push(Yae(i,t))})),()=>{o.forEach(i=>i?.())}}var dd=(e,t)=>({x:e,y:t});function Xae(e){const{x:t,y:n,width:r,height:o}=e,i=t+r/2,s=n+o/2;return{x:t,y:n,width:r,height:o,minX:t,minY:n,maxX:t+r,maxY:n+o,midX:i,midY:s,center:dd(i,s)}}function Jae(e){const t=dd(e.minX,e.minY),n=dd(e.maxX,e.minY),r=dd(e.maxX,e.maxY),o=dd(e.minX,e.maxY);return{top:t,right:n,bottom:r,left:o}}function Zae(e,t){const n=Xae(e),{top:r,right:o,left:i,bottom:s}=Jae(n),[a]=t.split("-");return{top:[i,r,o,s],right:[r,o,s,i],bottom:[r,i,s,o],left:[o,r,i,s]}[a]}function Qae(e,t){const{x:n,y:r}=t;let o=!1;for(let i=0,s=e.length-1;ir!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(o=!o)}return o}var ele=_r("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),jn=ele.build(),Yg=e=>e.ids?.trigger??`menu:${e.id}:trigger`,HA=e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,Vd=e=>e.ids?.content??`menu:${e.id}:content`,tle=e=>e.ids?.arrow??`menu:${e.id}:arrow`,zA=e=>e.ids?.positioner??`menu:${e.id}:popper`,nle=(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,kp=(e,t)=>`${e.id}/${t}`,$a=e=>e?.dataset.value??null,fO=(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,hs=e=>e.getById(Vd(e)),hO=e=>e.getById(zA(e)),Zf=e=>e.getById(Yg(e)),rle=(e,t)=>t?e.getById(kp(e,t)):null,qb=e=>e.getById(HA(e)),cf=e=>{const n=`[role^="menuitem"][data-ownedby=${CSS.escape(Vd(e))}]:not([data-disabled])`;return bp(hs(e),n)},ole=e=>fw(cf(e)),ile=e=>hw(cf(e)),Dw=(e,t)=>t?e.id===t||e.dataset.value===t:!1,sle=(e,t)=>{const n=cf(e),r=n.findIndex(o=>Dw(o,t.value));return jre(n,r,{loop:t.loop??t.loopFocus})},ale=(e,t)=>{const n=cf(e),r=n.findIndex(o=>Dw(o,t.value));return Wre(n,r,{loop:t.loop??t.loopFocus})},lle=(e,t)=>{const n=cf(e),r=n.find(o=>Dw(o,t.value));return wA(n,{state:t.typeaheadState,key:t.key,activeId:r?.id??null})},Qf=e=>En(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),cle=e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("aria-controls"),K0="menu:select";function ule(e,t){if(!e)return;const n=pr(e),r=new n.CustomEvent(K0,{detail:{value:t}});e.dispatchEvent(r)}function dle(e,t){const{context:n,send:r,state:o,computed:i,prop:s,scope:a}=e,l=o.hasTag("open"),c=n.get("isSubmenu"),u=i("isTypingAhead"),p=s("composite"),h=n.get("currentPlacement"),f=n.get("anchorPoint"),g=n.get("highlightedValue"),m=Mw({...s("positioning"),placement:f?"bottom":h});function b(v){return{id:kp(a,v.value),disabled:!!v.disabled,highlighted:g===v.value}}function w(v){const _=v.valueText??v.value;return{...v,id:v.value,valueText:_}}function E(v){return{...b(w(v)),checked:!!v.checked}}function k(v){const{closeOnSelect:_,valueText:T,value:N}=v,C=b(v),x=kp(a,N);return t.element({...jn.item.attrs,id:x,role:"menuitem","aria-disabled":mp(C.disabled),"data-disabled":Y(C.disabled),"data-ownedby":Vd(a),"data-highlighted":Y(C.highlighted),"data-value":N,"data-valuetext":T,onDragStart(I){I.currentTarget.matches("a[href]")&&I.preventDefault()},onPointerMove(I){if(C.disabled||I.pointerType!=="mouse")return;const R=I.currentTarget;C.highlighted||r({type:"ITEM_POINTERMOVE",id:x,target:R,closeOnSelect:_})},onPointerLeave(I){if(C.disabled||I.pointerType!=="mouse"||!e.event.previous()?.type.includes("POINTER"))return;const M=I.currentTarget;r({type:"ITEM_POINTERLEAVE",id:x,target:M,closeOnSelect:_})},onPointerDown(I){if(C.disabled)return;const R=I.currentTarget;r({type:"ITEM_POINTERDOWN",target:R,id:x,closeOnSelect:_})},onClick(I){if(jE(I)||UE(I)||C.disabled)return;const R=I.currentTarget;r({type:"ITEM_CLICK",target:R,id:x,closeOnSelect:_})}})}return{highlightedValue:g,open:l,setOpen(v){o.hasTag("open")!==v&&r({type:v?"OPEN":"CLOSE"})},setHighlightedValue(v){r({type:"HIGHLIGHTED.SET",value:v})},setParent(v){r({type:"PARENT.SET",value:v,id:v.prop("id")})},setChild(v){r({type:"CHILD.SET",value:v,id:v.prop("id")})},reposition(v={}){r({type:"POSITIONING.SET",options:v})},addItemListener(v){const _=a.getById(v.id);if(!_)return;const T=()=>v.onSelect?.();return _.addEventListener(K0,T),()=>_.removeEventListener(K0,T)},getContextTriggerProps(){return t.element({...jn.contextTrigger.attrs,dir:s("dir"),id:HA(a),"data-state":l?"open":"closed",onPointerDown(v){if(v.pointerType==="mouse")return;const _=jo(v);r({type:"CONTEXT_MENU_START",point:_})},onPointerCancel(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onPointerMove(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onPointerUp(v){v.pointerType!=="mouse"&&r({type:"CONTEXT_MENU_CANCEL"})},onContextMenu(v){const _=jo(v);r({type:"CONTEXT_MENU",point:_}),v.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(v){const _=v.getTriggerProps();return bu(k({value:_.id}),_)},getTriggerProps(){return t.button({...c?jn.triggerItem.attrs:jn.trigger.attrs,"data-placement":n.get("currentPlacement"),type:"button",dir:s("dir"),id:Yg(a),"data-uid":s("id"),"aria-haspopup":p?"menu":"dialog","aria-controls":Vd(a),"aria-expanded":l||void 0,"data-state":l?"open":"closed",onPointerMove(v){if(v.pointerType!=="mouse"||Qf(v.currentTarget)||!c)return;const T=jo(v);r({type:"TRIGGER_POINTERMOVE",target:v.currentTarget,point:T})},onPointerLeave(v){if(Qf(v.currentTarget)||v.pointerType!=="mouse"||!c)return;const _=jo(v);r({type:"TRIGGER_POINTERLEAVE",target:v.currentTarget,point:_})},onPointerDown(v){Qf(v.currentTarget)||pA(v)||v.preventDefault()},onClick(v){v.defaultPrevented||Qf(v.currentTarget)||r({type:"TRIGGER_CLICK",target:v.currentTarget})},onBlur(){r({type:"TRIGGER_BLUR"})},onFocus(){r({type:"TRIGGER_FOCUS"})},onKeyDown(v){if(v.defaultPrevented)return;const _={ArrowDown(){r({type:"ARROW_DOWN"})},ArrowUp(){r({type:"ARROW_UP"})},Enter(){r({type:"ARROW_DOWN",src:"enter"})},Space(){r({type:"ARROW_DOWN",src:"space"})}},T=Wc(v,{orientation:"vertical",dir:s("dir")}),N=_[T];N&&(v.preventDefault(),N(v))}})},getIndicatorProps(){return t.element({...jn.indicator.attrs,dir:s("dir"),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...jn.positioner.attrs,dir:s("dir"),id:zA(a),style:m.floating})},getArrowProps(){return t.element({id:tle(a),...jn.arrow.attrs,dir:s("dir"),style:m.arrow})},getArrowTipProps(){return t.element({...jn.arrowTip.attrs,dir:s("dir"),style:m.arrowTip})},getContentProps(){return t.element({...jn.content.attrs,id:Vd(a),"aria-label":s("aria-label"),hidden:!l,"data-state":l?"open":"closed",role:p?"menu":"dialog",tabIndex:0,dir:s("dir"),"aria-activedescendant":i("highlightedId")||void 0,"aria-labelledby":Yg(a),"data-placement":h,onPointerEnter(v){v.pointerType==="mouse"&&r({type:"MENU_POINTERENTER"})},onKeyDown(v){if(v.defaultPrevented||!Ds(v.currentTarget,Yn(v)))return;const _=Yn(v);if(!(_?.closest("[role=menu]")===v.currentTarget||_===v.currentTarget))return;if(v.key==="Tab"&&!sie(v)){v.preventDefault();return}const N={ArrowDown(){r({type:"ARROW_DOWN"})},ArrowUp(){r({type:"ARROW_UP"})},ArrowLeft(){r({type:"ARROW_LEFT"})},ArrowRight(){r({type:"ARROW_RIGHT"})},Enter(){r({type:"ENTER"})},Space(I){u?r({type:"TYPEAHEAD",key:I.key}):N.Enter?.(I)},Home(){r({type:"HOME"})},End(){r({type:"END"})}},C=Wc(v,{dir:s("dir")}),x=N[C];if(x){x(v),v.stopPropagation(),v.preventDefault();return}s("typeahead")&&Goe(v)&&(Gc(v)||bw(_)||(r({type:"TYPEAHEAD",key:v.key}),v.preventDefault()))}})},getSeparatorProps(){return t.element({...jn.separator.attrs,role:"separator",dir:s("dir"),"aria-orientation":"horizontal"})},getItemState:b,getItemProps:k,getOptionItemState:E,getOptionItemProps(v){const{type:_,disabled:T,closeOnSelect:N}=v,C=w(v),x=E(v);return{...k(C),...t.element({"data-type":_,...jn.item.attrs,dir:s("dir"),"data-value":C.value,role:`menuitem${_}`,"aria-checked":!!x.checked,"data-state":x.checked?"checked":"unchecked",onClick(I){if(T||jE(I)||UE(I))return;const R=I.currentTarget;r({type:"ITEM_CLICK",target:R,option:C,closeOnSelect:N})}})}},getItemIndicatorProps(v){const _=E(LE(v)),T=_.checked?"checked":"unchecked";return t.element({...jn.itemIndicator.attrs,dir:s("dir"),"data-disabled":Y(_.disabled),"data-highlighted":Y(_.highlighted),"data-state":Lh(v,"checked")?T:void 0,hidden:Lh(v,"checked")?!_.checked:void 0})},getItemTextProps(v){const _=E(LE(v)),T=_.checked?"checked":"unchecked";return t.element({...jn.itemText.attrs,dir:s("dir"),"data-disabled":Y(_.disabled),"data-highlighted":Y(_.highlighted),"data-state":Lh(v,"checked")?T:void 0})},getItemGroupLabelProps(v){return t.element({...jn.itemGroupLabel.attrs,id:fO(a,v.htmlFor),dir:s("dir")})},getItemGroupProps(v){return t.element({id:nle(a,v.id),...jn.itemGroup.attrs,dir:s("dir"),"aria-labelledby":fO(a,v.id),role:"group"})}}}var{not:Ar,and:zl,or:ple}=Ev(),fle={props({props:e}){return{closeOnSelect:!0,typeahead:!0,composite:!0,loopFocus:!1,navigate(t){cie(t.node)},...e,positioning:{placement:"bottom-start",gutter:8,...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"idle"},context({bindable:e,prop:t}){return{suspendPointer:e(()=>({defaultValue:!1})),highlightedValue:e(()=>({defaultValue:t("defaultHighlightedValue")||null,value:t("highlightedValue"),onChange(n){t("onHighlightChange")?.({highlightedValue:n})}})),lastHighlightedValue:e(()=>({defaultValue:null})),currentPlacement:e(()=>({defaultValue:void 0})),intentPolygon:e(()=>({defaultValue:null})),anchorPoint:e(()=>({defaultValue:null,hash(n){return`x: ${n?.x}, y: ${n?.y}`}})),isSubmenu:e(()=>({defaultValue:!1}))}},refs(){return{parent:null,children:{},typeaheadState:{...wA.defaultOptions},positioningOverride:{}}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isTypingAhead:({refs:e})=>e.get("typeaheadState").keysSoFar!=="",highlightedId:({context:e,scope:t,refs:n})=>gle(n.get("children"),e.get("highlightedValue"),t)},watch({track:e,action:t,context:n,prop:r}){e([()=>n.get("isSubmenu")],()=>{t(["setSubmenuPlacement"])}),e([()=>n.hash("anchorPoint")],()=>{n.get("anchorPoint")&&t(["reposition"])}),e([()=>r("open")],()=>{t(["toggleVisibility"])})},on:{"PARENT.SET":{actions:["setParentMenu"]},"CHILD.SET":{actions:["setChildMenu"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"HIGHLIGHTED.RESTORE":{actions:["restoreHighlightedItem"]},"HIGHLIGHTED.SET":{actions:["setHighlightedItem"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_FOCUS:{guard:Ar("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],effects:["waitForLongPress"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"LONG_PRESS.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},opening:{tags:["closed"],effects:["waitForOpenDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed"},BLUR:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"DELAY.OPEN":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}},closing:{tags:["open"],effects:["trackPointerMove","trackInteractOutside","waitForCloseDelay"],on:{"CONTROLLED.OPEN":{target:"open"},"CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]},MENU_POINTERENTER:{target:"open",actions:["clearIntentPolygon"]},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem"]}],"DELAY.CLOSE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHighlightedItem","invokeOnClose"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer","clearAnchorPoint"],on:{"CONTROLLED.OPEN":[{guard:ple("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:["highlightFirstItem"]},{guard:"isArrowUpEvent",target:"open",actions:["highlightLastItem"]},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:["setAnchorPoint"]},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:{target:"idle"},ARROW_DOWN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],effects:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:zl(Ar("isTriggerItem"),"isOpenControlled"),actions:["invokeOnClose"]},{guard:Ar("isTriggerItem"),target:"closed",actions:["invokeOnClose"]}],CONTEXT_MENU:{actions:["setAnchorPoint","focusMenu"]},ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:zl("isSubmenu","isOpenControlled"),actions:["invokeOnClose"]},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},ENTER:[{guard:"isTriggerItemHighlighted",actions:["openSubmenu"]},{actions:["clickHighlightedItem"]}],ITEM_POINTERMOVE:[{guard:Ar("isPointerSuspended"),actions:["setHighlightedItem","focusMenu"]},{actions:["setLastHighlightedItem"]}],ITEM_POINTERLEAVE:{guard:zl(Ar("isPointerSuspended"),Ar("isTriggerItem")),actions:["clearHighlightedItem"]},ITEM_CLICK:[{guard:zl(Ar("isTriggerItemHighlighted"),Ar("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:zl(Ar("isTriggerItemHighlighted"),Ar("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:zl(Ar("isTriggerItemHighlighted"),Ar("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:["setHighlightedItem"]}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",actions:["setIntentPolygon"]},TRIGGER_POINTERLEAVE:{target:"closing"},ITEM_POINTERDOWN:{actions:["setHighlightedItem"]},TYPEAHEAD:{actions:["highlightMatchedItem"]},FOCUS_MENU:{actions:["focusMenu"]},"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{closeOnSelect:({prop:e,event:t})=>!!(t?.closeOnSelect??e("closeOnSelect")),isTriggerItem:({event:e})=>cle(e.target),isTriggerItemHighlighted:({event:e,scope:t,computed:n})=>!!(e.target??t.getById(n("highlightedId")))?.hasAttribute("aria-controls"),isSubmenu:({context:e})=>e.get("isSubmenu"),isPointerSuspended:({context:e})=>e.get("suspendPointer"),isHighlightedItemEditable:({scope:e,computed:t})=>bw(e.getById(t("highlightedId"))),isOpenControlled:({prop:e})=>e("open")!==void 0,isArrowLeftEvent:({event:e})=>e.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:({event:e})=>e.previousEvent?.type==="ARROW_UP",isArrowDownEvent:({event:e})=>e.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:({event:e})=>e.previousEvent?.type==="OPEN_AUTOFOCUS"},effects:{waitForOpenDelay({send:e}){const t=setTimeout(()=>{e({type:"DELAY.OPEN"})},100);return()=>clearTimeout(t)},waitForCloseDelay({send:e}){const t=setTimeout(()=>{e({type:"DELAY.CLOSE"})},300);return()=>clearTimeout(t)},waitForLongPress({send:e}){const t=setTimeout(()=>{e({type:"LONG_PRESS.OPEN"})},700);return()=>clearTimeout(t)},trackPositioning({context:e,prop:t,scope:n,refs:r}){if(qb(n))return;const o={...t("positioning"),...r.get("positioningOverride")};e.set("currentPlacement",o.placement);const i=()=>hO(n);return _p(Zf(n),i,{...o,defer:!0,onComplete(s){e.set("currentPlacement",s.placement)}})},trackInteractOutside({refs:e,scope:t,prop:n,context:r,send:o}){const i=()=>hs(t);let s=!0;return Rv(i,{type:"menu",defer:!0,exclude:[Zf(t)],onInteractOutside:n("onInteractOutside"),onRequestDismiss:n("onRequestDismiss"),onFocusOutside(a){n("onFocusOutside")?.(a);const l=Yn(a.detail.originalEvent);if(Ds(qb(t),l)){a.preventDefault();return}},onEscapeKeyDown(a){n("onEscapeKeyDown")?.(a),r.get("isSubmenu")&&a.preventDefault(),gO({parent:e.get("parent")})},onPointerDownOutside(a){n("onPointerDownOutside")?.(a);const l=Yn(a.detail.originalEvent);if(Ds(qb(t),l)&&a.detail.contextmenu){a.preventDefault();return}s=!a.detail.focusable},onDismiss(){o({type:"CLOSE",src:"interact-outside",restoreFocus:s})}})},trackPointerMove({context:e,scope:t,send:n,refs:r,flush:o}){const i=r.get("parent");o(()=>{i.context.set("suspendPointer",!0)});const s=t.getDoc();return Ft(s,"pointermove",a=>{hle(e.get("intentPolygon"),{x:a.clientX,y:a.clientY})||(n({type:"POINTER_MOVED_AWAY_FROM_SUBMENU"}),i.context.set("suspendPointer",!1))})},scrollToHighlightedItem({event:e,scope:t,computed:n}){const r=()=>{if(e.current().type.startsWith("ITEM_POINTER"))return;const i=t.getById(n("highlightedId")),s=hs(t);fie(i,{rootEl:s,block:"nearest"})};return tt(()=>r()),vA(()=>hs(t),{defer:!0,attributes:["aria-activedescendant"],callback:r})}},actions:{setAnchorPoint({context:e,event:t}){e.set("anchorPoint",n=>vu(n,t.point)?n:t.point)},setSubmenuPlacement({context:e,computed:t,refs:n}){if(!e.get("isSubmenu"))return;const r=t("isRtl")?"left-start":"right-start";n.set("positioningOverride",{placement:r,gutter:0})},reposition({context:e,scope:t,prop:n,event:r,refs:o}){const i=()=>hO(t),s=e.get("anchorPoint"),a=s?()=>({width:0,height:0,...s}):void 0,l={...n("positioning"),...o.get("positioningOverride")};_p(Zf(t),i,{...l,defer:!0,getAnchorRect:a,...r.options??{},listeners:!1,onComplete(c){e.set("currentPlacement",c.placement)}})},setOptionState({event:e}){if(!e.option)return;const{checked:t,onCheckedChange:n,type:r}=e.option;r==="radio"?n?.(!0):r==="checkbox"&&n?.(!t)},clickHighlightedItem({scope:e,computed:t,prop:n,context:r}){const o=e.getById(t("highlightedId"));if(!o||o.dataset.disabled)return;const i=r.get("highlightedValue");Soe(o)?n("navigate")?.({value:i,node:o,href:o.href}):queueMicrotask(()=>o.click())},setIntentPolygon({context:e,scope:t,event:n}){const r=hs(t),o=e.get("currentPlacement");if(!r||!o)return;const i=r.getBoundingClientRect(),s=Zae(i,o);if(!s)return;const l=Oae(o)==="right"?-5:5;e.set("intentPolygon",[{...n.point,x:n.point.x+l},...s])},clearIntentPolygon({context:e}){e.set("intentPolygon",null)},clearAnchorPoint({context:e}){e.set("anchorPoint",null)},resumePointer({refs:e,flush:t}){const n=e.get("parent");n&&t(()=>{n.context.set("suspendPointer",!1)})},setHighlightedItem({context:e,event:t}){const n=t.value||$a(t.target);e.set("highlightedValue",n)},clearHighlightedItem({context:e}){e.set("highlightedValue",null)},focusMenu({scope:e}){tt(()=>{const t=hs(e);jg({root:t,enabled:!Ds(t,e.getActiveElement()),filter(r){return!r.role?.startsWith("menuitem")}})?.focus({preventScroll:!0})})},highlightFirstItem({context:e,scope:t}){(hs(t)?queueMicrotask:tt)(()=>{const r=ole(t);r&&e.set("highlightedValue",$a(r))})},highlightLastItem({context:e,scope:t}){(hs(t)?queueMicrotask:tt)(()=>{const r=ile(t);r&&e.set("highlightedValue",$a(r))})},highlightNextItem({context:e,scope:t,event:n,prop:r}){const o=sle(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:r("loopFocus")});e.set("highlightedValue",$a(o))},highlightPrevItem({context:e,scope:t,event:n,prop:r}){const o=ale(t,{loop:n.loop,value:e.get("highlightedValue"),loopFocus:r("loopFocus")});e.set("highlightedValue",$a(o))},invokeOnSelect({context:e,prop:t,scope:n}){const r=e.get("highlightedValue");if(r==null)return;const o=rle(n,r);ule(o,r),t("onSelect")?.({value:r})},focusTrigger({scope:e,context:t,event:n}){t.get("isSubmenu")||t.get("anchorPoint")||n.restoreFocus===!1||queueMicrotask(()=>Zf(e)?.focus({preventScroll:!0}))},highlightMatchedItem({scope:e,context:t,event:n,refs:r}){const o=lle(e,{key:n.key,value:t.get("highlightedValue"),typeaheadState:r.get("typeaheadState")});o&&t.set("highlightedValue",$a(o))},setParentMenu({refs:e,event:t,context:n}){e.set("parent",t.value),n.set("isSubmenu",!0)},setChildMenu({refs:e,event:t}){const n=e.get("children");n[t.id]=t.value,e.set("children",n)},closeRootMenu({refs:e}){gO({parent:e.get("parent")})},openSubmenu({refs:e,scope:t,computed:n}){const o=t.getById(n("highlightedId"))?.getAttribute("data-uid"),i=e.get("children");(o?i[o]:null)?.send({type:"OPEN_AUTOFOCUS"})},focusParentMenu({refs:e}){e.get("parent")?.send({type:"FOCUS_MENU"})},setLastHighlightedItem({context:e,event:t}){e.set("lastHighlightedValue",$a(t.target))},restoreHighlightedItem({context:e}){e.get("lastHighlightedValue")&&(e.set("highlightedValue",e.get("lastHighlightedValue")),e.set("lastHighlightedValue",null))},restoreParentHighlightedItem({refs:e}){e.get("parent")?.send({type:"HIGHLIGHTED.RESTORE"})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};function gO(e){let t=e.parent;for(;t&&t.context.get("isSubmenu");)t=t.refs.get("parent");t?.send({type:"CLOSE"})}function hle(e,t){return e?Qae(e,t):!1}function gle(e,t,n){const r=Object.keys(e).length>0;if(!t)return null;if(!r)return kp(n,t);for(const o in e){const i=e[o],s=Yg(i.scope);if(s===t)return s}return kp(n,t)}en()(["anchorPoint","aria-label","closeOnSelect","composite","defaultHighlightedValue","defaultOpen","dir","getRootNode","highlightedValue","id","ids","loopFocus","navigate","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","onSelect","open","positioning","typeahead"]);en()(["closeOnSelect","disabled","value","valueText"]);en()(["htmlFor"]);en()(["id"]);en()(["checked","closeOnSelect","disabled","onCheckedChange","type","value","valueText"]);const[TCe,Zi]=Tt("EnvironmentContext"),Qi=A(()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})),es=A(()=>({dir:"ltr",locale:"en-US"})),[SCe,ts]=Tt("LocaleContext"),da=e=>{const t={};for(const[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},mle=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const l=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...da(l),onOpenChange:c=>{t?.("openChange",c),t?.("update:open",c.open),l.onOpenChange?.(c)},onEscapeKeyDown:c=>{t?.("escapeKeyDown",c),l.onEscapeKeyDown?.(c)},onFocusOutside:c=>{t?.("focusOutside",c),l.onFocusOutside?.(c)},onHighlightChange:c=>{t?.("highlightChange",c),t?.("update:highlightedValue",c.highlightedValue),l.onHighlightChange?.(c)},onInteractOutside:c=>{t?.("interactOutside",c),l.onInteractOutside?.(c)},onPointerDownOutside:c=>{t?.("pointerDownOutside",c),l.onPointerDownOutside?.(c)},onSelect:c=>{t?.("select",c),l.onSelect?.(c)}}}),s=Ji(fle,i);return{api:A(()=>dle(s,ua)),machine:s}},vle=P({__name:"menu-root",props:Ze({anchorPoint:{},"aria-label":{},closeOnSelect:{type:Boolean},composite:{type:Boolean},defaultHighlightedValue:{},defaultOpen:{type:Boolean},highlightedValue:{},id:{},ids:{},loopFocus:{type:Boolean},navigate:{type:Function},open:{type:Boolean},positioning:{},typeahead:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,composite:void 0,defaultOpen:void 0,loopFocus:void 0,open:void 0,typeahead:void 0}),emits:["escapeKeyDown","focusOutside","highlightChange","interactOutside","openChange","pointerDownOutside","requestDismiss","select","update:open","update:highlightedValue"],setup(e,{emit:t}){const n=e,r=t,{api:o,machine:i}=mle(n,r),s=ln(),a=TA();return Je(()=>{a&&(s.value.setChild(i),o.value.setParent(a))}),SA(A(()=>s.value.getTriggerItemProps(o.value))),IA(i),kA(o),ui(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ee(),(l,c)=>L(l.$slots,"default")}}),ble=P({__name:"menu-separator",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).hr,F(d(t).getSeparatorProps(),{"as-child":n.asChild}),null,16,["as-child"]))}}),yle=P({__name:"menu-trigger-item",props:{asChild:{type:Boolean}},setup(e){const t=mse();return Ov(A(()=>({value:t.value?.["data-value"]}))),ee(),(n,r)=>(y(),$(d(te).div,F(d(t),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),xle=P({__name:"menu-trigger",props:{asChild:{type:Boolean}},setup(e){const t=ln();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ge=Object.freeze(Object.defineProperty({__proto__:null,Arrow:Zie,ArrowTip:Jie,CheckboxItem:ese,Content:tse,Context:rse,ContextTrigger:nse,Indicator:ose,Item:use,ItemContext:ise,ItemGroup:ase,ItemGroupLabel:sse,ItemIndicator:lse,ItemText:cse,Positioner:fse,RadioItem:gse,RadioItemGroup:hse,Root:vle,RootProvider:vse,Separator:ble,Trigger:xle,TriggerItem:yle},Symbol.toStringTag,{value:"Module"})),wle=P({__name:"LocaleSelector",props:at({channel:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{t:n}=Et(),r=window.editorConfig.channels||[],o=rt(e,"modelValue"),i=A(()=>{let l=r.find(c=>c.code===t.channel);return l||(l=r[0]),l.locales}),s=A(()=>i.value.find(l=>l.code===o.value)?.name);Nm(()=>{o.value||(o.value=i.value[0].code)}),st(()=>t.channel,l=>{i.value.find(u=>u.code===o.value)||(o.value=i.value[0].code)});function a({value:l}){o.value=l}return(l,c)=>{const u=Bre,p=mu;return d(i)&&d(i).length>1?(y(),$(d(Ge).Root,{key:0,positioning:{gutter:4},onSelect:a},{default:O(()=>[S(d(Ge).Trigger,{asChild:"",class:"min-w-32 py-2 appearance-none rounded-lg cursor-pointer inline-flex gap-3 outline-none relative select-none items-center justify-center hover:bg-gray-200"},{default:O(()=>[S(d(Vt),null,{default:O(()=>[S(u,{class:"inline w-4"}),re(" "+j(d(s))+" ",1),S(d(Ge).Indicator,null,{default:O(()=>[S(p,{class:"inline w-4"})]),_:1})]),_:1})]),_:1}),S(d(Ge).Positioner,{class:"w-56"},{default:O(()=>[S(d(Ge).Content,{class:"pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in"},{default:O(()=>[S(d(Ge).ItemGroup,{class:"flex flex-col"},{default:O(()=>[S(d(Ge).ItemGroupLabel,{class:"px-2.5 mb-1 text-zinc-700"},{default:O(()=>[re(j(d(n)("Locales")),1)]),_:1}),(y(!0),V(ge,null,Ie(d(i),h=>(y(),$(d(Ge).Item,{key:h.code,value:h.code,class:"rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-zinc-100"},{default:O(()=>[re(j(h.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})):Z("",!0)}}}),_le={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kle(e,t){return y(),V("svg",_le,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3 3 0 0 0 3.75-.615A3 3 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a3 3 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015q.062.07.128.136a3 3 0 0 0 3.622.478m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75"},null,-1)])])}const Cle=fe({name:"heroicons-building-storefront",render:kle}),Ele=P({__name:"ChannelSelector",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t}=Et(),{channels:n}=Dt(),r=rt(e,"modelValue"),o=A(()=>n.value.find(s=>s.code===r.value)?.name);function i({value:s}){r.value=s}return(s,a)=>{const l=Cle,c=mu;return d(n).length>1?(y(),$(d(Ge).Root,{key:0,positioning:{gutter:4},onSelect:i},{default:O(()=>[S(d(Ge).Trigger,{asChild:""},{default:O(()=>[S(d(Vt),null,{default:O(()=>[S(l,{class:"inline w-4"}),re(" "+j(d(o))+" ",1),S(d(Ge).Indicator,null,{default:O(()=>[S(c,{class:"inline w-4"})]),_:1})]),_:1})]),_:1}),S(d(Ge).Positioner,{class:"w-56"},{default:O(()=>[S(d(Ge).Content,{class:"pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in"},{default:O(()=>[S(d(Ge).ItemGroup,{class:"flex flex-col"},{default:O(()=>[S(d(Ge).ItemGroupLabel,{class:"px-2.5 mb-1 text-zinc-700"},{default:O(()=>[re(j(d(t)("Channels")),1)]),_:1}),(y(!0),V(ge,null,Ie(d(n),u=>(y(),$(d(Ge).Item,{key:u.code,value:u.code,class:"rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-zinc-100"},{default:O(()=>[re(j(u.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1})]),_:1})):Z("",!0)}}});function Ole(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fh={exports:{}};var Ile=Fh.exports,mO;function Tle(){return mO||(mO=1,(function(e,t){(function(n,r){e.exports=r()})(Ile,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};n.configure=function(g){var m,b;for(m in g)b=g[m],b!==void 0&&g.hasOwnProperty(m)&&(r[m]=b);return this},n.status=null,n.set=function(g){var m=n.isStarted();g=o(g,r.minimum,1),n.status=g===1?null:g;var b=n.render(!m),w=b.querySelector(r.barSelector),E=r.speed,k=r.easing;return b.offsetWidth,a(function(v){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),l(w,s(g,E,k)),g===1?(l(b,{transition:"none",opacity:1}),b.offsetWidth,setTimeout(function(){l(b,{transition:"all "+E+"ms linear",opacity:0}),setTimeout(function(){n.remove(),v()},E)},E)):setTimeout(v,E)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var g=function(){setTimeout(function(){n.status&&(n.trickle(),g())},r.trickleSpeed)};return r.trickle&&g(),this},n.done=function(g){return!g&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(g){var m=n.status;return m?(typeof g!="number"&&(g=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+g,0,.994),n.set(m)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},(function(){var g=0,m=0;n.promise=function(b){return!b||b.state()==="resolved"?this:(m===0&&n.start(),g++,m++,b.always(function(){m--,m===0?(g=0,n.done()):n.set((g-m)/g)}),this)}})(),n.render=function(g){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=r.template;var b=m.querySelector(r.barSelector),w=g?"-100":i(n.status||0),E=document.querySelector(r.parent),k;return l(b,{transition:"all 0 linear",transform:"translate3d("+w+"%,0,0)"}),r.showSpinner||(k=m.querySelector(r.spinnerSelector),k&&f(k)),E!=document.body&&u(E,"nprogress-custom-parent"),E.appendChild(m),m},n.remove=function(){p(document.documentElement,"nprogress-busy"),p(document.querySelector(r.parent),"nprogress-custom-parent");var g=document.getElementById("nprogress");g&&f(g)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var g=document.body.style,m="WebkitTransform"in g?"Webkit":"MozTransform"in g?"Moz":"msTransform"in g?"ms":"OTransform"in g?"O":"";return m+"Perspective"in g?"translate3d":m+"Transform"in g?"translate":"margin"};function o(g,m,b){return gb?b:g}function i(g){return(-1+g)*100}function s(g,m,b){var w;return r.positionUsing==="translate3d"?w={transform:"translate3d("+i(g)+"%,0,0)"}:r.positionUsing==="translate"?w={transform:"translate("+i(g)+"%,0)"}:w={"margin-left":i(g)+"%"},w.transition="all "+m+"ms "+b,w}var a=(function(){var g=[];function m(){var b=g.shift();b&&b(m)}return function(b){g.push(b),g.length==1&&m()}})(),l=(function(){var g=["Webkit","O","Moz","ms"],m={};function b(v){return v.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(_,T){return T.toUpperCase()})}function w(v){var _=document.body.style;if(v in _)return v;for(var T=g.length,N=v.charAt(0).toUpperCase()+v.slice(1),C;T--;)if(C=g[T]+N,C in _)return C;return v}function E(v){return v=b(v),m[v]||(m[v]=w(v))}function k(v,_,T){_=E(_),v.style[_]=T}return function(v,_){var T=arguments,N,C;if(T.length==2)for(N in _)C=_[N],C!==void 0&&_.hasOwnProperty(N)&&k(v,N,C);else k(v,T[1],T[2])}})();function c(g,m){var b=typeof g=="string"?g:h(g);return b.indexOf(" "+m+" ")>=0}function u(g,m){var b=h(g),w=b+m;c(b,m)||(g.className=w.substring(1))}function p(g,m){var b=h(g),w;c(g,m)&&(w=b.replace(" "+m+" "," "),g.className=w.substring(1,w.length-1))}function h(g){return(" "+(g.className||"")+" ").replace(/\s+/gi," ")}function f(g){g&&g.parentNode&&g.parentNode.removeChild(g)}return n})})(Fh)),Fh.exports}var Sle=Tle();const Kc=Ole(Sle);function UA(e,t){const n=new URL(window.location.href);n.searchParams.set(e,t),window.history.replaceState({},"",n.toString())}function jA(e){return new URL(window.location.href).searchParams.get(e)}function Lw(e){const t=new URL(window.location.href);t.searchParams.delete(e),window.history.replaceState({},"",t.toString())}function kl(){return dt(S_)}const Ple=["innerHTML"],$le=["innerHTML"],Rle=["innerHTML"],Ale=P({__name:"TemplateSelector",setup(e){const t=kl(),{currentTemplate:n,templates:r,theme:o,channel:i,locale:s,state:a}=Dt();function l({value:c}){const u=r.value.find(p=>p.template===c);if(u&&t){a.pageData?.template!==c&&(a.pageData&&(a.pageData.template=c),t.engine.setPage({regions:[],blocks:{}})),UA("template",c),Lw("block"),Kc.start();const p=new URL(u.previewUrl);p.searchParams.set("_designMode",o.value.code),p.searchParams.set("channel",i.value),p.searchParams.set("locale",s.value),t.preview.loadUrl(p.href)}}return(c,u)=>{const p=mu;return y(),$(d(Ge).Root,{onSelect:l,positioning:{gutter:4,strategy:"fixed",placement:"bottom"}},{default:O(()=>[S(d(Ge).Trigger,{asChild:""},{default:O(()=>[S(d(Vt),null,{default:O(()=>[d(n)?(y(),V(ge,{key:0},[D("span",{innerHTML:d(n).icon},null,8,Ple),re(" "+j(d(n).label),1)],64)):d(r).length>0?(y(),V(ge,{key:1},[D("span",{innerHTML:d(r)[0].icon},null,8,$le),re(" "+j(d(r)[0].label),1)],64)):(y(),V(ge,{key:2},[re(" Select Template ")],64)),S(d(Ge).Indicator,null,{default:O(()=>[S(p,{class:"inline w-4"})]),_:1})]),_:1})]),_:1}),S(d(Ge).Positioner,{class:"w-64"},{default:O(()=>[S(d(Ge).Content,{class:"pointer-events-none border shadow flex gap-1 p-1 flex-col outline-none rounded bg-white data-[state=open]:animate-fade-in"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(r),h=>(y(),V(ge,{key:h.template},[h.template==="__separator__"?(y(),$(d(Ge).Separator,{key:0})):(y(),$(d(Ge).Item,{key:1,value:h.template,class:"rounded cursor-pointer flex items-center h-9 px-3 gap-3 hover:bg-gray-200"},{default:O(()=>[D("span",{innerHTML:h.icon},null,8,Rle),re(" "+j(h.label),1)]),_:2},1032,["value"]))],64))),128))]),_:1})]),_:1})]),_:1})}}}),Nle={class:"flex-1 flex justify-start items-center gap-2"},Mle=P({__name:"HeaderTools",setup(e){const t=kl(),{channel:n,locale:r,state:o}=Dt();function i(l){o.channel=l;const u=window.editorConfig.channels.find(p=>p.code===l);u&&!u.locales.find(p=>p.code===o.locale)&&(o.locale=u.default_locale),a()}function s(l){o.locale=l,a()}function a(){const l=new URL(t.preview.getFrame().src);l.searchParams.set("channel",o.channel),l.searchParams.set("locale",o.locale),t.preview.loadUrl(l.href)}return(l,c)=>{const u=Ale,p=Ele,h=wle;return y(),V("div",Nle,[S(u),S(p,{"model-value":d(n),"onUpdate:modelValue":i},null,8,["model-value"]),S(h,{channel:d(n),"model-value":d(r),"onUpdate:modelValue":s},null,8,["channel","model-value"])])}}}),[GA,uf]=Tt("AccordionContext"),Dle=P({__name:"accordion-context",setup(e){const t=uf();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),[WA,df]=Tt("CollapsibleContext"),Lle=P({__name:"collapsible-content",props:{asChild:{type:Boolean}},setup(e){const t=df();return ee(),(n,r)=>d(t).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(t).getContentProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vle=P({__name:"collapsible-context",setup(e){const t=df();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Fle=P({__name:"collapsible-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return WA(n),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var Ble=_r("collapsible").parts("root","trigger","content","indicator"),eh=Ble.build(),Hle=e=>e.ids?.root??`collapsible:${e.id}`,Y0=e=>e.ids?.content??`collapsible:${e.id}:content`,zle=e=>e.ids?.trigger??`collapsible:${e.id}:trigger`,th=e=>e.getById(Y0(e));function Ule(e,t){const{state:n,send:r,context:o,scope:i,prop:s}=e,a=n.matches("open")||n.matches("closing"),l=n.matches("open"),{width:c,height:u}=o.get("size"),p=!!s("disabled"),h=!o.get("initial")&&l,f="ltr";return{disabled:p,visible:a,open:l,measureSize(){r({type:"size.measure"})},setOpen(g){n.matches("open")!==g&&r({type:g?"open":"close"})},getRootProps(){return t.element({...eh.root.attrs,"data-state":l?"open":"closed",dir:f,id:Hle(i)})},getContentProps(){return t.element({...eh.content.attrs,"data-collapsible":"","data-state":h?void 0:l?"open":"closed",id:Y0(i),"data-disabled":Y(p),hidden:!a,style:{"--height":u!=null?`${u}px`:void 0,"--width":c!=null?`${c}px`:void 0}})},getTriggerProps(){return t.element({...eh.trigger.attrs,id:zle(i),dir:f,type:"button","data-state":l?"open":"closed","data-disabled":Y(p),"aria-controls":Y0(i),"aria-expanded":a||!1,onClick(g){g.defaultPrevented||p||r({type:l?"close":"open"})}})},getIndicatorProps(){return t.element({...eh.indicator.attrs,dir:f,"data-state":l?"open":"closed","data-disabled":Y(p)})}}}var jle={initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{size:e(()=>({defaultValue:{height:0,width:0},sync:!0})),initial:e(()=>({defaultValue:!1}))}},refs(){return{cleanup:void 0,stylesRef:void 0}},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["setInitial","computeSize","toggleVisibility"])})},exit:["clearInitial","cleanupNode"],states:{closed:{on:{"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","computeSize","invokeOnOpen"]}]}},closing:{effects:["trackExitAnimation"],on:{"controlled.close":{target:"closed"},"controlled.open":{target:"open"},open:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["setInitial","invokeOnOpen"]}],close:[{guard:"isOpenControlled",actions:["invokeOnExitComplete"]},{target:"closed",actions:["setInitial","computeSize","invokeOnExitComplete"]}],"animation.end":{target:"closed",actions:["invokeOnExitComplete","clearInitial"]}}},open:{effects:["trackEnterAnimation"],on:{"controlled.close":{target:"closing"},close:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closing",actions:["setInitial","computeSize","invokeOnClose"]}],"size.measure":{actions:["measureSize"]},"animation.end":{actions:["clearInitial"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackEnterAnimation:({send:e,scope:t})=>{let n;const r=tt(()=>{const o=th(t);if(!o)return;const i=jc(o).animationName;if(!i||i==="none"){e({type:"animation.end"});return}const a=l=>{Yn(l)===o&&e({type:"animation.end"})};o.addEventListener("animationend",a),n=()=>{o.removeEventListener("animationend",a)}});return()=>{r(),n?.()}},trackExitAnimation:({send:e,scope:t})=>{let n;const r=tt(()=>{const o=th(t);if(!o)return;const i=jc(o).animationName;if(!i||i==="none"){e({type:"animation.end"});return}const a=c=>{Yn(c)===o&&e({type:"animation.end"})};o.addEventListener("animationend",a);const l=yp(o,{animationFillMode:"forwards"});n=()=>{o.removeEventListener("animationend",a),_w(()=>l())}});return()=>{r(),n?.()}}},actions:{setInitial:({context:e,flush:t})=>{t(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("stylesRef",null)},measureSize:({context:e,scope:t})=>{const n=th(t);if(!n)return;const{height:r,width:o}=n.getBoundingClientRect();e.set("size",{height:r,width:o})},computeSize:({refs:e,scope:t,context:n})=>{e.get("cleanup")?.();const r=tt(()=>{const o=th(t);if(!o)return;const i=o.hidden;o.style.animationName="none",o.style.animationDuration="0s",o.hidden=!1;const s=o.getBoundingClientRect();n.set("size",{height:s.height,width:s.width}),n.get("initial")&&(o.style.animationName="",o.style.animationDuration=""),o.hidden=i});e.set("cleanup",r)},invokeOnOpen:({prop:e})=>{e("onOpenChange")?.({open:!0})},invokeOnClose:({prop:e})=>{e("onOpenChange")?.({open:!1})},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},toggleVisibility:({prop:e,send:t})=>{t({type:e("open")?"controlled.open":"controlled.close"})}}}};en()(["dir","disabled","getRootNode","id","ids","onExitComplete","onOpenChange","defaultOpen","open"]);const Gle=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const c=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...da(c),onExitComplete:()=>{t?.("exitComplete"),c.onExitComplete?.()},onOpenChange:u=>{t?.("openChange",u),t?.("update:open",u.open),c.onOpenChange?.(u)}}}),s=Ji(jle,i),a=A(()=>Ule(s,ua)),l=Q(!1);return st(()=>a.value.visible,()=>{a.value.visible&&(l.value=!0)}),A(()=>{const c=pe(e);return{...a.value,unmounted:!a.value.visible&&!l.value&&c.lazyMount||c.unmountOnExit&&!a.value.visible&&l.value}})},Wle=P({__name:"collapsible-root",props:Ze({defaultOpen:{type:Boolean},disabled:{type:Boolean},id:{},ids:{},lazyMount:{type:Boolean},open:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{defaultOpen:void 0,disabled:void 0,lazyMount:void 0,open:void 0,unmountOnExit:void 0}),emits:["exitComplete","openChange","update:open"],setup(e,{emit:t}){const o=Gle(e,t);return WA(o),ee(),(i,s)=>(y(),$(d(te).div,F(d(o).getRootProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),qle=P({__name:"collapsible-trigger",props:{asChild:{type:Boolean}},setup(e){const t=df();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Kle=P({__name:"collapsible-indicator",props:{asChild:{type:Boolean}},setup(e){const t=df();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),qA=Object.freeze(Object.defineProperty({__proto__:null,Content:Lle,Context:Vle,Indicator:Kle,Root:Wle,RootProvider:Fle,Trigger:qle},Symbol.toStringTag,{value:"Module"}));var Yle=Object.defineProperty,Xle=(e,t,n)=>t in e?Yle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vw=(e,t,n)=>Xle(e,t+"",n),Jle=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,0),rgb(${n},255,0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(${n},0,255),rgb(${n},255,255))`,WebkitMaskImage:r,maskImage:r}}},Zle=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},0),rgb(255,${n},0))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,${n},255),rgb(255,${n},255))`,WebkitMaskImage:r,maskImage:r}}},Qle=(e,t,n)=>{const r=`linear-gradient(to ${e[+!t]}, transparent, #000)`;return{areaStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,0,${n}),rgb(255,0,${n}))`},areaGradientStyles:{backgroundImage:`linear-gradient(to ${e[Number(t)]},rgb(0,255,${n}),rgb(255,255,${n}))`,WebkitMaskImage:r,maskImage:r}}},ece=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,`linear-gradient(to ${e[+!t]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,`hsl(${n}, 100%, 50%)`].join(",")}}),tce=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]}, hsla(0,0%,0%,${n}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${n}) 100%)`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,"hsl(0, 0%, 50%)"].join(",")}}),nce=(e,t,n)=>({areaStyles:{},areaGradientStyles:{backgroundImage:[`linear-gradient(to ${e[+!t]},hsl(0,0%,${n}%),hsla(0,0%,${n}%,0))`,`linear-gradient(to ${e[Number(t)]},hsl(0,100%,${n}%),hsl(60,100%,${n}%),hsl(120,100%,${n}%),hsl(180,100%,${n}%),hsl(240,100%,${n}%),hsl(300,100%,${n}%),hsl(360,100%,${n}%))`].join(",")}}),rce=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[Number(t)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,`hsl(${n}, 100%, 50%)`].join(",")}}),oce=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,0%,${n}),hsla(0,0%,0%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,`linear-gradient(to ${e[+!t]},hsl(0,0%,0%),hsl(0,0%,100%))`].join(",")}}),ice=(e,t,n)=>({areaStyles:{},areaGradientStyles:{background:[`linear-gradient(to ${e[+!t]},hsla(0,0%,100%,${n}),hsla(0,0%,100%,0))`,`linear-gradient(to ${e[Number(t)]},hsla(0,100%,50%,${n}),hsla(60,100%,50%,${n}),hsla(120,100%,50%,${n}),hsla(180,100%,50%,${n}),hsla(240,100%,50%,${n}),hsla(300,100%,50%,${n}),hsla(359,100%,50%,${n}))`,"#000"].join(",")}});function vO(e,t){const{xChannel:n,yChannel:r,dir:o="ltr"}=t,{zChannel:i}=e.getColorAxes({xChannel:n,yChannel:r}),s=e.getChannelValue(i),{minValue:a,maxValue:l}=e.getChannelRange(i),c=["top",o==="rtl"?"left":"right"];let u=!1,p={areaStyles:{},areaGradientStyles:{}},h=(s-a)/(l-a),f=e.getFormat()==="hsla";switch(i){case"red":{u=n==="green",p=Jle(c,u,s);break}case"green":{u=n==="red",p=Zle(c,u,s);break}case"blue":{u=n==="red",p=Qle(c,u,s);break}case"hue":{u=n!=="saturation",f?p=ece(c,u,s):p=rce(c,u,s);break}case"saturation":{u=n==="hue",f?p=tce(c,u,h):p=oce(c,u,h);break}case"brightness":{u=n==="hue",p=ice(c,u,h);break}case"lightness":{u=n==="hue",p=nce(c,u,s);break}}return p}var sce=(e,t)=>{if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0},Fw=class{toHexInt(){return this.toFormat("rgba").toHexInt()}getChannelValue(e){if(e in this)return this[e];throw new Error("Unsupported color channel: "+e)}getChannelValuePercent(e,t){const n=t??this.getChannelValue(e),{minValue:r,maxValue:o}=this.getChannelRange(e);return yv(n,r,o)}getChannelPercentValue(e,t){const{minValue:n,maxValue:r,step:o}=this.getChannelRange(e),i=gw(t,n,r,o);return gp(i,n,r,o)}withChannelValue(e,t){const{minValue:n,maxValue:r}=this.getChannelRange(e);if(e in this){let o=this.clone();return o[e]=pn(t,n,r),o}throw new Error("Unsupported color channel: "+e)}getColorAxes(e){let{xChannel:t,yChannel:n}=e,r=t||this.getChannels().find(s=>s!==n),o=n||this.getChannels().find(s=>s!==r),i=this.getChannels().find(s=>s!==r&&s!==o);return{xChannel:r,yChannel:o,zChannel:i}}incrementChannel(e,t){const{minValue:n,maxValue:r,step:o}=this.getChannelRange(e),i=gp(pn(this.getChannelValue(e)+t,n,r),n,r,o);return this.withChannelValue(e,i)}decrementChannel(e,t){return this.incrementChannel(e,-t)}isEqual(e){return sce(this.toJSON(),e.toJSON())&&this.getChannelValue("alpha")===e.getChannelValue("alpha")}},ace=/^#[\da-f]+$/i,lce=/^rgba?\((.*)\)$/,cce=/[^#]/gi,KA=class Bh extends Fw{constructor(t,n,r,o){super(),this.red=t,this.green=n,this.blue=r,this.alpha=o}static parse(t){let n=[];if(ace.test(t)&&[4,5,7,9].includes(t.length)){const o=(t.length<6?t.replace(cce,"$&$&"):t).slice(1).split("");for(;o.length>0;)n.push(parseInt(o.splice(0,2).join(""),16));n[3]=n[3]!==void 0?n[3]/255:void 0}const r=t.match(lce);return r?.[1]&&(n=r[1].split(",").map(o=>Number(o.trim())).map((o,i)=>pn(o,0,i<3?255:1))),n.length<3?void 0:new Bh(n[0],n[1],n[2],n[3]??1)}toString(t){switch(t){case"hex":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")).toUpperCase();case"hexa":return"#"+(this.red.toString(16).padStart(2,"0")+this.green.toString(16).padStart(2,"0")+this.blue.toString(16).padStart(2,"0")+Math.round(this.alpha*255).toString(16).padStart(2,"0")).toUpperCase();case"rgb":return`rgb(${this.red}, ${this.green}, ${this.blue})`;case"css":case"rgba":return`rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"hsb":return this.toHSB().toString("hsb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"rgba":return this;case"hsba":return this.toHSB();case"hsla":return this.toHSL();default:throw new Error("Unsupported color conversion: rgb -> "+t)}}toHexInt(){return this.red<<16|this.green<<8|this.blue}toHSB(){const t=this.red/255,n=this.green/255,r=this.blue/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o,a=i===0?0:s/i;let l=0;if(s!==0){switch(i){case t:l=(n-r)/s+(nNumber(a.trim().replace("%","")));return new Hh(iA(r,360),pn(o,0,100),pn(i,0,100),pn(s??1,0,1))}}toString(t){switch(t){case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsl":return`hsl(${this.hue}, ${_t(this.saturation,2)}%, ${_t(this.lightness,2)}%)`;case"css":case"hsla":return`hsla(${this.hue}, ${_t(this.saturation,2)}%, ${_t(this.lightness,2)}%, ${this.alpha})`;case"hsb":return this.toHSB().toString("hsb");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsla":return this;case"hsba":return this.toHSB();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsl -> "+t)}}toHSB(){let t=this.saturation/100,n=this.lightness/100,r=n+t*Math.min(n,1-n);return t=r===0?0:2*(1-n/r),new zw(_t(this.hue,2),_t(t*100,2),_t(r*100,2),_t(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,r=this.lightness/100,o=n*Math.min(r,1-r),i=(s,a=(s+t/30)%12)=>r-o*Math.max(Math.min(a-3,9-a,1),-1);return new Bw(Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255),_t(this.alpha,2))}clone(){return new Hh(this.hue,this.saturation,this.lightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"lightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let r=this.getChannelFormatOptions(t),o=this.getChannelValue(t);return(t==="saturation"||t==="lightness")&&(o/=100),new Intl.NumberFormat(n,r).format(o)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"lightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,l:this.lightness,a:this.alpha}}getFormat(){return"hsla"}getChannels(){return Hh.colorChannels}};Vw(YA,"colorChannels",["hue","saturation","lightness"]);var Hw=YA,dce=/hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/,XA=class zh extends Fw{constructor(t,n,r,o){super(),this.hue=t,this.saturation=n,this.brightness=r,this.alpha=o}static parse(t){let n;if(n=t.match(dce)){const[r,o,i,s]=(n[1]??n[2]).split(",").map(a=>Number(a.trim().replace("%","")));return new zh(iA(r,360),pn(o,0,100),pn(i,0,100),pn(s??1,0,1))}}toString(t){switch(t){case"css":return this.toHSL().toString("css");case"hex":return this.toRGB().toString("hex");case"hexa":return this.toRGB().toString("hexa");case"hsb":return`hsb(${this.hue}, ${_t(this.saturation,2)}%, ${_t(this.brightness,2)}%)`;case"hsba":return`hsba(${this.hue}, ${_t(this.saturation,2)}%, ${_t(this.brightness,2)}%, ${this.alpha})`;case"hsl":return this.toHSL().toString("hsl");case"rgb":return this.toRGB().toString("rgb");default:return this.toFormat(t).toString(t)}}toFormat(t){switch(t){case"hsba":return this;case"hsla":return this.toHSL();case"rgba":return this.toRGB();default:throw new Error("Unsupported color conversion: hsb -> "+t)}}toHSL(){let t=this.saturation/100,n=this.brightness/100,r=n*(1-t/2);return t=r===0||r===1?0:(n-r)/Math.min(r,1-r),new Hw(_t(this.hue,2),_t(t*100,2),_t(r*100,2),_t(this.alpha,2))}toRGB(){let t=this.hue,n=this.saturation/100,r=this.brightness/100,o=(i,s=(i+t/60)%6)=>r-n*r*Math.max(Math.min(s,4-s,1),0);return new Bw(Math.round(o(5)*255),Math.round(o(3)*255),Math.round(o(1)*255),_t(this.alpha,2))}clone(){return new zh(this.hue,this.saturation,this.brightness,this.alpha)}getChannelFormatOptions(t){switch(t){case"hue":return{style:"unit",unit:"degree",unitDisplay:"narrow"};case"saturation":case"brightness":case"alpha":return{style:"percent"};default:throw new Error("Unknown color channel: "+t)}}formatChannelValue(t,n){let r=this.getChannelFormatOptions(t),o=this.getChannelValue(t);return(t==="saturation"||t==="brightness")&&(o/=100),new Intl.NumberFormat(n,r).format(o)}getChannelRange(t){switch(t){case"hue":return{minValue:0,maxValue:360,step:1,pageSize:15};case"saturation":case"brightness":return{minValue:0,maxValue:100,step:1,pageSize:10};case"alpha":return{minValue:0,maxValue:1,step:.01,pageSize:.1};default:throw new Error("Unknown color channel: "+t)}}toJSON(){return{h:this.hue,s:this.saturation,b:this.brightness,a:this.alpha}}getFormat(){return"hsba"}getChannels(){return zh.colorChannels}};Vw(XA,"colorChannels",["hue","saturation","brightness"]);var zw=XA,pce="aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32",fce=e=>{const t=new Map,n=e.split(",");for(let r=0;r{if(bO.has(e))return ea(bO.get(e));const t=Bw.parse(e)||zw.parse(e)||Hw.parse(e);if(!t){const n=new Error("Invalid color value: "+e);throw Error.captureStackTrace?.(n,ea),n}return t},yO=e=>typeof e=="string"?ea(e):e,JA=_r("color-picker",["root","label","control","trigger","positioner","content","area","areaThumb","valueText","areaBackground","channelSlider","channelSliderLabel","channelSliderTrack","channelSliderThumb","channelSliderValueText","channelInput","transparencyGrid","swatchGroup","swatchTrigger","swatchIndicator","swatch","eyeDropperTrigger","formatTrigger","formatSelect"]),Pt=JA.build(),hce=e=>e.ids?.root??`color-picker:${e.id}`,xO=e=>e.ids?.label??`color-picker:${e.id}:label`,X0=e=>e.ids?.hiddenInput??`color-picker:${e.id}:hidden-input`,ZA=e=>e.ids?.control??`color-picker:${e.id}:control`,QA=e=>e.ids?.trigger??`color-picker:${e.id}:trigger`,J0=e=>e.ids?.content??`color-picker:${e.id}:content`,eN=e=>e.ids?.positioner??`color-picker:${e.id}:positioner`,gce=e=>e.ids?.formatSelect??`color-picker:${e.id}:format-select`,tN=e=>e.ids?.area??`color-picker:${e.id}:area`,mce=e=>e.ids?.areaGradient??`color-picker:${e.id}:area-gradient`,nN=e=>e.ids?.areaThumb??`color-picker:${e.id}:area-thumb`,rN=(e,t)=>e.ids?.channelSliderTrack?.(t)??`color-picker:${e.id}:slider-track:${t}`,Z0=(e,t)=>e.ids?.channelSliderThumb?.(t)??`color-picker:${e.id}:slider-thumb:${t}`,Uh=e=>e.getById(J0(e)),vce=e=>e.getById(nN(e)),bce=(e,t)=>e.getById(Z0(e,t)),yce=e=>e.getById(gce(e)),wO=e=>e.getById(X0(e)),xce=e=>e.getById(tN(e)),wce=(e,t,n)=>{const r=xce(e);if(!r)return;const{getPercentValue:o}=kw(t,r);return{x:o({dir:n,orientation:"horizontal"}),y:o({orientation:"vertical"})}},oN=e=>e.getById(ZA(e)),Kb=e=>e.getById(QA(e)),_ce=e=>e.getById(eN(e)),kce=(e,t)=>e.getById(rN(e,t)),Cce=(e,t,n,r)=>{const o=kce(e,n);if(!o)return;const{getPercentValue:i}=kw(t,o);return{x:i({dir:r,orientation:"horizontal"}),y:i({orientation:"vertical"})}},Ece=e=>[...bp(Uh(e),"input[data-channel]"),...bp(oN(e),"input[data-channel]")];function Oce(e,t){switch(t){case"hue":return ea(`hsl(${e.getChannelValue("hue")}, 100%, 50%)`);case"lightness":case"brightness":case"saturation":case"red":case"green":case"blue":return e.withChannelValue("alpha",1);case"alpha":return e;default:throw new Error("Unknown color channel: "+t)}}function Q0(e,t){if(t==null)return"";if(t==="hex")return e.toString("hex");if(t==="css")return e.toString("css");if(t in e)return e.getChannelValue(t).toString();const n=e.getFormat()==="hsla";switch(t){case"hue":return n?e.toFormat("hsla").getChannelValue("hue").toString():e.toFormat("hsba").getChannelValue("hue").toString();case"saturation":return n?e.toFormat("hsla").getChannelValue("saturation").toString():e.toFormat("hsba").getChannelValue("saturation").toString();case"lightness":return e.toFormat("hsla").getChannelValue("lightness").toString();case"brightness":return e.toFormat("hsba").getChannelValue("brightness").toString();case"red":case"green":case"blue":return e.toFormat("rgba").getChannelValue(t).toString();default:return e.getChannelValue(t).toString()}}function Ice(e,t){switch(t){case"hex":const n=ea("#000000"),r=ea("#FFFFFF");return{minValue:n.toHexInt(),maxValue:r.toHexInt(),pageSize:10,step:1};case"css":return;case"hue":case"saturation":case"lightness":return e.toFormat("hsla").getChannelRange(t);case"brightness":return e.toFormat("hsba").getChannelRange(t);case"red":case"green":case"blue":return e.toFormat("rgba").getChannelRange(t);default:return e.getChannelRange(t)}}function Tce(e,t){return e==="vertical"?"top":t==="ltr"?"right":"left"}var Sce=e=>{const{channel:t,value:n,dir:r,orientation:o}=e,i=Tce(o,r),{minValue:s,maxValue:a}=n.getChannelRange(t);switch(t){case"hue":return`linear-gradient(to ${i}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;case"lightness":{let l=n.withChannelValue(t,s).toString("css"),c=n.withChannelValue(t,(a-s)/2).toString("css"),u=n.withChannelValue(t,a).toString("css");return`linear-gradient(to ${i}, ${l}, ${c}, ${u})`}case"saturation":case"brightness":case"red":case"green":case"blue":case"alpha":{let l=n.withChannelValue(t,s).toString("css"),c=n.withChannelValue(t,a).toString("css");return`linear-gradient(to ${i}, ${l}, ${c})`}default:throw new Error("Unknown color channel: "+t)}};function Pce(e,t){const{context:n,send:r,prop:o,computed:i,state:s,scope:a}=e,l=n.get("value"),c=n.get("format"),u=i("areaValue"),p=i("valueAsString"),h=i("disabled"),f=!!o("readOnly"),g=!!o("invalid"),m=!!o("required"),b=i("interactive"),w=s.hasTag("dragging"),E=s.hasTag("open"),k=s.hasTag("focused"),v=C=>{const x=u.getChannels();return{xChannel:C.xChannel??x[1],yChannel:C.yChannel??x[2]}},_=n.get("currentPlacement"),T=Mw({...o("positioning"),placement:_});function N(C){const x=yO(C.value).toFormat(n.get("format"));return{value:x,valueAsString:x.toString("hex"),checked:x.isEqual(l),disabled:C.disabled||!b}}return{dragging:w,open:E,valueAsString:p,value:l,inline:!!o("inline"),setOpen(C){o("inline")||s.hasTag("open")===C||r({type:C?"OPEN":"CLOSE"})},setValue(C){r({type:"VALUE.SET",value:yO(C),src:"set-color"})},getChannelValue(C){return Q0(l,C)},getChannelValueText(C,x){return l.formatChannelValue(C,x)},setChannelValue(C,x){const I=l.withChannelValue(C,x);r({type:"VALUE.SET",value:I,src:"set-channel"})},format:n.get("format"),setFormat(C){const x=l.toFormat(C);r({type:"VALUE.SET",value:x,src:"set-format"})},alpha:l.getChannelValue("alpha"),setAlpha(C){const x=l.withChannelValue("alpha",C);r({type:"VALUE.SET",value:x,src:"set-alpha"})},getRootProps(){return t.element({...Pt.root.attrs,dir:o("dir"),id:hce(a),"data-disabled":Y(h),"data-readonly":Y(f),"data-invalid":Y(g),style:{"--value":l.toString("css")}})},getLabelProps(){return t.element({...Pt.label.attrs,dir:o("dir"),id:xO(a),htmlFor:X0(a),"data-disabled":Y(h),"data-readonly":Y(f),"data-invalid":Y(g),"data-required":Y(m),"data-focus":Y(k),onClick(C){C.preventDefault(),yie(oN(a),"[data-channel=hex]")?.focus({preventScroll:!0})}})},getControlProps(){return t.element({...Pt.control.attrs,id:ZA(a),dir:o("dir"),"data-disabled":Y(h),"data-readonly":Y(f),"data-invalid":Y(g),"data-state":E?"open":"closed","data-focus":Y(k)})},getTriggerProps(){return t.button({...Pt.trigger.attrs,id:QA(a),dir:o("dir"),disabled:h,"aria-label":`select color. current color is ${p}`,"aria-controls":J0(a),"aria-labelledby":xO(a),"data-disabled":Y(h),"data-readonly":Y(f),"data-invalid":Y(g),"data-placement":_,"aria-expanded":Y(E),"data-state":E?"open":"closed","data-focus":Y(k),type:"button",onClick(){b&&r({type:"TRIGGER.CLICK"})},onBlur(){b&&r({type:"TRIGGER.BLUR"})},style:{position:"relative"}})},getPositionerProps(){return t.element({...Pt.positioner.attrs,id:eN(a),dir:o("dir"),style:T.floating})},getContentProps(){return t.element({...Pt.content.attrs,id:J0(a),dir:o("dir"),tabIndex:-1,"data-placement":_,"data-state":E?"open":"closed",hidden:!E})},getValueTextProps(){return t.element({...Pt.valueText.attrs,dir:o("dir"),"data-disabled":Y(h),"data-focus":Y(k)})},getAreaProps(C={}){const{xChannel:x,yChannel:I}=v(C),{areaStyles:R}=vO(u,{xChannel:x,yChannel:I,dir:o("dir")});return t.element({...Pt.area.attrs,id:tN(a),role:"group","data-invalid":Y(g),"data-disabled":Y(h),"data-readonly":Y(f),onPointerDown(M){if(!b||!Ls(M)||Gc(M))return;const B=jo(M);r({type:"AREA.POINTER_DOWN",point:B,channel:{xChannel:x,yChannel:I},id:"area"}),M.preventDefault()},style:{position:"relative",touchAction:"none",forcedColorAdjust:"none",...R}})},getAreaBackgroundProps(C={}){const{xChannel:x,yChannel:I}=v(C),{areaGradientStyles:R}=vO(u,{xChannel:x,yChannel:I,dir:o("dir")});return t.element({...Pt.areaBackground.attrs,id:mce(a),"data-invalid":Y(g),"data-disabled":Y(h),"data-readonly":Y(f),style:{position:"relative",touchAction:"none",forcedColorAdjust:"none",...R}})},getAreaThumbProps(C={}){const{xChannel:x,yChannel:I}=v(C),R={xChannel:x,yChannel:I},M=u.getChannelValuePercent(x),B=1-u.getChannelValuePercent(I),J=o("dir")==="rtl"?1-M:M,q=u.getChannelValue(x),K=u.getChannelValue(I),X=u.withChannelValue("alpha",1).toString("css");return t.element({...Pt.areaThumb.attrs,id:nN(a),dir:o("dir"),tabIndex:h?void 0:0,"data-disabled":Y(h),"data-invalid":Y(g),"data-readonly":Y(f),role:"slider","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":q,"aria-label":`${x} and ${I}`,"aria-roledescription":"2d slider","aria-valuetext":`${x} ${q}, ${I} ${K}`,style:{position:"absolute",left:`${J*100}%`,top:`${B*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",forcedColorAdjust:"none","--color":X,background:X},onFocus(){b&&r({type:"AREA.FOCUS",id:"area",channel:R})},onKeyDown(de){if(de.defaultPrevented||!b)return;const Ue=Ug(de),Ve={ArrowUp(){r({type:"AREA.ARROW_UP",channel:R,step:Ue})},ArrowDown(){r({type:"AREA.ARROW_DOWN",channel:R,step:Ue})},ArrowLeft(){r({type:"AREA.ARROW_LEFT",channel:R,step:Ue})},ArrowRight(){r({type:"AREA.ARROW_RIGHT",channel:R,step:Ue})},PageUp(){r({type:"AREA.PAGE_UP",channel:R,step:Ue})},PageDown(){r({type:"AREA.PAGE_DOWN",channel:R,step:Ue})},Escape(Qe){Qe.stopPropagation()}}[Wc(de,{dir:o("dir")})];Ve&&(Ve(de),de.preventDefault())}})},getTransparencyGridProps(C={}){const{size:x="12px"}=C;return t.element({...Pt.transparencyGrid.attrs,style:{"--size":x,width:"100%",height:"100%",position:"absolute",backgroundColor:"#fff",backgroundImage:"conic-gradient(#eeeeee 0 25%, transparent 0 50%, #eeeeee 0 75%, transparent 0)",backgroundSize:"var(--size) var(--size)",inset:"0px",zIndex:"auto",pointerEvents:"none"}})},getChannelSliderProps(C){const{orientation:x="horizontal",channel:I,format:R}=C;return t.element({...Pt.channelSlider.attrs,"data-channel":I,"data-orientation":x,role:"presentation",onPointerDown(M){if(!b||!Ls(M)||Gc(M))return;const B=jo(M);r({type:"CHANNEL_SLIDER.POINTER_DOWN",channel:I,format:R,point:B,id:I,orientation:x}),M.preventDefault()},style:{position:"relative",touchAction:"none"}})},getChannelSliderTrackProps(C){const{orientation:x="horizontal",channel:I,format:R}=C,M=R?l.toFormat(R):u;return t.element({...Pt.channelSliderTrack.attrs,id:rN(a,I),role:"group","data-channel":I,"data-orientation":x,style:{position:"relative",forcedColorAdjust:"none",backgroundImage:Sce({orientation:x,channel:I,dir:o("dir"),value:M})}})},getChannelSliderLabelProps(C){const{channel:x}=C;return t.element({...Pt.channelSliderLabel.attrs,"data-channel":x,onClick(I){if(!b)return;I.preventDefault();const R=Z0(a,x);a.getById(R)?.focus({preventScroll:!0})},style:{userSelect:"none",WebkitUserSelect:"none"}})},getChannelSliderValueTextProps(C){return t.element({...Pt.channelSliderValueText.attrs,"data-channel":C.channel})},getChannelSliderThumbProps(C){const{orientation:x="horizontal",channel:I,format:R}=C,M=R?l.toFormat(R):u,B=M.getChannelRange(I),z=M.getChannelValue(I),J=(z-B.minValue)/(B.maxValue-B.minValue),q=o("dir")==="rtl",K=x==="horizontal"&&q?1-J:J,X=x==="horizontal"?{left:`${K*100}%`,top:"50%"}:{top:`${J*100}%`,left:"50%"};return t.element({...Pt.channelSliderThumb.attrs,id:Z0(a,I),role:"slider","aria-label":I,tabIndex:h?void 0:0,"data-channel":I,"data-disabled":Y(h),"data-orientation":x,"aria-disabled":Y(h),"aria-orientation":x,"aria-valuemax":B.maxValue,"aria-valuemin":B.minValue,"aria-valuenow":z,"aria-valuetext":`${I} ${z}`,style:{forcedColorAdjust:"none",position:"absolute",background:Oce(u,I).toString("css"),...X},onFocus(){b&&r({type:"CHANNEL_SLIDER.FOCUS",channel:I})},onKeyDown(de){if(de.defaultPrevented||!b)return;const Ue=Ug(de)*B.step,Ve={ArrowUp(){r({type:"CHANNEL_SLIDER.ARROW_UP",channel:I,step:Ue})},ArrowDown(){r({type:"CHANNEL_SLIDER.ARROW_DOWN",channel:I,step:Ue})},ArrowLeft(){r({type:"CHANNEL_SLIDER.ARROW_LEFT",channel:I,step:Ue})},ArrowRight(){r({type:"CHANNEL_SLIDER.ARROW_RIGHT",channel:I,step:Ue})},PageUp(){r({type:"CHANNEL_SLIDER.PAGE_UP",channel:I})},PageDown(){r({type:"CHANNEL_SLIDER.PAGE_DOWN",channel:I})},Home(){r({type:"CHANNEL_SLIDER.HOME",channel:I})},End(){r({type:"CHANNEL_SLIDER.END",channel:I})},Escape(Qe){Qe.stopPropagation()}}[Wc(de,{dir:o("dir")})];Ve&&(Ve(de),de.preventDefault())}})},getChannelInputProps(C){const{channel:x}=C,I=x==="hex"||x==="css",R=Ice(l,x);return t.input({...Pt.channelInput.attrs,dir:o("dir"),type:I?"text":"number","data-channel":x,"aria-label":x,spellCheck:!1,autoComplete:"off",disabled:h,"data-disabled":Y(h),"data-invalid":Y(g),"data-readonly":Y(f),readOnly:f,defaultValue:Q0(l,x),min:R?.minValue,max:R?.maxValue,step:R?.step,onBeforeInput(M){if(I||!b)return;M.currentTarget.value.match(/[^0-9.]/g)&&M.preventDefault()},onFocus(M){b&&(r({type:"CHANNEL_INPUT.FOCUS",channel:x}),M.currentTarget.select())},onBlur(M){if(!b)return;const B=I?M.currentTarget.value:M.currentTarget.valueAsNumber;r({type:"CHANNEL_INPUT.BLUR",channel:x,value:B,isTextField:I})},onKeyDown(M){if(!M.defaultPrevented&&b&&M.key==="Enter"){const B=I?M.currentTarget.value:M.currentTarget.valueAsNumber;r({type:"CHANNEL_INPUT.CHANGE",channel:x,value:B,isTextField:I}),M.preventDefault()}},style:{appearance:"none",WebkitAppearance:"none",MozAppearance:"textfield"}})},getHiddenInputProps(){return t.input({type:"text",disabled:h,name:o("name"),tabIndex:-1,readOnly:f,required:m,id:X0(a),style:$ie,defaultValue:p})},getEyeDropperTriggerProps(){return t.button({...Pt.eyeDropperTrigger.attrs,type:"button",dir:o("dir"),disabled:h,"data-disabled":Y(h),"data-invalid":Y(g),"data-readonly":Y(f),"aria-label":"Pick a color from the screen",onClick(){b&&r({type:"EYEDROPPER.CLICK"})}})},getSwatchGroupProps(){return t.element({...Pt.swatchGroup.attrs,role:"group"})},getSwatchTriggerState:N,getSwatchTriggerProps(C){const x=N(C);return t.button({...Pt.swatchTrigger.attrs,disabled:x.disabled,dir:o("dir"),type:"button","aria-label":`select ${x.valueAsString} as the color`,"data-state":x.checked?"checked":"unchecked","data-value":x.valueAsString,"data-disabled":Y(x.disabled),onClick(){x.disabled||r({type:"SWATCH_TRIGGER.CLICK",value:x.value})},style:{"--color":x.valueAsString,position:"relative"}})},getSwatchIndicatorProps(C){const x=N(C);return t.element({...Pt.swatchIndicator.attrs,dir:o("dir"),hidden:!x.checked})},getSwatchProps(C){const{respectAlpha:x=!0}=C,I=N(C),R=I.value.toString(x?"css":"hex");return t.element({...Pt.swatch.attrs,dir:o("dir"),"data-state":I.checked?"checked":"unchecked","data-value":I.valueAsString,style:{"--color":R,position:"relative",background:R}})},getFormatTriggerProps(){return t.button({...Pt.formatTrigger.attrs,dir:o("dir"),type:"button","aria-label":`change color format to ${_O(c)}`,onClick(C){if(C.currentTarget.disabled)return;const x=_O(c);r({type:"FORMAT.SET",format:x,src:"format-trigger"})}})},getFormatSelectProps(){return t.select({...Pt.formatSelect.attrs,"aria-label":"change color format",dir:o("dir"),defaultValue:o("format"),disabled:h,onChange(C){const x=Rce(C.currentTarget.value);r({type:"FORMAT.SET",format:x,src:"format-select"})}})}}}var jh=["hsba","hsla","rgba"],$ce=new RegExp(`^(${jh.join("|")})$`);function _O(e){const t=jh.indexOf(e);return jh[t+1]??jh[0]}function Rce(e){if($ce.test(e))return e;throw new Error(`Unsupported color format: ${e}`)}var Fd=e=>ea(e),Ace=/^[0-9a-fA-F]{3,8}$/;function Nce(e){return Ace.test(e)}function Mce(e){return e.startsWith("#")?e:Nce(e)?`#${e}`:e}var{and:Dce}=Ev(),Lce={props({props:e}){return{dir:"ltr",defaultValue:Fd("#000000"),defaultFormat:"rgba",openAutoFocus:!0,...e,positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")||e("inline")?"open":"idle"},context({prop:e,bindable:t,getContext:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual(r,o){return r.toString("css")===o?.toString("css")},hash(r){return r.toString("css")},onChange(r){const o=n(),i=r.toString(o.get("format"));e("onValueChange")?.({value:r,valueAsString:i})}})),format:t(()=>({defaultValue:e("defaultFormat"),value:e("format"),onChange(r){e("onFormatChange")?.({format:r})}})),activeId:t(()=>({defaultValue:null})),activeChannel:t(()=>({defaultValue:null})),activeOrientation:t(()=>({defaultValue:null})),fieldsetDisabled:t(()=>({defaultValue:!1})),restoreFocus:t(()=>({defaultValue:!0})),currentPlacement:t(()=>({defaultValue:void 0}))}},computed:{rtl:({prop:e})=>e("dir")==="rtl",disabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),interactive:({prop:e})=>!(e("disabled")||e("readOnly")),valueAsString:({context:e})=>e.get("value").toString(e.get("format")),areaValue:({context:e})=>{const t=e.get("format").startsWith("hsl")?"hsla":"hsba";return e.get("value").toFormat(t)}},effects:["trackFormControl"],watch({prop:e,context:t,action:n,track:r}){r([()=>t.hash("value")],()=>{n(["syncInputElements","dispatchChangeEvent"])}),r([()=>t.get("format")],()=>{n(["syncFormatSelectElement"])}),r([()=>e("open")],()=>{n(["toggleVisibility"])})},on:{"VALUE.SET":{actions:["setValue"]},"FORMAT.SET":{actions:["setFormat"]},"CHANNEL_INPUT.CHANGE":{actions:["setChannelColorFromInput"]},"EYEDROPPER.CLICK":{actions:["openEyeDropper"]},"SWATCH_TRIGGER.CLICK":{actions:["setValue"]}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{target:"focused",actions:["setActiveChannel"]}}},focused:{tags:["closed","focused"],on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],"CHANNEL_INPUT.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_INPUT.BLUR":{target:"idle",actions:["setChannelColorFromInput"]},"TRIGGER.BLUR":{target:"idle"}}},open:{tags:["open"],effects:["trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"AREA.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setAreaColorFromPoint","focusAreaThumb"]},"AREA.FOCUS":{actions:["setActiveChannel"]},"CHANNEL_SLIDER.POINTER_DOWN":{target:"open:dragging",actions:["setActiveChannel","setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.FOCUS":{actions:["setActiveChannel"]},"AREA.ARROW_LEFT":{actions:["decrementAreaXChannel"]},"AREA.ARROW_RIGHT":{actions:["incrementAreaXChannel"]},"AREA.ARROW_UP":{actions:["incrementAreaYChannel"]},"AREA.ARROW_DOWN":{actions:["decrementAreaYChannel"]},"AREA.PAGE_UP":{actions:["incrementAreaXChannel"]},"AREA.PAGE_DOWN":{actions:["decrementAreaXChannel"]},"CHANNEL_SLIDER.ARROW_LEFT":{actions:["decrementChannel"]},"CHANNEL_SLIDER.ARROW_RIGHT":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.ARROW_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.PAGE_UP":{actions:["incrementChannel"]},"CHANNEL_SLIDER.PAGE_DOWN":{actions:["decrementChannel"]},"CHANNEL_SLIDER.HOME":{actions:["setChannelToMin"]},"CHANNEL_SLIDER.END":{actions:["setChannelToMax"]},"CHANNEL_INPUT.BLUR":{actions:["setChannelColorFromInput"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}],"SWATCH_TRIGGER.CLICK":[{guard:Dce("isOpenControlled","closeOnSelect"),actions:["setValue","invokeOnClose"]},{guard:"closeOnSelect",target:"focused",actions:["setValue","invokeOnClose","setReturnFocus"]},{actions:["setValue"]}]}},"open:dragging":{tags:["open"],exit:["clearActiveChannel"],effects:["trackPointerMove","disableTextSelection","trackPositioning","trackDismissableElement"],on:{"CONTROLLED.CLOSE":[{guard:"shouldRestoreFocus",target:"focused",actions:["setReturnFocus"]},{target:"idle"}],"AREA.POINTER_MOVE":{actions:["setAreaColorFromPoint","focusAreaThumb"]},"AREA.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},"CHANNEL_SLIDER.POINTER_MOVE":{actions:["setChannelColorFromPoint","focusChannelThumb"]},"CHANNEL_SLIDER.POINTER_UP":{target:"open",actions:["invokeOnChangeEnd"]},INTERACT_OUTSIDE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{guard:"shouldRestoreFocus",target:"focused",actions:["invokeOnClose","setReturnFocus"]},{target:"idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"idle",actions:["invokeOnClose"]}]}}},implementations:{guards:{closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>e("open")!=null||!!e("inline"),shouldRestoreFocus:({context:e})=>!!e.get("restoreFocus")},effects:{trackPositioning({context:e,prop:t,scope:n}){if(t("inline"))return;e.get("currentPlacement")||e.set("currentPlacement",t("positioning")?.placement);const r=Kb(n);return _p(r,()=>_ce(n),{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackDismissableElement({context:e,scope:t,prop:n,send:r}){return n("inline")?void 0:Rv(()=>Uh(t),{type:"popover",exclude:Kb(t),defer:!0,onInteractOutside(i){n("onInteractOutside")?.(i),!i.defaultPrevented&&e.set("restoreFocus",!(i.detail.focusable||i.detail.contextmenu))},onPointerDownOutside:n("onPointerDownOutside"),onFocusOutside:n("onFocusOutside"),onDismiss(){r({type:"INTERACT_OUTSIDE"})}})},trackFormControl({context:e,scope:t,send:n}){const r=wO(t);return xw(r,{onFieldsetDisabledChange(o){e.set("fieldsetDisabled",o)},onFormReset(){n({type:"VALUE.SET",value:e.initial("value"),src:"form.reset"})}})},trackPointerMove({context:e,scope:t,event:n,send:r}){return xA(t.getDoc(),{onPointerMove({point:o}){const i=e.get("activeId")==="area"?"AREA.POINTER_MOVE":"CHANNEL_SLIDER.POINTER_MOVE";r({type:i,point:o,format:n.format})},onPointerUp(){const o=e.get("activeId")==="area"?"AREA.POINTER_UP":"CHANNEL_SLIDER.POINTER_UP";r({type:o})}})},disableTextSelection({scope:e}){return yA({doc:e.getDoc(),target:Uh(e)})}},actions:{openEyeDropper({scope:e,context:t}){const n=e.getWin();if(!("EyeDropper"in n))return;new n.EyeDropper().open().then(({sRGBHex:i})=>{const s=t.get("value").getFormat(),a=ea(i).toFormat(s);t.set("value",a)}).catch(()=>{})},setActiveChannel({context:e,event:t}){e.set("activeId",t.id),t.channel&&e.set("activeChannel",t.channel),t.orientation&&e.set("activeOrientation",t.orientation)},clearActiveChannel({context:e}){e.set("activeChannel",null),e.set("activeId",null),e.set("activeOrientation",null)},setAreaColorFromPoint({context:e,event:t,computed:n,scope:r,prop:o}){const i=t.format?e.get("value").toFormat(t.format):n("areaValue"),{xChannel:s,yChannel:a}=t.channel||e.get("activeChannel"),l=wce(r,t.point,o("dir"));if(!l)return;const c=i.getChannelPercentValue(s,l.x),u=i.getChannelPercentValue(a,1-l.y),p=i.withChannelValue(s,c).withChannelValue(a,u);e.set("value",p)},setChannelColorFromPoint({context:e,event:t,computed:n,scope:r,prop:o}){const i=t.channel||e.get("activeId"),s=t.format?e.get("value").toFormat(t.format):n("areaValue"),a=Cce(r,t.point,i,o("dir"));if(!a)return;const c=(e.get("activeOrientation")||"horizontal")==="horizontal"?a.x:a.y,u=s.getChannelPercentValue(i,c),p=s.withChannelValue(i,u);e.set("value",p)},setValue({context:e,event:t}){e.set("value",t.value)},setFormat({context:e,event:t}){e.set("format",t.format)},dispatchChangeEvent({scope:e,computed:t}){fA(wO(e),{value:t("valueAsString")})},syncInputElements({context:e,scope:t}){kO(t,e.get("value"))},invokeOnChangeEnd({context:e,prop:t,computed:n}){t("onValueChangeEnd")?.({value:e.get("value"),valueAsString:n("valueAsString")})},setChannelColorFromInput({context:e,event:t,scope:n,prop:r}){const{channel:o,isTextField:i,value:s}=t,a=e.get("value").getChannelValue("alpha");let l;if(o==="alpha"){let c=parseFloat(s);c=Number.isNaN(c)?a:c,l=e.get("value").withChannelValue("alpha",c)}else if(i)l=rA(()=>{const c=o==="hex"?Mce(s):s;return Fd(c).withChannelValue("alpha",a)},()=>e.get("value"));else{const c=e.get("value").toFormat(e.get("format")),u=Number.isNaN(s)?c.getChannelValue(o):s;l=c.withChannelValue(o,u)}kO(n,e.get("value"),l),e.set("value",l),r("onValueChangeEnd")?.({value:l,valueAsString:l.toString(e.get("format"))})},incrementChannel({context:e,event:t}){const n=e.get("value").incrementChannel(t.channel,t.step);e.set("value",n)},decrementChannel({context:e,event:t}){const n=e.get("value").decrementChannel(t.channel,t.step);e.set("value",n)},incrementAreaXChannel({context:e,event:t,computed:n}){const{xChannel:r}=t.channel,o=n("areaValue").incrementChannel(r,t.step);e.set("value",o)},decrementAreaXChannel({context:e,event:t,computed:n}){const{xChannel:r}=t.channel,o=n("areaValue").decrementChannel(r,t.step);e.set("value",o)},incrementAreaYChannel({context:e,event:t,computed:n}){const{yChannel:r}=t.channel,o=n("areaValue").incrementChannel(r,t.step);e.set("value",o)},decrementAreaYChannel({context:e,event:t,computed:n}){const{yChannel:r}=t.channel,o=n("areaValue").decrementChannel(r,t.step);e.set("value",o)},setChannelToMax({context:e,event:t}){const n=e.get("value"),r=n.getChannelRange(t.channel),o=n.withChannelValue(t.channel,r.maxValue);e.set("value",o)},setChannelToMin({context:e,event:t}){const n=e.get("value"),r=n.getChannelRange(t.channel),o=n.withChannelValue(t.channel,r.minValue);e.set("value",o)},focusAreaThumb({scope:e}){tt(()=>{vce(e)?.focus({preventScroll:!0})})},focusChannelThumb({event:e,scope:t}){tt(()=>{bce(t,e.channel)?.focus({preventScroll:!0})})},setInitialFocus({prop:e,scope:t}){e("openAutoFocus")&&tt(()=>{jg({root:Uh(t),getInitialEl:e("initialFocusEl")})?.focus({preventScroll:!0})})},setReturnFocus({scope:e}){tt(()=>{Kb(e)?.focus({preventScroll:!0})})},syncFormatSelectElement({context:e,scope:t}){Vce(t,e.get("format"))},invokeOnOpen({prop:e}){e("inline")||e("onOpenChange")?.({open:!0})},invokeOnClose({prop:e}){e("inline")||e("onOpenChange")?.({open:!1})},toggleVisibility({prop:e,event:t,send:n}){n({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:t})}}}};function kO(e,t,n){const r=Ece(e);tt(()=>{r.forEach(o=>{const i=o.dataset.channel;rf(o,Q0(n||t,i))})})}function Vce(e,t){const n=yce(e);n&&tt(()=>rf(n,t))}en()(["closeOnSelect","dir","disabled","format","defaultFormat","getRootNode","id","ids","initialFocusEl","inline","name","positioning","onFocusOutside","onFormatChange","onInteractOutside","onOpenChange","onPointerDownOutside","onValueChange","onValueChangeEnd","defaultOpen","open","positioning","required","readOnly","value","defaultValue","invalid","openAutoFocus"]);en()(["xChannel","yChannel"]);en()(["channel","orientation"]);en()(["value","disabled"]);en()(["value","respectAlpha"]);en()(["size"]);const Fce=()=>(e,t)=>t.reduce((n,r)=>{const[o,i]=n,s=r;return i[s]!==void 0&&(o[s]=i[s]),delete i[s],[o,i]},[{},{...e}]),[Bce,Uw]=Tt("AccordionItemPropsContext"),Hce=P({__name:"accordion-item-content",props:{asChild:{type:Boolean}},setup(e){const t=Fce(),n=uf(),r=Uw(),o=A(()=>{const i=n.value.getItemContentProps(r),[,s]=t(i,["hidden","data-state"]);return s});return ee(),(i,s)=>(y(),$(d(qA).Content,F(o.value,{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),[zce,Uce]=Tt("AccordionItemContext"),jce=P({__name:"accordion-item-context",setup(e){const t=Uce();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Gce=P({__name:"accordion-item-indicator",props:{asChild:{type:Boolean}},setup(e){const t=uf(),n=Uw();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getItemIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Wce=P({__name:"accordion-item-trigger",props:{asChild:{type:Boolean}},setup(e){const t=uf(),n=Uw(),r=df(),o=A(()=>{const{"aria-controls":i,...s}=t.value.getItemTriggerProps(n);return{...s,...r.value.unmounted?{}:{"aria-controls":i}}});return ee(),(i,s)=>(y(),$(d(te).button,F(o.value,{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),qce=P({__name:"accordion-item",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=uf(),n=e,r=A(()=>t.value.getItemState(n)),o=yu(),i=A(()=>t.value.getItemContentProps(n));return zce(r),Bce(n),ee(),(s,a)=>(y(),$(d(qA).Root,F(d(t).getItemProps(n),{open:r.value.expanded,"lazy-mount":d(o).lazyMount,"unmount-on-exit":d(o).unmountOnExit,ids:{content:i.value.id}}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["open","lazy-mount","unmount-on-exit","ids"]))}}),Kce=P({__name:"accordion-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return GA(n),ui(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var Yce=_r("accordion").parts("root","item","itemTrigger","itemContent","itemIndicator"),Wu=Yce.build(),Xg=e=>e.ids?.root??`accordion:${e.id}`,Xce=(e,t)=>e.ids?.item?.(t)??`accordion:${e.id}:item:${t}`,CO=(e,t)=>e.ids?.itemContent?.(t)??`accordion:${e.id}:content:${t}`,Jg=(e,t)=>e.ids?.itemTrigger?.(t)??`accordion:${e.id}:trigger:${t}`,Jce=e=>e.getById(Xg(e)),Av=e=>{const n=`[aria-controls][data-ownedby='${CSS.escape(Xg(e))}']:not([disabled])`;return bp(Jce(e),n)},Zce=e=>fw(Av(e)),Qce=e=>hw(Av(e)),eue=(e,t)=>wie(Av(e),Jg(e,t)),tue=(e,t)=>_ie(Av(e),Jg(e,t));function nue(e,t){const{send:n,context:r,prop:o,scope:i,computed:s}=e,a=r.get("focusedValue"),l=r.get("value"),c=o("multiple");function u(h){let f=h;!c&&f.length>1&&(f=[f[0]]),n({type:"VALUE.SET",value:f})}function p(h){return{expanded:l.includes(h.value),focused:a===h.value,disabled:!!(h.disabled??o("disabled"))}}return{focusedValue:a,value:l,setValue:u,getItemState:p,getRootProps(){return t.element({...Wu.root.attrs,dir:o("dir"),id:Xg(i),"data-orientation":o("orientation")})},getItemProps(h){const f=p(h);return t.element({...Wu.item.attrs,dir:o("dir"),id:Xce(i,h.value),"data-state":f.expanded?"open":"closed","data-focus":Y(f.focused),"data-disabled":Y(f.disabled),"data-orientation":o("orientation")})},getItemContentProps(h){const f=p(h);return t.element({...Wu.itemContent.attrs,dir:o("dir"),role:"region",id:CO(i,h.value),"aria-labelledby":Jg(i,h.value),hidden:!f.expanded,"data-state":f.expanded?"open":"closed","data-disabled":Y(f.disabled),"data-focus":Y(f.focused),"data-orientation":o("orientation")})},getItemIndicatorProps(h){const f=p(h);return t.element({...Wu.itemIndicator.attrs,dir:o("dir"),"aria-hidden":!0,"data-state":f.expanded?"open":"closed","data-disabled":Y(f.disabled),"data-focus":Y(f.focused),"data-orientation":o("orientation")})},getItemTriggerProps(h){const{value:f}=h,g=p(h);return t.button({...Wu.itemTrigger.attrs,type:"button",dir:o("dir"),id:Jg(i,f),"aria-controls":CO(i,f),"aria-expanded":g.expanded,disabled:g.disabled,"data-orientation":o("orientation"),"aria-disabled":g.disabled,"data-state":g.expanded?"open":"closed","data-ownedby":Xg(i),onFocus(){g.disabled||n({type:"TRIGGER.FOCUS",value:f})},onBlur(){g.disabled||n({type:"TRIGGER.BLUR"})},onClick(m){g.disabled||(Cv()&&m.currentTarget.focus(),n({type:"TRIGGER.CLICK",value:f}))},onKeyDown(m){if(m.defaultPrevented||g.disabled)return;const b={ArrowDown(){s("isHorizontal")||n({type:"GOTO.NEXT",value:f})},ArrowUp(){s("isHorizontal")||n({type:"GOTO.PREV",value:f})},ArrowRight(){s("isHorizontal")&&n({type:"GOTO.NEXT",value:f})},ArrowLeft(){s("isHorizontal")&&n({type:"GOTO.PREV",value:f})},Home(){n({type:"GOTO.FIRST",value:f})},End(){n({type:"GOTO.LAST",value:f})}},w=Wc(m,{dir:o("dir"),orientation:o("orientation")}),E=b[w];E&&(E(m),m.preventDefault())}})}}}var{and:rue,not:oue}=Ev(),iue={props({props:e}){return{collapsible:!1,multiple:!1,orientation:"vertical",defaultValue:[],...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{focusedValue:t(()=>({defaultValue:null,sync:!0,onChange(n){e("onFocusChange")?.({value:n})}})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(n){e("onValueChange")?.({value:n})}}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal"},on:{"VALUE.SET":{actions:["setValue"]}},states:{idle:{on:{"TRIGGER.FOCUS":{target:"focused",actions:["setFocusedValue"]}}},focused:{on:{"GOTO.NEXT":{actions:["focusNextTrigger"]},"GOTO.PREV":{actions:["focusPrevTrigger"]},"TRIGGER.CLICK":[{guard:rue("isExpanded","canToggle"),actions:["collapse"]},{guard:oue("isExpanded"),actions:["expand"]}],"GOTO.FIRST":{actions:["focusFirstTrigger"]},"GOTO.LAST":{actions:["focusLastTrigger"]},"TRIGGER.BLUR":{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{canToggle:({prop:e})=>!!e("collapsible")||!!e("multiple"),isExpanded:({context:e,event:t})=>e.get("value").includes(t.value)},actions:{collapse({context:e,prop:t,event:n}){const r=t("multiple")?Ure(e.get("value"),n.value):[];e.set("value",r)},expand({context:e,prop:t,event:n}){const r=t("multiple")?zre(e.get("value"),n.value):[n.value];e.set("value",r)},focusFirstTrigger({scope:e}){Zce(e)?.focus()},focusLastTrigger({scope:e}){Qce(e)?.focus()},focusNextTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;eue(t,n)?.focus()},focusPrevTrigger({context:e,scope:t}){const n=e.get("focusedValue");if(!n)return;tue(t,n)?.focus()},setFocusedValue({context:e,event:t}){e.set("focusedValue",t.value)},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t}){e.set("value",t.value)},coarseValue({context:e,prop:t}){!t("multiple")&&e.get("value").length>1&&(zg("The value of accordion should be a single value when multiple is false."),e.set("value",[e.get("value")[0]]))}}}};en()(["collapsible","dir","disabled","getRootNode","id","ids","multiple","onFocusChange","onValueChange","orientation","value","defaultValue"]);en()(["value","disabled"]);const sue=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,onFocusChange:l=>t?.("focusChange",l),value:a.modelValue,...da(a),onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a?.onValueChange?.(l)}}}),s=Ji(iue,i);return A(()=>nue(s,ua))},aue=P({__name:"accordion-root",props:Ze({collapsible:{type:Boolean},defaultValue:{},disabled:{type:Boolean},id:{},ids:{},modelValue:{},multiple:{type:Boolean},orientation:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{collapsible:void 0,disabled:void 0,multiple:void 0}),emits:["focusChange","valueChange","update:modelValue"],setup(e,{emit:t}){const n=e,o=sue(n,t);return GA(o),ui(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ee(),(i,s)=>(y(),$(d(te).div,F(d(o).getRootProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),qu=Object.freeze(Object.defineProperty({__proto__:null,Context:Dle,Item:qce,ItemContent:Hce,ItemContext:jce,ItemIndicator:Gce,ItemTrigger:Wce,Root:aue,RootProvider:Kce},Symbol.toStringTag,{value:"Module"})),lue=P({__name:"presence",props:Ze({immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{immediate:void 0,lazyMount:void 0,present:void 0,skipAnimationOnMount:void 0,unmountOnExit:void 0}),emits:["exitComplete"],setup(e,{emit:t}){const o=af(e,t);return sf(o),ee(),(i,s)=>d(o).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(o).presenceProps,{"as-child":i.asChild,"data-scope":"presence","data-part":"root"}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}});var cue=Object.defineProperty,uue=(e,t,n)=>t in e?cue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t,n)=>uue(e,typeof t!="symbol"?t+"":t,n),EO={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},due=[],pue=class{constructor(e,t){Nt(this,"trapStack"),Nt(this,"config"),Nt(this,"doc"),Nt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Nt(this,"listenerCleanups",[]),Nt(this,"handleFocus",r=>{const o=Yn(r),i=this.findContainerIndex(o,r)>=0;if(i||vw(o))i&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let s,a=!0;if(this.state.mostRecentlyFocusedNode)if(ju(this.state.mostRecentlyFocusedNode)>0){const l=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[l];if(c.length>0){const u=c.findIndex(p=>p===this.state.mostRecentlyFocusedNode);u>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?u+1=0&&(s=c[u-1],a=!1))}}else this.state.containerGroups.some(l=>l.tabbableNodes.some(c=>ju(c)>0))||(a=!1);else a=!1;a&&(s=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),s?this.tryFocus(s):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Nt(this,"handlePointerDown",r=>{const o=Yn(r);if(!(this.findContainerIndex(o,r)>=0)){if(Yu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Yu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Nt(this,"handleClick",r=>{const o=Yn(r);this.findContainerIndex(o,r)>=0||Yu(this.config.clickOutsideDeactivates,r)||Yu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Nt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),i=this.findNextNavNode({event:r,isBackward:o});if(!i)return;Ku(r)&&r.preventDefault(),this.tryFocus(i)}}),Nt(this,"handleEscapeKey",r=>{fue(r)&&Yu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Nt(this,"_mutationObserver"),Nt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(s=>Array.from(s.removedNodes).some(l=>l===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),Nt(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(r=>{this._mutationObserver?.observe(r,{subtree:!0,childList:!0})})}),Nt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Vs(r)){const o=Tc(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const i=this.state.tabbableGroups[0];r=i&&i.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Nt(this,"tryFocus",r=>{if(r!==!1&&r!==Tc(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,hue(r)&&r.select()}}),Nt(this,"deactivate",r=>{if(!this.state.active)return this;const o={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...r};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),EO.deactivateTrap(this.trapStack,this);const i=this.getOption(o,"onDeactivate"),s=this.getOption(o,"onPostDeactivate"),a=this.getOption(o,"checkCanReturnFocus"),l=this.getOption(o,"returnFocus","returnFocusOnDeactivate");i?.();const c=()=>{OO(()=>{if(l){const u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(u)}s?.()})};if(l&&a){const u=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return a(u).then(c,c),this}return c(),this}),Nt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),i=this.getOption(r,"onPostPause");return this.state.paused=!0,o?.(),this.removeListeners(),this.updateObservedNodes(),i?.(),this}),Nt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),i=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),i?.(),this}),Nt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Nt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Nt(this,"getOption",(r,o,i)=>r&&r[o]!==void 0?r[o]:this.config[i||o]),Nt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:i=[]}={})=>{let s=this.config[r];if(typeof s=="function"&&(s=s(...i)),s===!0&&(s=void 0),!s){if(s===void 0||s===!1)return s;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let a=s;if(typeof s=="string"){try{a=this.doc.querySelector(s)}catch(l){throw new Error(`\`${r}\` appears to be an invalid selector; error="${l.message}"`)}if(!a&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return a}),Nt(this,"findNextNavNode",r=>{const{event:o,isBackward:i=!1}=r,s=r.target||Yn(o);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const l=this.findContainerIndex(s,o),c=l>=0?this.state.containerGroups[l]:void 0;if(l<0)i?a=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:a=this.state.tabbableGroups[0].firstTabbableNode;else if(i){let u=this.state.tabbableGroups.findIndex(({firstTabbableNode:p})=>s===p);if(u<0&&(c?.container===s||Vs(s)&&!ks(s)&&!c?.nextTabbableNode(s,!1))&&(u=l),u>=0){const p=u===0?this.state.tabbableGroups.length-1:u-1,h=this.state.tabbableGroups[p];a=ju(s)>=0?h.lastTabbableNode:h.lastDomTabbableNode}else Ku(o)||(a=c?.nextTabbableNode(s,!1))}else{let u=this.state.tabbableGroups.findIndex(({lastTabbableNode:p})=>s===p);if(u<0&&(c?.container===s||Vs(s)&&!ks(s)&&!c?.nextTabbableNode(s))&&(u=l),u>=0){const p=u===this.state.tabbableGroups.length-1?0:u+1,h=this.state.tabbableGroups[p];a=ju(s)>=0?h.firstTabbableNode:h.firstDomTabbableNode}else Ku(o)||(a=c?.nextTabbableNode(s))}}else a=this.getNodeForOption("fallbackFocus");return a}),this.trapStack=t.trapStack||due;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(r){return Ku(r)&&!r.shiftKey},isKeyBackward(r){return Ku(r)&&r.shiftKey},...t};this.doc=n.document||ci(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof t?.composedPath=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||n?.includes(r)||o.find(i=>i===e))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=of(e),n=gA(e),r=t.length>0?t[0]:void 0,o=t.length>0?t[t.length-1]:void 0,i=n.find(c=>ks(c)),s=n.slice().reverse().find(c=>ks(c)),a=!!t.find(c=>ju(c)>0);function l(c,u=!0){const p=t.indexOf(c);return p<0?u?n.slice(n.indexOf(c)+1).find(h=>ks(h)):n.slice(0,n.indexOf(c)).reverse().find(h=>ks(h)):t[p+(u?1:-1)]}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:a,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:i,lastDomTabbableNode:s,nextTabbableNode:l}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return EO.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?OO(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Ft(this.doc,"focusin",this.handleFocus,!0),Ft(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Ft(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Ft(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Tc(this.doc),t?.();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Ku=e=>e.key==="Tab",Yu=(e,...t)=>typeof e=="function"?e(...t):e,fue=e=>!e.isComposing&&e.key==="Escape",OO=e=>setTimeout(e,0),hue=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function iN(e,t={}){let n;const r=tt(()=>{const o=typeof e=="function"?e():e;if(o){n=new pue(o,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o,...t,document:ci(o)});try{n.activate()}catch{}}});return function(){n?.deactivate(),r()}}var Yb="data-scroll-lock";function gue(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function sN(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:o}=t;if(o.hasAttribute(Yb))return;const s=n.innerWidth-r.clientWidth;o.setAttribute(Yb,"");const a=()=>Tie(r,"--scrollbar-width",`${s}px`),l=gue(r),c=()=>yp(o,{overflow:"hidden",[l]:`${s}px`}),u=()=>{const{scrollX:h,scrollY:f,visualViewport:g}=n,m=g?.offsetLeft??0,b=g?.offsetTop??0,w=yp(o,{position:"fixed",overflow:"hidden",top:`${-(f-Math.floor(b))}px`,left:`${-(h-Math.floor(m))}px`,right:"0",[l]:`${s}px`});return()=>{w?.(),n.scrollTo({left:h,top:f,behavior:"instant"})}},p=[a(),_v()?u():c()];return()=>{p.forEach(h=>h?.()),o.removeAttribute(Yb)}}var Ul=new WeakMap,nh=new WeakMap,rh={},Xb=0,aN=e=>e&&(e.host||aN(e.parentNode)),mue=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=aN(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),vue=new Set(["script","output","status","next-route-announcer"]),bue=e=>vue.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),yue=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o}=t,i=mue(n,Array.isArray(e)?e:[e]);rh[r]||(rh[r]=new WeakMap);const s=rh[r],a=[],l=new Set,c=new Set(i),u=h=>{!h||l.has(h)||(l.add(h),u(h.parentNode))};i.forEach(u);const p=h=>{!h||c.has(h)||Array.prototype.forEach.call(h.children,f=>{if(l.has(f))p(f);else try{if(bue(f))return;const m=f.getAttribute(o)==="true",b=(Ul.get(f)||0)+1,w=(s.get(f)||0)+1;Ul.set(f,b),s.set(f,w),a.push(f),b===1&&m&&nh.set(f,!0),w===1&&f.setAttribute(r,""),m||f.setAttribute(o,"true")}catch(g){console.error("[zag-js > ariaHidden] cannot operate on ",f,g)}})};return p(n),l.clear(),Xb++,()=>{a.forEach(h=>{const f=Ul.get(h)-1,g=s.get(h)-1;Ul.set(h,f),s.set(h,g),f||(nh.has(h)||h.removeAttribute(o),nh.delete(h)),g||h.removeAttribute(r)}),Xb--,Xb||(Ul=new WeakMap,Ul=new WeakMap,nh=new WeakMap,rh={})}},xue=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,wue=(e,t=xue(e),n="data-aria-hidden")=>{if(t)return yue(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden"})},_ue=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function lN(e,t={}){const{defer:n=!0}=t,r=n?_ue:i=>i(),o=[];return o.push(r(()=>{const s=(typeof e=="function"?e():e).filter(Boolean);s.length!==0&&o.push(wue(s))})),()=>{o.forEach(i=>i?.())}}const[cN,Yr]=Tt("FieldContext"),[kue,uN]=Tt("ColorPickerAreaPropsContext"),[dN,Ot]=Tt("ColorPickerContext"),Cue=P({__name:"color-picker-area-background",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=uN();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getAreaBackgroundProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Eue=P({__name:"color-picker-area-thumb",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=uN();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getAreaThumbProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Oue=P({__name:"color-picker-area",props:{xChannel:{},yChannel:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return kue(t),ee(),(r,o)=>(y(),$(d(te).div,F(d(n).getAreaProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Iue=P({__name:"color-picker-channel-input",props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return ee(),(r,o)=>(y(),$(d(te).input,F(d(n).getChannelInputProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[Tue,Nv]=Tt("ColorPickerChannelPropsContext"),Sue=P({__name:"color-picker-channel-slider-label",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=Nv();return ee(),(r,o)=>(y(),$(d(te).label,F(d(t).getChannelSliderLabelProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),[Pue,jw]=Tt("ColorPickerFormatProps"),$ue=P({__name:"color-picker-channel-slider-thumb",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=jw(),r=Nv(),o=A(()=>({...r,...n}));return ee(),(i,s)=>(y(),$(d(te).div,F(d(t).getChannelSliderThumbProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Rue=P({__name:"color-picker-channel-slider-track",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=jw(),r=Nv(),o=A(()=>({...r,...n}));return ee(),(i,s)=>(y(),$(d(te).div,F(d(t).getChannelSliderTrackProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Aue=P({__name:"color-picker-channel-slider-value-text",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=Nv(),r=xo(),o=ts(es);return ee(),(i,s)=>(y(),$(d(te).span,F(d(t).getChannelSliderValueTextProps(d(n)),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default",{},()=>[re(j(r.default?.()||d(t).getChannelValueText(d(n).channel,d(o).locale)),1)])]),_:3},16,["as-child"]))}}),Nue=P({__name:"color-picker-channel-slider",props:{channel:{},orientation:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot(),r=jw(),o=A(()=>({...t,...r}));return Tue(t),ee(),(i,s)=>(y(),$(d(te).div,F(d(n).getChannelSliderProps(o.value),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Mue=P({__name:"color-picker-content",props:{immediate:{type:Boolean},lazyMount:{type:Boolean},present:{type:Boolean},skipAnimationOnMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=Ot(),n=Iv(),r=A(()=>bu(t.value.getContentProps(),n.value.presenceProps));return ee(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Due=P({__name:"color-picker-context",setup(e){const t=Ot();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Lue=P({__name:"color-picker-control",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vue=P({__name:"color-picker-eye-dropper-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getEyeDropperTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Fue=P({__name:"color-picker-format-select",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).select,Be(Fe(d(t).getFormatSelectProps())),{default:O(()=>[(y(),V(ge,null,Ie(["rgba","hsla","hsba"],o=>S(d(te).option,{key:o,value:o},{default:O(()=>[re(j(o),1)]),_:2},1032,["value"])),64))]),_:1},16))}}),Bue=P({__name:"color-picker-format-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getFormatTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Hue=P({__name:"color-picker-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=Yr();return ee(),(r,o)=>(y(),$(d(te).input,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getHiddenInputProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["aria-describedby","as-child"]))}}),zue=P({__name:"color-picker-label",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Uue=P({__name:"color-picker-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=yu(),r=af(A(()=>({...n.value,present:t.value.open})));return sf(r),ee(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),jue=P({__name:"color-picker-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return dN(n),ui(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Gue=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=Yr(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,input:i?.value.ids.control},disabled:i?.value.disabled,invalid:i?.value.invalid,readOnly:i?.value.readOnly,required:i?.value.required,dir:o.value.dir,value:l.modelValue,getRootNode:r?.value.getRootNode,...da(l),onOpenChange(c){t?.("openChange",c),t?.("update:open",c.open),l.onOpenChange?.(c)},onValueChange(c){t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onFocusOutside:c=>{t?.("focusOutside",c),l.onFocusOutside?.(c)},onFormatChange:c=>{t?.("formatChange",c),t?.("update:format",c.format),l.onFormatChange?.(c)},onInteractOutside:c=>{t?.("interactOutside",c),l.onInteractOutside?.(c)},onPointerDownOutside:c=>{t?.("pointerDownOutside",c),l.onPointerDownOutside?.(c)},onValueChangeEnd:c=>{t?.("valueChangeEnd",c),l.onValueChangeEnd?.(c)}}}),a=Ji(Lce,s);return A(()=>Pce(a,ua))},Wue=P({__name:"color-picker-root",props:Ze({closeOnSelect:{type:Boolean},defaultFormat:{},defaultOpen:{type:Boolean},defaultValue:{},disabled:{type:Boolean},format:{},id:{},ids:{},initialFocusEl:{type:Function},invalid:{type:Boolean},modelValue:{},name:{},open:{type:Boolean},openAutoFocus:{type:Boolean},positioning:{},readOnly:{type:Boolean},required:{type:Boolean},inline:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean},asChild:{type:Boolean}},{closeOnSelect:void 0,defaultOpen:void 0,disabled:void 0,invalid:void 0,open:void 0,openAutoFocus:void 0,readOnly:void 0,required:void 0,inline:void 0}),emits:["focusOutside","formatChange","interactOutside","openChange","pointerDownOutside","valueChange","valueChangeEnd","update:modelValue","update:open","update:format"],setup(e,{emit:t}){const n=e,o=Gue(n,t);return dN(o),ui(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ee(),(i,s)=>(y(),$(d(te).div,F(d(o).getRootProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),pN=JA.extendWith("view"),que=P({__name:"color-picker-swatch-group",props:{asChild:{type:Boolean}},setup(e){return ee(),(t,n)=>(y(),$(d(te).div,F(d(pN).build().swatchGroup.attrs,{"as-child":t.asChild}),{default:O(()=>[L(t.$slots,"default")]),_:3},16,["as-child"]))}}),[fN,Kue]=Tt("ColorPickerSwatchPropsContext"),Yue=P({__name:"color-picker-swatch-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Ot(),n=Kue();return ee(),(r,o)=>(y(),$(d(te).div,F(d(t).getSwatchIndicatorProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Xue=P({__name:"color-picker-swatch-trigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return ee(),(r,o)=>(y(),$(d(te).button,F(d(n).getSwatchTriggerProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Jue=P({__name:"color-picker-swatch",props:{value:{},respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return fN(t),ee(),(r,o)=>(y(),$(d(te).div,F(d(n).getSwatchProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Zue=P({__name:"color-picker-transparency-grid",props:{size:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return ee(),(r,o)=>(y(),$(d(te).div,F(d(n).getTransparencyGridProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Que=P({__name:"color-picker-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Ot();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ede=P({__name:"color-picker-value-swatch",props:{respectAlpha:{type:Boolean},asChild:{type:Boolean}},setup(e){const t=e,n=Ot(),r=A(()=>({value:n.value.value,respectAlpha:t.respectAlpha}));return fN(r.value),ee(),(o,i)=>(y(),$(d(te).div,F(d(n).getSwatchProps(r.value),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),tde=P({__name:"color-picker-value-text",props:{format:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot(),r=xo();ee();const o=A(()=>t.format?n.value.value.toString(t.format):n.value.valueAsString);return(i,s)=>(y(),$(d(te).span,F(d(n).getValueTextProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default",{},()=>[re(j(r.default?.()||o.value),1)])]),_:3},16,["as-child"]))}}),nde=P({__name:"color-picker-view",props:{format:{},asChild:{type:Boolean}},setup(e){const t=e,n=Ot();return Pue(t),ee(),(r,o)=>d(n).format===r.format?(y(),$(d(te).div,F({key:0},d(pN).build().view.attrs,{"data-format":r.format,"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["data-format","as-child"])):Z("",!0)}}),lt=Object.freeze(Object.defineProperty({__proto__:null,Area:Oue,AreaBackground:Cue,AreaThumb:Eue,ChannelInput:Iue,ChannelSlider:Nue,ChannelSliderLabel:Sue,ChannelSliderThumb:$ue,ChannelSliderTrack:Rue,ChannelSliderValueText:Aue,Content:Mue,Context:Due,Control:Lue,EyeDropperTrigger:Vue,FormatSelect:Fue,FormatTrigger:Bue,HiddenInput:Hue,Label:zue,Positioner:Uue,Root:Wue,RootProvider:jue,Swatch:Jue,SwatchGroup:que,SwatchIndicator:Yue,SwatchTrigger:Xue,TransparencyGrid:Zue,Trigger:Que,ValueSwatch:ede,ValueText:tde,View:nde},Symbol.toStringTag,{value:"Module"})),[hN,pa]=Tt("DialogContext"),rde=P({__name:"dialog-backdrop",props:{asChild:{type:Boolean}},setup(e){const t=pa(),n=yu();return ee(),(r,o)=>(y(),$(d(lue),F(d(t).getBackdropProps(),{present:d(t).open,"lazy-mount":d(n).lazyMount,"unmount-on-exit":d(n).unmountOnExit}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["present","lazy-mount","unmount-on-exit"]))}}),ode=P({__name:"dialog-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=pa();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getCloseTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),ide=P({__name:"dialog-content",props:{asChild:{type:Boolean}},setup(e){const t=pa(),n=Iv(),r=A(()=>bu(t.value.getContentProps(),n.value.presenceProps));return ee(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),sde=P({__name:"dialog-context",setup(e){const t=pa();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),ade=P({__name:"dialog-description",props:{asChild:{type:Boolean}},setup(e){const t=pa();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getDescriptionProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),lde=P({__name:"dialog-positioner",props:{asChild:{type:Boolean}},setup(e){const t=pa(),n=yu(),r=af(A(()=>({...n.value,present:t.value.open})));return sf(r),ee(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),cde=P({__name:"dialog-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return hN(n),ui(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ee(),(r,o)=>L(r.$slots,"default")}});var ude=_r("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ra=ude.build(),gN=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,mN=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,e1=e=>e.ids?.content??`dialog:${e.id}:content`,vN=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,t1=e=>e.ids?.title??`dialog:${e.id}:title`,n1=e=>e.ids?.description??`dialog:${e.id}:description`,bN=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,oh=e=>e.getById(e1(e)),dde=e=>e.getById(gN(e)),pde=e=>e.getById(mN(e)),fde=e=>e.getById(vN(e)),hde=e=>e.getById(t1(e)),gde=e=>e.getById(n1(e)),mde=e=>e.getById(bN(e));function vde(e,t){const{state:n,send:r,context:o,prop:i,scope:s}=e,a=i("aria-label"),l=n.matches("open");return{open:l,setOpen(c){n.matches("open")!==c&&r({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...Ra.trigger.attrs,dir:i("dir"),id:vN(s),"aria-haspopup":"dialog",type:"button","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":e1(s),onClick(c){c.defaultPrevented||r({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...Ra.backdrop.attrs,dir:i("dir"),hidden:!l,id:mN(s),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({...Ra.positioner.attrs,dir:i("dir"),id:gN(s),style:{pointerEvents:l?void 0:"none"}})},getContentProps(){const c=o.get("rendered");return t.element({...Ra.content.attrs,dir:i("dir"),role:i("role"),hidden:!l,id:e1(s),tabIndex:-1,"data-state":l?"open":"closed","aria-modal":!0,"aria-label":a||void 0,"aria-labelledby":a||!c.title?void 0:t1(s),"aria-describedby":c.description?n1(s):void 0})},getTitleProps(){return t.element({...Ra.title.attrs,dir:i("dir"),id:t1(s)})},getDescriptionProps(){return t.element({...Ra.description.attrs,dir:i("dir"),id:n1(s)})},getCloseTriggerProps(){return t.button({...Ra.closeTrigger.attrs,dir:i("dir"),id:bN(s),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),r({type:"CLOSE"}))}})}}}var bde={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>mde(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return{role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return Rv(()=>oh(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[fde(e)],onInteractOutside(o){n("onInteractOutside")?.(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){n("onEscapeKeyDown")?.(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return sN(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?iN(()=>oh(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>t("finalFocusEl")?.()??r}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?lN(()=>[oh(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){tt(()=>{e.set("rendered",{title:!!hde(t),description:!!gde(t)})})},syncZIndex({scope:e}){tt(()=>{const t=oh(e);if(!t)return;const n=jc(t);[dde(e),pde(e)].forEach(o=>{o?.style.setProperty("--z-index",n.zIndex),o?.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};en()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const yde=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...da(e),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)},onEscapeKeyDown:l=>{t?.("escapeKeyDown",l),a.onEscapeKeyDown?.(l)},onFocusOutside:l=>{t?.("focusOutside",l),a.onFocusOutside?.(l)},onInteractOutside:l=>{t?.("interactOutside",l),a.onInteractOutside?.(l)},onPointerDownOutside:l=>{t?.("pointerDownOutside",l),a.onPointerDownOutside?.(l)},onRequestDismiss:l=>{t?.("requestDismiss",l),a.onRequestDismiss?.(l)}}}),s=Ji(bde,i);return A(()=>vde(s,ua))},xde=P({__name:"dialog-root",props:Ze({"aria-label":{},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},finalFocusEl:{type:Function},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},preventScroll:{type:Boolean},restoreFocus:{type:Boolean},role:{},trapFocus:{type:Boolean},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,preventScroll:void 0,restoreFocus:void 0,trapFocus:void 0}),emits:["escapeKeyDown","focusOutside","interactOutside","openChange","pointerDownOutside","requestDismiss","update:open"],setup(e,{emit:t}){const n=e,o=yde(n,t);return hN(o),ui(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ee(),(i,s)=>L(i.$slots,"default")}}),wde=P({__name:"dialog-title",props:{asChild:{type:Boolean}},setup(e){const t=pa();return ee(),(n,r)=>(y(),$(d(te).h2,F(d(t).getTitleProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),_de=P({__name:"dialog-trigger",props:{asChild:{type:Boolean}},setup(e){const t=pa();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),mt=Object.freeze(Object.defineProperty({__proto__:null,Backdrop:rde,CloseTrigger:ode,Content:ide,Context:sde,Description:ade,Positioner:lde,Root:xde,RootProvider:cde,Title:wde,Trigger:_de},Symbol.toStringTag,{value:"Module"})),kde=P({__name:"field-context",setup(e){const t=Yr();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Cde=P({__name:"field-error-text",props:{asChild:{type:Boolean}},setup(e){const t=Yr();return ee(),(n,r)=>d(t).invalid?(y(),$(d(te).span,F({key:0},d(t).getErrorTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"])):Z("",!0)}}),Ede=P({__name:"field-helper-text",props:{asChild:{type:Boolean}},setup(e){const t=Yr();return ee(),(n,r)=>(y(),$(d(te).span,F(d(t).getHelperTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ode=P({__name:"field-input",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=Yr(),r=t;return ee(),(o,i)=>(y(),$(d(te).input,F(d(n).getInputProps(),{"as-child":o.asChild,value:o.modelValue,onInput:i[0]||(i[0]=s=>r("update:modelValue",s.target.value))}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child","value"]))}}),Ide=P({__name:"field-label",props:{asChild:{type:Boolean}},setup(e){const t=Yr();return ee(),(n,r)=>(y(),$(d(te).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Tde=P({__name:"field-required-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Yr();return ee(),(n,r)=>d(t).required?(y(),$(d(te).span,F({key:0},d(t).getRequiredIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default",{},()=>[r[0]||(r[0]=re("*",-1))])]),_:3},16,["as-child"])):L(n.$slots,"fallback",{key:1})}}),Sde=P({__name:"field-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return cN(n),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Pde=_r("field").parts("root","errorText","helperText","input","label","select","textarea","requiredIndicator"),cs=Pde.build(),$de=(e={})=>{const t=Zi(Qi),n=Tr({hasErrorText:!1,hasHelperText:!1}),r=nt(),o=A(()=>pe(e).id??r),i=Q(null),s=A(()=>pe(e).ids?.control??`field::${o.value}`),a=A(()=>pe(e).ids?.errorText??`field::${o.value}::error-text`),l=A(()=>pe(e).ids?.helperText??`field::${o.value}::helper-text`),c=A(()=>pe(e).ids?.label??`field::${o.value}::label`);Je(()=>{const v=Ow(i);if(!v)return;const _=()=>{const C=t.value.getRootNode();n.hasErrorText=!!C.getElementById(a.value),n.hasHelperText=!!C.getElementById(l.value)};_();const T=t.value.getWindow(),N=new T.MutationObserver(_);N.observe(v,{childList:!0,subtree:!0}),on(()=>{N.disconnect()})});const u=()=>{const v=pe(e);return{...cs.root.attrs,id:s.value,role:"group","data-disabled":Y(v.disabled),"data-invalid":Y(v.invalid),"data-readonly":Y(v.readOnly)}},p=()=>{const v=pe(e);return{...cs.label.attrs,id:c.value,"data-disabled":Y(v.disabled),"data-invalid":Y(v.invalid),"data-readonly":Y(v.readOnly),"data-required":Y(v.required),htmlFor:o.value}},h=A(()=>{const v=pe(e),_=[];return n.hasErrorText&&v.invalid&&_.push(a.value),n.hasHelperText&&_.push(l.value),_}),f=()=>{const v=pe(e);return{"aria-describedby":h.value.join(" ")||void 0,"aria-invalid":mp(v.invalid),"data-invalid":Y(v.invalid),"data-required":Y(v.required),"data-readonly":Y(v.readOnly),id:o.value,required:v.required,disabled:v.disabled,readOnly:v.readOnly}},g=()=>({...f(),...cs.input.attrs}),m=()=>({...f(),...cs.textarea.attrs}),b=()=>({...f(),...cs.select.attrs}),w=()=>{const v=pe(e);return{id:l.value,...cs.helperText.attrs,"data-disabled":Y(v.disabled)}},E=()=>({id:a.value,...cs.errorText.attrs,"aria-live":"polite"}),k=()=>({"aria-hidden":!0,...cs.requiredIndicator.attrs});return A(()=>{const v=pe(e);return{ariaDescribedby:h.value.join(" ")||void 0,ids:{control:o.value,label:c.value,errorText:a.value,helperText:l.value},refs:{rootRef:i},disabled:v.disabled,invalid:v.invalid,readOnly:v.readOnly,required:v.required,getLabelProps:p,getRootProps:u,getInputProps:g,getTextareaProps:m,getSelectProps:b,getHelperTextProps:w,getErrorTextProps:E,getRequiredIndicatorProps:k}})},Rde=P({__name:"field-root",props:Ze({disabled:{type:Boolean},id:{},ids:{},invalid:{type:Boolean},readOnly:{type:Boolean},required:{type:Boolean},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0,required:void 0}),setup(e){const n=$de(e);return cN(n),ee(),(r,o)=>(y(),$(d(te).div,F(d(n).getRootProps(),{ref:d(n).refs.rootRef,"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Ade=P({__name:"field-select",props:{modelValue:{},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=Yr(),r=t;return ee(),(o,i)=>(y(),$(d(te).select,F(d(n).getSelectProps(),{value:o.modelValue,onChange:i[0]||(i[0]=s=>r("update:modelValue",s.target.value)),"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["value","as-child"]))}});var Nde=e=>{if(!e)return;const t=jc(e),n=pr(e),r=ci(e),o=()=>{requestAnimationFrame(()=>{e.style.height="auto";let c;t.boxSizing==="content-box"?c=e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):c=e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!=="none"&&c>parseFloat(t.maxHeight)?(t.overflowY==="hidden"&&(e.style.overflowY="scroll"),c=parseFloat(t.maxHeight)):t.overflowY!=="hidden"&&(e.style.overflowY="hidden"),e.style.height=`${c}px`})};e.addEventListener("input",o),e.form?.addEventListener("reset",o);const i=Object.getPrototypeOf(e),s=Object.getOwnPropertyDescriptor(i,"value");Object.defineProperty(e,"value",{...s,set(){s?.set?.apply(this,arguments),o()}});const a=new n.ResizeObserver(()=>{requestAnimationFrame(()=>o())});a.observe(e);const l=new n.MutationObserver(()=>o());return l.observe(e,{attributes:!0,attributeFilter:["rows","placeholder"]}),r.fonts?.addEventListener("loadingdone",o),()=>{e.removeEventListener("input",o),e.form?.removeEventListener("reset",o),r.fonts?.removeEventListener("loadingdone",o),a.disconnect(),l.disconnect()}};const Mde=P({__name:"field-textarea",props:{modelValue:{},autoresize:{type:Boolean},asChild:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=Yr(),o=t,i=Q();return Je(()=>{const s=Ow(i);if(!s||!n.autoresize)return;const a=Nde(s);on(()=>a?.())}),ee(),(s,a)=>(y(),$(d(te).textarea,F({ref_key:"textareaRef",ref:i},d(r).getTextareaProps(),{value:s.modelValue,onInput:a[0]||(a[0]=l=>o("update:modelValue",l.target.value)),style:n.autoresize?{resize:"none",overflow:"hidden"}:void 0,"as-child":s.asChild}),{default:O(()=>[L(s.$slots,"default")]),_:3},16,["value","style","as-child"]))}}),Zg=Object.freeze(Object.defineProperty({__proto__:null,Context:kde,ErrorText:Cde,HelperText:Ede,Input:Ode,Label:Ide,RequiredIndicator:Tde,Root:Rde,RootProvider:Sde,Select:Ade,Textarea:Mde},Symbol.toStringTag,{value:"Module"})),[yN,fa]=Tt("NumberInputContext"),Dde=P({__name:"number-input-context",setup(e){const t=fa();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Lde=P({__name:"number-input-control",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Vde=P({__name:"number-input-decrement-trigger",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getDecrementTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Fde=P({__name:"number-input-increment-trigger",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getIncrementTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Bde=P({__name:"number-input-input",props:{asChild:{type:Boolean}},setup(e){const t=fa(),n=Yr();return ee(),(r,o)=>(y(),$(d(te).input,F({"aria-describedby":d(n)?.ariaDescribedby},d(t).getInputProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["aria-describedby","as-child"]))}}),Hde=P({__name:"number-input-label",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),zde=P({__name:"number-input-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return yN(n),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});let Jb=new Map,r1=!1;try{r1=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Qg=!1;try{Qg=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const xN={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Ude{format(t){let n="";if(!r1&&this.options.signDisplay!=null?n=Gde(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Qg){var r;let{unit:o,unitDisplay:i="short",locale:s}=this.resolvedOptions();if(!o)return n;let a=(r=xN[o])===null||r===void 0?void 0:r[i];n+=a[s]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),o=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!r1&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Qg&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=jde(t,n),this.options=n}}function jde(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Qg){var r;let{unit:s,unitDisplay:a="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=xN[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let o=e+(t?Object.entries(t).sort((s,a)=>s[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let o=e.format(-n),i=e.format(n),s=o.replace(i,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),o.replace(i,"!!!").replace(s,"+").replace("!!!",i)}else return e.format(n)}}const Wde=new RegExp("^.*\\(.*\\).*$"),qde=["latn","arab","hanidec","deva","beng","fullwide"];class wN{parse(t){return Zb(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Zb(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Zb(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const IO=new Map;function Zb(e,t,n){let r=TO(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let o of qde)if(o!==r.options.numberingSystem){let i=TO(e+(e.includes("-u-")?"-nu-":"-u-nu-")+o,t);if(i.isValidPartialNumber(n))return i}}return r}function TO(e,t){let n=e+(t?Object.entries(t).sort((o,i)=>o[0]-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var o,i;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((o=this.options.minimumFractionDigits)!==null&&o!==void 0?o:0)+2,20),maximumFractionDigits:Math.min(((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)+2,20)};return new wN(this.locale,s).parse(new Ude(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&Wde.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=jl(t,".",this.symbols.group))),this.symbols.group==="’"&&t.includes("'")&&(t=jl(t,"'",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&(t=jl(t," ",this.symbols.group),t=jl(t,/\u00A0/g,this.symbols.group)),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=jl(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,n.roundingIncrement!==1&&n.roundingIncrement!=null&&(n.maximumFractionDigits==null&&n.minimumFractionDigits==null?(n.maximumFractionDigits=0,n.minimumFractionDigits=0):n.maximumFractionDigits==null?n.maximumFractionDigits=n.minimumFractionDigits:n.minimumFractionDigits==null&&(n.minimumFractionDigits=n.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=Xde(t,this.formatter,this.options,n);var r,o;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const SO=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Yde=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Xde(e,t,n,r){var o,i,s,a;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),c=l.formatToParts(-10000.111),u=l.formatToParts(10000.111),p=Yde.map(I=>l.formatToParts(I));var h;let f=(h=(o=c.find(I=>I.type==="minusSign"))===null||o===void 0?void 0:o.value)!==null&&h!==void 0?h:"-",g=(i=u.find(I=>I.type==="plusSign"))===null||i===void 0?void 0:i.value;!g&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(g="+");let b=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(I=>I.type==="decimal"))===null||s===void 0?void 0:s.value,w=(a=c.find(I=>I.type==="group"))===null||a===void 0?void 0:a.value,E=c.filter(I=>!SO.has(I.type)).map(I=>PO(I.value)),k=p.flatMap(I=>I.filter(R=>!SO.has(R.type)).map(R=>PO(R.value))),v=[...new Set([...E,...k])].sort((I,R)=>R.length-I.length),_=v.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${v.join("|")}|[\\p{White_Space}]`,"gu"),T=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),N=new Map(T.map((I,R)=>[I,R])),C=new RegExp(`[${T.join("")}]`,"g");return{minusSign:f,plusSign:g,decimal:b,group:w,literals:_,numeral:C,index:I=>String(N.get(I))}}function jl(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function PO(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Jde=_r("numberInput").parts("root","label","input","control","valueText","incrementTrigger","decrementTrigger","scrubber"),us=Jde.build(),Zde=e=>e.ids?.root??`number-input:${e.id}`,pd=e=>e.ids?.input??`number-input:${e.id}:input`,_N=e=>e.ids?.incrementTrigger??`number-input:${e.id}:inc`,kN=e=>e.ids?.decrementTrigger??`number-input:${e.id}:dec`,Qde=e=>e.ids?.scrubber??`number-input:${e.id}:scrubber`,CN=e=>`number-input:${e.id}:cursor`,epe=e=>e.ids?.label??`number-input:${e.id}:label`,fd=e=>e.getById(pd(e)),tpe=e=>e.getById(_N(e)),npe=e=>e.getById(kN(e)),EN=e=>e.getDoc().getElementById(CN(e)),rpe=(e,t)=>{let n=null;return t==="increment"&&(n=tpe(e)),t==="decrement"&&(n=npe(e)),n},ope=(e,t)=>{if(!Cv())return ape(e,t),()=>{EN(e)?.remove()}},ipe=e=>{const t=e.getDoc(),n=t.documentElement,r=t.body;return r.style.pointerEvents="none",n.style.userSelect="none",n.style.cursor="ew-resize",()=>{r.style.pointerEvents="",n.style.userSelect="",n.style.cursor="",n.style.length||n.removeAttribute("style"),r.style.length||r.removeAttribute("style")}},spe=(e,t)=>{const{point:n,isRtl:r,event:o}=t,i=e.getWin(),s=Ld(o.movementX,i.devicePixelRatio),a=Ld(o.movementY,i.devicePixelRatio);let l=s>0?"increment":s<0?"decrement":null;r&&l==="increment"&&(l="decrement"),r&&l==="decrement"&&(l="increment");const c={x:n.x+s,y:n.y+a},u=i.innerWidth,p=Ld(7.5,i.devicePixelRatio);return c.x=aoe(c.x+p,u)-p,{hint:l,point:c}},ape=(e,t)=>{const n=e.getDoc(),r=n.createElement("div");r.className="scrubber--cursor",r.id=CN(e),Object.assign(r.style,{width:"15px",height:"15px",position:"fixed",pointerEvents:"none",left:"0px",top:"0px",zIndex:woe,transform:t?`translate3d(${t.x}px, ${t.y}px, 0px)`:void 0,willChange:"transform"}),r.innerHTML=` - - - - - - `,n.body.appendChild(r)};function lpe(e,t){if(!(!e||!t.isActiveElement(e)))try{const{selectionStart:n,selectionEnd:r,value:o}=e;return n==null||r==null?void 0:{start:n,end:r,value:o}}catch{return}}function cpe(e,t,n){if(!(!e||!n.isActiveElement(e))){if(!t){const r=e.value.length;e.setSelectionRange(r,r);return}try{const r=e.value,{start:o,end:i,value:s}=t;if(r===s){e.setSelectionRange(o,i);return}const a=$O(s,r,o),l=o===i?a:$O(s,r,i),c=Math.max(0,Math.min(a,r.length)),u=Math.max(c,Math.min(l,r.length));e.setSelectionRange(c,u)}catch{const r=e.value.length;e.setSelectionRange(r,r)}}}function $O(e,t,n){const r=e.slice(0,n),o=e.slice(n);let i=0;const s=Math.min(r.length,t.length);for(let c=0;c=r.length)return i;if(a>=o.length)return t.length-a;if(i>0)return i;if(a>0)return t.length-a;if(e.length>0){const c=n/e.length;return Math.round(c*t.length)}return t.length}function upe(e,t){const{state:n,send:r,prop:o,scope:i,computed:s}=e,a=n.hasTag("focus"),l=s("isDisabled"),c=!!o("readOnly"),u=!!o("required"),p=n.matches("scrubbing"),h=s("isValueEmpty"),f=s("isOutOfRange")||!!o("invalid"),g=l||!s("canIncrement")||c,m=l||!s("canDecrement")||c,b=o("translations");return{focused:a,invalid:f,empty:h,value:s("formattedValue"),valueAsNumber:s("valueAsNumber"),setValue(w){r({type:"VALUE.SET",value:w})},clearValue(){r({type:"VALUE.CLEAR"})},increment(){r({type:"VALUE.INCREMENT"})},decrement(){r({type:"VALUE.DECREMENT"})},setToMax(){r({type:"VALUE.SET",value:o("max")})},setToMin(){r({type:"VALUE.SET",value:o("min")})},focus(){fd(i)?.focus()},getRootProps(){return t.element({id:Zde(i),...us.root.attrs,dir:o("dir"),"data-disabled":Y(l),"data-focus":Y(a),"data-invalid":Y(f),"data-scrubbing":Y(p)})},getLabelProps(){return t.label({...us.label.attrs,dir:o("dir"),"data-disabled":Y(l),"data-focus":Y(a),"data-invalid":Y(f),"data-required":Y(u),"data-scrubbing":Y(p),id:epe(i),htmlFor:pd(i)})},getControlProps(){return t.element({...us.control.attrs,dir:o("dir"),role:"group","aria-disabled":l,"data-focus":Y(a),"data-disabled":Y(l),"data-invalid":Y(f),"data-scrubbing":Y(p),"aria-invalid":mp(f)})},getValueTextProps(){return t.element({...us.valueText.attrs,dir:o("dir"),"data-disabled":Y(l),"data-invalid":Y(f),"data-focus":Y(a),"data-scrubbing":Y(p)})},getInputProps(){return t.input({...us.input.attrs,dir:o("dir"),name:o("name"),form:o("form"),id:pd(i),role:"spinbutton",defaultValue:s("formattedValue"),pattern:o("formatOptions")?void 0:o("pattern"),inputMode:o("inputMode"),"aria-invalid":mp(f),"data-invalid":Y(f),disabled:l,"data-disabled":Y(l),readOnly:c,required:o("required"),autoComplete:"off",autoCorrect:"off",spellCheck:"false",type:"text","aria-roledescription":"numberfield","aria-valuemin":o("min"),"aria-valuemax":o("max"),"aria-valuenow":Number.isNaN(s("valueAsNumber"))?void 0:s("valueAsNumber"),"aria-valuetext":s("valueText"),"data-scrubbing":Y(p),onFocus(){r({type:"INPUT.FOCUS"})},onBlur(){r({type:"INPUT.BLUR"})},onInput(w){const E=lpe(w.currentTarget,i);r({type:"INPUT.CHANGE",target:w.currentTarget,hint:"set",selection:E})},onBeforeInput(w){try{const{selectionStart:E,selectionEnd:k,value:v}=w.currentTarget,_=v.slice(0,E)+(w.data??"")+v.slice(k);s("parser").isValidPartialNumber(_)||w.preventDefault()}catch{}},onKeyDown(w){if(w.defaultPrevented||c||Uoe(w))return;const E=Ug(w)*o("step"),v={ArrowUp(){r({type:"INPUT.ARROW_UP",step:E}),w.preventDefault()},ArrowDown(){r({type:"INPUT.ARROW_DOWN",step:E}),w.preventDefault()},Home(){Gc(w)||(r({type:"INPUT.HOME"}),w.preventDefault())},End(){Gc(w)||(r({type:"INPUT.END"}),w.preventDefault())},Enter(){r({type:"INPUT.ENTER"})}}[w.key];v?.(w)}})},getDecrementTriggerProps(){return t.button({...us.decrementTrigger.attrs,dir:o("dir"),id:kN(i),disabled:m,"data-disabled":Y(m),"aria-label":b.decrementLabel,type:"button",tabIndex:-1,"aria-controls":pd(i),"data-scrubbing":Y(p),onPointerDown(w){m||Ls(w)&&(r({type:"TRIGGER.PRESS_DOWN",hint:"decrement",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){r({type:"TRIGGER.PRESS_UP",hint:"decrement",pointerType:w.pointerType})},onPointerLeave(){m||r({type:"TRIGGER.PRESS_UP",hint:"decrement"})}})},getIncrementTriggerProps(){return t.button({...us.incrementTrigger.attrs,dir:o("dir"),id:_N(i),disabled:g,"data-disabled":Y(g),"aria-label":b.incrementLabel,type:"button",tabIndex:-1,"aria-controls":pd(i),"data-scrubbing":Y(p),onPointerDown(w){g||!Ls(w)||(r({type:"TRIGGER.PRESS_DOWN",hint:"increment",pointerType:w.pointerType}),w.pointerType==="mouse"&&w.preventDefault(),w.pointerType==="touch"&&w.currentTarget?.focus({preventScroll:!0}))},onPointerUp(w){r({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})},onPointerLeave(w){r({type:"TRIGGER.PRESS_UP",hint:"increment",pointerType:w.pointerType})}})},getScrubberProps(){return t.element({...us.scrubber.attrs,dir:o("dir"),"data-disabled":Y(l),id:Qde(i),role:"presentation","data-scrubbing":Y(p),onMouseDown(w){if(l||!Ls(w))return;const E=jo(w),v=pr(w.currentTarget).devicePixelRatio;E.x=E.x-Ld(7.5,v),E.y=E.y-Ld(7.5,v),r({type:"SCRUBBER.PRESS_DOWN",point:E}),w.preventDefault()},style:{cursor:l?void 0:"ew-resize"}})}}}var dpe=(e,t={})=>new Intl.NumberFormat(e,t),ppe=(e,t={})=>new wN(e,t),Qb=(e,t)=>{const{prop:n,computed:r}=t;return n("formatOptions")?e===""?Number.NaN:r("parser").parse(e):parseFloat(e)},Aa=(e,t)=>{const{prop:n,computed:r}=t;return Number.isNaN(e)?"":n("formatOptions")?r("formatter").format(e):e.toString()},fpe=(e,t)=>{let n=e!==void 0&&!Number.isNaN(e)?e:1;return t?.style==="percent"&&(e===void 0||Number.isNaN(e))&&(n=.01),n},{choose:hpe,guards:gpe,createMachine:mpe}=Lie(),{not:RO,and:AO}=gpe,vpe=mpe({props({props:e}){const t=fpe(e.step,e.formatOptions);return{dir:"ltr",locale:"en-US",focusInputOnChange:!0,clampValueOnBlur:!e.allowOverflow,allowOverflow:!1,inputMode:"decimal",pattern:"-?[0-9]*(.[0-9]+)?",defaultValue:"",step:t,min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,spinOnPress:!0,...e,translations:{incrementLabel:"increment value",decrementLabel:"decrease value",...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getComputed:n}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(r){const o=n(),i=Qb(r,{computed:o,prop:e});e("onValueChange")?.({value:r,valueAsNumber:i})}})),hint:t(()=>({defaultValue:null})),scrubberCursorPoint:t(()=>({defaultValue:null,hash(r){return r?`x:${r.x}, y:${r.y}`:""}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",valueAsNumber:({context:e,computed:t,prop:n})=>Qb(e.get("value"),{computed:t,prop:n}),formattedValue:({computed:e,prop:t})=>Aa(e("valueAsNumber"),{computed:e,prop:t}),isAtMin:({computed:e,prop:t})=>doe(e("valueAsNumber"),t("min")),isAtMax:({computed:e,prop:t})=>uoe(e("valueAsNumber"),t("max")),isOutOfRange:({computed:e,prop:t})=>!sA(e("valueAsNumber"),t("min"),t("max")),isValueEmpty:({context:e})=>e.get("value")==="",isDisabled:({prop:e,context:t})=>!!e("disabled")||t.get("fieldsetDisabled"),canIncrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMax"),canDecrement:({prop:e,computed:t})=>e("allowOverflow")||!t("isAtMin"),valueText:({prop:e,context:t})=>e("translations").valueText?.(t.get("value")),formatter:j0(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>dpe(e,t)),parser:j0(({prop:e})=>[e("locale"),e("formatOptions")],([e,t])=>ppe(e,t))},watch({track:e,action:t,context:n,computed:r,prop:o}){e([()=>n.get("value"),()=>o("locale")],()=>{t(["syncInputElement"])}),e([()=>r("isOutOfRange")],()=>{t(["invokeOnInvalid"])}),e([()=>n.hash("scrubberCursorPoint")],()=>{t(["setVirtualCursorPosition"])})},effects:["trackFormControl"],on:{"VALUE.SET":{actions:["setRawValue"]},"VALUE.CLEAR":{actions:["clearValue"]},"VALUE.INCREMENT":{actions:["increment"]},"VALUE.DECREMENT":{actions:["decrement"]}},states:{idle:{on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","invokeOnFocus","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","invokeOnFocus","setHint","setCursorPoint"]},"INPUT.FOCUS":{target:"focused",actions:["focusInput","invokeOnFocus"]}}},focused:{tags:["focus"],effects:["attachWheelListener"],on:{"TRIGGER.PRESS_DOWN":[{guard:"isTouchPointer",target:"before:spin",actions:["setHint"]},{target:"before:spin",actions:["focusInput","setHint"]}],"SCRUBBER.PRESS_DOWN":{target:"scrubbing",actions:["focusInput","setHint","setCursorPoint"]},"INPUT.ARROW_UP":{actions:["increment"]},"INPUT.ARROW_DOWN":{actions:["decrement"]},"INPUT.HOME":{actions:["decrementToMin"]},"INPUT.END":{actions:["incrementToMax"]},"INPUT.CHANGE":{actions:["setValue","setHint"]},"INPUT.BLUR":[{guard:AO("clampValueOnBlur",RO("isInRange")),target:"idle",actions:["setClampedValue","clearHint","invokeOnBlur"]},{guard:RO("isInRange"),target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur","invokeOnInvalid"]},{target:"idle",actions:["setFormattedValue","clearHint","invokeOnBlur"]}],"INPUT.ENTER":{actions:["setFormattedValue","clearHint","invokeOnBlur"]}}},"before:spin":{tags:["focus"],effects:["trackButtonDisabled","waitForChangeDelay"],entry:hpe([{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}]),on:{CHANGE_DELAY:{target:"spinning",guard:AO("isInRange","spinOnPress")},"TRIGGER.PRESS_UP":[{guard:"isTouchPointer",target:"focused",actions:["clearHint"]},{target:"focused",actions:["focusInput","clearHint"]}]}},spinning:{tags:["focus"],effects:["trackButtonDisabled","spinValue"],on:{SPIN:[{guard:"isIncrementHint",actions:["increment"]},{guard:"isDecrementHint",actions:["decrement"]}],"TRIGGER.PRESS_UP":{target:"focused",actions:["focusInput","clearHint"]}}},scrubbing:{tags:["focus"],effects:["activatePointerLock","trackMousemove","setupVirtualCursor","preventTextSelection"],on:{"SCRUBBER.POINTER_UP":{target:"focused",actions:["focusInput","clearCursorPoint"]},"SCRUBBER.POINTER_MOVE":[{guard:"isIncrementHint",actions:["increment","setCursorPoint"]},{guard:"isDecrementHint",actions:["decrement","setCursorPoint"]}]}}},implementations:{guards:{clampValueOnBlur:({prop:e})=>e("clampValueOnBlur"),spinOnPress:({prop:e})=>!!e("spinOnPress"),isInRange:({computed:e})=>!e("isOutOfRange"),isDecrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="decrement",isIncrementHint:({context:e,event:t})=>(t.hint??e.get("hint"))==="increment",isTouchPointer:({event:e})=>e.pointerType==="touch"},effects:{waitForChangeDelay({send:e}){const t=setTimeout(()=>{e({type:"CHANGE_DELAY"})},300);return()=>clearTimeout(t)},spinValue({send:e}){const t=setInterval(()=>{e({type:"SPIN"})},50);return()=>clearInterval(t)},trackFormControl({context:e,scope:t}){const n=fd(t);return xw(n,{onFieldsetDisabledChange(r){e.set("fieldsetDisabled",r)},onFormReset(){e.set("value",e.initial("value"))}})},setupVirtualCursor({context:e,scope:t}){const n=e.get("scrubberCursorPoint");return ope(t,n)},preventTextSelection({scope:e}){return ipe(e)},trackButtonDisabled({context:e,scope:t,send:n}){const r=e.get("hint"),o=rpe(t,r);return vA(o,{attributes:["disabled"],callback(){n({type:"TRIGGER.PRESS_UP",src:"attr"})}})},attachWheelListener({scope:e,send:t,prop:n}){const r=fd(e);if(!r||!e.isActiveElement(r)||!n("allowMouseWheel"))return;function o(i){i.preventDefault();const s=Math.sign(i.deltaY)*-1;s===1?t({type:"VALUE.INCREMENT"}):s===-1&&t({type:"VALUE.DECREMENT"})}return Ft(r,"wheel",o,{passive:!1})},activatePointerLock({scope:e}){if(!Cv())return hie(e.getDoc())},trackMousemove({scope:e,send:t,context:n,computed:r}){const o=e.getDoc();function i(a){const l=n.get("scrubberCursorPoint"),c=r("isRtl"),u=spe(e,{point:l,isRtl:c,event:a});u.hint&&t({type:"SCRUBBER.POINTER_MOVE",hint:u.hint,point:u.point})}function s(){t({type:"SCRUBBER.POINTER_UP"})}return Bg(Ft(o,"mousemove",i,!1),Ft(o,"mouseup",s,!1))}},actions:{focusInput({scope:e,prop:t}){if(!t("focusInputOnChange"))return;const n=fd(e);e.isActiveElement(n)||tt(()=>n?.focus({preventScroll:!0}))},increment({context:e,event:t,prop:n,computed:r}){let o=moe(r("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(o=pn(o,n("min"),n("max"))),e.set("value",Aa(o,{computed:r,prop:n}))},decrement({context:e,event:t,prop:n,computed:r}){let o=voe(r("valueAsNumber"),t.step??n("step"));n("allowOverflow")||(o=pn(o,n("min"),n("max"))),e.set("value",Aa(o,{computed:r,prop:n}))},setClampedValue({context:e,prop:t,computed:n}){const r=pn(n("valueAsNumber"),t("min"),t("max"));e.set("value",Aa(r,{computed:n,prop:t}))},setRawValue({context:e,event:t,prop:n,computed:r}){let o=Qb(t.value,{computed:r,prop:n});n("allowOverflow")||(o=pn(o,n("min"),n("max"))),e.set("value",Aa(o,{computed:r,prop:n}))},setValue({context:e,event:t}){const n=t.target?.value??t.value;e.set("value",n)},clearValue({context:e}){e.set("value","")},incrementToMax({context:e,prop:t,computed:n}){const r=Aa(t("max"),{computed:n,prop:t});e.set("value",r)},decrementToMin({context:e,prop:t,computed:n}){const r=Aa(t("min"),{computed:n,prop:t});e.set("value",r)},setHint({context:e,event:t}){e.set("hint",t.hint)},clearHint({context:e}){e.set("hint",null)},invokeOnFocus({computed:e,prop:t}){t("onFocusChange")?.({focused:!0,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnBlur({computed:e,prop:t}){t("onFocusChange")?.({focused:!1,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},invokeOnInvalid({computed:e,prop:t,event:n}){if(n.type==="INPUT.CHANGE")return;const r=e("valueAsNumber")>t("max")?"rangeOverflow":"rangeUnderflow";t("onValueInvalid")?.({reason:r,value:e("formattedValue"),valueAsNumber:e("valueAsNumber")})},syncInputElement({context:e,event:t,computed:n,scope:r}){const o=t.type.endsWith("CHANGE")?e.get("value"):n("formattedValue"),i=fd(r),s=t.selection;tt(()=>{rf(i,o),cpe(i,s,r)})},setFormattedValue({context:e,computed:t}){e.set("value",t("formattedValue"))},setCursorPoint({context:e,event:t}){e.set("scrubberCursorPoint",t.point)},clearCursorPoint({context:e}){e.set("scrubberCursorPoint",null)},setVirtualCursorPosition({context:e,scope:t}){const n=EN(t),r=e.get("scrubberCursorPoint");!n||!r||(n.style.transform=`translate3d(${r.x}px, ${r.y}px, 0px)`)}}}});en()(["allowMouseWheel","allowOverflow","clampValueOnBlur","dir","disabled","focusInputOnChange","form","formatOptions","getRootNode","id","ids","inputMode","invalid","locale","max","min","name","onFocusChange","onValueChange","onValueInvalid","pattern","required","readOnly","spinOnPress","step","translations","value","defaultValue"]);const bpe=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=Yr(),s=A(()=>{const l=pe(e);return{id:n,ids:{label:i?.value.ids.label,input:i?.value.ids.control},disabled:i?.value.disabled,readOnly:i?.value.readOnly,required:i?.value.required,invalid:i?.value.invalid,dir:o.value.dir,locale:o.value.locale,value:l.modelValue,getRootNode:r?.value.getRootNode,...da(l),onValueChange:c=>{t?.("valueChange",c),t?.("update:modelValue",c.value),l.onValueChange?.(c)},onFocusChange:c=>{t?.("focusChange",c),l.onFocusChange?.(c)},onValueInvalid:c=>{t?.("valueInvalid",c),l.onValueInvalid?.(c)}}}),a=Ji(vpe,s);return A(()=>upe(a,ua))},ype=P({__name:"number-input-root",props:Ze({allowMouseWheel:{type:Boolean},allowOverflow:{type:Boolean},clampValueOnBlur:{type:Boolean},defaultValue:{},disabled:{type:Boolean},focusInputOnChange:{type:Boolean},form:{},formatOptions:{},id:{},ids:{},inputMode:{},invalid:{type:Boolean},locale:{},max:{},min:{},modelValue:{},name:{},pattern:{},readOnly:{type:Boolean},required:{type:Boolean},spinOnPress:{type:Boolean},step:{},translations:{},asChild:{type:Boolean}},{allowMouseWheel:void 0,allowOverflow:void 0,clampValueOnBlur:void 0,disabled:void 0,focusInputOnChange:void 0,invalid:void 0,readOnly:void 0,required:void 0,spinOnPress:void 0}),emits:["focusChange","valueChange","valueInvalid","update:modelValue"],setup(e,{emit:t}){const o=bpe(e,t);return yN(o),ee(),(i,s)=>(y(),$(d(te).div,F(d(o).getRootProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),xpe=P({__name:"number-input-scrubber",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getScrubberProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),wpe=P({__name:"number-input-value-text",props:{asChild:{type:Boolean}},setup(e){const t=fa();return ee(),(n,r)=>(y(),$(d(te).span,F(d(t).getValueTextProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Xu=Object.freeze(Object.defineProperty({__proto__:null,Context:Dde,Control:Lde,DecrementTrigger:Vde,IncrementTrigger:Fde,Input:Bde,Label:Hde,Root:ype,RootProvider:zde,Scrubber:xpe,ValueText:wpe},Symbol.toStringTag,{value:"Module"})),[ON,Io]=Tt("PopoverContext"),_pe=P({__name:"popover-anchor",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getAnchorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),kpe=P({__name:"popover-arrow-tip",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getArrowTipProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Cpe=P({__name:"popover-arrow",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getArrowProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Epe=P({__name:"popover-close-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getCloseTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ope=P({__name:"popover-content",props:{asChild:{type:Boolean}},setup(e){const t=Io(),n=Iv(),r=A(()=>bu(t.value.getContentProps(),n.value.presenceProps));return ee(),(o,i)=>d(n).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},r.value,{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),Ipe=P({__name:"popover-context",setup(e){const t=Io();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),Tpe=P({__name:"popover-description",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getDescriptionProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Spe=P({__name:"popover-indicator",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getIndicatorProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ppe=P({__name:"popover-positioner",props:{asChild:{type:Boolean}},setup(e){const t=Io(),n=yu(),r=af(A(()=>({...n.value,present:t.value.open})));return sf(r),ee(),(o,i)=>d(r).unmounted?Z("",!0):(y(),$(d(te).div,F({key:0},d(t).getPositionerProps(),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default")]),_:3},16,["as-child"]))}}),$pe=P({__name:"popover-root-provider",props:{value:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return ON(n),ui(A(()=>({lazyMount:t.lazyMount,unmountOnExit:t.unmountOnExit}))),ee(),(r,o)=>L(r.$slots,"default")}});var Rpe=_r("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Do=Rpe.build(),IN=e=>e.ids?.anchor??`popover:${e.id}:anchor`,TN=e=>e.ids?.trigger??`popover:${e.id}:trigger`,o1=e=>e.ids?.content??`popover:${e.id}:content`,SN=e=>e.ids?.positioner??`popover:${e.id}:popper`,Ape=e=>e.ids?.arrow??`popover:${e.id}:arrow`,i1=e=>e.ids?.title??`popover:${e.id}:title`,s1=e=>e.ids?.description??`popover:${e.id}:desc`,Npe=e=>e.ids?.closeTrigger??`popover:${e.id}:close`,NO=e=>e.getById(IN(e)),Gl=e=>e.getById(TN(e)),Wl=e=>e.getById(o1(e)),MO=e=>e.getById(SN(e)),Mpe=e=>e.getById(i1(e)),Dpe=e=>e.getById(s1(e));function Lpe(e,t){const{state:n,context:r,send:o,computed:i,prop:s,scope:a}=e,l=n.matches("open"),c=r.get("currentPlacement"),u=i("currentPortalled"),p=r.get("renderedElements"),h=Mw({...s("positioning"),placement:c});return{portalled:u,open:l,setOpen(f){n.matches("open")!==f&&o({type:f?"OPEN":"CLOSE"})},reposition(f={}){o({type:"POSITIONING.SET",options:f})},getArrowProps(){return t.element({id:Ape(a),...Do.arrow.attrs,dir:s("dir"),style:h.arrow})},getArrowTipProps(){return t.element({...Do.arrowTip.attrs,dir:s("dir"),style:h.arrowTip})},getAnchorProps(){return t.element({...Do.anchor.attrs,dir:s("dir"),id:IN(a)})},getTriggerProps(){return t.button({...Do.trigger.attrs,dir:s("dir"),type:"button","data-placement":c,id:TN(a),"aria-haspopup":"dialog","aria-expanded":l,"data-state":l?"open":"closed","aria-controls":o1(a),onPointerDown(f){Ls(f)&&Cv()&&f.currentTarget.focus()},onClick(f){f.defaultPrevented||o({type:"TOGGLE"})},onBlur(f){o({type:"TRIGGER_BLUR",target:f.relatedTarget})}})},getIndicatorProps(){return t.element({...Do.indicator.attrs,dir:s("dir"),"data-state":l?"open":"closed"})},getPositionerProps(){return t.element({id:SN(a),...Do.positioner.attrs,dir:s("dir"),style:h.floating})},getContentProps(){return t.element({...Do.content.attrs,dir:s("dir"),id:o1(a),tabIndex:-1,role:"dialog",hidden:!l,"data-state":l?"open":"closed","data-expanded":Y(l),"aria-labelledby":p.title?i1(a):void 0,"aria-describedby":p.description?s1(a):void 0,"data-placement":c})},getTitleProps(){return t.element({...Do.title.attrs,id:i1(a),dir:s("dir")})},getDescriptionProps(){return t.element({...Do.description.attrs,id:s1(a),dir:s("dir")})},getCloseTriggerProps(){return t.button({...Do.closeTrigger.attrs,dir:s("dir"),id:Npe(a),type:"button","aria-label":"close",onClick(f){f.defaultPrevented||(f.stopPropagation(),o({type:"CLOSE"}))}})}}}var Vpe={props({props:e}){return{closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0,...e,positioning:{placement:"bottom",...e.positioning}}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){e.set("currentPlacement",t("positioning").placement);const r=NO(n)??Gl(n);return _p(r,()=>MO(n),{...t("positioning"),defer:!0,onComplete(i){e.set("currentPlacement",i.placement)}})},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Wl(n);let o=!0;return Rv(r,{type:"popover",pointerBlocking:t("modal"),exclude:Gl(n),defer:!0,onEscapeKeyDown(i){t("onEscapeKeyDown")?.(i),!t("closeOnEscape")&&i.preventDefault()},onInteractOutside(i){t("onInteractOutside")?.(i),!i.defaultPrevented&&(o=!(i.detail.focusable||i.detail.contextmenu),t("closeOnInteractOutside")||i.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:bie(()=>Wl(t),{triggerElement:Gl(t),defer:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?lN(()=>[Wl(t),Gl(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return sN(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?iN(()=>Wl(t),{initialFocus:()=>jg({root:Wl(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")})}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){const o=NO(n)??Gl(n);_p(o,()=>MO(n),{...t("positioning"),...e.options,defer:!0,listeners:!1,onComplete(s){r.set("currentPlacement",s.placement)}})},checkRenderedElements({context:e,scope:t}){tt(()=>{Object.assign(e.get("renderedElements"),{title:!!Mpe(t),description:!!Dpe(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||tt(()=>{jg({root:Wl(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")})?.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){const n=e.restoreFocus??e.previousEvent?.restoreFocus;n!=null&&!n||tt(()=>{Gl(t)?.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{e("onOpenChange")?.({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};en()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const Fpe=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,getRootNode:r?.value.getRootNode,...da(a),onOpenChange:l=>{t?.("openChange",l),t?.("update:open",l.open),a.onOpenChange?.(l)},onEscapeKeyDown:l=>{t?.("escapeKeyDown",l),a.onEscapeKeyDown?.(l)},onFocusOutside:l=>{t?.("focusOutside",l),a.onFocusOutside?.(l)},onInteractOutside:l=>{t?.("interactOutside",l),a.onInteractOutside?.(l)},onPointerDownOutside:l=>{t?.("pointerDownOutside",l),a.onPointerDownOutside?.(l)}}}),s=Ji(Vpe,i);return A(()=>Lpe(s,ua))},Bpe=P({__name:"popover-root",props:Ze({autoFocus:{type:Boolean},closeOnEscape:{type:Boolean},closeOnInteractOutside:{type:Boolean},defaultOpen:{type:Boolean},id:{},ids:{},initialFocusEl:{type:Function},modal:{type:Boolean},open:{type:Boolean},persistentElements:{},portalled:{type:Boolean},positioning:{},lazyMount:{type:Boolean},unmountOnExit:{type:Boolean}},{autoFocus:void 0,closeOnEscape:void 0,closeOnInteractOutside:void 0,defaultOpen:void 0,modal:void 0,open:void 0,portalled:void 0}),emits:["escapeKeyDown","focusOutside","interactOutside","openChange","pointerDownOutside","requestDismiss","update:open"],setup(e,{emit:t}){const n=e,o=Fpe(n,t);return ON(o),ui(A(()=>({lazyMount:n.lazyMount,unmountOnExit:n.unmountOnExit}))),ee(),(i,s)=>L(i.$slots,"default")}}),Hpe=P({__name:"popover-title",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getTitleProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),zpe=P({__name:"popover-trigger",props:{asChild:{type:Boolean}},setup(e){const t=Io();return ee(),(n,r)=>(y(),$(d(te).button,F(d(t).getTriggerProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Xe=Object.freeze(Object.defineProperty({__proto__:null,Anchor:_pe,Arrow:Cpe,ArrowTip:kpe,CloseTrigger:Epe,Content:Ope,Context:Ipe,Description:Tpe,Indicator:Spe,Positioner:Ppe,Root:Bpe,RootProvider:$pe,Title:Hpe,Trigger:zpe},Symbol.toStringTag,{value:"Module"})),[PN,To]=Tt("SliderContext"),Upe=P({__name:"slider-context",setup(e){const t=To();return(n,r)=>L(n.$slots,"default",Be(Fe(d(t))))}}),jpe=P({__name:"slider-control",props:{asChild:{type:Boolean}},setup(e){const t=To();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getControlProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),[Gpe,$N]=Tt("SliderThumbPropsContext"),Wpe=P({__name:"slider-dragging-indicator",props:{asChild:{type:Boolean}},setup(e){const t=To(),n=$N(),r=xo();return ee(),(o,i)=>(y(),$(d(te).span,F(d(t).getDraggingIndicatorProps(d(n)),{"as-child":o.asChild}),{default:O(()=>[L(o.$slots,"default",{},()=>[re(j(r.default?.()||d(t).getThumbValue(d(n).index)),1)])]),_:3},16,["as-child"]))}}),qpe=P({__name:"slider-hidden-input",props:{asChild:{type:Boolean}},setup(e){const t=To(),n=$N();return ee(),(r,o)=>(y(),$(d(te).input,F(d(t).getHiddenInputProps(d(n)),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Kpe=P({__name:"slider-label",props:{asChild:{type:Boolean}},setup(e){const t=To();return ee(),(n,r)=>(y(),$(d(te).label,F(d(t).getLabelProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Ype=P({__name:"slider-marker-group",props:{asChild:{type:Boolean}},setup(e){const t=To();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getMarkerGroupProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Xpe=P({__name:"slider-marker",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=To();return ee(),(r,o)=>(y(),$(d(te).span,F(d(n).getMarkerProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Jpe=P({__name:"slider-range",props:{asChild:{type:Boolean}},setup(e){const t=To();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getRangeProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Zpe=P({__name:"slider-root-provider",props:{value:{},asChild:{type:Boolean}},setup(e){const t=e,n=A(()=>t.value);return PN(n),ee(),(r,o)=>(y(),$(d(te).div,F(n.value.getRootProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}});var Qpe=_r("slider").parts("root","label","thumb","valueText","track","range","control","markerGroup","marker","draggingIndicator"),Lo=Qpe.build(),RN=e=>e.ids?.root??`slider:${e.id}`,AN=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,a1=(e,t)=>e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,NN=e=>e.ids?.control??`slider:${e.id}:control`,efe=e=>e.ids?.track??`slider:${e.id}:track`,tfe=e=>e.ids?.range??`slider:${e.id}:range`,DO=e=>e.ids?.label??`slider:${e.id}:label`,nfe=e=>e.ids?.valueText??`slider:${e.id}:value-text`,rfe=(e,t)=>e.ids?.marker?.(t)??`slider:${e.id}:marker:${t}`,ofe=e=>e.getById(RN(e)),ife=(e,t)=>e.getById(AN(e,t)),MN=e=>bp(LN(e),"[role=slider]"),sfe=e=>MN(e)[0],DN=(e,t)=>e.getById(a1(e,t)),LN=e=>e.getById(NN(e)),LO=(e,t)=>{const{prop:n,scope:r}=e,o=LN(r);if(!o)return;const s=kw(t,o).getPercentValue({orientation:n("orientation"),dir:n("dir"),inverted:{y:!0}});return gw(s,n("min"),n("max"),n("step"))},afe=(e,t)=>{t.forEach((n,r)=>{const o=DN(e,r);o&&fA(o,{value:n})})},lfe=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function cfe(e){const t=e[0],n=e[e.length-1];return[t,n]}function ufe(e){const{prop:t,computed:n}=e,r=n("valuePercent"),[o,i]=cfe(r);if(r.length===1){if(t("origin")==="center"){const s=r[0]<50,a=s?`${r[0]}%`:"50%",l=s?"50%":`${100-r[0]}%`;return{start:a,end:l}}return t("origin")==="end"?{start:`${i}%`,end:"0%"}:{start:"0%",end:`${100-i}%`}}return{start:`${o}%`,end:`${100-i}%`}}function dfe(e){const{computed:t}=e,n=t("isVertical"),r=t("isRtl");return n?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[r?"right":"left"]:"var(--slider-range-start)",[r?"left":"right"]:"var(--slider-range-end)"}}function pfe(e,t){const{context:n,prop:r}=e,{height:o=0}=n.get("thumbSize")??{},i=H0([r("min"),r("max")],[-o/2,o/2]);return parseFloat(i(t).toFixed(2))}function ffe(e,t){const{computed:n,context:r,prop:o}=e,{width:i=0}=r.get("thumbSize")??{};if(n("isRtl")){const l=H0([o("max"),o("min")],[-i/2,i/2]);return-1*parseFloat(l(t).toFixed(2))}const a=H0([o("min"),o("max")],[-i/2,i/2]);return parseFloat(a(t).toFixed(2))}function hfe(e,t,n){const{computed:r,prop:o}=e;if(o("thumbAlignment")==="center")return`${t}%`;const i=r("isVertical")?pfe(e,n):ffe(e,n);return`calc(${t}% - ${i}px)`}function VN(e,t){const{prop:n}=e,r=yv(t,n("min"),n("max"))*100;return hfe(e,r,t)}function FN(e){const{computed:t,prop:n}=e;let r="visible";return n("thumbAlignment")==="contain"&&!t("hasMeasuredThumbSize")&&(r="hidden"),r}function VO(e,t){const{computed:n}=e,r=n("isVertical")?"bottom":"insetInlineStart";return{visibility:FN(e),position:"absolute",transform:"var(--slider-thumb-transform)",[r]:`var(--slider-thumb-offset-${t})`}}function gfe(){return{touchAction:"none",userSelect:"none",WebkitUserSelect:"none",position:"relative"}}function mfe(e){const{context:t,computed:n}=e,r=n("isVertical"),o=n("isRtl"),i=ufe(e),s=t.get("thumbSize");return{...t.get("value").reduce((l,c,u)=>{const p=VN(e,c);return{...l,[`--slider-thumb-offset-${u}`]:p}},{}),"--slider-thumb-width":BE(s?.width),"--slider-thumb-height":BE(s?.height),"--slider-thumb-transform":r?"translateY(50%)":o?"translateX(50%)":"translateX(-50%)","--slider-range-start":i.start,"--slider-range-end":i.end}}function vfe(e,t){const{computed:n}=e,r=n("isHorizontal"),o=n("isRtl");return{visibility:FN(e),position:"absolute",pointerEvents:"none",[r?"insetInlineStart":"bottom"]:VN(e,t),translate:"var(--translate-x) var(--translate-y)","--translate-x":r?o?"50%":"-50%":"0%","--translate-y":r?"0%":"50%"}}function bfe(){return{userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none",position:"relative"}}function yfe(e,t){return t.map((n,r)=>l1(e,n,r))}function Fs(e,t){const{context:n,prop:r}=e,o=r("step")*r("minStepsBetweenThumbs");return lA(n.get("value"),r("min"),r("max"),o)[t]}function l1(e,t,n){const{prop:r}=e,o=Fs(e,n),i=gp(t,r("min"),r("max"),r("step"));return pn(i,o.min,o.max)}function xfe(e,t,n){const{context:r,prop:o}=e,i=t??r.get("focusedIndex"),s=Fs(e,i),a=hoe(i,{...s,step:n??o("step"),values:r.get("value")});return a[i]=pn(a[i],s.min,s.max),a}function wfe(e,t,n){const{context:r,prop:o}=e,i=t??r.get("focusedIndex"),s=Fs(e,i),a=foe(i,{...s,step:n??o("step"),values:r.get("value")});return a[i]=pn(a[i],s.min,s.max),a}function _fe(e,t){const{context:n}=e;return goe(n.get("value"),t)}function kfe(e,t){const{state:n,send:r,context:o,prop:i,computed:s,scope:a}=e,l=i("aria-label"),c=i("aria-labelledby"),u=o.get("value"),p=o.get("focusedIndex"),h=n.matches("focus"),f=n.matches("dragging"),g=s("isDisabled"),m=i("invalid"),b=s("isInteractive"),w=i("orientation")==="horizontal",E=i("orientation")==="vertical";function k(_){return yv(_,i("min"),i("max"))}function v(_){return gw(_,i("min"),i("max"),i("step"))}return{value:u,dragging:f,focused:h,setValue(_){r({type:"SET_VALUE",value:_})},getThumbValue(_){return u[_]},setThumbValue(_,T){r({type:"SET_VALUE",index:_,value:T})},getValuePercent:k,getPercentValue:v,getThumbPercent(_){return k(u[_])},setThumbPercent(_,T){const N=v(T);r({type:"SET_VALUE",index:_,value:N})},getThumbMin(_){return Fs(e,_).min},getThumbMax(_){return Fs(e,_).max},increment(_){r({type:"INCREMENT",index:_})},decrement(_){r({type:"DECREMENT",index:_})},focus(){b&&r({type:"FOCUS",index:0})},getLabelProps(){return t.label({...Lo.label.attrs,dir:i("dir"),"data-disabled":Y(g),"data-orientation":i("orientation"),"data-invalid":Y(m),"data-dragging":Y(f),"data-focus":Y(h),id:DO(a),htmlFor:a1(a,0),onClick(_){b&&(_.preventDefault(),sfe(a)?.focus())},style:{userSelect:"none",WebkitUserSelect:"none"}})},getRootProps(){return t.element({...Lo.root.attrs,"data-disabled":Y(g),"data-orientation":i("orientation"),"data-dragging":Y(f),"data-invalid":Y(m),"data-focus":Y(h),id:RN(a),dir:i("dir"),style:mfe(e)})},getValueTextProps(){return t.element({...Lo.valueText.attrs,dir:i("dir"),"data-disabled":Y(g),"data-orientation":i("orientation"),"data-invalid":Y(m),"data-focus":Y(h),id:nfe(a)})},getTrackProps(){return t.element({...Lo.track.attrs,dir:i("dir"),id:efe(a),"data-disabled":Y(g),"data-invalid":Y(m),"data-dragging":Y(f),"data-orientation":i("orientation"),"data-focus":Y(h),style:{position:"relative"}})},getThumbProps(_){const{index:T=0,name:N}=_,C=u[T],x=Fs(e,T),I=i("getAriaValueText")?.({value:C,index:T}),R=Array.isArray(l)?l[T]:l,M=Array.isArray(c)?c[T]:c;return t.element({...Lo.thumb.attrs,dir:i("dir"),"data-index":T,"data-name":N,id:AN(a,T),"data-disabled":Y(g),"data-orientation":i("orientation"),"data-focus":Y(h&&p===T),"data-dragging":Y(f&&p===T),draggable:!1,"aria-disabled":mp(g),"aria-label":R,"aria-labelledby":M??DO(a),"aria-orientation":i("orientation"),"aria-valuemax":x.max,"aria-valuemin":x.min,"aria-valuenow":u[T],"aria-valuetext":I,role:"slider",tabIndex:g?void 0:0,style:VO(e,T),onPointerDown(B){b&&Ls(B)&&(r({type:"THUMB_POINTER_DOWN",index:T}),B.stopPropagation())},onBlur(){b&&r({type:"BLUR"})},onFocus(){b&&r({type:"FOCUS",index:T})},onKeyDown(B){if(B.defaultPrevented||!b)return;const z=Ug(B)*i("step"),J={ArrowUp(){w||r({type:"ARROW_INC",step:z,src:"ArrowUp"})},ArrowDown(){w||r({type:"ARROW_DEC",step:z,src:"ArrowDown"})},ArrowLeft(){E||r({type:"ARROW_DEC",step:z,src:"ArrowLeft"})},ArrowRight(){E||r({type:"ARROW_INC",step:z,src:"ArrowRight"})},PageUp(){r({type:"ARROW_INC",step:z,src:"PageUp"})},PageDown(){r({type:"ARROW_DEC",step:z,src:"PageDown"})},Home(){r({type:"HOME"})},End(){r({type:"END"})}},q=Wc(B,{dir:i("dir"),orientation:i("orientation")}),K=J[q];K&&(K(B),B.preventDefault(),B.stopPropagation())}})},getHiddenInputProps(_){const{index:T=0,name:N}=_;return t.input({name:N??(i("name")?i("name")+(u.length>1?"[]":""):void 0),form:i("form"),type:"text",hidden:!0,defaultValue:u[T],id:a1(a,T)})},getRangeProps(){return t.element({id:tfe(a),...Lo.range.attrs,dir:i("dir"),"data-dragging":Y(f),"data-focus":Y(h),"data-invalid":Y(m),"data-disabled":Y(g),"data-orientation":i("orientation"),style:dfe(e)})},getControlProps(){return t.element({...Lo.control.attrs,dir:i("dir"),id:NN(a),"data-dragging":Y(f),"data-disabled":Y(g),"data-orientation":i("orientation"),"data-invalid":Y(m),"data-focus":Y(h),style:gfe(),onPointerDown(_){if(!b||!Ls(_)||Gc(_))return;const T=jo(_);r({type:"POINTER_DOWN",point:T}),_.preventDefault(),_.stopPropagation()}})},getMarkerGroupProps(){return t.element({...Lo.markerGroup.attrs,role:"presentation",dir:i("dir"),"aria-hidden":!0,"data-orientation":i("orientation"),style:bfe()})},getMarkerProps(_){const T=vfe(e,_.value);let N;return _.valuehw(u)?N="over-value":N="at-value",t.element({...Lo.marker.attrs,id:rfe(a,_.value),role:"presentation",dir:i("dir"),"data-orientation":i("orientation"),"data-value":_.value,"data-disabled":Y(g),"data-state":N,style:T})},getDraggingIndicatorProps(_){const{index:T=0}=_,N=T===p&&f;return t.element({...Lo.draggingIndicator.attrs,role:"presentation",dir:i("dir"),hidden:!N,"data-orientation":i("orientation"),"data-state":N?"open":"closed",style:VO(e,T)})}}}var Cfe=(e,t)=>e?.width===t?.width&&e?.height===t?.height,FO=(e,t,n,r,o)=>lA(e,t,n,o*r).map(s=>{const a=gp(s.value,s.min,s.max,r),l=pn(a,s.min,s.max);if(!sA(l,t,n))throw new Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return l}),Efe={props({props:e}){const t=e.min??0,n=e.max??100,r=e.step??1,o=e.defaultValue??[t],i=e.minStepsBetweenThumbs??0;return{dir:"ltr",thumbAlignment:"contain",origin:"start",orientation:"horizontal",minStepsBetweenThumbs:i,...e,defaultValue:FO(o,t,n,r,i),value:e.value?FO(e.value,t,n,r,i):void 0,max:n,step:r,min:t}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{thumbSize:t(()=>({defaultValue:e("thumbSize")||null})),value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:vu,hash(r){return r.join(",")},onChange(r){e("onValueChange")?.({value:r})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(r){const o=n();e("onFocusChange")?.({focusedIndex:r,value:o.get("value")})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},computed:{isHorizontal:({prop:e})=>e("orientation")==="horizontal",isVertical:({prop:e})=>e("orientation")==="vertical",isRtl:({prop:e})=>e("orientation")==="horizontal"&&e("dir")==="rtl",isDisabled:({context:e,prop:t})=>!!t("disabled")||e.get("fieldsetDisabled"),isInteractive:({prop:e,computed:t})=>!(e("readOnly")||t("isDisabled")),hasMeasuredThumbSize:({context:e})=>e.get("thumbSize")!=null,valuePercent:j0(({context:e,prop:t})=>[e.get("value"),t("min"),t("max")],([e,t,n])=>e.map(r=>100*yv(r,t,n)))},watch({track:e,action:t,context:n}){e([()=>n.hash("value")],()=>{t(["syncInputElements","dispatchChangeEvent"])})},effects:["trackFormControlState","trackThumbSize"],on:{SET_VALUE:[{guard:"hasIndex",actions:["setValueAtIndex"]},{actions:["setValue"]}],INCREMENT:{actions:["incrementThumbAtIndex"]},DECREMENT:{actions:["decrementThumbAtIndex"]}},states:{idle:{on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},FOCUS:{target:"focus",actions:["setFocusedIndex"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]}}},focus:{entry:["focusActiveThumb"],on:{POINTER_DOWN:{target:"dragging",actions:["setClosestThumbIndex","setPointerValue","focusActiveThumb"]},THUMB_POINTER_DOWN:{target:"dragging",actions:["setFocusedIndex","focusActiveThumb"]},ARROW_DEC:{actions:["decrementThumbAtIndex","invokeOnChangeEnd"]},ARROW_INC:{actions:["incrementThumbAtIndex","invokeOnChangeEnd"]},HOME:{actions:["setFocusedThumbToMin","invokeOnChangeEnd"]},END:{actions:["setFocusedThumbToMax","invokeOnChangeEnd"]},BLUR:{target:"idle",actions:["clearFocusedIndex"]}}},dragging:{entry:["focusActiveThumb"],effects:["trackPointerMove"],on:{POINTER_UP:{target:"focus",actions:["invokeOnChangeEnd"]},POINTER_MOVE:{actions:["setPointerValue"]}}}},implementations:{guards:{hasIndex:({event:e})=>e.index!=null},effects:{trackFormControlState({context:e,scope:t}){return xw(ofe(t),{onFieldsetDisabledChange(n){e.set("fieldsetDisabled",n)},onFormReset(){e.set("value",e.initial("value"))}})},trackPointerMove({scope:e,send:t}){return xA(e.getDoc(),{onPointerMove(n){t({type:"POINTER_MOVE",point:n.point})},onPointerUp(){t({type:"POINTER_UP"})}})},trackThumbSize({context:e,scope:t,prop:n}){if(!(n("thumbAlignment")!=="contain"||n("thumbSize")))return kie(MN(t),{box:"border-box",measure(r){return lfe(r)},onEntry({rects:r}){if(r.length===0)return;const o=boe(r[0],["width","height"]);Cfe(e.get("thumbSize"),o)||e.set("thumbSize",o)}})}},actions:{dispatchChangeEvent({context:e,scope:t}){afe(t,e.get("value"))},syncInputElements({context:e,scope:t}){e.get("value").forEach((n,r)=>{const o=DN(t,r);rf(o,n.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e("onValueChangeEnd")?.({value:t.get("value")})})},setClosestThumbIndex(e){const{context:t,event:n}=e,r=LO(e,n.point);if(r==null)return;const o=_fe(e,r);t.set("focusedIndex",o)},setFocusedIndex({context:e,event:t}){e.set("focusedIndex",t.index)},clearFocusedIndex({context:e}){e.set("focusedIndex",-1)},setPointerValue(e){queueMicrotask(()=>{const{context:t,event:n}=e,r=LO(e,n.point);if(r==null)return;const o=t.get("focusedIndex"),i=l1(e,r,o);t.set("value",s=>ud(s,o,i))})},focusActiveThumb({scope:e,context:t}){tt(()=>{ife(e,t.get("focusedIndex"))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){const{context:t,event:n}=e,r=xfe(e,n.index,n.step);t.set("value",r)},incrementThumbAtIndex(e){const{context:t,event:n}=e,r=wfe(e,n.index,n.step);t.set("value",r)},setFocusedThumbToMin(e){const{context:t}=e,n=t.get("focusedIndex"),{min:r}=Fs(e,n);t.set("value",o=>ud(o,n,r))},setFocusedThumbToMax(e){const{context:t}=e,n=t.get("focusedIndex"),{max:r}=Fs(e,n);t.set("value",o=>ud(o,n,r))},setValueAtIndex(e){const{context:t,event:n}=e,r=l1(e,n.value,n.index);t.set("value",o=>ud(o,n.index,r))},setValue(e){const{context:t,event:n}=e,r=yfe(e,n.value);t.set("value",r)}}}};en()(["aria-label","aria-labelledby","dir","disabled","form","getAriaValueText","getRootNode","id","ids","invalid","max","min","minStepsBetweenThumbs","name","onFocusChange","onValueChange","onValueChangeEnd","orientation","origin","readOnly","step","thumbAlignment","thumbAlignment","thumbSize","value","defaultValue"]);en()(["index","name"]);const Ofe=(e={},t)=>{const n=nt(),r=Zi(Qi),o=ts(es),i=A(()=>{const a=pe(e);return{id:n,dir:o.value.dir,value:a.modelValue,getRootNode:r?.value.getRootNode,...da(a),onFocusChange:l=>{t?.("focusChange",l),a.onFocusChange?.(l)},onValueChangeEnd:l=>{t?.("valueChangeEnd",l),a.onValueChangeEnd?.(l)},onValueChange:l=>{t?.("valueChange",l),t?.("update:modelValue",l.value),a.onValueChange?.(l)}}}),s=Ji(Efe,i);return A(()=>kfe(s,ua))},Ife=P({__name:"slider-root",props:Ze({"aria-label":{},"aria-labelledby":{},defaultValue:{},dir:{},disabled:{type:Boolean},form:{},getAriaValueText:{type:Function},getRootNode:{type:Function},id:{},ids:{},invalid:{type:Boolean},max:{},min:{},minStepsBetweenThumbs:{},modelValue:{},name:{},orientation:{},origin:{},readOnly:{type:Boolean},step:{},thumbAlignment:{},thumbSize:{},asChild:{type:Boolean}},{disabled:void 0,invalid:void 0,readOnly:void 0}),emits:["focusChange","valueChange","valueChangeEnd","update:modelValue"],setup(e,{emit:t}){const o=Ofe(e,t);return PN(o),ee(),(i,s)=>(y(),$(d(te).div,F(d(o).getRootProps(),{"as-child":i.asChild}),{default:O(()=>[L(i.$slots,"default")]),_:3},16,["as-child"]))}}),Tfe=P({__name:"slider-thumb",props:{index:{},name:{},asChild:{type:Boolean}},setup(e){const t=e,n=To();return Gpe(t),ee(),(r,o)=>(y(),$(d(te).div,F(d(n).getThumbProps(t),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default")]),_:3},16,["as-child"]))}}),Sfe=P({__name:"slider-track",props:{asChild:{type:Boolean}},setup(e){const t=To();return ee(),(n,r)=>(y(),$(d(te).div,F(d(t).getTrackProps(),{"as-child":n.asChild}),{default:O(()=>[L(n.$slots,"default")]),_:3},16,["as-child"]))}}),Pfe=P({__name:"slider-value-text",props:{asChild:{type:Boolean}},setup(e){const t=To(),n=xo();return ee(),(r,o)=>(y(),$(d(te).span,F(d(t).getValueTextProps(),{"as-child":r.asChild}),{default:O(()=>[L(r.$slots,"default",{},()=>[re(j(n.default?.()||d(t).value.join(", ")),1)])]),_:3},16,["as-child"]))}}),Nr=Object.freeze(Object.defineProperty({__proto__:null,Context:Upe,Control:jpe,DraggingIndicator:Wpe,HiddenInput:qpe,Label:Kpe,Marker:Xpe,MarkerGroup:Ype,Range:Jpe,Root:Ife,RootProvider:Zpe,Thumb:Tfe,Track:Sfe,ValueText:Pfe},Symbol.toStringTag,{value:"Module"})),$fe={trailing:!0};function BN(e,t=25,n={}){if(n={...$fe,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,i=[],s,a;const l=(p,h)=>(s=Rfe(e,p,h),s.finally(()=>{if(s=null,n.trailing&&a&&!o){const f=l(p,a);return a=null,f}}),s),c=function(...p){return n.trailing&&(a=p),s||new Promise(h=>{const f=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const g=n.leading?r:l(this,p);a=null;for(const m of i)m(g);i=[]},t),f?(r=l(this,p),h(r)):i.push(h)})},u=p=>{p&&(clearTimeout(p),o=null)};return c.isPending=()=>!!o,c.cancel=()=>{u(o),i=[],a=null},c.flush=()=>{if(u(o),!a||s)return;const p=a;return a=null,l(this,p)},c}async function Rfe(e,t,n){return await e.apply(t,n)}function Afe(){return document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")||""}function ha(){return Nfe()}function ey(e,t={}){const n=Q(null),r=Q(null),o=Q(!1),i=Q(!1),s=Q(null);let a=null;const l=[],c=[],u=[],p=async(w,E=!1)=>{Kc.start(),o.value=!0,i.value=!1,r.value=null,a=new AbortController;try{const k=await e(a.signal,w);if(s.value=k.status,!k.ok)throw new Error(`HTTP error! status: ${k.status}`);const v=t.responseType==="text"?await k.text():await k.json();return n.value=v,l.forEach(_=>_(v)),v}catch(k){const v=k instanceof Error?k:new Error(String(k));if(r.value=v,c.forEach(_=>_(v)),E)throw v;return null}finally{o.value=!1,i.value=!0,Kc.done(),u.forEach(k=>k())}},h=()=>{a&&(a.abort(),a=null)},f=w=>{l.push(w)},g=w=>{c.push(w)},m=w=>{u.push(w)};t.immediate&&p();const b={data:n,error:r,isFetching:o,isFinished:i,statusCode:s,execute:p,abort:h,onSuccess:f,onError:g,onFinish:m,json:()=>(t.responseType="json",b),text:()=>(t.responseType="text",b)};return b}function Nfe(){const e=Afe();return{get(t,n={}){return ey(r=>fetch(pe(t),{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":e,Accept:"application/json"},signal:r}),n)},post(t,n,r={}){return ey((o,i)=>{const s=i!==void 0?i:n;return fetch(pe(t),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":e,Accept:"application/json"},body:s?JSON.stringify(s):void 0,signal:o})},r)},postFormData(t,n,r={}){return ey((o,i)=>{const s=i!==void 0?i:n;return fetch(pe(t),{method:"POST",headers:{"X-CSRF-TOKEN":e},body:s,signal:o})},r)}}}function Mfe(e){const{state:t}=Dt(),{post:n}=ha();return n(window.editorConfig.routes.persistUpdates,{theme:t.theme?.code,channel:window.editorConfig.defaultChannel,locale:window.editorConfig.editorLocale,template:{url:t.pageData?.url||"",name:t.pageData?.template||"index",sources:t.pageData?.sources},updates:e}).text()}function Dfe(e){const{state:t}=Dt(),{post:n}=ha(),r=n(window.editorConfig.routes.persistThemeSettings,{theme:t.theme.code,channel:t.channel||window.editorConfig.defaultChannel,locale:t.locale||window.editorConfig.editorLocale,template:{url:t.pageData?.url||"",name:t.pageData?.template||"index",sources:t.pageData?.sources},updates:e}).text();return r.onError(o=>{console.error("Failed to persist theme settings:",o)}),r}function Lfe(e){const{state:t}=Dt(),{post:n}=ha(),r=n(window.editorConfig.routes.publishTheme,{theme:t.theme.code,channel:t.channel||window.editorConfig.defaultChannel,locale:t.locale||window.editorConfig.editorLocale,template:t.pageData?.template||"index",page:e});return r.onError(o=>{console.error("Failed to publish theme:",o)}),r}function Vfe(){const{state:e}=Dt(),t=Q("/api/categories"),{get:n}=ha(),r=n(t);r.onSuccess(i=>{(i?.data||[]).forEach(a=>{e.categories.set(a.id,a)})}),r.onError(i=>{console.error("Failed to fetch categories:",i)});function o(i={}){const s=new URL("/api/categories",window.location.origin);return s.searchParams.append("channel",i.channel||e.channel),s.searchParams.append("locale",i.locale||e.locale),i.search&&s.searchParams.append("name",i.search),t.value=s.href,r.execute()}return{...r,execute:o}}function Ffe(){const{state:e}=Dt(),t=Q("/api/products"),{get:n}=ha(),r=n(t);r.onSuccess(i=>{(i?.data||[]).forEach(a=>{e.products.set(a.id,a)})}),r.onError(i=>{console.error("Failed to fetch products:",i)});function o(i={}){const s=new URL("/api/products",window.location.origin);return s.searchParams.append("channel",i.channel||e.channel),s.searchParams.append("locale",i.locale||e.locale),i.search&&s.searchParams.append("name",i.search),t.value=s.href,r.execute()}return{...r,execute:o}}function Bfe(){const{state:e}=Dt(),t=Q(window.editorConfig.routes.getCmsPages),{get:n}=ha(),r=n(t);r.onSuccess(i=>{(i||[]).forEach(a=>{e.cmsPages.set(a.id,a)})}),r.onError(i=>{console.error("Failed to fetch CMS pages:",i)});function o(i={}){const s=window.editorConfig.routes.getCmsPages,a=new URL(s,window.location.origin);return a.searchParams.append("channel",i.channel||e.channel),a.searchParams.append("locale",i.locale||e.locale),i.search&&a.searchParams.append("title",i.search),t.value=a.href,r.execute()}return{...r,execute:o}}const Hfe={class:"h-full flex flex-col overflow-y-hidden z-[100]"},zfe={class:"flex-none h-12 flex items-center border-b px-4"},Ufe={class:"flex-1 overflow-y-auto"},jfe={key:0},Gfe={key:0,class:"border-t pt-2 mb-1"},Wfe={class:"text-sm font-medium"},qfe={key:1,class:"p-4 text-sm text-gray-500 text-center"},Kfe=P({__name:"ThemeSettingsPanel",setup(e){const{t}=Et(),{theme:n}=Dt(),r=dt(S_),o=Q({}),i=BN(async()=>{if(!r||Object.keys(o.value).length===0)return;const a={...o.value};o.value={};const l=Dfe(a);l.onSuccess(c=>{c?r.preview.sendMessage("page.refresh",{html:c}):r.preview.reload()}),l.onError(c=>{console.error("Failed to persist theme settings:",c),r.ui.toast({type:"error",title:"Failed to save theme settings"})}),await l.execute()},500),s=(a,l)=>{n.value&&(n.value.settings[a]=l,o.value[a]=l,i())};return(a,l)=>{const c=mu;return y(),V("div",Hfe,[D("div",zfe,[D("h2",null,j(d(t)("Theme Settings")),1)]),D("div",Ufe,[d(n)?.settingsSchema&&d(n).settingsSchema.length>0?(y(),V("div",jfe,[S(d(qu).Root,{value:d(n).settingsSchema[0]?.name,collapsible:""},{default:O(()=>[(y(!0),V(ge,null,Ie(d(n).settingsSchema,u=>(y(),$(d(qu).Item,{key:u.name,value:u.name,class:"border-b"},{default:O(()=>[S(d(qu).ItemTrigger,{class:"w-full bg-white z-10 cursor-pointer px-4 py-3 font-medium text-sm hover:bg-gray-50 flex items-center justify-between text-zinc-700"},{default:O(()=>[D("span",null,j(u.name),1),S(d(qu).ItemIndicator,{class:"text-zinc-400 transition-transform duration-200 data-[state=open]:rotate-180"},{default:O(()=>[S(c,{class:"w-3 h-3"})]),_:1})]),_:2},1024),S(d(qu).ItemContent,{class:"px-4 py-3 space-y-4"},{default:O(()=>[(y(!0),V(ge,null,Ie(u.settings,p=>(y(),V(ge,{key:p.id},[p.type==="header"?(y(),V("div",Gfe,[D("h3",Wfe,j(p.label),1)])):(y(),$(d(ws),{key:1,field:p,"model-value":d(n)?.settings?.[p.id]??p.default,"onUpdate:modelValue":h=>s(p.id,h)},null,8,["field","model-value","onUpdate:modelValue"]))],64))),128))]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])):(y(),V("div",qfe,j(d(t)("No theme settings available")),1))])])}}}),Yfe={class:"h-full flex flex-col overflow-y-hidden"},Xfe={class:"flex-none h-12 flex items-center border-b px-4"},Jfe=P({__name:"MediaPanel",setup(e){const{t}=Et();return(n,r)=>(y(),V("div",Yfe,[D("div",Xfe,[D("h2",null,j(d(t)("Media")),1)]),r[0]||(r[0]=D("div",{class:"flex-1 overflow-y-auto"},null,-1))]))}}),Zfe={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function Qfe(e,t){return y(),V("svg",Zfe,[...t[0]||(t[0]=[D("g",{fill:"currentColor"},[D("path",{d:"M3 2v4.586l7 7L14.586 9l-7-7zM2 2a1 1 0 0 1 1-1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 2 6.586z"}),D("path",{d:"M5.5 5a.5.5 0 1 1 0-1a.5.5 0 0 1 0 1m0 1a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3M1 7.086a1 1 0 0 0 .293.707L8.75 15.25l-.043.043a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 0 7.586V3a1 1 0 0 1 1-1z"})],-1)])])}const Mv=fe({name:"bi-tags",render:Qfe}),ehe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},the={},nhe={class:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function rhe(e,t){return y(),V("svg",nhe,[...t[0]||(t[0]=[D("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),D("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])}const Gw=ehe(the,[["render",rhe]]),ohe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ihe(e,t){return y(),V("svg",ohe,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const pf=fe({name:"heroicons-magnifying-glass",render:ihe});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const BO=()=>{};function she(e,t){function n(...r){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(i)})}return n}function ahe(e,t={}){let n,r,o=BO;const i=l=>{clearTimeout(l),o(),o=BO};let s;return l=>{const c=pe(e),u=pe(t.maxWait);return n&&i(n),c<=0||u!==void 0&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(l())):new Promise((p,h)=>{o=t.rejectOnCancel?h:p,s=l,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,p(s())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,p(l())},c)})}}function Ww(e,t=200,n={}){return she(ahe(t,n),e)}const lhe={class:"flex flex-col overflow-y-hidden"},che={key:0,class:"flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring-2 focus-within:ring-zinc-700"},uhe=["placeholder"],dhe={class:"flex-1 overflow-y-auto border-t"},phe={key:0,class:"h-20 flex items-center justify-center"},fhe={key:1},hhe=["onClick"],ghe=["src","alt"],mhe={class:"truncate flex-1 w-0"},HN=P({__name:"CategoryListbox",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t}=Et(),{channel:n,locale:r,getCategories:o}=Dt(),i=rt(e,"modelValue"),s=Q(""),a=A(()=>{const p=o();if(!s.value)return p;const h=s.value.toLowerCase();return p.filter(f=>f.name.toLowerCase().includes(h))}),{isFetching:l,execute:c}=Vfe(),u=Ww(()=>{c({search:s.value})});return Je(()=>c()),st([n,r],()=>{c()}),(p,h)=>{const f=pf,g=Gw,m=Mv;return y(),V("div",lhe,[d(s)||d(a).length>2?(y(),V("div",che,[S(f,{class:"w-4 h-4"}),yo(D("input",{"onUpdate:modelValue":h[0]||(h[0]=b=>Ce(s)?s.value=b:null),type:"text",class:"focus:outline-none text-zinc-600",placeholder:d(t)("Search category"),onInput:h[1]||(h[1]=(...b)=>d(u)&&d(u)(...b))},null,40,uhe),[[Zo,d(s)]])])):Z("",!0),D("div",dhe,[d(l)?(y(),V("div",phe,[S(g,{class:"h-6 w-6 text-zinc-700"})])):(y(),V("div",fhe,[(y(!0),V(ge,null,Ie(d(a),b=>(y(),V("a",{key:b.id,href:"#",class:Ne(["flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm",{"bg-neutral-200":i.value&&i.value.id===b.id}]),onClick:It(w=>i.value=b,["stop","prevent"])},[b.logo?(y(),V("img",{key:0,src:b.logo.small_image_url,alt:b.name,class:"w-5 h-5 object-cover flex-none"},null,8,ghe)):(y(),$(m,{key:1,class:"w-4 h-4 flex-none mr-1 transform rotate-90"})),D("span",mhe,j(b.name),1)],10,hhe))),128))]))])])}}}),vhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function bhe(e,t){return y(),V("svg",vhe,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6 18L18 6M6 6l12 12"},null,-1)])])}const So=fe({name:"heroicons-x-mark",render:bhe}),yhe={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},xhe={class:"flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm"},whe=["src","alt"],_he={class:"flex-1 w-0 truncate"},khe={key:1},Che=P({__name:"CategoryPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),{getCategory:n}=Dt(),r=rt(e,"modelValue"),o=Q(!1),i=A({get:()=>r.value?n(r.value):null,set:s=>{r.value=s?s.id:null}});return(s,a)=>{const l=Mv,c=So,u=HN;return y(),V("div",null,[e.field.label?(y(),V("label",yhe,j(e.field.label),1)):Z("",!0),S(d(Xe).Root,{open:d(o),"onUpdate:open":a[3]||(a[3]=p=>Ce(o)?o.value=p:null)},{default:O(()=>[S(d(Xe).Trigger,{"as-child":""},{default:O(()=>[D("div",xhe,[d(i)?(y(),V(ge,{key:0},[d(i).logo?(y(),V("img",{key:0,src:d(i).logo.small_image_url,alt:d(i).name,class:"w-5 h-5 object-cover flex-none"},null,8,whe)):(y(),$(l,{key:1,class:"w-4 h-4 flex-none transform rotate-90"})),D("span",_he,j(d(i).name),1),D("button",{class:"flex-none rounded-lg hover:bg-neutral-200 p-1",onClick:a[0]||(a[0]=It(p=>r.value=null,["stop"]))},[S(c)])],64)):(y(),V("span",khe,j(d(t)("Select category")),1))])]),_:1}),S(d(Xe).Positioner,{class:"w-[var(--reference-width)] !z-10"},{default:O(()=>[S(d(Xe).Content,{class:"border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col"},{default:O(()=>[S(d(Xe).Arrow,{style:{"--arrow-size":"0.5rem"},class:"bg-white"},{default:O(()=>[S(d(Xe).ArrowTip,{class:"border-t border-l"})]),_:1}),S(u,{modelValue:d(i),"onUpdate:modelValue":[a[1]||(a[1]=p=>Ce(i)?i.value=p:null),a[2]||(a[2]=p=>o.value=!1)]},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),Ehe={viewBox:"0 0 16 16",width:"1.2em",height:"1.2em"};function Ohe(e,t){return y(),V("svg",Ehe,[...t[0]||(t[0]=[D("g",{fill:"currentColor"},[D("path",{d:"M6 4.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1 0a.5.5 0 1 0-1 0a.5.5 0 0 0 1 0"}),D("path",{d:"M2 1h4.586a1 1 0 0 1 .707.293l7 7a1 1 0 0 1 0 1.414l-4.586 4.586a1 1 0 0 1-1.414 0l-7-7A1 1 0 0 1 1 6.586V2a1 1 0 0 1 1-1m0 5.586l7 7L13.586 9l-7-7H2z"})],-1)])])}const zN=fe({name:"bi-tag",render:Ohe}),Ihe={class:"flex flex-col overflow-y-hidden"},The={class:"flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring focus-within:ring-zinc-700"},She=["placeholder"],Phe={class:"flex-1 overflow-y-auto border-t"},$he={key:0,class:"h-20 flex items-center justify-center"},Rhe={key:1},Ahe=["onClick"],Nhe=["src","alt"],Mhe={class:"flex-1 w-0 truncate"},UN=P({__name:"ProductListbox",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t}=Et(),{channel:n,locale:r,getProducts:o}=Dt(),i=rt(e,"modelValue"),s=Q(""),a=A(()=>{const h=o();if(!s.value)return h;const f=s.value.toLowerCase();return h.filter(g=>g.name.toLowerCase().includes(f))}),{isFetching:l,execute:c}=Ffe(),u=Ww(()=>{c({channel:n.value,locale:r.value,search:s.value})},300),p=()=>{u()};return Je(()=>c({channel:n.value,locale:r.value})),st([n,r],()=>{c({channel:n.value,locale:r.value})}),(h,f)=>{const g=pf,m=Gw,b=zN;return y(),V("div",Ihe,[D("div",The,[S(g,{class:"w-4 h-4 flex-none"}),yo(D("input",{class:"flex-1 w-0 focus:outline-none text-zinc-600 text-sm",placeholder:d(t)("Search product"),"onUpdate:modelValue":f[0]||(f[0]=w=>Ce(s)?s.value=w:null),onInput:p},null,40,She),[[Zo,d(s)]])]),D("div",Phe,[d(l)?(y(),V("div",$he,[S(m,{class:"h-6 w-6 text-zinc-700"})])):(y(),V("div",Rhe,[(y(!0),V(ge,null,Ie(d(a),w=>(y(),V("a",{key:w.id,class:Ne(["cursor-pointer flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm",{"bg-neutral-200":i.value&&i.value.id===w.id}]),onClick:It(E=>i.value=w,["stop","prevent"])},[w.base_image?(y(),V("img",{key:0,src:w.base_image.small_image_url,alt:w.name,class:"w-5 h-5 object-cover flex-none"},null,8,Nhe)):(y(),$(b,{key:1,class:"w-4 h-4 flex-none mr-1 transform rotate-90"})),D("span",Mhe,j(w.name),1)],10,Ahe))),128))]))])])}}}),Dhe={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},Lhe={class:"flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm",role:"button"},Vhe=["src","alt"],Fhe={class:"flex-1 w-0 truncate"},Bhe={key:1},Hhe=P({__name:"ProductPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),{getProduct:n}=Dt(),r=rt(e,"modelValue"),o=Q(!1),i=A({get:()=>r.value?n(r.value):null,set:s=>{r.value=s?s.id:null}});return(s,a)=>{const l=Mv,c=So;return y(),V("div",null,[e.field.label?(y(),V("label",Dhe,j(e.field.label),1)):Z("",!0),S(d(Xe).Root,{open:d(o),"onUpdate:open":a[3]||(a[3]=u=>Ce(o)?o.value=u:null)},{default:O(()=>[S(d(Xe).Trigger,{"as-child":""},{default:O(()=>[D("div",Lhe,[d(i)?(y(),V(ge,{key:0},[d(i).base_image?(y(),V("img",{key:0,src:d(i).base_image.small_image_url,alt:d(i).name,class:"w-5 h-5 object-cover flex-none"},null,8,Vhe)):(y(),$(l,{key:1,class:"w-4 h-4 flex-none transform rotate-90"})),D("span",Fhe,j(d(i).name),1),D("button",{class:"flex-none rounded-lg hover:bg-neutral-200 p-1",onClick:a[0]||(a[0]=It(u=>r.value=null,["stop"]))},[S(c)])],64)):(y(),V("span",Bhe,j(d(t)("Select product")),1))])]),_:1}),S(d(Xe).Positioner,{class:"w-[var(--reference-width)] !z-10"},{default:O(()=>[S(d(Xe).Content,{class:"border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col"},{default:O(()=>[S(d(Xe).Arrow,{style:{"--arrow-size":"0.5rem"},class:"bg-white"},{default:O(()=>[S(d(Xe).ArrowTip,{class:"border-t border-l"})]),_:1}),S(UN,{modelValue:d(i),"onUpdate:modelValue":[a[1]||(a[1]=u=>Ce(i)?i.value=u:null),a[2]||(a[2]=u=>o.value=!1)]},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),zhe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uhe(e,t){return y(),V("svg",zhe,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm0 2h7v5h5v11H6zm2 8v2h8v-2zm0 4v2h5v-2z"},null,-1)])])}const qw=fe({name:"mdi-file-document-outline",render:Uhe}),jhe={class:"flex flex-col overflow-y-hidden"},Ghe={class:"flex items-center mx-2 my-2 px-3 py-1 gap-3 border rounded-lg focus-within:ring focus-within:ring-zinc-700"},Whe=["placeholder"],qhe={class:"flex-1 overflow-y-auto border-t"},Khe={key:0,class:"h-20 flex items-center justify-center"},Yhe={key:1},Xhe=["onClick"],Jhe={class:"truncate flex-1 w-0"},jN=P({__name:"CmsPageListbox",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const{t}=Et(),{channel:n,locale:r,getCmsPages:o}=Dt(),i=rt(e,"modelValue"),s=Q(""),a=A(()=>{const h=o();if(!s.value)return h;const f=s.value.toLowerCase();return h.filter(g=>g.page_title.toLowerCase().includes(f))}),{isFetching:l,execute:c}=Bfe(),u=Ww(()=>{c({channel:n.value,locale:r.value,search:s.value})},300),p=()=>{u()};return Je(()=>c({channel:n.value,locale:r.value})),st([n,r],()=>{c({channel:n.value,locale:r.value})}),(h,f)=>{const g=pf,m=Gw,b=qw;return y(),V("div",jhe,[D("div",Ghe,[S(g,{class:"w-4 h-4"}),yo(D("input",{"onUpdate:modelValue":f[0]||(f[0]=w=>Ce(s)?s.value=w:null),type:"text",class:"focus:outline-none text-zinc-600",placeholder:d(t)("Search page"),onInput:p},null,40,Whe),[[Zo,d(s)]])]),D("div",qhe,[d(l)?(y(),V("div",Khe,[S(m,{class:"h-6 w-6 text-zinc-700"})])):(y(),V("div",Yhe,[(y(!0),V(ge,null,Ie(d(a),w=>(y(),V("a",{key:w.url_key,href:"#",class:Ne(["flex items-center gap-3 px-3 py-2 outline-none hover:bg-neutral-200 text-sm",{"bg-neutral-200":i.value&&i.value.url_key===w.url_key}]),onClick:It(E=>i.value=w,["stop","prevent"])},[S(b,{class:"w-4 h-4 flex-none text-zinc-700"}),D("span",Jhe,j(w.page_title),1)],10,Xhe))),128))]))])])}}}),Zhe={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},Qhe={role:"button",class:"flex items-center w-full gap-3 cursor-pointer border rounded px-3 h-10 text-sm"},ege={class:"flex-1 w-0 truncate"},tge={key:1},nge=P({__name:"CmsPagePicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),{getCmsPage:n}=Dt(),r=rt(e,"modelValue"),o=Q(!1),i=A({get:()=>r.value?n(r.value):null,set:s=>{r.value=s?s.id:null}});return(s,a)=>{const l=qw,c=So,u=jN;return y(),V("div",null,[e.field.label?(y(),V("label",Zhe,j(e.field.label),1)):Z("",!0),S(d(Xe).Root,{open:d(o),"onUpdate:open":a[3]||(a[3]=p=>Ce(o)?o.value=p:null)},{default:O(()=>[S(d(Xe).Trigger,{"as-child":""},{default:O(()=>[D("div",Qhe,[d(i)?(y(),V(ge,{key:0},[S(l,{class:"w-4 h-4 flex-none"}),D("span",ege,j(d(i).page_title),1),D("button",{class:"flex-none rounded-lg hover:bg-neutral-200 p-1",onClick:a[0]||(a[0]=It(p=>r.value=null,["stop"]))},[S(c)])],64)):(y(),V("span",tge,j(d(t)("Select page")),1))])]),_:1}),S(d(Xe).Positioner,{class:"w-[var(--reference-width)] !z-10"},{default:O(()=>[S(d(Xe).Content,{class:"border bg-white shadow rounded-lg outline-none max-h-80 flex flex-col"},{default:O(()=>[S(d(Xe).Arrow,{style:{"--arrow-size":"0.5rem"},class:"bg-white"},{default:O(()=>[S(d(Xe).ArrowTip,{class:"border-t border-l"})]),_:1}),S(u,{modelValue:d(i),"onUpdate:modelValue":[a[1]||(a[1]=p=>Ce(i)?i.value=p:null),a[2]||(a[2]=p=>o.value=!1)]},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),rge={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function oge(e,t){return y(),V("svg",rge,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75s-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12m13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094z","clip-rule":"evenodd"},null,-1)])])}const Kw=fe({name:"heroicons-check-circle-solid",render:oge}),ige={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sge(e,t){return y(),V("svg",ige,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 1 1-6.219-8.56"},null,-1)])])}const GN=fe({name:"lucide-loader2",render:sge}),age={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function lge(e,t){return y(),V("svg",age,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8.25 15L12 18.75L15.75 15m-7.5-6L12 5.25L15.75 9"},null,-1)])])}const Yw=fe({name:"heroicons-chevron-up-down",render:lge}),cge={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uge(e,t){return y(),V("svg",cge,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154zm-.8-2L8 6.885L5.554 13zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93M19 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const dge=fe({name:"ri-font-size",render:uge}),Ju=Q([]),ih=Q(!1),ty=Q(!1);function Xw(){return{fonts:Ju,isFetching:ih,isFetched:ty,fetchFonts:async()=>{if(ty.value||ih.value)return Ju.value;ih.value=!0;try{const r=await(await fetch("https://fonts.bunny.net/list")).json(),o=[];Object.keys(r).forEach(i=>{const s=r[i];o.push({slug:i,name:s.familyName||i.replace(/-/g," "),weights:s.weights||[400],styles:s.styles||["normal"]})}),Ju.value=o,ty.value=!0}catch(n){console.error("Failed to fetch fonts:",n)}finally{ih.value=!1}return Ju.value},findFont:n=>Ju.value.find(r=>r.slug===n)}}function Dv(e){return e.split(/[-_\s]+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const pge={class:"text-sm font-medium mb-1 text-gray-700"},fge={class:"flex-1 text-left capitalize line-clamp-1"},hge={class:"flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between"},gge={class:"flex-1 flex flex-col min-h-0 overflow-y-auto"},mge={class:"p-3"},vge={key:0,class:"flex items-center justify-center py-6"},bge={key:1,class:"divide-y"},yge=["onClick"],xge={class:"flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-neutral-200"},WN=P({__name:"FontPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),n=rt(e,"modelValue",{get(E){return E?typeof E!="string"?E:{slug:E,name:Dv(E),weights:[],styles:[]}:null}}),r=Q(null),o=Q(!1),i=Q(!1),s=Q(""),{fonts:a,isFetching:l}=Xw(),c=A(()=>a.value?s.value?a.value.filter(E=>E.name.toLowerCase().includes(s.value.toLowerCase())).slice(0,20):a.value.slice(0,20):[]),u=Q(new Set),p=new Map;function h(E){n.value=E,o.value=!0}function f(E,k){if(u.value.has(k.slug)||p.has(k.slug))return;const v=new IntersectionObserver(([_])=>{_.isIntersecting&&(g(k),v.disconnect(),p.delete(k.slug))},{threshold:.1});v.observe(E),p.set(k.slug,v)}function g(E){const k=`font-${E.slug}`;if(!document.getElementById(k)){const v=document.createElement("link");v.id=k,v.rel="stylesheet",v.href=m(E),document.head.appendChild(v),u.value.add(E.slug)}}function m(E){return`https://fonts.bunny.net/css?display=fallback&family=${E.slug}`}function b(){o.value=!1,r.value=n.value}function w(){i.value=!1,n.value=r.value,o.value=!1}return(E,k)=>{const v=dge,_=Yw,T=So,N=pf,C=GN,x=Kw;return y(),V("div",null,[D("label",pge,j(e.field.label),1),S(d(mt).Root,{open:d(i),"onUpdate:open":k[1]||(k[1]=I=>Ce(i)?i.value=I:null),modal:!1,"close-on-interact-outside":!1,onOpenChange:b},{default:O(()=>[S(d(mt).Trigger,{class:"flex items-center px-3 h-10 gap-4 border rounded w-full"},{default:O(()=>[S(v,{class:"flex-none w-4 h-4 text-zinc-500"}),D("span",fge,j(n.value?.name),1),S(_,{class:"flex-none w-4 h-4 text-zinc-500"})]),_:1}),S(d(mt).Positioner,{class:"flex absolute z-50 inset-0 w-full h-full items-center justify-center"},{default:O(()=>[S(d(mt).Content,{class:"bg-white shadow flex flex-col w-full h-full overflow-hidden"},{default:O(()=>[D("header",hge,[S(d(mt).Title,null,{default:O(()=>[re(j(d(t)("Font Picker")),1)]),_:1}),D("button",{onClick:w,class:"cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300"},[S(T,{class:"w-5 h-5"})])]),D("div",gge,[D("div",mge,[S(d(Zg).Root,{class:"relative"},{default:O(()=>[S(N,{class:"absolute left-3 top-2.5 text-zinc-500"}),S(d(Zg).Input,{modelValue:d(s),"onUpdate:modelValue":k[0]||(k[0]=I=>Ce(s)?s.value=I:null),class:"w-full pr-3 pl-9 h-10 text-gray-500 rounded border border-zinc-300 focus:outline-none focus:ring-2 focus:ring focus:ring-zinc-700 focus:border-transparent",placeholder:"Search"},null,8,["modelValue"])]),_:1})]),d(l)?(y(),V("div",vge,[S(C,{class:"w-6 h-6 animate-spin text-zinc-500"})])):(y(),V("ul",bge,[(y(!0),V(ge,null,Ie(d(c),I=>(y(),V("li",{ref_for:!0,ref:R=>f(R,I),class:Ne(["p-3 first:border-t hover:bg-zinc-100 cursor-pointer capitalize flex justify-between items-center",{"bg-zinc-100":n.value?.slug===I.slug}]),style:Yt({fontFamily:d(u).has(I.slug)?I.name:"inherit"}),onClick:R=>h(I)},[D("span",null,j(I.name),1),n.value?.slug===I.slug?(y(),$(x,{key:0,class:"w-5 h-5 text-zinc-700"})):Z("",!0)],14,yge))),256))]))]),D("footer",xge,[S(d(Vt),{onClick:w},{default:O(()=>[re(j(d(t)("Cancel")),1)]),_:1}),S(d(mt).CloseTrigger,{"as-child":""},{default:O(()=>[S(d(Vt),{variant:"primary",disabled:!d(o)},{default:O(()=>[re(j(d(t)("Select")),1)]),_:1},8,["disabled"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),wge={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function _ge(e,t){return y(),V("svg",wge,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"},null,-1)])])}const qN=fe({name:"heroicons-arrow-left",render:_ge}),kge={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Cge(e,t){return y(),V("svg",kge,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"},null,-1)])])}const KN=fe({name:"heroicons-link",render:Cge}),Ege={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Oge(e,t){return y(),V("svg",Ege,[...t[0]||(t[0]=[D("path",{fill:"currentColor","fill-rule":"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5m-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5z","clip-rule":"evenodd"},null,-1)])])}const Ige=fe({name:"heroicons-arrow-top-right-on-square-solid",render:Oge}),Tge={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},Sge={class:"relative flex border px-3 h-10 gap-3 text-sm w-full cursor-pointer rounded outline-0 items-center appearance-none justify-between focus-within:shadow focus-within:ring focus-within:ring-zinc-700"},Pge=["href"],$ge=["value"],Rge=["href"],Age={key:0},Nge={key:1,class:"flex flex-col h-full overflow-hidden"},Mge=P({__name:"LinkPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),n=rt(e,"modelValue"),r=Q("link"),o=Q(""),i=Q(""),s=Q(""),a=Q(!1),l=Q(null);Je(()=>{c(n.value)});function c(w){if(!w)return;if(!w.startsWith("visual://")){r.value="link",w.startsWith("/")||(w="/"+w),o.value=w,i.value=w,n.value=w;return}const E=w.match(/^visual:\/\/([^:]+):([^\/]+)\/(.*)?$/);E&&(r.value=E[1],o.value=u(E[3],E[1]==="cms_pages"?"page/":""),i.value=decodeURIComponent(E[2]))}function u(w,E=""){return new URL(E+w,new URL(window.editorConfig.storefrontUrl).origin).href}function p(w){n.value=`visual://categories:${encodeURIComponent(w.name)}/${w.slug}`,r.value="categories",o.value=u(w.slug),i.value=w.name,a.value=!1}function h(w){n.value=`visual://products:${encodeURIComponent(w.name)}/${w.url_key}`,r.value="products",o.value=u(w.url_key),i.value=w.name,a.value=!1}function f(w){n.value=`visual://cms_pages:${encodeURIComponent(w.page_title)}/${w.url_key}`,r.value="cms_pages",o.value=u(w.url_key,"page/"),i.value=w.page_title,a.value=!1}function g(){r.value="link",o.value="",n.value="",i.value=""}function m(w){try{const E=new URL(w.target.value);r.value="link",n.value=E.href,o.value=E.href,i.value=E.href}catch{c(w.target.value)}}function b(w){w&&setTimeout(()=>{l.value?.focus()},0)}return(w,E)=>{const k=Ige,v=Mv,_=zN,T=qw,N=KN,C=So,x=qN,I=HN,R=UN,M=jN;return y(),V("div",null,[e.field.label?(y(),V("label",Tge,j(e.field.label),1)):Z("",!0),S(d(Xe).Root,{open:d(a),"onUpdate:open":E[6]||(E[6]=B=>Ce(a)?a.value=B:null),onOpenChange:b},{default:O(()=>[S(d(Xe).Trigger,{"as-child":""},{default:O(()=>[D("div",Sge,[d(o)?(y(),V("a",{key:0,href:d(o),target:"_blank",class:"absolute right-0 -top-6",onClick:E[0]||(E[0]=It(()=>{},["stop"]))},[S(k,{class:"w-4 h-4"})],8,Pge)):Z("",!0),d(r)==="categories"?(y(),$(v,{key:1,class:"w-4 h-4 flex-none transform rotate-90"})):d(r)==="products"?(y(),$(_,{key:2,class:"w-4 h-4 flex-none transform rotate-90"})):d(r)==="cms_pages"?(y(),$(T,{key:3,class:"w-4 h-4 flex-none"})):(y(),$(N,{key:4,class:"w-4 h-4 flex-none"})),D("input",{ref_key:"inputRef",ref:l,class:"outline-none flex-1 w-0 bg-transparent",value:d(i),onChange:m},null,40,$ge),n.value?(y(),V("button",{key:5,class:"flex-none text-zinc-700 hover:bg-zinc-200 p-1 rounded-lg",onClick:It(g,["prevent"])},[S(C,{class:"w-4 h-4"})])):Z("",!0)])]),_:1}),d(o)?(y(),V("a",{key:0,href:d(o),target:"_blank",class:"absolute right-0 -top-6"},[S(k,{class:"w-4 h-4"})],8,Rge)):Z("",!0),S(d(Xe).Positioner,{class:"w-[var(--reference-width)] !z-10"},{default:O(()=>[S(d(Xe).Content,{class:"bg-white rounded-lg shadow gap-1 flex flex-col max-h-96 border",onPointerdown:E[5]||(E[5]=It(()=>{},["stop"]))},{default:O(()=>[d(s)?(y(),V("div",Nge,[D("button",{class:"h-9 flex-none bg-zinc-200 flex gap-3 w-full items-center rounded-t-lg text-left px-3",onClick:E[4]||(E[4]=B=>s.value="")},[S(x,{class:"w-4 h-4"}),re(" "+j(d(t)("Back")),1)]),d(s)==="categories"?(y(),$(I,{key:0,class:"h-full flex-1","onUpdate:modelValue":p})):d(s)==="products"?(y(),$(R,{key:1,class:"h-full flex-1","onUpdate:modelValue":h})):d(s)==="cms_pages"?(y(),$(M,{key:2,class:"h-full flex-1","onUpdate:modelValue":f})):Z("",!0)])):(y(),V("div",Age,[D("button",{class:"appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200",onMousedown:E[1]||(E[1]=It(B=>s.value="categories",["prevent"]))},[S(v,{class:"w-4 h-4 transform rotate-90"}),re(" "+j(d(t)("Categories")),1)],32),D("button",{class:"appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200",onMousedown:E[2]||(E[2]=It(B=>s.value="products",["prevent"]))},[S(_,{class:"w-4 h-4 transform rotate-90"}),re(" "+j(d(t)("Products")),1)],32),D("button",{class:"appearance-none w-full h-9 px-3 flex gap-3 items-center hover:bg-zinc-200",onMousedown:E[3]||(E[3]=It(B=>s.value="cms_pages",["prevent"]))},[S(T,{class:"w-4 h-4 text-zinc-700"}),re(" "+j(d(t)("Cms Pages")),1)],32)]))]),_:1})]),_:1})]),_:1},8,["open"])])}}}),Dge={class:"px-2 py-1 col-span-3 col-start-2 row-start-1 row-span-3"},Lge={class:"mb-px font-semibold text-xs"},Vge={class:"grid grid-cols-2 gap-2"},Fge=["title"],Jw=P({__name:"ColorSchemePreview",props:{id:null,scheme:null},setup(e){const t=e,n=["primary","secondary","accent","neutral"],r=A(()=>"tokens"in t.scheme&&t.scheme.tokens?t.scheme.tokens:t.scheme);return(o,i)=>(y(),V("div",{class:"border border-zinc-300 rounded grid grid-cols-4 grid-rows-3 overflow-hidden cursor-pointer",style:Yt({backgroundColor:d(r).background,color:d(r)["on-background"]})},[D("div",{title:"Main background",class:"col-start-1 row-start-1",style:Yt({backgroundColor:d(r).background})},null,4),D("div",{class:"col-start-1 row-start-2",style:Yt({backgroundColor:d(r).surface}),title:"Surface color"},null,4),D("div",{class:"col-start-1 row-start-3",style:Yt({backgroundColor:d(r)["surface-alt"]}),title:"Alternative surface color"},null,4),D("div",Dge,[D("div",Lge,j(e.id),1),D("div",Vge,[(y(),V(ge,null,Ie(n,s=>D("div",{key:s,title:s+" color",class:"rounded flex items-center justify-center",style:Yt({backgroundColor:d(r)[s],color:d(r)[`on-${s}`]})},[...i[0]||(i[0]=[D("span",{class:"font-semibold"},"A",-1)])],12,Fge)),64))])])],4))}}),Bge={class:"text-sm font-medium mb-1 text-gray-700"},Hge={key:0},zge={key:0,class:"flex flex-1 gap-3"},Uge={class:"capitalize flex-1 text-left"},jge={key:1},Gge={key:1,class:"text-sm text-red-400"},Wge=P({__name:"ColorSchemePicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{theme:t}=Dt(),n=A(()=>{if(!t.value)return{};const l=t.value.settingsSchema.flatMap(c=>c.settings).find(c=>c.type==="color-scheme-group")?.id;return l?t.value.settings[l]||{}:{}}),r=A(()=>Object.keys(n.value).length>0),o=rt(e,"modelValue"),i=Q(!1),s=A(()=>o.value&&n.value?n.value[o.value]:null);function a(l){o.value=l,i.value=!1}return(l,c)=>{const u=So,p=Yw,h=Kw,f=Jw;return y(),V("div",null,[D("label",Bge,j(e.field.label),1),d(r)?(y(),V("div",Hge,[S(d(Xe).Root,{open:d(i),"onUpdate:open":c[1]||(c[1]=g=>Ce(i)?i.value=g:null)},{default:O(()=>[S(d(Xe).Trigger,{class:"border border-zinc-300 rounded w-full flex justify-between h-10 px-3 items-center"},{default:O(()=>[d(s)?(y(),V("div",zge,[D("div",{class:"w-6 rounded flex-none",style:Yt({backgroundColor:d(s).background,color:d(s)["on-background"]})},"A",4),D("div",Uge,j(o.value),1),D("button",{class:"ml-auto flex-none mr-1 p-1 rounded-lg hover:bg-zinc-100",onClick:c[0]||(c[0]=It(g=>o.value=null,["stop"]))},[S(u,{class:"w-4 h-4"})])])):(y(),V("span",jge,"Select a color scheme")),S(p,{class:"flex-none h-4 w-4"})]),_:1}),S(d(Xe).Positioner,null,{default:O(()=>[S(d(Xe).Content,{class:"border border-zinc-300 rounded shadow-md w-[var(--reference-width)] z-50 bg-white -mt-1 overflow-y-auto max-h-[360px]"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(n),(g,m)=>(y(),V("div",null,[D("div",{class:Ne(["px-3 py-3 hover:bg-zinc-100 relative",{"bg-zinc-100":o.value===String(m)}])},[o.value===String(m)?(y(),$(h,{key:0,class:"w-5 h-5 absolute top-2 right-2 text-green-400"})):Z("",!0),S(f,{scheme:g,id:String(m),onClick:b=>a(String(m))},null,8,["scheme","id","onClick"])],2)]))),256))]),_:1})]),_:1})]),_:1},8,["open"])])):(y(),V("div",Gge," Oops! This theme doesn’t have any color schemes to show. "))])}}}),qge={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Kge(e,t){return y(),V("svg",qge,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m15 11.25l1.5 1.5l.75-.75V8.758l2.276-.61a3 3 0 1 0-3.675-3.675l-.61 2.277H12l-.75.75l1.5 1.5M15 11.25l-8.47 8.47c-.34.34-.8.53-1.28.53s-.94.19-1.28.53l-.97.97l-.75-.75l.97-.97c.34-.34.53-.8.53-1.28s.19-.94.53-1.28L12.75 9M15 11.25L12.75 9"},null,-1)])])}const Yge=fe({name:"heroicons-eye-dropper",render:Kge}),Xge={class:"flex gap-2"},Jge={class:"flex flex-col gap-2 w-full"},Zge={key:0},Qge={class:"text-xs font-medium"},eme={class:"text-xs font-medium"},YN=P({__name:"ColorPicker",props:at({usedColors:{default:()=>[]},label:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),n=rt(e,"modelValue",{set(a){return a.toString("hexa")},get(a){try{return Fd(a)}catch(l){return console.error("Invalid color value:",a,l),Fd("#000000ff")}}}),r=e,o=A(()=>r.usedColors.map(a=>Fd(a))),i=Q([]);function s({value:a}){n.value=a.toString("hexa"),!o.value.some(l=>l.toHexInt()===a.toHexInt())&&(i.value.some(l=>l.toHexInt()===a.toHexInt())||i.value.unshift(a))}return(a,l)=>{const c=Yge;return y(),$(d(lt).Root,{format:"rgba",class:"flex flex-col gap-1.5","model-value":n.value,onValueChange:l[0]||(l[0]=u=>s(u))},{default:O(()=>[e.label?(y(),$(d(lt).Label,{key:0,class:"font-medium text-sm"},{default:O(()=>[re(j(e.label),1)]),_:1})):Z("",!0),S(d(lt).Control,{class:"flex gap-2"},{default:O(()=>[S(d(lt).Trigger,{class:"appearance-none rounded cursor-pointer inline-flex items-center justify-center outline-none h-10 min-w-10 gap-2 border border-zinc-300"},{default:O(()=>[S(d(lt).TransparencyGrid,{class:"rounded"}),S(d(lt).ValueSwatch,{class:"h-7 w-7 rounded shadow"})]),_:1}),S(d(lt).ChannelInput,{channel:"hex",class:"appearance-none rounded bg-none outline-0 relative w-full border px-3 h-10 min-w-10 focus:ring focus:ring-zinc-700"})]),_:1}),S(d(lt).Positioner,{class:"w-60 !z-20 pl-1"},{default:O(()=>[S(d(lt).Content,{class:"flex flex-col p-4 gap-3 rounded bg-white border shadow-sm data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out data-[state=closed]:hidden"},{default:O(()=>[S(d(lt).Area,{class:"rounded overflow-hidden h-36 touch-none forced-color-adjust-none"},{default:O(()=>[S(d(lt).AreaBackground,{class:"h-full rounded"}),S(d(lt).AreaThumb,{class:"rounded-full w-2.5 h-2.5 outline-none border-2 border-white"})]),_:1}),D("div",Xge,[S(d(lt).EyeDropperTrigger,{class:"appearance-none rounded cursor-pointer inline-flex outline-none relative select-none items-center justify-center border h-8 min-w-8"},{default:O(()=>[S(c,{class:"w-4 h-4"})]),_:1}),D("div",Jge,[S(d(lt).ChannelSlider,{channel:"hue",class:"rounded w-full"},{default:O(()=>[S(d(lt).ChannelSliderTrack,{class:"h-2.5 rounded"}),S(d(lt).ChannelSliderThumb,{class:"h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2"})]),_:1}),S(d(lt).ChannelSlider,{channel:"alpha",class:"rounded w-full"},{default:O(()=>[S(d(lt).TransparencyGrid),S(d(lt).ChannelSliderTrack,{class:"h-2.5 rounded"}),S(d(lt).ChannelSliderThumb,{class:"h-2.5 w-2.5 cursor-pointer rounded-full outline-none border-2 border-white -translate-x-1/2 -translate-y-1/2"})]),_:1})])]),S(d(lt).View,{format:"rgba",class:"flex gap-3"},{default:O(()=>[S(d(lt).ChannelInput,{channel:"hex",class:"flex-1 border px-3 h-8 w-0 rounded outline-0 focus:ring focus:ring-zinc-700"}),S(d(lt).ChannelInput,{channel:"alpha",class:"flex-none border px-3 h-8 rounded outline-0 focus:ring focus:ring-zinc-700"})]),_:1}),d(i).length>0?(y(),V("div",Zge,[D("p",Qge,j(d(t)("Recently selected")),1),S(d(lt).SwatchGroup,{class:"grid grid-cols-6 gap-2 mt-2"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(i).slice(0,6),u=>(y(),$(d(lt).SwatchTrigger,{value:u,key:u.toHexInt()},{default:O(()=>[S(d(lt).Swatch,{value:u,class:"w-6 h-6 rounded border"},null,8,["value"])]),_:2},1032,["value"]))),128))]),_:1})])):Z("",!0),D("div",null,[D("p",eme,j(d(t)("Currently used")),1),S(d(lt).SwatchGroup,{class:"grid grid-cols-6 gap-2 mt-2"},{default:O(()=>[(y(!0),V(ge,null,Ie(d(o),u=>(y(),$(d(lt).SwatchTrigger,{value:u,key:u.toString("hexa")},{default:O(()=>[S(d(lt).Swatch,{value:u,class:"w-6 h-6 rounded border"},null,8,["value"])]),_:2},1032,["value"]))),128))]),_:1})])]),_:1})]),_:1}),S(d(lt).HiddenInput)]),_:1},8,["model-value"])}}}),tme={class:"mt-4 space-y-4"},nme={class:"capitalize"},rme={class:"text-xs leading-snug italic mt-1"},ome=P({__name:"EditColorScheme",props:at({id:null},{modelValue:{},modelModifiers:{}}),emits:at(["update"],["update:modelValue"]),setup(e,{emit:t}){const n=t,r=rt(e,"modelValue"),o={background:"Main background color. For page background and full-width sections","on-background":"Default text color",primary:"Primary color. For primary buttons, link, CTAs","on-primary":"Text/icons on primary backgrounds",secondary:"Secondary color. For Headings, badges, accents","on-secondary":"Text/icons on secondary backgrounds",accent:"Highlight color. For featured content, banners, badges","on-accent":"Text/icons on accent elements",neutral:"Neutral color","on-neutral":"On neutral color",surface:"Surface color. For components or sections background","on-surface":"Section text, icons","surface-alt":"Alternative surface color. For hover states, dropdowns","on-surface-alt":"Text/icons on alternative surface",danger:"Errors, danger zones","on-danger":"Text/icons on error messages",warning:"Notices, validation warnings","on-warning":"Text/icons on warning backgrounds",success:"Alerts, tags, confirmations","on-success":"Text/icons on success backgrounds",info:"Tooltips, banners, guidance","on-info":"Text/icons on info sections"};function i(s,a){r.value[s]=a,n("update",r.value)}return(s,a)=>{const l=Jw,c=YN;return y(),V("div",null,[S(l,{scheme:r.value,id:e.id},null,8,["scheme","id"]),D("div",tme,[(y(!0),V(ge,null,Ie(r.value,(u,p)=>(y(),V("div",null,[D("label",nme,j(p.replace("-"," ")),1),S(c,{"model-value":u,"onUpdate:modelValue":h=>i(p,h)},null,8,["model-value","onUpdate:modelValue"]),D("p",rme,j(o[p]),1)]))),256))])])}}}),ime={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function sme(e,t){return y(),V("svg",ime,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M12 4.5v15m7.5-7.5h-15"},null,-1)])])}const XN=fe({name:"heroicons-plus",render:sme}),ame={class:"text-sm font-medium mb-1 text-gray-700"},lme={class:"grid grid-cols-2 gap-2 items-stretch mt-1"},cme={class:"flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between"},ume={class:"flex-1 flex flex-col min-h-0 overflow-y-auto p-4"},dme=P({__name:"ColorSchemeGroup",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:at(["update:modelValue"],["update:modelValue"]),setup(e,{emit:t}){const n=rt(e,"modelValue"),r=t,o=Q(null),i=Q(!1),s=A({get(){if(!o.value||!n.value?.[o.value])return null;const u=n.value[o.value];return"tokens"in u?u.tokens:u},set(u){if(!o.value||!u)return;const p=n.value[o.value];"tokens"in p?p.tokens=u:n.value[o.value]=u}});function a(u){o.value=u,i.value=!0}function l(){r("update:modelValue",n.value)}function c(){const u=Object.keys(n.value),p=`scheme-${u.length+1}`;n.value[p]=structuredClone(He(n.value[u[0]])),l(),a(p)}return(u,p)=>{const h=Jw,f=XN,g=So,m=ome;return y(),V("div",null,[D("label",ame,j(e.field.label),1),D("div",lme,[(y(!0),V(ge,null,Ie(n.value,(b,w)=>(y(),$(h,{key:w,id:w,scheme:b,onClick:E=>a(w)},null,8,["id","scheme","onClick"]))),128)),D("button",{class:"flex-col border-2 border-dashed flex items-center justify-center min-h-20 rounded border-blue-400 text-blue-400 cursor-pointer",onClick:c},[S(f,{class:"h-6 w-6"}),p[2]||(p[2]=D("span",null,"Add scheme",-1))])]),S(d(mt).Root,{open:d(i),"onUpdate:open":p[1]||(p[1]=b=>Ce(i)?i.value=b:null),modal:!1,"close-on-interact-outside":!1},{default:O(()=>[S(d(mt).Positioner,{class:"flex fixed z-50 top-14 left-14 bottom-0 w-75 items-center justify-center"},{default:O(()=>[S(d(mt).Content,{class:"bg-white shadow flex flex-col w-full h-full overflow-hidden"},{default:O(()=>[D("header",cme,[S(d(mt).Title,{class:"capitalize"},{default:O(()=>[re("Editing "+j(d(o)?.replace("-"," ")),1)]),_:1}),S(d(mt).CloseTrigger,{class:"cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300"},{default:O(()=>[S(g,{class:"w-5 h-5"})]),_:1})]),D("div",ume,[d(o)&&d(s)?(y(),$(m,{key:0,id:d(o),modelValue:d(s),"onUpdate:modelValue":p[0]||(p[0]=b=>Ce(s)?s.value=b:null),onUpdate:l},null,8,["id","modelValue"])):Z("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),pme={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fme(e,t){return y(),V("svg",pme,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M9.879 7.519c1.172-1.025 3.071-1.025 4.243 0c1.171 1.025 1.171 2.687 0 3.712q-.308.268-.67.442c-.746.361-1.452.999-1.452 1.827v.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9 5.25h.008v.008H12z"},null,-1)])])}const hme=fe({name:"heroicons-question-mark-circle",render:fme}),em=Q([]),Zw=Q(new Map),tm=Q(new Set),HO=Q(!1),JN=Q(window.editorConfig.routes.getIcons),{get:gme}=ha(),{isFetching:mme,execute:vme,onSuccess:bme,onError:yme}=gme(JN);bme(e=>{!em.value.length&&e.sets&&(em.value=e.sets),e.currentSet&&(Zw.value.set(e.currentSet,e.icons),tm.value.delete(e.currentSet))});yme(e=>{console.error("Failed to fetch icons:",e)});async function ZN(e){const t=new URL(window.editorConfig.routes.getIcons,window.location.origin);if(e)for(const[n,r]of Object.entries(e))t.searchParams.append(n,r);JN.value=t.href,await vme()}function xme(){HO.value||(HO.value=!0,ZN())}function wme(e){Zw.value.has(e)||tm.value.has(e)||(tm.value.add(e),ZN({set:e}))}function QN(e){return Zw.value.get(e)||[]}function _me(e){return tm.value.has(e)}function e5(e){return em.value.find(t=>e.startsWith(t.prefix))}function kme(e){const t=e5(e);return t&&QN(t.id).find(r=>r.id===e)||null}function Cme(){return xme(),{sets:A(()=>em.value),getIcons:QN,fetchSet:wme,isSetLoading:_me,isFetching:mme,findSetByIconId:e5,findIconById:kme}}const Eme={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},Ome=["innerHTML"],Ime={class:"flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between"},Tme={class:"flex-1 flex flex-col min-h-0 overflow-y-auto"},Sme={class:"p-3"},Pme=["value"],$me={key:0,class:"flex items-center justify-center py-6"},Rme={key:1,class:"p-3 grid grid-cols-4 gap-3"},Ame=["onClick"],Nme=["innerHTML"],Mme={class:"flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-neutral-200"},Dme=P({__name:"IconPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),n=Q(!1),r=Q(!1),o=rt(e,"modelValue"),i=Q(null),s=Q(""),a=Q("lucide"),l=Q(!1),{sets:c,isFetching:u,getIcons:p,findIconById:h,findSetByIconId:f,fetchSet:g}=Cme(),m=A(()=>{const v=p(a.value);return s.value?v.filter(_=>_.name.toLowerCase().includes(s.value.toLowerCase())):v}),b=A(()=>o.value?h(o.value):null);st(()=>c.value,v=>{if(l.value||v.length===0||!o.value)return;const _=f(o.value);_&&(a.value=_.id,g(_.id)),l.value=!0},{immediate:!0});function w(){g(a.value)}function E(v){o.value=v.id,n.value=!0}function k(){r.value=!1,o.value=i.value,n.value=!1}return(v,_)=>{const T=hme,N=So,C=pf,x=GN;return y(),V("div",null,[e.field.label?(y(),V("label",Eme,j(e.field.label),1)):Z("",!0),S(d(mt).Root,{open:d(r),"onUpdate:open":_[3]||(_[3]=I=>Ce(r)?r.value=I:null),modal:!1,"close-on-interact-outside":!1,onOpenChange:_[4]||(_[4]=I=>{n.value=!1,i.value=o.value})},{default:O(()=>[S(d(mt).Trigger,{class:"flex items-center px-3 py-2.5 gap-4 border rounded relative"},{default:O(()=>[d(b)?(y(),V("span",{key:0,innerHTML:d(b).svg,class:"w-8 h-8 text-zinc-600"},null,8,Ome)):(y(),$(T,{key:1,class:"w-8 h-8 text-zinc-600"})),d(b)?(y(),V("button",{key:2,class:"absolute -top-2 -right-2 bg-zinc-100 rounded-full p-1 hover:bg-zinc-200",onClick:_[0]||(_[0]=It(I=>o.value=null,["stop"]))},[S(N,{class:"w-4 h-4"})])):Z("",!0)]),_:1}),S(d(mt).Positioner,{class:"flex absolute z-50 inset-0 w-full h-full items-center justify-center"},{default:O(()=>[S(d(mt).Content,{class:"bg-white shadow flex flex-col w-full h-full overflow-hidden"},{default:O(()=>[D("header",Ime,[S(d(mt).Title,null,{default:O(()=>[re(j(d(t)("Icon Picker")),1)]),_:1}),D("button",{onClick:k,class:"cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300"},[S(N,{class:"w-5 h-5"})])]),D("div",Tme,[D("div",Sme,[yo(D("select",{"onUpdate:modelValue":_[1]||(_[1]=I=>Ce(a)?a.value=I:null),onChange:w,class:"border rounded-t border-b-0 h-10 px-3 w-full focus:outline-none"},[(y(!0),V(ge,null,Ie(d(c),I=>(y(),V("option",{value:I.id},j(I.name),9,Pme))),256))],544),[[sx,d(a)]]),S(d(Zg).Root,{class:"relative"},{default:O(()=>[S(C,{class:"absolute left-3 top-2.5 text-zinc-500"}),S(d(Zg).Input,{modelValue:d(s),"onUpdate:modelValue":_[2]||(_[2]=I=>Ce(s)?s.value=I:null),class:"w-full pr-3 pl-9 h-10 text-surface-500 rounded-b border border-zinc-300 focus:outline-none focus:ring focus:ring-zinc-700",placeholder:"Search"},null,8,["modelValue"])]),_:1})]),d(u)?(y(),V("div",$me,[S(x,{class:"w-6 h-6 animate-spin text-zinc-500"})])):(y(),V("div",Rme,[(y(!0),V(ge,null,Ie(d(m),I=>(y(),V("button",{type:"button",class:Ne(["flex justify-center p-3 border rounded text-zinc-500",{"border-blue-300 bg-blue-50 hover:bg-blue-50":o.value===I.id,"hover:bg-zinc-100":o.value!==I.id}]),onClick:R=>E(I)},[D("span",{innerHTML:I.svg,class:"w-full"},null,8,Nme)],10,Ame))),256))]))]),D("footer",Mme,[S(d(Vt),{onClick:k},{default:O(()=>[re(j(d(t)("Cancel")),1)]),_:1}),S(d(mt).CloseTrigger,{"as-child":""},{default:O(()=>[S(d(Vt),{variant:"primary",disabled:!d(n)},{default:O(()=>[re(j(d(t)("Select")),1)]),_:1},8,["disabled"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),Lme={class:"flex items-center mb-4"},Vme={key:0,class:"ms-2 text-sm font-medium text-gray-900"},t5=P({__name:"Checkbox",props:at({label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue");return(n,r)=>(y(),V("label",Lme,[yo(D("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded-sm focus:ring-blue-500 focus:ring-2","onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o)},null,512),[[Fp,t.value]]),e.label?(y(),V("span",Vme,j(e.label),1)):Z("",!0)]))}}),Fme={class:"border rounded-lg overflow-hidden p-1 relative bg-white"},Bme=["src"],Hme={class:"absolute bg-black/50 inset-0 flex items-center justify-center"},zme={class:"text-xs text-center truncate overflow-hidden max-w-full"},Ume=P({__name:"ImagePreview",props:{image:null,selected:{type:Boolean}},setup(e){return(t,n)=>{const r=t5;return y(),V("div",{class:Ne(["group flex flex-col items-center justify-center p-3 gap-3 rounded-lg cursor-pointer hover:bg-neutral-100",{"bg-neutral-100":e.selected,"pointer-events-none":e.image.uploading}])},[D("div",Fme,[D("img",{class:Ne(["hover:bg-neutral-200 object-cover w-full aspect-square rounded",{"bg-neutral-200":e.selected}]),src:e.image.url},null,10,Bme),D("div",{class:Ne(["absolute p-2 rounded-md inset-1 group-hover:block group-hover:bg-neutral-900/10",{hidden:!e.selected}])},[S(r,{"model-value":e.selected},null,8,["model-value"])],2),yo(D("div",Hme,[...n[0]||(n[0]=[D("svg",{class:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[D("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),D("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])],512),[[ox,e.image.uploading]])]),D("p",zme,j(e.image.name),1)],2)}}});var hd=(e,t=[])=>({parts:(...n)=>{if(jme(t))return hd(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>hd(e,[...t,...n]),omit:(...n)=>hd(e,t.filter(r=>!n.includes(r))),rename:n=>hd(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${ql(e)}"][data-part="${ql(r)}"]`,`& [data-scope="${ql(e)}"][data-part="${ql(r)}"]`].join(", "),attrs:{"data-scope":ql(e),"data-part":ql(r)}}}),{})}),ql=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),jme=e=>e.length===0,Qw=e=>typeof e=="object"&&e!==null,hn=e=>e?"":void 0,Gme=1,Wme=9,qme=11,c1=e=>Qw(e)&&e.nodeType===Gme&&typeof e.nodeName=="string",Kme=e=>Qw(e)&&e.nodeType===Wme,Yme=e=>Qw(e)&&e.nodeType!==void 0,n5=e=>Yme(e)&&e.nodeType===qme&&"host"in e;function u1(e,t){if(!e||!t||!c1(e)||!c1(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&n5(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function r5(e){return n5(e)?r5(e.host):Kme(e)?e.defaultView??window:c1(e)?e.ownerDocument?.defaultView??window:window}function Xme(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function nm(e){return Xme(e)?.[0]??e.target}var zO=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function Jme(e){let t;const n=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(n),t?.()}}var Zme={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},Qme=e=>typeof e.getAsEntry=="function"?e.getAsEntry():typeof e.webkitGetAsEntry=="function"?e.webkitGetAsEntry():null,o5=e=>e.isDirectory,d1=e=>e.isFile,p1=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),eve=(e,t)=>Promise.all(Array.from(e).filter(n=>n.kind==="file").map(n=>{const r=Qme(n);if(!r)return null;if(o5(r)&&t)return i5(r.createReader(),`${r.name}`);if(d1(r)&&typeof n.getAsFile=="function"){const o=n.getAsFile();return Promise.resolve(o?p1(o,""):null)}if(d1(r))return new Promise(o=>{r.file(i=>{o(p1(i,""))})})}).filter(n=>n)),i5=(e,t="")=>new Promise(n=>{const r=[],o=()=>{e.readEntries(i=>{if(i.length===0){n(Promise.all(r).then(a=>a.flat()));return}const s=i.map(a=>{if(!a)return null;if(o5(a))return i5(a.createReader(),`${t}${a.name}`);if(d1(a))return new Promise(l=>{a.file(c=>{l(p1(c,t))})})}).filter(a=>a);r.push(Promise.all(s)),o()})};o()});function tve(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function nve(e){return/^.*\.[\w]+$/.test(e)}var UO=e=>tve(e)||nve(e);function rve(e){if(e!=null)return typeof e=="string"?e:Array.isArray(e)?e.filter(UO).join(","):Object.entries(e).reduce((t,[n,r])=>[...t,n,...r],[]).filter(UO).join(",")}var sh=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,Zu=e=>e!=null;function ove(e,t,n){if(Zu(e.size))if(Zu(t)&&Zu(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.sizen)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}var ive="3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip",sve=new Map(ive.split("[").flatMap(e=>{const[t,n]=e.split("_");return t.split(",").map(r=>[r,n])}));function ave(e){const t=e.split(".").pop();return t&&sve.get(t)||null}function lve(e,t){if(e&&t){const n=Array.isArray(t)?t:typeof t=="string"?t.split(","):[];if(n.length===0)return!0;const r=e.name||"",o=(e.type||ave(r)||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(s=>{const a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}function cve(e,t){const n=e.type==="application/x-moz-file"||lve(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}function uve(e){const t=new Map;return function(r,o){const i=r+(o?Object.entries(o).sort((a,l)=>a[0]{if(Number.isNaN(e))return"";if(e===0)return"0 B";const{unitSystem:r="decimal",precision:o=3,unit:i="byte",unitDisplay:s="short"}=n,a=r==="binary"?1024:1e3,l=i==="bit"?fve:hve,c=Math.max(0,Math.min(Math.floor(Math.log10(e)/3),l.length-1)),u=parseFloat((e/Math.pow(a,c)).toPrecision(o));return pve(u,t,{style:"unit",unit:l[c]+i,unitDisplay:s})},s5=()=>e=>Array.from(new Set(e));function a5(e){return e.reduce((t,n)=>Array.isArray(n)?t.concat(a5(n)):t.concat(n),[])}var mve=Function.prototype.toString;mve.call(Object);var vve=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})};function bve(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}var yve=hd("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger"),Mr=yve.build(),l5=e=>e.ids?.root??`file:${e.id}`,c5=e=>e.ids?.dropzone??`file:${e.id}:dropzone`,f1=e=>e.ids?.hiddenInput??`file:${e.id}:input`,xve=e=>e.ids?.trigger??`file:${e.id}:trigger`,wve=e=>e.ids?.label??`file:${e.id}:label`,_ve=(e,t)=>e.ids?.item?.(t)??`file:${e.id}:item:${t}`,kve=(e,t)=>e.ids?.itemName?.(t)??`file:${e.id}:item-name:${t}`,Cve=(e,t)=>e.ids?.itemSizeText?.(t)??`file:${e.id}:item-size:${t}`,Eve=(e,t)=>e.ids?.itemPreview?.(t)??`file:${e.id}:item-preview:${t}`,Ove=e=>e.getById(l5(e)),jO=e=>e.getById(f1(e)),Ive=e=>e.getById(c5(e));function GO(e){const t=nm(e);return e.dataTransfer?e.dataTransfer.types.some(n=>n==="Files"||n==="application/x-moz-file"):!!t&&"files"in t}function Tve(e,t,n){const{prop:r,computed:o}=e;return!o("multiple")&&t>1?!1:!o("multiple")&&t+n.length===2?!0:!(t+n.length>r("maxFiles"))}function WO(e,t,n=[],r=[]){const{prop:o,computed:i}=e,s=[],a=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach(c=>{const[u,p]=cve(c,i("acceptAttr")),[h,f]=ove(c,o("minFileSize"),o("maxFileSize")),g=o("validate")?.(c,l),m=g?g.length===0:!0;if(u&&h&&m)s.push(c);else{const b=[p,f];m||b.push(...g??[]),a.push({file:c,errors:b.filter(Boolean)})}}),Tve(e,s.length,n)||(s.forEach(c=>{a.push({file:c,errors:["TOO_MANY_FILES"]})}),s.splice(0)),{acceptedFiles:s,rejectedFiles:a}}function Sve(e,t){const n=r5(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach(o=>{r.items.add(o)}),e.files=r.files}}catch{}}var ds="accepted";function Pve(e,t){const{state:n,send:r,prop:o,computed:i,scope:s,context:a}=e,l=!!o("disabled"),c=!!o("required"),u=o("allowDrop"),p=o("translations"),h=n.matches("dragging"),f=n.matches("focused")&&!l;return{dragging:h,focused:f,disabled:!!l,transforming:a.get("transforming"),openFilePicker(){l||r({type:"OPEN"})},deleteFile(g,m=ds){r({type:"FILE.DELETE",file:g,itemType:m})},acceptedFiles:a.get("acceptedFiles"),rejectedFiles:a.get("rejectedFiles"),setFiles(g){r({type:"FILES.SET",files:g,count:g.length})},clearRejectedFiles(){r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){r({type:"FILES.CLEAR"})},getFileSize(g){return gve(g.size,o("locale"))},createFileUrl(g,m){const b=s.getWin(),w=b.URL.createObjectURL(g);return m(w),()=>b.URL.revokeObjectURL(w)},setClipboardFiles(g){if(l)return!1;const b=Array.from(g?.items??[]).reduce((w,E)=>{if(E.kind!=="file")return w;const k=E.getAsFile();return k?[...w,k]:w},[]);return b.length?(r({type:"FILES.SET",files:b}),!0):!1},getRootProps(){return t.element({...Mr.root.attrs,dir:o("dir"),id:l5(s),"data-disabled":hn(l),"data-dragging":hn(h)})},getDropzoneProps(g={}){return t.element({...Mr.dropzone.attrs,dir:o("dir"),id:c5(s),tabIndex:l||g.disableClick?void 0:0,role:g.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l,"data-invalid":hn(o("invalid")),"data-disabled":hn(l),"data-dragging":hn(h),onKeyDown(m){l||m.defaultPrevented||m.currentTarget===nm(m)&&(g.disableClick||m.key!=="Enter"&&m.key!==" "||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(m){l||m.defaultPrevented||g.disableClick||m.currentTarget===nm(m)&&(m.currentTarget.localName==="label"&&m.preventDefault(),r({type:"DROPZONE.CLICK"}))},onDragOver(m){if(l||!u)return;m.preventDefault(),m.stopPropagation();try{m.dataTransfer.dropEffect="copy"}catch{}if(!GO(m))return;const w=m.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:w})},onDragLeave(m){l||u&&(u1(m.currentTarget,m.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(m){if(l)return;u&&(m.preventDefault(),m.stopPropagation());const b=GO(m);l||!b||eve(m.dataTransfer.items,o("directory")).then(w=>{r({type:"DROPZONE.DROP",files:a5(w)})})},onFocus(){l||r({type:"DROPZONE.FOCUS"})},onBlur(){l||r({type:"DROPZONE.BLUR"})}})},getTriggerProps(){return t.button({...Mr.trigger.attrs,dir:o("dir"),id:xve(s),disabled:l,"data-disabled":hn(l),"data-invalid":hn(o("invalid")),type:"button",onClick(g){l||(u1(Ive(s),g.currentTarget)&&g.stopPropagation(),r({type:"OPEN"}))}})},getHiddenInputProps(){return t.input({id:f1(s),tabIndex:-1,disabled:l,type:"file",required:o("required"),capture:o("capture"),name:o("name"),accept:i("acceptAttr"),webkitdirectory:o("directory")?"":void 0,multiple:i("multiple")||o("maxFiles")>1,onClick(g){g.stopPropagation(),g.currentTarget.value=""},onInput(g){if(l)return;const{files:m}=g.currentTarget;r({type:"FILE.SELECT",files:m?Array.from(m):[]})},style:Zme})},getItemGroupProps(g={}){const{type:m=ds}=g;return t.element({...Mr.itemGroup.attrs,dir:o("dir"),"data-disabled":hn(l),"data-type":m})},getItemProps(g){const{file:m,type:b=ds}=g;return t.element({...Mr.item.attrs,dir:o("dir"),id:_ve(s,m.name),"data-disabled":hn(l),"data-type":b})},getItemNameProps(g){const{file:m,type:b=ds}=g;return t.element({...Mr.itemName.attrs,dir:o("dir"),id:kve(s,m.name),"data-disabled":hn(l),"data-type":b})},getItemSizeTextProps(g){const{file:m,type:b=ds}=g;return t.element({...Mr.itemSizeText.attrs,dir:o("dir"),id:Cve(s,m.name),"data-disabled":hn(l),"data-type":b})},getItemPreviewProps(g){const{file:m,type:b=ds}=g;return t.element({...Mr.itemPreview.attrs,dir:o("dir"),id:Eve(s,m.name),"data-disabled":hn(l),"data-type":b})},getItemPreviewImageProps(g){const{file:m,url:b,type:w=ds}=g;if(!m.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...Mr.itemPreviewImage.attrs,alt:p.itemPreview?.(m),src:b,"data-disabled":hn(l),"data-type":w})},getItemDeleteTriggerProps(g){const{file:m,type:b=ds}=g;return t.button({...Mr.itemDeleteTrigger.attrs,dir:o("dir"),type:"button",disabled:l,"data-disabled":hn(l),"data-type":b,"aria-label":p.deleteFile?.(m),onClick(){l||r({type:"FILE.DELETE",file:m,itemType:b})}})},getLabelProps(){return t.label({...Mr.label.attrs,dir:o("dir"),id:wve(s),htmlFor:f1(s),"data-disabled":hn(l),"data-required":hn(c)})},getClearTriggerProps(){return t.button({...Mr.clearTrigger.attrs,dir:o("dir"),type:"button",disabled:l,hidden:a.get("acceptedFiles").length===0,"data-disabled":hn(l),onClick(g){g.defaultPrevented||l||r({type:"FILES.CLEAR"})}})}}}var $ve={props({props:e}){return{minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:t=>`preview of ${t.name}`,deleteFile:t=>`delete file ${t.name}`,...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{acceptedFiles:t(()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(r,o)=>r.length===o?.length&&r.every((i,s)=>sh(i,o[s])),hash(r){return r.map(o=>`${o.name}-${o.size}`).join(",")},onChange(r){const o=n();e("onFileAccept")?.({files:r}),e("onFileChange")?.({acceptedFiles:r,rejectedFiles:o.get("rejectedFiles")})}})),rejectedFiles:t(()=>({defaultValue:[],isEqual:(r,o)=>r.length===o?.length&&r.every((i,s)=>sh(i.file,o[s].file)),onChange(r){const o=n();e("onFileReject")?.({files:r}),e("onFileChange")?.({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:r})}})),transforming:t(()=>({defaultValue:!1}))}},computed:{acceptAttr:({prop:e})=>rve(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],()=>{n(["syncInputElement"])})},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop")||!e("allowDrop")||e("disabled"))return;const n=t.getDoc(),r=i=>{i?.preventDefault()},o=i=>{u1(Ove(t),nm(i))||i.preventDefault()};return vve(zO(n,"dragover",r,!1),zO(n,"drop",o,!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask(()=>{const n=jO(e);if(!n)return;Sve(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))})},openFilePicker({scope:e}){Jme(()=>{jO(e)?.click()})},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:o,rejectedFiles:i}=WO(e,r.files);n.set("acceptedFiles",t("multiple")?o:o.length>0?[o[0]]:[]),n.set("rejectedFiles",i)},setEventFiles(e){const{computed:t,context:n,event:r,prop:o}=e,i=n.get("acceptedFiles"),s=n.get("rejectedFiles"),{acceptedFiles:a,rejectedFiles:l}=WO(e,r.files,i,s),c=p=>{if(t("multiple")){n.set("acceptedFiles",h=>[...h,...p]),n.set("rejectedFiles",l);return}if(p.length){n.set("acceptedFiles",[p[0]]),n.set("rejectedFiles",l);return}l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))},u=o("transformFiles");u?(n.set("transforming",!0),u(a).then(c).catch(p=>{bve(`[zag-js/file-upload] error transforming files -${p}`)}).finally(()=>{n.set("transforming",!1)})):c(a)},removeFile({context:e,event:t}){if(t.itemType==="rejected"){const n=e.get("rejectedFiles").filter(r=>!sh(r.file,t.file));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter(r=>!sh(r,t.file));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}};s5()(["accept","acceptedFiles","allowDrop","capture","defaultAcceptedFiles","dir","directory","disabled","getRootNode","id","ids","invalid","locale","maxFiles","maxFileSize","minFileSize","name","onFileAccept","onFileChange","onFileReject","preventDocumentDrop","required","transformFiles","translations","validate"]);s5()(["file","type"]);function Rve(e){return e==null?[]:Array.isArray(e)?e:[e]}var qO=e=>e?.constructor.name==="Array",Ave=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(qO(e)&&qO(t))return Ave(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;oe!=null&&typeof e=="object",Mve=e=>typeof e=="string",gd=e=>typeof e=="function",Dve=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Lve=e=>Object.prototype.toString.call(e),u5=Function.prototype.toString,Vve=u5.call(Object),Fve=e=>{if(!Nve(e)||Lve(e)!="[object Object]"||zve(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=Dve(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&u5.call(n)==Vve},Bve=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Hve=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,zve=e=>Bve(e)||Hve(e);function d5(e){if(!Fve(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=d5(o))}return n}function KO(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Uve(e,t){if(e==null)throw new Error(t())}var p5=e=>typeof e=="object"&&e!==null,jve=9,Gve=e=>p5(e)&&e.nodeType===jve,Wve=e=>p5(e)&&e===e.window;function qve(e){if(!e)return!1;const t=e.getRootNode();return f5(t)===e}function Kve(e){return Gve(e)?e:Wve(e)?e.document:e?.ownerDocument??document}function f5(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}var rc=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(rc||{}),ny="__init__";function Yve(e){const t=()=>e.getRootNode?.()??document,n=()=>Kve(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>f5(t()),isActiveElement:qve,getById:s=>t().getElementById(s)}}function Xve(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}function Jve(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}var YO={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"},Zve="viewBox,className,preserveAspectRatio,fillRule,clipPath,clipRule,strokeWidth,strokeLinecap,strokeLinejoin,strokeDasharray,strokeDashoffset,strokeMiterlimit".split(",");function Qve(e){return e in YO?YO[e]:e.startsWith("on")?`on${Jve(e.substr(2))}`:Zve.includes(e)?e:e.toLowerCase()}var ebe=Xve(e=>{const t={};for(const n in e){const r=e[n];n==="children"?typeof r=="string"&&(t.innerHTML=r):t[Qve(n)]=e[n]}return t});function rm(e){const t=e().defaultValue??e().value,n=e().isEqual??Object.is,r=co(t),o=A(()=>e().value!==void 0),i=co(o.value?e().value:r.value);return{initial:t,ref:i,get(){return o.value?e().value:r.value},set(s){const a=o.value?e().value:r.value,l=gd(s)?s(a):s;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:l,prev:a}),o.value||(r.value=l),n(l,a)||e().onChange?.(l,a)},invoke(s,a){e().onChange?.(s,a)},hash(s){return e().hash?.(s)??String(s)}}}rm.cleanup=e=>{Sr(()=>e())};rm.ref=e=>{let t=e;return{get:()=>t,set:n=>{t=n}}};function tbe(e){const t={current:e};return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var nbe=(e,t)=>{st(()=>[...e.map(n=>n())],(n,r)=>{let o=!1;for(let i=0;i{const{id:C,ids:x,getRootNode:I}=pe(t);return Yve({id:C,ids:x,getRootNode:I})}),r=(...C)=>{e.debug&&console.log(...C)},o=A(()=>e.props?.({props:d5(pe(t)),get scope(){return n.value}})??pe(t)),i=obe(o),s=e.context?.({prop:i,bindable:rm,get scope(){return n.value},flush:XO,getContext(){return a},getComputed(){return v},getRefs(){return g},getEvent(){return h()}}),a={get(C){return s[C]?.get()},set(C,x){s[C]?.set(x)},initial(C){return s[C]?.initial},hash(C){const x=s[C]?.get();return s[C]?.hash(x)}};let l=new Map,c=null,u={current:null},p={current:{type:""}};const h=()=>({...p.current,current(){return p.current},previous(){return u.current}}),f=()=>({..._,matches(...C){const x=_.get();return C.includes(x)},hasTag(C){const x=_.get();return!!e.states[x]?.tags?.includes(C)}}),g=tbe(e.refs?.({prop:i,context:a})??{}),m=()=>({state:f(),context:a,event:h(),prop:i,send:N,action:b,guard:w,track:nbe,refs:g,computed:v,flush:XO,get scope(){return n.value},choose:k}),b=C=>{const x=gd(C)?C(m()):C;if(!x)return;const I=x.map(R=>{const M=e.implementations?.actions?.[R];return M||KO(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of I)R?.(m())},w=C=>gd(C)?C(m()):e.implementations?.guards?.[C](m()),E=C=>{const x=gd(C)?C(m()):C;if(!x)return;const I=x.map(M=>{const B=e.implementations?.effects?.[M];return B||KO(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of I){const B=M?.(m());B&&R.push(B)}return()=>R.forEach(M=>M?.())},k=C=>Rve(C).find(x=>{let I=!x.guard;return Mve(x.guard)?I=!!w(x.guard):gd(x.guard)&&(I=x.guard(m())),I}),v=C=>{Uve(e.computed,()=>"[zag-js] No computed object found on machine");const x=e.computed[C];return x({context:a,event:h(),prop:i,refs:g,get scope(){return n.value},computed:v})},_=rm(()=>({defaultValue:e.initialState({prop:i}),onChange(C,x){x&&(l.get(x)?.(),l.delete(x)),x&&b(e.states[x]?.exit),b(c?.actions);const I=E(e.states[C]?.effects);if(I&&l.set(C,I),x===ny){b(e.entry);const R=E(e.effects);R&&l.set(ny,R)}b(e.states[C]?.entry)}}));let T=rc.NotStarted;Je(()=>{const C=T===rc.Started;T=rc.Started,r(C?"rehydrating...":"initializing..."),_.invoke(_.initial,ny)}),on(()=>{T=rc.Stopped,r("unmounting...");const C=l.values();for(const x of C)x?.();l=new Map,b(e.exit)});const N=C=>{if(T!==rc.Started)return;u.current=p.current,p.current=C;let x=_.get();const I=e.states[x].on?.[C.type]??e.on?.[C.type],R=k(I);if(!R)return;c=R;const M=R.target??x;r("transition",C.type,R.target||x,`(${R.actions})`);const B=M!==x;B?_.set(M):R.reenter&&!B?_.invoke(x,x):b(R.actions)};return e.watch?.(m()),{state:f(),send:N,context:a,prop:i,get scope(){return n.value},refs:g,computed:v,event:h(),getStatus:()=>T}}function obe(e){return function(n){return e.value[n]}}var XO=e=>{Nn().then(()=>{e()})};const ibe={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},sbe={key:0,class:"min-h-24 border border-dashed rounded flex flex-col items-center justify-center"},abe={key:1},lbe={class:"rounded-t p-3 bg-zinc-100 relative"},cbe=["src"],ube={class:"rounded-b p-3 bg-zinc-100 border-t border-white"},dbe={class:"flex-none h-12 border-b border-zinc-200 flex gap-3 px-4 items-center justify-between"},pbe={class:"flex-1 flex flex-col gap-3 min-h-0 p-3 overflow-y-auto"},fbe={class:"grid grid-cols-2 gap-3"},hbe={class:"flex-none flex items-center gap-3 p-3 justify-end h-12 border-t border-zinc-200"},gbe=P({__name:"ImagePicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=_=>{const T=new RegExp("^(https?:\\/\\/)?((localhost)|((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return _.startsWith("/")||!!T.test(_)},{t:n}=Et(),{state:r}=Dt(),{get:o,postFormData:i}=ha(),s=kl(),a=rt(e,"modelValue",{set(_){return _?_.path:null},get(_){return _?{path:_,url:t(_)?_:window.editorConfig.imagesBaseUrl+"/"+_,name:_}:null}}),l=Q(!1),c=Q([]),u=Q(),p=rbe($ve,{id:"imagepicker",accept:"image/*",maxFiles:10,onFileAccept(_){if(_.files.length===0)return;c.value=_.files.map(N=>({url:URL.createObjectURL(N),path:N.name,name:N.name,uploading:!0}));const T=new FormData;_.files.forEach(N=>{T.append("image[]",N)}),g(T)}}),h=A(()=>Pve(p,ebe)),f=i(window.editorConfig.routes.uploadImage);f.onSuccess(_=>{r.images=[..._,...r.images],c.value=[],m(r.images[0]),h.value.clearFiles()}),f.onError(_=>{c.value=[],h.value.clearFiles(),s.ui.toast({type:"error",title:n("Failed to upload image"),description:_.message||_.toString()})});async function g(_){f.execute(_)}function m(_){a.value=_}function b(){a.value=u.value,l.value=!1}function w(){l.value=!1}function E(){a.value=null}const{data:k,execute:v}=o(window.editorConfig.routes.listImages);return st(k,_=>{_&&(r.images=_)}),Je(()=>{(!r.images||r.images.length===0)&&v()}),(_,T)=>{const N=So,C=Ume;return y(),V("div",null,[e.field.label?(y(),V("label",ibe,j(e.field.label),1)):Z("",!0),S(d(mt).Root,{open:d(l),"onUpdate:open":T[0]||(T[0]=x=>Ce(l)?l.value=x:null),modal:!1,"close-on-interact-outside":!1,onOpenChange:T[1]||(T[1]=x=>u.value=a.value||void 0)},{default:O(()=>[a.value?(y(),V("div",abe,[D("div",lbe,[D("img",{src:a.value.url,alt:"",class:"object-cover h-32 w-full object-center"},null,8,cbe),D("button",{class:"absolute top-4 right-4 bg-zinc-700/30 text-zinc-200 p-px rounded",onClick:E},[S(N,{class:"w-4 h-4"})])]),D("div",ube,[S(d(mt).Trigger,{class:"text-sm w-full text-center bg-white border rounded py-1"},{default:O(()=>[re(j(d(n)("Change image")),1)]),_:1})])])):(y(),V("div",sbe,[S(d(mt).Trigger,{class:"text-blue-600 text-sm bg-zinc-200 rounded px-2.5 py-1.5 hover:bg-zinc-100 hover:text-blue-800"},{default:O(()=>[re(j(d(n)("Select image")),1)]),_:1})])),S(d(mt).Positioner,{class:"flex absolute inset-0 z-50 h-full w-full items-center justify-center"},{default:O(()=>[S(d(mt).Content,{class:"bg-white shadow flex flex-col w-full h-full overflow-hidden"},{default:O(()=>[D("header",dbe,[S(d(mt).Title,null,{default:O(()=>[re(j(e.field.label||d(n)("Image Picker")),1)]),_:1}),D("button",{onClick:b,class:"cursor-pointer rounded-lg p-0.5 text-zinc-700 hover:bg-zinc-300"},[S(N,{class:"w-5 h-5"})])]),D("section",pbe,[D("div",F(d(h).getRootProps(),{accept:"image/*"}),[D("div",F(d(h).getDropzoneProps(),{class:"flex flex-col gap-3 items-center justify-center h-32 bg-zinc-50/50 border border-zinc-300 border-dashed rounded-lg"}),[D("p",null,j(d(n)("Drop your images here")),1),D("button",F(d(h).getTriggerProps(),{class:"cursor-pointer bg-blue-500 text-white shadow-lg rounded border px-2.5 py-1.5 text-sm"}),j(d(n)("Add images")),17)],16),D("input",Be(Fe(d(h).getHiddenInputProps())),null,16)],16),D("div",fbe,[(y(!0),V(ge,null,Ie(d(c),x=>(y(),$(C,{key:x.path,image:x},null,8,["image"]))),128)),(y(!0),V(ge,null,Ie(d(r).images,x=>(y(),$(C,{key:x.path,image:x,selected:!!a.value&&a.value.path===x.path,onClick:I=>m(x)},null,8,["image","selected","onClick"]))),128))])]),D("footer",hbe,[S(d(Vt),{onClick:b},{default:O(()=>[re(j(d(n)("Cancel")),1)]),_:1}),S(d(Vt),{variant:"primary",onClick:w},{default:O(()=>[re(j(d(n)("Select")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),mbe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function vbe(e,t){return y(),V("svg",mbe,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M8 4h13v2H8zM5 3v3h1v1H3V6h1V4H3V3zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2zM8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const bbe=fe({name:"ri-list-ordered",render:vbe}),ybe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xbe(e,t){return y(),V("svg",ybe,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"},null,-1)])])}const wbe=fe({name:"ri-list-unordered",render:xbe}),_be={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function kbe(e,t){return y(),V("svg",_be,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"},null,-1)])])}const Cbe=fe({name:"ri-heading",render:kbe}),Ebe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Obe(e,t){return y(),V("svg",Ebe,[...t[0]||(t[0]=[D("path",{fill:"currentColor",d:"M8 3v9a4 4 0 0 0 8 0V3h2v9a6 6 0 0 1-12 0V3zM4 20h16v2H4z"},null,-1)])])}const Ibe=fe({name:"ri-underline",render:Obe}),Tbe={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Sbe(e,t){return y(),V("svg",Tbe,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M5.248 20.246H9.05m0 0h3.696m-3.696 0l5.893-16.502m0 0h-3.697m3.697 0h3.803"},null,-1)])])}const Pbe=fe({name:"heroicons-italic",render:Sbe}),$be={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Rbe(e,t){return y(),V("svg",$be,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"2",d:"M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25z"},null,-1)])])}const Abe=fe({name:"heroicons-bold",render:Rbe});function mn(e){this.content=e}mn.prototype={constructor:mn,find:function(e){for(var t=0;t>1}};mn.from=function(e){if(e instanceof mn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new mn(t)};function h5(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=h5(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function g5(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ct&&r(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,o+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new ie(r,o)}cutByIndex(t,n){return t==n?ie.empty:t==0&&n==this.content.length?this:new ie(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new ie(o,i)}addToStart(t){return new ie([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ie(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=t)return i==t?ah(n+1,i):ah(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ie.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ie(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ie.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};vt.none=[];class im extends Error{}class we{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=v5(this.content,t+this.openStart,n);return r&&new we(r,this.openStart,this.openEnd)}removeBetween(t,n){return new we(m5(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return we.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new we(ie.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new we(t,r,o)}}we.empty=new we(ie.empty,0,0);function m5(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(m5(i.content,t-o-1,n-o-1)))}function v5(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=v5(s.content,t-i-1,n,s);return a&&e.replaceChild(o,s.copy(a))}function Nbe(e,t,n){if(n.openStart>e.depth)throw new im("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new im("Inconsistent open depths");return b5(e,t,n,0)}function b5(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Bd(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Ya(e.nodeAfter,r),i++));for(let a=i;ao&&g1(e,t,o+1),s=r.depth>o&&g1(n,r,o+1),a=[];return Bd(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(y5(i,s),Ya(Xa(i,x5(e,t,n,r,o+1)),a)):(i&&Ya(Xa(i,sm(e,t,o+1)),a),Bd(t,n,o,a),s&&Ya(Xa(s,sm(n,r,o+1)),a)),Bd(r,null,o,a),new ie(a)}function sm(e,t,n){let r=[];if(Bd(null,e,n,r),e.depth>n){let o=g1(e,t,n+1);Ya(Xa(o,sm(e,t,n+1)),r)}return Bd(t,null,n,r),new ie(r)}function Mbe(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(ie.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Cp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new am(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(r.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new Cp(n,r,i)}static resolveCached(t,n){let r=JO.get(t);if(r)for(let i=0;it&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),w5(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=ie.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=ie.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Bs.prototype.text=void 0;class lm extends Bs{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):w5(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new lm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new lm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function w5(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class al{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Fbe(t,n);if(r.next==null)return al.empty;let o=_5(r);r.next&&r.err("Unexpected trailing text");let i=Wbe(Gbe(o));return qbe(i,r),i}matchType(t){for(let n=0;nc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}}al.empty=new al(!0);class Fbe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function _5(e){let t=[];do t.push(Bbe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Bbe(e){let t=[];do t.push(Hbe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Hbe(e){let t=jbe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=zbe(e,t);else break;return t}function ZO(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function zbe(e,t){let n=ZO(e),r=n;return e.eat(",")&&(e.next!="}"?r=ZO(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Ube(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(t)&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function jbe(e){if(e.eat("(")){let t=_5(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=Ube(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Gbe(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let c={term:l,to:a};return t[s].push(c),c}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[r.join(",")]=new al(r.indexOf(e.length-1)>-1);for(let s=0;s-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:E5(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bs(this,this.computeAttrs(t),ie.from(n),vt.setFrom(r))}createChecked(t=null,n,r){return n=ie.from(n),this.checkContent(n),new Bs(this,this.computeAttrs(t),n,vt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=ie.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(ie.empty,!0);return i?new Bs(this,t,n.append(i),vt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new T5(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Kbe(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}class Ybe{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Kbe(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Lv{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=I5(t,o.attrs),this.excluded=null;let i=C5(this.attrs);this.instance=i?new vt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new vt(this,E5(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new Lv(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class S5{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=mn.from(t.nodes),n.marks=mn.from(t.marks||{}),this.nodes=eI.compile(this.spec.nodes,this),this.marks=Lv.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=al.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?tI(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:tI(this,s.split(" "))}this.nodeFromJSON=o=>Bs.fromJSON(this,o),this.markFromJSON=o=>vt.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof eI){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new lm(r,r.defaultAttrs,t,vt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function tI(e,t){let n=[];for(let r=0;r-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function Xbe(e){return e.tag!=null}function Jbe(e){return e.style!=null}let Hd=class v1{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Xbe(o))this.tags.push(o);else if(Jbe(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new rI(this,n,!1);return r.addAll(t,vt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new rI(this,n,!0);return r.addAll(t,vt.none,n.from,n.to),we.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=oI(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=oI(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new v1(t,v1.schemaRules(t)))}};const P5={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Zbe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$5={ol:!0,ul:!0},Ep=1,b1=2,zd=4;function nI(e,t,n){return t!=null?(t?Ep:0)|(t==="full"?b1:0):e&&e.whitespace=="pre"?Ep|b1:n&~zd}class lh{constructor(t,n,r,o,i,s){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=vt.none,this.match=i||(s&zd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ie.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Ep)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=ie.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(ie.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!P5.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class rI{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=nI(null,n.preserveWhitespace,0)|(r?zd:0);o?i=new lh(o.type,o.attrs,vt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new lh(null,null,vt.none,!0,null,s):i=new lh(t.schema.topNodeType,null,vt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&b1?"full":this.localPreserveWS||(o.options&Ep)>0;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,` -`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],a=t.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let o=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;$5.hasOwnProperty(s)&&this.parser.normalizeLists&&Qbe(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:Zbe.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(P5.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let p=l&&l.skip?n:this.readStyles(t,n);p&&this.addAll(t,p),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let o=0;o!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}i&&this.sync(a)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=o==null?null:t.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,n);this.findAtPoint(t,i)}findPlace(t,n,r){let o,i;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(t);if(c&&(!o||o.length>c.length+a)&&(o=c,i=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(i);for(let s=0;s(s.type?s.type.allowsMarkType(c.type):iI(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new lh(t,n,l,o,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Ep)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Qbe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&$5.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function eye(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function oI(e){let t={};for(let n in e)t[n]=e[n];return t}function iI(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let l=0;l{if(i.length||s.marks.length){let a=0,l=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&Gh(oy(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return Gh(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Cl(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=sI(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return sI(t.marks)}}function sI(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function oy(e){return e.document||window.document}const aI=new WeakMap;function tye(e){let t=aI.get(e);return t===void 0&&aI.set(e,t=nye(e)),t}function nye(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let p in c)if(c[p]!=null){let h=p.indexOf(" ");h>0?l.setAttributeNS(p.slice(0,h),p.slice(h+1),c[p]):p=="style"&&l.style?l.style.cssText=c[p]:l.setAttribute(p,c[p])}}for(let p=u;pu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:g}=Gh(e,h,n,r);if(l.appendChild(f),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const R5=65535,A5=Math.pow(2,16);function rye(e,t){return e+t*A5}function lI(e){return e&R5}function oye(e){return(e-(e&R5))/A5}const N5=1,M5=2,Wh=4,D5=8;class y1{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&D5)>0}get deletedBefore(){return(this.delInfo&(N5|Wh))>0}get deletedAfter(){return(this.delInfo&(M5|Wh))>0}get deletedAcross(){return(this.delInfo&Wh)>0}}class wr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&wr.empty)return wr.empty}recover(t){let n=0,r=lI(t);if(!this.inverted)for(let o=0;ot)break;let c=this.ranges[a+i],u=this.ranges[a+s],p=l+c;if(t<=p){let h=c?t==l?-1:t==p?1:n:n,f=l+o+(h<0?0:u);if(r)return f;let g=t==(n<0?l:p)?null:rye(a/3,t-l),m=t==l?M5:t==p?N5:Wh;return(n<0?t!=l:t!=p)&&(m|=D5),new y1(f,m,g)}o+=u-c}return r?t+o:new y1(t+o,0,null)}touches(t,n){let r=0,o=lI(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+i],u=l+c;if(t<=u&&a==o*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new cm;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Jt.fromReplace(t,this.from,this.to,i)}invert(){return new ro(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ts(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ts&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ts(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ts(n.from,n.to,t.markFromJSON(n.mark))}}Fn.jsonID("addMark",Ts);class ro extends Fn{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new we(t_(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return Jt.fromReplace(t,this.from,this.to,r)}invert(){return new Ts(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ro(n.pos,r.pos,this.mark)}merge(t){return t instanceof ro&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ro(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ro(n.from,n.to,t.markFromJSON(n.mark))}}Fn.jsonID("removeMark",ro);class Ss extends Fn{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Jt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Jt.fromReplace(t,this.pos,this.pos+1,new we(ie.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new fn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new fn(n.from,n.to,n.gapFrom,n.gapTo,we.fromJSON(t,n.slice),n.insert,!!n.structure)}}Fn.jsonID("replaceAround",fn);function x1(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function iye(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(l,c,u)=>{if(!l.isInline)return;let p=l.marks;if(!r.isInSet(p)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,t),f=Math.min(c+l.nodeSize,n),g=r.addToSet(p);for(let m=0;me.step(l)),i.forEach(l=>e.step(l))}function sye(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Lv){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let u=0;ue.step(new ro(s.from,s.to,s.style)))}function n_(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l=0;l--)e.step(s[l])}function aye(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function _u(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;g--)m||r.index(g)>0?(m=!0,u=ie.from(r.node(g).copy(u)),p++):l--;let h=ie.empty,f=0;for(let g=i,m=!1;g>n;g--)m||o.after(g+1)=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ie.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new fn(o,i,o,i,new we(r,0,0),n.length,!0))}function pye(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&fye(e.doc,e.mapping.slice(i).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!g?c=!1:!f&&g&&(c=!0)}c===!1&&V5(e,s,a,i),n_(e,e.mapping.slice(i).map(a,1),r,void 0,c===null);let u=e.mapping.slice(i),p=u.map(a,1),h=u.map(a+s.nodeSize,1);return e.step(new fn(p,h,p+1,h-1,new we(ie.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&L5(e,s,a,i),!1}})}function L5(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=e.mapping.slice(r).map(n+1+i+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function V5(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+i);e.replaceWith(s,s+1,t.type.schema.text(` -`))}})}function fye(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function hye(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new fn(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new we(ie.from(s),0,0),1,!0))}function Ai(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let p=o.node(c),h=o.index(c);if(p.type.spec.isolating)return!1;let f=p.content.cutByIndex(h,p.childCount),g=r&&r[u+1];g&&(f=f.replaceChild(0,g.type.create(g.attrs)));let m=r&&r[u]||p;if(!p.canReplace(h+1,p.childCount)||!m.type.validContent(f))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function gye(e,t,n=1,r){let o=e.doc.resolve(t),i=ie.empty,s=ie.empty;for(let a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){i=ie.from(o.node(a).copy(i));let u=r&&r[c];s=ie.from(u?u.type.create(u.attrs,s):o.node(a).copy(s))}e.step(new un(t,t,new we(i.append(s),n,n),!0))}function ga(e,t){let n=e.resolve(t),r=n.index();return F5(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function mye(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&F5(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function vye(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),s=i.node().type;if(o&&s.inlineContent){let u=s.whitespace=="pre",p=!!s.contentMatch.matchType(o);u&&!p?r=!1:!u&&p&&(r=!0)}let a=e.steps.length;if(r===!1){let u=e.doc.resolve(t+n);V5(e,u.node(),u.before(),a)}s.inlineContent&&n_(e,t+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=e.mapping.slice(a),c=l.map(t-n);if(e.step(new un(c,l.map(t+n,-1),we.empty,!0)),r===!0){let u=e.doc.resolve(c);L5(e,u.node(),u.before(),e.steps.length)}return e}function bye(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),c=r.node(s),u=!1;if(i==1)u=c.canReplace(l,l,o);else{let p=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=p&&c.canReplaceWith(l,l,p[0])}if(u)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Fv(e,t,n=t,r=we.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return B5(o,i,r)?new un(t,n,r):new xye(o,i,r).fit()}function B5(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class xye{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ie.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=ie.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new we(i,s,a);return t>-1?new fn(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new un(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=sy(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,p=null;if(n==1&&(s?c.matchType(s.type)||(p=c.fillBefore(ie.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:p};if(n==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=sy(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new we(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=sy(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new we(md(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new we(md(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m1||l==0||m.content.size)&&(p=b,u.push(H5(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let g=c==a.childCount;g||(f=-1),this.placed=vd(this.placed,n,ie.from(u)),this.frontier[n].match=p,g&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:l,type:c}=this.frontier[a],u=ay(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=vd(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=vd(this.placed,this.depth,ie.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ie.empty,!0);n.childCount&&(this.placed=vd(this.placed,this.frontier.length,n))}}function md(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(md(e.firstChild.content,t-1,n)))}function vd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(vd(e.lastChild.content,t-1,n)))}function sy(e,t){for(let n=0;n1&&(r=r.replaceChild(0,H5(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(ie.empty,!0)))),e.copy(r)}function ay(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!wye(n,i.content,s)?a:null}function wye(e,t,n){for(let r=n;r0;h--,f--){let g=o.node(h).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(h)>-1?a=h:o.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=r.openStart;for(let h=r.content,f=0;;f++){let g=h.firstChild;if(c.push(g),f==r.openStart)break;h=g.content}for(let h=u-1;h>=0;h--){let f=c[h],g=_ye(f.type);if(g&&!f.sameMarkup(o.node(Math.abs(a)-1)))u=h;else if(g||!f.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let f=(h+u+1)%(r.openStart+1),g=c[f];if(g)for(let m=0;m=0&&(e.replace(t,n,r),!(e.steps.length>p));h--){let f=s[h];f<0||(t=o.before(f),n=i.after(f))}}function z5(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(ie.empty,!0))}return e}function Cye(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=bye(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new we(ie.from(r),0,0))}function Eye(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=U5(r,o);for(let s=0;s0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function U5(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Pc extends Fn{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Jt.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return Jt.fromReplace(t,this.pos,this.pos+1,new we(ie.from(o),0,n.isLeaf?0:1))}getMap(){return wr.empty}invert(t){return new Pc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Pc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Pc(n.pos,n.attr,n.value)}}Fn.jsonID("attr",Pc);class Op extends Fn{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return Jt.ok(r)}getMap(){return wr.empty}invert(t){return new Op(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Op(n.attr,n.value)}}Fn.jsonID("docAttr",Op);let Yc=class extends Error{};Yc=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Yc.prototype=Object.create(Error.prototype);Yc.prototype.constructor=Yc;Yc.prototype.name="TransformError";class j5{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new cm}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Yc(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=we.empty){let o=Fv(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new we(ie.from(r),0,0))}delete(t,n){return this.replace(t,n,we.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return kye(this,t,n,r),this}replaceRangeWith(t,n,r){return Cye(this,t,n,r),this}deleteRange(t,n){return Eye(this,t,n),this}lift(t,n){return lye(this,t,n),this}join(t,n=1){return vye(this,t,n),this}wrap(t,n){return dye(this,t,n),this}setBlockType(t,n=t,r,o=null){return pye(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return hye(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Pc(t,n,r)),this}setDocAttribute(t,n){return this.step(new Op(t,n)),this}addNodeMark(t,n){return this.step(new Ss(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof vt)n.isInSet(r.marks)&&this.step(new ll(t,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new ll(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return gye(this,t,n,r),this}addMark(t,n,r){return iye(this,t,n,r),this}removeMark(t,n,r){return sye(this,t,n,r),this}clearIncompatible(t,n,r){return n_(this,t,n,r),this}}const ly=Object.create(null);class qe{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Oye(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?oc(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):oc(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Or(t.node(0))}static atStart(t){return oc(t,t,0,0,1)||new Or(t)}static atEnd(t){return oc(t,t,t.content.size,t.childCount,-1)||new Or(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ly[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in ly)throw new RangeError("Duplicate use of selection JSON ID "+t);return ly[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ze.between(this.$anchor,this.$head).getBookmark()}}qe.prototype.visible=!0;class Oye{constructor(t,n){this.$from=t,this.$to=n}}let uI=!1;function dI(e){!uI&&!e.parent.inlineContent&&(uI=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ze extends qe{constructor(t,n=t){dI(t),dI(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return qe.near(r);let o=t.resolve(n.map(this.anchor));return new ze(o.parent.inlineContent?o:r,r)}replace(t,n=we.empty){if(super.replace(t,n),n==we.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ze&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Bv(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ze(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=qe.findFrom(n,r,!0)||qe.findFrom(n,-r,!0);if(i)n=i.$head;else return qe.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(qe.findFrom(t,-r,!0)||qe.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&Pe.isSelectable(a))return Pe.create(e,n-(o<0?a.nodeSize:0))}else{let l=oc(e,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function pI(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=u)}),e.setSelection(qe.near(e.doc.resolve(s),n))}const fI=1,ch=2,hI=4;class Tye extends j5{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=ch,this}ensureMarks(t){return vt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ch)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~ch,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||vt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(qe.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=hI,this}get scrolledIntoView(){return(this.updated&hI)>0}}function gI(e,t){return!t||!e?e:e.bind(t)}class bd{constructor(t,n,r){this.name=t,this.init=gI(n.init,r),this.apply=gI(n.apply,r)}}const Sye=[new bd("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new bd("selection",{init(e,t){return e.selection||qe.atStart(t.doc)},apply(e){return e.selection}}),new bd("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new bd("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class cy{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Sye.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new bd(r.key,r.spec.state,r))})}}class gc{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new cy(t.schema,t.plugins),i=new gc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Bs.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=qe.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=c.fromJSON.call(l,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function G5(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=G5(o,t,{})),n[r]=o}return n}class pi{constructor(t){this.spec=t,this.props={},t.props&&G5(t.props,this,this.props),this.key=t.key?t.key.key:W5("plugin")}getState(t){return t[this.key]}}const uy=Object.create(null);function W5(e){return e in uy?e+"$"+ ++uy[e]:(uy[e]=0,e+"$")}class El{constructor(t="key"){this.key=W5(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const bn=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Xc=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let w1=null;const xi=function(e,t,n){let r=w1||(w1=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Pye=function(){w1=null},cl=function(e,t,n,r){return n&&(mI(e,t,n,r,-1)||mI(e,t,n,r,1))},$ye=/^(img|br|input|textarea|hr)$/i;function mI(e,t,n,r,o){for(var i;;){if(e==n&&t==r)return!0;if(t==(o<0?0:zr(e))){let s=e.parentNode;if(!s||s.nodeType!=1||ff(e)||$ye.test(e.nodeName)||e.contentEditable=="false")return!1;t=bn(e)+(o<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)t+=o;else return!1;else e=s,t=o<0?zr(e):0}else return!1}}function zr(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Rye(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=zr(e)}else if(e.parentNode&&!ff(e))t=bn(e),e=e.parentNode;else return null}}function Aye(e,t){for(;;){if(e.nodeType==3&&t2),Fr=Jc||(ri?/Mac/.test(ri.platform):!1),Lye=ri?/Win/.test(ri.platform):!1,Ti=/Android \d/.test(ma),hf=!!vI&&"webkitFontSmoothing"in vI.documentElement.style,Vye=hf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Fye(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function hi(e,t){return typeof e=="number"?e:e[t]}function Bye(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function bI(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Xc(s);continue}let a=s,l=a==i.body,c=l?Fye(i):Bye(a),u=0,p=0;if(t.topc.bottom-hi(r,"bottom")&&(p=t.bottom-t.top>c.bottom-c.top?t.top+hi(o,"top")-c.top:t.bottom-c.bottom+hi(o,"bottom")),t.leftc.right-hi(r,"right")&&(u=t.right-c.right+hi(o,"right")),u||p)if(l)i.defaultView.scrollBy(u,p);else{let f=a.scrollLeft,g=a.scrollTop;p&&(a.scrollTop+=p),u&&(a.scrollLeft+=u);let m=a.scrollLeft-f,b=a.scrollTop-g;t={left:t.left-m,top:t.top-b,right:t.right-m,bottom:t.bottom-b}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:Xc(s)}}function Hye(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:Y5(e.dom)}}function Y5(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Xc(r));return t}function zye({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;X5(n,r==0?0:r-t)}function X5(e,t){for(let n=0;n=a){s=Math.max(g.bottom,s),a=Math.min(g.top,a);let m=g.left>t.left?g.left-t.left:g.right=(g.left+g.right)/2?1:0));continue}}else g.top>t.top&&!l&&g.left<=t.left&&g.right>=t.left&&(l=u,c={left:Math.max(g.left,Math.min(g.right,t.left)),top:g.top});!n&&(t.left>=g.right&&t.top>=g.top||t.left>=g.left&&t.top>=g.bottom)&&(i=p+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?jye(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:J5(n,o)}function jye(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function i_(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Gye(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function qye(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right-1?o:e.docView.posFromDOM(t,n,-1)}function Z5(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let c;hf&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=qye(e,r,o,t))}a==null&&(a=Wye(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function yI(e){return e.top=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Qu(gs(xi(r,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==zr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return dy(l.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==zr(r))){let l=r.childNodes[o-1],c=l.nodeType==3?xi(l,zr(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Qu(gs(c,1),!1)}if(i==null&&o=0)}function Qu(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function dy(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function eM(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function Xye(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return eM(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=Q5(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=xi(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Jye=/[\u0590-\u08ac]/;function Zye(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return a?!Jye.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:eM(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:p}=e.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let f=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:g,focusOffset:m}=e.domSelectionRange(),b=g&&!f.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==m;try{a.collapse(u,p),l&&(l!=u||c!=p)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):r.pos==r.start()||r.pos==r.end()}let xI=null,wI=null,_I=!1;function Qye(e,t,n){return xI==t&&wI==n?_I:(xI=t,wI=n,_I=n=="up"||n=="down"?Xye(e,t,n):Zye(e,t,n))}const Wr=0,kI=1,Ha=2,oi=3;class gf{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Wr,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nbn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof nM){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof tM&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?bn(i.dom)+1:0}}else{let i,s=!0;for(;i=r=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=s;for(let p=a;p>0;p--){let h=this.children[p-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=bn(h.dom)+1;break}t-=h.size}o==-1&&(o=0)}if(o>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;ug&&sn){let g=a;a=l,l=g}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,l=s-i.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?Ha:kI,t==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=oi:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ha:oi}r=s}this.dirty=Ha}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ha:kI;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Wr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class e0e extends gf{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class ul extends gf{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Cl.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ul(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&oi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=oi&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Wr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=O1(i,0,t,r));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,p=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:p}=Cl.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!p&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=iM(u,r,n),c?l=new t0e(t,n,r,o,u,p||null,h,c,i,s+1):n.isText?new zv(t,n,r,o,u,h,i):new zs(t,n,r,o,u,p||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ie.empty)}return t}matchesNode(t,n,r){return this.dirty==Wr&&t.eq(this.node)&&um(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new r0e(this,s&&s.node,t);s0e(this.node,this.innerDeco,(c,u,p)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t):c.type.side>=0&&!p&&l.syncToMarks(u==this.node.childCount?vt.none:this.node.child(u).marks,r,t),l.placeWidget(c,t,o)},(c,u,p,h)=>{l.syncToMarks(c.marks,r,t);let f;l.findNodeMatch(c,u,p,h)||a&&t.state.selection.from>o&&t.state.selection.to-1&&l.updateNodeAt(c,u,p,f,t)||l.updateNextNode(c,u,p,t,h,o)||l.addNode(c,u,p,t,o),o+=c.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ha)&&(s&&this.protectLocalComposition(t,s),rM(this.contentDOM,this.children,t),Jc&&a0e(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof ze)||rn+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=l0e(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new e0e(this,i,n,o);t.input.compositionNodes.push(s),this.children=O1(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==oi||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Wr}updateOuterDeco(t){if(um(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=oM(this.dom,this.nodeDOM,E1(this.outerDeco,this.node,n),E1(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function CI(e,t,n,r,o){iM(r,t,e);let i=new zs(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class zv extends zs{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==oi||this.dirty!=Wr&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Wr||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Wr,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new zv(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=oi)}get domAtom(){return!1}isText(t){return this.node.text==t}}class nM extends gf{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Wr&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class t0e extends zs{constructor(t,n,r,o,i,s,a,l,c,u){super(t,n,r,o,i,s,a,c,u),this.spec=l}update(t,n,r,o){if(this.dirty==oi)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function rM(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=ul.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof ul)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function i0e(e,t){return e.type.side-t.type.side}function s0e(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;ci;)a.push(o[s++]);let g=i+h.nodeSize;if(h.isText){let b=g;s!b.inline):a.slice();r(h,m,t.forChild(i,h),f),i=g}}function a0e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function l0e(e,t,n,r){for(let o=0,i=0;o=n){if(i>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let c=a=0&&c+t.length+a>=n)return a+c;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function O1(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||u<=t?i.push(l):(cn&&i.push(l.slice(n-c,l.size,r)))}return i}function s_(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(Hv(n)){for(l=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&Pe.isSelectable(p)&&o.parent&&!(p.isInline&&Nye(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;c=new Pe(s==h?a:r.resolve(h))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let p=s,h=s;for(let f=0;f{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!sM(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function u0e(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.collapse(n.parentNode,bn(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&cr&&Hs<=11&&(n.disabled=!0,n.disabled=!1)}function aM(e,t){if(t instanceof Pe){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(SI(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else SI(e)}function SI(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function a_(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||ze.between(t,n,r)}function PI(e){return e.editable&&!e.hasFocus()?!1:lM(e)}function lM(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function d0e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return cl(t.node,t.offset,n.anchorNode,n.anchorOffset)}function I1(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&qe.findFrom(i,t)}function Cs(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function $I(e,t,n){let r=e.state.selection;if(r instanceof ze)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Cs(e,new ze(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=I1(e.state,t);return o&&o instanceof Pe?Cs(e,o):!1}else if(!(Fr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?Pe.isSelectable(i)?Cs(e,new Pe(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):hf?Cs(e,new ze(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Pe&&r.node.isInline)return Cs(e,new ze(t>0?r.$to:r.$from));{let o=I1(e.state,t);return o?Cs(e,o):!1}}}function dm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function jd(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Yl(e,t){return t<0?p0e(e):f0e(e)}function p0e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Gr&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(jd(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(cM(n))break;{let a=n.previousSibling;for(;a&&jd(a,-1);)o=n.parentNode,i=bn(a),a=a.previousSibling;if(a)n=a,r=dm(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?T1(e,n,r):o&&T1(e,o,i)}function f0e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=dm(n),i,s;for(;;)if(r{e.state==o&&Ni(e)},50)}function RI(e,t){let n=e.state.doc.resolve(t);if(!(An||Lye)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function AI(e,t,n){let r=e.state.selection;if(r instanceof ze&&!r.empty||n.indexOf("s")>-1||Fr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=I1(e.state,t);if(s&&s instanceof Pe)return Cs(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Or?qe.near(s,t):qe.findFrom(s,t);return a?Cs(e,a):!1}return!1}function NI(e,t){if(!(e.state.selection instanceof ze))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function MI(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function m0e(e){if(!Zn||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;MI(e,r,"true"),setTimeout(()=>MI(e,r,"false"),20)}return!1}function v0e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function b0e(e,t){let n=t.keyCode,r=v0e(t);if(n==8||Fr&&n==72&&r=="c")return NI(e,-1)||Yl(e,-1);if(n==46&&!t.shiftKey||Fr&&n==68&&r=="c")return NI(e,1)||Yl(e,1);if(n==13||n==27)return!0;if(n==37||Fr&&n==66&&r=="c"){let o=n==37?RI(e,e.state.selection.from)=="ltr"?-1:1:-1;return $I(e,o,r)||Yl(e,o)}else if(n==39||Fr&&n==70&&r=="c"){let o=n==39?RI(e,e.state.selection.from)=="ltr"?1:-1:1;return $I(e,o,r)||Yl(e,o)}else{if(n==38||Fr&&n==80&&r=="c")return AI(e,-1,r)||Yl(e,-1);if(n==40||Fr&&n==78&&r=="c")return m0e(e)||AI(e,1,r)||Yl(e,1);if(r==(Fr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function l_(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=e.someProp("clipboardSerializer")||Cl.fromSchema(e.state.schema),a=gM(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,u,p=0;for(;c&&c.nodeType==1&&(u=hM[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let g=a.createElement(u[f]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),p++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` - -`);return{dom:l,text:h,slice:t}}function uM(e,t,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=!!t&&(r||i||!n);if(l){if(e.someProp("transformPastedText",h=>{t=h(t,i||r,e)}),i)return a=new we(ie.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0),e.someProp("transformPasted",h=>{a=h(a,e,!0)}),a;let p=e.someProp("clipboardTextParser",h=>h(t,o,r,e));if(p)a=p;else{let h=o.marks(),{schema:f}=e.state,g=Cl.fromSchema(f);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=s.appendChild(document.createElement("p"));m&&b.appendChild(g.serializeNode(f.text(m,h)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=_0e(n),hf&&k0e(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let p=+u[3];p>0;p--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||Hd.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!y0e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=C0e(DI(a,+u[1],+u[2]),u[4]);else if(a=we.maxOpen(x0e(a.content,o),!0),a.openStart||a.openEnd){let p=0,h=0;for(let f=a.content.firstChild;p{a=p(a,e,l)}),a}const y0e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function x0e(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&i.length&&pM(l,i,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=fM(s[s.length-1],i.length));let u=dM(a,l);s.push(u),o=o.matchType(u.type),i=l}}),s)return ie.from(s)}return e}function dM(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,ie.from(e));return e}function pM(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ie.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function DI(e,t,n){return tn})),fy.createHTML(e)):e}function _0e(e){let t=/^(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=gM().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&hM[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=w0e(e),o)for(let i=0;i=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=ie.from(l.create(r[a+1],o)),i++,s++}return new we(o,i,s)}const Qn={},er={},E0e={touchstart:!0,touchmove:!0};class O0e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function I0e(e){for(let t in Qn){let n=Qn[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{S0e(e,r)&&!c_(e,r)&&(e.editable||!(r.type in er))&&n(e,r)},E0e[t]?{passive:!0}:void 0)}Zn&&e.dom.addEventListener("input",()=>null),P1(e)}function Ps(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function T0e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function P1(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>c_(e,r))})}function c_(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function S0e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function P0e(e,t){!c_(e,t)&&Qn[t.type]&&(e.editable||!(t.type in er))&&Qn[t.type](e,t)}er.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!vM(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ti&&An&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Jc&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Ma(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||b0e(e,n)?n.preventDefault():Ps(e,"key")};er.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};er.keypress=(e,t)=>{let n=t;if(vM(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Fr&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ze)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,o,i))&&e.dispatch(i()),n.preventDefault()}};function Uv(e){return{left:e.clientX,top:e.clientY}}function $0e(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function u_(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function $c(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function R0e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Pe.isSelectable(r)?($c(e,new Pe(n)),!0):!1}function A0e(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Pe&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(Pe.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?($c(e,Pe.create(e.state.doc,o)),!0):!1}function N0e(e,t,n,r,o){return u_(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?A0e(e,n):R0e(e,n))}function M0e(e,t,n,r){return u_(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function D0e(e,t,n,r){return u_(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||L0e(e,n,r)}function L0e(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?($c(e,ze.create(r,0,r.content.size)),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)$c(e,ze.create(r,a+1,a+1+s.content.size));else if(Pe.isSelectable(s))$c(e,Pe.create(r,a));else continue;return!0}}function d_(e){return pm(e)}const mM=Fr?"metaKey":"ctrlKey";Qn.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=d_(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&$0e(n,e.input.lastClick)&&!n[mM]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=e.posAtCoords(Uv(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new V0e(e,s,n,!!r)):(i=="doubleClick"?M0e:D0e)(e,s.pos,s.inside,n)?n.preventDefault():Ps(e,"pointer"))};class V0e{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[mM],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);i=u.parent,s=u.depth?u.before():0}const a=o?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Pe&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Gr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ps(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ni(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Uv(t))),this.updateAllowDefault(t),this.allowDefault||!n?Ps(this.view,"pointer"):N0e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Zn&&this.mightDrag&&!this.mightDrag.node.isAtom||An&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?($c(this.view,qe.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Ps(this.view,"pointer")}move(t){this.updateAllowDefault(t),Ps(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Qn.touchstart=e=>{e.input.lastTouch=Date.now(),d_(e),Ps(e,"pointer")};Qn.touchmove=e=>{e.input.lastTouch=Date.now(),Ps(e,"pointer")};Qn.contextmenu=e=>d_(e);function vM(e,t){return e.composing?!0:Zn&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const F0e=Ti?5e3:-1;er.compositionstart=er.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ze&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),pm(e,!0),e.markCursor=null;else if(pm(e,!t.selection.empty),Gr&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}bM(e,F0e)};er.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,bM(e,20))};function bM(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>pm(e),t))}function yM(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=H0e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function B0e(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Rye(t.focusNode,t.focusOffset),r=Aye(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function H0e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function pm(e,t=!1){if(!(Ti&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),yM(e),t||e.docView&&e.docView.dirty){let n=s_(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function z0e(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Ip=cr&&Hs<15||Jc&&Vye<604;Qn.copy=er.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=Ip?null:n.clipboardData,s=r.content(),{dom:a,text:l}=l_(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):z0e(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function U0e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function j0e(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Tp(e,r.value,null,o,t):Tp(e,r.textContent,r.innerHTML,o,t)},50)}function Tp(e,t,n,r,o){let i=uM(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||we.empty)))return!0;if(!i)return!1;let s=U0e(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function xM(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}er.paste=(e,t)=>{let n=t;if(e.composing&&!Ti)return;let r=Ip?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Tp(e,xM(r),r.getData("text/html"),o,n)?n.preventDefault():j0e(e,n)};class wM{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const G0e=Fr?"altKey":"ctrlKey";function _M(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n??!t[G0e]}Qn.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Uv(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Pe?o.to-1:o.to))){if(r&&r.mightDrag)s=Pe.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let p=e.docView.nearestDesc(n.target,!0);p&&p.node.type.spec.draggable&&p!=e.docView&&(s=Pe.create(e.state.doc,p.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:c,slice:u}=l_(e,a);(!n.dataTransfer.files.length||!An||K5>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ip?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ip||n.dataTransfer.setData("text/plain",c),e.dragging=new wM(u,_M(e,n),s)};Qn.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};er.dragover=er.dragenter=(e,t)=>t.preventDefault();er.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Uv(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",g=>{s=g(s,e,!1)}):s=uM(e,xM(n.dataTransfer),Ip?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&_M(e,n));if(e.someProp("handleDrop",g=>g(e,n,s||we.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?yye(e.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let c=e.state.tr;if(a){let{node:g}=r;g?g.replace(c):c.deleteSelection()}let u=c.mapping.map(l),p=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=c.doc;if(p?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(p&&Pe.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Pe(f));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,w,E)=>g=E),c.setSelection(a_(e,f,c.doc.resolve(g)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Qn.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ni(e)},20))};Qn.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Qn.beforeinput=(e,t)=>{if(An&&Ti&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Ma(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in er)Qn[e]=er[e];function Sp(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class fm{constructor(t,n){this.toDOM=t,this.spec=n||Ja,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new oo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof fm&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Sp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Us{constructor(t,n){this.attrs=t,this.spec=n||Ja}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new oo(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==Pn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Ja)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let c=l+r,u;if(u=CM(n,a,c)){for(o||(o=this.children.slice());ia&&p.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&l.type instanceof Us){let c=Math.max(i,l.from)-i,u=Math.min(s,l.to)-i;co.map(t,n,Ja));return Os.from(r)}forChild(t,n){if(n.isLeaf)return cn.empty;let r=[];for(let o=0;on instanceof cn)?t:t.reduce((n,r)=>n.concat(r instanceof cn?r:r.members),[]))}}forEachSet(t){for(let n=0;n{let b=m-g-(f-h);for(let w=0;wE+u-p)continue;let k=a[w]+u-p;f>=k?a[w+1]=h<=k?-2:-1:h>=u&&b&&(a[w]+=b,a[w+1]+=b)}p+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let h=n.map(e[c+1]+i,-1),f=h-o,{index:g,offset:m}=r.content.findIndex(p),b=r.maybeChild(g);if(b&&m==p&&m+b.nodeSize==f){let w=a[c+2].mapInner(n,b,u+1,e[c]+i+1,s);w!=Pn?(a[c]=p,a[c+1]=f,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=q0e(a,e,t,n,o,i,s),u=hm(c,r,0,s);t=u.local;for(let p=0;pn&&s.to{let c=CM(e,a,l+n);if(c){i=!0;let u=hm(c,a,n+l+1,r);u!=Pn&&o.push(l,l+a.nodeSize,u)}});let s=kM(i?EM(e):e,-n).sort(Za);for(let a=0;a0;)t++;e.splice(t,0,n)}function hy(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Pn&&t.push(r)}),e.cursorWrapper&&t.push(cn.create(e.state.doc,[e.cursorWrapper.deco])),Os.from(t)}const K0e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Y0e=cr&&Hs<=11;class X0e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class J0e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new X0e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),Y0e&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,K0e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(PI(this.view)){if(this.suppressingSelectionUpdates)return Ni(this.view);if(cr&&Hs<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&cl(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=Xc(i))n.add(i);for(let i=t.anchorNode;i;i=Xc(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&PI(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;up.nodeName=="BR");if(u.length==2){let[p,h]=u;p.parentNode&&p.parentNode.parentNode==h.parentNode?h.remove():p.remove()}else{let{focusNode:p}=this.currentSelection;for(let h of u){let f=h.parentNode;f&&f.nodeName=="LI"&&(!p||e1e(t,p)!=f)&&h.remove()}}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),Z0e(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Ni(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;uo;b--){let w=r.childNodes[b-1],E=w.pmViewDesc;if(w.nodeName=="BR"&&!E){i=b;break}if(!E||E.size)break}let p=e.state.doc,h=e.someProp("domParser")||Hd.fromSchema(e.state.schema),f=p.resolve(s),g=null,m=h.parse(r,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:i,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:n1e,context:f});if(c&&c[0].pos!=null){let b=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=b),g={anchor:b+s,head:w+s}}return{doc:m,sel:g,from:s,to:a}}function n1e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Zn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Zn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const r1e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function o1e(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let N=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,C=s_(e,N);if(C&&!e.state.selection.eq(C)){if(An&&Ti&&e.input.lastKeyCode===13&&Date.now()-100I(e,Ma(13,"Enter"))))return;let x=e.state.tr.setSelection(C);N=="pointer"?x.setMeta("pointer",!0):N=="key"&&x.scrollIntoView(),i&&x.setMeta("composition",i),e.dispatch(x)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,c=t1e(e,t,n),u=e.state.doc,p=u.slice(c.from,c.to),h,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ti)&&o.some(N=>N.nodeType==1&&!r1e.test(N.nodeName))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",N=>N(e,Ma(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof ze&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let N=zI(e,e.state.doc,c.sel);if(N&&!N.eq(e.state.selection)){let C=e.state.tr.setSelection(N);i&&C.setMeta("composition",i),e.dispatch(C)}}return}e.state.selection.frome.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?g.start=e.state.selection.from:g.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),cr&&Hs<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)=="  "&&(g.start--,g.endA--,g.endB--);let m=c.doc.resolveNoCache(g.start-c.from),b=c.doc.resolveNoCache(g.endB-c.from),w=u.resolve(g.start),E=m.sameParent(b)&&m.parent.inlineContent&&w.end()>=g.endA;if((Jc&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some(N=>N.nodeName=="DIV"||N.nodeName=="P"))||!E&&m.posN(e,Ma(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>g.start&&s1e(u,g.start,g.endA,m,b)&&e.someProp("handleKeyDown",N=>N(e,Ma(8,"Backspace")))){Ti&&An&&e.domObserver.suppressSelectionUpdates();return}An&&g.endB==g.start&&(e.input.lastChromeDelete=Date.now()),Ti&&!E&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,b=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(N){return N(e,Ma(13,"Enter"))})},20));let k=g.start,v=g.endA,_=N=>{let C=N||e.state.tr.replace(k,v,c.doc.slice(g.start-c.from,g.endB-c.from));if(c.sel){let x=zI(e,C.doc,c.sel);x&&!(An&&e.composing&&x.empty&&(g.start!=g.endB||e.input.lastChromeDeleteNi(e),20));let N=_(e.state.tr.delete(k,v)),C=u.resolve(g.start).marksAcross(u.resolve(g.endA));C&&N.ensureMarks(C),e.dispatch(N)}else if(g.endA==g.endB&&(T=i1e(m.parent.content.cut(m.parentOffset,b.parentOffset),w.parent.content.cut(w.parentOffset,g.endA-w.start())))){let N=_(e.state.tr);T.type=="add"?N.addMark(k,v,T.mark):N.removeMark(k,v,T.mark),e.dispatch(N)}else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let N=m.parent.textBetween(m.parentOffset,b.parentOffset),C=()=>_(e.state.tr.insertText(N,k,v));e.someProp("handleTextInput",x=>x(e,k,v,N,C))||e.dispatch(C())}}else e.dispatch(_())}function zI(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:a_(e,t.resolve(n.anchor),t.resolve(n.head))}function i1e(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;un||gy(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function a1e(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s=s?i-r:0;i-=l,i&&i=a?i-r:0;i-=l,i&&i=56320&&t<=57343&&n>=55296&&n<=56319}class OM{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new O0e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(KI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=WI(this),GI(this),this.nodeViews=qI(this),this.docView=CI(this.state.doc,jI(this),hy(this),this.dom,this),this.domObserver=new J0e(this,(r,o,i,s)=>o1e(this,r,o,i,s)),this.domObserver.start(),I0e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&P1(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(KI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,s=!1;t.storedMarks&&this.composing&&(yM(this),s=!0),this.state=t;let a=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=qI(this);c1e(f,this.nodeViews)&&(this.nodeViews=f,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&P1(this),this.editable=WI(this),GI(this);let l=hy(this),c=jI(this),u=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",p=i||!this.docView.matchesNode(t.doc,c,l);(p||!t.selection.eq(o.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Hye(this);if(s){this.domObserver.stop();let f=p&&(cr||An)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&l1e(o.selection,t.selection);if(p){let g=An?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=B0e(this)),(i||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=CI(t.doc,c,l,this.dom,this)),g&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&d0e(this))?Ni(this,f):(aM(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&zye(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Pe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&bI(this,n.getBoundingClientRect(),t)}else bI(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new wM(t.slice,t.move,o<0?void 0:Pe.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;sn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return Kye(this,t)}coordsAtPos(t,n=1){return Q5(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return Qye(this,n||this.state,t)}pasteHTML(t,n){return Tp(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Tp(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return l_(this,t)}destroy(){this.docView&&(T0e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],hy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Pye())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return P0e(this,t)}domSelectionRange(){let t=this.domSelection();return t?Zn&&this.root.nodeType===11&&Mye(this.dom.ownerDocument)==this.dom&&Q0e(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}OM.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function jI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[oo.node(0,e.state.doc.content.size,t)]}function GI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:oo.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function WI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function l1e(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function qI(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function c1e(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function KI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ta={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},gm={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},u1e=typeof navigator<"u"&&/Mac/.test(navigator.platform),d1e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var yn=0;yn<10;yn++)ta[48+yn]=ta[96+yn]=String(yn);for(var yn=1;yn<=24;yn++)ta[yn+111]="F"+yn;for(var yn=65;yn<=90;yn++)ta[yn]=String.fromCharCode(yn+32),gm[yn]=String.fromCharCode(yn);for(var my in ta)gm.hasOwnProperty(my)||(gm[my]=ta[my]);function p1e(e){var t=u1e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||d1e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?gm:ta)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const f1e=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),h1e=typeof navigator<"u"&&/Win/.test(navigator.platform);function g1e(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;ae.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function IM(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const TM=(e,t,n)=>{let r=IM(e,n);if(!r)return!1;let o=g_(r);if(!o){let s=r.blockRange(),a=s&&_u(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(LM(e,o,t,-1))return!0;if(r.parent.content.size==0&&(Zc(i,"end")||Pe.isSelectable(i)))for(let s=r.depth;;s--){let a=Fv(e.doc,r.before(s),r.after(s),we.empty);if(a&&a.slice.size1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},y1e=(e,t,n)=>{let r=IM(e,n);if(!r)return!1;let o=g_(r);return o?SM(e,o,t):!1},x1e=(e,t,n)=>{let r=$M(e,n);if(!r)return!1;let o=m_(r);return o?SM(e,o,t):!1};function SM(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Fv(e.doc,i,l,we.empty);if(!c||c.from!=i||c instanceof un&&c.slice.size>=l-i)return!1;if(n){let u=e.tr.step(c);u.setSelection(ze.create(u.doc,i)),n(u.scrollIntoView())}return!0}function Zc(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const PM=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=g_(r)}let s=i&&i.nodeBefore;return!s||!Pe.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Pe.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function g_(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function $M(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=$M(e,n);if(!r)return!1;let o=m_(r);if(!o)return!1;let i=o.nodeAfter;if(LM(e,o,t,1))return!0;if(r.parent.content.size==0&&(Zc(i,"start")||Pe.isSelectable(i))){let s=Fv(e.doc,r.before(),r.after(),we.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof Pe,o;if(r){if(n.node.isTextblock||!ga(e.doc,n.from))return!1;o=n.from}else if(o=Vv(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Pe.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},_1e=(e,t)=>{let n=e.selection,r;if(n instanceof Pe){if(n.node.isTextblock||!ga(e.doc,n.to))return!1;r=n.to}else if(r=Vv(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},k1e=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&_u(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},NM=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function v_(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=v_(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(qe.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},MM=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Or||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=v_(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Ai(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&_u(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function E1e(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof Pe&&t.selection.node.isBlock)return!r.parentOffset||!Ai(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,a,l=!1,c=!1;for(let f=r.depth;;f--)if(r.node(f).isBlock){l=r.end(f)==r.pos+(r.depth-f),c=r.start(f)==r.pos-(r.depth-f),a=v_(r.node(f-1).contentMatchAt(r.indexAfter(f-1))),i.unshift(l&&a?{type:a}:null),s=f;break}else{if(f==1)return!1;i.unshift(null)}let u=t.tr;(t.selection instanceof ze||t.selection instanceof Or)&&u.deleteSelection();let p=u.mapping.map(r.pos),h=Ai(u.doc,p,i.length,i);if(h||(i[0]=a?{type:a}:null,h=Ai(u.doc,p,i.length,i)),!h)return!1;if(u.split(p,i.length,i),!l&&c&&r.node(s).type!=a){let f=u.mapping.map(r.before(s)),g=u.doc.resolve(f);a&&r.node(s-1).canReplaceWith(g.index(),g.index()+1,a)&&u.setNodeMarkup(u.mapping.map(r.before(s)),a)}return n&&n(u.scrollIntoView()),!0}}const O1e=E1e(),I1e=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(Pe.create(e.doc,o))),!0)};function T1e(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||ga(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function LM(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&T1e(e,t,n))return!0;let c=!l&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let f=t.pos+i.nodeSize,g=ie.empty;for(let w=s.length-1;w>=0;w--)g=ie.from(s[w].create(null,g));g=ie.from(o.copy(g));let m=e.tr.step(new fn(t.pos-1,f,t.pos,f,new we(g,1,0),s.length,!0)),b=m.doc.resolve(f+2*s.length);b.nodeAfter&&b.nodeAfter.type==o.type&&ga(m.doc,b.pos)&&m.join(b.pos),n(m.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:qe.findFrom(t,1),p=u&&u.$from.blockRange(u.$to),h=p&&_u(p);if(h!=null&&h>=t.depth)return n&&n(e.tr.lift(p,h).scrollIntoView()),!0;if(c&&Zc(i,"start",!0)&&Zc(o,"end")){let f=o,g=[];for(;g.push(f),!f.isTextblock;)f=f.lastChild;let m=i,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let w=ie.empty;for(let k=g.length-1;k>=0;k--)w=ie.from(g[k].copy(w));let E=e.tr.step(new fn(t.pos-g.length,t.pos+i.nodeSize,t.pos+b,t.pos+i.nodeSize-b,new we(w,g.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function VM(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(ze.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const S1e=VM(-1),P1e=VM(1);function $1e(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&r_(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function YI(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let u=n.doc.resolve(c),p=u.index();o=u.parent.canReplaceWith(p,p+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);i=new am(l,l,t.depth),t.endIndex=0;u--)i=ie.from(n[u].type.create(n[u].attrs,i));e.step(new fn(t.start-(r?2:0),t.end,t.start,t.end,new we(i,0,0),n.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?D1e(t,n,e,i):L1e(t,n,i):!0:!1}}function D1e(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);im;g--)f-=o.child(g).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ie.empty:ie.from(o))))return!1;let p=i.pos,h=p+s.nodeSize;return r.step(new fn(p-(a?1:0),h+(l?1:0),p+1,h-1,new we((a?ie.empty:ie.from(o.copy(ie.empty))).append(l?ie.empty:ie.from(o.copy(ie.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function V1e(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=ie.from(c?e.create():null),p=new we(ie.from(e.create(null,ie.from(a.type.create(null,u)))),c?3:1,0),h=i.start,f=i.end;n(t.tr.step(new fn(h-(c?3:1),f,h,f,p,1,!0)).scrollIntoView())}return!0}}var F1e=Object.defineProperty,FM=(e,t)=>{for(var n in t)F1e(e,n,{get:t[n],enumerable:!0})};function jv(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var Gv=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,(...c)=>{const u=a(...c)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,c=()=>(!a&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),s.every(p=>p===!0)),u={...Object.fromEntries(Object.entries(n).map(([p,h])=>[p,(...g)=>{const m=this.buildProps(l,t),b=h(...g)(m);return s.push(b),u}])),run:c};return u}createCan(e){const{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>l(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:e,editor:r,view:i,state:jv({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(s)]))}};return s}},B1e=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}};function H1e(e,t){const n=new j5(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}var BM=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&BM(r)}return e};function uh(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const t=`${e}`,n=new window.DOMParser().parseFromString(t,"text/html").body;return BM(n)}function Pp(e,t,n){if(e instanceof Bs||e instanceof ie)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return ie.fromArray(e.map(a=>t.nodeFromJSON(a)));const s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),Pp("",t,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const l=new S5({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Hd.fromSchema(l).parseSlice(uh(e),n.parseOptions):Hd.fromSchema(l).parse(uh(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=Hd.fromSchema(t);return n.slice?i.parseSlice(uh(e),n.parseOptions).content:i.parse(uh(e),n.parseOptions)}return Pp("",t,n)}function $1(e,t,n={},r={}){return Pp(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function z1e(e){for(let t=0;t0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Wv(e){return t=>U1e(t.$from,e)}function Oe(e,t,n){return e.config[t]===void 0&&e.parent?Oe(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Oe(e.parent,t,n):null}):e.config[t]}function y_(e){return e.map(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=Oe(t,"addExtensions",n);return r?[t,...y_(r())]:t}).flat(10)}function x_(e,t){const n=Cl.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function HM(e){return typeof e=="function"}function gt(e,t=void 0,...n){return HM(e)?t?e.bind(t)(...n):e(...n):e}function j1e(e={}){return Object.keys(e).length===0&&e.constructor===Object}function $p(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function zM(e){const t=[],{nodeExtensions:n,markExtensions:r}=$p(e),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=Oe(s,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(p=>{Object.entries(u.attributes).forEach(([h,f])=>{t.push({type:p,name:h,attribute:{...i,...f}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=Oe(s,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,p])=>{const h={...i,...p};typeof h?.default=="function"&&(h.default=h.default()),h?.isRequired&&h?.default===void 0&&delete h.default,t.push({type:s.name,name:u,attribute:h})})}),t}function Kr(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],c=a.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else if(o==="style"){const a=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[p,h]=u.split(":").map(f=>f.trim());c.set(p,h)}),a.forEach(u=>{const[p,h]=u.split(":").map(f=>f.trim());c.set(p,h)}),r[o]=Array.from(c.entries()).map(([u,p])=>`${u}: ${p}`).join("; ")}else r[o]=i}),r},{})}function mm(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Kr(n,r),{})}function G1e(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function XI(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):G1e(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function JI(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&j1e(n)?!1:n!=null))}function W1e(e,t){var n;const r=zM(e),{nodeExtensions:o,markExtensions:i}=$p(e),s=(n=o.find(c=>Oe(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(o.map(c=>{const u=r.filter(w=>w.type===c.name),p={name:c.name,options:c.options,storage:c.storage,editor:t},h=e.reduce((w,E)=>{const k=Oe(E,"extendNodeSchema",p);return{...w,...k?k(c):{}}},{}),f=JI({...h,content:gt(Oe(c,"content",p)),marks:gt(Oe(c,"marks",p)),group:gt(Oe(c,"group",p)),inline:gt(Oe(c,"inline",p)),atom:gt(Oe(c,"atom",p)),selectable:gt(Oe(c,"selectable",p)),draggable:gt(Oe(c,"draggable",p)),code:gt(Oe(c,"code",p)),whitespace:gt(Oe(c,"whitespace",p)),linebreakReplacement:gt(Oe(c,"linebreakReplacement",p)),defining:gt(Oe(c,"defining",p)),isolating:gt(Oe(c,"isolating",p)),attrs:Object.fromEntries(u.map(w=>{var E,k;return[w.name,{default:(E=w?.attribute)==null?void 0:E.default,validate:(k=w?.attribute)==null?void 0:k.validate}]}))}),g=gt(Oe(c,"parseHTML",p));g&&(f.parseDOM=g.map(w=>XI(w,u)));const m=Oe(c,"renderHTML",p);m&&(f.toDOM=w=>m({node:w,HTMLAttributes:mm(w,u)}));const b=Oe(c,"renderText",p);return b&&(f.toText=b),[c.name,f]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(b=>b.type===c.name),p={name:c.name,options:c.options,storage:c.storage,editor:t},h=e.reduce((b,w)=>{const E=Oe(w,"extendMarkSchema",p);return{...b,...E?E(c):{}}},{}),f=JI({...h,inclusive:gt(Oe(c,"inclusive",p)),excludes:gt(Oe(c,"excludes",p)),group:gt(Oe(c,"group",p)),spanning:gt(Oe(c,"spanning",p)),code:gt(Oe(c,"code",p)),attrs:Object.fromEntries(u.map(b=>{var w,E;return[b.name,{default:(w=b?.attribute)==null?void 0:w.default,validate:(E=b?.attribute)==null?void 0:E.validate}]}))}),g=gt(Oe(c,"parseHTML",p));g&&(f.parseDOM=g.map(b=>XI(b,u)));const m=Oe(c,"renderHTML",p);return m&&(f.toDOM=b=>m({mark:b,HTMLAttributes:mm(b,u)})),[c.name,f]}));return new S5({topNode:s,nodes:a,marks:l})}function q1e(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function w_(e){return e.sort((n,r)=>{const o=Oe(n,"priority")||100,i=Oe(r,"priority")||100;return o>i?-1:or.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}function jM(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` - -`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,o,(l,c,u,p)=>{var h;l.isBlock&&c>r&&(a+=i);const f=s?.[l.type.name];if(f)return u&&(a+=f({node:l,pos:c,parent:u,index:p,range:t})),!1;l.isText&&(a+=(h=l?.text)==null?void 0:h.slice(Math.max(r,c)-c,o-c))}),a}function K1e(e,t){const n={from:0,to:e.content.size};return jM(e,n,t)}function GM(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function ns(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function WM(e,t){const n=ns(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function Zt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Y1e(e,t){const n=Zt(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function qv(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function X1e(e,t){const n=qv(typeof t=="string"?t:t.name,e.schema);return n==="node"?Y1e(e,t):n==="mark"?WM(e,t):{}}function J1e(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Z1e(e){const t=J1e(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Q1e(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(i).map(a,-1),u=t.slice(i).map(l),p=t.invert().map(c,-1),h=t.invert().map(u);r.push({oldRange:{from:p,to:h},newRange:{from:c,to:u}})})}),Z1e(r)}function __(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function vm(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:__(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function qM(e,t,n={}){return e.find(r=>r.type===t&&vm(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function ZI(e,t,n={}){return!!qM(e,t,n)}function k_(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===t)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!qM([...o.node.marks],t,n)))return;let s=o.index,a=e.start()+o.offset,l=s+1,c=a+o.node.nodeSize;for(;s>0&&ZI([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l{const i=n.resolve(e),s=k_(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var exe=(e,t,n,r=20)=>{const o=e.doc.resolve(n);let i=r,s=null;for(;i>0&&s===null;){const a=o.node(i);a?.type.name===t?s=a:i-=1}return[s,i]};function by(e,t){return t.nodes[e]||t.marks[e]||null}function qh(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var txe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var l,c;const u=((c=(l=o.type.spec).toText)==null?void 0:c.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function R1(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?ns(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>vm(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:h})=>{const f=p.pos,g=h.pos;e.doc.nodesBetween(f,g,(m,b)=>{if(!m.isText&&!m.marks.length)return;const w=Math.max(f,b),E=Math.min(g,b+m.nodeSize),k=E-w;s+=k,a.push(...m.marks.map(v=>({mark:v,from:w,to:E})))})}),s===0)return!1;const l=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>vm(p.mark.attrs,n,{strict:!1})).reduce((p,h)=>p+h.to-h.from,0),c=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,h)=>p+h.to-h.from,0);return(l>0?l+c:l)>=s}function na(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Zt(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,h)=>{if(p.isText)return;const f=Math.max(r,h),g=Math.min(o,h+p.nodeSize);a.push({node:p,from:f,to:g})});const l=o-r,c=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>vm(p.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((p,h)=>p+h.to-h.from,0)>=l}function nxe(e,t,n={}){if(!t)return na(e,null,n)||R1(e,null,n);const r=qv(t,e.schema);return r==="node"?na(e,t,n):r==="mark"?R1(e,t,n):!1}var rxe=(e,t)=>{const{$from:n,$to:r,$anchor:o}=e.selection;if(t){const i=Wv(a=>a.type.name===t)(e.selection);if(!i)return!1;const s=e.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset{const{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function QI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function eT(e,t){const{nodeExtensions:n}=$p(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=gt(Oe(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function C_(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(C_(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function YM(e){return e instanceof ze}function Ua(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function XM(e,t=null){if(!t)return null;const n=qe.atStart(e),r=qe.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const o=n.from,i=r.to;return t==="all"?ze.create(e,Ua(0,o,i),Ua(e.content.size,o,i)):ze.create(e,Ua(t,o,i),Ua(t,o,i))}function ixe(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=u)}),e.setSelection(qe.near(e.doc.resolve(s),n))}var E_=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},sxe=(e,t)=>{if(__(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function dh(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(t=c.nodeBefore||c.nodeAfter)!=null&&t.marks.find(h=>h.type.spec.code))return!1;let u=!1;const p=txe(c)+i;return s.forEach(h=>{if(u)return;const f=sxe(p,h.find);if(!f)return;const g=l.state.tr,m=jv({state:l.state,transaction:g}),b={from:r-(f[0].length-i.length),to:o},{commands:w,chain:E,can:k}=new Gv({editor:n,state:m});h.handler({state:m,range:b,match:f,commands:w,chain:E,can:k})===null||!g.steps.length||(h.undoable&&g.setMeta(a,{transform:g,from:r,to:o,text:i}),l.dispatch(g),u=!0)}),u}function axe(e){const{editor:t,rules:n}=e,r=new pi({state:{init(){return null},apply(o,i,s){const a=o.getMeta(r);if(a)return a;const l=o.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=x_(ie.from(u),s.schema);const{from:p}=l,h=p+u.length;dh({editor:t,from:p,to:h,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return dh({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&dh({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?dh({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function lxe(e){return Object.prototype.toString.call(e).slice(8,-1)}function ph(e){return lxe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function JM(e,t){const n={...e};return ph(e)&&ph(t)&&Object.keys(t).forEach(r=>{ph(t[r])&&ph(e[r])?n[r]=JM(e[r],t[r]):n[r]=t[r]}),n}var O_=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...gt(Oe(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...gt(Oe(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>JM(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},Kv=class ZM extends O_{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n=typeof t=="function"?t():t;return new ZM(n)}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(c=>c?.type.name===n.name))return!1;const l=s.find(c=>c?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function cxe(e){return typeof e=="number"}var uxe=class{constructor(e){this.find=e.find,this.handler=e.handler}},dxe=(e,t,n)=>{if(__(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function pxe(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:u}=new Gv({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(f,g)=>{var m,b,w,E,k;if((b=(m=f.type)==null?void 0:m.spec)!=null&&b.code||!(f.isText||f.isTextblock||f.isInline))return;const v=(k=(E=(w=f.content)==null?void 0:w.size)!=null?E:f.nodeSize)!=null?k:0,_=Math.max(r,g),T=Math.min(o,g+v);if(_>=T)return;const N=f.isText?f.text||"":f.textBetween(_-g,T-g,void 0,"");dxe(N,i.find,s).forEach(x=>{if(x.index===void 0)return;const I=_+x.index+1,R=I+x[0].length,M={from:n.tr.mapping.map(I),to:n.tr.mapping.map(R)},B=i.handler({state:n,range:M,match:x,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});p.push(B)})}),p.every(f=>f!==null)}var fh=null,fxe=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function hxe(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:u,from:p,to:h,rule:f,pasteEvt:g})=>{const m=u.tr,b=jv({state:u,transaction:m});if(!(!pxe({editor:t,state:b,from:Math.max(p-1,0),to:h.b-1,rule:f,pasteEvent:g,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(u=>new pi({view(p){const h=g=>{var m;r=(m=p.dom.parentElement)!=null&&m.contains(g.target)?p.dom.parentElement:null,r&&(fh=t)},f=()=>{fh&&(fh=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(p,h)=>{if(i=r===p.dom.parentElement,a=h,!i){const f=fh;f?.isEditable&&setTimeout(()=>{const g=f.state.selection;g&&f.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(p,h)=>{var f;const g=(f=h.clipboardData)==null?void 0:f.getData("text/html");return s=h,o=!!g?.includes("data-pm-slice"),!1}}},appendTransaction:(p,h,f)=>{const g=p[0],m=g.getMeta("uiEvent")==="paste"&&!o,b=g.getMeta("uiEvent")==="drop"&&!i,w=g.getMeta("applyPasteRules"),E=!!w;if(!m&&!b&&!E)return;if(E){let{text:_}=w;typeof _=="string"?_=_:_=x_(ie.from(_),f.schema);const{from:T}=w,N=T+_.length,C=fxe(_);return l({rule:u,state:f,from:T,to:{b:N},pasteEvt:C})}const k=h.doc.content.findDiffStart(f.doc.content),v=h.doc.content.findDiffEnd(f.doc.content);if(!(!cxe(k)||!v||k===v.b))return l({rule:u,state:f,from:k,to:v,pasteEvt:s})}}))}var Yv=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=UM(e),this.schema=W1e(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:by(t.name,this.schema)},r=Oe(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this;return w_([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:by(r.name,this.schema)},i=[],s=Oe(r,"addKeyboardShortcuts",o);let a={};if(r.type==="mark"&&Oe(r,"exitable",o)&&(a.ArrowRight=()=>Kv.handleExit({editor:e,mark:r})),s){const h=Object.fromEntries(Object.entries(s()).map(([f,g])=>[f,()=>g({editor:e})]));a={...a,...h}}const l=v1e(a);i.push(l);const c=Oe(r,"addInputRules",o);if(QI(r,e.options.enableInputRules)&&c){const h=c();if(h&&h.length){const f=axe({editor:e,rules:h}),g=Array.isArray(f)?f:[f];i.push(...g)}}const u=Oe(r,"addPasteRules",o);if(QI(r,e.options.enablePasteRules)&&u){const h=u();if(h&&h.length){const f=hxe({editor:e,rules:h});i.push(...f)}}const p=Oe(r,"addProseMirrorPlugins",o);if(p){const h=p();i.push(...h)}return i})}get attributes(){return zM(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=$p(this.extensions);return Object.fromEntries(t.filter(n=>!!Oe(n,"addNodeView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Zt(n.name,this.schema)},i=Oe(n,"addNodeView",o);if(!i)return[];const s=(a,l,c,u,p)=>{const h=mm(a,r);return i()({node:a,view:l,getPos:c,decorations:u,innerDecorations:p,editor:e,extension:n,HTMLAttributes:h})};return[n.name,s]}))}get markViews(){const{editor:e}=this,{markExtensions:t}=$p(this.extensions);return Object.fromEntries(t.filter(n=>!!Oe(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ns(n.name,this.schema)},i=Oe(n,"addMarkView",o);if(!i)return[];const s=(a,l,c)=>{const u=mm(a,r);return i()({mark:a,view:l,inline:c,editor:e,extension:n,HTMLAttributes:u,updateAttributes:p=>{Swe(a,e,p)}})};return[n.name,s]}))}setupExtensions(){const e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;const r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:by(t.name,this.schema)};t.type==="mark"&&((n=gt(Oe(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);const o=Oe(t,"onBeforeCreate",r),i=Oe(t,"onCreate",r),s=Oe(t,"onUpdate",r),a=Oe(t,"onSelectionUpdate",r),l=Oe(t,"onTransaction",r),c=Oe(t,"onFocus",r),u=Oe(t,"onBlur",r),p=Oe(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),p&&this.editor.on("destroy",p)})}};Yv.resolve=UM;Yv.sort=w_;Yv.flatten=y_;var gxe={};FM(gxe,{ClipboardTextSerializer:()=>eD,Commands:()=>rD,Delete:()=>oD,Drop:()=>iD,Editable:()=>sD,FocusEvents:()=>lD,Keymap:()=>cD,Paste:()=>uD,Tabindex:()=>dD,focusEventsPluginKey:()=>aD});var Po=class QM extends O_{constructor(){super(...arguments),this.type="extension"}static create(t={}){const n=typeof t=="function"?t():t;return new QM(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},eD=Po.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new pi({key:new El("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),a=Math.max(...i.map(u=>u.$to.pos)),l=GM(n);return jM(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),tD={};FM(tD,{blur:()=>mxe,clearContent:()=>vxe,clearNodes:()=>bxe,command:()=>yxe,createParagraphNear:()=>xxe,cut:()=>wxe,deleteCurrentNode:()=>_xe,deleteNode:()=>kxe,deleteRange:()=>Cxe,deleteSelection:()=>Exe,enter:()=>Oxe,exitCode:()=>Ixe,extendMarkRange:()=>Txe,first:()=>Sxe,focus:()=>$xe,forEach:()=>Rxe,insertContent:()=>Axe,insertContentAt:()=>Mxe,joinBackward:()=>Vxe,joinDown:()=>Lxe,joinForward:()=>Fxe,joinItemBackward:()=>Bxe,joinItemForward:()=>Hxe,joinTextblockBackward:()=>zxe,joinTextblockForward:()=>Uxe,joinUp:()=>Dxe,keyboardShortcut:()=>Gxe,lift:()=>Wxe,liftEmptyBlock:()=>qxe,liftListItem:()=>Kxe,newlineInCode:()=>Yxe,resetAttributes:()=>Xxe,scrollIntoView:()=>Jxe,selectAll:()=>Zxe,selectNodeBackward:()=>Qxe,selectNodeForward:()=>ewe,selectParentNode:()=>twe,selectTextblockEnd:()=>nwe,selectTextblockStart:()=>rwe,setContent:()=>owe,setMark:()=>swe,setMeta:()=>awe,setNode:()=>lwe,setNodeSelection:()=>cwe,setTextSelection:()=>uwe,sinkListItem:()=>dwe,splitBlock:()=>pwe,splitListItem:()=>fwe,toggleList:()=>hwe,toggleMark:()=>gwe,toggleNode:()=>mwe,toggleWrap:()=>vwe,undoInputRule:()=>bwe,unsetAllMarks:()=>ywe,unsetMark:()=>xwe,updateAttributes:()=>wwe,wrapIn:()=>_we,wrapInList:()=>kwe});var mxe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),vxe=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),bxe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,p=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),f=p.blockRange(h);if(!f)return;const g=_u(f);if(a.type.isTextblock){const{defaultType:m}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(f.start,m)}(g||g===0)&&t.lift(f,g)})}),!0},yxe=e=>t=>e(t),xxe=()=>({state:e,dispatch:t})=>MM(e,t),wxe=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new ze(r.doc.resolve(Math.max(s-1,0)))),!0},_xe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const a=o.before(i),l=o.after(i);e.delete(a,l).scrollIntoView()}return!0}return!1},kxe=e=>({tr:t,state:n,dispatch:r})=>{const o=Zt(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const l=i.before(s),c=i.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},Cxe=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Exe=()=>({state:e,dispatch:t})=>h_(e,t),Oxe=()=>({commands:e})=>e.keyboardShortcut("Enter"),Ixe=()=>({state:e,dispatch:t})=>C1e(e,t),Txe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=ns(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(o){const p=k_(l,i,t);if(p&&p.from<=c&&p.to>=u){const h=ze.create(s,p.from,p.to);n.setSelection(h)}}return!0},Sxe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{(I_()||Pxe())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!YM(n.state.selection))return s(),!0;const a=XM(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},Rxe=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),Axe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),Nxe=e=>!("type"in e),Mxe=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=b=>{i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Pp(t,i.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=Pp(t,i.schema,{parseOptions:c,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(b){return l(b),!1}let{from:u,to:p}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},h=!0,f=!0;if((Nxe(a)?a:[a]).forEach(b=>{b.check(),h=h?b.isText&&b.marks.length===0:!1,f=f?b.isBlock:!1}),u===p&&f){const{parent:b}=r.doc.resolve(u);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(u-=1,p+=1)}let m;if(h){if(Array.isArray(t))m=t.map(b=>b.text||"").join("");else if(t instanceof ie){let b="";t.forEach(w=>{w.text&&(b+=w.text)}),m=b}else typeof t=="object"&&t&&t.text?m=t.text:m=t;r.insertText(m,u,p)}else{m=a;const b=r.doc.resolve(u),w=b.node(),E=b.parentOffset===0,k=w.isText||w.isTextblock,v=w.content.size>0;E&&k&&v&&(u=Math.max(0,u-1)),r.replaceWith(u,p,m)}n.updateSelection&&ixe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0},Dxe=()=>({state:e,dispatch:t})=>w1e(e,t),Lxe=()=>({state:e,dispatch:t})=>_1e(e,t),Vxe=()=>({state:e,dispatch:t})=>TM(e,t),Fxe=()=>({state:e,dispatch:t})=>RM(e,t),Bxe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Vv(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Hxe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Vv(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},zxe=()=>({state:e,dispatch:t})=>y1e(e,t),Uxe=()=>({state:e,dispatch:t})=>x1e(e,t);function nD(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function jxe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{const i=jxe(e).split(/-(?!$)/),s=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l?.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0},Wxe=(e,t={})=>({state:n,dispatch:r})=>{const o=Zt(e,n.schema);return na(n,o,t)?k1e(n,r):!1},qxe=()=>({state:e,dispatch:t})=>DM(e,t),Kxe=e=>({state:t,dispatch:n})=>{const r=Zt(e,t.schema);return M1e(r)(t,n)},Yxe=()=>({state:e,dispatch:t})=>NM(e,t);function tT(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}var Xxe=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=qv(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Zt(e,r.schema)),a==="mark"&&(s=ns(e,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{i&&i===c.type&&n.setNodeMarkup(u,void 0,tT(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(p=>{s===p.type&&n.addMark(u,u+c.nodeSize,s.create(tT(p.attrs,t)))})})}),!0):!1},Jxe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Zxe=()=>({tr:e,dispatch:t})=>{if(t){const n=new Or(e.doc);e.setSelection(n)}return!0},Qxe=()=>({state:e,dispatch:t})=>PM(e,t),ewe=()=>({state:e,dispatch:t})=>AM(e,t),twe=()=>({state:e,dispatch:t})=>I1e(e,t),nwe=()=>({state:e,dispatch:t})=>P1e(e,t),rwe=()=>({state:e,dispatch:t})=>S1e(e,t),owe=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{const{doc:l}=i;if(r.preserveWhitespace!=="full"){const c=$1(e,o.schema,r,{errorOnInvalidContent:t??o.options.enableContentCheck});return s&&i.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??o.options.enableContentCheck})};function iwe(e,t,n){var r;const{selection:o}=t;let i=null;if(YM(o)&&(i=o.$cursor),i){const a=(r=e.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,p,h)=>{if(c)return!1;if(u.isInline){const f=!h||h.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=f&&g}return!c}),c})}var swe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=ns(e,r.schema);if(o)if(s){const c=WM(r,l);n.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,p=c.$to.pos;r.doc.nodesBetween(u,p,(h,f)=>{const g=Math.max(f,u),m=Math.min(f+h.nodeSize,p);h.marks.find(w=>w.type===l)?h.marks.forEach(w=>{l===w.type&&n.addMark(g,m,l.create({...w.attrs,...t}))}):n.addMark(g,m,l.create(t))})});return iwe(r,n,l)},awe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),lwe=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Zt(e,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>YI(i,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>YI(i,{...s,...t})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},cwe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=Ua(e,0,r.content.size),i=Pe.create(r,o);t.setSelection(i)}return!0},uwe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=ze.atStart(r).from,a=ze.atEnd(r).to,l=Ua(o,s,a),c=Ua(i,s,a),u=ze.create(r,l,c);t.setSelection(u)}return!0},dwe=e=>({state:t,dispatch:n})=>{const r=Zt(e,t.schema);return V1e(r)(t,n)};function nT(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}var pwe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:l}=i,c=o.extensionManager.attributes,u=qh(c,a.node().type.name,a.node().attrs);if(i instanceof Pe&&i.node.isBlock)return!a.parentOffset||!Ai(s,a.pos)?!1:(r&&(e&&nT(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const p=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:z1e(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=p&&h?[{type:h,attrs:u}]:void 0,g=Ai(t.doc,t.mapping.map(a.pos),1,f);if(!f&&!g&&Ai(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(g=!0,f=h?[{type:h,attrs:u}]:void 0),r){if(g&&(i instanceof ze&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,f),h&&!p&&!a.parentOffset&&a.parent.type!==h)){const m=t.mapping.map(a.before()),b=t.doc.resolve(m);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&nT(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return g},fwe=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=Zt(e,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const p=l.node(-1);if(p.type!==a)return!1;const h=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let w=ie.empty;const E=l.index(-1)?1:l.index(-2)?2:3;for(let C=l.depth-E;C>=l.depth-3;C-=1)w=ie.from(l.node(C).copy(w));const k=l.indexAfter(-1){if(N>-1)return!1;C.isTextblock&&C.content.size===0&&(N=x+1)}),N>-1&&n.setSelection(ze.near(n.doc.resolve(N))),n.scrollIntoView()}return!0}const f=c.pos===l.end()?p.contentMatchAt(0).defaultType:null,g={...qh(h,p.type.name,p.attrs),...t},m={...qh(h,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const b=f?[{type:a,attrs:g},{type:f,attrs:m}]:[{type:a,attrs:g}];if(!Ai(n.doc,l.pos,2))return!1;if(o){const{selection:w,storedMarks:E}=r,{splittableMarks:k}=i.extensionManager,v=E||w.$to.parentOffset&&w.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!v||!o)return!0;const _=v.filter(T=>k.includes(T.type.name));n.ensureMarks(_)}return!0},yy=(e,t)=>{const n=Wv(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&ga(e.doc,n.pos)&&e.join(n.pos),!0},xy=(e,t)=>{const n=Wv(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&ga(e.doc,r)&&e.join(r),!0},hwe=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:p,splittableMarks:h}=o.extensionManager,f=Zt(e,s.schema),g=Zt(t,s.schema),{selection:m,storedMarks:b}=s,{$from:w,$to:E}=m,k=w.blockRange(E),v=b||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;const _=Wv(T=>eT(T.type.name,p))(m);if(k.depth>=1&&_&&k.depth-_.depth<=1){if(_.node.type===f)return c.liftListItem(g);if(eT(_.node.type.name,p)&&f.validContent(_.node.content)&&a)return l().command(()=>(i.setNodeMarkup(_.pos,f),!0)).command(()=>yy(i,f)).command(()=>xy(i,f)).run()}return!n||!v||!a?l().command(()=>u().wrapInList(f,r)?!0:c.clearNodes()).wrapInList(f,r).command(()=>yy(i,f)).command(()=>xy(i,f)).run():l().command(()=>{const T=u().wrapInList(f,r),N=v.filter(C=>h.includes(C.type.name));return i.ensureMarks(N),T?!0:c.clearNodes()}).wrapInList(f,r).command(()=>yy(i,f)).command(()=>xy(i,f)).run()},gwe=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=ns(e,r.schema);return R1(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},mwe=(e,t,n={})=>({state:r,commands:o})=>{const i=Zt(e,r.schema),s=Zt(t,r.schema),a=na(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},vwe=(e,t={})=>({state:n,commands:r})=>{const o=Zt(e,n.schema);return na(n,o,t)?r.lift(o):r.wrapIn(o,t)},bwe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},ywe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},xwe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=ns(e,r.schema),{$from:c,empty:u,ranges:p}=a;if(!o)return!0;if(u&&s){let{from:h,to:f}=a;const g=(i=c.marks().find(b=>b.type===l))==null?void 0:i.attrs,m=k_(c,l,g);m&&(h=m.from,f=m.to),n.removeMark(h,f,l)}else p.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},wwe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=qv(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Zt(e,r.schema)),a==="mark"&&(s=ns(e,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let p,h,f,g;n.selection.empty?r.doc.nodesBetween(c,u,(m,b)=>{i&&i===m.type&&(f=Math.max(b,c),g=Math.min(b+m.nodeSize,u),p=b,h=m)}):r.doc.nodesBetween(c,u,(m,b)=>{b=c&&b<=u&&(i&&i===m.type&&n.setNodeMarkup(b,void 0,{...m.attrs,...t}),s&&m.marks.length&&m.marks.forEach(w=>{if(s===w.type){const E=Math.max(b,c),k=Math.min(b+m.nodeSize,u);n.addMark(E,k,s.create({...w.attrs,...t}))}}))}),h&&(p!==void 0&&n.setNodeMarkup(p,void 0,{...h.attrs,...t}),s&&h.marks.length&&h.marks.forEach(m=>{s===m.type&&n.addMark(f,g,s.create({...m.attrs,...t}))}))}),!0):!1},_we=(e,t={})=>({state:n,dispatch:r})=>{const o=Zt(e,n.schema);return $1e(o,t)(n,r)},kwe=(e,t={})=>({state:n,dispatch:r})=>{const o=Zt(e,n.schema);return R1e(o,t)(n,r)},rD=Po.create({name:"commands",addCommands(){return{...tD}}}),oD=Po.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,o;const i=()=>{var s,a,l,c;if((c=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,e))!=null?c:e.getMeta("y-sync$"))return;const u=H1e(e.before,[e,...t]);Q1e(u).forEach(f=>{u.mapping.mapResult(f.oldRange.from).deletedAfter&&u.mapping.mapResult(f.oldRange.to).deletedBefore&&u.before.nodesBetween(f.oldRange.from,f.oldRange.to,(g,m)=>{const b=m+g.nodeSize-2,w=f.oldRange.from<=m&&b<=f.oldRange.to;this.editor.emit("delete",{type:"node",node:g,from:m,to:b,newFrom:u.mapping.map(m),newTo:u.mapping.map(b),deletedRange:f.oldRange,newRange:f.newRange,partial:!w,editor:this.editor,transaction:e,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((f,g)=>{var m,b;if(f instanceof ro){const w=h.slice(g).map(f.from,-1),E=h.slice(g).map(f.to),k=h.invert().map(w,-1),v=h.invert().map(E),_=(m=u.doc.nodeAt(w-1))==null?void 0:m.marks.some(N=>N.eq(f.mark)),T=(b=u.doc.nodeAt(E))==null?void 0:b.marks.some(N=>N.eq(f.mark));this.editor.emit("delete",{type:"mark",mark:f.mark,from:f.from,to:f.to,deletedRange:{from:k,to:v},newRange:{from:w,to:E},partial:!!(T||_),editor:this.editor,transaction:e,combinedTransform:u})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),iD=Po.create({name:"drop",addProseMirrorPlugins(){return[new pi({key:new El("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),sD=Po.create({name:"editable",addProseMirrorPlugins(){return[new pi({key:new El("editable"),props:{editable:()=>this.editor.options.editable}})]}}),aD=new El("focusEvents"),lD=Po.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new pi({key:aD,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),cD=Po.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:p}=l,{pos:h,parent:f}=p,g=p.parent.isTextblock&&h>0?a.doc.resolve(h-1):p,m=g.parent.type.spec.isolating,b=p.pos-p.parentOffset,w=m&&g.parent.childCount===1?b===p.pos:qe.atStart(c).from===h;return!u||!f.type.isTextblock||f.textContent.length||!w||w&&p.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return I_()||nD()?i:o},addProseMirrorPlugins(){return[new pi({key:new El("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(m=>m.getMeta("composition")))return;const r=e.some(m=>m.docChanged)&&!t.doc.eq(n.doc),o=e.some(m=>m.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=t.selection,l=qe.atStart(t.doc).from,c=qe.atEnd(t.doc).to;if(i||!(s===l&&a===c)||!C_(n.doc))return;const h=n.tr,f=jv({state:n,transaction:h}),{commands:g}=new Gv({editor:this.editor,state:f});if(g.clearNodes(),!!h.steps.length)return h}})]}}),uD=Po.create({name:"paste",addProseMirrorPlugins(){return[new pi({key:new El("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),dD=Po.create({name:"tabindex",addProseMirrorPlugins(){return[new pi({key:new El("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Cwe=class sc{constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new sc(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new sc(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new sc(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;const l=new sc(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new sc(a,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let a=0;a{r&&o.length>0||(s.node.type.name===t&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(t,n,r))))}),o}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},Ewe=`.ProseMirror { - position: relative; -} - -.ProseMirror { - word-wrap: break-word; - white-space: pre-wrap; - white-space: break-spaces; - -webkit-font-variant-ligatures: none; - font-variant-ligatures: none; - font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ -} - -.ProseMirror [contenteditable="false"] { - white-space: normal; -} - -.ProseMirror [contenteditable="false"] [contenteditable="true"] { - white-space: pre-wrap; -} - -.ProseMirror pre { - white-space: pre-wrap; -} - -img.ProseMirror-separator { - display: inline !important; - border: none !important; - margin: 0 !important; - width: 0 !important; - height: 0 !important; -} - -.ProseMirror-gapcursor { - display: none; - pointer-events: none; - position: absolute; - margin: 0; -} - -.ProseMirror-gapcursor:after { - content: ""; - display: block; - position: absolute; - top: -2px; - width: 20px; - border-top: 1px solid black; - animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; -} - -@keyframes ProseMirror-cursor-blink { - to { - visibility: hidden; - } -} - -.ProseMirror-hideselection *::selection { - background: transparent; -} - -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - -.ProseMirror-hideselection * { - caret-color: transparent; -} - -.ProseMirror-focused .ProseMirror-gapcursor { - display: block; -}`;function Owe(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute("data-tiptap-style",""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}var Iwe=class extends B1e{constructor(t={}){super(),this.css=null,this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:o})=>{throw o},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:o,slice:i,moved:s})=>this.options.onDrop(o,i,s)),this.on("paste",({event:o,slice:i})=>this.options.onPaste(o,i)),this.on("delete",this.options.onDelete);const n=this.createDoc(),r=XM(n,this.options.autofocus);this.editorState=gc.create({doc:n,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Owe(Ewe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,n)=>{if(n==="state")return this.editorState;if(n in t)return Reflect.get(t,n);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${n}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,n){const r=HM(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;r=r.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var t,n;const o=[...this.options.enableCoreExtensions?[sD,eD.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:n.blockSeparator}),rD,lD,cD,dD,iD,uD,oD].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new Yv(o,this)}createCommandManager(){this.commandManager=new Gv({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=$1(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(n){if(!(n instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(n.message))throw n;this.emit("contentError",{editor:this,error:n,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),t=$1(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){var n;this.editorView=new OM(t,{...this.options.editorProps,attributes:{role:"textbox",...(n=this.options.editorProps)==null?void 0:n.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.prependClass(),this.injectCSS();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(u=>{var p;return(p=this.capturedTransaction)==null?void 0:p.step(u)});return}const{state:n,transactions:r}=this.state.applyTransaction(t),o=!this.state.selection.eq(n.selection),i=r.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),!i)return;this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:r.slice(1)}),o&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=r.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),l=a?.getMeta("focus"),c=a?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:a}),c&&this.emit("blur",{editor:this,event:c.event,transaction:a}),!(t.getMeta("preventUpdate")||!r.some(u=>u.docChanged)||s.doc.eq(n.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:r.slice(1)})}getAttributes(t){return X1e(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return nxe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return x_(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` - -`,textSerializers:r={}}=t||{};return K1e(this.state.doc,{blockSeparator:n,textSerializers:{...GM(this.schema),...r}})}get isEmpty(){return C_(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,n;return(n=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?n:!0}$node(t,n){var r;return((r=this.$doc)==null?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Cwe(n,this)}get $doc(){return this.$pos(0)}};function bm(e){return new E_({find:e.find,handler:({state:t,range:n,match:r})=>{const o=gt(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(KM(n.from,n.to,t.doc).filter(f=>f.mark.type.excluded.find(m=>m===e.type&&m!==f.mark.type)).filter(f=>f.to>c).length)return null;un.from&&i.delete(n.from+l,c);const h=n.from+l+s.length;i.addMark(n.from+l,h,e.type.create(o||{})),i.removeStoredMark(e.type)}},undoable:e.undoable})}function Twe(e){return new E_({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=gt(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)},undoable:e.undoable})}function Rp(e){return new E_({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=gt(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&r_(l,e.type,i);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:p,storedMarks:h}=t,{splittableMarks:f}=e.editor.extensionManager,g=h||p.$to.parentOffset&&p.$from.marks();if(g){const m=g.filter(b=>f.includes(b.type.name));s.ensureMarks(m)}}if(e.keepAttributes){const p=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&ga(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&s.join(n.from-1)},undoable:e.undoable})}function Swe(e,t,n={}){const{state:r}=t,{doc:o,tr:i}=r,s=e;o.descendants((a,l)=>{const c=i.mapping.map(l),u=i.mapping.map(l)+a.nodeSize;let p=null;if(a.marks.forEach(f=>{if(f!==s)return!1;p=f}),!p)return;let h=!1;if(Object.keys(n).forEach(f=>{n[f]!==p.attrs[f]&&(h=!0)}),h){const f=e.type.create({...e.attrs,...n});i.removeMark(c,u,e.type),i.addMark(c,u,f)}}),i.docChanged&&t.view.dispatch(i)}var rs=class pD extends O_{constructor(){super(...arguments),this.type="node"}static create(t={}){const n=typeof t=="function"?t():t;return new pD(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function ym(e){return new uxe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=gt(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),p=n.from+l.indexOf(a),h=p+a.length;if(KM(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(b=>b===e.type&&b!==g.mark.type)).filter(g=>g.to>p).length)return null;hn.from&&s.delete(n.from+u,p),c=n.from+u+a.length,s.addMark(n.from+u,c,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}function rT(e){return U1((t,n)=>({get(){return t(),e},set(r){e=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}var Pwe=class extends Iwe{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=rT(this.view.state),this.reactiveExtensionStorage=rT(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),fe(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const n=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}},$we=P({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=Q(),n=zt();return pS(()=>{const r=e.editor;r&&r.options.element&&t.value&&Nn(()=>{var o;if(!t.value||!((o=r.view.dom)!=null&&o.firstChild))return;const i=d(t.value);t.value.append(r.view.dom),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),on(()=>{const r=e.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:t}},render(){return uo("div",{ref:e=>{this.rootEl=e}})}}),Rwe=(e={})=>{const t=co();return Je(()=>{t.value=new Pwe(e)}),on(()=>{var n,r,o;const i=(n=t.value)==null?void 0:n.view.dom,s=i?.cloneNode(!0);(r=i?.parentNode)==null||r.replaceChild(s,i),(o=t.value)==null||o.destroy()}),t},Awe=rs.create({name:"doc",topNode:!0,content:"block+"}),Nwe=Awe,Mwe=rs.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Kr(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Dwe=Mwe,Lwe=rs.create({name:"text",group:"inline"}),Vwe=Lwe,oT=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},Fwe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Bwe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Hwe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,zwe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Uwe=Kv.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return oT("strong",{...Kr(this.options.HTMLAttributes,e),children:oT("slot",{})})},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bm({find:Fwe,type:this.type}),bm({find:Hwe,type:this.type})]},addPasteRules(){return[ym({find:Bwe,type:this.type}),ym({find:zwe,type:this.type})]}}),jwe=Uwe,Gwe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Wwe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,qwe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Kwe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Ywe=Kv.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Kr(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bm({find:Gwe,type:this.type}),bm({find:qwe,type:this.type})]},addPasteRules(){return[ym({find:Wwe,type:this.type}),ym({find:Kwe,type:this.type})]}}),Xwe=Ywe,Jwe=Kv.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Kr(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Zwe=Jwe,Qwe=rs.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Kr(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Twe({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),e_e=Qwe,t_e=Object.defineProperty,n_e=(e,t)=>{for(var n in t)t_e(e,n,{get:t[n],enumerable:!0})},r_e="listItem",iT="textStyle",sT=/^\s*([-+*])\s$/,fD=rs.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Kr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(r_e,this.editor.getAttributes(iT)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Rp({find:sT,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Rp({find:sT,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(iT),editor:this.editor})),[e]}}),hD=rs.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Kr(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),o_e={};n_e(o_e,{findListItemPos:()=>mf,getNextListDepth:()=>T_,handleBackspace:()=>A1,handleDelete:()=>N1,hasListBefore:()=>gD,hasListItemAfter:()=>i_e,hasListItemBefore:()=>mD,listItemHasSubList:()=>vD,nextListIsDeeper:()=>bD,nextListIsHigher:()=>yD});var mf=(e,t)=>{const{$from:n}=t.selection,r=Zt(e,t.schema);let o=null,i=n.depth,s=n.pos,a=null;for(;i>0&&a===null;)o=n.node(i),o.type===r?a=i:(i-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},T_=(e,t)=>{const n=mf(e,t);if(!n)return!1;const[,r]=exe(t,e,n.$pos.pos+4);return r},gD=(e,t,n)=>{const{$anchor:r}=e.selection,o=Math.max(0,r.pos-2),i=e.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},mD=(e,t)=>{var n;const{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==e)},vD=(e,t,n)=>{if(!n)return!1;const r=Zt(e,t.schema);let o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},A1=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!na(e.state,t)&&gD(e.state,t,n)){const{$anchor:a}=e.state.selection,l=e.state.doc.resolve(a.before()-1),c=[];l.node().descendants((h,f)=>{h.type.name===t&&c.push({node:h,pos:f})});const u=c.at(-1);if(!u)return!1;const p=e.state.doc.resolve(l.start()+u.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},p.end()).joinForward().run()}if(!na(e.state,t)||!oxe(e.state))return!1;const r=mf(t,e.state);if(!r)return!1;const i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=vD(t,e.state,i);return mD(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},bD=(e,t)=>{const n=T_(e,t),r=mf(e,t);return!r||!n?!1:n>r.depth},yD=(e,t)=>{const n=T_(e,t),r=mf(e,t);return!r||!n?!1:n{if(!na(e.state,t)||!rxe(e.state,t))return!1;const{selection:n}=e.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:bD(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():yD(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},i_e=(e,t)=>{var n;const{$anchor:r}=t.selection,o=t.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==e)},s_e=Po.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&N1(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&A1(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&A1(e,n,r)&&(t=!0)}),t}}}}),a_e="listItem",aT="textStyle",lT=/^(\d+)\.\s$/,xD=rs.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Kr(this.options.HTMLAttributes,n),0]:["ol",Kr(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(a_e,this.editor.getAttributes(aT)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Rp({find:lT,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Rp({find:lT,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(aT)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),l_e=/^\s*(\[([( |x])?\])\s$/,c_e=rs.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Kr(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var p,h;a.ariaLabel=((h=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:h.call(p,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};return c(e),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const f=n();if(typeof f!="number")return!1;const g=h.doc.nodeAt(f);return h.setNodeMarkup(f,void 0,{...g?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,p])=>{o.setAttribute(u,p)}),o.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(t).forEach(([u,p])=>{o.setAttribute(u,p)}),{dom:o,contentDOM:l,update:u=>u.type!==this.type?!1:(o.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u),!0)}}},addInputRules(){return[Rp({find:l_e,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),u_e=rs.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Kr(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Po.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(fD.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(hD.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(s_e.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(xD.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(c_e.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(u_e.configure(this.options.taskList)),e}});var d_e=fD,p_e=xD,f_e=hD;const h_e={key:0,class:"text-sm block mb-1 font-medium text-gray-700"},g_e={key:1,class:"border rounded-lg"},m_e={class:"h-10 px-3 flex gap-2 items-center border-b bg-zinc-200 [&>button]:p-1 [&>button]:rounded-md [&>button:hover]:bg-zinc-300"},v_e={class:"focus-within:ring focus-within:ring-zinc-700 rounded-b overflow-hidden [&>div]:overflow-y-auto [&>div]:max-h-48"},b_e=P({__name:"RichtextEditor",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{t}=Et(),n=rt(e,"modelValue"),r=Rwe({content:n.value,extensions:[Nwe,Dwe,Vwe,jwe,Xwe,Zwe,e_e,d_e,p_e,f_e],injectCSS:!1,editorProps:{attributes:{class:"p-3 prose prose-sm prose-gray focus:outline-none"}},onUpdate({editor:o}){n.value=o.getHTML()}});return st(n,o=>{r.value&&r.value.getHTML()!==o&&r.value.commands.setContent(o)}),Nm(()=>{r.value?.destroy()}),(o,i)=>{const s=Abe,a=Pbe,l=Ibe,c=Cbe,u=mu,p=wbe,h=bbe;return y(),V("div",null,[e.field.label?(y(),V("label",h_e,j(e.field.label),1)):Z("",!0),d(r)?(y(),V("section",g_e,[D("header",m_e,[D("button",{title:"Bold",onClick:i[0]||(i[0]=f=>d(r).chain().focus().toggleBold().run()),class:Ne({"bg-zinc-300 text-blue-500":d(r).isActive("bold")})},[S(s,{class:"w-4 h-4"})],2),D("button",{title:"Italic",onClick:i[1]||(i[1]=f=>d(r).chain().focus().toggleItalic().run()),class:Ne({"bg-zinc-300 text-blue-500":d(r).isActive("italic")})},[S(a,{class:"w-4 h-4"})],2),D("button",{title:"Underline",onClick:i[2]||(i[2]=f=>d(r).chain().focus().toggleUnderline().run()),class:Ne({"bg-zinc-300 text-blue-500":d(r).isActive("underline")})},[S(l,{class:"w-4 h-4"})],2),e.field.inline?Z("",!0):(y(),V(ge,{key:0},[S(d(Ge).Root,null,{default:O(()=>[S(d(Ge).Trigger,{class:"flex outline-none items-center"},{default:O(()=>[S(c,{class:"w-4 h-4"}),S(u,{class:"w-3 h-3"})]),_:1}),S(d(Ge).Positioner,null,{default:O(()=>[S(d(Ge).Content,{class:"shadow-sm rounded-md bg-white border outline-none overflow-hidden"},{default:O(()=>[S(d(Ge).ItemGroup,null,{default:O(()=>[S(d(Ge).ItemGroupLabel,{class:"bg-zinc-300 px-3 py-2"},{default:O(()=>[...i[11]||(i[11]=[re("Headings",-1)])]),_:1}),S(d(Ge).Item,{value:"h1",class:"text-2xl flex items-center px-3 py-2 gap-2 cursor-pointer font-bold hover:bg-zinc-100",onClick:i[3]||(i[3]=f=>d(r).chain().focus().toggleHeading({level:1}).run())},{default:O(()=>[re(j(d(t)("Heading 1")),1)]),_:1}),S(d(Ge).Item,{value:"h2",class:"text-xl flex items-center px-3 py-2 gap-2 font-semibold cursor-pointer hover:bg-zinc-100",onClick:i[4]||(i[4]=f=>d(r).chain().focus().toggleHeading({level:2}).run())},{default:O(()=>[re(j(d(t)("Heading 2")),1)]),_:1}),S(d(Ge).Item,{value:"h2",class:"text-lg flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100",onClick:i[5]||(i[5]=f=>d(r).chain().focus().toggleHeading({level:3}).run())},{default:O(()=>[re(j(d(t)("Heading 3")),1)]),_:1}),S(d(Ge).Item,{value:"h2",class:"text-md flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100",onClick:i[6]||(i[6]=f=>d(r).chain().focus().toggleHeading({level:4}).run())},{default:O(()=>[re(j(d(t)("Heading 4")),1)]),_:1}),S(d(Ge).Item,{value:"h2",class:"text-sm flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100",onClick:i[7]||(i[7]=f=>d(r).chain().focus().toggleHeading({level:5}).run())},{default:O(()=>[re(j(d(t)("Heading 5")),1)]),_:1}),S(d(Ge).Item,{value:"h2",class:"text-xs flex items-center px-3 py-2 gap-2 font-medium cursor-pointer hover:bg-zinc-100",onClick:i[8]||(i[8]=f=>d(r).chain().focus().toggleHeading({level:6}).run())},{default:O(()=>[re(j(d(t)("Heading 6")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),D("button",{title:"Bullet list",onClick:i[9]||(i[9]=f=>d(r).chain().focus().toggleBulletList().run()),class:Ne({"bg-zinc-300 text-blue-500":d(r).isActive("bulletList")})},[S(p,{class:"w-4 h-4"})],2),D("button",{title:"Numbered list",onClick:i[10]||(i[10]=f=>d(r).chain().focus().toggleOrderedList().run()),class:Ne({"bg-zinc-300 text-blue-500":d(r).isActive("orderedList")})},[S(h,{class:"w-4 h-4"})],2)],64))]),D("div",v_e,[S(d($we),{editor:d(r)},null,8,["editor"])])])):Z("",!0)])}}}),y_e={class:"flex flex-col gap-2"},x_e={key:0,class:"text-sm font-medium text-gray-700"},w_e={class:"flex flex-col gap-4"},__e={class:"flex gap-2"},k_e={class:"relative"},C_e=["onMousedown","onDblclick"],E_e={key:1,class:"flex flex-col gap-3 p-3 border rounded bg-gray-50"},O_e={class:"flex items-center justify-between"},I_e=P({__name:"GradientPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=rt(e,"modelValue"),n={type:"linear",angle:90,stops:[{color:"#000000ff",position:0},{color:"#ffffffff",position:100}]},r=A({get:()=>t.value||n,set:k=>{t.value=k}});function o(){r.value={...r.value}}const i=Q(!1),s=Q(0),a=A(()=>{if(!r.value)return"linear-gradient(90deg, #000000 0%, #ffffff 100%)";const{type:k,angle:v,stops:_}=r.value,T=_.map(N=>`${l(N.color)} ${N.position}%`).join(", ");return k==="linear"?`linear-gradient(${v}deg, ${T})`:`radial-gradient(circle, ${T})`});function l(k){const v=k.replace("#",""),_=parseInt(v.slice(0,2),16),T=parseInt(v.slice(2,4),16),N=parseInt(v.slice(4,6),16),C=v.length===8?parseInt(v.slice(6,8),16)/255:1;return`rgba(${_}, ${T}, ${N}, ${C})`}function c(k){const v=[...r.value.stops].sort((I,R)=>I.position-R.position);let _=v[0],T=v[v.length-1];for(let I=0;I=k){_=v[I],T=v[I+1];break}const N=(k-_.position)/(T.position-_.position),x={color:u(_.color,T.color,N),position:Math.round(k)};r.value.stops.push(x),r.value.stops.sort((I,R)=>I.position-R.position),o(),s.value=r.value.stops.indexOf(x)}function u(k,v,_){const T=parseInt(k.slice(1,3),16),N=parseInt(k.slice(3,5),16),C=parseInt(k.slice(5,7),16),x=k.length===9?parseInt(k.slice(7,9),16):255,I=parseInt(v.slice(1,3),16),R=parseInt(v.slice(3,5),16),M=parseInt(v.slice(5,7),16),B=v.length===9?parseInt(v.slice(7,9),16):255,z=Math.round(T+(I-T)*_),J=Math.round(N+(R-N)*_),q=Math.round(C+(M-C)*_),K=Math.round(x+(B-x)*_);return`#${z.toString(16).padStart(2,"0")}${J.toString(16).padStart(2,"0")}${q.toString(16).padStart(2,"0")}${K.toString(16).padStart(2,"0")}`}function p(k){r.value.stops.length<=2||(r.value.stops.splice(k,1),o(),s.value===k?s.value=Math.max(0,k-1):s.value!==null&&s.value>k&&s.value--)}const h=Q(!1),f=Q(null),g=Q(!1),m=Q(0);function b(k){const v=Date.now();if(g.value||v-m.value<200){g.value=!1;return}const _=k.currentTarget.getBoundingClientRect(),T=(k.clientX-_.left)/_.width*100;c(T)}function w(k,v){k.preventDefault(),k.stopPropagation(),m.value=Date.now(),h.value=!0,f.value=v,s.value=v,g.value=!1;const T=k.target.parentElement.getBoundingClientRect(),N=k.clientX,C=I=>{if(h.value&&f.value!==null){Math.abs(I.clientX-N)>3&&(g.value=!0);const R=(I.clientX-T.left)/T.width*100,M=Math.max(0,Math.min(100,R));r.value.stops[f.value].position=Math.round(M),o()}},x=()=>{h.value=!1,f.value=null,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),setTimeout(()=>{g.value=!1},100)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",x)}const E=A(()=>s.value!==null&&r.value?r.value.stops[s.value]:null);return st(()=>E.value?.position,k=>{if(k!==void 0&&s.value!==null&&r.value){const v=r.value.stops[s.value];r.value.stops.sort((_,T)=>_.position-T.position),o(),s.value=r.value.stops.findIndex(_=>_===v)}}),(k,v)=>(y(),V("div",y_e,[e.field.label?(y(),V("label",x_e,j(e.field.label),1)):Z("",!0),S(d(Xe).Root,{open:d(i),"onUpdate:open":v[6]||(v[6]=_=>Ce(i)?i.value=_:null)},{default:O(()=>[S(d(Xe).Trigger,{"as-child":""},{default:O(()=>[D("div",{class:"h-12 rounded border border-zinc-300 cursor-pointer hover:border-zinc-400 transition-colors",style:Yt({background:d(a)})},null,4)]),_:1}),S(d(Xe).Positioner,{class:"w-[var(--reference-width)] !min-w-auto"},{default:O(()=>[S(d(Xe).Content,{class:"border border-zinc-300 rounded shadow-lg z-50 bg-white w-full p-2"},{default:O(()=>[D("div",w_e,[D("div",__e,[S(d(Vt),{fullWidth:"",variant:d(r).type==="linear"?"accent":"default",onClick:v[0]||(v[0]=()=>{d(r).type="linear",o()})},{default:O(()=>[...v[7]||(v[7]=[re(" Linear ",-1)])]),_:1},8,["variant"]),S(d(Vt),{fullWidth:"",variant:d(r).type==="radial"?"accent":"default",onClick:v[1]||(v[1]=()=>{d(r).type="radial",o()})},{default:O(()=>[...v[8]||(v[8]=[re(" Radial ",-1)])]),_:1},8,["variant"])]),d(r).type==="linear"?(y(),$(d(Nr).Root,{key:0,min:0,max:360,"model-value":[d(r).angle??90],onValueChange:v[2]||(v[2]=_=>{d(r).angle=_.value[0],o()}),class:"relative w-full"},{default:O(()=>[S(d(Nr).Label,{class:"text-sm font-medium text-zinc-700 mb-1 block"},{default:O(()=>[re("Angle: "+j(d(r).angle)+"°",1)]),_:1}),S(d(Nr).Control,{class:"flex-1 flex items-center h-2 select-none touch-none"},{default:O(()=>[S(d(Nr).Track,{class:"w-full overflow-hidden h-1 rounded-full bg-gray-100"},{default:O(()=>[S(d(Nr).Range,{class:"h-full bg-blue-500 rounded-full"})]),_:1}),S(d(Nr).Thumb,{index:0,class:"w-4 h-4 bg-white border-2 border-blue-500 rounded-full shadow-md cursor-pointer hover:scale-110 transition-transform"})]),_:1})]),_:1},8,["model-value"])):Z("",!0),D("div",k_e,[D("div",{class:"h-4 rounded relative cursor-crosshair",style:Yt({background:d(a)}),onClick:b},[(y(!0),V(ge,null,Ie(d(r).stops,(_,T)=>(y(),V("div",{key:T,class:Ne(["absolute w-3 h-3 rounded-full border-2 border-white shadow-md cursor-move active:cursor-grabbing top-1/2 -translate-y-1/2 -translate-x-1/2 hover:scale-110 transition-transform",{"ring-2 ring-blue-500 scale-110":d(s)===T}]),style:Yt({left:`${_.position}%`,backgroundColor:_.color}),onMousedown:N=>w(N,T),onDblclick:It(N=>p(T),["stop"])},null,46,C_e))),128))],4),v[9]||(v[9]=D("p",{class:"text-xs text-gray-500 mt-1"}," Click to add stop • Drag to move • Double-click stop to remove ",-1))]),d(E)?(y(),V("div",E_e,[D("div",O_e,[v[10]||(v[10]=D("p",{class:"text-sm font-medium"},"Edit Color Stop",-1)),d(r).stops.length>2?(y(),V("button",{key:0,type:"button",class:"text-xs text-red-600 hover:text-red-700",onClick:v[3]||(v[3]=_=>p(d(s)))}," Remove ")):Z("",!0)]),S(YN,{modelValue:d(E).color,"onUpdate:modelValue":v[4]||(v[4]=_=>d(E).color=_),label:"Color"},null,8,["modelValue"]),S(d(Nr).Root,{min:0,max:100,"model-value":[d(E).position],onValueChange:v[5]||(v[5]=_=>d(E).position=_.value[0]),class:"relative w-full"},{default:O(()=>[S(d(Nr).Label,{class:"text-sm font-medium text-zinc-700 mb-1 block"},{default:O(()=>[re("Position: "+j(d(E).position)+"%",1)]),_:1}),S(d(Nr).Control,{class:"flex-1 flex items-center h-2 select-none touch-none"},{default:O(()=>[S(d(Nr).Track,{class:"w-full overflow-hidden h-1 rounded-full bg-gray-100"},{default:O(()=>[S(d(Nr).Range,{class:"h-full bg-blue-500 rounded-full"})]),_:1}),S(d(Nr).Thumb,{index:0,class:"w-4 h-4 bg-white border-2 border-blue-500 rounded-full shadow-md cursor-pointer hover:scale-110 transition-transform"})]),_:1})]),_:1},8,["model-value"])])):Z("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])]))}}),T_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function S_e(e,t){return y(),V("svg",T_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m4.5 15.75l7.5-7.5l7.5 7.5"},null,-1)])])}const P_e=fe({name:"heroicons-chevron-up",render:S_e}),$_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function R_e(e,t){return y(),V("svg",$_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13.181 8.68a4.503 4.503 0 0 1 1.903 6.405m-9.768-2.782L3.56 14.06a4.5 4.5 0 0 0 6.364 6.365l3.129-3.129m5.614-5.615l1.757-1.757a4.5 4.5 0 0 0-6.364-6.365l-4.5 4.5q-.388.39-.661.84m1.903 6.405a4.5 4.5 0 0 1-1.242-.88a4.5 4.5 0 0 1-1.062-1.683m6.587 2.345l5.907 5.907m-5.907-5.907L8.898 8.898M2.991 2.99L8.898 8.9"},null,-1)])])}const A_e=fe({name:"heroicons-link-slash",render:R_e}),N_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function M_e(e,t){return y(),V("svg",N_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18"},null,-1)])])}const D_e=fe({name:"heroicons-arrow-long-up",render:M_e}),L_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function V_e(e,t){return y(),V("svg",L_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3"},null,-1)])])}const F_e=fe({name:"heroicons-arrow-long-down",render:V_e}),B_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H_e(e,t){return y(),V("svg",B_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18"},null,-1)])])}const z_e=fe({name:"heroicons-arrow-long-left",render:H_e}),U_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function j_e(e,t){return y(),V("svg",U_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"},null,-1)])])}const G_e=fe({name:"heroicons-arrow-long-right",render:j_e}),W_e={class:"flex flex-col gap-1"},q_e={key:0,class:"flex items-center justify-between"},K_e={class:"text-sm font-medium text-gray-700"},Y_e={class:"flex border border-gray-300 rounded overflow-hidden divide-x"},X_e={class:"grid grid-cols-4 divide-x"},J_e=P({__name:"SpacingField",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=["top","right","bottom","left"],n={top:D_e,right:G_e,bottom:F_e,left:z_e},r=rt(e,"modelValue"),o={top:0,right:0,bottom:0,left:0},i=A({get:()=>r.value||o,set:c=>{r.value=c}}),s=Q(!0);function a(c,u){s.value?i.value={top:u,right:u,bottom:u,left:u}:i.value={...i.value,[c]:u}}function l(){if(s.value=!s.value,s.value){const c=i.value.top;i.value={top:c,right:c,bottom:c,left:c}}}return Je(()=>{i.value&&(s.value=i.value.top===i.value.right&&i.value.top===i.value.bottom&&i.value.top===i.value.left)}),(c,u)=>{const p=P_e,h=mu;return y(),V("div",W_e,[e.field.label?(y(),V("div",q_e,[D("label",K_e,j(e.field.label),1)])):Z("",!0),D("div",Y_e,[D("div",X_e,[(y(),V(ge,null,Ie(t,f=>S(d(Xu).Root,{class:"flex w-full relative group items-center gap-0.5 px-0.5","model-value":String(d(i)[f]),min:e.field.min,max:e.field.max,"onUpdate:modelValue":g=>a(f,Number(g))},{default:O(()=>[(y(),$(Xn(n[f]),{class:"w-4 h-4 text-gray-600 flex-none"})),S(d(Xu).Input,{class:"flex-1 w-full border-none outline-none text-sm py-1.5"}),S(d(Xu).Control,{class:"absolute top-0 right-1 bottom-0 flex flex-col hidden group-hover:flex"},{default:O(()=>[S(d(Xu).IncrementTrigger,{class:"flex-1 flex items-center"},{default:O(()=>[S(p,{class:"w-3 h-3 text-gray-600"})]),_:1}),S(d(Xu).DecrementTrigger,{class:"flex-1 flex items-center"},{default:O(()=>[S(h,{class:"w-3 h-3 text-gray-600"})]),_:1})]),_:1})]),_:2},1032,["model-value","min","max","onUpdate:modelValue"])),64))]),D("button",{type:"button",class:Ne(["flex-none p-1 rounded hover:bg-gray-100 transition-colors",{"text-blue-600":d(s),"text-gray-400":!d(s)}]),onClick:l},[d(s)?(y(),$(d(KN),{key:0,class:"w-4 h-4"})):(y(),$(d(A_e),{key:1,class:"w-4 h-4"}))],2)])])}}}),Z_e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Q_e(e,t){return y(),V("svg",Z_e,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125"},null,-1)])])}const eke=fe({name:"heroicons-pencil",render:Q_e}),tke={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function nke(e,t){return y(),V("svg",tke,[...t[0]||(t[0]=[D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"m14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.088 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const wD=fe({name:"heroicons-trash",render:nke}),_D=e=>[{value:"xs",label:e("Extra Small")},{value:"sm",label:e("Small")},{value:"base",label:e("Base")},{value:"lg",label:e("Large")},{value:"xl",label:e("Extra Large")},{value:"2xl",label:e("2XL")},{value:"3xl",label:e("3XL")},{value:"4xl",label:e("4XL")},{value:"5xl",label:e("5XL")},{value:"6xl",label:e("6XL")},{value:"7xl",label:e("7XL")},{value:"8xl",label:e("8XL")},{value:"9xl",label:e("9XL")}],kD=e=>[{value:"none",label:e("None")},{value:"tight",label:e("Tight")},{value:"snug",label:e("Snug")},{value:"normal",label:e("Normal")},{value:"relaxed",label:e("Relaxed")},{value:"loose",label:e("Loose")}],CD=e=>[{value:"tighter",label:e("Tighter")},{value:"tight",label:e("Tight")},{value:"normal",label:e("Normal")},{value:"wide",label:e("Wide")},{value:"wider",label:e("Wider")},{value:"widest",label:e("Widest")}],rke=e=>[{value:"normal",label:e("Normal")},{value:"italic",label:e("Italic")}],ED=e=>[{value:"none",label:e("None")},{value:"capitalize",label:e("Capitalize")},{value:"uppercase",label:e("Uppercase")},{value:"lowercase",label:e("Lowercase")}],oke=e=>({100:"Thin",200:"Extra Light",300:"Light",400:"Regular",500:"Medium",600:"Semi Bold",700:"Bold",800:"Extra Bold",900:"Black"})[e]||e,OD=e=>`${e} - ${oke(e)}`,ike={class:"flex flex-col gap-4"},ske={key:1,class:"pt-4 border-t border-zinc-200"},ake=P({__name:"TypographyPresetEditor",props:at({canDelete:{type:Boolean,default:!1}},{modelValue:{default:()=>({fontFamily:null,fontStyle:"normal",fontWeight:400,fontSize:"base",lineHeight:"normal",letterSpacing:"normal",textTransform:"none"})},modelModifiers:{}}),emits:at(["delete"],["update:modelValue"]),setup(e,{emit:t}){const n=e,r=t;function o(){r("delete")}const{t:i}=Et(),{findFont:s,isFetched:a}=Xw(),l=_D(i),c=kD(i),u=CD(i),p=rke(i),h=ED(i),f=rt(e,"modelValue",{get(R){return R&&typeof R.fontWeight=="string"?{...R,fontWeight:parseInt(R.fontWeight,10)}:R},set(R){return R}}),g={id:"fontSize",label:i("Font Size"),type:"select",options:l,responsive:!0},m={id:"lineHeight",label:i("Line Height"),type:"select",options:c,responsive:!0},b=A(()=>{const R=f.value.fontFamily?.styles||["normal"];return{id:"fontStyle",label:i("Font Style"),type:"select",options:R.map(M=>p.find(z=>z.value===M)||{value:M,label:M})}}),w={id:"letterSpacing",label:i("Letter Spacing"),type:"select",options:u},E={id:"textTransform",label:i("Text Transform"),type:"select",options:h},k=A({get:()=>f.value.fontFamily,set:R=>{if(!R){f.value={...f.value,fontFamily:null,fontWeight:400,fontStyle:"normal"};return}const M=f.value.fontWeight,B=R.weights.includes(M)?M:R.weights.includes(400)?400:R.weights[0],z=f.value.fontStyle,J=R.styles.includes(z)?z:R.styles.includes("normal")?"normal":R.styles[0];f.value={...f.value,fontFamily:{slug:R.slug,name:R.name,weights:R.weights,styles:R.styles},fontWeight:B,fontStyle:J}}}),v=A({get:()=>f.value.fontStyle,set:R=>{f.value={...f.value,fontStyle:R}}}),_=A({get:()=>f.value.fontSize,set:R=>{f.value={...f.value,fontSize:R}}}),T=A({get:()=>f.value.lineHeight,set:R=>{f.value={...f.value,lineHeight:R}}}),N=A({get:()=>f.value.letterSpacing,set:R=>{f.value={...f.value,letterSpacing:R}}}),C=A({get:()=>f.value.textTransform,set:R=>{f.value={...f.value,textTransform:R}}}),x=A({get:()=>f.value.fontWeight,set:R=>{f.value={...f.value,fontWeight:R}}});st(()=>({fetched:a.value,fontFamily:f.value.fontFamily}),({fetched:R,fontFamily:M})=>{if(!R||!M)return;const B=typeof M=="string"?M:M.slug,z=s(B);z&&(typeof M=="string"||!M.weights||M.weights.length===1)&&(f.value={...f.value,fontFamily:z})},{immediate:!0,deep:!0});const I=A(()=>{const R=f.value.fontFamily?.weights||[400];return{id:"fontWeight",label:i("Font Weight"),type:"select",options:R.map(M=>({value:M,label:OD(String(M))}))}});return(R,M)=>{const B=wD;return y(),V("div",ike,[S(WN,{field:{id:"fontFamily",label:d(i)("Font Family"),type:"font"},modelValue:d(k),"onUpdate:modelValue":M[0]||(M[0]=z=>Ce(k)?k.value=z:null)},null,8,["field","modelValue"]),S(d(ws),{field:d(b),modelValue:d(v),"onUpdate:modelValue":M[1]||(M[1]=z=>Ce(v)?v.value=z:null)},null,8,["field","modelValue"]),f.value.fontFamily?(y(),$(d(ws),{key:0,field:d(I),modelValue:d(x),"onUpdate:modelValue":M[2]||(M[2]=z=>Ce(x)?x.value=z:null)},null,8,["field","modelValue"])):Z("",!0),S(d(ws),{field:g,modelValue:d(_),"onUpdate:modelValue":M[3]||(M[3]=z=>Ce(_)?_.value=z:null)},null,8,["modelValue"]),S(d(ws),{field:m,modelValue:d(T),"onUpdate:modelValue":M[4]||(M[4]=z=>Ce(T)?T.value=z:null)},null,8,["modelValue"]),S(d(ws),{field:w,modelValue:d(N),"onUpdate:modelValue":M[5]||(M[5]=z=>Ce(N)?N.value=z:null)},null,8,["modelValue"]),S(d(ws),{field:E,modelValue:d(C),"onUpdate:modelValue":M[6]||(M[6]=z=>Ce(C)?C.value=z:null)},null,8,["modelValue"]),n.canDelete?(y(),V("div",ske,[D("button",{type:"button",class:"w-full flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-red-600 hover:text-red-700 hover:bg-red-50 rounded-lg border border-red-200 hover:border-red-300 transition-colors",onClick:o},[S(B,{class:"w-4 h-4"}),re(" "+j(d(i)("Delete Preset")),1)])])):Z("",!0)])}}}),lke={class:"flex flex-col gap-1"},cke={key:0,class:"text-sm font-medium"},uke={class:"text-xs text-gray-500"},ID=P({__name:"TypographyPresetPreview",props:{preset:null,label:null},setup(e){const t=e,{t:n}=Et(),r=_D(n),o=kD(n),i=CD(n),s=ED(n),a=A(()=>t.label?t.preset?.name||Dv(t.label):""),l=A(()=>{const c=[];if(t.preset?.fontFamily?.name&&c.push(t.preset.fontFamily.name),t.preset?.fontWeight&&c.push(OD(t.preset.fontWeight)),t.preset?.fontSize){const u=typeof t.preset.fontSize=="string"?t.preset.fontSize:t.preset.fontSize._default||t.preset.fontSize[Object.keys(t.preset.fontSize)[0]];if(u){const p=r.find(h=>h.value===u)?.label||u;c.push(p)}}if(t.preset?.lineHeight){const u=typeof t.preset.lineHeight=="string"?t.preset.lineHeight:t.preset.lineHeight._default||t.preset.lineHeight[Object.keys(t.preset.lineHeight)[0]];if(u){const p=o.find(h=>h.value===u)?.label||u;c.push(p)}}if(t.preset?.fontStyle==="italic"&&c.push(n("Italic")),t.preset?.letterSpacing&&t.preset.letterSpacing!=="normal"){const u=i.find(p=>p.value===t.preset.letterSpacing)?.label;u&&c.push(u)}if(t.preset?.textTransform&&t.preset.textTransform!=="none"){const u=s.find(p=>p.value===t.preset.textTransform)?.label;u&&c.push(u)}return c.length>0?c.join(" • "):n("Configure typography")});return(c,u)=>(y(),V("div",lke,[d(a)?(y(),V("div",cke,j(d(a)),1)):Z("",!0),D("div",uke,j(d(l)),1)]))}}),dke={class:"text-sm font-medium mb-1 text-gray-700"},pke={class:"grid gap-2 items-stretch mt-1"},fke=["onClick"],hke=["onClick","title"],gke={class:"flex-none h-12 border-b border-neutral-200 flex gap-3 px-4 items-center justify-between"},mke={class:"flex items-center gap-2 flex-1 min-w-0"},vke={class:"text-sm text-gray-600 flex-none"},bke=["title"],yke={class:"flex-1 flex flex-col min-h-0 overflow-y-auto p-4"},xke=P({__name:"TypographyPresets",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=rt(e,"modelValue"),{t:r}=Et(),o=Q(null),i=Q(!1),s=Q(!1),a=Q(""),l=A(()=>Object.keys(t.field.presets||{})),c=A({get(){return!o.value||!n.value?.[o.value]?null:n.value[o.value]},set(T){!o.value||!T||(n.value={...n.value,[o.value]:T})}}),u=A(()=>!o.value||!c.value?"":c.value.name||Dv(o.value)),p=A(()=>o.value?!l.value.includes(o.value):!1);function h(T){o.value=T,i.value=!0}function f(){const T=Object.keys(n.value),N=`typography-${T.length+1}`;n.value={...n.value,[N]:structuredClone(He(n.value[T[0]]))},h(N)}function g(T){return!l.value.includes(T)}function m(T){if(!g(T)||!n.value)return;const{[T]:N,...C}=n.value;n.value=C}function b(){p.value&&(s.value=!0,a.value=c.value?.name||u.value,Nn(()=>{const T=document.querySelector(".preset-name-input");T?.focus(),T?.select()}))}function w(){c.value&&(c.value={...c.value,name:a.value?.trim()},s.value=!1)}function E(){s.value=!1,a.value=""}function k(T){T.key==="Enter"?w():T.key==="Escape"&&E()}function v(){o.value&&(m(o.value),i.value=!1)}const _=A(()=>o.value!==null&&g(o.value||""));return(T,N)=>{const C=wD,x=XN,I=eke,R=So;return y(),V("div",null,[D("label",dke,j(e.field.label),1),D("div",pke,[(y(!0),V(ge,null,Ie(n.value,(M,B)=>(y(),V("div",{key:B,class:"relative group"},[D("button",{class:"w-full px-3 py-2 border border-zinc-300 rounded hover:bg-zinc-50 text-left cursor-pointer",onClick:z=>h(String(B))},[S(ID,{preset:M,label:String(B)},null,8,["preset","label"])],8,fke),g(String(B))?(y(),V("button",{key:0,type:"button",class:"absolute top-2 right-2 p-1 rounded-lg bg-white border border-zinc-300 hover:bg-red-50 hover:border-red-400 hover:text-red-600 opacity-0 group-hover:opacity-100 transition-opacity z-10",onClick:It(z=>m(String(B)),["stop","prevent"]),title:d(r)("Delete preset")},[S(C,{class:"w-3 h-3"})],8,hke)):Z("",!0)]))),128)),D("button",{class:"flex border-2 border-dashed flex items-center justify-center text-sm gap-2 py-1 rounded border-blue-400 text-blue-400 cursor-pointer",onClick:f},[S(x,{class:"h-4 w-4"}),D("span",null,j(d(r)("Add preset")),1)])]),S(d(mt).Root,{open:d(i),"onUpdate:open":N[2]||(N[2]=M=>Ce(i)?i.value=M:null),modal:!1,"close-on-interact-outside":!1},{default:O(()=>[S(d(mt).Positioner,{class:"flex fixed z-50 top-14 left-14 bottom-0 w-75 items-center justify-center"},{default:O(()=>[S(d(mt).Content,{class:"bg-white shadow flex flex-col w-full h-full overflow-hidden"},{default:O(()=>[D("header",gke,[D("div",mke,[D("span",vke,j(d(r)("Editing")),1),d(s)?yo((y(),V("input",{key:0,"onUpdate:modelValue":N[0]||(N[0]=M=>Ce(a)?a.value=M:null),type:"text",maxlength:"50",class:"preset-name-input flex-1 min-w-0 px-2 py-1 text-sm font-medium border border-blue-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500",onBlur:w,onKeydown:k},null,544)),[[Zo,d(a)]]):(y(),V("button",{key:1,type:"button",class:Ne(["flex-1 min-w-0 text-left px-2 py-1 text-sm font-medium rounded truncate",d(p)?"hover:bg-gray-100 cursor-pointer":"cursor-default"]),title:d(p)?d(r)("Click to rename"):d(r)("Theme preset (cannot be renamed)"),onClick:b},[re(j(d(u))+" ",1),d(p)?(y(),$(I,{key:0,class:"inline-block w-3 h-3 ml-1 text-gray-400"})):Z("",!0)],10,bke))]),S(d(mt).CloseTrigger,{class:"cursor-pointer rounded-lg p-0.5 text-neutral-700 hover:bg-neutral-300"},{default:O(()=>[S(R,{class:"w-5 h-5"})]),_:1})]),D("div",yke,[d(o)&&d(c)?(y(),$(ake,{key:0,modelValue:d(c),"onUpdate:modelValue":N[1]||(N[1]=M=>Ce(c)?c.value=M:null),"can-delete":d(_),onDelete:v},null,8,["modelValue","can-delete"])):Z("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])])}}}),wke={class:"text-sm font-medium mb-1 text-gray-700"},_ke={key:0},kke={key:0,class:"flex flex-1 gap-3"},Cke={class:"flex-1 text-left text-zinc-700"},Eke={key:1},Oke={class:"divide-y divide-zinc-200"},Ike=["onClick"],Tke={key:1,class:"text-sm text-red-400"},Ske=P({__name:"TypographyPicker",props:at({field:null},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const{theme:t}=Dt(),{t:n}=Et(),r=A(()=>{if(!t.value)return{};const u=t.value.settingsSchema.flatMap(p=>p.settings).find(p=>p.type==="typography_presets")?.id;return u?t.value.settings[u]||{}:{}}),o=A(()=>Object.keys(r.value).length>0),i=rt(e,"modelValue"),s=Q(!1),a=A(()=>i.value&&r.value?r.value[i.value]:null),l=A(()=>!i.value||!a.value?null:a.value.name||Dv(i.value));function c(u){i.value=u,s.value=!1}return(u,p)=>{const h=So,f=Yw,g=Kw,m=ID;return y(),V("div",null,[D("label",wke,j(e.field.label),1),d(o)?(y(),V("div",_ke,[S(d(Xe).Root,{open:d(s),"onUpdate:open":p[1]||(p[1]=b=>Ce(s)?s.value=b:null)},{default:O(()=>[S(d(Xe).Trigger,{class:"border border-zinc-300 rounded w-full flex justify-between h-10 px-3 items-center"},{default:O(()=>[d(a)?(y(),V("div",kke,[D("div",Cke,j(d(l)),1),D("button",{class:"ml-auto flex-none mr-1 p-1 rounded-lg hover:bg-zinc-100",onClick:p[0]||(p[0]=It(b=>i.value=null,["stop"]))},[S(h,{class:"w-4 h-4"})])])):(y(),V("span",Eke,j(d(n)("Select a typography preset")),1)),S(f,{class:"flex-none h-4 w-4"})]),_:1}),S(d(Xe).Positioner,null,{default:O(()=>[S(d(Xe).Content,{class:"border border-zinc-300 rounded shadow-md w-[var(--reference-width)] z-50 bg-white -mt-1 overflow-y-auto max-h-[360px]"},{default:O(()=>[D("div",Oke,[(y(!0),V(ge,null,Ie(d(r),(b,w)=>(y(),V("div",{key:w,class:Ne(["px-3 py-3 hover:bg-zinc-100 relative cursor-pointer",{"bg-zinc-100":i.value===String(w)}]),onClick:E=>c(String(w))},[i.value===String(w)?(y(),$(g,{key:0,class:"w-5 h-5 absolute top-2 right-2 text-green-400"})):Z("",!0),S(m,{preset:b,label:String(w)},null,8,["preset","label"])],10,Ike))),128))])]),_:1})]),_:1})]),_:1},8,["open"])])):(y(),V("div",Tke,j(d(n)("No typography presets defined in theme settings.")),1))])}}}),hh=Q(!1);function TD(){const e=kl(),{state:t}=Dt();async function n(){if(hh.value)return;hh.value=!0;const r=e.engine.getPage(),o=Lfe(r);o.onSuccess(()=>{e.ui.toast({type:"success",title:"Theme published successfully"}),e.ui.closeModal("confirm-publish"),t.haveEdits=!1}),o.onError(()=>{e.ui.toast({type:"error",title:"Failed to publish theme"})}),await o.execute(),hh.value=!1}return{isPublishing:Kd(hh),publish:n}}const Pke="bagisto_visual_editor_confirm_publish",$ke=P({__name:"PublishAction",setup(e){const{t}=Et(),n=kl(),{isPublishing:r,publish:o}=TD(),{haveEdits:i}=Dt();function s(){if(localStorage.getItem(Pke)===null){n.ui.openModal("confirm-publish");return}o()}return(a,l)=>(y(),$(d(Vt),{variant:"primary",loading:d(r),disabled:!d(i),onClick:s},{default:O(()=>[re(j(d(t)("Publish")),1)]),_:1},8,["loading","disabled"]))}}),Rke={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ake(e,t){return y(),V("svg",Rke,[...t[0]||(t[0]=[D("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[D("path",{d:"M2.036 12.322a1 1 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178c.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178"}),D("path",{d:"M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"})],-1)])])}const Nke=fe({name:"heroicons-eye",render:Ake}),Mke=P({__name:"PreviewAction",setup(e){Et();const t=kl();function n(){const r=t.preview.state.previewUrl;window.open(r,"_blank")}return(r,o)=>{const i=Nke;return y(),$(d(Vt),{variant:"secondary",square:"",onClick:n,title:"Preview in new tab"},{default:O(()=>[S(i)]),_:1})}}}),Dke={class:"w-sm p-4 space-y-6"},Lke={class:"mb-4"},Vke={class:"flex gap-4 justify-end"},Fke="bagisto_visual_editor_confirm_publish",Bke=P({__name:"ConfirmPublish",setup(e){const{t}=Et(),n=kl(),{isPublishing:r,publish:o}=TD(),i=Q(!1);function s(){i.value&&localStorage.setItem(Fke,"true"),o()}return(a,l)=>{const c=t5;return y(),V("div",Dke,[D("p",null,j(d(t)("publish_warning_line1")),1),D("p",null,j(d(t)("publish_warning_line2")),1),D("div",Lke,[S(c,{label:d(t)("Don't ask next time"),modelValue:d(i),"onUpdate:modelValue":l[0]||(l[0]=u=>Ce(i)?i.value=u:null)},null,8,["label","modelValue"])]),D("div",Vke,[S(d(Vt),{disabled:d(r),onClick:l[1]||(l[1]=u=>d(n).ui.closeModal("confirm-publish"))},{default:O(()=>[re(j(d(t)("Cancel")),1)]),_:1},8,["disabled"]),S(d(Vt),{variant:"primary",loading:d(r),onClick:s},{default:O(()=>[re(j(d(t)("Publish")),1)]),_:1},8,["loading"])])])}}}),Hke=P({__name:"BackButton",setup(e){function t(){history.back()}return(n,r)=>{const o=qN;return y(),$(d(Vt),{square:"",title:"Back",onClick:t},{default:O(()=>[S(o,{class:"text-zinc-600"})]),_:1})}}}),{t:zke}=Et();function Uke(e){e.removeHeaderAction("back-button"),e.removeHeaderAction("title"),e.registerHeaderAction({id:"back-button",slot:"left",render:Hke}),e.registerHeaderAction({id:"title",slot:"left",render:Mre}),e.registerHeaderAction({id:"tools",slot:"center",render:Mle}),e.registerHeaderAction({id:"preview",slot:"right",render:Mke}),e.registerHeaderAction({id:"publish",slot:"right",render:$ke}),e.registerSidebarPanel({id:"theme-settings",title:"Theme settings",icon:Ire,render:Kfe}),e.registerSidebarPanel({id:"media",title:"Medias",icon:Pre,render:Jfe}),e.registerModal({id:"confirm-publish",title:zke("Publish edits ?"),size:"lg",render:Bke})}function jke(e){e.registerPropertyField({type:"category",render:Che}),e.registerPropertyField({type:"product",render:Hhe}),e.registerPropertyField({type:"cms-page",render:nge}),e.registerPropertyField({type:"font",render:WN}),e.registerPropertyField({type:"link",render:Mge}),e.registerPropertyField({type:"color-scheme",render:Wge}),e.registerPropertyField({type:"color-scheme-group",render:dme}),e.registerPropertyField({type:"icon",render:Dme}),e.registerPropertyField({type:"image",render:gbe}),e.registerPropertyField({type:"richtext",render:b_e}),e.registerPropertyField({type:"gradient",render:I_e}),e.registerPropertyField({type:"spacing",render:J_e}),e.registerPropertyField({type:"typography_presets",render:xke}),e.registerPropertyField({type:"typography",render:Ske})}function Gke(e){Uke(e),jke(e)}const{t:Wke}=Et();function qke(e){const t={changes:{added:[],updated:[],removed:[],moved:{}},blocks:{},regions:[]};for(const n of e)t.changes.added.push(...n.changes.added),t.changes.updated.push(...n.changes.updated),t.changes.removed.push(...n.changes.removed),Object.assign(t.changes.moved,n.changes.moved||{}),Object.assign(t.blocks,n.blocks),n.regions&&n.regions.length>0&&(t.regions=n.regions);return t.changes.added=[...new Set(t.changes.added)],t.changes.updated=[...new Set(t.changes.updated)],t.changes.removed=[...new Set(t.changes.removed)],t.changes.added=t.changes.added.filter(n=>!t.changes.removed.includes(n)),t.changes.updated=t.changes.updated.filter(n=>!t.changes.removed.includes(n)),t}function Kke(e){return e.changes.added.length>0||e.changes.updated.length>0||e.changes.removed.length>0||Object.keys(e.changes.moved||{}).length>0}function Yke(e,t){const n=[];for(const r of e){const o=t[r];if(!o||o.parentId&&e.includes(o.parentId))continue;const i=Xke(r,t);if(i){const s=t[i]?.parentId;s&&n.push(s);continue}if(o.ghost===!0){const s=o.parentId;s&&n.push(s);continue}n.push(r)}return Array.from(new Set(n))}function Xke(e,t){let n=e;for(;t[n]?.parentId;){const r=t[n].parentId;if(!t[r])break;if(t[r]?.repeated===!0)return r;n=r}return null}function Jke(e,t){const r=new DOMParser().parseFromString(e,"text/html"),o={html:{},css:[],js:[]};r.head.querySelectorAll('link[rel="stylesheet"]').forEach(i=>{o.css.push(i.outerHTML)}),r.querySelectorAll("style").forEach(i=>{o.css.push(i.outerHTML)}),r.querySelectorAll("script").forEach(i=>{o.js.push(i.outerHTML)});for(const i of t){const s=r.querySelector(`[data-block="${i}"]`);s&&(o.html[i]=s.outerHTML)}return o}function Zke(e,t){let n=[],r=[],o=!1;const i=BN(async()=>{if(n.length===0||o)return;const l=[...n];r.length>0&&(l.unshift(...r),r=[]),n=[],o=!0;const c=qke(l),u=Mfe(c);u.onSuccess(p=>{const h=e.engine.getPage().blocks,f=[...c.changes.added||[],...c.changes.updated||[]],g=Yke(f,h),m=Jke(p,g);e.preview.sendMessage("updates.effects",{effects:m,...c})}),u.onError(p=>{p.name!=="AbortError"&&(console.error("Failed to persist changes",p),e.ui.toast({type:"error",title:Wke("Failed to save changes")}),r=l)}),u.onFinish(()=>{o=!1,n.length>0&&i()}),await u.execute()},300);function s(l){Kke(l)&&([...l.changes.added,...l.changes.updated].forEach(c=>{const u=l.blocks[c];u.ghost&&u.parentId&&!l.blocks[u.parentId]&&(l.blocks[u.parentId]=e.engine.getBlockById(u.parentId))}),n.push(l),t.haveEdits=!0,i())}function a(l){const{blockId:c,key:u,value:p,oldValue:h}=l,f=e.engine.getBlockById(c);e.preview.sendMessage("block.property.updated",{block:f,key:u,value:p,oldValue:h})}e.engine.on("block:property:set",a),e.events.on("updates",s)}function Qke(e){e.events.on("ui:block:select",({blockId:t})=>{UA("block",t)}),e.events.on("ui:block:clear-selection",()=>{Lw("block")})}function eCe(e,t,n){const r=jA("template"),o=r&&n.templates?.find(i=>i.template===r);if(o){const i=new URL(o.previewUrl);i.searchParams.set("_designMode",t.theme?.code),i.searchParams.set("channel",t.channel),i.searchParams.set("locale",t.locale),e.preview.loadUrl(i.href)}else e.preview.loadUrl(n.storefrontUrl)}function tCe(e,t,n){Qke(e),eCe(e,t,n)}function nCe(e,t){e.preview.onReady(()=>{e.preview.onMessage("craftile.preview.page-data",({pageData:n})=>{Kc.done(),e.engine.setPage(n.content),t.pageData={url:n.template.url,template:n.template.name,sources:n.template.sources,settings:n.settings},t.theme&&n.settings&&(t.theme.settings=n.settings),n.preloadedModels&&Cre(n.preloadedModels);const r=jA("block");r&&(e.engine.getBlockById(r)?e.ui.setSelectedBlock(r):Lw("block"))})})}const S_=Symbol("CRAFTILE_EDITOR");function rCe(e){return({vueApp:t,editor:n})=>{t.provide(S_,n);const{state:r}=Dt();Gke(n.ui),nCe(n,r),Zke(n,r),tCe(n,r,e)}}const cT=new Map;function oCe(e,t){if(t===e||t==="*")return!0;if(t.endsWith("/*")){const r=t.slice(0,-2);return e.startsWith(r+"/")||e===r}if(t.startsWith("*/")){const r=t.slice(2);return e.endsWith("/"+r)||e===r}let n=cT.get(t);if(!n)try{const r=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");n=new RegExp(`^${r}$`),cT.set(t,n)}catch{return!1}return n.test(e)}function uT(e,t){return t.some(n=>oCe(e,n))}function dT(e,t){const n=e.regions&&e.regions.length>0,r=e.templates&&e.templates.length>0;if(!n&&!r)return!1;let o=!0;n&&(t.region?o=uT(t.region,e.regions):o=!1);let i=!0;return r&&(t.template?i=uT(t.template,e.templates):i=!1),o&&i}const{blockSchemas:iCe}=window.editorConfig,sCe=kre({channels:window.editorConfig.channels,channel:window.editorConfig.defaultChannel,theme:window.editorConfig.theme,templates:window.editorConfig.templates||[],haveEdits:window.editorConfig.haveEdits}),{fetchFonts:aCe}=Xw();aCe();Kc.configure({showSpinner:!1,minimum:.1,speed:400,trickleSpeed:500});const SD=xK({el:"#app",blockSchemas:iCe,devices:{presets:[{id:"mobile",label:"Mobile",width:376,icon:"mobile"},{id:"tablet",label:"Tablet",width:767,icon:"tablet"},{id:"desktop",label:"Desktop",width:1280,icon:"desktop"}]},i18n:window.editorConfig.messages.craftile,plugins:[_re,rCe(window.editorConfig)],blockLabelFunction(e,t){let n=null;for(const r of[lCe])if(n=r(e,t))break;return n??""},blockFilterFunction(e,t){const n={template:sCe.pageData?.template,region:t.regionName};return dT(e.meta?.disabledOn||{},n)||((e.meta?.enabledOn?.regions?.length??0)>0||(e.meta?.enabledOn?.templates?.length??0)>0)&&!dT(e.meta.enabledOn,n)?!1:t.parentId?!e.meta?.isSection:e.meta?.isSection}});window.craftileEditor=SD;window.Vue=eB;document.addEventListener("DOMContentLoaded",()=>{Kc.start(),document.dispatchEvent(new CustomEvent("visual:editor:ready",{detail:{editor:SD}}))});const lCe=(e,t)=>{if(!t)return null;const n=t.properties.find(o=>o.type==="text");if(!n)return null;const r=e.properties[n.id];return r?cCe(r):null};function cCe(e){const n=new DOMParser().parseFromString(e,"text/html").body.textContent;return n==="undefined"||n==="null"?e:n} diff --git a/public/vendor/bagistoplus/visual/editor/assets/injected-BWCJ6BYp.js b/public/vendor/bagistoplus/visual/editor/assets/injected-BWCJ6BYp.js new file mode 100644 index 00000000..a34c0eda --- /dev/null +++ b/public/vendor/bagistoplus/visual/editor/assets/injected-BWCJ6BYp.js @@ -0,0 +1 @@ +var e=Object.defineProperty,t=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,n=(e,n,r)=>t(e,typeof n==`symbol`?n:n+``,r),r=class{constructor(e,t=`*`){n(this,`handlers`,new Map),n(this,`targetWindow`),n(this,`targetOrigin`),n(this,`fallbackHandler`),this.targetWindow=e,this.targetOrigin=t,window.addEventListener(`message`,this.handleMessage.bind(this))}handleMessage(e){let t=e.data;if(!t.type)return;let n=this.handlers.get(t.type);n?n.forEach(n=>n(t.payload,e)):this.fallbackHandler&&this.fallbackHandler(e.data,e)}send(e,t){let n={type:e,payload:t};this.targetWindow.postMessage(n,this.targetOrigin)}listen(e,t){return this.handlers.has(e)||this.handlers.set(e,[]),this.handlers.get(e).push(t),()=>{let n=this.handlers.get(e);if(n){let e=n.indexOf(t);e>-1&&n.splice(e,1)}}}registerFallbackHandler(e){this.fallbackHandler=e}};function i(e=`*`){if(window.parent===window)throw Error(`Not inside an iframe`);return new r(window.parent,e)}var a=class{constructor(){n(this,`listeners`,new Map)}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{this.off(e,t)}}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t){let n=r=>{t(r),this.off(e,n)};this.on(e,n)}emit(e,...t){let n=this.listeners.get(e);if(n){let r=t[0];n.forEach(t=>{try{t(r)}catch(t){console.error(`Error in event listener for '${String(e)}':`,t)}})}}removeAllListeners(e){e?this.listeners.delete(e):this.listeners.clear()}},o=class{constructor(e){n(this,`active`,!0),n(this,`messenger`),n(this,`currentHoveredBlock`,null),n(this,`currentSelectedBlock`,null),n(this,`overlayButtonHovered`,!1),n(this,`resizeObserver`,null),n(this,`mutationObserver`,null),this.messenger=e,this.messenger.listen(`craftile.inspector.enable`,()=>this.enable()),this.messenger.listen(`craftile.inspector.disable`,()=>this.disable()),this.messenger.listen(`craftile.inspector.overlay-button-enter`,this.handleOverlayButtonEnter.bind(this)),this.messenger.listen(`craftile.inspector.overlay-button-leave`,this.handleOverlayButtonLeave.bind(this)),this.messenger.listen(`craftile.editor.select-block`,this.handleEditorSelectBlock.bind(this)),this.messenger.listen(`craftile.editor.deselect-block`,this.handleEditorDeselectBlock.bind(this)),window.addEventListener(`scroll`,this.handleScroll.bind(this),{passive:!0}),this.setupGlobalEventListeners()}updateTrackedElement(e,t){this.currentHoveredBlock?.dataset.block===e&&(this.currentHoveredBlock=t,this.sendHoveredBlockPosition()),this.currentSelectedBlock?.dataset.block===e&&(this.currentSelectedBlock=t,requestAnimationFrame(()=>{this.sendSelectedBlockPosition(!0)}),this.trackSelectedBlock())}enable(){this.active=!0,document.body.classList.add(`craftile-inspector-active`),this.currentSelectedBlock&&this.trackSelectedBlock()}disable(){this.active=!1,document.body.classList.remove(`craftile-inspector-active`),this.currentHoveredBlock=null,this.overlayButtonHovered=!1,this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.mutationObserver&&=(this.mutationObserver.disconnect(),null)}handleOverlayButtonEnter(){this.overlayButtonHovered=!0}handleOverlayButtonLeave(e){this.overlayButtonHovered=!1,this.currentHoveredBlock||this.messenger.send(`craftile.preview.block-leave`)}handleEditorSelectBlock(e){let t=document.querySelector(`[data-block="${e.blockId}"]`);t&&(this.currentSelectedBlock=t,this.sendSelectedBlockPosition(),this.trackSelectedBlock(),t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`nearest`}))}handleEditorDeselectBlock(){this.currentSelectedBlock=null,this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.mutationObserver&&=(this.mutationObserver.disconnect(),null)}handleScroll(){this.active&&(this.currentSelectedBlock&&this.sendSelectedBlockPosition(),this.currentHoveredBlock&&this.sendHoveredBlockPosition())}setupGlobalEventListeners(){document.addEventListener(`mouseover`,this.handleGlobalHover.bind(this)),document.addEventListener(`mouseout`,this.handleGlobalLeave.bind(this)),document.addEventListener(`click`,this.handleGlobalClick.bind(this),{capture:!0})}handleGlobalHover(e){if(!this.active)return;let t=e.target.closest(`[data-block]`);t&&(e.stopPropagation(),this.currentHoveredBlock=t,this.sendHoveredBlockPosition())}handleGlobalLeave(e){this.active&&e.target.closest(`[data-block]`)&&(this.overlayButtonHovered||(this.currentHoveredBlock=null,this.messenger.send(`craftile.preview.block-leave`)))}handleGlobalClick(e){if(this.messenger.send(`craftile.preview.click`),!this.active)return;let t=e.target.closest(`[data-block]`);t&&t.getAttribute(`data-block`)&&this.currentSelectedBlock!==t&&(e.preventDefault(),e.stopImmediatePropagation(),this.currentSelectedBlock=t,this.sendSelectedBlockPosition(),this.trackSelectedBlock())}sendHoveredBlockPosition(){let e=this.computeElementPositioning(this.currentHoveredBlock);this.messenger.send(`craftile.preview.block-hover`,{blockRect:e.rect,parentRect:e.parentRect,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,blockId:this.currentHoveredBlock.dataset.block,parentFlexDirection:e.parentFlexDirection})}sendSelectedBlockPosition(e=!1){if(!this.currentSelectedBlock)return;let t=this.computeElementPositioning(this.currentSelectedBlock);this.messenger.send(e?`craftile.preview.update-selected-block`:`craftile.preview.block-select`,{blockRect:t.rect,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,blockId:this.currentSelectedBlock.dataset.block})}trackSelectedBlock(){if(!this.currentSelectedBlock)return;this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.mutationObserver&&=(this.mutationObserver.disconnect(),null),this.resizeObserver=new ResizeObserver(()=>{this.active&&this.currentSelectedBlock&&this.sendSelectedBlockPosition(!0)}),this.resizeObserver.observe(this.currentSelectedBlock),this.mutationObserver=new MutationObserver(()=>{this.active&&this.currentSelectedBlock&&this.sendSelectedBlockPosition(!0)}),this.mutationObserver.observe(this.currentSelectedBlock,{attributes:!0,subtree:!1});let e=this.currentSelectedBlock.parentElement;for(;e&&(this.mutationObserver.observe(e,{childList:!0,subtree:!1}),e!==document.body);)e=e.parentElement}computeElementPositioning(e){let t=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=window.pageXOffset||document.documentElement.scrollLeft,i=this.findEldestParentBlock(e);return{rect:t,parentRect:i&&i!==e?i.getBoundingClientRect():void 0,scrollTop:n,scrollLeft:r,parentFlexDirection:this.getElementFlexDirection(e.parentElement)}}findEldestParentBlock(e){let t=null,n=e.parentElement;for(;n&&n!==document.body;)n.hasAttribute(`data-block`)&&(t=n),n=n.parentElement;return t}getElementFlexDirection(e){if(!e)return`column`;let t=window.getComputedStyle(e),n=t.display.includes(`flex`)?t.flexDirection:`column`;return n===`row`||n===`row-reverse`?`row`:`column`}},s=class extends a{constructor(){super(),n(this,`messenger`),n(this,`inspector`),this.messenger=i(window.origin),this.inspector=new o(this.messenger),this.initialize()}initialize(){window.addEventListener(`load`,()=>{this.messenger.send(`craftile.preview.ready`,{}),setTimeout(()=>{this.sendPageData()},0)}),this.messenger.registerFallbackHandler(e=>{let{type:t,payload:n}=e;this.emit(t,n)})}sendPageData(){let e=document.getElementById(`page-data`);if(e)try{let t=JSON.parse(e.textContent||`{}`);this.messenger.send(`craftile.preview.page-data`,{pageData:t})}catch(e){console.error(`Failed to parse page data:`,e)}}},c=11;function l(e,t){var n=t.attributes,r,i,a,o,s;if(!(t.nodeType===c||e.nodeType===c)){for(var l=n.length-1;l>=0;l--)r=n[l],i=r.name,a=r.namespaceURI,o=r.value,a?(i=r.localName||i,s=e.getAttributeNS(a,i),s!==o&&(r.prefix===`xmlns`&&(i=r.name),e.setAttributeNS(a,i,o))):(s=e.getAttribute(i),s!==o&&e.setAttribute(i,o));for(var u=e.attributes,d=u.length-1;d>=0;d--)r=u[d],i=r.name,a=r.namespaceURI,a?(i=r.localName||i,t.hasAttributeNS(a,i)||e.removeAttributeNS(a,i)):t.hasAttribute(i)||e.removeAttribute(i)}}var u,d=`http://www.w3.org/1999/xhtml`,f=typeof document>`u`?void 0:document,p=!!f&&`content`in f.createElement(`template`),m=!!f&&f.createRange&&`createContextualFragment`in f.createRange();function h(e){var t=f.createElement(`template`);return t.innerHTML=e,t.content.childNodes[0]}function g(e){return u||(u=f.createRange(),u.selectNode(f.body)),u.createContextualFragment(e).childNodes[0]}function _(e){var t=f.createElement(`body`);return t.innerHTML=e,t.childNodes[0]}function v(e){return e=e.trim(),p?h(e):m?g(e):_(e)}function y(e,t){var n=e.nodeName,r=t.nodeName,i,a;return n===r?!0:(i=n.charCodeAt(0),a=r.charCodeAt(0),i<=90&&a>=97?n===r.toUpperCase():a<=90&&i>=97?r===n.toUpperCase():!1)}function b(e,t){return!t||t===d?f.createElement(e):f.createElementNS(t,e)}function x(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function S(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,``):e.removeAttribute(n))}var C={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r===`OPTGROUP`&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r===`SELECT`&&!n.hasAttribute(`multiple`)&&(e.hasAttribute(`selected`)&&!t.selected&&(e.setAttribute(`selected`,`selected`),e.removeAttribute(`selected`)),n.selectedIndex=-1)}S(e,t,`selected`)},INPUT:function(e,t){S(e,t,`checked`),S(e,t,`disabled`),e.value!==t.value&&(e.value=t.value),t.hasAttribute(`value`)||e.removeAttribute(`value`)},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var i=r.nodeValue;if(i==n||!n&&i==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute(`multiple`)){for(var n=-1,r=0,i=e.firstChild,a,o;i;)if(o=i.nodeName&&i.nodeName.toUpperCase(),o===`OPTGROUP`)a=i,i=a.firstChild,i||(i=a.nextSibling,a=null);else{if(o===`OPTION`){if(i.hasAttribute(`selected`)){n=r;break}r++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}e.selectedIndex=n}}},w=1,T=11,E=3,D=8;function O(){}function k(e){if(e)return e.getAttribute&&e.getAttribute(`id`)||e.id}function A(e){return function(t,n,r){if(r||={},typeof n==`string`)if(t.nodeName===`#document`||t.nodeName===`HTML`){var i=n;n=f.createElement(`html`),n.innerHTML=i}else if(t.nodeName===`BODY`){var a=n;n=f.createElement(`html`),n.innerHTML=a;var o=n.querySelector(`body`);o&&(n=o)}else n=v(n);else n.nodeType===T&&(n=n.firstElementChild);var s=r.getNodeKey||k,c=r.onBeforeNodeAdded||O,l=r.onNodeAdded||O,u=r.onBeforeElUpdated||O,d=r.onElUpdated||O,p=r.onBeforeNodeDiscarded||O,m=r.onNodeDiscarded||O,h=r.onBeforeElChildrenUpdated||O,g=r.skipFromChildren||O,_=r.addChild||function(e,t){return e.appendChild(t)},S=r.childrenOnly===!0,A=Object.create(null),j=[];function M(e){j.push(e)}function N(e,t){if(e.nodeType===w)for(var n=e.firstChild;n;){var r=void 0;t&&(r=s(n))?M(r):(m(n),n.firstChild&&N(n,t)),n=n.nextSibling}}function P(e,t,n){p(e)!==!1&&(t&&t.removeChild(e),m(e),N(e,n))}function F(e){if(e.nodeType===w||e.nodeType===T)for(var t=e.firstChild;t;){var n=s(t);n&&(A[n]=t),F(t),t=t.nextSibling}}F(t);function I(e){l(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=s(t);if(r){var i=A[r];i&&y(t,i)?(t.parentNode.replaceChild(i,t),R(i,t)):I(t)}else I(t);t=n}}function L(e,t,n){for(;t;){var r=t.nextSibling;(n=s(t))?M(n):P(t,e,!0),t=r}}function R(t,n,r){var i=s(n);if(i&&delete A[i],!r){var a=u(t,n);if(a===!1||(a instanceof HTMLElement&&(t=a,F(t)),e(t,n),d(t),h(t,n)===!1))return}t.nodeName===`TEXTAREA`?C.TEXTAREA(t,n):z(t,n)}function z(e,t){var n=g(e,t),r=t.firstChild,i=e.firstChild,a,o,l,u,d;outer:for(;r;){for(u=r.nextSibling,a=s(r);!n&&i;){if(l=i.nextSibling,r.isSameNode&&r.isSameNode(i)){r=u,i=l;continue outer}o=s(i);var p=i.nodeType,m=void 0;if(p===r.nodeType&&(p===w?(a?a!==o&&((d=A[a])?l===d?m=!1:(e.insertBefore(d,i),o?M(o):P(i,e,!0),i=d,o=s(i)):m=!1):o&&(m=!1),m=m!==!1&&y(i,r),m&&R(i,r)):(p===E||p==D)&&(m=!0,i.nodeValue!==r.nodeValue&&(i.nodeValue=r.nodeValue))),m){r=u,i=l;continue outer}o?M(o):P(i,e,!0),i=l}if(a&&(d=A[a])&&y(d,r))n||_(e,d),R(d,r);else{var h=c(r);h!==!1&&(h&&(r=h),r.actualize&&(r=r.actualize(e.ownerDocument||f)),_(e,r),I(r))}r=u,i=l}L(e,i,o);var v=C[e.nodeName];v&&v(e,t)}var B=t,V=B.nodeType,H=n.nodeType;if(!S){if(V===w)H===w?y(t,n)||(m(t),B=x(t,b(n.nodeName,n.namespaceURI))):B=n;else if(V===E||V===D){if(H===V)return B.nodeValue!==n.nodeValue&&(B.nodeValue=n.nodeValue),B;B=n}}if(B===n)m(t);else{if(n.isSameNode&&n.isSameNode(B))return;if(R(B,n,S),j)for(var U=0,W=j.length;Ut in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>N(e,typeof t==`symbol`?t:t+``,n),F=class e{constructor(e,t){P(this,`previewClient`),P(this,`morphdomOptions`),P(this,`elementCache`,new Map),P(this,`regionCommentsCache`,new Map),P(this,`childrenCommentsCache`,new Map),P(this,`pendingScripts`,new Set),P(this,`scriptExecutionCount`,{total:0,completed:0,failed:0}),this.previewClient=e||new s,this.morphdomOptions=t?.morphdom||{},this.previewClient.on(`updates.effects`,this.handleEffects.bind(this)),this.previewClient.on(`craftile.editor.updates`,this.handleDirectUpdates.bind(this)),this.cacheRegionComments(),this.cacheChildrenComments()}static init(t,n){return new e(t,n)}getElementCached(e){if(this.elementCache.has(e)){let t=this.elementCache.get(e);if(t.isConnected)return t;this.elementCache.delete(e)}let t=document.querySelector(`[data-block="${e}"]`);return t&&this.elementCache.set(e,t),t}cacheRegionComments(){let e=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),t,n=new Map;for(;t=e.nextNode();){let e=t.textContent?.trim();if(e){if(e.startsWith(`BEGIN region: `)){let r=e.substring(14);n.set(r,t)}else if(e.startsWith(`END region: `)){let r=e.substring(12),i=n.get(r);i&&(this.regionCommentsCache.set(r,{begin:i,end:t}),n.delete(r))}}}}cacheChildrenComments(){let e=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null),t,n=new Map;for(;t=e.nextNode();){let e=t.textContent?.trim();if(e){if(e.startsWith(`BEGIN children: `)){let r=e.substring(16);n.set(r,t)}else if(e.startsWith(`END children: `)){let r=e.substring(14),i=n.get(r);i&&(this.childrenCommentsCache.set(r,{begin:i,end:t}),n.delete(r))}}}}cacheChildrenCommentsForBlock(e){let t=this.getElementCached(e);if(!t)return;this.childrenCommentsCache.delete(e);let n=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null),r,i=null;for(;r=n.nextNode();){let t=r.textContent?.trim();if(t){if(t===`BEGIN children: ${e}`)i=r;else if(t===`END children: ${e}`&&i){this.childrenCommentsCache.set(e,{begin:i,end:r});break}}}}invalidateCache(e){[...e.updated,...e.removed].forEach(e=>{this.elementCache.delete(e),this.childrenCommentsCache.delete(e)})}handleEffects(e){let{effects:t,blocks:n,regions:r,changes:i}=e;t&&(this.invalidateCache(i),t.html&&this.handleHtmlEffects(t.html,{blocks:n,regions:r,changes:i}),t.css&&this.handleCssEffects(t.css),t.js&&this.handleJsEffects(t.js))}handleCssEffects(e){for(let t of e)this.injectStyleElement(t)}injectStyleElement(e){let t=document.createElement(`div`);t.innerHTML=e;let n=t.firstElementChild;if(!n||n.tagName!==`STYLE`&&n.tagName!==`LINK`){console.warn(`Invalid CSS element provided:`,e);return}let r=n.id;if(r){let e=document.getElementById(r);if(e&&(e.tagName===`STYLE`||e.tagName===`LINK`)){e.parentNode?.replaceChild(n,e);return}}if(n.tagName===`STYLE`&&!r){let e=n.textContent?.trim();if(e){let t=document.querySelectorAll(`style:not([id])`);for(let n of t)if(n.textContent?.trim()===e)return}}if(n.tagName===`LINK`&&!r){let e=n.getAttribute(`href`),t=n.getAttribute(`rel`);if(e){let n=document.querySelectorAll(`link:not([id])`);for(let r of n)if(r.getAttribute(`href`)===e&&r.getAttribute(`rel`)===t)return}}document.head.appendChild(n)}handleJsEffects(e){this.pendingScripts.clear(),this.scriptExecutionCount={total:0,completed:0,failed:0};let t=e.filter(e=>e?.trim());if(this.scriptExecutionCount.total=t.length,t.length===0){this.emitScriptExecutionComplete();return}for(let e of t)this.injectScriptElement(e)}injectScriptElement(e){let t=document.createElement(`div`);t.innerHTML=e;let n=t.firstElementChild;if(!n||n.tagName!==`SCRIPT`){console.warn(`Invalid script element provided:`,e),this.onScriptCompleted(!1);return}let r=n.id;if(r){let e=document.getElementById(r);if(e&&e.tagName===`SCRIPT`){this.pendingScripts.delete(e),e.parentNode?.replaceChild(n,e),this.trackScriptExecution(n);return}}if(!n.src&&!r){let e=n.textContent?.trim();if(e){let t=document.querySelectorAll(`script:not([src]):not([id])`);for(let n of t)if(n.textContent?.trim()===e){this.onScriptCompleted(!0);return}}}if(n.src&&!r){let e=n.src,t=document.querySelectorAll(`script[src]:not([id])`);for(let n of t)if(n.src===e){this.onScriptCompleted(!0);return}}document.head.appendChild(n),this.trackScriptExecution(n)}trackScriptExecution(e){if(e.src){this.pendingScripts.add(e);let t=()=>{this.pendingScripts.delete(e),this.onScriptCompleted(!0),e.removeEventListener(`load`,t),e.removeEventListener(`error`,n)},n=()=>{this.pendingScripts.delete(e),this.onScriptCompleted(!1),e.removeEventListener(`load`,t),e.removeEventListener(`error`,n)};e.addEventListener(`load`,t),e.addEventListener(`error`,n)}else this.onScriptCompleted(!0)}onScriptCompleted(e){e?this.scriptExecutionCount.completed++:this.scriptExecutionCount.failed++,this.scriptExecutionCount.completed+this.scriptExecutionCount.failed>=this.scriptExecutionCount.total&&this.emitScriptExecutionComplete()}emitScriptExecutionComplete(){this.previewClient.emit(`scripts.execution.complete`,{total:this.scriptExecutionCount.total,completed:this.scriptExecutionCount.completed,failed:this.scriptExecutionCount.failed,success:this.scriptExecutionCount.failed===0})}handleDirectUpdates(e){let{changes:t}=e;t.moved&&this.handleMoves(e),t.updated.length>0&&this.handleDisabledBlocks(e),t.removed.length>0&&this.handleRemoves(e)}handleMoves(e){let{blocks:t,changes:n}=e;for(let[r,i]of Object.entries(e.changes.moved)){if(i?.toParent&&n.updated?.includes(i?.toParent))continue;if(!this.isValidMoveInstruction(i)){console.warn(`Invalid move instruction for block ${r}:`,i);continue}let e=t[r],a=n.positions?.[r];this.moveBlockUsingDOM(e,i,a)}}handleDisabledBlocks(e){let{blocks:t,changes:n}=e;for(let e of n.updated){let n=t[e];if(!n)continue;let r=!!this.getElementCached(e);n.disabled&&r?this.removeBlock(n.id):n.disabled}}handleRemoves(e){let{changes:t}=e;for(let e of t.removed)this.removeBlock(e)}handleHtmlEffects(e,t){let{blocks:n,changes:r}=t;for(let[t,i]of Object.entries(e)){if(!i)continue;let e=n[t];if(!e){console.warn(`Block data not found for ${t}`);continue}if(e.disabled){console.debug(`Skipping disabled block ${t}`);continue}if(this.getElementCached(t))this.updateBlockHtml(e,i);else{let n=r.positions?.[t];if(!n){console.warn(`No position info for block ${t}`);continue}this.insertBlock(e,i,n)}}}isValidMoveInstruction(e){let t=!!(e.toParent||e.toRegion),n=e.toIndex===void 0||e.toIndex>=0;return t&&n}removeBlock(e){let t=this.getElementCached(e);t?(this.previewClient.emit(`block.remove.before`,{blockId:e,element:t}),t.remove(),this.elementCache.delete(e),this.previewClient.emit(`block.remove.after`,{blockId:e,element:t})):console.warn(`Block ${e} not found for removal`)}moveBlockUsingDOM(e,t,n){let r=this.getElementCached(e.id),{toParent:i,toRegion:a,toIndex:o}=t;if(!r){console.warn(`Block element ${e.id} not found for move operation`);return}this.previewClient.emit(`block.move.before`,{blockId:e.id,blockType:e.type,block:e,element:r,toParent:i,toRegion:a,toIndex:o});let s=n?.afterId,c=n?.beforeId;if(i){let e=this.getElementCached(i);if(!e){console.error(`Parent element ${i} not found for move operation`);return}this.insertElementInParent(r,e,s,c)}else if(a){let e=this.findRegionInsertionPoint(a,s,c);if(!e){console.error(`Failed to find insertion point for region: ${a}`);return}e.parent.insertBefore(r,e.before)}this.previewClient.emit(`block.move.after`,{blockId:e.id,blockType:e.type,block:e,element:r,toParent:i,toRegion:a,toIndex:o})}insertBlock(e,t,n){if(this.getElementCached(e.id))return;this.previewClient.emit(`block.insert.before`,{blockId:e.id,blockType:e.type,block:e,html:t,positionInfo:n});let r=this.parseHtmlElement(t,e.id);if(!r)return;let{parentId:i,regionId:a,afterId:o,beforeId:s}=n;if(i){let t=this.getElementCached(i);if(!t){console.error(`Parent element ${i} not found for block ${e.id}`);return}this.insertElementInParent(r,t,o,s)}else if(a){let e=this.findRegionInsertionPoint(a,o,s);if(!e){console.error(`Failed to find insertion point for region: ${a}`);return}e.parent.insertBefore(r,e.before)}else console.warn(`No parent or region specified for block ${e.id}, inserting into body`),document.body.appendChild(r);this.elementCache.set(e.id,r),this.cacheChildrenCommentsForBlock(e.id),r.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`nearest`}),this.previewClient.emit(`block.insert.after`,{blockId:e.id,blockType:e.type,block:e,element:r,html:t,positionInfo:n})}updateBlockHtml(e,t){if(!t){console.warn(`No HTML provided for block ${e.id}`);return}let n=this.getElementCached(e.id);if(!n){console.warn(`Block element ${e.id} not found for HTML update`);return}this.previewClient.emit(`block.update.before`,{blockId:e.id,blockType:e.type,block:e,element:n,html:t}),j(n,t,this.morphdomOptions),this.elementCache.delete(e.id);let r=this.getElementCached(e.id);if(!r){console.error(`Block element ${e.id} not found after morphdom update`);return}r!==n&&this.previewClient.inspector.updateTrackedElement(e.id,r),this.cacheChildrenCommentsForBlock(e.id),this.previewClient.emit(`block.update.after`,{blockId:e.id,blockType:e.type,block:e,element:r,html:t})}insertElementInParent(e,t,n,r){let i=t.getAttribute(`data-block`),a=i?this.childrenCommentsCache.get(i):null;if(a){let t=null;if(r)t=this.getElementCached(r);else if(n){let e=this.getElementCached(n);e&&e.nextSibling&&(t=e.nextSibling)}t||=a.end,a.begin.parentNode.insertBefore(e,t)}else{let i=null;if(r)i=this.getElementCached(r);else if(n){let e=this.getElementCached(n);e&&(i=e.nextElementSibling)}t.insertBefore(e,i)}}findRegionInsertionPoint(e,t,n){let r=this.regionCommentsCache.get(e);if(!r)return console.error(`Region comments not found for region: ${e}`),null;let{begin:i,end:a}=r,o=null;if(n){let e=this.getElementCached(n);e&&(o=e)}else if(t){let e=this.getElementCached(t);e&&e.nextSibling&&(o=e.nextSibling)}return o||=a,{parent:i.parentNode,before:o}}parseHtmlElement(e,t){if(!e.trim())return console.error(`Empty HTML provided for block ${t}`),null;let n=document.createElement(`div`);return n.innerHTML=e,n.firstElementChild||(console.error(`Invalid HTML for block ${t}: no element found`),null)}},I=new s,L=!1,R=new Set,z=new Map;function B(e,t){let n=`data-live-update-${e}.${t}`;z.set(e,t),R.add(n)}function V(e){return Array.from(e.attributes).some(e=>R.has(e.name))}window.addEventListener(`error`,e=>{L&&e.message===`Uncaught Could not find Livewire component in DOM tree`&&e.preventDefault()});function H(){return function(e,t){if(e instanceof HTMLElement&&e.hasAttribute(`data-morph-ignore`)||e instanceof HTMLElement&&V(e))return!1;if(e instanceof HTMLElement&&e.hasAttribute(`wire:id`)&&t.hasAttribute(`wire:id`)){let n=e.__livewire;if(!n)return!0;let r=t.getAttribute(`wire:snapshot`),i=JSON.parse(t.getAttribute(`wire:effects`));return i.html=t.outerHTML,n.mergeNewSnapshot(r,i),L=!0,n.processEffects(i),setTimeout(()=>{L=!1}),!1}return e._x_dataStack&&typeof window.Alpine?.morph==`function`?(window.Alpine.morph(e,t,{updating(e,t,n){if(e instanceof HTMLElement&&t instanceof HTMLElement){if(V(e))return!1;if(e.hasAttribute(`wire:id`))return n()}}}),!1):!0}}F.init(I,{morphdom:{onBeforeElUpdated:H()}}),I.on(`page.refresh`,e=>{let t=new DOMParser().parseFromString(e.html,`text/html`);j(document.head,t.head,{childrenOnly:!0}),j(document.body,t.body,{childrenOnly:!0,onBeforeElUpdated:H()})});function U(e){let{block:t,key:n,value:r}=e,i=z.get(t.id);if(i&&i!==n){let e=`data-live-update-${t.id}.${i}`;R.delete(e),z.delete(t.id)}let a=`data-live-update-${[t.id,n].filter(Boolean).join(`.`)}`,o=`[${CSS.escape(a)}]`,s=document.querySelectorAll(o);if(s.length){B(t.id,n);for(let e of s){let[t,n]=e.getAttribute(a)?.split(/:(.+)/)??[`text`,void 0];switch(t){case`text`:e.textContent=r;break;case`html`:e.innerHTML=r;break;case`outerHTML`:e.outerHTML=r;break;case`attr`:if(r)e.setAttribute(n,r);else{if(e.tagName.toLowerCase()===`img`&&n===`src`)return!1;e.removeAttribute(n)}break;case`style`:r?e.style.setProperty(n,r):e.style.removeProperty(n);break;case`toggleClass`:e.classList.toggle(n);break;default:console.warn(`Unknown live update type: ${t}`)}}}}I.on(`block.property.updated`,U);var W=new class{on(e,t){let n=(e=>{t(e.detail)});return window.addEventListener(e,n),()=>{window.removeEventListener(e,n)}}off(e,t){window.removeEventListener(e,t)}emit(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}isResponsiveValue(e){return typeof e==`object`&&!!e&&`_default`in e}getResponsiveValue(e,t,n){return typeof e==`object`&&e&&`_default`in e?e[t]??e._default??n:e??n}handleLiveUpdate(e,t,n){U({block:{id:e},key:t,value:n,oldValue:void 0})}reload(){window.location.reload()}};I.on(`block.property.updated`,e=>{W.emit(`visual:block:setting:updated`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:setting:updated`,e)}),I.on(`block.insert.before`,e=>{W.emit(`visual:block:adding`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:adding`,{...e,sectionId:e.blockId,section:e.block})}),I.on(`block.insert.after`,e=>{W.emit(`visual:block:added`,e),W.emit(`visual:block:load`,e),e.block&&!e.block.parentId&&(W.emit(`visual:section:added`,{...e,sectionId:e.blockId,section:e.block}),W.emit(`visual:section:load`,{...e,sectionId:e.blockId,section:e.block}))}),I.on(`block.remove.before`,e=>{W.emit(`visual:block:removing`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:removing`,{...e,sectionId:e.blockId,section:e.block})}),I.on(`block.remove.after`,e=>{W.emit(`visual:block:removed`,e),W.emit(`visual:block:unload`,e),e.block&&!e.block.parentId&&(W.emit(`visual:section:removed`,{...e,sectionId:e.blockId,section:e.block}),W.emit(`visual:section:unload`,{...e,sectionId:e.blockId,section:e.block}))}),I.on(`block.move.before`,e=>{W.emit(`visual:block:moving`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:moving`,{...e,sectionId:e.blockId,section:e.block})}),I.on(`block.move.after`,e=>{W.emit(`visual:block:moved`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:moved`,{...e,sectionId:e.blockId,section:e.block})}),I.on(`block.update.before`,e=>{W.emit(`visual:block:updating`,e),e.block&&!e.block.parentId&&W.emit(`visual:section:updating`,{...e,sectionId:e.blockId,section:e.block})}),I.on(`block.update.after`,e=>{W.emit(`visual:block:updated`,e),W.emit(`visual:block:load`,e),e.block&&!e.block.parentId&&(W.emit(`visual:section:updated`,{...e,sectionId:e.blockId,section:e.block}),W.emit(`visual:section:load`,{...e,sectionId:e.blockId,section:e.block}))}),window.Visual=W; \ No newline at end of file diff --git a/public/vendor/bagistoplus/visual/editor/assets/injected-Dl3UALAJ.js b/public/vendor/bagistoplus/visual/editor/assets/injected-Dl3UALAJ.js deleted file mode 100644 index e9ec44a0..00000000 --- a/public/vendor/bagistoplus/visual/editor/assets/injected-Dl3UALAJ.js +++ /dev/null @@ -1 +0,0 @@ -var be=Object.defineProperty,ge=(i,e,t)=>e in i?be(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,g=(i,e,t)=>ge(i,typeof e!="symbol"?e+"":e,t);class ke{constructor(e,t="*"){g(this,"handlers",new Map),g(this,"targetWindow"),g(this,"targetOrigin"),g(this,"fallbackHandler"),this.targetWindow=e,this.targetOrigin=t,window.addEventListener("message",this.handleMessage.bind(this))}handleMessage(e){const t=e.data;if(!t.type)return;const n=this.handlers.get(t.type);n?n.forEach(r=>r(t.payload,e)):this.fallbackHandler&&this.fallbackHandler(e.data,e)}send(e,t){const n={type:e,payload:t};this.targetWindow.postMessage(n,this.targetOrigin)}listen(e,t){return this.handlers.has(e)||this.handlers.set(e,[]),this.handlers.get(e).push(t),()=>{const n=this.handlers.get(e);if(n){const r=n.indexOf(t);r>-1&&n.splice(r,1)}}}registerFallbackHandler(e){this.fallbackHandler=e}}function Ce(i="*"){if(window.parent===window)throw new Error("Not inside an iframe");return new ke(window.parent,i)}class we{constructor(){g(this,"listeners",new Map)}on(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{this.off(e,t)}}off(e,t){const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t){const n=r=>{t(r),this.off(e,n)};this.on(e,n)}emit(e,...t){const n=this.listeners.get(e);if(n){const r=t[0];n.forEach(s=>{try{s(r)}catch(o){console.error(`Error in event listener for '${String(e)}':`,o)}})}}removeAllListeners(e){e?this.listeners.delete(e):this.listeners.clear()}}class Ee{constructor(e){g(this,"active",!0),g(this,"messenger"),g(this,"currentHoveredBlock",null),g(this,"currentSelectedBlock",null),g(this,"overlayButtonHovered",!1),g(this,"resizeObserver",null),g(this,"mutationObserver",null),this.messenger=e,this.messenger.listen("craftile.inspector.enable",()=>this.enable()),this.messenger.listen("craftile.inspector.disable",()=>this.disable()),this.messenger.listen("craftile.inspector.overlay-button-enter",this.handleOverlayButtonEnter.bind(this)),this.messenger.listen("craftile.inspector.overlay-button-leave",this.handleOverlayButtonLeave.bind(this)),this.messenger.listen("craftile.editor.select-block",this.handleEditorSelectBlock.bind(this)),this.messenger.listen("craftile.editor.deselect-block",this.handleEditorDeselectBlock.bind(this)),window.addEventListener("scroll",this.handleScroll.bind(this),{passive:!0}),this.setupGlobalEventListeners()}updateTrackedElement(e,t){this.currentHoveredBlock?.dataset.block===e&&(this.currentHoveredBlock=t,this.sendHoveredBlockPosition()),this.currentSelectedBlock?.dataset.block===e&&(this.currentSelectedBlock=t,requestAnimationFrame(()=>{this.sendSelectedBlockPosition(!0)}),this.trackSelectedBlock())}enable(){this.active=!0,document.body.classList.add("craftile-inspector-active"),this.currentSelectedBlock&&this.trackSelectedBlock()}disable(){this.active=!1,document.body.classList.remove("craftile-inspector-active"),this.currentHoveredBlock=null,this.overlayButtonHovered=!1,this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null)}handleOverlayButtonEnter(){this.overlayButtonHovered=!0}handleOverlayButtonLeave(e){this.overlayButtonHovered=!1,this.currentHoveredBlock||this.messenger.send("craftile.preview.block-leave")}handleEditorSelectBlock(e){const t=document.querySelector(`[data-block="${e.blockId}"]`);t&&(this.currentSelectedBlock=t,this.sendSelectedBlockPosition(),this.trackSelectedBlock(),t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))}handleEditorDeselectBlock(){this.currentSelectedBlock=null,this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null)}handleScroll(){this.active&&(this.currentSelectedBlock&&this.sendSelectedBlockPosition(),this.currentHoveredBlock&&this.sendHoveredBlockPosition())}setupGlobalEventListeners(){document.addEventListener("mouseover",this.handleGlobalHover.bind(this)),document.addEventListener("mouseout",this.handleGlobalLeave.bind(this)),document.addEventListener("click",this.handleGlobalClick.bind(this),{capture:!0})}handleGlobalHover(e){if(!this.active)return;const t=e.target.closest("[data-block]");t&&(e.stopPropagation(),this.currentHoveredBlock=t,this.sendHoveredBlockPosition())}handleGlobalLeave(e){!this.active||!e.target.closest("[data-block]")||this.overlayButtonHovered||(this.currentHoveredBlock=null,this.messenger.send("craftile.preview.block-leave"))}handleGlobalClick(e){if(this.messenger.send("craftile.preview.click"),!this.active)return;const t=e.target.closest("[data-block]");if(!t||!t.getAttribute("data-block"))return;this.currentSelectedBlock===t||(e.preventDefault(),e.stopImmediatePropagation(),this.currentSelectedBlock=t,this.sendSelectedBlockPosition(),this.trackSelectedBlock())}sendHoveredBlockPosition(){const e=this.computeElementPositioning(this.currentHoveredBlock);this.messenger.send("craftile.preview.block-hover",{blockRect:e.rect,parentRect:e.parentRect,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,blockId:this.currentHoveredBlock.dataset.block,parentFlexDirection:e.parentFlexDirection})}sendSelectedBlockPosition(e=!1){if(!this.currentSelectedBlock)return;const t=this.computeElementPositioning(this.currentSelectedBlock);this.messenger.send(e?"craftile.preview.update-selected-block":"craftile.preview.block-select",{blockRect:t.rect,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,blockId:this.currentSelectedBlock.dataset.block})}trackSelectedBlock(){if(!this.currentSelectedBlock)return;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.resizeObserver=new ResizeObserver(()=>{this.active&&this.currentSelectedBlock&&this.sendSelectedBlockPosition(!0)}),this.resizeObserver.observe(this.currentSelectedBlock),this.mutationObserver=new MutationObserver(()=>{this.active&&this.currentSelectedBlock&&this.sendSelectedBlockPosition(!0)}),this.mutationObserver.observe(this.currentSelectedBlock,{attributes:!0,subtree:!1});let e=this.currentSelectedBlock.parentElement;for(;e&&(this.mutationObserver.observe(e,{childList:!0,subtree:!1}),e!==document.body);)e=e.parentElement}computeElementPositioning(e){const t=e.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=window.pageXOffset||document.documentElement.scrollLeft,s=this.findEldestParentBlock(e),o=s&&s!==e?s.getBoundingClientRect():void 0,l=this.getElementFlexDirection(e.parentElement);return{rect:t,parentRect:o,scrollTop:n,scrollLeft:r,parentFlexDirection:l}}findEldestParentBlock(e){let t=null,n=e.parentElement;for(;n&&n!==document.body;)n.hasAttribute("data-block")&&(t=n),n=n.parentElement;return t}getElementFlexDirection(e){if(!e)return"column";const t=window.getComputedStyle(e),n=t.display.includes("flex")?t.flexDirection:"column";return n==="row"||n==="row-reverse"?"row":"column"}}class ae extends we{constructor(){super(),g(this,"messenger"),g(this,"inspector"),this.messenger=Ce(window.origin),this.inspector=new Ee(this.messenger),this.initialize()}initialize(){window.addEventListener("load",()=>{this.messenger.send("craftile.preview.ready",{}),setTimeout(()=>{this.sendPageData()},0)}),this.messenger.registerFallbackHandler(e=>{const{type:t,payload:n}=e;this.emit(t,n)})}sendPageData(){const e=document.getElementById("page-data");if(e)try{const t=JSON.parse(e.textContent||"{}");this.messenger.send("craftile.preview.page-data",{pageData:t})}catch(t){console.error("Failed to parse page data:",t)}}}var ie=11;function Se(i,e){var t=e.attributes,n,r,s,o,l;if(!(e.nodeType===ie||i.nodeType===ie)){for(var h=t.length-1;h>=0;h--)n=t[h],r=n.name,s=n.namespaceURI,o=n.value,s?(r=n.localName||r,l=i.getAttributeNS(s,r),l!==o&&(n.prefix==="xmlns"&&(r=n.name),i.setAttributeNS(s,r,o))):(l=i.getAttribute(r),l!==o&&i.setAttribute(r,o));for(var d=i.attributes,m=d.length-1;m>=0;m--)n=d[m],r=n.name,s=n.namespaceURI,s?(r=n.localName||r,e.hasAttributeNS(s,r)||i.removeAttributeNS(s,r)):e.hasAttribute(r)||i.removeAttribute(r)}}var $,Be="http://www.w3.org/1999/xhtml",k=typeof document>"u"?void 0:document,ye=!!k&&"content"in k.createElement("template"),Te=!!k&&k.createRange&&"createContextualFragment"in k.createRange();function Ie(i){var e=k.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function Oe(i){$||($=k.createRange(),$.selectNode(k.body));var e=$.createContextualFragment(i);return e.childNodes[0]}function xe(i){var e=k.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Ne(i){return i=i.trim(),ye?Ie(i):Te?Oe(i):xe(i)}function _(i,e){var t=i.nodeName,n=e.nodeName,r,s;return t===n?!0:(r=t.charCodeAt(0),s=n.charCodeAt(0),r<=90&&s>=97?t===n.toUpperCase():s<=90&&r>=97?n===t.toUpperCase():!1)}function Ae(i,e){return!e||e===Be?k.createElement(i):k.createElementNS(e,i)}function Le(i,e){for(var t=i.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function K(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var re={OPTION:function(i,e){var t=i.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}K(i,e,"selected")},INPUT:function(i,e){K(i,e,"checked"),K(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var n=i.firstChild;if(n){var r=n.nodeValue;if(r==t||!t&&r==i.placeholder)return;n.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,r=i.firstChild,s,o;r;)if(o=r.nodeName&&r.nodeName.toUpperCase(),o==="OPTGROUP")s=r,r=s.firstChild,r||(r=s.nextSibling,s=null);else{if(o==="OPTION"){if(r.hasAttribute("selected")){t=n;break}n++}r=r.nextSibling,!r&&s&&(r=s.nextSibling,s=null)}i.selectedIndex=t}}},N=1,se=11,oe=3,le=8;function y(){}function Pe(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function Me(i){return function(t,n,r){if(r||(r={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var s=n;n=k.createElement("html"),n.innerHTML=s}else n=Ne(n);else n.nodeType===se&&(n=n.firstElementChild);var o=r.getNodeKey||Pe,l=r.onBeforeNodeAdded||y,h=r.onNodeAdded||y,d=r.onBeforeElUpdated||y,m=r.onElUpdated||y,A=r.onBeforeNodeDiscarded||y,w=r.onNodeDiscarded||y,fe=r.onBeforeElChildrenUpdated||y,ue=r.skipFromChildren||y,Z=r.addChild||function(c,a){return c.appendChild(a)},F=r.childrenOnly===!0,I=Object.create(null),L=[];function P(c){L.push(c)}function ee(c,a){if(c.nodeType===N)for(var v=c.firstChild;v;){var f=void 0;a&&(f=o(v))?P(f):(w(v),v.firstChild&&ee(v,a)),v=v.nextSibling}}function M(c,a,v){A(c)!==!1&&(a&&a.removeChild(c),w(c),ee(c,v))}function z(c){if(c.nodeType===N||c.nodeType===se)for(var a=c.firstChild;a;){var v=o(a);v&&(I[v]=a),z(a),a=a.nextSibling}}z(t);function G(c){h(c);for(var a=c.firstChild;a;){var v=a.nextSibling,f=o(a);if(f){var u=I[f];u&&_(a,u)?(a.parentNode.replaceChild(u,a),H(u,a)):G(a)}else G(a);a=v}}function me(c,a,v){for(;a;){var f=a.nextSibling;(v=o(a))?P(v):M(a,c,!0),a=f}}function H(c,a,v){var f=o(a);if(f&&delete I[f],!v){var u=d(c,a);if(u===!1||(u instanceof HTMLElement&&(c=u,z(c)),i(c,a),m(c),fe(c,a)===!1))return}c.nodeName!=="TEXTAREA"?pe(c,a):re.TEXTAREA(c,a)}function pe(c,a){var v=ue(c,a),f=a.firstChild,u=c.firstChild,O,E,x,R,S;e:for(;f;){for(R=f.nextSibling,O=o(f);!v&&u;){if(x=u.nextSibling,f.isSameNode&&f.isSameNode(u)){f=R,u=x;continue e}E=o(u);var U=u.nodeType,B=void 0;if(U===f.nodeType&&(U===N?(O?O!==E&&((S=I[O])?x===S?B=!1:(c.insertBefore(S,u),E?P(E):M(u,c,!0),u=S,E=o(u)):B=!1):E&&(B=!1),B=B!==!1&&_(u,f),B&&H(u,f)):(U===oe||U==le)&&(B=!0,u.nodeValue!==f.nodeValue&&(u.nodeValue=f.nodeValue))),B){f=R,u=x;continue e}E?P(E):M(u,c,!0),u=x}if(O&&(S=I[O])&&_(S,f))v||Z(c,S),H(S,f);else{var j=l(f);j!==!1&&(j&&(f=j),f.actualize&&(f=f.actualize(c.ownerDocument||k)),Z(c,f),G(f))}f=R,u=x}me(c,u,E);var ne=re[c.nodeName];ne&&ne(c,a)}var b=t,D=b.nodeType,te=n.nodeType;if(!F){if(D===N)te===N?_(t,n)||(w(t),b=Le(t,Ae(n.nodeName,n.namespaceURI))):b=n;else if(D===oe||D===le){if(te===D)return b.nodeValue!==n.nodeValue&&(b.nodeValue=n.nodeValue),b;b=n}}if(b===n)w(t);else{if(n.isSameNode&&n.isSameNode(b))return;if(H(b,n,F),L)for(var V=0,ve=L.length;Ve in i?He(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,T=(i,e,t)=>De(i,typeof e!="symbol"?e+"":e,t);const Re=i=>i.id||i.name;class J{constructor(e,t){T(this,"previewClient"),T(this,"morphdomOptions"),T(this,"elementCache",new Map),T(this,"regionCommentsCache",new Map),T(this,"childrenCommentsCache",new Map),T(this,"pendingScripts",new Set),T(this,"scriptExecutionCount",{total:0,completed:0,failed:0}),this.previewClient=e||new ae,this.morphdomOptions=t?.morphdom||{},this.previewClient.on("updates.effects",this.handleEffects.bind(this)),this.previewClient.on("craftile.editor.updates",this.handleDirectUpdates.bind(this)),this.cacheRegionComments(),this.cacheChildrenComments()}static init(e,t){return new J(e,t)}getElementCached(e){if(this.elementCache.has(e)){const n=this.elementCache.get(e);if(n.isConnected)return n;this.elementCache.delete(e)}const t=document.querySelector(`[data-block="${e}"]`);return t&&this.elementCache.set(e,t),t}cacheRegionComments(){const e=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null);let t;const n=new Map;for(;t=e.nextNode();){const r=t.textContent?.trim();if(r){if(r.startsWith("BEGIN region: ")){const s=r.substring(14);n.set(s,t)}else if(r.startsWith("END region: ")){const s=r.substring(12),o=n.get(s);o&&(this.regionCommentsCache.set(s,{begin:o,end:t}),n.delete(s))}}}}cacheChildrenComments(){const e=document.createTreeWalker(document.body,NodeFilter.SHOW_COMMENT,null);let t;const n=new Map;for(;t=e.nextNode();){const r=t.textContent?.trim();if(r){if(r.startsWith("BEGIN children: ")){const s=r.substring(16);n.set(s,t)}else if(r.startsWith("END children: ")){const s=r.substring(14),o=n.get(s);o&&(this.childrenCommentsCache.set(s,{begin:o,end:t}),n.delete(s))}}}}cacheChildrenCommentsForBlock(e){const t=this.getElementCached(e);if(!t)return;this.childrenCommentsCache.delete(e);const n=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT,null);let r,s=null;for(;r=n.nextNode();){const o=r.textContent?.trim();if(o){if(o===`BEGIN children: ${e}`)s=r;else if(o===`END children: ${e}`&&s){this.childrenCommentsCache.set(e,{begin:s,end:r});break}}}}invalidateCache(e){[...e.updated,...e.removed].forEach(t=>{this.elementCache.delete(t),this.childrenCommentsCache.delete(t)})}handleEffects(e){const{effects:t,blocks:n,regions:r,changes:s}=e;t&&(this.invalidateCache(s),t.html&&this.handleHtmlEffects(t.html,{blocks:n,regions:r,changes:s}),t.css&&this.handleCssEffects(t.css),t.js&&this.handleJsEffects(t.js))}handleCssEffects(e){for(const t of e)this.injectStyleElement(t)}injectStyleElement(e){const t=document.createElement("div");t.innerHTML=e;const n=t.firstElementChild;if(!n||n.tagName!=="STYLE"&&n.tagName!=="LINK"){console.warn("Invalid CSS element provided:",e);return}const r=n.id;if(r){const s=document.getElementById(r);if(s&&(s.tagName==="STYLE"||s.tagName==="LINK")){s.parentNode?.replaceChild(n,s);return}}if(n.tagName==="STYLE"&&!r){const s=n.textContent?.trim();if(s){const o=document.querySelectorAll("style:not([id])");for(const l of o)if(l.textContent?.trim()===s)return}}if(n.tagName==="LINK"&&!r){const s=n.getAttribute("href"),o=n.getAttribute("rel");if(s){const l=document.querySelectorAll("link:not([id])");for(const h of l)if(h.getAttribute("href")===s&&h.getAttribute("rel")===o)return}}document.head.appendChild(n)}handleJsEffects(e){this.pendingScripts.clear(),this.scriptExecutionCount={total:0,completed:0,failed:0};const t=e.filter(n=>n?.trim());if(this.scriptExecutionCount.total=t.length,t.length===0){this.emitScriptExecutionComplete();return}for(const n of t)this.injectScriptElement(n)}injectScriptElement(e){const t=document.createElement("div");t.innerHTML=e;const n=t.firstElementChild;if(!n||n.tagName!=="SCRIPT"){console.warn("Invalid script element provided:",e),this.onScriptCompleted(!1);return}const r=n.id;if(r){const s=document.getElementById(r);if(s&&s.tagName==="SCRIPT"){this.pendingScripts.delete(s),s.parentNode?.replaceChild(n,s),this.trackScriptExecution(n);return}}if(!n.src&&!r){const s=n.textContent?.trim();if(s){const o=document.querySelectorAll("script:not([src]):not([id])");for(const l of o)if(l.textContent?.trim()===s){this.onScriptCompleted(!0);return}}}if(n.src&&!r){const s=n.src,o=document.querySelectorAll("script[src]:not([id])");for(const l of o)if(l.src===s){this.onScriptCompleted(!0);return}}document.head.appendChild(n),this.trackScriptExecution(n)}trackScriptExecution(e){if(e.src){this.pendingScripts.add(e);const t=()=>{this.pendingScripts.delete(e),this.onScriptCompleted(!0),e.removeEventListener("load",t),e.removeEventListener("error",n)},n=()=>{this.pendingScripts.delete(e),this.onScriptCompleted(!1),e.removeEventListener("load",t),e.removeEventListener("error",n)};e.addEventListener("load",t),e.addEventListener("error",n)}else this.onScriptCompleted(!0)}onScriptCompleted(e){e?this.scriptExecutionCount.completed++:this.scriptExecutionCount.failed++,this.scriptExecutionCount.completed+this.scriptExecutionCount.failed>=this.scriptExecutionCount.total&&this.emitScriptExecutionComplete()}emitScriptExecutionComplete(){this.previewClient.emit("scripts.execution.complete",{total:this.scriptExecutionCount.total,completed:this.scriptExecutionCount.completed,failed:this.scriptExecutionCount.failed,success:this.scriptExecutionCount.failed===0})}handleDirectUpdates(e){const{changes:t}=e;t.moved&&this.handleMoves(e),t.updated.length>0&&this.handleDisabledBlocks(e),t.removed.length>0&&this.handleRemoves(e)}handleMoves(e){const{blocks:t,changes:n}=e;for(const[r,s]of Object.entries(e.changes.moved)){if(s?.toParent&&n.updated?.includes(s?.toParent))continue;if(!this.isValidMoveInstruction(s)){console.warn(`Invalid move instruction for block ${r}:`,s);continue}const o=t[r];this.moveBlockUsingDOM(o,s)}}handleDisabledBlocks(e){const{blocks:t,changes:n}=e;for(const r of n.updated){const s=t[r];if(!s)continue;const l=!!this.getElementCached(r);s.disabled&&l?this.removeBlock(s.id):s.disabled}}handleRemoves(e){const{changes:t}=e;for(const n of t.removed)this.removeBlock(n)}handleHtmlEffects(e,t){const{blocks:n,regions:r}=t;for(const[s,o]of Object.entries(e)){if(!o)continue;const l=n[s];if(!l){console.warn(`Block data not found for ${s}`);continue}if(l.disabled){console.debug(`Skipping disabled block ${s}`);continue}if(!!this.getElementCached(s))this.updateBlockHtml(l,o);else{const m=this.calculatePosition(l,r,n);this.insertBlock(l,o,m)}}}isValidMoveInstruction(e){const t=!!(e.toParent||e.toRegion),n=e.toIndex===void 0||e.toIndex>=0;return t&&n}removeBlock(e){const t=this.getElementCached(e);t?(this.previewClient.emit("block.remove.before",{blockId:e,element:t}),t.remove(),this.elementCache.delete(e),this.previewClient.emit("block.remove.after",{blockId:e,element:t})):console.warn(`Block ${e} not found for removal`)}moveBlockUsingDOM(e,t){const n=this.getElementCached(e.id),{toParent:r,toRegion:s,toIndex:o}=t;if(!n){console.warn(`Block element ${e.id} not found for move operation`);return}if(this.previewClient.emit("block.move.before",{blockId:e.id,blockType:e.type,block:e,element:n,toParent:r,toRegion:s,toIndex:o}),r){const l=this.getElementCached(r);if(!l){console.error(`Parent element ${r} not found for move operation`);return}this.insertElementInContainer(n,l,e.id,o)}else if(s){const l=this.findRegionInsertionPoint(s,o,void 0,void 0,e.id);if(!l){console.error(`Failed to find insertion point for region: ${s}`);return}l.parent.insertBefore(n,l.before)}this.previewClient.emit("block.move.after",{blockId:e.id,blockType:e.type,block:e,element:n,toParent:r,toRegion:s,toIndex:o})}insertElementInContainer(e,t,n,r){const s=t.getAttribute("data-block"),o=s?this.childrenCommentsCache.get(s):null;if(o){const l=this.findPositionBetweenComments(o.begin,o.end,r,n);l.parent.insertBefore(e,l.before)}else{const h=Array.from(t.children).filter(m=>m.getAttribute("data-block")!==n),d=r!==void 0&&r=0;o--){const l=n[e[o]];if(l&&!l.disabled){r=e[o];break}}for(let o=t+1;oQ.has(t.name))}window.addEventListener("error",i=>{X&&i.message==="Uncaught Could not find Livewire component in DOM tree"&&i.preventDefault()});function de(){return function(e,t){if(e instanceof HTMLElement&&ce(e))return!1;if(e instanceof HTMLElement&&e.hasAttribute("wire:id")&&t.hasAttribute("wire:id")){const n=e.__livewire;if(!n)return!0;const r=t.getAttribute("wire:snapshot"),s=JSON.parse(t.getAttribute("wire:effects"));return s.html=t.outerHTML,n.mergeNewSnapshot(r,s),X=!0,n.processEffects(s),setTimeout(()=>{X=!1}),!1}return e._x_dataStack&&typeof window.Alpine?.morph=="function"?(window.Alpine.morph(e,t,{updating(n,r,s){if(n instanceof HTMLElement&&r instanceof HTMLElement){if(ce(n))return!1;if(n.hasAttribute("wire:id"))return s()}}}),!1):!0}}J.init(C,{morphdom:{onBeforeElUpdated:de()}});C.on("page.refresh",i=>{const t=new DOMParser().parseFromString(i.html,"text/html");q(document.head,t.head,{childrenOnly:!0}),q(document.body,t.body,{childrenOnly:!0,onBeforeElUpdated:de()})});function he(i){const{block:e,key:t,value:n}=i,r=Y.get(e.id);if(r&&r!==t){const d=`data-live-update-${e.id}.${r}`;Q.delete(d),Y.delete(e.id)}const o=`data-live-update-${[e.id,t].filter(Boolean).join(".")}`,l=`[${CSS.escape(o)}]`,h=document.querySelectorAll(l);if(h.length){Ue(e.id,t);for(const d of h){const m=d.getAttribute(o),[A,w]=m?.split(/:(.+)/)??["text",void 0];switch(A){case"text":d.textContent=n;break;case"html":d.innerHTML=n;break;case"outerHTML":d.outerHTML=n;break;case"attr":if(n)d.setAttribute(w,n);else{if(d.tagName.toLowerCase()==="img"&&w==="src")return!1;d.removeAttribute(w)}break;case"style":n?d.style.setProperty(w,n):d.style.removeProperty(w);break;case"toggleClass":d.classList.toggle(w);break;default:console.warn(`Unknown live update type: ${A}`)}}}}C.on("block.property.updated",he);class $e{on(e,t){const n=(r=>{t(r.detail)});return window.addEventListener(e,n),()=>{window.removeEventListener(e,n)}}off(e,t){window.removeEventListener(e,t)}emit(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))}handleLiveUpdate(e,t,n){he({block:{id:e},key:t,value:n})}reload(){window.location.reload()}}const p=new $e;C.on("block.property.updated",i=>{p.emit("visual:block:setting:updated",i),i.block&&!i.block.parentId&&p.emit("visual:section:setting:updated",i)});C.on("block.insert.before",i=>{p.emit("visual:block:adding",i),i.block&&!i.block.parentId&&p.emit("visual:section:adding",{...i,sectionId:i.blockId,section:i.block})});C.on("block.insert.after",i=>{p.emit("visual:block:added",i),p.emit("visual:block:load",i),i.block&&!i.block.parentId&&(p.emit("visual:section:added",{...i,sectionId:i.blockId,section:i.block}),p.emit("visual:section:load",{...i,sectionId:i.blockId,section:i.block}))});C.on("block.remove.before",i=>{p.emit("visual:block:removing",i),i.block&&!i.block.parentId&&p.emit("visual:section:removing",{...i,sectionId:i.blockId,section:i.block})});C.on("block.remove.after",i=>{p.emit("visual:block:removed",i),p.emit("visual:block:unload",i),i.block&&!i.block.parentId&&(p.emit("visual:section:removed",{...i,sectionId:i.blockId,section:i.block}),p.emit("visual:section:unload",{...i,sectionId:i.blockId,section:i.block}))});C.on("block.move.before",i=>{p.emit("visual:block:moving",i),i.block&&!i.block.parentId&&p.emit("visual:section:moving",{...i,sectionId:i.blockId,section:i.block})});C.on("block.move.after",i=>{p.emit("visual:block:moved",i),i.block&&!i.block.parentId&&p.emit("visual:section:moved",{...i,sectionId:i.blockId,section:i.block})});C.on("block.update.before",i=>{p.emit("visual:block:updating",i),i.block&&!i.block.parentId&&p.emit("visual:section:updating",{...i,sectionId:i.blockId,section:i.block})});C.on("block.update.after",i=>{p.emit("visual:block:updated",i),p.emit("visual:block:load",i),i.block&&!i.block.parentId&&(p.emit("visual:section:updated",{...i,sectionId:i.blockId,section:i.block}),p.emit("visual:section:load",{...i,sectionId:i.blockId,section:i.block}))});window.Visual=p; diff --git a/public/vendor/bagistoplus/visual/editor/manifest.json b/public/vendor/bagistoplus/visual/editor/manifest.json index c441671e..f8485e1b 100644 --- a/public/vendor/bagistoplus/visual/editor/manifest.json +++ b/public/vendor/bagistoplus/visual/editor/manifest.json @@ -1,15 +1,15 @@ { "resources/assets/editor/index.ts": { - "file": "assets/index-GXOfLATq.js", + "file": "assets/index-D6kDlnWA.js", "name": "index", "src": "resources/assets/editor/index.ts", "isEntry": true, "css": [ - "assets/index-Ba6OF_gp.css" + "assets/index-DgLZ2f7A.css" ] }, "resources/assets/editor/injected.ts": { - "file": "assets/injected-Dl3UALAJ.js", + "file": "assets/injected-BWCJ6BYp.js", "name": "injected", "src": "resources/assets/editor/injected.ts", "isEntry": true diff --git a/resources/assets/editor/__tests__/craftile/features/updatePersistence.test.ts b/resources/assets/editor/__tests__/craftile/features/updatePersistence.test.ts index 4f0a8426..3b2d55d7 100644 --- a/resources/assets/editor/__tests__/craftile/features/updatePersistence.test.ts +++ b/resources/assets/editor/__tests__/craftile/features/updatePersistence.test.ts @@ -4,12 +4,18 @@ import { mergeUpdates, hasChanges, determineBlocksToProcess, - findRepeatedAncestor, + findClosestRepeated, computeEffects, } from '../../../craftile/features/updatePersistence'; function createUpdatesEvent( - changes: { added?: string[]; updated?: string[]; removed?: string[]; moved?: Record }, + changes: { + added?: string[]; + updated?: string[]; + removed?: string[]; + moved?: Record; + positions?: Record; + }, blocks: Record = {}, regions: any[] = [] ): UpdatesEvent { @@ -19,6 +25,7 @@ function createUpdatesEvent( updated: changes.updated || [], removed: changes.removed || [], moved: changes.moved as any || {}, + positions: changes.positions as any || {}, }, blocks: blocks as any, regions: regions as any, @@ -107,6 +114,45 @@ describe('updatePersistence utilities', () => { }); }); + it('should merge positions objects', () => { + const updates: UpdatesEvent[] = [ + createUpdatesEvent( + { positions: { block1: { parentId: 'parent1', afterId: 'sibling1' } } }, + {} + ), + createUpdatesEvent( + { positions: { block2: { regionId: 'header' } } }, + {} + ), + ]; + + const result = mergeUpdates(updates); + + expect(result.changes.positions).toEqual({ + block1: { parentId: 'parent1', afterId: 'sibling1' }, + block2: { regionId: 'header' }, + }); + }); + + it('should overwrite earlier positions for the same block with later ones', () => { + const updates: UpdatesEvent[] = [ + createUpdatesEvent( + { positions: { block1: { parentId: 'oldParent' } } }, + {} + ), + createUpdatesEvent( + { positions: { block1: { parentId: 'newParent' } } }, + {} + ), + ]; + + const result = mergeUpdates(updates); + + expect(result.changes.positions).toEqual({ + block1: { parentId: 'newParent' }, + }); + }); + it('should use regions from the last update that has them', () => { const updates: UpdatesEvent[] = [ createUpdatesEvent({}, {}, ['region1']), @@ -147,7 +193,7 @@ describe('updatePersistence utilities', () => { }); }); - describe('findRepeatedAncestor', () => { + describe('findClosestRepeated', () => { it('should return the first repeated ancestor', () => { const allBlocks = { block1: { id: 'block1', parentId: 'block2' }, @@ -156,29 +202,40 @@ describe('updatePersistence utilities', () => { block4: { id: 'block4', parentId: null }, }; - const result = findRepeatedAncestor('block1', allBlocks); + const result = findClosestRepeated('block1', allBlocks); expect(result).toBe('block3'); }); - it('should return null if no repeated ancestor exists', () => { + it('should return the block itself when it is repeated', () => { + const allBlocks = { + block1: { id: 'block1', parentId: 'block2', repeated: true }, + block2: { id: 'block2', parentId: null }, + }; + + const result = findClosestRepeated('block1', allBlocks); + + expect(result).toBe('block1'); + }); + + it('should return null if no repeated block is found', () => { const allBlocks = { block1: { id: 'block1', parentId: 'block2' }, block2: { id: 'block2', parentId: 'block3' }, block3: { id: 'block3', parentId: null }, }; - const result = findRepeatedAncestor('block1', allBlocks); + const result = findClosestRepeated('block1', allBlocks); expect(result).toBeNull(); }); - it('should return null if block has no parent', () => { + it('should return null if block has no parent and is not repeated', () => { const allBlocks = { block1: { id: 'block1', parentId: null }, }; - const result = findRepeatedAncestor('block1', allBlocks); + const result = findClosestRepeated('block1', allBlocks); expect(result).toBeNull(); }); @@ -188,7 +245,7 @@ describe('updatePersistence utilities', () => { block1: { id: 'block1', parentId: 'nonexistent' }, }; - const result = findRepeatedAncestor('block1', allBlocks); + const result = findClosestRepeated('block1', allBlocks); expect(result).toBeNull(); }); @@ -256,6 +313,53 @@ describe('updatePersistence utilities', () => { }); }); + describe('determineBlocksToProcess with moved blocks', () => { + it('should return parent of repeated ancestor for moved block', () => { + const allBlocks = { + moved: { id: 'moved', parentId: 'repeated' }, + repeated: { id: 'repeated', parentId: 'wrapper', repeated: true }, + wrapper: { id: 'wrapper', parentId: null }, + }; + + const result = determineBlocksToProcess(['moved'], allBlocks); + + expect(result).toEqual(['wrapper']); + }); + + it('should return moved block itself when no repeated ancestor exists', () => { + const allBlocks = { + moved: { id: 'moved', parentId: 'parent' }, + parent: { id: 'parent', parentId: null }, + }; + + const result = determineBlocksToProcess(['moved'], allBlocks); + + expect(result).toEqual(['moved']); + }); + + it('should skip moved block whose parent is also in the input', () => { + const allBlocks = { + moved: { id: 'moved', parentId: 'parent' }, + parent: { id: 'parent', parentId: null }, + }; + + const result = determineBlocksToProcess(['moved', 'parent'], allBlocks); + + expect(result).toEqual(['parent']); + }); + + it('should route a repeated block in the input to its parent', () => { + const allBlocks = { + repeated: { id: 'repeated', parentId: 'wrapper', repeated: true }, + wrapper: { id: 'wrapper', parentId: null }, + }; + + const result = determineBlocksToProcess(['repeated'], allBlocks); + + expect(result).toEqual(['wrapper']); + }); + }); + describe('computeEffects', () => { it('should extract CSS from link and style tags', () => { const html = ` diff --git a/resources/assets/editor/__tests__/injected.test.ts b/resources/assets/editor/__tests__/injected.test.ts new file mode 100644 index 00000000..e4452233 --- /dev/null +++ b/resources/assets/editor/__tests__/injected.test.ts @@ -0,0 +1,214 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest'; +import morphdom from 'morphdom'; + +// Mock the Craftile modules +vi.mock('@craftile/preview-client', () => { + const PreviewClient = vi.fn(function (this: any) { + this.on = vi.fn(); + }); + return { PreviewClient }; +}); + +vi.mock('@craftile/preview-client-html', () => ({ + default: { + init: vi.fn(), + }, +})); + +describe('morphdom handler', () => { + let RawHtmlRenderer: any; + let morphdomHandler: any; + + beforeEach(async () => { + vi.resetModules(); + + const htmlModule = await import('@craftile/preview-client-html'); + RawHtmlRenderer = htmlModule.default; + + await import('../injected'); + + const initCall = RawHtmlRenderer.init.mock.calls[0]; + morphdomHandler = initCall?.[1]?.morphdom?.onBeforeElUpdated; + }); + + describe('data-morph-ignore attribute', () => { + it('should skip morphing elements with data-morph-ignore', () => { + const fromEl = document.createElement('div'); + fromEl.setAttribute('data-morph-ignore', ''); + fromEl.textContent = 'Original content'; + + const toEl = document.createElement('div'); + toEl.textContent = 'New content'; + + const result = morphdomHandler(fromEl, toEl); + + expect(result).toBe(false); + expect(fromEl.textContent).toBe('Original content'); + }); + + it('should morph elements without data-morph-ignore normally', () => { + const fromEl = document.createElement('div'); + const toEl = document.createElement('div'); + + const result = morphdomHandler(fromEl, toEl); + + expect(result).toBe(true); + }); + + it('should skip morphing even with data-morph-ignore value', () => { + const fromEl = document.createElement('div'); + fromEl.setAttribute('data-morph-ignore', 'true'); + + const toEl = document.createElement('div'); + + expect(morphdomHandler(fromEl, toEl)).toBe(false); + }); + + it('should check data-morph-ignore before other conditions', () => { + const fromEl = document.createElement('div'); + fromEl.setAttribute('data-morph-ignore', ''); + fromEl.setAttribute('wire:id', 'component-123'); + + const toEl = document.createElement('div'); + toEl.setAttribute('wire:id', 'component-123'); + toEl.setAttribute('wire:effects', '{}'); + + expect(morphdomHandler(fromEl, toEl)).toBe(false); + }); + }); + + describe('integration with morphdom', () => { + it('should preserve element content when data-morph-ignore is present', () => { + const container = document.createElement('div'); + container.innerHTML = '
Original
'; + + const newContainer = document.createElement('div'); + newContainer.innerHTML = '
Changed
'; + + morphdom(container, newContainer, { + onBeforeElUpdated: morphdomHandler, + }); + + expect(container.querySelector('div')?.textContent).toBe('Original'); + expect(container.querySelector('div')?.hasAttribute('data-morph-ignore')).toBe(true); + }); + + it('should update elements without data-morph-ignore', () => { + const container = document.createElement('div'); + container.innerHTML = '
Original
'; + + const newContainer = document.createElement('div'); + newContainer.innerHTML = '
Changed
'; + + morphdom(container, newContainer, { + onBeforeElUpdated: morphdomHandler, + }); + + expect(container.querySelector('div')?.textContent).toBe('Changed'); + }); + + it('should handle mixed scenarios', () => { + const container = document.createElement('div'); + container.innerHTML = ` +
Ignored content
+
Original content
+ `; + + const newContainer = document.createElement('div'); + newContainer.innerHTML = ` +
This should not appear
+
Updated content
+ `; + + morphdom(container, newContainer, { + onBeforeElUpdated: morphdomHandler, + }); + + expect(container.querySelector('#ignored')?.textContent).toBe('Ignored content'); + expect(container.querySelector('#updated')?.textContent).toBe('Updated content'); + }); + }); +}); + +describe('Visual utilities', () => { + let Visual: any; + + beforeEach(async () => { + vi.resetModules(); + await import('../injected'); + Visual = (window as any).Visual; + }); + + describe('isResponsiveValue', () => { + it('should return true for responsive objects with _default', () => { + expect(Visual.isResponsiveValue({ _default: 1 })).toBe(true); + }); + + it('should return true for responsive objects with breakpoint overrides', () => { + expect(Visual.isResponsiveValue({ _default: 1, mobile: 2, tablet: 3 })).toBe(true); + }); + + it('should return true for responsive objects with only _default', () => { + expect(Visual.isResponsiveValue({ _default: 'base' })).toBe(true); + }); + + it('should return false for simple values', () => { + expect(Visual.isResponsiveValue(1)).toBe(false); + expect(Visual.isResponsiveValue('text')).toBe(false); + expect(Visual.isResponsiveValue(true)).toBe(false); + }); + + it('should return false for null and undefined', () => { + expect(Visual.isResponsiveValue(null)).toBe(false); + expect(Visual.isResponsiveValue(undefined)).toBe(false); + }); + + it('should return false for arrays', () => { + expect(Visual.isResponsiveValue([1, 2, 3])).toBe(false); + }); + + it('should return false for objects without _default', () => { + expect(Visual.isResponsiveValue({ mobile: 1, tablet: 2 })).toBe(false); + expect(Visual.isResponsiveValue({})).toBe(false); + }); + }); + + describe('getResponsiveValue', () => { + it('should return device-specific value when available', () => { + const value = { _default: 1, mobile: 2, tablet: 3 }; + expect(Visual.getResponsiveValue(value, 'mobile')).toBe(2); + expect(Visual.getResponsiveValue(value, 'tablet')).toBe(3); + }); + + it('should fall back to _default when device is not set', () => { + const value = { _default: 1, mobile: 2 }; + expect(Visual.getResponsiveValue(value, 'tablet')).toBe(1); + expect(Visual.getResponsiveValue(value, 'desktop')).toBe(1); + }); + + it('should fall back to custom fallback when neither device nor _default exists', () => { + const value = { _default: undefined } as any; + expect(Visual.getResponsiveValue(value, 'mobile', 42)).toBe(42); + }); + + it('should return simple value directly', () => { + expect(Visual.getResponsiveValue(5, 'mobile')).toBe(5); + expect(Visual.getResponsiveValue('text', 'tablet')).toBe('text'); + }); + + it('should return fallback for null/undefined simple values', () => { + expect(Visual.getResponsiveValue(null, 'mobile', 10)).toBe(10); + expect(Visual.getResponsiveValue(undefined, 'mobile', 10)).toBe(10); + }); + + it('should return simple value even when fallback is provided', () => { + expect(Visual.getResponsiveValue(5, 'mobile', 10)).toBe(5); + }); + + it('should handle responsive value with only _default', () => { + const value = { _default: 'base' }; + expect(Visual.getResponsiveValue(value, 'mobile')).toBe('base'); + expect(Visual.getResponsiveValue(value, 'tablet')).toBe('base'); + }); + }); +}); diff --git a/resources/assets/editor/auto-imports.d.ts b/resources/assets/editor/auto-imports.d.ts index 5862eaaa..4658071d 100644 --- a/resources/assets/editor/auto-imports.d.ts +++ b/resources/assets/editor/auto-imports.d.ts @@ -146,6 +146,7 @@ declare global { const useCounter: typeof import('@vueuse/core').useCounter const useCraftileEditor: typeof import('./composables/useCraftileEditor').useCraftileEditor const useCssModule: typeof import('vue').useCssModule + const useCssSupports: typeof import('@vueuse/core').useCssSupports const useCssVar: typeof import('@vueuse/core').useCssVar const useCssVars: typeof import('vue').useCssVars const useCurrentElement: typeof import('@vueuse/core').useCurrentElement @@ -456,6 +457,7 @@ declare module 'vue' { readonly useCounter: UnwrapRef readonly useCraftileEditor: UnwrapRef readonly useCssModule: UnwrapRef + readonly useCssSupports: UnwrapRef readonly useCssVar: UnwrapRef readonly useCssVars: UnwrapRef readonly useCurrentElement: UnwrapRef diff --git a/resources/assets/editor/components.d.ts b/resources/assets/editor/components.d.ts index bf0f86ad..236be2ec 100644 --- a/resources/assets/editor/components.d.ts +++ b/resources/assets/editor/components.d.ts @@ -1,8 +1,11 @@ /* eslint-disable */ // @ts-nocheck +// biome-ignore lint: disable +// oxlint-disable +// ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -// biome-ignore lint: disable + export {} /* prettier-ignore */ diff --git a/resources/assets/editor/craftile/features/updatePersistence.ts b/resources/assets/editor/craftile/features/updatePersistence.ts index 84bcda17..90335da1 100644 --- a/resources/assets/editor/craftile/features/updatePersistence.ts +++ b/resources/assets/editor/craftile/features/updatePersistence.ts @@ -16,6 +16,7 @@ export function mergeUpdates(updates: UpdatesEvent[]): UpdatesEvent { updated: [], removed: [], moved: {}, + positions: {}, }, blocks: {}, regions: [], @@ -26,6 +27,7 @@ export function mergeUpdates(updates: UpdatesEvent[]): UpdatesEvent { merged.changes.updated.push(...update.changes.updated); merged.changes.removed.push(...update.changes.removed); Object.assign(merged.changes.moved, update.changes.moved || {}); + Object.assign(merged.changes.positions!, update.changes.positions || {}); Object.assign(merged.blocks, update.blocks); if (update.regions && update.regions.length > 0) { @@ -66,9 +68,9 @@ export function determineBlocksToProcess(blockIds: string[], allBlocks: Record): string | null { - let currentId = blockId; +export function findClosestRepeated(blockId: string, allBlocks: Record): string | null { + let currentId: string | null | undefined = blockId; - while (allBlocks[currentId]?.parentId) { - const parentId = allBlocks[currentId].parentId; - - if (!allBlocks[parentId]) { - break; - } - - if (allBlocks[parentId]?.repeated === true) { - return parentId; + while (currentId && allBlocks[currentId]) { + if (allBlocks[currentId]?.repeated === true) { + return currentId; } - currentId = parentId; + currentId = allBlocks[currentId]?.parentId; } return null; @@ -167,7 +163,11 @@ export function setupUpdatePersistence(editor: CraftileEditor, state: State) { request.onSuccess((htmlResponse) => { const allBlocks = editor.engine.getPage().blocks; - const directlyModifiedIds = [...(mergedUpdates.changes.added || []), ...(mergedUpdates.changes.updated || [])]; + const directlyModifiedIds = [ + ...(mergedUpdates.changes.added || []), + ...(mergedUpdates.changes.updated || []), + ...Object.keys(mergedUpdates.changes.moved || {}), + ]; const blocksToUpdate = determineBlocksToProcess(directlyModifiedIds, allBlocks); const effects = computeEffects(htmlResponse, blocksToUpdate); diff --git a/resources/assets/editor/index.ts b/resources/assets/editor/index.ts index f8c9db48..63f58864 100644 --- a/resources/assets/editor/index.ts +++ b/resources/assets/editor/index.ts @@ -59,7 +59,7 @@ const editorInstance = createCraftileEditor({ blockFilterFunction(schema, context) { const pageContext = { template: state.pageData?.template, - region: context.regionName, + region: context.regionId, }; // Check if block is explicitly disabled (takes precedence) diff --git a/resources/assets/editor/injected.ts b/resources/assets/editor/injected.ts index bf919961..284418a2 100644 --- a/resources/assets/editor/injected.ts +++ b/resources/assets/editor/injected.ts @@ -32,6 +32,10 @@ window.addEventListener('error', (event) => { function createMorphdomHandler() { return function onBeforeElUpdated(fromEl: Element, toEl: Element): boolean { + if (fromEl instanceof HTMLElement && fromEl.hasAttribute('data-morph-ignore')) { + return false; + } + if (fromEl instanceof HTMLElement && hasRecentLiveUpdate(fromEl)) { return false; } @@ -191,6 +195,17 @@ class VisualObject { document.dispatchEvent(new CustomEvent(event, { detail: data })); } + isResponsiveValue(value: unknown): boolean { + return typeof value === 'object' && value !== null && '_default' in value; + } + + getResponsiveValue(value: unknown, deviceId: string, fallback?: T): T { + if (typeof value === 'object' && value !== null && '_default' in value) { + return ((value as Record)[deviceId] ?? (value as Record)._default ?? fallback) as T; + } + return (value ?? fallback) as T; + } + handleLiveUpdate(blockId: string, key: string, value: any): void { // Custom live update - delegates to existing handlePropertyUpdate handlePropertyUpdate({ diff --git a/src/Actions/Cart/AddProductToWishlist.php b/src/Actions/Cart/AddProductToWishlist.php index 0c0061d0..d10f3e4e 100644 --- a/src/Actions/Cart/AddProductToWishlist.php +++ b/src/Actions/Cart/AddProductToWishlist.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions\Cart; +use Illuminate\Http\Resources\Json\JsonResource; use Webkul\Shop\Http\Controllers\API\WishlistController; class AddProductToWishlist @@ -19,7 +20,7 @@ public function execute($productId) 'product_id' => $productId, ]); - /** @var \Illuminate\Http\Resources\Json\JsonResource */ + /** @var JsonResource */ $response = $this->wishlistApi->store(); return $response->resolve(); diff --git a/src/Actions/Checkout/StorePaymentMethod.php b/src/Actions/Checkout/StorePaymentMethod.php index 3702e45d..60845af0 100644 --- a/src/Actions/Checkout/StorePaymentMethod.php +++ b/src/Actions/Checkout/StorePaymentMethod.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions\Checkout; +use Illuminate\Http\JsonResponse; use Webkul\Shop\Http\Controllers\API\OnepageController; class StorePaymentMethod @@ -12,10 +13,10 @@ public function execute(string $paymentMethod) { request()->merge(['payment' => ['method' => $paymentMethod]]); - /** @var \Illuminate\Http\JsonResponse|array */ + /** @var JsonResponse|array */ $response = $this->checkoutApi->storePaymentMethod(); - if ($response instanceof \Illuminate\Http\JsonResponse) { + if ($response instanceof JsonResponse) { return $response->getData(true); } diff --git a/src/Actions/Checkout/StoreShippingMethod.php b/src/Actions/Checkout/StoreShippingMethod.php index 69a1932d..22709582 100644 --- a/src/Actions/Checkout/StoreShippingMethod.php +++ b/src/Actions/Checkout/StoreShippingMethod.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions\Checkout; +use Illuminate\Http\JsonResponse; use Webkul\Shop\Http\Controllers\API\OnepageController; class StoreShippingMethod @@ -12,7 +13,7 @@ public function execute(string $shippingMethod) { request()->merge(['shipping_method' => $shippingMethod]); - /** @var \Illuminate\Http\JsonResponse */ + /** @var JsonResponse */ $response = $this->checkoutApi->storeShippingMethod(); return $response->getData(true); diff --git a/src/Actions/ClearCompareList.php b/src/Actions/ClearCompareList.php index acd48b43..fa0aa135 100644 --- a/src/Actions/ClearCompareList.php +++ b/src/Actions/ClearCompareList.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions; +use Illuminate\Http\Resources\Json\JsonResource; use Webkul\Shop\Http\Controllers\API\CompareController; class ClearCompareList @@ -13,7 +14,7 @@ public function __construct(protected CompareController $compareApi) {} */ public function execute() { - /** @var \Illuminate\Http\Resources\Json\JsonResource */ + /** @var JsonResource */ $response = $this->compareApi->destroyAll(); return $response->resolve(); diff --git a/src/Actions/GetCompareItems.php b/src/Actions/GetCompareItems.php index a29de090..cefea17a 100644 --- a/src/Actions/GetCompareItems.php +++ b/src/Actions/GetCompareItems.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions; +use Illuminate\Pagination\LengthAwarePaginator; use Webkul\Shop\Http\Controllers\API\CompareController; class GetCompareItems @@ -11,7 +12,7 @@ public function __construct(protected CompareController $compareApi) {} /** * Get compare items * - * @return \Illuminate\Pagination\LengthAwarePaginator + * @return LengthAwarePaginator */ public function execute(array $productIds) { diff --git a/src/Actions/GetProductReviews.php b/src/Actions/GetProductReviews.php index 16d79ee2..733f67fe 100644 --- a/src/Actions/GetProductReviews.php +++ b/src/Actions/GetProductReviews.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions; +use Illuminate\Pagination\LengthAwarePaginator; use Webkul\Shop\Http\Controllers\API\ReviewController; class GetProductReviews @@ -11,7 +12,7 @@ public function __construct(protected ReviewController $reviewApi) {} /** * Get product reviews * - * @return \Illuminate\Pagination\LengthAwarePaginator + * @return LengthAwarePaginator */ public function execute(int $productId, array $params = []) { diff --git a/src/Actions/GetProducts.php b/src/Actions/GetProducts.php index 4ec5167c..ae9baf7c 100644 --- a/src/Actions/GetProducts.php +++ b/src/Actions/GetProducts.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions; +use Illuminate\Pagination\LengthAwarePaginator; use Webkul\Shop\Http\Controllers\API\ProductController; class GetProducts @@ -11,7 +12,7 @@ public function __construct(protected ProductController $productApi) {} /** * Get products * - * @return \Illuminate\Pagination\LengthAwarePaginator + * @return LengthAwarePaginator */ public function execute(array $params) { diff --git a/src/Actions/RemoveItemFromCompareList.php b/src/Actions/RemoveItemFromCompareList.php index 7c008b7f..27fe0637 100644 --- a/src/Actions/RemoveItemFromCompareList.php +++ b/src/Actions/RemoveItemFromCompareList.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Actions; +use Illuminate\Http\Resources\Json\JsonResource; use Webkul\Shop\Http\Controllers\API\CompareController; class RemoveItemFromCompareList @@ -15,7 +16,7 @@ public function execute($productId) { request()->request->add(['product_id' => $productId]); - /** @var \Illuminate\Http\Resources\Json\JsonResource */ + /** @var JsonResource */ $response = $this->compareApi->destroy(); return $response->resolve(); diff --git a/src/Actions/StoreProductReview.php b/src/Actions/StoreProductReview.php index 7663c0a8..d9a289fe 100644 --- a/src/Actions/StoreProductReview.php +++ b/src/Actions/StoreProductReview.php @@ -3,6 +3,7 @@ namespace BagistoPlus\Visual\Actions; use Illuminate\Support\Facades\Validator; +use Webkul\Customer\Models\Customer; use Webkul\Product\Repositories\ProductReviewAttachmentRepository; use Webkul\Product\Repositories\ProductReviewRepository; use Webkul\Shop\Http\Controllers\API\ReviewController; @@ -27,7 +28,10 @@ public function execute(int $productId, array $data = []) $validated['product_id'] = $productId; $validated['status'] = ReviewController::STATUS_PENDING; - $validated['name'] = auth('customer')->user()?->name ?? $data['name']; + $customer = auth('customer')->user(); + $validated['name'] = $customer instanceof Customer + ? $customer->getNameAttribute() + : $data['name']; $validated['customer_id'] = auth('customer')->id() ?? null; $review = $this->productReviewRepository->create($validated); diff --git a/src/Blocks/BladeSection.php b/src/Blocks/BladeSection.php index 2b55f2e5..70911f6f 100644 --- a/src/Blocks/BladeSection.php +++ b/src/Blocks/BladeSection.php @@ -2,9 +2,14 @@ namespace BagistoPlus\Visual\Blocks; +use BagistoPlus\Visual\Data\BlockData; + +/** + * @property-read BlockData $section + */ abstract class BladeSection extends BladeBlock { - public function __get($name) + public function __get(string $name) { if ($name === 'section') { return $this->block; diff --git a/src/Blocks/LivewireSection.php b/src/Blocks/LivewireSection.php index 7261cc5b..15ddd3b0 100644 --- a/src/Blocks/LivewireSection.php +++ b/src/Blocks/LivewireSection.php @@ -2,9 +2,14 @@ namespace BagistoPlus\Visual\Blocks; +use BagistoPlus\Visual\Data\BlockData; + +/** + * @property-read BlockData $section + */ class LivewireSection extends LivewireBlock { - public function __get($name) + public function __get(mixed $name) { if ($name === 'section') { return $this->block; diff --git a/src/Blocks/SimpleSection.php b/src/Blocks/SimpleSection.php index 8c19554c..dae45eb2 100644 --- a/src/Blocks/SimpleSection.php +++ b/src/Blocks/SimpleSection.php @@ -2,4 +2,26 @@ namespace BagistoPlus\Visual\Blocks; -class SimpleSection extends SimpleBlock {} +use BagistoPlus\Visual\Data\BlockData; + +/** + * @property-read BlockData $section + */ +class SimpleSection extends SimpleBlock +{ + public function __get(string $name) + { + if ($name === 'section') { + return $this->block; + } + + return null; + } + + public function data() + { + return [ + 'section' => $this->block, + ]; + } +} diff --git a/src/Concerns/HasBlockBehavior.php b/src/Concerns/HasBlockBehavior.php index 9462c431..87894c18 100644 --- a/src/Concerns/HasBlockBehavior.php +++ b/src/Concerns/HasBlockBehavior.php @@ -58,6 +58,6 @@ public function render(): mixed throw new \RuntimeException('View not specified for block '.static::class); } - return view(static::$view, $this->getViewData()); + return view()->make(static::$view, $this->getViewData()); } } diff --git a/src/Data/BlockData.php b/src/Data/BlockData.php index 71731a09..d8c99498 100644 --- a/src/Data/BlockData.php +++ b/src/Data/BlockData.php @@ -2,9 +2,19 @@ namespace BagistoPlus\Visual\Data; +use AllowDynamicProperties; use BagistoPlus\Visual\Support\LiveUpdatesBuilder; use Craftile\Laravel\BlockData as LaravelBlockData; - +use Craftile\Laravel\PropertyBag; +use Illuminate\Contracts\Support\Htmlable; + +/** + * Block data with Visual-specific magic properties. + * + * @property-read PropertyBag $settings Access to block properties (alias for $properties) + * @property-read Htmlable $editorAttributes Craftile editor attributes for rendering + */ +#[AllowDynamicProperties] class BlockData extends LaravelBlockData { public function __get($key) diff --git a/src/Enums/Events.php b/src/Enums/Events.php new file mode 100644 index 00000000..b1814e8e --- /dev/null +++ b/src/Enums/Events.php @@ -0,0 +1,16 @@ +make('visual::admin.editor.index', [ 'config' => [ 'baseUrl' => parse_url(route('visual.admin.editor', ['theme' => $themeCode]), PHP_URL_PATH), 'imagesBaseUrl' => Storage::disk(config('bagisto_visual.images_storage'))->url(''), @@ -140,7 +143,7 @@ public function publishTheme(Request $request) public function uploadImages(Request $request) { - /** @var \Illuminate\Support\Collection $images */ + /** @var Collection $images */ $images = collect($request->file('image')); return $images->map(function ($image) { @@ -236,7 +239,7 @@ public function icons(Request $request, Factory $factory, IconsManifest $iconsMa protected function loadBlocks() { - /** @var \Illuminate\Support\Collection $schemas */ + /** @var Collection $schemas */ $schemas = collect(app(BlockSchemaRegistry::class)->all()); return $schemas->map(function (BlockSchema $blockSchema) { @@ -278,8 +281,8 @@ protected function loadBlocks() 'description' => $blockSchema->description, 'previewImageUrl' => $blockSchema->previewImageUrl, 'isSection' => collect([SimpleSection::class, BladeSection::class, LivewireSection::class])->some(fn ($class) => is_subclass_of($blockSchema->class, $class)), - 'enabledOn' => $blockSchema->enabledOn ?? [], - 'disabledOn' => $blockSchema->disabledOn ?? [], + 'enabledOn' => $blockSchema->enabledOn, + 'disabledOn' => $blockSchema->disabledOn, ], ]; }) @@ -308,7 +311,7 @@ protected function loadTheme($themeCode) protected function loadTemplates() { - return collect(app(\BagistoPlus\Visual\ThemeEditor::class)->getTemplates()) + return collect(app(ThemeEditor::class)->getTemplates()) ->map(fn ($template) => [ 'template' => $template->template, 'label' => $template->label, diff --git a/src/Http/Controllers/Admin/ThemesController.php b/src/Http/Controllers/Admin/ThemesController.php index 58028d5f..ad2d677d 100644 --- a/src/Http/Controllers/Admin/ThemesController.php +++ b/src/Http/Controllers/Admin/ThemesController.php @@ -13,7 +13,7 @@ public function index() ->where('visual_theme', true) ->map(fn ($attrs) => Theme::make($attrs)); - return view('visual::admin.themes.index', [ + return view()->make('visual::admin.themes.index', [ 'themes' => $themes, ]); } diff --git a/src/Http/Controllers/Shop/TemplatePreviewController.php b/src/Http/Controllers/Shop/TemplatePreviewController.php index 1522cc58..37c05c4b 100644 --- a/src/Http/Controllers/Shop/TemplatePreviewController.php +++ b/src/Http/Controllers/Shop/TemplatePreviewController.php @@ -85,7 +85,7 @@ public function checkoutSuccess() $order->setRelation('items', collect($items)); - return view('shop::checkout.success', compact('order')); + return view()->make('shop::checkout.success', compact('order')); } protected function getFakeProductImage() diff --git a/src/LivewireFeatures/SupportsBlockData.php b/src/LivewireFeatures/SupportsBlockData.php index 85120891..3c8498e7 100644 --- a/src/LivewireFeatures/SupportsBlockData.php +++ b/src/LivewireFeatures/SupportsBlockData.php @@ -5,6 +5,11 @@ use BagistoPlus\Visual\Blocks\LivewireBlock; use BagistoPlus\Visual\Blocks\LivewireSection; use BagistoPlus\Visual\Facades\Visual; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; +use Illuminate\Http\Resources\Json\JsonResource; +use Illuminate\View\ComponentAttributeBag; +use Illuminate\View\ComponentSlot; +use Illuminate\View\InvokableComponentVariable; use Livewire\ComponentHook; class SupportsBlockData extends ComponentHook @@ -24,11 +29,11 @@ public function mount(array $params) } // Remove Laravel component objects - $context = $context->reject(fn ($value) => $value instanceof \Illuminate\View\ComponentAttributeBag - || $value instanceof \Illuminate\View\InvokableComponentVariable - || $value instanceof \Illuminate\View\ComponentSlot - || $value instanceof \Illuminate\Http\Resources\Json\AnonymousResourceCollection - || $value instanceof \Illuminate\Http\Resources\Json\JsonResource) + $context = $context->reject(fn ($value) => $value instanceof ComponentAttributeBag + || $value instanceof InvokableComponentVariable + || $value instanceof ComponentSlot + || $value instanceof AnonymousResourceCollection + || $value instanceof JsonResource) ->all(); $context['comparableAttributes'] = []; @@ -50,9 +55,7 @@ public function render($view) $context['section'] = $this->component->getBlock(); } - if (method_exists($this->component, 'share')) { - $craftileContext = array_merge($context, $this->component->share()); - } + $craftileContext = array_merge($context, $this->component->share()); $view->with(array_merge($context, ['__craftileContext' => $craftileContext])); } diff --git a/src/Middlewares/InjectThemeEditorScript.php b/src/Middlewares/InjectThemeEditorScript.php index 082055c1..fdc9a7df 100644 --- a/src/Middlewares/InjectThemeEditorScript.php +++ b/src/Middlewares/InjectThemeEditorScript.php @@ -28,7 +28,7 @@ protected function buildPreviewScripts(array $pageData): string { $settingsBag = $this->themeSettingsLoader->loadActiveThemeSettings(); - return view('visual::admin.editor.injected-script', [ + return view()->make('visual::admin.editor.injected-script', [ 'pageData' => [ 'content' => $pageData, 'template' => [ diff --git a/src/Middlewares/UseShopThemeFromRequest.php b/src/Middlewares/UseShopThemeFromRequest.php index 4e25c72f..c0225aab 100644 --- a/src/Middlewares/UseShopThemeFromRequest.php +++ b/src/Middlewares/UseShopThemeFromRequest.php @@ -3,7 +3,9 @@ namespace BagistoPlus\Visual\Middlewares; use BagistoPlus\Visual\Facades\ThemeEditor; +use BagistoPlus\Visual\Theme\Theme as VisualTheme; use Closure; +use Illuminate\Http\Request; use Webkul\Shop\Http\Middleware\Theme; class UseShopThemeFromRequest extends Theme @@ -13,9 +15,22 @@ public function handle($request, Closure $next) if (ThemeEditor::inDesignMode() || ThemeEditor::inPreviewMode()) { themes()->set(ThemeEditor::activeTheme()); - return $next($request); + return $this->shareVisualTheme($request, $next); } - return parent::handle($request, $next); + return parent::handle($request, function ($request) use ($next) { + return $this->shareVisualTheme($request, $next); + }); + } + + protected function shareVisualTheme(Request $request, Closure $next) + { + $theme = themes()->current(); + + if ($theme instanceof VisualTheme && $theme->isVisualTheme()) { + view()->share('theme', $theme); + } + + return $next($request); } } diff --git a/src/Persistence/PersistThemeSettings.php b/src/Persistence/PersistThemeSettings.php index c49fb59b..ebc69de5 100644 --- a/src/Persistence/PersistThemeSettings.php +++ b/src/Persistence/PersistThemeSettings.php @@ -3,6 +3,7 @@ namespace BagistoPlus\Visual\Persistence; use BagistoPlus\Visual\Facades\ThemePathsResolver; +use BagistoPlus\Visual\Theme\Theme; use BagistoPlus\Visual\ThemeSettingsLoader; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\File; @@ -69,7 +70,7 @@ protected function loadExistingSettings(string $themeCode, string $channel, stri return []; } - $theme = \BagistoPlus\Visual\Theme\Theme::make($themeConfig); + $theme = Theme::make($themeConfig); // Try to find existing settings file using fallback hierarchy $settingsPath = ThemePathsResolver::resolveThemeSettingsPath( diff --git a/src/Persistence/PublishTheme.php b/src/Persistence/PublishTheme.php index 4a9b2d57..f4d91fa9 100644 --- a/src/Persistence/PublishTheme.php +++ b/src/Persistence/PublishTheme.php @@ -4,6 +4,7 @@ use BagistoPlus\Visual\Facades\ThemePathsResolver; use Illuminate\Filesystem\Filesystem; +use Spatie\ResponseCache\Facades\ResponseCache; class PublishTheme { @@ -56,7 +57,7 @@ public function handle(string $themeCode): void protected function clearResponseCache(): void { if (class_exists('\\Spatie\\ResponseCache\\Facades\\ResponseCache')) { - \Spatie\ResponseCache\Facades\ResponseCache::clear(); + ResponseCache::clear(); } } } diff --git a/src/Persistence/RenderPreview.php b/src/Persistence/RenderPreview.php index 6709a738..2a1fd503 100644 --- a/src/Persistence/RenderPreview.php +++ b/src/Persistence/RenderPreview.php @@ -2,9 +2,14 @@ namespace BagistoPlus\Visual\Persistence; +use BagistoPlus\Visual\Facades\ThemeEditor; use BagistoPlus\Visual\ThemeSettingsLoader; use Craftile\Laravel\Facades\Craftile; use Craftile\Laravel\View\JsonViewParser; +use Illuminate\Contracts\Encryption\Encrypter; +use Illuminate\Cookie\CookieValuePrefix; +use Illuminate\Cookie\Middleware\EncryptCookies; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Str; @@ -16,7 +21,7 @@ class RenderPreview * @param string $url The URL to render * @param array|null $blockIds Optional array of block IDs to render (null = render all) */ - public function execute(string $url, ?array $blockIds = null): string|\Illuminate\Http\RedirectResponse + public function execute(string $url, ?array $blockIds = null): string|RedirectResponse { $baseUrl = rtrim(config('app.url')); $basePath = parse_url($baseUrl, PHP_URL_PATH); @@ -36,15 +41,39 @@ public function execute(string $url, ?array $blockIds = null): string|\Illuminat // Reset Craftile's preview mode cache before sub-request Craftile::detectPreviewUsing(function () { - return \BagistoPlus\Visual\Facades\ThemeEditor::inDesignMode(); + return ThemeEditor::inDesignMode(); }); app(JsonViewParser::class)->clearCache(); app(ThemeSettingsLoader::class)->clearCache(); + // Persist any pending writes (e.g. visual.render.{$key}) to disk so + // the sub-request's session start reads them. + session()->save(); + $request = Request::create($url, 'GET'); + $request->cookies->set( + config('session.cookie'), + $this->encryptSessionCookie(session()->getId()) + ); $response = app()->handle($request); return $response->getContent(); } + + /** + * Encrypt a session id the way EncryptCookies expects, so the sub-request + * decrypts back to the same id and StartSession joins the existing session + * instead of allocating a fresh one. + */ + protected function encryptSessionCookie(string $sessionId): string + { + $cookieName = config('session.cookie'); + $encrypter = app(Encrypter::class); + + return $encrypter->encrypt( + CookieValuePrefix::create($cookieName, $encrypter->getKey()).$sessionId, + EncryptCookies::serialized($cookieName) + ); + } } diff --git a/src/Providers/CoreServiceProvider.php b/src/Providers/CoreServiceProvider.php index 9641e173..5e7d4f03 100644 --- a/src/Providers/CoreServiceProvider.php +++ b/src/Providers/CoreServiceProvider.php @@ -5,26 +5,37 @@ use BagistoPlus\Visual\Commands; use BagistoPlus\Visual\Components\Svg; use BagistoPlus\Visual\Data\BlockData; +use BagistoPlus\Visual\Data\BlockSchema; use BagistoPlus\Visual\Facades\ThemeEditor; use BagistoPlus\Visual\Facades\Visual; use BagistoPlus\Visual\Middlewares\DisableResponseCacheInDesignMode; use BagistoPlus\Visual\Middlewares\UseShopThemeFromRequest; use BagistoPlus\Visual\Settings\Support as SettingTransformers; use BagistoPlus\Visual\Support\BlockRenderFilter; +use BagistoPlus\Visual\Support\TemplateNormalizer; use BagistoPlus\Visual\Support\UrlGenerator; use BagistoPlus\Visual\TemplateRegistrar; use BagistoPlus\Visual\ThemePathsResolver; use BagistoPlus\Visual\ThemeSettingsLoader; +use BagistoPlus\Visual\View\Compilers\LivewireBlockCompiler; use Craftile\Laravel\Events\BlockSchemaRegistered; use Craftile\Laravel\Events\JsonViewLoaded; use Craftile\Laravel\Facades\Craftile; +use Craftile\Laravel\View\BlockCompilerRegistry; use Illuminate\Contracts\Foundation\Application; +use Illuminate\Contracts\Http\Kernel; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; use Illuminate\View\DynamicComponent; +use Livewire\Component; +use Livewire\Livewire; +use Webkul\Attribute\Models\Attribute; +use Webkul\Category\Models\Category; +use Webkul\Product\Models\Product; +use Webkul\Shop\Http\Middleware\Theme; class CoreServiceProvider extends ServiceProvider { @@ -88,7 +99,7 @@ protected function bootCraftile(): void return ThemeEditor::inDesignMode(); }); - Craftile::normalizeTemplateUsing(new \BagistoPlus\Visual\Support\TemplateNormalizer); + Craftile::normalizeTemplateUsing(new TemplateNormalizer); Craftile::checkIfBlockCanRenderUsing(function (BlockData $blockData) { if ($blockData->disabled) { @@ -135,15 +146,15 @@ protected function registerPropertyTransformers(): void protected function registerBlockCompilers(): void { - if (class_exists(\Livewire\Component::class)) { - $registry = app(\Craftile\Laravel\View\BlockCompilerRegistry::class); - $registry->register(new \BagistoPlus\Visual\View\Compilers\LivewireBlockCompiler); + if (class_exists(Component::class)) { + $registry = app(BlockCompilerRegistry::class); + $registry->register(new LivewireBlockCompiler); // Register Livewire blocks as Livewire components when they're discovered Event::listen(BlockSchemaRegistered::class, function (BlockSchemaRegistered $event) { - if ($event->schema->class && is_subclass_of($event->schema->class, \Livewire\Component::class)) { + if ($event->schema->class && is_subclass_of($event->schema->class, Component::class)) { $componentName = 'craftile-'.$event->schema->slug; - \Livewire\Livewire::component($componentName, $event->schema->class); + Livewire::component($componentName, $event->schema->class); } }); } @@ -164,9 +175,9 @@ protected function bootViewsAndTranslations(): void protected function bootMiddlewares(): void { - $this->app->bind(\Webkul\Shop\Http\Middleware\Theme::class, UseShopThemeFromRequest::class); + $this->app->bind(Theme::class, UseShopThemeFromRequest::class); - $this->app[\Illuminate\Contracts\Http\Kernel::class] + $this->app[Kernel::class] ->prependMiddleware(DisableResponseCacheInDesignMode::class); } @@ -191,9 +202,9 @@ protected function bootBladeIcons() protected function bootMorphMap(): void { Relation::morphMap([ - 'product' => \Webkul\Product\Models\Product::class, - 'category' => \Webkul\Category\Models\Category::class, - 'attribute' => \Webkul\Attribute\Models\Attribute::class, + 'product' => Product::class, + 'category' => Category::class, + 'attribute' => Attribute::class, ]); } @@ -249,8 +260,8 @@ protected function registerCraftileConfig(): void 'craftile.components.namespace' => 'visual', - 'craftile.block_data_class' => \BagistoPlus\Visual\Data\BlockData::class, - 'craftile.block_schema_class' => \BagistoPlus\Visual\Data\BlockSchema::class, + 'craftile.block_data_class' => BlockData::class, + 'craftile.block_schema_class' => BlockSchema::class, 'craftile.php_template_extensions' => ['visual.php'], ]); diff --git a/src/Providers/ThemeServiceProvider.php b/src/Providers/ThemeServiceProvider.php index 1766f057..44609d21 100644 --- a/src/Providers/ThemeServiceProvider.php +++ b/src/Providers/ThemeServiceProvider.php @@ -60,7 +60,7 @@ protected function bootViewsAndTranslations() $this->loadTranslationsFrom($this->getBasePath().'/resources/lang', $theme['code']); if ($this->app->runningInConsole()) { - $this->app['view']->prependNamespace('shop', $this->getBasePath().'/resources/views'); + $this->app->get('view')->prependNamespace('shop', $this->getBasePath().'/resources/views'); $this->publishes([ $this->getBasePath().'/resources/views' => resource_path("themes/{$theme['code']}/views"), @@ -76,6 +76,7 @@ protected function bootSections() $namespace = $this->getThemeNamespace(); Visual::discoverSectionsIn("{$theme['base_path']}/src/Sections", "{$namespace}\\Sections"); Visual::discoverBlocksIn("{$theme['base_path']}/src/Blocks", "{$namespace}\\Blocks"); + Visual::discoverPresetsIn("{$theme['base_path']}/src/Presets", "{$namespace}\\Presets"); }); return; @@ -85,6 +86,7 @@ protected function bootSections() $namespace = $this->getThemeNamespace(); Visual::discoverSectionsIn("{$theme->basePath}/src/Sections", "{$namespace}\\Sections"); Visual::discoverBlocksIn("{$theme->basePath}/src/Blocks", "{$namespace}\\Blocks"); + Visual::discoverPresetsIn("{$theme->basePath}/src/Presets", "{$namespace}\\Presets"); }); } diff --git a/src/Providers/ViewServiceProvider.php b/src/Providers/ViewServiceProvider.php index 3de6d1df..c96ecf91 100644 --- a/src/Providers/ViewServiceProvider.php +++ b/src/Providers/ViewServiceProvider.php @@ -3,8 +3,6 @@ namespace BagistoPlus\Visual\Providers; use BagistoPlus\Visual\Facades\ThemeEditor; -use BagistoPlus\Visual\Facades\Visual; -use BagistoPlus\Visual\Theme\Theme; use BagistoPlus\Visual\Theme\Themes; use BagistoPlus\Visual\ThemePathsResolver; use BagistoPlus\Visual\View\BladeDirectives; @@ -43,15 +41,6 @@ protected function registerBladeDirectives() protected function bootViewComposers() { - view()->composer('shop::*', function ($view) { - $theme = themes()->current(); - - if ($theme instanceof Theme && $theme->isVisualTheme) { - $theme->settings = Visual::themeSettingsLoader()->loadThemeSettings($theme); - $view->with('theme', $theme); - } - }); - view()->composer('shop::layouts.account', function ($view) { if (auth('customer')->check()) { $view->with('customer', auth('customer')->user()); diff --git a/src/Settings/Support/ColorSchemeValue.php b/src/Settings/Support/ColorSchemeValue.php index ff4ac699..78294fe2 100644 --- a/src/Settings/Support/ColorSchemeValue.php +++ b/src/Settings/Support/ColorSchemeValue.php @@ -2,6 +2,7 @@ namespace BagistoPlus\Visual\Settings\Support; +use BagistoPlus\Visual\Theme\Theme; use BagistoPlus\Visual\View\TailwindPaletteGenerator; use Illuminate\Support\HtmlString; use matthieumastadenis\couleur\ColorFactory; @@ -12,7 +13,7 @@ class ColorSchemeValue public function __construct(public string $id, public ?array $tokens = []) { if (empty($this->tokens)) { - /** @var \BagistoPlus\Visual\Theme\Theme */ + /** @var Theme */ $theme = themes()->current(); $schemesSetting = collect($theme->settingsSchema) diff --git a/src/Settings/Support/SpacingValue.php b/src/Settings/Support/SpacingValue.php index 56727de3..b5929f94 100644 --- a/src/Settings/Support/SpacingValue.php +++ b/src/Settings/Support/SpacingValue.php @@ -4,19 +4,28 @@ class SpacingValue { - public readonly int $top; + public readonly int|string $top; - public readonly int $right; + public readonly int|string $right; - public readonly int $bottom; + public readonly int|string $bottom; - public readonly int $left; + public readonly int|string $left; public function __construct(array $data) { - $this->top = $data['top'] ?? 0; - $this->right = $data['right'] ?? 0; - $this->bottom = $data['bottom'] ?? 0; - $this->left = $data['left'] ?? 0; + $this->top = self::normalize($data['top'] ?? 0); + $this->right = self::normalize($data['right'] ?? 0); + $this->bottom = self::normalize($data['bottom'] ?? 0); + $this->left = self::normalize($data['left'] ?? 0); + } + + private static function normalize(mixed $value): int|string + { + if ($value === 'auto') { + return 'auto'; + } + + return (int) $value; } } diff --git a/src/Settings/Support/TypographyTransformer.php b/src/Settings/Support/TypographyTransformer.php index 72e83c7a..172c0d67 100644 --- a/src/Settings/Support/TypographyTransformer.php +++ b/src/Settings/Support/TypographyTransformer.php @@ -3,6 +3,7 @@ namespace BagistoPlus\Visual\Settings\Support; use BagistoPlus\Visual\Contracts\SettingTransformerInterface; +use BagistoPlus\Visual\Theme\Theme; class TypographyTransformer implements SettingTransformerInterface { @@ -18,7 +19,7 @@ public function transform(mixed $value, mixed $property = null): mixed } // Find the TypographyPresets and get the preset data - /** @var \BagistoPlus\Visual\Theme\Theme $theme */ + /** @var Theme $theme */ $theme = themes()->current(); $presetsSetting = collect($theme->settingsSchema) diff --git a/src/Theme/Theme.php b/src/Theme/Theme.php index f29a172c..a77ea00b 100644 --- a/src/Theme/Theme.php +++ b/src/Theme/Theme.php @@ -3,12 +3,41 @@ namespace BagistoPlus\Visual\Theme; use BagistoPlus\Visual\Facades\ThemePathsResolver; +use BagistoPlus\Visual\ThemeSettingsLoader; use Craftile\Laravel\PropertyBag; use Webkul\Theme\Theme as BagistoTheme; +/** + * @property ?PropertyBag $settings + */ class Theme extends BagistoTheme { - public PropertyBag $settings; + private ?PropertyBag $settings = null; + + public function __get(string $name): mixed + { + if ($name === 'settings') { + return $this->settings ??= app(ThemeSettingsLoader::class)->loadThemeSettings($this); + } + + throw new \Error('Undefined property: '.static::class.'::$'.$name); + } + + public function __set(string $name, mixed $value): void + { + if ($name === 'settings') { + $this->settings = $value; + + return; + } + + throw new \Error('Cannot create dynamic property '.static::class.'::$'.$name); + } + + public function __isset(string $name): bool + { + return $name === 'settings' && $this->settings !== null; + } public static function make(array $attributes): self { diff --git a/src/ThemePathsResolver.php b/src/ThemePathsResolver.php index 1a6dc058..81167dff 100644 --- a/src/ThemePathsResolver.php +++ b/src/ThemePathsResolver.php @@ -39,10 +39,10 @@ public function resolvePath(string $themeCode, string $channel, string $locale, */ public function resolveThemeSettingsPath(string $themeCode, string $channel, string $locale, string $mode = 'live'): ?string { - /** @var \Webkul\Core\Models\Channel */ + /** @var Channel */ $defaultChannel = core()->getDefaultChannel(); - /** @var \Webkul\Core\Models\Channel */ + /** @var Channel */ $channelModel = once(fn () => Channel::query()->with(['default_locale'])->where('code', $channel)->first()); $pathsToCheck = []; @@ -77,10 +77,10 @@ public function resolveThemeViewsPaths(string $themeCode): array { $mode = ThemeEditor::active() ? 'editor' : 'live'; - /** @var \Webkul\Core\Models\Channel $requestedChannel */ + /** @var Channel $requestedChannel */ $requestedChannel = core()->getRequestedChannel(); - /** @var \Webkul\Core\Models\Channel $defaultChannel */ + /** @var Channel $defaultChannel */ $defaultChannel = core()->getDefaultChannel(); $requestedLocale = app()->getLocale(); diff --git a/src/ThemeSettingsLoader.php b/src/ThemeSettingsLoader.php index 90d39bc2..e23f4a1f 100644 --- a/src/ThemeSettingsLoader.php +++ b/src/ThemeSettingsLoader.php @@ -29,7 +29,7 @@ public function __construct(protected ThemePathsResolver $themePathsResolver, pr */ public function loadActiveThemeSettings(): PropertyBag { - /** @var \BagistoPlus\Visual\Theme\Theme|null $theme */ + /** @var Theme|null $theme */ $theme = themes()->current(); if (! $theme) { diff --git a/src/View/Compilers/LivewireBlockCompiler.php b/src/View/Compilers/LivewireBlockCompiler.php index 3aa9eff6..e832f35b 100644 --- a/src/View/Compilers/LivewireBlockCompiler.php +++ b/src/View/Compilers/LivewireBlockCompiler.php @@ -4,12 +4,13 @@ use Craftile\Core\Data\BlockSchema; use Craftile\Laravel\Contracts\BlockCompilerInterface; +use Livewire\Component; class LivewireBlockCompiler implements BlockCompilerInterface { public function supports(BlockSchema $blockSchema): bool { - return is_subclass_of($blockSchema->class, \Livewire\Component::class); + return is_subclass_of($blockSchema->class, Component::class); } public function compile(BlockSchema $schema, string $hash, string $customAttributesExpr = ''): string diff --git a/src/VisualManager.php b/src/VisualManager.php index 57adefec..9a27eb44 100755 --- a/src/VisualManager.php +++ b/src/VisualManager.php @@ -7,6 +7,11 @@ use BagistoPlus\Visual\LivewireFeatures\SupportsBlockData; use BagistoPlus\Visual\LivewireFeatures\SupportsComponentAttributes; use Craftile\Laravel\Facades\Craftile; +use Illuminate\Support\Collection; +use Livewire\Livewire; +use Webkul\Shop\Http\Middleware\Currency; +use Webkul\Shop\Http\Middleware\Locale; +use Webkul\Shop\Http\Middleware\Theme; class VisualManager { @@ -29,6 +34,11 @@ public function discoverBlocksIn(string $path, string $namespace = 'App\\Blocks' Craftile::discoverBlocksIn($namespace, $path); } + public function discoverPresetsIn(string $path, string $namespace = 'App\\Presets'): void + { + Craftile::discoverPresetsIn($namespace, $path); + } + /** * Register a single section. * @@ -73,7 +83,7 @@ public function registerBlocks(array $blockClasses): void * Register a custom setting transformer. * * @param string $type The setting type to transform - * @param \BagistoPlus\Visual\Contracts\SettingTransformerInterface $transformerClass The transformer class + * @param SettingTransformerInterface $transformerClass The transformer class */ public function registerSettingTransformer(string $type, SettingTransformerInterface $transformerClass): void { @@ -83,7 +93,7 @@ public function registerSettingTransformer(string $type, SettingTransformerInter /** * Register a custom filter for Livewire block context. * - * @param callable(\Illuminate\Support\Collection): \Illuminate\Support\Collection $filter + * @param callable(Collection): Collection $filter */ public function filterLivewireContextUsing(callable $filter): void { @@ -105,19 +115,19 @@ public function getLivewireContextFilters(): array */ public function supportLivewire(): void { - if (! class_exists(\Livewire\Livewire::class)) { + if (! class_exists(Livewire::class)) { throw new \RuntimeException('Livewire is not installed. Please install it first: composer require livewire/livewire'); } - \Livewire\Livewire::addPersistentMiddleware([ - \Webkul\Shop\Http\Middleware\Locale::class, - \Webkul\Shop\Http\Middleware\Currency::class, - \Webkul\Shop\Http\Middleware\Theme::class, + Livewire::addPersistentMiddleware([ + Locale::class, + Currency::class, + Theme::class, ]); - \Livewire\Livewire::propertySynthesizer(BlockDataSynth::class); + Livewire::propertySynthesizer(BlockDataSynth::class); - \Livewire\Livewire::componentHook(SupportsBlockData::class); - \Livewire\Livewire::componentHook(SupportsComponentAttributes::class); + Livewire::componentHook(SupportsBlockData::class); + Livewire::componentHook(SupportsComponentAttributes::class); } } diff --git a/src/helpers.php b/src/helpers.php index 2fd924a3..9b72f53e 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -1,5 +1,7 @@ toBeTrue(); }); +it('should discover sections blocks and presets from the theme source directories', function () { + Visual::spy(); + + $serviceProvider = new FakeThemeServiceProvider($this->app); + $serviceProvider->boot(); + + $basePath = dirname(__DIR__).'/Fixtures/FakeTheme'; + $namespace = 'BagistoPlus\\Visual\\Tests\\Fixtures\\FakeTheme'; + + $normalizesTo = fn (string $expected) => Mockery::on( + fn (string $path) => str_replace('\\', '/', $path) === str_replace('\\', '/', $expected) + ); + + Visual::shouldHaveReceived('discoverSectionsIn') + ->with($normalizesTo("{$basePath}/src/Sections"), "{$namespace}\\Sections") + ->once(); + + Visual::shouldHaveReceived('discoverBlocksIn') + ->with($normalizesTo("{$basePath}/src/Blocks"), "{$namespace}\\Blocks") + ->once(); + + Visual::shouldHaveReceived('discoverPresetsIn') + ->with($normalizesTo("{$basePath}/src/Presets"), "{$namespace}\\Presets") + ->once(); +}); + test('theme should be loaded', function () { $theme = app('themes')->find('fake-theme'); expect($theme)->toHaveProperties([ diff --git a/tests/Settings/Support/TypographyPresetsTransformerTest.php b/tests/Settings/Support/TypographyPresetsTransformerTest.php index 61d61f4a..bb6e4848 100644 --- a/tests/Settings/Support/TypographyPresetsTransformerTest.php +++ b/tests/Settings/Support/TypographyPresetsTransformerTest.php @@ -3,6 +3,7 @@ use BagistoPlus\Visual\Contracts\SettingTransformerInterface; use BagistoPlus\Visual\Settings\Support\TypographyPresetsTransformer; use BagistoPlus\Visual\Settings\Support\TypographyValue; +use Illuminate\Support\Collection; it('implements SettingTransformerInterface', function () { expect(TypographyPresetsTransformer::class) @@ -13,7 +14,7 @@ $transformer = new TypographyPresetsTransformer; expect($transformer->transform(null)) - ->toBeInstanceOf(\Illuminate\Support\Collection::class) + ->toBeInstanceOf(Collection::class) ->toBeEmpty(); }); @@ -21,7 +22,7 @@ $transformer = new TypographyPresetsTransformer; expect($transformer->transform('invalid')) - ->toBeInstanceOf(\Illuminate\Support\Collection::class) + ->toBeInstanceOf(Collection::class) ->toBeEmpty(); }); @@ -50,7 +51,7 @@ $result = $transformer->transform($presets); expect($result) - ->toBeInstanceOf(\Illuminate\Support\Collection::class) + ->toBeInstanceOf(Collection::class) ->toHaveCount(2) ->each(fn ($item) => $item->toBeInstanceOf(TypographyValue::class)); diff --git a/tests/Settings/Support/TypographyValueTest.php b/tests/Settings/Support/TypographyValueTest.php index adc5ce86..b624fcd0 100644 --- a/tests/Settings/Support/TypographyValueTest.php +++ b/tests/Settings/Support/TypographyValueTest.php @@ -1,5 +1,6 @@ fontFamily) - ->toBeInstanceOf(\BagistoPlus\Visual\Settings\Support\FontValue::class) + ->toBeInstanceOf(FontValue::class) ->and($value->fontFamily->name)->toBe('Inter') ->and($value->fontSize)->toBe('2xl') ->and($value->lineHeight)->toBe('tight') @@ -328,7 +329,7 @@ $value = new TypographyValue($data, 'test'); expect($value->fontFamily) - ->toBeInstanceOf(\BagistoPlus\Visual\Settings\Support\FontValue::class) + ->toBeInstanceOf(FontValue::class) ->and($value->fontFamily->name) ->toBe('Inter') ->and($value->fontFamily->slug) diff --git a/tests/Theme/ThemeTest.php b/tests/Theme/ThemeTest.php index 9f245c81..1b915c54 100644 --- a/tests/Theme/ThemeTest.php +++ b/tests/Theme/ThemeTest.php @@ -1,8 +1,123 @@ toBeClass(\Webkul\Theme\Theme::class); + ->toBeClass(Webkul\Theme\Theme::class); +}); + +it('lazily loads settings on first access without throwing uninitialized property error', function () { + $expected = new PropertyBag(['lazy' => 'loaded']); + + $loader = Mockery::mock(ThemeSettingsLoader::class); + $loader->shouldReceive('loadThemeSettings')->once()->andReturn($expected); + app()->instance(ThemeSettingsLoader::class, $loader); + + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + expect($theme->settings)->toBe($expected); +}); + +it('memoizes settings across repeated access', function () { + $loader = Mockery::mock(ThemeSettingsLoader::class); + $loader->shouldReceive('loadThemeSettings')->once()->andReturn(new PropertyBag); + app()->instance(ThemeSettingsLoader::class, $loader); + + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + $first = $theme->settings; + $second = $theme->settings; + + expect($first)->toBe($second); +}); + +it('honors explicit settings assignment without triggering the loader', function () { + $loader = Mockery::mock(ThemeSettingsLoader::class); + $loader->shouldNotReceive('loadThemeSettings'); + app()->instance(ThemeSettingsLoader::class, $loader); + + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + $bag = new PropertyBag(['foo' => 'bar']); + $theme->settings = $bag; + + expect($theme->settings)->toBe($bag); +}); + +it('reflects backing field state via isset', function () { + $loader = Mockery::mock(ThemeSettingsLoader::class); + $loader->shouldNotReceive('loadThemeSettings'); + app()->instance(ThemeSettingsLoader::class, $loader); + + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + expect(isset($theme->settings))->toBeFalse(); + + $theme->settings = new PropertyBag; + + expect(isset($theme->settings))->toBeTrue(); + + $theme->settings = null; + + expect(isset($theme->settings))->toBeFalse(); +}); + +it('rejects access to unknown properties', function () { + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + expect(fn () => $theme->nonExistent)->toThrow(Error::class, 'Undefined property'); +}); + +it('rejects writes to unknown properties', function () { + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + expect(fn () => $theme->nonExistent = 'value')->toThrow(Error::class, 'Cannot create dynamic property'); +}); + +// Regression for the original Livewire bug: $theme->settings->get(...) used to throw +// "Typed property must not be accessed before initialization" when called outside a +// shop::* view (e.g. during a Livewire update request). The lazy loader makes it safe. +it('allows reading settings on a freshly constructed theme without uninitialized error', function () { + $loader = Mockery::mock(ThemeSettingsLoader::class); + $loader->shouldReceive('loadThemeSettings')->andReturn(new PropertyBag(['some-key' => 'some-value'])); + app()->instance(ThemeSettingsLoader::class, $loader); + + $theme = Theme::make([ + 'code' => 'fake-theme', + 'name' => 'Fake Theme', + 'visual_theme' => true, + ]); + + expect($theme->settings->get('some-key'))->toBe('some-value'); }); diff --git a/tests/Theme/ThemesTest.php b/tests/Theme/ThemesTest.php index 36702ced..5d85346f 100644 --- a/tests/Theme/ThemesTest.php +++ b/tests/Theme/ThemesTest.php @@ -1,21 +1,22 @@ toBe(\Webkul\Theme\Themes::class); + expect(get_parent_class(Themes::class))->toBe(Webkul\Theme\Themes::class); }); test('`app(\'themes\')` should resolve instance of \\BagistoPlus\\Visual\\Theme\Themes', function () { expect(app('themes')) - ->toBeInstanceOf(\BagistoPlus\Visual\Theme\Themes::class); + ->toBeInstanceOf(Themes::class); }); it('should load themes as instance of \\BagistoPlus\\Visual\\Theme\\Theme', function () { expect(app('themes')->all()) - ->toContainOnlyInstancesOf(\BagistoPlus\Visual\Theme\Theme::class); + ->toContainOnlyInstancesOf(Theme::class); }); it('should prepend default views path to shop namespace when active theme is visual theme', function () {