diff --git a/.ci/coverage/errors b/.ci/coverage/errors
new file mode 100644
index 00000000..e46029e7
--- /dev/null
+++ b/.ci/coverage/errors
@@ -0,0 +1 @@
+100.00% of lines, 0 not covered
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e35a2296..62ec91ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable changes are listed here. The format follows [Keep a Changelog](https
## [Unreleased]
### Added
+- Error tracking (`alveby/atrium-errors`, `atrium:module:install alveby/atrium-errors`), kept in the site's own database: PHP exceptions, queue jobs that failed for good, failed scheduled tasks and, when switched on, JavaScript errors of the site and the admin (a small script the module adds to the pages itself, reported to a rate-limited endpoint). Grouped by class and the first five frames of the app's own code, line numbers and changing values left out. **Site health → Errors**: the list with status buttons, search and filters by site, release, level, source and address; an error's page with its trace and code, the request, what happened before, a chart by hour or by day with the number on every bar, the addresses and releases it happens in, every event; resolve, **resolve in next release** (comes back only in another release), ignore, reopen. An **Errors in 24 hours** dashboard tile. E-mail and Telegram alerts for new errors, errors that came back and spikes, once per reason and ten in ten minutes at most. Secrets and personal data scrubbed before anything is stored (no headers, cookies, body or IP; filtered keys, e-mails, cards checked with Luhn, phones). Sampling, a per-minute cap, writing after the response or through a queue, a fallback log when the database is down, 90 days kept (`atrium:errors:prune`). Drivers: `database`, `sentry` (Sentry, self-hosted Sentry or GlitchTip with only a DSN, no SDK), `log`, and your own through `Atrium\Errors\Contracts\ErrorReporter` (Bugsnag, Rollbar, a webhook). Rights `errors.view` and `errors.settings`; an administrator of some sites sees only their errors. `atrium:errors:test` sends a test error everywhere. Guide in `docs/errors.md`. Labels in 15 languages; the chart's colours measured in all five themes.
- Custom fields (`alveby/atrium-custom-fields`, `atrium:module:install alveby/atrium-custom-fields`): editors add fields to any module from a **Fields** button on its list, with no migration: line, text, integer, decimal, yes/no, date, list, multiple choice, link to a record, file and image, with a name and hint per content language, a tab of the module's form, and the flags required, show in the list, filterable, sortable, searchable, translatable and per site (or shown on one site only). Values live in a JSON column `custom` added with the first field; the filterable and sortable ones are also kept in a typed index table (`custom_field_index`), updated on every save and delete and rebuilt by `atrium:custom-fields:reindex`. `whereCustom()`, `whereCustomBetween()`, `whereCustomFilters()` and `orderByCustom()` on every Eloquent query, and `CustomFacets::for(Product::class, $query)->filters($filters)->counts([...])` / `->ranges([...])` for a filter panel (each field counted with every filter but its own). `atrium:custom-fields:promote` moves a hot field into a real indexed column of the module's table. The fields are in the API (`filter[code]=`, `sort=`, `search=`), its documentation and the MCP tool `describe_module`. On 100 000 records a filtered page of 24 takes 54–185 ms and its three facets 76–374 ms (SQLite, PostgreSQL 17, MySQL 8.4). With `atrium:install --demo` the catalog's products get five filterable fields (weight, battery life, waterproof, connectivity, warranty), named in all 15 languages and weighed in pounds for an English (US) shop, in kilograms elsewhere. Guide in `docs/custom-fields.md`. Admin labels in 15 languages.
- Ready-made sites (`alveby/atrium-solutions`): `php artisan atrium:solution:install law` turns a fresh project into a whole site: the modules it needs on and the others off (their data kept), the migrations, its content languages, the brand as the site name, its names for the modules in the admin and on the site, their addresses and the site menu, and its content in English, German and Russian; a second run doubles nothing. `atrium:solution:list` lists the solutions and the modules each still lacks; `--json` is the catalogue (texts in every language, modules, palette, fonts, screenshots, pages, install command). A solution is a folder with a `solution.json` and a seeder extending `SolutionSeeder`; other packages add their folders to `atrium-solutions.paths`. The first one is `law`: Vellmar Oake, a made-up law firm with six practice areas, six lawyers in two departments, insights, two offices, a consultation form, a fees FAQ and client reviews.
- Backup module (`alveby/atrium-backup`, on spatie/laravel-backup): the databases (MySQL, MariaDB, PostgreSQL, SQLite) in a consistent dump and the chosen disks and folders in one zip, encrypted with `ATRIUM_BACKUP_PASSWORD`, copied to a local folder, S3 or S3-compatible storage, FTP, SFTP or Google Drive, daily or weekly, with daily/weekly/monthly/yearly retention and a size cap. An e-mail to superadmins when a backup or a destination fails, the newest archive is too old or its size jumps. A **Backups** screen for superadmins only: the archives on every destination, **Back up now**, download, delete, destination health, and a restore that first shows what the archive will change (dumps, target databases, new/changed/extra files, warnings), asks for the archive's name and makes a safety backup; the same from `atrium:backup:restore` with `--dry-run`. Runs after the response or on a queue, one at a time, logged with who did it. See [docs/backup.md](docs/backup.md).
diff --git a/README.md b/README.md
index 2e7afb52..5e7af0f4 100644
--- a/README.md
+++ b/README.md
@@ -122,6 +122,7 @@ The Bitrix database is only read. The tabs, field order and list columns come ou
- [Cache: fast pages with dozens of properties, Redis, the page cache, CDN headers](docs/cache.md)
- [Moving from 1C-Bitrix, step by step](docs/bitrix.md)
- [Backups: databases and files to several places, schedules, health checks, restore](docs/backup.md)
+- [Errors: PHP, queue and JavaScript errors in the site's database, alerts, Sentry and your own drivers](docs/errors.md)
- [CDN: pictures, resized copies and WebP/AVIF, cache purge, uploads to S3](docs/cdn.md)
- [Two-factor sign-in: authenticator apps, passkeys, codes, the sign-in log](docs/two-factor.md)
- [Social sign-in: providers, app registration, redirect URLs](docs/social-login.md)
@@ -138,6 +139,7 @@ The Bitrix database is only read. The tabs, field order and list columns come ou
| [`alveby/atrium-seo`](packages/seo/README.md) | Meta templates, hreflang, sitemaps, schema.org, redirects and an SEO check |
| [`alveby/atrium-docs`](packages/docs/README.md) | Documentation pages from Markdown, with versions and search |
| [`alveby/atrium-backup`](packages/backup/README.md) | Backups of the databases and files, restore from the admin |
+| [`alveby/atrium-errors`](packages/errors/README.md) | Error tracking in the site's database, alerts, Sentry |
| [`alveby/atrium-news`](packages/news/README.md) | News |
| [`alveby/atrium-pages`](packages/pages/README.md) | Static pages, with an import of 1C-Bitrix pages |
| [`alveby/atrium-catalog`](packages/catalog/README.md) | Product catalog with nested sections |
diff --git a/composer.json b/composer.json
index 2f6cf826..9ad7a84f 100644
--- a/composer.json
+++ b/composer.json
@@ -22,6 +22,7 @@
"alveby/atrium-catalog": "@dev",
"alveby/atrium-custom-fields": "@dev",
"alveby/atrium-docs": "@dev",
+ "alveby/atrium-errors": "@dev",
"alveby/atrium-faq": "@dev",
"alveby/atrium-forms": "@dev",
"alveby/atrium-news": "@dev",
@@ -73,6 +74,7 @@
"Atrium\\Catalog\\Tests\\": "packages/catalog/tests/",
"Atrium\\CustomFields\\Tests\\": "packages/custom-fields/tests/",
"Atrium\\Docs\\Tests\\": "packages/docs/tests/",
+ "Atrium\\Errors\\Tests\\": "packages/errors/tests/",
"Atrium\\Faq\\Tests\\": "packages/faq/tests/",
"Atrium\\Forms\\Tests\\": "packages/forms/tests/",
"Atrium\\News\\Tests\\": "packages/news/tests/",
@@ -164,6 +166,7 @@
"alveby/atrium-catalog": "0.1.x-dev",
"alveby/atrium-custom-fields": "0.1.x-dev",
"alveby/atrium-docs": "0.1.x-dev",
+ "alveby/atrium-errors": "0.1.x-dev",
"alveby/atrium-faq": "0.1.x-dev",
"alveby/atrium-forms": "0.1.x-dev",
"alveby/atrium-news": "0.1.x-dev",
diff --git a/composer.lock b/composer.lock
index b9170651..23ef77ff 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fdf954aed638fe72ac3112f7ef28c221",
+ "content-hash": "0e6dc885b5d747dac2fe3141fe781260",
"packages": [
{
"name": "alveby/atrium",
@@ -12,7 +12,7 @@
"dist": {
"type": "path",
"url": "packages/admin",
- "reference": "cdaa0b836013cd3908ada0ab730cfc5bc8709a68"
+ "reference": "4f925755003390f651058c88303838daa3f239a4"
},
"require": {
"illuminate/database": "^13.0",
@@ -79,7 +79,7 @@
"dist": {
"type": "path",
"url": "packages/two-factor",
- "reference": "f20265625e90c0593c2feb1db67a19dbbe1a7b1a"
+ "reference": "69c1be51c773088af110ad9c2d3b34ba1d1839e9"
},
"require": {
"alveby/atrium": "^0.1",
@@ -152,7 +152,7 @@
"dist": {
"type": "path",
"url": "packages/ai",
- "reference": "2e0813b9c0c452ba8b21bd93ec0f06480921661d"
+ "reference": "f3fd3c28faeba0a00162138a47c2610dffe51205"
},
"require": {
"alveby/atrium": "^0.1",
@@ -219,7 +219,7 @@
"dist": {
"type": "path",
"url": "packages/backup",
- "reference": "6cd4306c9665e6293081ce166e6ee454d68437d1"
+ "reference": "66f1dba5a4d7d3f32cb3c3930cfaa0da298cf712"
},
"require": {
"alveby/atrium": "^0.1",
@@ -293,7 +293,7 @@
"dist": {
"type": "path",
"url": "packages/brands",
- "reference": "6b176d381821cdf2ba9b506caa5ad8e138b66082"
+ "reference": "72791048383e904d3eecb482ca53f9631833c197"
},
"require": {
"alveby/atrium": "^0.1",
@@ -359,7 +359,7 @@
"dist": {
"type": "path",
"url": "packages/catalog",
- "reference": "22791fc20e06571ac7fdaf8814715a7eb719dfbd"
+ "reference": "e496239e03faad46990cb4e022aa792fcd3cb35e"
},
"require": {
"alveby/atrium": "^0.1",
@@ -448,7 +448,7 @@
"dist": {
"type": "path",
"url": "packages/custom-fields",
- "reference": "784df30eb21b9991700ae9082101ba69648428c0"
+ "reference": "eb1b79bd24ede1ae7c8acd49a0d454212070d2cf"
},
"require": {
"alveby/atrium": "^0.1",
@@ -521,7 +521,7 @@
"dist": {
"type": "path",
"url": "packages/docs",
- "reference": "0f9b77a42229bceb4ad4e26be20a4144ae997a36"
+ "reference": "98a06714746d959af086dddfd000d757fcb74a58"
},
"require": {
"alveby/atrium": "^0.1",
@@ -579,13 +579,90 @@
"relative": true
}
},
+ {
+ "name": "alveby/atrium-errors",
+ "version": "0.1.x-dev",
+ "dist": {
+ "type": "path",
+ "url": "packages/errors",
+ "reference": "d29b8df0555b34f989e35601139a93ed79e1452b"
+ },
+ "require": {
+ "alveby/atrium": "^0.1",
+ "illuminate/support": "^13.0",
+ "php": "^8.3"
+ },
+ "require-dev": {
+ "orchestra/testbench": "^11.0",
+ "phpunit/phpunit": "^12.5"
+ },
+ "suggest": {
+ "alveby/atrium-mail": "Sends the alert letters through the account picked for the \"errors\" purpose",
+ "sentry/sentry-laravel": "The official Sentry SDK, for tracing and profiling on top of what the sentry driver sends"
+ },
+ "type": "atrium-module",
+ "extra": {
+ "atrium": {
+ "migrations": "database/migrations",
+ "settings": "Atrium\\Errors\\ErrorsSettings",
+ "permissions": {
+ "view": {
+ "label": "atrium-errors::errors.permissions.view",
+ "with": "errors.settings"
+ }
+ },
+ "title": "atrium-errors::errors.title"
+ },
+ "laravel": {
+ "providers": [
+ "Atrium\\Errors\\ErrorsServiceProvider"
+ ]
+ },
+ "branch-alias": {
+ "dev-main": "0.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Atrium\\Errors\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "Atrium\\Errors\\Tests\\": "tests/"
+ }
+ },
+ "license": [
+ "MIT"
+ ],
+ "description": "Error tracking for Atrium: PHP, queue, schedule and browser errors grouped into issues in the site's own database, with Sentry, GlitchTip or any other service as an extra or a replacement",
+ "homepage": "https://github.com/AlveBy/atrium",
+ "keywords": [
+ "admin",
+ "error-tracking",
+ "errors",
+ "exceptions",
+ "glitchtip",
+ "laravel",
+ "monitoring",
+ "sentry"
+ ],
+ "support": {
+ "issues": "https://github.com/AlveBy/atrium/issues",
+ "source": "https://github.com/AlveBy/atrium"
+ },
+ "transport-options": {
+ "symlink": true,
+ "relative": true
+ }
+ },
{
"name": "alveby/atrium-faq",
"version": "0.1.x-dev",
"dist": {
"type": "path",
"url": "packages/faq",
- "reference": "a645787060d1bd09423c2763b7b92181bd3b3adc"
+ "reference": "d1565935218104d15eb3a5d221d8d04c2b0ef886"
},
"require": {
"alveby/atrium": "^0.1",
@@ -663,7 +740,7 @@
"dist": {
"type": "path",
"url": "packages/forms",
- "reference": "4a1bfb284ac1d9a22ddbf46c39fc88874474cf2a"
+ "reference": "699975b6ac11473e7539de3aa9499e9a80706640"
},
"require": {
"alveby/atrium": "^0.1",
@@ -731,7 +808,7 @@
"dist": {
"type": "path",
"url": "packages/news",
- "reference": "573e8f15a3ff69d31802c0620ede7c5735d68d3f"
+ "reference": "5066371aff93dc118eee5875c6d8f78c77b304b6"
},
"require": {
"alveby/atrium": "^0.1",
@@ -804,7 +881,7 @@
"dist": {
"type": "path",
"url": "packages/pages",
- "reference": "b254787a41b93719022081c7f5f9c6a79e63c5d9"
+ "reference": "a6965ef11be2495d5a834c53042aa6742a7b1edb"
},
"require": {
"alveby/atrium": "^0.1",
@@ -880,7 +957,7 @@
"dist": {
"type": "path",
"url": "packages/reviews",
- "reference": "e7e6d6dec15af01672d00266d8ed3b7f58917a62"
+ "reference": "32803cbcbe5a56f35594f13e65b9cc9622a89015"
},
"require": {
"alveby/atrium": "^0.1",
@@ -950,7 +1027,7 @@
"dist": {
"type": "path",
"url": "packages/seo",
- "reference": "5d7b2e2195d35c8893fd84b8d0da5f43ceabe49b"
+ "reference": "9b03717a22cd8a886cf2a9c5b222fb074c9bbba5"
},
"require": {
"alveby/atrium": "^0.1",
@@ -1043,7 +1120,7 @@
"dist": {
"type": "path",
"url": "packages/social-login",
- "reference": "8006eb568380b3fabd049ac4907f0058357dc995"
+ "reference": "af5b0489019d706516fe43da8d9414f9ab10691f"
},
"require": {
"alveby/atrium": "^0.1",
@@ -1121,7 +1198,7 @@
"dist": {
"type": "path",
"url": "packages/solutions",
- "reference": "9b3927801278789e3fe6148200000de32d2db5b4"
+ "reference": "e87c079d6ef7ae818e246929ed4f598ce715cf22"
},
"require": {
"alveby/atrium": "^0.1",
@@ -1196,7 +1273,7 @@
"dist": {
"type": "path",
"url": "packages/stores",
- "reference": "b580a595228cb8d6a65245d6c707c6fb28b3181a"
+ "reference": "208bef5ab7a53b7f30028de14fba4da01318f2f0"
},
"require": {
"alveby/atrium": "^0.1",
@@ -1268,7 +1345,7 @@
"dist": {
"type": "path",
"url": "packages/team",
- "reference": "bfcdacf4ea838f140dd33ff12cad6d92a3bc64dd"
+ "reference": "cdaadf5f35685d722eac18ea61c1449294d24105"
},
"require": {
"alveby/atrium": "^0.1",
@@ -1346,7 +1423,7 @@
"dist": {
"type": "path",
"url": "packages/theme",
- "reference": "a26995ec0bdb8cc6c5474e77625b39806d8df880"
+ "reference": "b04ef49e254ae590df471bc038aa6db8e2e9e72c"
},
"require": {
"alveby/atrium": "^0.1",
@@ -9602,7 +9679,7 @@
"dist": {
"type": "path",
"url": "packages/bitrix",
- "reference": "a0d14867aa5127d3c26ef546165607dcb83f867d"
+ "reference": "16c2ad4cf3372b0b013bc0a449a6fe8ab843cab2"
},
"require": {
"alveby/atrium": "^0.1",
@@ -9666,7 +9743,7 @@
"dist": {
"type": "path",
"url": "packages/wordpress",
- "reference": "6f6f30e14b1a2a3cd9346fa2c87d79db2574c514"
+ "reference": "bd8bbf61c8d395b8f84c405e26a36b8f0bb940b5"
},
"require": {
"alveby/atrium": "^0.1",
@@ -14758,6 +14835,7 @@
"alveby/atrium-catalog": 20,
"alveby/atrium-custom-fields": 20,
"alveby/atrium-docs": 20,
+ "alveby/atrium-errors": 20,
"alveby/atrium-faq": 20,
"alveby/atrium-forms": 20,
"alveby/atrium-news": 20,
diff --git a/config/atrium.php b/config/atrium.php
index 17292057..f6bb77a9 100644
--- a/config/atrium.php
+++ b/config/atrium.php
@@ -66,6 +66,7 @@
'alveby/atrium-2fa',
'alveby/atrium-social-login',
'alveby/atrium-seo',
+ 'alveby/atrium-errors',
],
/*
diff --git a/docs/errors.md b/docs/errors.md
new file mode 100644
index 00000000..68eefd00
--- /dev/null
+++ b/docs/errors.md
@@ -0,0 +1,244 @@
+# Errors
+
+[English](errors.md) · [Русский](errors.ru.md)
+
+`alveby/atrium-errors` catches the site's errors and keeps them in the site's own database: PHP exceptions, failed queue jobs, failed scheduled tasks and JavaScript errors in visitors' browsers. Errors of one kind from one place make one line in the admin, with the number of times it happened, the trace, the requests and a chart. It e-mails or messages Telegram when a new error appears or a fixed one comes back. It can also send everything to Sentry or GlitchTip, or to any service you write a driver for.
+
+It is a small Sentry inside the site: nothing to host, nothing to pay, and the data stays on your server. When you outgrow it, switch Sentry on next to it or instead of it.
+
+- [Install](#install)
+- [What is caught](#what-is-caught)
+- [How errors are grouped](#how-errors-are-grouped)
+- [The admin screens](#the-admin-screens)
+- [Statuses and «resolve in next release»](#statuses-and-resolve-in-next-release)
+- [Alerts](#alerts)
+- [Drivers: database, Sentry, log](#drivers-database-sentry-log)
+- [Your own driver: Bugsnag, Rollbar, a webhook](#your-own-driver-bugsnag-rollbar-a-webhook)
+- [Using sentry-laravel instead](#using-sentry-laravel-instead)
+- [JavaScript errors](#javascript-errors)
+- [Secrets and personal data](#secrets-and-personal-data)
+- [Load: sampling, the cap, the queue](#load-sampling-the-cap-the-queue)
+- [Permissions and sites](#permissions-and-sites)
+- [Settings](#settings)
+- [Commands](#commands)
+
+## Install
+
+```bash
+composer require alveby/atrium-errors
+php artisan atrium:module:install alveby/atrium-errors
+```
+
+The install creates two tables (`error_issues`, `error_events`), adds **Site health → Errors** to the menu, the **Errors in 24 hours** tile to the dashboard, and gives the right to see errors to every role that may change the module's settings. Old events are deleted at night by Laravel's scheduler, so cron must call `php artisan schedule:run` every minute, as for any Atrium site.
+
+Check that it works:
+
+```bash
+php artisan atrium:errors:test
+```
+
+A test error appears in **Site health → Errors** and in every other driver that is switched on.
+
+## What is caught
+
+| Source | How |
+|---|---|
+| PHP exceptions of pages and commands | Laravel's exception handler; what Laravel does not report anyway (validation, 404, sign-in) is skipped |
+| Queue jobs that failed for good | the `JobFailed` event, with the job's name, queue and connection |
+| Scheduled tasks that failed | the `ScheduledTaskFailed` event, with the command and its schedule |
+| JavaScript errors | a small script in the pages, [switched on in the settings](#javascript-errors) |
+
+Each event keeps the exception chain (up to three previous exceptions) with code around every line of the trace, the request kept thin on purpose — the address with secret query parameters taken out, the method, the route, the site, the language and the signed-in user's id — the release, the environment, versions of PHP and Laravel, and the last 30 queries and log lines before the error. Headers, cookies, the request body and the IP address are never stored.
+
+To report something yourself:
+
+```php
+use Atrium\Errors\Errors;
+
+app(Errors::class)->capture($exception, context: ['order' => $order->id]);
+```
+
+Exceptions listed in `ignore` in `config/atrium-errors.php` are never caught.
+
+## How errors are grouped
+
+An error is the same one when it has the same class and happens in the same place: the first five frames of your own code, by file and function. Line numbers do not count, so an edit above the line does not make a new error; neither do numbers, ids or quoted values in the message. Compiled views and built bundles are recognised by name without their hash. When there is no code to tell the place by, the message with the changing parts blanked decides.
+
+## The admin screens
+
+**Site health → Errors** lists one line per error: its class and message, where it happens, the level and the source, how many times and for how many users, and when it was seen last. Buttons above the list switch between unresolved, resolved, ignored and all; the filters look for words in the class, message and place, and narrow the list by site, release, level, source and address. It sorts by last or first seen, by events or by users.
+
+An error's page shows:
+
+- buttons to resolve, resolve in the next release, ignore or reopen;
+- events, users, first and last seen, first and last release;
+- a chart by hour for the last 24 hours or by day for 30 days, with the number on every bar;
+- the addresses and releases it happens in most;
+- the trace of one event: your own frames with the code around them, the framework's frames behind a button;
+- the request, the environment and what happened before the error;
+- every event, newest first, each opening its own trace.
+
+The **Errors in 24 hours** tile on the dashboard counts events, new errors, errors that came back and unresolved ones, draws the events hour by hour and lists the five noisiest errors.
+
+## Statuses and «resolve in next release»
+
+| Status | Meaning |
+|---|---|
+| Unresolved | New or reopened. Alerts are sent |
+| Resolved | Fixed. A new event reopens it and sends a «came back» alert |
+| Ignored | Known and harmless. Events are still counted, no alerts |
+
+**Resolve in next release** is for an error fixed in code that is not deployed yet. The error is marked resolved in the release running now; events from this release do not reopen it, and the first event of any other release does. The release is the git commit of the checkout, or `ATRIUM_RELEASE` if you set it in the deploy script, or else the application's version from Composer.
+
+## Alerts
+
+Alerts go by e-mail, to Telegram, or both:
+
+- a **new** error;
+- an error that **came back** after it was resolved;
+- a **spike**: an error with more events in an hour than the threshold (100 by default; 0 turns spikes off).
+
+Each error alerts once per reason, a spike at most once an hour, and all of them together at most ten times in ten minutes, so an outage does not bury the inbox. Mail goes through the admin's mail settings under its own purpose, so it may use its own sender. For Telegram, create a bot with `@BotFather`, add it to a chat, and put its token and the chat id in the settings.
+
+## Drivers: database, Sentry, log
+
+An event goes to every driver that is switched on, each on its own: one that fails does not stop the others, and its error goes to the fallback log.
+
+| Driver | What it does |
+|---|---|
+| `database` | Keeps events in the site's database for the admin screens. On by default |
+| `sentry` | Sends events to Sentry, self-hosted Sentry or [GlitchTip](https://glitchtip.com), which speaks the same protocol. Needs only the DSN, no SDK |
+| `log` | Writes a line to the application's log, for log collectors that already read it |
+
+```dotenv
+ATRIUM_ERRORS_DRIVERS=database,sentry
+ATRIUM_ERRORS_SENTRY_DSN=https://public-key@errors.example.com/7
+```
+
+The `sentry` driver also takes `SENTRY_LARAVEL_DSN` or `SENTRY_DSN` when `ATRIUM_ERRORS_SENTRY_DSN` is empty.
+
+## Your own driver: Bugsnag, Rollbar, a webhook
+
+A driver is a class implementing `Atrium\Errors\Contracts\ErrorReporter`:
+
+```php
+namespace App\Errors;
+
+use Atrium\Errors\Contracts\ErrorReporter;
+use Atrium\Errors\Event;
+use Illuminate\Support\Facades\Http;
+
+final class WebhookReporter implements ErrorReporter
+{
+ public function report(Event $event): void
+ {
+ Http::timeout(3)->post('https://hooks.example.com/errors', [
+ 'id' => $event->id,
+ 'level' => $event->level,
+ 'title' => $event->class.': '.$event->message,
+ 'release' => $event->release,
+ 'fingerprint' => $event->fingerprint,
+ ]);
+ }
+}
+```
+
+Register it under a name and switch it on:
+
+```php
+// config/atrium-errors.php
+'reporters' => [
+ 'webhook' => App\Errors\WebhookReporter::class,
+],
+```
+
+```dotenv
+ATRIUM_ERRORS_DRIVERS=database,webhook
+```
+
+The class is made by the container, so its constructor may ask for anything bound there. The event arrives already scrubbed, sampled and within the cap. `report()` runs after the response has gone to the visitor, or in a queue job, so it must not rely on the request. It may throw: the error goes to the fallback log, and the other drivers still get the event.
+
+`Event` holds `id`, `kind` (`php`, `job`, `schedule`, `browser`, `message`), `level`, `class`, `message`, `exceptions` (each with `class`, `message` and `frames`, the frame of the throw first), `request` (`url`, `path`, `method`, `route`, `site_id`, `locale`, `user_id`), `context`, `breadcrumbs`, `environment`, `release`, `runtime`, `fingerprint` and `timestamp`.
+
+For Bugsnag or Rollbar, call their PHP client in `report()`: `Bugsnag::notifyError($event->class, $event->message)` or `Rollbar::log($event->level, $event->message, [...])`. Pass the `fingerprint` as their grouping hash so that both group errors the same way.
+
+## Using sentry-laravel instead
+
+If you prefer Sentry's own SDK (`sentry/sentry-laravel`) for its performance tracing, install it as Sentry's docs say and leave `sentry` out of `ATRIUM_ERRORS_DRIVERS`, so each error is not sent twice. Both can run together: the SDK reports to Sentry, this module keeps its own copy for the admin.
+
+## JavaScript errors
+
+Switch on **Catch JavaScript errors on the site** or **in the admin** in the settings (or `ATRIUM_ERRORS_BROWSER_SITE=true`, `ATRIUM_ERRORS_BROWSER_ADMIN=true`). The module then adds a small script to every full HTML page itself; no layout or theme needs editing. A page with a Content-Security-Policy gets the script with Vite's nonce.
+
+The script sends at most five errors per page and never the same one twice, with only the message, the type and the stack. The server adds the address and scrubs it. Reports go to `POST /atrium-errors/browser`, which accepts ten per minute from one visitor and 16 KB at most each.
+
+## Secrets and personal data
+
+Before an event is stored or sent anywhere, it is scrubbed:
+
+- headers, cookies, the request body and the IP address are not taken at all;
+- values under keys that name a password, secret, token, API key, authorization, cookie, session, CSRF token, card, CVV, IBAN, signature, DSN, e-mail, phone, PIN or one-time code are replaced with `[Filtered]` — in the context and the job's data, including keys like `user_password` or `X-Api-Key`, and in query parameters of the address;
+- in any text — messages, addresses, queries, log lines — `password=…`-like pairs are filtered; e-mails become `[email]`, card numbers (checked with Luhn, so an order number stays) become `[card]`, phone numbers become `[phone]`.
+
+Add your own keys in `scrub_keys` in `config/atrium-errors.php`.
+
+## Load: sampling, the cap, the queue
+
+The tracker must never take the site down with it:
+
+- **Sampling**: keep only part of the events, 1–100 percent (`ATRIUM_ERRORS_SAMPLE_RATE`, 100 by default).
+- **Cap**: at most this many events a minute for the whole site (`ATRIUM_ERRORS_PER_MINUTE`, 60 by default); the rest is dropped before any work is done.
+- **Writing later**: events are stored after the response has gone to the visitor; with `ATRIUM_ERRORS_QUEUE=redis` they go through that queue connection instead.
+- **Fallback log**: when the database cannot be written to, the event goes to `storage/logs/atrium-errors.log`, one JSON line each.
+- **Retention**: events older than 90 days are deleted at 03:40 every night (`ATRIUM_ERRORS_RETENTION_DAYS`); errors left without events go with them.
+
+An error inside the tracker itself goes to the fallback log and is never thrown.
+
+## Permissions and sites
+
+Two rights in **Roles**:
+
+| Right | Gives |
+|---|---|
+| `errors.view` — View errors | The list, the error pages, the status buttons and the dashboard tile |
+| `errors.settings` — Settings | The module's settings: drivers, DSN, alerts, sampling |
+
+On install, roles that have the settings right also get the view right. One does not include the other: a role may see errors without changing where they go, or the other way round.
+
+An administrator limited to some sites sees only errors that happened on those sites, and only their events. Errors with no site (commands, queue jobs) are seen only by administrators of all sites.
+
+## Settings
+
+**Modules → Errors → Settings** in the admin; a value saved there wins over `.env`, which gives the defaults. The DSN and the Telegram token are better kept in `.env`.
+
+| In the admin | `.env` | Default |
+|---|---|---|
+| Drivers | `ATRIUM_ERRORS_DRIVERS` | `database` |
+| Sentry DSN | `ATRIUM_ERRORS_SENTRY_DSN` | `SENTRY_LARAVEL_DSN`, `SENTRY_DSN` |
+| Events kept, % | `ATRIUM_ERRORS_SAMPLE_RATE` | 100 |
+| Events a minute at most | `ATRIUM_ERRORS_PER_MINUTE` | 60 |
+| Days to keep | `ATRIUM_ERRORS_RETENTION_DAYS` | 90 |
+| Alert e-mail | `ATRIUM_ERRORS_ALERT_EMAIL` | none |
+| Telegram bot token | `ATRIUM_ERRORS_TELEGRAM_TOKEN` | none |
+| Telegram chat | `ATRIUM_ERRORS_TELEGRAM_CHAT` | none |
+| Alert on new / came back | | on / on |
+| Spike: events an hour | | 100 |
+| JavaScript on the site / in the admin | `ATRIUM_ERRORS_BROWSER_SITE`, `ATRIUM_ERRORS_BROWSER_ADMIN` | off / off |
+
+Only in `.env`:
+
+| `.env` | Default | What it does |
+|---|---|---|
+| `ATRIUM_ERRORS_ENABLED` | `true` | `false`: nothing is caught; the admin screens stay |
+| `ATRIUM_RELEASE` | git commit, else Composer version | The release events are grouped by |
+| `ATRIUM_ERRORS_QUEUE` | none: after the response | A queue connection to store events through |
+
+The rest — ignored exceptions, extra keys to scrub, breadcrumbs kept, code lines around the trace, the fallback log's path — is in `config/atrium-errors.php` after `php artisan vendor:publish --tag=atrium-errors-config`.
+
+## Commands
+
+```bash
+php artisan atrium:errors:test # send a test error to every driver
+php artisan atrium:errors:prune # delete old events now
+php artisan atrium:errors:prune --days=30
+```
diff --git a/docs/errors.ru.md b/docs/errors.ru.md
new file mode 100644
index 00000000..bf990e57
--- /dev/null
+++ b/docs/errors.ru.md
@@ -0,0 +1,244 @@
+# Ошибки
+
+[English](errors.md) · [Русский](errors.ru.md)
+
+`alveby/atrium-errors` ловит ошибки сайта и хранит их в собственной базе сайта: исключения PHP, упавшие задачи очереди, упавшие задачи по расписанию и ошибки JavaScript в браузерах посетителей. Ошибки одного вида из одного места складываются в одну строку админки — со счётчиком, трассировкой, запросами и графиком. Когда появляется новая ошибка или возвращается исправленная, приходит письмо или сообщение в Telegram. Всё можно отправлять и в Sentry или GlitchTip, или в любой сервис, для которого вы напишете драйвер.
+
+Это маленький Sentry внутри сайта: ничего не нужно разворачивать и оплачивать, данные остаются на вашем сервере. Когда его станет мало, включите Sentry рядом или вместо.
+
+- [Установка](#установка)
+- [Что ловится](#что-ловится)
+- [Как ошибки группируются](#как-ошибки-группируются)
+- [Экраны админки](#экраны-админки)
+- [Статусы и «Решено в следующем релизе»](#статусы-и-решено-в-следующем-релизе)
+- [Оповещения](#оповещения)
+- [Драйверы: база, Sentry, журнал](#драйверы-база-sentry-журнал)
+- [Свой драйвер: Bugsnag, Rollbar, вебхук](#свой-драйвер-bugsnag-rollbar-вебхук)
+- [Вместо этого — sentry-laravel](#вместо-этого--sentry-laravel)
+- [Ошибки JavaScript](#ошибки-javascript)
+- [Секреты и персональные данные](#секреты-и-персональные-данные)
+- [Нагрузка: выборка, потолок, очередь](#нагрузка-выборка-потолок-очередь)
+- [Права и сайты](#права-и-сайты)
+- [Настройки](#настройки)
+- [Команды](#команды)
+
+## Установка
+
+```bash
+composer require alveby/atrium-errors
+php artisan atrium:module:install alveby/atrium-errors
+```
+
+Установка создаёт две таблицы (`error_issues`, `error_events`), добавляет в меню **Состояние сайта → Ошибки**, на рабочий стол — плитку **Ошибки за сутки**, и даёт право просмотра ошибок всем ролям, которым можно менять настройки модуля. Старые события удаляются ночью планировщиком Laravel, поэтому cron должен раз в минуту вызывать `php artisan schedule:run` — как на любом сайте Atrium.
+
+Проверить, что всё работает:
+
+```bash
+php artisan atrium:errors:test
+```
+
+Тестовая ошибка появится в **Состояние сайта → Ошибки** и во всех остальных включённых драйверах.
+
+## Что ловится
+
+| Источник | Как |
+|---|---|
+| Исключения PHP на страницах и в командах | обработчик исключений Laravel; то, о чём Laravel и так не сообщает (валидация, 404, вход), пропускается |
+| Задачи очереди, упавшие окончательно | событие `JobFailed`, с именем задачи, очередью и подключением |
+| Задачи по расписанию, которые упали | событие `ScheduledTaskFailed`, с командой и её расписанием |
+| Ошибки JavaScript | небольшой скрипт в страницах, [включается в настройках](#ошибки-javascript) |
+
+Каждое событие хранит цепочку исключений (до трёх предыдущих) с кодом вокруг каждой строки трассировки; запрос — намеренно скупо: адрес без секретных параметров, метод, маршрут, сайт, язык и id вошедшего пользователя; релиз, окружение, версии PHP и Laravel и последние 30 запросов к базе и строк журнала перед ошибкой. Заголовки, куки, тело запроса и IP-адрес не сохраняются никогда.
+
+Сообщить об ошибке самому:
+
+```php
+use Atrium\Errors\Errors;
+
+app(Errors::class)->capture($exception, context: ['order' => $order->id]);
+```
+
+Исключения из списка `ignore` в `config/atrium-errors.php` не ловятся никогда.
+
+## Как ошибки группируются
+
+Ошибка считается той же, если у неё тот же класс и она случается в том же месте: первые пять кадров вашего собственного кода, по файлу и функции. Номера строк не учитываются — правка выше строки не создаёт новую ошибку; числа, id и значения в кавычках в сообщении тоже. Скомпилированные шаблоны и собранные бандлы узнаются по имени без хеша. Если места по коду не определить, решает сообщение с вычищенными меняющимися частями.
+
+## Экраны админки
+
+**Состояние сайта → Ошибки** — по строке на ошибку: класс и сообщение, где случается, уровень и источник, сколько раз и у скольких пользователей, когда была в последний раз. Кнопки над списком переключают нерешённые, решённые, скрытые и все; фильтры ищут слова в классе, сообщении и месте и сужают список по сайту, релизу, уровню, источнику и адресу. Сортировка — по последнему или первому появлению, по событиям или по пользователям.
+
+Страница ошибки показывает:
+
+- кнопки «Решено», «Решено в следующем релизе», «Скрыть» или «Открыть снова»;
+- события, пользователей, первое и последнее появление, первый и последний релиз;
+- график по часам за сутки или по дням за 30 дней, с числом на каждом столбике;
+- адреса и релизы, где она случается чаще всего;
+- трассировку одного события: кадры вашего кода с кодом вокруг, кадры фреймворка — за кнопкой;
+- запрос, окружение и то, что происходило перед ошибкой;
+- все события, новые сверху; каждое открывает свою трассировку.
+
+Плитка **Ошибки за сутки** на рабочем столе считает события, новые ошибки, вернувшиеся и нерешённые, рисует события по часам и показывает пять самых частых ошибок.
+
+## Статусы и «Решено в следующем релизе»
+
+| Статус | Значит |
+|---|---|
+| Не решена | Новая или открытая снова. Оповещения приходят |
+| Решена | Исправлена. Новое событие открывает её снова и присылает оповещение «вернулась» |
+| Скрыта | Известна и безвредна. События считаются, оповещений нет |
+
+**Решено в следующем релизе** — для ошибки, которая исправлена в коде, но ещё не выложена. Ошибка помечается решённой в релизе, который работает сейчас: события этого релиза её не открывают, а первое событие любого другого — открывает. Релиз — это коммит git рабочей копии, или `ATRIUM_RELEASE`, если вы задаёте его в скрипте выкладки, или версия приложения из Composer.
+
+## Оповещения
+
+Оповещения приходят письмом, в Telegram или туда и туда:
+
+- **новая** ошибка;
+- ошибка **вернулась** после того, как её отметили решённой;
+- **всплеск**: у ошибки за час событий больше порога (по умолчанию 100; 0 выключает всплески).
+
+Каждая ошибка оповещает один раз по каждой причине, всплеск — не чаще раза в час, а все вместе — не больше десяти раз за десять минут, чтобы авария не завалила почту. Письма идут через почтовые настройки админки со своим назначением, поэтому у них может быть свой отправитель. Для Telegram создайте бота через `@BotFather`, добавьте его в чат и впишите в настройки его токен и id чата.
+
+## Драйверы: база, Sentry, журнал
+
+Событие уходит во все включённые драйверы, в каждый отдельно: упавший не мешает остальным, а его ошибка записывается в запасной журнал.
+
+| Драйвер | Что делает |
+|---|---|
+| `database` | Хранит события в базе сайта для экранов админки. Включён по умолчанию |
+| `sentry` | Отправляет события в Sentry, свой Sentry или [GlitchTip](https://glitchtip.com), который говорит на том же протоколе. Нужен только DSN, SDK не нужен |
+| `log` | Пишет строку в журнал приложения — для сборщиков журналов, которые его уже читают |
+
+```dotenv
+ATRIUM_ERRORS_DRIVERS=database,sentry
+ATRIUM_ERRORS_SENTRY_DSN=https://public-key@errors.example.com/7
+```
+
+Если `ATRIUM_ERRORS_SENTRY_DSN` пуст, драйвер `sentry` берёт `SENTRY_LARAVEL_DSN` или `SENTRY_DSN`.
+
+## Свой драйвер: Bugsnag, Rollbar, вебхук
+
+Драйвер — это класс, реализующий `Atrium\Errors\Contracts\ErrorReporter`:
+
+```php
+namespace App\Errors;
+
+use Atrium\Errors\Contracts\ErrorReporter;
+use Atrium\Errors\Event;
+use Illuminate\Support\Facades\Http;
+
+final class WebhookReporter implements ErrorReporter
+{
+ public function report(Event $event): void
+ {
+ Http::timeout(3)->post('https://hooks.example.com/errors', [
+ 'id' => $event->id,
+ 'level' => $event->level,
+ 'title' => $event->class.': '.$event->message,
+ 'release' => $event->release,
+ 'fingerprint' => $event->fingerprint,
+ ]);
+ }
+}
+```
+
+Зарегистрируйте его под именем и включите:
+
+```php
+// config/atrium-errors.php
+'reporters' => [
+ 'webhook' => App\Errors\WebhookReporter::class,
+],
+```
+
+```dotenv
+ATRIUM_ERRORS_DRIVERS=database,webhook
+```
+
+Класс создаётся контейнером, так что конструктор может просить всё, что там зарегистрировано. Событие приходит уже очищенным, после выборки и потолка. `report()` выполняется после того, как ответ ушёл посетителю, или в задаче очереди, поэтому на запрос полагаться нельзя. Бросать исключения можно: ошибка уйдёт в запасной журнал, а остальные драйверы событие всё равно получат.
+
+В `Event` есть `id`, `kind` (`php`, `job`, `schedule`, `browser`, `message`), `level`, `class`, `message`, `exceptions` (у каждого `class`, `message` и `frames`, кадр броска первым), `request` (`url`, `path`, `method`, `route`, `site_id`, `locale`, `user_id`), `context`, `breadcrumbs`, `environment`, `release`, `runtime`, `fingerprint` и `timestamp`.
+
+Для Bugsnag или Rollbar вызовите в `report()` их PHP-клиент: `Bugsnag::notifyError($event->class, $event->message)` или `Rollbar::log($event->level, $event->message, [...])`. Передайте `fingerprint` как их ключ группировки — тогда обе системы будут группировать ошибки одинаково.
+
+## Вместо этого — sentry-laravel
+
+Если вам нужен собственный SDK Sentry (`sentry/sentry-laravel`) ради трассировки производительности, установите его по документации Sentry и не указывайте `sentry` в `ATRIUM_ERRORS_DRIVERS`, чтобы ошибки не уходили дважды. Работать вместе они могут: SDK отправляет в Sentry, модуль хранит свою копию для админки.
+
+## Ошибки JavaScript
+
+Включите в настройках **Ловить ошибки JavaScript на сайте** или **в админке** (или `ATRIUM_ERRORS_BROWSER_SITE=true`, `ATRIUM_ERRORS_BROWSER_ADMIN=true`). Модуль сам добавит небольшой скрипт в каждую полную HTML-страницу — шаблоны и тему править не нужно. Странице с Content-Security-Policy скрипт достаётся с nonce от Vite.
+
+Скрипт отправляет не больше пяти ошибок со страницы и никогда одну и ту же дважды — только сообщение, тип и стек. Адрес добавляет и чистит сервер. Отчёты приходят на `POST /atrium-errors/browser`, который принимает десять в минуту от одного посетителя и не больше 16 КБ каждый.
+
+## Секреты и персональные данные
+
+Перед тем как событие сохраняется или куда-то уходит, оно очищается:
+
+- заголовки, куки, тело запроса и IP-адрес не берутся вовсе;
+- значения под ключами, в названии которых есть пароль, секрет, токен, ключ API, авторизация, куки, сессия, CSRF-токен, карта, CVV, IBAN, подпись, DSN, e-mail, телефон, PIN или одноразовый код, заменяются на `[Filtered]` — в контексте и данных задачи, включая ключи вроде `user_password` или `X-Api-Key`, и в параметрах адреса;
+- в любом тексте — сообщениях, адресах, запросах к базе, строках журнала — пары вида `password=…` вычищаются; e-mail становится `[email]`, номер карты (проверяется по Луну, так что номер заказа остаётся) — `[card]`, телефон — `[phone]`.
+
+Свои ключи добавляются в `scrub_keys` в `config/atrium-errors.php`.
+
+## Нагрузка: выборка, потолок, очередь
+
+Учёт ошибок не должен ронять сайт вместе с собой:
+
+- **Выборка**: хранить только часть событий, 1–100 процентов (`ATRIUM_ERRORS_SAMPLE_RATE`, по умолчанию 100).
+- **Потолок**: не больше стольких событий в минуту на весь сайт (`ATRIUM_ERRORS_PER_MINUTE`, по умолчанию 60); лишнее отбрасывается до всякой работы.
+- **Запись потом**: события сохраняются после того, как ответ ушёл посетителю; с `ATRIUM_ERRORS_QUEUE=redis` — через это подключение очереди.
+- **Запасной журнал**: если в базу записать нельзя, событие уходит в `storage/logs/atrium-errors.log`, по строке JSON на каждое.
+- **Срок хранения**: события старше 90 дней удаляются каждую ночь в 03:40 (`ATRIUM_ERRORS_RETENTION_DAYS`); ошибки, у которых не осталось событий, — вместе с ними.
+
+Ошибка внутри самого модуля записывается в запасной журнал и никогда не пробрасывается дальше.
+
+## Права и сайты
+
+Два права в **Ролях**:
+
+| Право | Даёт |
+|---|---|
+| `errors.view` — Просмотр ошибок | Список, страницы ошибок, кнопки статусов и плитку на рабочем столе |
+| `errors.settings` — Настройки | Настройки модуля: драйверы, DSN, оповещения, выборку |
+
+При установке роли с правом на настройки получают и право просмотра. Одно не включает другое: роль может видеть ошибки, не меняя, куда они уходят, и наоборот.
+
+Администратор, ограниченный частью сайтов, видит только ошибки, случившиеся на этих сайтах, и только их события. Ошибки без сайта (команды, задачи очереди) видят только администраторы всех сайтов.
+
+## Настройки
+
+**Модули → Ошибки → Настройки** в админке; сохранённое там важнее `.env`, который задаёт значения по умолчанию. DSN и токен Telegram лучше держать в `.env`.
+
+| В админке | `.env` | По умолчанию |
+|---|---|---|
+| Драйверы | `ATRIUM_ERRORS_DRIVERS` | `database` |
+| DSN Sentry | `ATRIUM_ERRORS_SENTRY_DSN` | `SENTRY_LARAVEL_DSN`, `SENTRY_DSN` |
+| Хранить событий, % | `ATRIUM_ERRORS_SAMPLE_RATE` | 100 |
+| Событий в минуту, не больше | `ATRIUM_ERRORS_PER_MINUTE` | 60 |
+| Хранить дней | `ATRIUM_ERRORS_RETENTION_DAYS` | 90 |
+| Почта для оповещений | `ATRIUM_ERRORS_ALERT_EMAIL` | нет |
+| Токен бота Telegram | `ATRIUM_ERRORS_TELEGRAM_TOKEN` | нет |
+| Чат Telegram | `ATRIUM_ERRORS_TELEGRAM_CHAT` | нет |
+| Оповещать о новых / вернувшихся | | да / да |
+| Всплеск: событий в час | | 100 |
+| JavaScript на сайте / в админке | `ATRIUM_ERRORS_BROWSER_SITE`, `ATRIUM_ERRORS_BROWSER_ADMIN` | нет / нет |
+
+Только в `.env`:
+
+| `.env` | По умолчанию | Что делает |
+|---|---|---|
+| `ATRIUM_ERRORS_ENABLED` | `true` | `false`: ничего не ловится, экраны админки остаются |
+| `ATRIUM_RELEASE` | коммит git, иначе версия Composer | Релиз, по которому группируются события |
+| `ATRIUM_ERRORS_QUEUE` | нет: после ответа | Подключение очереди, через которое сохраняются события |
+
+Остальное — исключения, которые не ловить, дополнительные ключи для очистки, сколько хранить предыстории, сколько строк кода показывать, путь запасного журнала — в `config/atrium-errors.php` после `php artisan vendor:publish --tag=atrium-errors-config`.
+
+## Команды
+
+```bash
+php artisan atrium:errors:test # отправить тестовую ошибку во все драйверы
+php artisan atrium:errors:prune # удалить старые события сейчас
+php artisan atrium:errors:prune --days=30
+```
diff --git a/docs/readme/README.be.md b/docs/readme/README.be.md
index 3b8de5e9..1da7b3ab 100644
--- a/docs/readme/README.be.md
+++ b/docs/readme/README.be.md
@@ -123,6 +123,7 @@ php artisan atrium:bitrix:parity
- [Кэш: хуткія старонкі з дзясяткамі ўласцівасцей, Redis, кэш старонак, загалоўкі для CDN](../cache.md)
- [Пераезд з 1С-Бітрыкс крок за крокам](../bitrix.md)
- [Рэзервовыя копіі: базы і файлы ў некалькі месцаў, расклад, праверкі, аднаўленне](../backup.md)
+- [Памылкі: памылкі PHP, чэргаў і JavaScript у базе сайта, абвесткі, Sentry і свае драйверы](../errors.md)
- [CDN: выявы, паменшаныя копіі і WebP/AVIF, ачыстка кэша, загрузкі ў S3](../cdn.md)
## Пакеты
@@ -136,6 +137,7 @@ php artisan atrium:bitrix:parity
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Палі, якія дадаюць у любы модуль з адмінкі, з фільтрамі і фасетамі |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Дакументацыя з Markdown: версіі і пошук |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Рэзервовыя копіі баз і файлаў, аднаўленне з адмінкі |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Улік памылак у базе сайта, абвесткі, Sentry |
Калі 0.1 з'явіцца на Packagist, у гатовую праграму на Laravel 13 Atrium будзе ўсталёўвацца так:
diff --git a/docs/readme/README.de.md b/docs/readme/README.de.md
index 52f1fb85..856515d4 100644
--- a/docs/readme/README.de.md
+++ b/docs/readme/README.de.md
@@ -123,6 +123,7 @@ Die Bitrix-Datenbank wird nur gelesen. Tabs, Feldreihenfolge und Listenspalten k
- [Cache: schnelle Seiten mit Dutzenden Eigenschaften, Redis, Seiten-Cache, CDN-Header](../cache.md)
- [Umzug von 1C-Bitrix, Schritt für Schritt](../bitrix.md)
- [Backups: Datenbanken und Dateien an mehrere Orte, Zeitpläne, Prüfungen, Wiederherstellung](../backup.md)
+- [Fehler: PHP-, Warteschlangen- und JavaScript-Fehler in der Datenbank der Website, Benachrichtigungen, Sentry und eigene Treiber](../errors.md)
- [CDN: Bilder, verkleinerte Kopien und WebP/AVIF, Cache leeren, Uploads zu S3](../cdn.md)
## Pakete
@@ -136,6 +137,7 @@ Die Bitrix-Datenbank wird nur gelesen. Tabs, Feldreihenfolge und Listenspalten k
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Felder für jedes Modul, im Admin-Bereich angelegt, mit Filtern und Facetten |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Dokumentation aus Markdown, mit Versionen und Suche |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Backups der Datenbanken und Dateien, Wiederherstellung im Admin-Bereich |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Fehlererfassung in der Datenbank der Website, Benachrichtigungen, Sentry |
Sobald 0.1 auf Packagist ist, bekommt eine bestehende Laravel-13-Anwendung Atrium so:
diff --git a/docs/readme/README.es.md b/docs/readme/README.es.md
index d085b75b..68cbee78 100644
--- a/docs/readme/README.es.md
+++ b/docs/readme/README.es.md
@@ -123,6 +123,7 @@ La base de datos de Bitrix solo se lee. Las pestañas, el orden de los campos y
- [Caché: páginas rápidas con decenas de propiedades, Redis, caché de páginas, cabeceras para CDN](../cache.md)
- [Migrar desde 1C-Bitrix, paso a paso](../bitrix.md)
- [Copias de seguridad: bases de datos y archivos en varios destinos, horarios, comprobaciones, restauración](../backup.md)
+- [Errores: errores de PHP, de colas y de JavaScript en la base de datos del sitio, alertas, Sentry y controladores propios](../errors.md)
- [CDN: imágenes, copias redimensionadas y WebP/AVIF, purga de caché, subidas a S3](../cdn.md)
## Paquetes
@@ -136,6 +137,7 @@ La base de datos de Bitrix solo se lee. Las pestañas, el orden de los campos y
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Campos que se añaden a cualquier módulo desde el panel, con filtros y facetas |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Documentación desde Markdown, con versiones y búsqueda |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Copias de seguridad de bases de datos y archivos, restauración desde el panel |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Registro de errores en la base de datos del sitio, alertas, Sentry |
Cuando la 0.1 esté en Packagist, una aplicación Laravel 13 existente podrá añadir Atrium con:
diff --git a/docs/readme/README.fr.md b/docs/readme/README.fr.md
index ae7ffd1f..41ed5600 100644
--- a/docs/readme/README.fr.md
+++ b/docs/readme/README.fr.md
@@ -123,6 +123,7 @@ La base de données Bitrix est uniquement lue. Les onglets, l'ordre des champs e
- [Cache : des pages rapides avec des dizaines de propriétés, Redis, cache de pages, en-têtes CDN](../cache.md)
- [Migrer depuis 1C-Bitrix, pas à pas](../bitrix.md)
- [Sauvegardes : bases de données et fichiers vers plusieurs destinations, planification, contrôles, restauration](../backup.md)
+- [Erreurs : erreurs PHP, de file d'attente et JavaScript dans la base du site, alertes, Sentry et vos propres pilotes](../errors.md)
- [CDN : images, copies redimensionnées et WebP/AVIF, purge du cache, envois vers S3](../cdn.md)
## Paquets
@@ -136,6 +137,7 @@ La base de données Bitrix est uniquement lue. Les onglets, l'ordre des champs e
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Champs ajoutés à tout module depuis l'administration, avec filtres et facettes |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Documentation à partir de Markdown, avec versions et recherche |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Sauvegardes des bases de données et des fichiers, restauration depuis l'administration |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Suivi des erreurs dans la base du site, alertes, Sentry |
Une fois la 0.1 publiée sur Packagist, une application Laravel 13 existante obtiendra Atrium avec :
diff --git a/docs/readme/README.it.md b/docs/readme/README.it.md
index eaca51df..119671e6 100644
--- a/docs/readme/README.it.md
+++ b/docs/readme/README.it.md
@@ -123,6 +123,7 @@ Il database di Bitrix viene solo letto. Le schede, l'ordine dei campi e le colon
- [Cache: pagine veloci con decine di proprietà, Redis, cache delle pagine, intestazioni per CDN](../cache.md)
- [Migrare da 1C-Bitrix, passo per passo](../bitrix.md)
- [Backup: database e file in più destinazioni, pianificazione, controlli, ripristino](../backup.md)
+- [Errori: errori PHP, delle code e JavaScript nel database del sito, avvisi, Sentry e driver propri](../errors.md)
- [CDN: immagini, copie ridimensionate e WebP/AVIF, svuotamento della cache, caricamenti su S3](../cdn.md)
## Pacchetti
@@ -136,6 +137,7 @@ Il database di Bitrix viene solo letto. Le schede, l'ordine dei campi e le colon
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Campi aggiunti a qualsiasi modulo dal pannello, con filtri e faccette |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Documentazione da Markdown, con versioni e ricerca |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Backup di database e file, ripristino dal pannello |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Tracciamento degli errori nel database del sito, avvisi, Sentry |
Quando la 0.1 sarà su Packagist, un'app Laravel 13 esistente potrà aggiungere Atrium con:
diff --git a/docs/readme/README.ja.md b/docs/readme/README.ja.md
index 2fc1a5b9..ad073e2d 100644
--- a/docs/readme/README.ja.md
+++ b/docs/readme/README.ja.md
@@ -123,6 +123,7 @@ Bitrix のデータベースは読み取るだけです。タブ、フィール
- [キャッシュ:数十のプロパティでも速いページ、Redis、ページキャッシュ、CDN ヘッダー](../cache.md)
- [1C-Bitrix からの移行(手順)](../bitrix.md)
- [バックアップ:データベースとファイルを複数の保存先へ、スケジュール、ヘルスチェック、復元](../backup.md)
+- [エラー:PHP・キュー・JavaScript のエラーをサイトのデータベースに保存、通知、Sentry、独自ドライバー](../errors.md)
- [CDN:画像、リサイズしたコピーと WebP/AVIF、キャッシュの削除、S3 へのアップロード](../cdn.md)
## パッケージ
@@ -136,6 +137,7 @@ Bitrix のデータベースは読み取るだけです。タブ、フィール
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | 管理画面から任意のモジュールに追加するフィールド(フィルターとファセット付き) |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Markdownから作るドキュメント(バージョンと検索つき) |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | データベースとファイルのバックアップ、管理画面からの復元 |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | サイトのデータベースでのエラー追跡、通知、Sentry |
0.1 が Packagist に公開されたら、既存の Laravel 13 アプリには次のコマンドで Atrium を導入できます。
diff --git a/docs/readme/README.kk.md b/docs/readme/README.kk.md
index fb3d80d7..e2009b59 100644
--- a/docs/readme/README.kk.md
+++ b/docs/readme/README.kk.md
@@ -123,6 +123,7 @@ php artisan atrium:bitrix:parity
- [Кэш: ондаған қасиеті бар жылдам беттер, Redis, беттер кэші, CDN тақырыптары](../cache.md)
- [1С-Битрикстен көшу, қадам-қадаммен](../bitrix.md)
- [Сақтық көшірмелер: дерекқорлар мен файлдар бірнеше орынға, кесте, тексерулер, қалпына келтіру](../backup.md)
+- [Қателер: PHP, кезек және JavaScript қателері сайт дерекқорында, хабарламалар, Sentry және өз драйверлеріңіз](../errors.md)
- [CDN: суреттер, кішірейтілген көшірмелер және WebP/AVIF, кэшті тазалау, S3-ке жүктеу](../cdn.md)
## Пакеттер
@@ -136,6 +137,7 @@ php artisan atrium:bitrix:parity
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Кез келген модульге әкімшілік панельден қосылатын өрістер, сүзгілер мен фасеттермен |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Markdown-тан құжаттама: нұсқалар мен іздеу |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Дерекқорлар мен файлдардың сақтық көшірмелері, әкімшілік панельден қалпына келтіру |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Сайт дерекқорындағы қателер есебі, хабарламалар, Sentry |
0.1 Packagist-те пайда болғанда, Laravel 13-тегі дайын қосымшаға Atrium былай орнатылады:
diff --git a/docs/readme/README.pl.md b/docs/readme/README.pl.md
index ab332e4e..7851dcc2 100644
--- a/docs/readme/README.pl.md
+++ b/docs/readme/README.pl.md
@@ -123,6 +123,7 @@ Baza danych Bitrixa jest tylko odczytywana. Karty, kolejność pól i kolumny li
- [Cache: szybkie strony z dziesiątkami właściwości, Redis, cache stron, nagłówki dla CDN](../cache.md)
- [Przeprowadzka z 1C-Bitrix krok po kroku](../bitrix.md)
- [Kopie zapasowe: bazy danych i pliki w kilku miejscach, harmonogram, kontrole, przywracanie](../backup.md)
+- [Błędy: błędy PHP, kolejek i JavaScriptu w bazie strony, powiadomienia, Sentry i własne sterowniki](../errors.md)
- [CDN: obrazy, pomniejszone kopie i WebP/AVIF, czyszczenie pamięci podręcznej, przesyłanie do S3](../cdn.md)
## Pakiety
@@ -136,6 +137,7 @@ Baza danych Bitrixa jest tylko odczytywana. Karty, kolejność pól i kolumny li
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Pola dodawane do dowolnego modułu z panelu, z filtrami i fasetami |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Dokumentacja z Markdown, z wersjami i wyszukiwaniem |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Kopie zapasowe baz danych i plików, przywracanie z panelu |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Rejestr błędów w bazie strony, powiadomienia, Sentry |
Gdy 0.1 trafi na Packagist, do istniejącej aplikacji na Laravel 13 dodasz Atrium tak:
diff --git a/docs/readme/README.pt-BR.md b/docs/readme/README.pt-BR.md
index 6a9001b0..f72cda63 100644
--- a/docs/readme/README.pt-BR.md
+++ b/docs/readme/README.pt-BR.md
@@ -123,6 +123,7 @@ O banco de dados do Bitrix é apenas lido. As abas, a ordem dos campos e as colu
- [Cache: páginas rápidas com dezenas de propriedades, Redis, cache de páginas, cabeçalhos para CDN](../cache.md)
- [Migrar do 1C-Bitrix, passo a passo](../bitrix.md)
- [Backups: bancos de dados e arquivos em vários destinos, agendamento, verificações, restauração](../backup.md)
+- [Erros: erros de PHP, de filas e de JavaScript no banco do site, alertas, Sentry e drivers próprios](../errors.md)
- [CDN: imagens, cópias redimensionadas e WebP/AVIF, limpeza de cache, uploads para S3](../cdn.md)
## Pacotes
@@ -136,6 +137,7 @@ O banco de dados do Bitrix é apenas lido. As abas, a ordem dos campos e as colu
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Campos adicionados a qualquer módulo pelo painel, com filtros e facetas |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Documentação a partir de Markdown, com versões e busca |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Backups dos bancos de dados e arquivos, restauração pelo painel |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Registro de erros no banco do site, alertas, Sentry |
Quando a 0.1 estiver no Packagist, uma aplicação Laravel 13 existente poderá receber o Atrium com:
diff --git a/docs/readme/README.ru.md b/docs/readme/README.ru.md
index 61cec146..079ef9fa 100644
--- a/docs/readme/README.ru.md
+++ b/docs/readme/README.ru.md
@@ -121,6 +121,7 @@ php artisan atrium:bitrix:parity
- [Кеш: быстрые страницы с десятками свойств, Redis, кеш страниц, заголовки для CDN](../cache.ru.md)
- [Переезд с 1С-Битрикс по шагам](../bitrix.ru.md)
- [Резервные копии: базы и файлы в несколько мест, расписание, проверки, восстановление](../backup.ru.md)
+- [Ошибки: ошибки PHP, очередей и JavaScript в базе сайта, оповещения, Sentry и свои драйверы](../errors.ru.md)
- [CDN: картинки, уменьшенные копии и WebP/AVIF, сброс кеша, загрузки в S3](../cdn.ru.md)
## Пакеты
@@ -134,6 +135,7 @@ php artisan atrium:bitrix:parity
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Поля, которые добавляют в любой модуль из админки, с фильтрами и фасетами |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Документация из Markdown: версии и поиск |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Резервные копии баз и файлов, восстановление из админки |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Учёт ошибок в базе сайта, оповещения, Sentry |
Когда 0.1 появится на Packagist, в готовое приложение на Laravel 13 Atrium будет ставиться так:
diff --git a/docs/readme/README.tr.md b/docs/readme/README.tr.md
index 0eb437c6..f3ccd41a 100644
--- a/docs/readme/README.tr.md
+++ b/docs/readme/README.tr.md
@@ -123,6 +123,7 @@ Bitrix veritabanından yalnızca okuma yapılır. Sekmeler, alan sırası ve lis
- [Önbellek: onlarca özellikli hızlı sayfalar, Redis, sayfa önbelleği, CDN başlıkları](../cache.md)
- [1C-Bitrix’ten adım adım taşınma](../bitrix.md)
- [Yedekler: veritabanları ve dosyalar birden çok yere, zamanlama, sağlık kontrolleri, geri yükleme](../backup.md)
+- [Hatalar: PHP, kuyruk ve JavaScript hataları sitenin veritabanında, uyarılar, Sentry ve kendi sürücüleriniz](../errors.md)
- [CDN: görseller, küçültülmüş kopyalar ve WebP/AVIF, önbellek temizleme, S3'e yükleme](../cdn.md)
## Paketler
@@ -136,6 +137,7 @@ Bitrix veritabanından yalnızca okuma yapılır. Sekmeler, alan sırası ve lis
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Yönetim panelinden her modüle eklenen alanlar, filtreler ve faset sayılarıyla |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Markdown’dan belgeler, sürümler ve arama ile |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Veritabanı ve dosya yedekleri, yönetim panelinden geri yükleme |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Sitenin veritabanında hata takibi, uyarılar, Sentry |
0.1 Packagist'te yayımlandığında, mevcut bir Laravel 13 uygulamasına Atrium şu şekilde eklenecek:
diff --git a/docs/readme/README.uk.md b/docs/readme/README.uk.md
index 1cdeb7a6..d7c1e544 100644
--- a/docs/readme/README.uk.md
+++ b/docs/readme/README.uk.md
@@ -123,6 +123,7 @@ php artisan atrium:bitrix:parity
- [Кеш: швидкі сторінки з десятками властивостей, Redis, кеш сторінок, заголовки для CDN](../cache.md)
- [Переїзд з 1С-Бітрікс крок за кроком](../bitrix.md)
- [Резервні копії: бази й файли в кілька місць, розклад, перевірки, відновлення](../backup.md)
+- [Помилки: помилки PHP, черг і JavaScript у базі сайту, сповіщення, Sentry і власні драйвери](../errors.md)
- [CDN: зображення, зменшені копії й WebP/AVIF, очищення кешу, завантаження в S3](../cdn.md)
## Пакети
@@ -136,6 +137,7 @@ php artisan atrium:bitrix:parity
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Поля, які додають у будь-який модуль з адмінки, з фільтрами й фасетами |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Документація з Markdown: версії та пошук |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Резервні копії баз і файлів, відновлення з адмінки |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Облік помилок у базі сайту, сповіщення, Sentry |
Коли 0.1 з'явиться на Packagist, у готовий застосунок на Laravel 13 Atrium встановлюватиметься так:
diff --git a/docs/readme/README.uz.md b/docs/readme/README.uz.md
index 869393de..7777a42f 100644
--- a/docs/readme/README.uz.md
+++ b/docs/readme/README.uz.md
@@ -123,6 +123,7 @@ Bitrix maʼlumotlar bazasi faqat oʻqiladi. Yorliqlar, maydonlar tartibi va roʻ
- [Kesh: oʻnlab xususiyatli tez sahifalar, Redis, sahifalar keshi, CDN sarlavhalari](../cache.md)
- [1C-Bitrixdan koʻchish, qadamma-qadam](../bitrix.md)
- [Zaxira nusxalar: bazalar va fayllar bir nechta joyga, jadval, tekshiruvlar, tiklash](../backup.md)
+- [Xatolar: PHP, navbat va JavaScript xatolari sayt bazasida, ogohlantirishlar, Sentry va oʻz drayverlaringiz](../errors.md)
- [CDN: rasmlar, kichraytirilgan nusxalar va WebP/AVIF, keshni tozalash, S3 ga yuklash](../cdn.md)
## Paketlar
@@ -136,6 +137,7 @@ Bitrix maʼlumotlar bazasi faqat oʻqiladi. Yorliqlar, maydonlar tartibi va roʻ
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | Istalgan modulga admin paneldan qoʻshiladigan maydonlar, filtrlar va fasetlar bilan |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | Markdown’dan hujjatlar: versiyalar va qidiruv |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | Bazalar va fayllarning zaxira nusxalari, admin paneldan tiklash |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | Sayt bazasida xatolar hisobi, ogohlantirishlar, Sentry |
0.1 versiyasi Packagist saytida paydo boʻlgach, mavjud Laravel 13 ilovasiga Atrium quyidagicha oʻrnatiladi:
diff --git a/docs/readme/README.zh-CN.md b/docs/readme/README.zh-CN.md
index 19436d84..707ad241 100644
--- a/docs/readme/README.zh-CN.md
+++ b/docs/readme/README.zh-CN.md
@@ -123,6 +123,7 @@ Bitrix 数据库只读不写。标签页、字段顺序和列表列会保持编
- [缓存:带几十个属性也很快的页面、Redis、页面缓存、CDN 头](../cache.md)
- [从 1C-Bitrix 迁移,分步说明](../bitrix.md)
- [备份:数据库和文件同时存到多个位置、计划任务、健康检查、恢复](../backup.md)
+- [错误:PHP、队列和 JavaScript 错误保存在站点数据库中,告警、Sentry 和自定义驱动](../errors.md)
- [CDN:图片、缩放副本与 WebP/AVIF、清除缓存、上传到 S3](../cdn.md)
## 软件包
@@ -136,6 +137,7 @@ Bitrix 数据库只读不写。标签页、字段顺序和列表列会保持编
| [`alveby/atrium-custom-fields`](../../packages/custom-fields/README.md) | 在后台为任意模块添加的字段,支持筛选与分面 |
| [`alveby/atrium-docs`](../../packages/docs/README.md) | 由 Markdown 生成的文档,支持版本和搜索 |
| [`alveby/atrium-backup`](../../packages/backup/README.md) | 数据库和文件的备份,可在后台恢复 |
+| [`alveby/atrium-errors`](../../packages/errors/README.md) | 在站点数据库中跟踪错误,告警、Sentry |
0.1 上架 Packagist 后,现有的 Laravel 13 应用可以这样安装 Atrium:
diff --git a/packages/admin/dist/assets/AdminButton-Bx141Bs3.js b/packages/admin/dist/assets/AdminButton-KiIJ2sLW.js
similarity index 83%
rename from packages/admin/dist/assets/AdminButton-Bx141Bs3.js
rename to packages/admin/dist/assets/AdminButton-KiIJ2sLW.js
index 5149d638..8fb334f5 100644
--- a/packages/admin/dist/assets/AdminButton-Bx141Bs3.js
+++ b/packages/admin/dist/assets/AdminButton-KiIJ2sLW.js
@@ -1 +1 @@
-import{C as e,I as t,Q as n,S as r,V as i,W as a,b as o,i as s,w as c,x as l,z as u}from"./dist-MY__znoP.js";var d={key:0,class:`animate-spin -ml-1 mr-2 h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`},f={__name:`AdminButton`,props:{type:{type:String,default:`button`},href:{type:String,default:null},variant:{type:String,default:`primary`,validator:e=>[`primary`,`secondary`,`danger`,`success`,`warning`,`outline`].includes(e)},size:{type:String,default:`md`,validator:e=>[`sm`,`md`,`lg`].includes(e)},loading:Boolean,disabled:Boolean,block:Boolean},setup(f){let p=f,m=o(()=>[`inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed`,{primary:`bg-accent text-on-accent hover:bg-accent-hover focus:ring-focus`,secondary:`border border-line bg-off text-off-fg hover:border-field focus:ring-focus`,danger:`bg-danger text-on-danger hover:bg-danger-hover focus:ring-danger`,success:`border border-success bg-success-soft text-success-soft-fg hover:border-fg focus:ring-focus`,warning:`border border-warning-soft-fg bg-warning-soft text-warning-soft-fg hover:border-fg focus:ring-focus`,outline:`border border-field bg-surface text-fg hover:bg-hover focus:ring-focus`}[p.variant],{sm:`px-2.5 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`}[p.size],p.block?`w-full`:``].join(` `)),h=o(()=>p.href?s:`button`);return(o,s)=>(t(),r(i(h.value),{href:f.href,type:f.href?null:f.type,disabled:f.disabled||f.loading,class:n(m.value)},{default:a(()=>[f.loading?(t(),c(`svg`,d,[...s[0]||=[l(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),l(`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)]])):e(``,!0),u(o.$slots,`default`)]),_:3},8,[`href`,`type`,`disabled`,`class`]))}};export{f as t};
\ No newline at end of file
+import{$ as e,C as t,I as n,S as r,V as i,W as a,b as o,i as s,w as c,x as l,z as u}from"./dist-Bie52OmN.js";var d={key:0,class:`animate-spin -ml-1 mr-2 h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`},f={__name:`AdminButton`,props:{type:{type:String,default:`button`},href:{type:String,default:null},variant:{type:String,default:`primary`,validator:e=>[`primary`,`secondary`,`danger`,`success`,`warning`,`outline`].includes(e)},size:{type:String,default:`md`,validator:e=>[`sm`,`md`,`lg`].includes(e)},loading:Boolean,disabled:Boolean,block:Boolean},setup(f){let p=f,m=o(()=>[`inline-flex items-center justify-center font-medium rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed`,{primary:`bg-accent text-on-accent hover:bg-accent-hover focus:ring-focus`,secondary:`border border-line bg-off text-off-fg hover:border-field focus:ring-focus`,danger:`bg-danger text-on-danger hover:bg-danger-hover focus:ring-danger`,success:`border border-success bg-success-soft text-success-soft-fg hover:border-fg focus:ring-focus`,warning:`border border-warning-soft-fg bg-warning-soft text-warning-soft-fg hover:border-fg focus:ring-focus`,outline:`border border-field bg-surface text-fg hover:bg-hover focus:ring-focus`}[p.variant],{sm:`px-2.5 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`}[p.size],p.block?`w-full`:``].join(` `)),h=o(()=>p.href?s:`button`);return(o,s)=>(n(),r(i(h.value),{href:f.href,type:f.href?null:f.type,disabled:f.disabled||f.loading,class:e(m.value)},{default:a(()=>[f.loading?(n(),c(`svg`,d,[...s[0]||=[l(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`},null,-1),l(`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)]])):t(``,!0),u(o.$slots,`default`)]),_:3},8,[`href`,`type`,`disabled`,`class`]))}};export{f as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/AdminCard--HubMtUj.js b/packages/admin/dist/assets/AdminCard--HubMtUj.js
deleted file mode 100644
index 35a71230..00000000
--- a/packages/admin/dist/assets/AdminCard--HubMtUj.js
+++ /dev/null
@@ -1 +0,0 @@
-import{C as e,I as t,Q as n,et as r,w as i,x as a,z as o}from"./dist-MY__znoP.js";var s={class:`bg-surface rounded-lg shadow`},c={key:0,class:`px-6 py-4 border-b border-line`},l={class:`text-lg font-medium text-fg`},u={key:0,class:`mt-1 text-sm text-muted`},d={key:1,class:`px-6 py-4 border-t border-line bg-surface-alt rounded-b-lg`},f={__name:`AdminCard`,props:{title:String,subtitle:String,noPadding:Boolean},setup(f){return(p,m)=>(t(),i(`div`,s,[f.title||p.$slots.header?(t(),i(`div`,c,[o(p.$slots,`header`,{},()=>[a(`h3`,l,r(f.title),1),f.subtitle?(t(),i(`p`,u,r(f.subtitle),1)):e(``,!0)])])):e(``,!0),a(`div`,{class:n(f.noPadding?``:`p-6`)},[o(p.$slots,`default`)],2),p.$slots.footer?(t(),i(`div`,d,[o(p.$slots,`footer`)])):e(``,!0)]))}};export{f as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/AdminCard-YbEwPtJz.js b/packages/admin/dist/assets/AdminCard-YbEwPtJz.js
new file mode 100644
index 00000000..8635cc8f
--- /dev/null
+++ b/packages/admin/dist/assets/AdminCard-YbEwPtJz.js
@@ -0,0 +1 @@
+import{$ as e,C as t,I as n,tt as r,w as i,x as a,z as o}from"./dist-Bie52OmN.js";var s={class:`bg-surface rounded-lg shadow`},c={key:0,class:`px-6 py-4 border-b border-line`},l={class:`text-lg font-medium text-fg`},u={key:0,class:`mt-1 text-sm text-muted`},d={key:1,class:`px-6 py-4 border-t border-line bg-surface-alt rounded-b-lg`},f={__name:`AdminCard`,props:{title:String,subtitle:String,noPadding:Boolean},setup(f){return(p,m)=>(n(),i(`div`,s,[f.title||p.$slots.header?(n(),i(`div`,c,[o(p.$slots,`header`,{},()=>[a(`h3`,l,r(f.title),1),f.subtitle?(n(),i(`p`,u,r(f.subtitle),1)):t(``,!0)])])):t(``,!0),a(`div`,{class:e(f.noPadding?``:`p-6`)},[o(p.$slots,`default`)],2),p.$slots.footer?(n(),i(`div`,d,[o(p.$slots,`footer`)])):t(``,!0)]))}};export{f as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/AdminDataTable-6eKgKDeA.js b/packages/admin/dist/assets/AdminDataTable-6eKgKDeA.js
new file mode 100644
index 00000000..6598c630
--- /dev/null
+++ b/packages/admin/dist/assets/AdminDataTable-6eKgKDeA.js
@@ -0,0 +1 @@
+import{$ as e,C as t,I as n,Q as r,R as i,S as a,T as o,W as s,et as c,i as l,tt as u,v as d,w as f,x as p,z as m}from"./dist-Bie52OmN.js";import{t as h}from"./AdminPagination-D7rwNfhd.js";var g={class:`isolate bg-surface rounded-lg shadow overflow-hidden`},_={class:`overflow-x-auto`},v={class:`min-w-full border-separate border-spacing-0`},y={class:`bg-surface-alt`},b=[`data-column`,`data-sortable`,`onClick`],x={class:`flex items-center space-x-1`},S={key:0,class:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},C={key:1,class:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},w={key:2,class:`w-4 h-4 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},T={class:`sticky right-0 z-10 border-b border-l border-line bg-surface-alt px-3 py-2 text-right text-xs font-medium text-muted uppercase tracking-wider`},E={class:`bg-surface`},D={key:0},O=[`colspan`],k={key:1},A=[`colspan`],j=[`data-row-id`],M=[`title`],N={key:0,"data-badge":`on`,class:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full border border-badge-line text-xs font-semibold bg-accent-soft text-accent-soft-fg`},P={key:1,"data-badge":`off`,class:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full border border-badge-line text-xs font-semibold bg-off text-off-fg`},F=[`src`,`alt`],I={key:1,class:`text-muted`},L=[`href`],R={key:1,class:`text-fg`},z={class:`sticky right-0 z-10 border-b border-l border-line bg-inherit px-3 py-2 whitespace-nowrap text-right text-sm font-medium`},B=[`onClick`,`title`,`aria-label`],V=[`onClick`,`title`,`aria-label`],H={__name:`AdminDataTable`,props:{columns:{type:Array,required:!0},items:{type:Object,required:!0},sortBy:{type:String,default:``},sortDirection:{type:String,default:`asc`},loading:Boolean,canDelete:{type:Boolean,default:!0},rowActions:{type:Array,default:()=>[]}},emits:[`sort`,`edit`,`delete`],setup(H,{emit:U}){let W=H,G=U,K=e=>{if(!e.sortable)return;let t=W.sortBy===e.name&&W.sortDirection===`asc`?`desc`:`asc`;G(`sort`,{column:e.name,direction:t})},q=e=>{let t=Array.isArray(e)?e.length?e[0]:null:e;if(!t)return null;let n=typeof t==`object`?t.url??t.path??null:t;return typeof n!=`string`||n===``?null:/^(https?:)?\/\//i.test(n)||n.startsWith(`/`)?n:`/storage/`+n},J=e=>W.sortBy===e.name?W.sortDirection===`asc`?`up`:`down`:null,Y=(e,t)=>{if(!t.urlFrom)return null;let n=e[t.urlFrom],r=e[t.name];return r==null||r===``?null:typeof n==`string`&&n!==``?n:null},X=(e,t)=>{if(t.type===`image`||t.type===`boolean`)return null;let n=e[t.name];return n==null||n===``?null:String(n)};return(U,W)=>(n(),f(`div`,g,[p(`div`,_,[p(`table`,v,[p(`thead`,y,[p(`tr`,null,[(n(!0),f(d,null,i(H.columns,r=>(n(),f(`th`,{key:r.name,"data-column":r.name,"data-sortable":r.sortable?`true`:`false`,class:e([`border-b border-line px-3 py-2 text-left text-xs font-medium text-muted uppercase tracking-wider whitespace-nowrap`,{"cursor-pointer hover:bg-hover":r.sortable}]),style:c(r.width?{width:r.width}:{}),onClick:e=>K(r)},[p(`div`,x,[p(`span`,null,u(r.label),1),r.sortable?(n(),f(d,{key:0},[J(r)===`up`?(n(),f(`svg`,S,[...W[0]||=[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 15l7-7 7 7`},null,-1)]])):J(r)===`down`?(n(),f(`svg`,C,[...W[1]||=[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`},null,-1)]])):(n(),f(`svg`,w,[...W[2]||=[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4`},null,-1)]]))],64)):t(``,!0)])],14,b))),128)),p(`th`,T,u(U.$t(`common.actions`)),1)])]),p(`tbody`,E,[H.loading?(n(),f(`tr`,D,[p(`td`,{colspan:H.columns.length+1,class:`px-6 py-12 text-center`},[...W[3]||=[p(`svg`,{class:`animate-spin h-8 w-8 text-accent mx-auto`,fill:`none`,viewBox:`0 0 24 24`},[p(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),p(`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)]],8,O)])):H.items.data?.length?(n(!0),f(d,{key:2},i(H.items.data,e=>(n(),f(`tr`,{key:e.id,"data-row-id":e.id,class:`bg-surface hover:bg-hover`},[(n(!0),f(d,null,i(H.columns,t=>(n(),f(`td`,{key:t.name,class:`border-b border-line px-3 py-2 whitespace-nowrap text-sm max-w-xs truncate`,title:X(e,t)},[m(U.$slots,`cell-${t.name}`,{item:e,value:e[t.name]},()=>[t.type===`boolean`?(n(),f(d,{key:0},[e[t.name]?(n(),f(`span`,N,[W[4]||=p(`span`,{class:`h-2 w-2 rounded-full bg-current`,"aria-hidden":`true`},null,-1),o(` `+u(t.trueLabel||U.$t(`common.yes`)),1)])):(n(),f(`span`,P,[W[5]||=p(`span`,{class:`h-2 w-2 rounded-full border-2 border-current`,"aria-hidden":`true`},null,-1),o(` `+u(t.falseLabel||U.$t(`common.no`)),1)]))],64)):t.type===`image`?(n(),f(d,{key:1},[q(e[t.name])?(n(),f(`img`,{key:0,src:q(e[t.name]),alt:t.label,class:`h-10 w-10 rounded object-cover`},null,8,F)):(n(),f(`span`,I,`—`))],64)):t.type===`date`?(n(),f(d,{key:2},[o(u(e[t.name]?new Date(e[t.name]).toLocaleDateString(`ru-RU`):`—`),1)],64)):(n(),f(d,{key:3},[Y(e,t)?(n(),f(`a`,{key:0,href:Y(e,t),target:`_blank`,rel:`noopener`,class:`text-accent hover:text-accent-hover hover:underline`},u(e[t.name]),9,L)):(n(),f(`span`,R,u(e[t.name]??`—`),1))],64))])],8,M))),128)),p(`td`,z,[m(U.$slots,`actions`,{item:e},()=>[(n(!0),f(d,null,i(H.rowActions,t=>(n(),a(r(l),{key:t.name,href:t.href(e),"data-action":t.name,class:`mr-1 inline-flex items-center rounded px-2 py-1 text-xs text-accent hover:bg-accent-soft hover:text-accent-hover`},{default:s(()=>[W[6]||=p(`svg`,{class:`mr-1 h-3.5 w-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),o(` `+u(t.label),1)]),_:2},1032,[`href`,`data-action`]))),128)),p(`button`,{"data-action":`edit`,onClick:t=>U.$emit(`edit`,e),class:`inline-flex items-center rounded p-1.5 text-accent hover:bg-accent-soft hover:text-accent-hover`,title:U.$t(`common.edit`),"aria-label":U.$t(`common.edit`)},[...W[7]||=[p(`svg`,{class:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z`})],-1)]],8,B),H.canDelete?(n(),f(`button`,{key:0,"data-action":`delete`,onClick:t=>U.$emit(`delete`,e),class:`ml-1 inline-flex items-center rounded p-1.5 text-danger hover:bg-danger-soft hover:text-danger-soft-fg`,title:U.$t(`common.delete`),"aria-label":U.$t(`common.delete`)},[...W[8]||=[p(`svg`,{class:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},[p(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})],-1)]],8,V)):t(``,!0)])])],8,j))),128)):(n(),f(`tr`,k,[p(`td`,{colspan:H.columns.length+1,class:`px-6 py-12 text-center text-muted`},u(U.$t(`resource.table.empty`)),9,A)]))])])]),H.items.total>H.items.per_page?(n(),a(h,{key:0,paginator:H.items},null,8,[`paginator`])):t(``,!0)]))}};export{H as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/AdminDataTable-BaQwb_6U.js b/packages/admin/dist/assets/AdminDataTable-BaQwb_6U.js
deleted file mode 100644
index f6d38215..00000000
--- a/packages/admin/dist/assets/AdminDataTable-BaQwb_6U.js
+++ /dev/null
@@ -1 +0,0 @@
-import{$ as e,C as t,I as n,Q as r,R as i,S as a,T as o,W as s,Z as c,b as l,et as u,i as d,v as f,w as p,x as m,z as h}from"./dist-MY__znoP.js";var g={class:`bg-surface px-4 py-3 border-t border-line sm:px-6`},_={class:`flex items-center justify-between`},v={class:`text-sm text-fg`},y={class:`inline-flex -space-x-px rounded-md shadow-sm`},b={key:1,class:`relative inline-flex items-center rounded-l-md px-2 py-2 text-muted ring-1 ring-inset ring-field`},x={key:0,class:`relative inline-flex items-center px-4 py-2 text-sm font-semibold text-fg ring-1 ring-inset ring-field`},S={key:3,class:`relative inline-flex items-center rounded-r-md px-2 py-2 text-muted ring-1 ring-inset ring-field`},C={__name:`AdminPagination`,props:{paginator:{type:Object,required:!0}},setup(e){let t=e,h=l(()=>{let e=t.paginator.current_page,n=t.paginator.last_page,r=[],i=[];for(let t=1;t<=n;t++)(t===1||t===n||t>=e-2&&t<=e+2)&&r.push(t);let a=null;for(let e of r)a&&(e-a===2?i.push(a+1):e-a!==1&&i.push(`...`)),i.push(e),a=e;return i});return(t,l)=>(n(),p(`div`,g,[m(`div`,_,[m(`div`,v,u(t.$t(`resource.pagination.showing`,{from:e.paginator.from,to:e.paginator.to,total:e.paginator.total})),1),m(`nav`,y,[e.paginator.prev_page_url?(n(),a(c(d),{key:0,href:e.paginator.prev_page_url,class:`relative inline-flex items-center rounded-l-md px-2 py-2 text-muted ring-1 ring-inset ring-field hover:bg-hover`,"preserve-scroll":``},{default:s(()=>[...l[0]||=[m(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[m(`path`,{"fill-rule":`evenodd`,d:`M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z`,"clip-rule":`evenodd`})],-1)]]),_:1},8,[`href`])):(n(),p(`span`,b,[...l[1]||=[m(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[m(`path`,{"fill-rule":`evenodd`,d:`M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z`,"clip-rule":`evenodd`})],-1)]])),(n(!0),p(f,null,i(h.value,t=>(n(),p(f,{key:t},[t===`...`?(n(),p(`span`,x,` ... `)):(n(),a(c(d),{key:1,href:`${e.paginator.path}?page=${t}`,class:r([`relative inline-flex items-center px-4 py-2 text-sm font-semibold ring-1 ring-inset ring-field`,t===e.paginator.current_page?`z-10 bg-accent text-on-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus`:`text-fg hover:bg-hover`]),"preserve-scroll":``},{default:s(()=>[o(u(t),1)]),_:2},1032,[`href`,`class`]))],64))),128)),e.paginator.next_page_url?(n(),a(c(d),{key:2,href:e.paginator.next_page_url,class:`relative inline-flex items-center rounded-r-md px-2 py-2 text-muted ring-1 ring-inset ring-field hover:bg-hover`,"preserve-scroll":``},{default:s(()=>[...l[2]||=[m(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[m(`path`,{"fill-rule":`evenodd`,d:`M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z`,"clip-rule":`evenodd`})],-1)]]),_:1},8,[`href`])):(n(),p(`span`,S,[...l[3]||=[m(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[m(`path`,{"fill-rule":`evenodd`,d:`M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z`,"clip-rule":`evenodd`})],-1)]]))])])]))}},w={class:`isolate bg-surface rounded-lg shadow overflow-hidden`},T={class:`overflow-x-auto`},E={class:`min-w-full border-separate border-spacing-0`},D={class:`bg-surface-alt`},O=[`data-column`,`data-sortable`,`onClick`],k={class:`flex items-center space-x-1`},A={key:0,class:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},j={key:1,class:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},M={key:2,class:`w-4 h-4 text-muted`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},N={class:`sticky right-0 z-10 border-b border-l border-line bg-surface-alt px-3 py-2 text-right text-xs font-medium text-muted uppercase tracking-wider`},P={class:`bg-surface`},F={key:0},I=[`colspan`],L={key:1},R=[`colspan`],z=[`data-row-id`],B=[`title`],V={key:0,"data-badge":`on`,class:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full border border-badge-line text-xs font-semibold bg-accent-soft text-accent-soft-fg`},H={key:1,"data-badge":`off`,class:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full border border-badge-line text-xs font-semibold bg-off text-off-fg`},U=[`src`,`alt`],W={key:1,class:`text-muted`},G=[`href`],K={key:1,class:`text-fg`},q={class:`sticky right-0 z-10 border-b border-l border-line bg-inherit px-3 py-2 whitespace-nowrap text-right text-sm font-medium`},J=[`onClick`,`title`,`aria-label`],Y=[`onClick`,`title`,`aria-label`],X={__name:`AdminDataTable`,props:{columns:{type:Array,required:!0},items:{type:Object,required:!0},sortBy:{type:String,default:``},sortDirection:{type:String,default:`asc`},loading:Boolean,canDelete:{type:Boolean,default:!0},rowActions:{type:Array,default:()=>[]}},emits:[`sort`,`edit`,`delete`],setup(l,{emit:g}){let _=l,v=g,y=e=>{if(!e.sortable)return;let t=_.sortBy===e.name&&_.sortDirection===`asc`?`desc`:`asc`;v(`sort`,{column:e.name,direction:t})},b=e=>{let t=Array.isArray(e)?e.length?e[0]:null:e;if(!t)return null;let n=typeof t==`object`?t.url??t.path??null:t;return typeof n!=`string`||n===``?null:/^(https?:)?\/\//i.test(n)||n.startsWith(`/`)?n:`/storage/`+n},x=e=>_.sortBy===e.name?_.sortDirection===`asc`?`up`:`down`:null,S=(e,t)=>{if(!t.urlFrom)return null;let n=e[t.urlFrom],r=e[t.name];return r==null||r===``?null:typeof n==`string`&&n!==``?n:null},X=(e,t)=>{if(t.type===`image`||t.type===`boolean`)return null;let n=e[t.name];return n==null||n===``?null:String(n)};return(g,_)=>(n(),p(`div`,w,[m(`div`,T,[m(`table`,E,[m(`thead`,D,[m(`tr`,null,[(n(!0),p(f,null,i(l.columns,i=>(n(),p(`th`,{key:i.name,"data-column":i.name,"data-sortable":i.sortable?`true`:`false`,class:r([`border-b border-line px-3 py-2 text-left text-xs font-medium text-muted uppercase tracking-wider whitespace-nowrap`,{"cursor-pointer hover:bg-hover":i.sortable}]),style:e(i.width?{width:i.width}:{}),onClick:e=>y(i)},[m(`div`,k,[m(`span`,null,u(i.label),1),i.sortable?(n(),p(f,{key:0},[x(i)===`up`?(n(),p(`svg`,A,[..._[0]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 15l7-7 7 7`},null,-1)]])):x(i)===`down`?(n(),p(`svg`,j,[..._[1]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M19 9l-7 7-7-7`},null,-1)]])):(n(),p(`svg`,M,[..._[2]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4`},null,-1)]]))],64)):t(``,!0)])],14,O))),128)),m(`th`,N,u(g.$t(`common.actions`)),1)])]),m(`tbody`,P,[l.loading?(n(),p(`tr`,F,[m(`td`,{colspan:l.columns.length+1,class:`px-6 py-12 text-center`},[..._[3]||=[m(`svg`,{class:`animate-spin h-8 w-8 text-accent mx-auto`,fill:`none`,viewBox:`0 0 24 24`},[m(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),m(`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)]],8,I)])):l.items.data?.length?(n(!0),p(f,{key:2},i(l.items.data,e=>(n(),p(`tr`,{key:e.id,"data-row-id":e.id,class:`bg-surface hover:bg-hover`},[(n(!0),p(f,null,i(l.columns,t=>(n(),p(`td`,{key:t.name,class:`border-b border-line px-3 py-2 whitespace-nowrap text-sm max-w-xs truncate`,title:X(e,t)},[h(g.$slots,`cell-${t.name}`,{item:e,value:e[t.name]},()=>[t.type===`boolean`?(n(),p(f,{key:0},[e[t.name]?(n(),p(`span`,V,[_[4]||=m(`span`,{class:`h-2 w-2 rounded-full bg-current`,"aria-hidden":`true`},null,-1),o(` `+u(t.trueLabel||g.$t(`common.yes`)),1)])):(n(),p(`span`,H,[_[5]||=m(`span`,{class:`h-2 w-2 rounded-full border-2 border-current`,"aria-hidden":`true`},null,-1),o(` `+u(t.falseLabel||g.$t(`common.no`)),1)]))],64)):t.type===`image`?(n(),p(f,{key:1},[b(e[t.name])?(n(),p(`img`,{key:0,src:b(e[t.name]),alt:t.label,class:`h-10 w-10 rounded object-cover`},null,8,U)):(n(),p(`span`,W,`—`))],64)):t.type===`date`?(n(),p(f,{key:2},[o(u(e[t.name]?new Date(e[t.name]).toLocaleDateString(`ru-RU`):`—`),1)],64)):(n(),p(f,{key:3},[S(e,t)?(n(),p(`a`,{key:0,href:S(e,t),target:`_blank`,rel:`noopener`,class:`text-accent hover:text-accent-hover hover:underline`},u(e[t.name]),9,G)):(n(),p(`span`,K,u(e[t.name]??`—`),1))],64))])],8,B))),128)),m(`td`,q,[h(g.$slots,`actions`,{item:e},()=>[(n(!0),p(f,null,i(l.rowActions,t=>(n(),a(c(d),{key:t.name,href:t.href(e),"data-action":t.name,class:`mr-1 inline-flex items-center rounded px-2 py-1 text-xs text-accent hover:bg-accent-soft hover:text-accent-hover`},{default:s(()=>[_[6]||=m(`svg`,{class:`mr-1 h-3.5 w-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"aria-hidden":`true`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 4v16m8-8H4`})],-1),o(` `+u(t.label),1)]),_:2},1032,[`href`,`data-action`]))),128)),m(`button`,{"data-action":`edit`,onClick:t=>g.$emit(`edit`,e),class:`inline-flex items-center rounded p-1.5 text-accent hover:bg-accent-soft hover:text-accent-hover`,title:g.$t(`common.edit`),"aria-label":g.$t(`common.edit`)},[..._[7]||=[m(`svg`,{class:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z`})],-1)]],8,J),l.canDelete?(n(),p(`button`,{key:0,"data-action":`delete`,onClick:t=>g.$emit(`delete`,e),class:`ml-1 inline-flex items-center rounded p-1.5 text-danger hover:bg-danger-soft hover:text-danger-soft-fg`,title:g.$t(`common.delete`),"aria-label":g.$t(`common.delete`)},[..._[8]||=[m(`svg`,{class:`h-4 w-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})],-1)]],8,Y)):t(``,!0)])])],8,z))),128)):(n(),p(`tr`,L,[m(`td`,{colspan:l.columns.length+1,class:`px-6 py-12 text-center text-muted`},u(g.$t(`resource.table.empty`)),9,R)]))])])]),l.items.total>l.items.per_page?(n(),a(C,{key:0,paginator:l.items},null,8,[`paginator`])):t(``,!0)]))}};export{X as t};
\ No newline at end of file
diff --git a/packages/admin/dist/assets/AdminLayout--RXJFj9t.js b/packages/admin/dist/assets/AdminLayout-DBeSErmz.js
similarity index 62%
rename from packages/admin/dist/assets/AdminLayout--RXJFj9t.js
rename to packages/admin/dist/assets/AdminLayout-DBeSErmz.js
index 72f26aa9..d8a04ddb 100644
--- a/packages/admin/dist/assets/AdminLayout--RXJFj9t.js
+++ b/packages/admin/dist/assets/AdminLayout-DBeSErmz.js
@@ -1 +1 @@
-import{C as e,E as t,F as n,G as r,H as i,I as a,M as o,P as s,Q as c,R as l,S as u,T as d,W as f,Y as p,Z as m,_ as h,b as g,c as _,et as v,h as y,i as b,m as x,o as S,r as C,s as w,v as T,w as E,x as D,z as O}from"./dist-MY__znoP.js";import{n as k,r as A,t as j}from"./LocaleSwitcher-DdLJ9WTE.js";import{n as M,t as N}from"./app-BNjy5Z6H.js";var P=[`aria-expanded`,`title`],F={class:`flex items-center`},I=[`innerHTML`],L={key:0},R=[`innerHTML`],z={key:0,class:`mt-1 ml-4 space-y-1 border-l border-sidebar-line pl-3`},B=[`innerHTML`],V={key:0},H=`flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,U=`bg-sidebar-active text-sidebar-active-fg font-semibold shadow-[inset_3px_0_0_var(--atrium-sidebar-accent)]`,W=`text-sidebar-fg font-medium hover:bg-sidebar-hover`,G={__name:`AdminMenuItem`,props:{item:{type:Object,required:!0},collapsed:Boolean},setup(n){let i=n,o=S(),s=p(!1),h=g(()=>i.item.children&&i.item.children.length>0),_=e=>{let t=route(e,void 0,!1),n=o.url.split(`?`)[0];return n===t||t!==route(`admin.dashboard`,void 0,!1)&&n.startsWith(t+`/`)},x=g(()=>!!i.item.route&&_(i.item.route)),C=g(()=>h.value?i.item.children.some(e=>e.route&&_(e.route)):!1),w=()=>{h.value&&(s.value=!s.value)};C.value&&(s.value=!0);let O={home:`
${t(a)}
`))}return i(),n.join(``)}function J(e){let t=e.target.closest?.(`a[data-ai-link]`);t&&(e.preventDefault(),w.visit(t.getAttribute(`href`)))}function Y(e){e.key===`Escape`&&y.value&&(y.value=!1)}return(t,n)=>d.value?(a(),E(`div`,{key:0,class:`fixed bottom-4 right-4 z-40 flex flex-col items-end gap-3`,dusk:`ai-helper`,onKeydown:Y},[y.value?(a(),E(`section`,{key:0,class:`flex w-[22rem] max-w-[calc(100vw-2rem)] max-h-[min(36rem,calc(100vh-8rem))] flex-col rounded-lg border border-line bg-surface text-fg shadow-xl`,role:`dialog`,"aria-label":f.value.title,dusk:`ai-chat`},[D(`header`,Ge,[D(`h2`,Ke,v(f.value.title),1),D(`div`,qe,[O.value.length?(a(),E(`button`,{key:0,type:`button`,class:`text-muted hover:text-fg`,dusk:`ai-clear`,onClick:R},v(f.value.clear),1)):e(``,!0),D(`button`,{type:`button`,class:`text-muted hover:text-fg`,"aria-label":f.value.close,dusk:`ai-close`,onClick:n[0]||=e=>y.value=!1},[...n[2]||=[D(`svg`,{class:`h-4 w-4`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`},[D(`path`,{d:`M5.3 4.3 10 9l4.7-4.7 1 1L11 10l4.7 4.7-1 1L10 11l-4.7 4.7-1-1L9 10 4.3 5.3z`})],-1)]],8,Je)])]),D(`div`,{ref_key:`list`,ref:k,class:`flex-1 space-y-3 overflow-y-auto px-4 py-3 text-sm`,"aria-live":`polite`,onClick:J},[D(`p`,Ye,v(f.value.hello),1),(a(!0),E(T,null,l(O.value,(e,t)=>(a(),E(`div`,{key:t,class:c([`flex`,e.role===`user`?`justify-end`:`justify-start`])},[e.role===`user`?(a(),E(`p`,Xe,v(e.text),1)):(a(),E(`div`,{key:1,class:c([`max-w-[90%] space-y-2 rounded-lg px-3 py-2`,e.error?`border border-danger bg-danger-soft text-danger-soft-fg`:`bg-surface-alt`]),dusk:e.error?`ai-error`:`ai-answer`,innerHTML:q(e.text)},null,10,Ze))],2))),128)),b.value?(a(),E(`p`,Qe,v(f.value.thinking),1)):e(``,!0)],512),D(`form`,{class:`border-t border-line p-3`,onSubmit:h(B,[`prevent`])},[D(`div`,$e,[r(D(`textarea`,{ref_key:`input`,ref:A,"onUpdate:modelValue":n[1]||=e=>C.value=e,rows:`2`,maxlength:`2000`,class:`flex-1 resize-none rounded-md border border-field bg-surface px-3 py-2 text-sm text-fg focus:border-focus focus:outline-none focus:ring-1 focus:ring-focus`,placeholder:f.value.placeholder,"aria-label":f.value.placeholder,dusk:`ai-input`,onKeydown:W},null,40,et),[[x,C.value]]),D(`button`,{type:`submit`,class:`rounded-md bg-accent px-3 py-2 text-sm font-medium text-on-accent hover:bg-accent-hover disabled:opacity-50`,disabled:b.value||C.value.trim()===``,dusk:`ai-send`},v(f.value.send),9,tt)]),D(`p`,$,v(f.value.note),1)],32)],8,We)):e(``,!0),D(`button`,{ref_key:`mascot`,ref:M,type:`button`,class:c([`ai-mascot group relative h-16 w-16 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,{"is-thinking":b.value,"is-open":y.value}]),"aria-label":f.value.open,"aria-expanded":y.value,title:f.value.open,dusk:`ai-mascot`,onClick:L},[(a(),E(`svg`,rt,[n[9]||=D(`ellipse`,{class:`ai-mascot-shadow fill-fg`,cx:`24`,cy:`49`,rx:`15`,ry:`2.2`,opacity:`0.15`},null,-1),D(`g`,it,[n[5]||=D(`path`,{class:`fill-fg`,d:`M6 42V22a18 18 0 0 1 36 0v20H32V22a8 8 0 0 0-16 0v20z`},null,-1),n[6]||=D(`rect`,{class:`ai-mascot-belt fill-accent`,x:`16`,y:`28`,width:`16`,height:`5`},null,-1),n[7]||=D(`rect`,{class:`fill-fg`,x:`4`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),n[8]||=D(`rect`,{class:`fill-fg`,x:`31`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),D(`g`,at,[n[3]||=D(`circle`,{class:`fill-surface`,cx:`19`,cy:`10.5`,r:`3`},null,-1),n[4]||=D(`circle`,{class:`fill-surface`,cx:`29`,cy:`10.5`,r:`3`},null,-1),D(`circle`,{class:`fill-fg`,cx:19+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,ot),D(`circle`,{class:`fill-fg`,cx:29+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,st)])])]))],10,nt)],32)):e(``,!0)}},[[`__scopeId`,`data-v-6928fa25`]]),lt={class:`min-h-screen bg-page`},ut={"data-page-content":`true`,class:`p-4 lg:p-6`},dt={key:0,"data-flash":`success`,class:`mb-4 p-4 bg-success-soft border border-success text-success-soft-fg rounded`},ft={key:1,"data-flash":`error`,class:`mb-4 p-4 bg-danger-soft border border-danger text-danger-soft-fg rounded`},pt={__name:`AdminLayout`,props:{title:{type:String,default:``}},setup(n){let r=S(),i=p(!1),o=p(!1),s=g(()=>r.props.branding||{}),l=g(()=>r.props.menu||[]),u=g(()=>r.props.auth?.user||{}),d=()=>{i.value=!i.value},f=()=>{o.value=!o.value},h=()=>{i.value=!1};return(r,p)=>(a(),E(T,null,[t(m(C),{title:n.title||``},null,8,[`title`]),D(`div`,lt,[i.value?(a(),E(`div`,{key:0,class:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:h})):e(``,!0),t(ce,{open:i.value,collapsed:o.value,menu:l.value,branding:s.value,onClose:h},null,8,[`open`,`collapsed`,`menu`,`branding`]),D(`div`,{class:c([`transition-all duration-300`,o.value?`lg:pl-20`:`lg:pl-64`])},[t(Be,{user:u.value,branding:s.value,onToggleSidebar:d,onToggleCollapse:f},null,8,[`user`,`branding`]),D(`main`,ut,[r.$page.props.flash?.success?(a(),E(`div`,dt,v(r.$page.props.flash.success),1)):e(``,!0),r.$page.props.flash?.error?(a(),E(`div`,ft,v(r.$page.props.flash.error),1)):e(``,!0),O(r.$slots,`default`)])],2),t(ct)])],64))}};export{X as i,Z as n,Q as r,pt as t}; \ No newline at end of file +import{$ as e,C as t,E as n,F as r,G as i,H as a,I as o,M as s,P as c,Q as l,R as u,S as d,T as f,W as p,X as m,_ as h,b as g,c as _,h as v,i as y,m as b,o as x,r as S,s as C,tt as w,v as T,w as E,x as D,z as O}from"./dist-Bie52OmN.js";import{n as k,r as A,t as j}from"./LocaleSwitcher-DAWnmZni.js";import{n as M,t as N}from"./app-BCJOqmKO.js";var P=[`aria-expanded`,`title`],F={class:`flex items-center`},I=[`innerHTML`],L={key:0},R=[`innerHTML`],z={key:0,class:`mt-1 ml-4 space-y-1 border-l border-sidebar-line pl-3`},B=[`innerHTML`],V={key:0},H=`flex items-center px-3 py-2 text-sm rounded-lg transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-accent`,U=`bg-sidebar-active text-sidebar-active-fg font-semibold shadow-[inset_3px_0_0_var(--atrium-sidebar-accent)]`,W=`text-sidebar-fg font-medium hover:bg-sidebar-hover`,G={__name:`AdminMenuItem`,props:{item:{type:Object,required:!0},collapsed:Boolean},setup(r){let a=r,s=x(),c=m(!1),h=g(()=>a.item.children&&a.item.children.length>0),_=e=>{let t=route(e,void 0,!1),n=s.url.split(`?`)[0];return n===t||t!==route(`admin.dashboard`,void 0,!1)&&n.startsWith(t+`/`)},b=g(()=>!!a.item.route&&_(a.item.route)),S=g(()=>h.value?a.item.children.some(e=>e.route&&_(e.route)):!1),C=()=>{h.value&&(c.value=!c.value)};S.value&&(c.value=!0);let O={home:`${t(a)}
`))}return i(),n.join(``)}function J(e){let t=e.target.closest?.(`a[data-ai-link]`);t&&(e.preventDefault(),C.visit(t.getAttribute(`href`)))}function Y(e){e.key===`Escape`&&v.value&&(v.value=!1)}return(n,r)=>d.value?(o(),E(`div`,{key:0,class:`fixed bottom-4 right-4 z-40 flex flex-col items-end gap-3`,dusk:`ai-helper`,onKeydown:Y},[v.value?(o(),E(`section`,{key:0,class:`flex w-[22rem] max-w-[calc(100vw-2rem)] max-h-[min(36rem,calc(100vh-8rem))] flex-col rounded-lg border border-line bg-surface text-fg shadow-xl`,role:`dialog`,"aria-label":f.value.title,dusk:`ai-chat`},[D(`header`,Ge,[D(`h2`,Ke,w(f.value.title),1),D(`div`,qe,[O.value.length?(o(),E(`button`,{key:0,type:`button`,class:`text-muted hover:text-fg`,dusk:`ai-clear`,onClick:R},w(f.value.clear),1)):t(``,!0),D(`button`,{type:`button`,class:`text-muted hover:text-fg`,"aria-label":f.value.close,dusk:`ai-close`,onClick:r[0]||=e=>v.value=!1},[...r[2]||=[D(`svg`,{class:`h-4 w-4`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`},[D(`path`,{d:`M5.3 4.3 10 9l4.7-4.7 1 1L11 10l4.7 4.7-1 1L10 11l-4.7 4.7-1-1L9 10 4.3 5.3z`})],-1)]],8,Je)])]),D(`div`,{ref_key:`list`,ref:k,class:`flex-1 space-y-3 overflow-y-auto px-4 py-3 text-sm`,"aria-live":`polite`,onClick:J},[D(`p`,Ye,w(f.value.hello),1),(o(!0),E(T,null,u(O.value,(t,n)=>(o(),E(`div`,{key:n,class:e([`flex`,t.role===`user`?`justify-end`:`justify-start`])},[t.role===`user`?(o(),E(`p`,Xe,w(t.text),1)):(o(),E(`div`,{key:1,class:e([`max-w-[90%] space-y-2 rounded-lg px-3 py-2`,t.error?`border border-danger bg-danger-soft text-danger-soft-fg`:`bg-surface-alt`]),dusk:t.error?`ai-error`:`ai-answer`,innerHTML:q(t.text)},null,10,Ze))],2))),128)),y.value?(o(),E(`p`,Qe,w(f.value.thinking),1)):t(``,!0)],512),D(`form`,{class:`border-t border-line p-3`,onSubmit:h(B,[`prevent`])},[D(`div`,$e,[i(D(`textarea`,{ref_key:`input`,ref:A,"onUpdate:modelValue":r[1]||=e=>S.value=e,rows:`2`,maxlength:`2000`,class:`flex-1 resize-none rounded-md border border-field bg-surface px-3 py-2 text-sm text-fg focus:border-focus focus:outline-none focus:ring-1 focus:ring-focus`,placeholder:f.value.placeholder,"aria-label":f.value.placeholder,dusk:`ai-input`,onKeydown:W},null,40,et),[[b,S.value]]),D(`button`,{type:`submit`,class:`rounded-md bg-accent px-3 py-2 text-sm font-medium text-on-accent hover:bg-accent-hover disabled:opacity-50`,disabled:y.value||S.value.trim()===``,dusk:`ai-send`},w(f.value.send),9,tt)]),D(`p`,$,w(f.value.note),1)],32)],8,We)):t(``,!0),D(`button`,{ref_key:`mascot`,ref:M,type:`button`,class:e([`ai-mascot group relative h-16 w-16 rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-focus`,{"is-thinking":y.value,"is-open":v.value}]),"aria-label":f.value.open,"aria-expanded":v.value,title:f.value.open,dusk:`ai-mascot`,onClick:L},[(o(),E(`svg`,rt,[r[9]||=D(`ellipse`,{class:`ai-mascot-shadow fill-fg`,cx:`24`,cy:`49`,rx:`15`,ry:`2.2`,opacity:`0.15`},null,-1),D(`g`,it,[r[5]||=D(`path`,{class:`fill-fg`,d:`M6 42V22a18 18 0 0 1 36 0v20H32V22a8 8 0 0 0-16 0v20z`},null,-1),r[6]||=D(`rect`,{class:`ai-mascot-belt fill-accent`,x:`16`,y:`28`,width:`16`,height:`5`},null,-1),r[7]||=D(`rect`,{class:`fill-fg`,x:`4`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),r[8]||=D(`rect`,{class:`fill-fg`,x:`31`,y:`41`,width:`13`,height:`3.5`,rx:`1.75`},null,-1),D(`g`,at,[r[3]||=D(`circle`,{class:`fill-surface`,cx:`19`,cy:`10.5`,r:`3`},null,-1),r[4]||=D(`circle`,{class:`fill-surface`,cx:`29`,cy:`10.5`,r:`3`},null,-1),D(`circle`,{class:`fill-fg`,cx:19+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,ot),D(`circle`,{class:`fill-fg`,cx:29+j.value.x,cy:10.5+j.value.y,r:`1.4`},null,8,st)])])]))],10,nt)],32)):t(``,!0)}},[[`__scopeId`,`data-v-6928fa25`]]),lt={class:`min-h-screen bg-page`},ut={"data-page-content":`true`,class:`p-4 lg:p-6`},dt={key:0,"data-flash":`success`,class:`mb-4 p-4 bg-success-soft border border-success text-success-soft-fg rounded`},ft={key:1,"data-flash":`error`,class:`mb-4 p-4 bg-danger-soft border border-danger text-danger-soft-fg rounded`},pt={__name:`AdminLayout`,props:{title:{type:String,default:``}},setup(r){let i=x(),a=m(!1),s=m(!1),c=g(()=>i.props.branding||{}),u=g(()=>i.props.menu||[]),d=g(()=>i.props.auth?.user||{}),f=()=>{a.value=!a.value},p=()=>{s.value=!s.value},h=()=>{a.value=!1};return(i,m)=>(o(),E(T,null,[n(l(S),{title:r.title||``},null,8,[`title`]),D(`div`,lt,[a.value?(o(),E(`div`,{key:0,class:`fixed inset-0 z-40 bg-black/50 lg:hidden`,onClick:h})):t(``,!0),n(ce,{open:a.value,collapsed:s.value,menu:u.value,branding:c.value,onClose:h},null,8,[`open`,`collapsed`,`menu`,`branding`]),D(`div`,{class:e([`transition-all duration-300`,s.value?`lg:pl-20`:`lg:pl-64`])},[n(Be,{user:d.value,branding:c.value,onToggleSidebar:f,onToggleCollapse:p},null,8,[`user`,`branding`]),D(`main`,ut,[i.$page.props.flash?.success?(o(),E(`div`,dt,w(i.$page.props.flash.success),1)):t(``,!0),i.$page.props.flash?.error?(o(),E(`div`,ft,w(i.$page.props.flash.error),1)):t(``,!0),O(i.$slots,`default`)])],2),n(ct)])],64))}};export{X as i,Z as n,Q as r,pt as t}; \ No newline at end of file diff --git a/packages/admin/dist/assets/AdminModal-DNJ_V4iq.js b/packages/admin/dist/assets/AdminModal-DKazeNNa.js similarity index 62% rename from packages/admin/dist/assets/AdminModal-DNJ_V4iq.js rename to packages/admin/dist/assets/AdminModal-DKazeNNa.js index 717bcf40..3ee85084 100644 --- a/packages/admin/dist/assets/AdminModal-DNJ_V4iq.js +++ b/packages/admin/dist/assets/AdminModal-DKazeNNa.js @@ -1 +1 @@ -import{C as e,E as t,H as n,I as r,Q as i,S as a,W as o,c as s,et as c,w as l,x as u,y as d,z as f}from"./dist-MY__znoP.js";var p={key:0,"data-modal":`true`,class:`fixed inset-0 z-50 overflow-y-auto`},m={class:`flex min-h-full items-center justify-center p-4`},h={key:0,class:`px-6 py-4 border-b border-line`},g={class:`text-lg font-medium text-fg`},_={class:`p-6`},v={key:1,class:`px-6 py-4 border-t border-line bg-surface-alt flex justify-end space-x-3`},y={__name:`AdminModal`,props:{show:Boolean,maxWidth:{type:String,default:`md`},closeable:{type:Boolean,default:!0},title:String},emits:[`close`],setup(y,{emit:b}){let x=y,S=b,C=()=>{x.closeable&&S(`close`)},w={sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`};return n(()=>x.show,e=>{e?document.body.style.overflow=`hidden`:document.body.style.overflow=``}),(n,b)=>(r(),a(d,{to:`body`},[t(s,{"enter-active-class":`ease-out duration-300`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`ease-in duration-200`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:o(()=>[y.show?(r(),l(`div`,p,[u(`div`,{class:`fixed inset-0 bg-black/50 transition-opacity`,onClick:C}),u(`div`,m,[t(s,{"enter-active-class":`ease-out duration-300`,"enter-from-class":`opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95`,"enter-to-class":`opacity-100 translate-y-0 sm:scale-100`,"leave-active-class":`ease-in duration-200`,"leave-from-class":`opacity-100 translate-y-0 sm:scale-100`,"leave-to-class":`opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95`},{default:o(()=>[y.show?(r(),l(`div`,{key:0,class:i([`relative transform overflow-hidden rounded-lg bg-surface shadow-xl transition-all sm:my-8 sm:w-full`,w[y.maxWidth]])},[y.title||n.$slots.header?(r(),l(`div`,h,[f(n.$slots,`header`,{},()=>[u(`h3`,g,c(y.title),1)]),y.closeable?(r(),l(`button`,{key:0,onClick:C,class:`absolute top-4 right-4 text-muted hover:text-fg`},[...b[0]||=[u(`svg`,{class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[u(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])):e(``,!0)])):e(``,!0),u(`div`,_,[f(n.$slots,`default`)]),n.$slots.footer?(r(),l(`div`,v,[f(n.$slots,`footer`)])):e(``,!0)],2)):e(``,!0)]),_:3})])])):e(``,!0)]),_:3})]))}};export{y as t}; \ No newline at end of file +import{$ as e,C as t,E as n,H as r,I as i,S as a,W as o,c as s,tt as c,w as l,x as u,y as d,z as f}from"./dist-Bie52OmN.js";var p={key:0,"data-modal":`true`,class:`fixed inset-0 z-50 overflow-y-auto`},m={class:`flex min-h-full items-center justify-center p-4`},h={key:0,class:`px-6 py-4 border-b border-line`},g={class:`text-lg font-medium text-fg`},_={class:`p-6`},v={key:1,class:`px-6 py-4 border-t border-line bg-surface-alt flex justify-end space-x-3`},y={__name:`AdminModal`,props:{show:Boolean,maxWidth:{type:String,default:`md`},closeable:{type:Boolean,default:!0},title:String},emits:[`close`],setup(y,{emit:b}){let x=y,S=b,C=()=>{x.closeable&&S(`close`)},w={sm:`sm:max-w-sm`,md:`sm:max-w-md`,lg:`sm:max-w-lg`,xl:`sm:max-w-xl`,"2xl":`sm:max-w-2xl`};return r(()=>x.show,e=>{e?document.body.style.overflow=`hidden`:document.body.style.overflow=``}),(r,b)=>(i(),a(d,{to:`body`},[n(s,{"enter-active-class":`ease-out duration-300`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`ease-in duration-200`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:o(()=>[y.show?(i(),l(`div`,p,[u(`div`,{class:`fixed inset-0 bg-black/50 transition-opacity`,onClick:C}),u(`div`,m,[n(s,{"enter-active-class":`ease-out duration-300`,"enter-from-class":`opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95`,"enter-to-class":`opacity-100 translate-y-0 sm:scale-100`,"leave-active-class":`ease-in duration-200`,"leave-from-class":`opacity-100 translate-y-0 sm:scale-100`,"leave-to-class":`opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95`},{default:o(()=>[y.show?(i(),l(`div`,{key:0,class:e([`relative transform overflow-hidden rounded-lg bg-surface shadow-xl transition-all sm:my-8 sm:w-full`,w[y.maxWidth]])},[y.title||r.$slots.header?(i(),l(`div`,h,[f(r.$slots,`header`,{},()=>[u(`h3`,g,c(y.title),1)]),y.closeable?(i(),l(`button`,{key:0,onClick:C,class:`absolute top-4 right-4 text-muted hover:text-fg`},[...b[0]||=[u(`svg`,{class:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`},[u(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]])):t(``,!0)])):t(``,!0),u(`div`,_,[f(r.$slots,`default`)]),r.$slots.footer?(i(),l(`div`,v,[f(r.$slots,`footer`)])):t(``,!0)],2)):t(``,!0)]),_:3})])])):t(``,!0)]),_:3})]))}};export{y as t}; \ No newline at end of file diff --git a/packages/admin/dist/assets/AdminPagination-D7rwNfhd.js b/packages/admin/dist/assets/AdminPagination-D7rwNfhd.js new file mode 100644 index 00000000..27ba5a53 --- /dev/null +++ b/packages/admin/dist/assets/AdminPagination-D7rwNfhd.js @@ -0,0 +1 @@ +import{$ as e,I as t,Q as n,R as r,S as i,T as a,W as o,b as s,i as c,tt as l,v as u,w as d,x as f}from"./dist-Bie52OmN.js";var p={class:`bg-surface px-4 py-3 border-t border-line sm:px-6`},m={class:`flex items-center justify-between`},h={class:`text-sm text-fg`},g={class:`inline-flex -space-x-px rounded-md shadow-sm`},_={key:1,class:`relative inline-flex items-center rounded-l-md px-2 py-2 text-muted ring-1 ring-inset ring-field`},v={key:0,class:`relative inline-flex items-center px-4 py-2 text-sm font-semibold text-fg ring-1 ring-inset ring-field`},y={key:3,class:`relative inline-flex items-center rounded-r-md px-2 py-2 text-muted ring-1 ring-inset ring-field`},b={__name:`AdminPagination`,props:{paginator:{type:Object,required:!0}},setup(b){let x=b,S=s(()=>{let e=x.paginator.current_page,t=x.paginator.last_page,n=[],r=[];for(let r=1;r<=t;r++)(r===1||r===t||r>=e-2&&r<=e+2)&&n.push(r);let i=null;for(let e of n)i&&(e-i===2?r.push(i+1):e-i!==1&&r.push(`...`)),r.push(e),i=e;return r});return(s,x)=>(t(),d(`div`,p,[f(`div`,m,[f(`div`,h,l(s.$t(`resource.pagination.showing`,{from:b.paginator.from,to:b.paginator.to,total:b.paginator.total})),1),f(`nav`,g,[b.paginator.prev_page_url?(t(),i(n(c),{key:0,href:b.paginator.prev_page_url,class:`relative inline-flex items-center rounded-l-md px-2 py-2 text-muted ring-1 ring-inset ring-field hover:bg-hover`,"preserve-scroll":``},{default:o(()=>[...x[0]||=[f(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[f(`path`,{"fill-rule":`evenodd`,d:`M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z`,"clip-rule":`evenodd`})],-1)]]),_:1},8,[`href`])):(t(),d(`span`,_,[...x[1]||=[f(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[f(`path`,{"fill-rule":`evenodd`,d:`M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z`,"clip-rule":`evenodd`})],-1)]])),(t(!0),d(u,null,r(S.value,r=>(t(),d(u,{key:r},[r===`...`?(t(),d(`span`,v,` ... `)):(t(),i(n(c),{key:1,href:`${b.paginator.path}?page=${r}`,class:e([`relative inline-flex items-center px-4 py-2 text-sm font-semibold ring-1 ring-inset ring-field`,r===b.paginator.current_page?`z-10 bg-accent text-on-accent focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus`:`text-fg hover:bg-hover`]),"preserve-scroll":``},{default:o(()=>[a(l(r),1)]),_:2},1032,[`href`,`class`]))],64))),128)),b.paginator.next_page_url?(t(),i(n(c),{key:2,href:b.paginator.next_page_url,class:`relative inline-flex items-center rounded-r-md px-2 py-2 text-muted ring-1 ring-inset ring-field hover:bg-hover`,"preserve-scroll":``},{default:o(()=>[...x[2]||=[f(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[f(`path`,{"fill-rule":`evenodd`,d:`M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z`,"clip-rule":`evenodd`})],-1)]]),_:1},8,[`href`])):(t(),d(`span`,y,[...x[3]||=[f(`svg`,{class:`h-5 w-5`,viewBox:`0 0 20 20`,fill:`currentColor`},[f(`path`,{"fill-rule":`evenodd`,d:`M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z`,"clip-rule":`evenodd`})],-1)]]))])])]))}};export{b as t}; \ No newline at end of file diff --git a/packages/admin/dist/assets/BarChart-wks0RLo_.js b/packages/admin/dist/assets/BarChart-wks0RLo_.js new file mode 100644 index 00000000..f561b188 --- /dev/null +++ b/packages/admin/dist/assets/BarChart-wks0RLo_.js @@ -0,0 +1 @@ +import{C as e,I as t,R as n,b as r,et as i,o as a,tt as o,v as s,w as c,x as l}from"./dist-Bie52OmN.js";var u=[`aria-label`],d=[`title`],f={key:0,class:`mb-0.5 text-[10px] leading-none text-fg tabular-nums`,"data-bar-value":``},p={class:`mt-1 flex gap-px`,"aria-hidden":`true`},m={class:`sr-only`},h={key:0},g={scope:`row`},_=14,v={__name:`BarChart`,props:{points:{type:Array,required:!0},every:{type:Number,default:1},label:{type:String,default:``},height:{type:Number,default:96}},setup(v){let y=v,b=a(),x=r(()=>new Intl.NumberFormat(String(b.props.locale||`en`).replace(`_`,`-`),{notation:`compact`})),S=r(()=>Math.max(1,...y.points.map(e=>Number(e.value)||0)));function C(e){return e>0?`${Math.max(2,e/S.value*(y.height-_))}px`:`0px`}return(r,a)=>(t(),c(`figure`,{class:`w-full`,"aria-label":v.label,dusk:`bar-chart`},[l(`div`,{class:`flex items-end gap-px`,style:i({height:`${v.height}px`}),"aria-hidden":`true`},[(t(!0),c(s,null,n(v.points,(n,r)=>(t(),c(`div`,{key:r,class:`flex-1 min-w-0 h-full flex flex-col items-center justify-end`,title:`${n.label}: ${n.value}`,"data-bar":``},[n.value>0?(t(),c(`span`,f,o(x.value.format(n.value)),1)):e(``,!0),l(`div`,{class:`w-full rounded-t-sm bg-accent`,style:i({height:C(n.value)})},null,4)],8,d))),128))],4),a[0]||=l(`div`,{class:`h-px bg-field`,"aria-hidden":`true`},null,-1),l(`div`,p,[(t(!0),c(s,null,n(v.points,(e,n)=>(t(),c(`span`,{key:n,class:`flex-1 min-w-0 text-[10px] text-muted tabular-nums whitespace-nowrap`},o(n%v.every===0?e.label:``),1))),128))]),l(`table`,m,[v.label?(t(),c(`caption`,h,o(v.label),1)):e(``,!0),l(`tbody`,null,[(t(!0),c(s,null,n(v.points,(e,n)=>(t(),c(`tr`,{key:n},[l(`th`,g,o(e.label),1),l(`td`,null,o(e.value),1)]))),128))])])],8,u))}};export{v as t}; \ No newline at end of file diff --git a/packages/admin/dist/assets/ContentLocaleSwitcher-BJIieXK-.js b/packages/admin/dist/assets/ContentLocaleSwitcher-HJzbB87a.js similarity index 59% rename from packages/admin/dist/assets/ContentLocaleSwitcher-BJIieXK-.js rename to packages/admin/dist/assets/ContentLocaleSwitcher-HJzbB87a.js index b3a342e0..b0197cf3 100644 --- a/packages/admin/dist/assets/ContentLocaleSwitcher-BJIieXK-.js +++ b/packages/admin/dist/assets/ContentLocaleSwitcher-HJzbB87a.js @@ -1 +1 @@ -import{C as e,G as t,H as n,I as r,Q as i,R as a,T as o,Y as s,b as c,et as l,h as u,v as d,w as f,x as p,z as m}from"./dist-MY__znoP.js";var h={class:`admin-tabs`},g={class:`border-b border-line`},_=[`aria-label`],v=[`data-tab`,`data-tab-active`,`onClick`],y=[`innerHTML`],b=[`data-tab-badge`],x={class:`mt-6`},S={__name:`AdminTabs`,props:{tabs:{type:Array,required:!0,default:()=>[]},modelValue:{type:String,default:``}},emits:[`update:modelValue`],setup(t,{emit:n}){let s=t,u=n,S=c({get:()=>s.modelValue||s.tabs[0]?.name||``,set:e=>u(`update:modelValue`,e)}),C={"document-text":`