diff --git a/package-lock.json b/package-lock.json index b253520c59..a74c5fb607 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "@ryangjchandler/alpine-tooltip": "^1.2.0", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.9", + "alpine-lazy-load-assets": "^1.0.5", "alpinejs": "^3.10.4", "async-alpine": "^1.0.0", "autoprefixer": "^10.4.0", @@ -3016,6 +3017,12 @@ "ajv": "^6.9.1" } }, + "node_modules/alpine-lazy-load-assets": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/alpine-lazy-load-assets/-/alpine-lazy-load-assets-1.0.5.tgz", + "integrity": "sha512-2FiBjxDeyFGRfevBfnI5d8cv7djYQUXLV8GfHVhFoCFLGSLlZmgKXjIBPkJDZvdjmTa4ljtiOAq4EFQEsICEzg==", + "dev": true + }, "node_modules/alpinejs": { "version": "3.12.1", "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.12.1.tgz", diff --git a/package.json b/package.json index 81115a8d4f..59a3fffdc9 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@ryangjchandler/alpine-tooltip": "^1.2.0", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/typography": "^0.5.9", + "alpine-lazy-load-assets": "^1.0.5", "alpinejs": "^3.10.4", "async-alpine": "^1.0.0", "autoprefixer": "^10.4.0", diff --git a/packages/actions/docs/02-overview.md b/packages/actions/docs/02-overview.md index c6bc792b84..5995334400 100644 --- a/packages/actions/docs/02-overview.md +++ b/packages/actions/docs/02-overview.md @@ -106,4 +106,18 @@ Filament includes several prebuilt actions that you can add to your app. Their a - [Delete](prebuilt-actions/delete) - [Replicate](prebuilt-actions/replicate) - [Force-delete](prebuilt-actions/force-delete) -- [Restore](prebuilt-actions/restore) \ No newline at end of file +- [Restore](prebuilt-actions/restore) + +## Grouping actions + +You may group actions together into a dropdown menu by using an `ActionGroup` object. Groups may contain many actions, or other groups: + +```php +ActionGroup::make([ + Action::make('view'), + Action::make('edit'), + Action::make('delete'), +]) +``` + +To learn about how to group actions, see the [Grouping actions](grouping-actions) page. diff --git a/packages/actions/docs/03-trigger-button.md b/packages/actions/docs/03-trigger-button.md index 5a5f21b608..71abc88021 100644 --- a/packages/actions/docs/03-trigger-button.md +++ b/packages/actions/docs/03-trigger-button.md @@ -41,6 +41,17 @@ Action::make('edit') +### Using an icon button on mobile devices only + +You may want to use a button style with a label on desktop, but remove the label on mobile. This will transform it into an icon button. You can do this with the `labeledFrom()` method, passing in the responsive [breakpoint](https://tailwindcss.com/docs/responsive-design#overview) at which you want the label to be added to the button: + +```php +Action::make('edit') + ->icon('heroicon-o-pencil-square') + ->button() + ->labeledFrom('md') +``` + ## Setting a label By default, the label of the trigger button is generated from its name. You may customize this using the `label()` method: diff --git a/packages/actions/docs/05-grouping-actions.md b/packages/actions/docs/05-grouping-actions.md new file mode 100644 index 0000000000..5055baf897 --- /dev/null +++ b/packages/actions/docs/05-grouping-actions.md @@ -0,0 +1,89 @@ +--- +title: Grouping actions +--- + +## Overview + +You may group actions together into a dropdown menu by using an `ActionGroup` object. Groups may contain many actions, or other groups: + +```php +ActionGroup::make([ + Action::make('view'), + Action::make('edit'), + Action::make('delete'), +]) +``` + +This page is about customizing the look of the group's trigger button and dropdown. + +## Customizing the group trigger style + +The button which opens the dropdown may be customized in the same way as a normal action. [All of the methods available for trigger buttons](trigger-button) may be used to customize the group trigger button: + +```php +ActionGroup::make([ + // Array of actions +]) + ->label('More actions') + ->icon('heroicon-m-ellipsis-vertical') + ->size('sm') + ->color('primary') + ->button() +``` + +## Setting the placement of the dropdown + +The dropdown may be positioned relative to the trigger button by using the `placement()` method: + +```php +ActionGroup::make([ + // Array of actions +]) + ->placement('bottom-start') +``` + +## Adding dividers between actions + +You may add dividers between each action in the dropdown by using the `divided()` method: + +```php +ActionGroup::make([ + // Array of actions +]) + ->divided() +``` + +If you'd like to group multiple actions together within one division, you may nest another `ActionGroup` within the main `ActionGroup`, and disable the dropdown on the nested group using `dropdown(false)`: + +```php +ActionGroup::make([ + // Array of individually divided actions + ActionGroup::make([ + // Array of actions within one division + ])->dropdown(false), + // Array of individually divided actions +]) + ->divided() +``` + +## Setting the width of the dropdown + +The dropdown may be set to a width by using the `width()` method. Options correspond to [Tailwind's max-width scale](https://tailwindcss.com/docs/max-width). The options are `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `5xl`, `6xl` and `7xl`: + +```php +ActionGroup::make([ + // Array of actions +]) + ->width('xs') +``` + +## Controlling the maximum height of the dropdown + +The dropdown content can have a maximum height using the `maxHeight()` method, so that it scrolls. You can pass a [CSS length](https://developer.mozilla.org/en-US/docs/Web/CSS/length): + +```php +ActionGroup::make([ + // Array of actions +]) + ->maxHeight('400px') +``` diff --git a/packages/actions/docs/05-adding-an-action-to-a-livewire-component.md b/packages/actions/docs/06-adding-an-action-to-a-livewire-component.md similarity index 90% rename from packages/actions/docs/05-adding-an-action-to-a-livewire-component.md rename to packages/actions/docs/06-adding-an-action-to-a-livewire-component.md index 9a60090fd4..79a03ef357 100644 --- a/packages/actions/docs/05-adding-an-action-to-a-livewire-component.md +++ b/packages/actions/docs/06-adding-an-action-to-a-livewire-component.md @@ -93,9 +93,9 @@ public function deleteAction(): Action } ``` -## Grouping actions +## Grouping actions in a Livewire view -You may group actions together into a dropdown menu by using the `` Blade component, passing in the `actions` array as an attribute: +You may [group actions together into a dropdown menu](grouping-actions) by using the `` Blade component, passing in the `actions` array as an attribute: ```blade
@@ -109,7 +109,7 @@ You may group actions together into a dropdown menu by using the ` ``` -You can also pass in a `label`, `icon`, `color`, `size`, `tooltip`, and `dropdown-placement` to the group, as attributes: +You can also pass in any attributes to customize the appearance of the trigger button and dropdown: ```blade
@@ -129,4 +129,4 @@ You can also pass in a `label`, `icon`, `color`, `size`, `tooltip`, and `dropdow
-``` \ No newline at end of file +``` diff --git a/packages/actions/docs/06-prebuilt-actions/01-create.md b/packages/actions/docs/07-prebuilt-actions/01-create.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/01-create.md rename to packages/actions/docs/07-prebuilt-actions/01-create.md diff --git a/packages/actions/docs/06-prebuilt-actions/02-edit.md b/packages/actions/docs/07-prebuilt-actions/02-edit.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/02-edit.md rename to packages/actions/docs/07-prebuilt-actions/02-edit.md diff --git a/packages/actions/docs/06-prebuilt-actions/03-view.md b/packages/actions/docs/07-prebuilt-actions/03-view.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/03-view.md rename to packages/actions/docs/07-prebuilt-actions/03-view.md diff --git a/packages/actions/docs/06-prebuilt-actions/04-delete.md b/packages/actions/docs/07-prebuilt-actions/04-delete.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/04-delete.md rename to packages/actions/docs/07-prebuilt-actions/04-delete.md diff --git a/packages/actions/docs/06-prebuilt-actions/05-replicate.md b/packages/actions/docs/07-prebuilt-actions/05-replicate.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/05-replicate.md rename to packages/actions/docs/07-prebuilt-actions/05-replicate.md diff --git a/packages/actions/docs/06-prebuilt-actions/06-force-delete.md b/packages/actions/docs/07-prebuilt-actions/06-force-delete.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/06-force-delete.md rename to packages/actions/docs/07-prebuilt-actions/06-force-delete.md diff --git a/packages/actions/docs/06-prebuilt-actions/07-restore.md b/packages/actions/docs/07-prebuilt-actions/07-restore.md similarity index 100% rename from packages/actions/docs/06-prebuilt-actions/07-restore.md rename to packages/actions/docs/07-prebuilt-actions/07-restore.md diff --git a/packages/actions/resources/views/components/group.blade.php b/packages/actions/resources/views/components/group.blade.php index ca4832ff4d..0f8442fdbb 100644 --- a/packages/actions/resources/views/components/group.blade.php +++ b/packages/actions/resources/views/components/group.blade.php @@ -2,6 +2,7 @@ 'actions' => [], 'button' => false, 'color' => null, + 'divided' => false, 'dropdownPlacement' => null, 'dynamicComponent' => null, 'group' => null, @@ -20,6 +21,7 @@ @php $group = \Filament\Actions\ActionGroup::make($actions) ->color($color) + ->divided($divided) ->dropdownPlacement($dropdownPlacement) ->icon($icon) ->indicator($indicator) diff --git a/packages/forms/docs/05-validation.md b/packages/forms/docs/05-validation.md index 5a681569e7..9562fbdb89 100644 --- a/packages/forms/docs/05-validation.md +++ b/packages/forms/docs/05-validation.md @@ -16,7 +16,7 @@ Filament includes several [dedicated validation methods](#available-rules), but ### Active URL -The field must have a valid A or AAAA record according to the `dns_get_record()` PHP function. [See the Laravel documentation](https://laravel.com/docs/validation#rule-active-url) +The field must have a valid A or AAAA record according to the `dns_get_record()` PHP function. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-active-url) ```php Field::make('name')->activeUrl() @@ -24,7 +24,7 @@ Field::make('name')->activeUrl() ### After (date) -The field value must be a value after a given date. [See the Laravel documentation](https://laravel.com/docs/validation#rule-after) +The field value must be a value after a given date. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-after) ```php Field::make('start_date')->after('tomorrow') @@ -39,7 +39,7 @@ Field::make('end_date')->after('start_date') ### After or equal to (date) -The field value must be a date after or equal to the given date. [See the Laravel documentation](https://laravel.com/docs/validation#rule-after-or-equal) +The field value must be a date after or equal to the given date. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-after-or-equal) ```php Field::make('start_date')->afterOrEqual('tomorrow') @@ -54,7 +54,7 @@ Field::make('end_date')->afterOrEqual('start_date') ### Alpha -The field must be entirely alphabetic characters. [See the Laravel documentation](https://laravel.com/docs/validation#rule-alpha) +The field must be entirely alphabetic characters. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-alpha) ```php Field::make('name')->alpha() @@ -62,7 +62,7 @@ Field::make('name')->alpha() ### Alpha Dash -The field may have alpha-numeric characters, as well as dashes and underscores. [See the Laravel documentation](https://laravel.com/docs/validation#rule-alpha-dash) +The field may have alpha-numeric characters, as well as dashes and underscores. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-alpha-dash) ```php Field::make('name')->alphaDash() @@ -70,15 +70,23 @@ Field::make('name')->alphaDash() ### Alpha Numeric -The field must be entirely alpha-numeric characters. [See the Laravel documentation](https://laravel.com/docs/validation#rule-alpha-num) +The field must be entirely alpha-numeric characters. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-alpha-num) ```php Field::make('name')->alphaNum() ``` +### ASCII + +The field must be entirely 7-bit ASCII characters. [See the Laravel documentation.](https://laravel.com/docs/10.x/validation#rule-ascii) + +```php +Field::make('name')->ascii() +``` + ### Before (date) -The field value must be a date before a given date. [See the Laravel documentation](https://laravel.com/docs/validation#rule-before) +The field value must be a date before a given date. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-before) ```php Field::make('start_date')->before('first day of next month') @@ -93,7 +101,7 @@ Field::make('end_date') ### Before or equal to (date) -The field value must be a date before or equal to the given date. [See the Laravel documentation](https://laravel.com/docs/validation#rule-before-or-equal) +The field value must be a date before or equal to the given date. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-before-or-equal) ```php Field::make('start_date')->beforeOrEqual('end of this month') @@ -108,7 +116,7 @@ Field::make('end_date') ### Confirmed -The field must have a matching field of `{field}_confirmation`. [See the Laravel documentation](https://laravel.com/docs/validation#rule-confirmed) +The field must have a matching field of `{field}_confirmation`. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-confirmed) ```php Field::make('password')->confirmed() @@ -117,7 +125,7 @@ Field::make('password_confirmation') ### Different -The field value must be different to another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-different) +The field value must be different to another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-different) ```php Field::make('backup_email')->different('email') @@ -125,7 +133,7 @@ Field::make('backup_email')->different('email') ### Doesnt Start With -The field must not start with one of the given values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-doesnt-start-with) +The field must not start with one of the given values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-doesnt-start-with) ```php Field::make('name')->doesntStartWith(['admin']) @@ -133,7 +141,7 @@ Field::make('name')->doesntStartWith(['admin']) ### Doesnt End With -The field must not end with one of the given values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-doesnt-end-with) +The field must not end with one of the given values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-doesnt-end-with) ```php Field::make('name')->doesntEndWith(['admin']) @@ -141,7 +149,7 @@ Field::make('name')->doesntEndWith(['admin']) ### Ends With -The field must end with one of the given values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-ends-with) +The field must end with one of the given values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-ends-with) ```php Field::make('name')->endsWith(['bot']) @@ -149,7 +157,7 @@ Field::make('name')->endsWith(['bot']) ### Enum -The field must contain a valid enum value. [See the Laravel documentation](https://laravel.com/docs/validation#rule-enum) +The field must contain a valid enum value. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-enum) ```php Field::make('status')->enum(MyStatus::class) @@ -157,7 +165,7 @@ Field::make('status')->enum(MyStatus::class) ### Exists -The field value must exist in the database. [See the Laravel documentation](https://laravel.com/docs/validation#rule-exists). +The field value must exist in the database. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-exists). ```php Field::make('invitation')->exists() @@ -190,7 +198,7 @@ Field::make('invitation') ### Filled -The field must not be empty when it is present. [See the Laravel documentation](https://laravel.com/docs/validation#rule-filled) +The field must not be empty when it is present. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-filled) ```php Field::make('name')->filled() @@ -198,7 +206,7 @@ Field::make('name')->filled() ### Greater than -The field value must be greater than another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-gt) +The field value must be greater than another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-gt) ```php Field::make('newNumber')->gt('oldNumber') @@ -206,14 +214,14 @@ Field::make('newNumber')->gt('oldNumber') ### Greater than or equal to -The field value must be greater than or equal to another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-gte) +The field value must be greater than or equal to another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-gte) ```php Field::make('newNumber')->gte('oldNumber') ``` ### In -The field must be included in the given list of values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-in) +The field must be included in the given list of values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-in) ```php Field::make('status')->in(['pending', 'completed']) @@ -221,7 +229,7 @@ Field::make('status')->in(['pending', 'completed']) ### Ip Address -The field must be an IP address. [See the Laravel documentation](https://laravel.com/docs/validation#rule-ip) +The field must be an IP address. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-ip) ```php Field::make('ip_address')->ip() @@ -231,7 +239,7 @@ Field::make('ip_address')->ipv6() ### JSON -The field must be a valid JSON string. [See the Laravel documentation](https://laravel.com/docs/validation#rule-json) +The field must be a valid JSON string. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-json) ```php Field::make('ip_address')->json() @@ -239,7 +247,7 @@ Field::make('ip_address')->json() ### Less than -The field value must be less than another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-lt) +The field value must be less than another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-lt) ```php Field::make('newNumber')->lt('oldNumber') @@ -247,7 +255,7 @@ Field::make('newNumber')->lt('oldNumber') ### Less than or equal to -The field value must be less than or equal to another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-lte) +The field value must be less than or equal to another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-lte) ```php Field::make('newNumber')->lte('oldNumber') @@ -255,7 +263,7 @@ Field::make('newNumber')->lte('oldNumber') ### Mac Address -The field must be a MAC address. [See the Laravel documentation](https://laravel.com/docs/validation#rule-mac) +The field must be a MAC address. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-mac) ```php Field::make('mac_address')->macAddress() @@ -263,7 +271,7 @@ Field::make('mac_address')->macAddress() ### Multiple Of -The field must be a multiple of value. [See the Laravel documentation](https://laravel.com/docs/validation#multiple-of) +The field must be a multiple of value. [See the Laravel documentation.](https://laravel.com/docs/validation#multiple-of) ```php Field::make('number')->multipleOf(2) @@ -271,7 +279,7 @@ Field::make('number')->multipleOf(2) ### Not In -The field must not be included in the given list of values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-not-in) +The field must not be included in the given list of values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-not-in) ```php Field::make('status')->notIn(['cancelled', 'rejected']) @@ -279,7 +287,7 @@ Field::make('status')->notIn(['cancelled', 'rejected']) ### Not Regex -The field must not match the given regular expression. [See the Laravel documentation](https://laravel.com/docs/validation#rule-not-regex) +The field must not match the given regular expression. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-not-regex) ```php Field::make('email')->notRegex('/^.+$/i') @@ -287,7 +295,7 @@ Field::make('email')->notRegex('/^.+$/i') ### Nullable -The field value can be empty. This rule is applied by default if the `required` rule is not present. [See the Laravel documentation](https://laravel.com/docs/validation#rule-nullable) +The field value can be empty. This rule is applied by default if the `required` rule is not present. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-nullable) ```php Field::make('name')->nullable() @@ -295,7 +303,7 @@ Field::make('name')->nullable() ### Prohibited -The field value must be empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-prohibited) +The field value must be empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-prohibited) ```php Field::make('name')->prohibited() @@ -303,7 +311,7 @@ Field::make('name')->prohibited() ### Required -The field value must not be empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-required) +The field value must not be empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-required) ```php Field::make('name')->required() @@ -311,7 +319,7 @@ Field::make('name')->required() ### Required With -The field value must not be empty _only if_ any of the other specified fields are not empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-required-with) +The field value must not be empty _only if_ any of the other specified fields are not empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-required-with) ```php Field::make('name')->requiredWith('field,another_field') @@ -319,7 +327,7 @@ Field::make('name')->requiredWith('field,another_field') ### Required With All -The field value must not be empty _only if_ all of the other specified fields are not empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-required-with-all) +The field value must not be empty _only if_ all of the other specified fields are not empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-required-with-all) ```php Field::make('name')->requiredWithAll('field,another_field') @@ -327,7 +335,7 @@ Field::make('name')->requiredWithAll('field,another_field') ### Required Without -The field value must not be empty _only when_ any of the other specified fields are empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-required-without) +The field value must not be empty _only when_ any of the other specified fields are empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-required-without) ```php Field::make('name')->requiredWithout('field,another_field') @@ -335,7 +343,7 @@ Field::make('name')->requiredWithout('field,another_field') ### Required Without All -The field value must not be empty _only when_ all of the other specified fields are empty. [See the Laravel documentation](https://laravel.com/docs/validation#rule-required-without-all) +The field value must not be empty _only when_ all of the other specified fields are empty. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-required-without-all) ```php Field::make('name')->requiredWithoutAll('field,another_field') @@ -343,7 +351,7 @@ Field::make('name')->requiredWithoutAll('field,another_field') ### Regex -The field must match the given regular expression. [See the Laravel documentation](https://laravel.com/docs/validation#rule-regex) +The field must match the given regular expression. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-regex) ```php Field::make('email')->regex('/^.+@.+$/i') @@ -351,7 +359,7 @@ Field::make('email')->regex('/^.+@.+$/i') ### Same -The field value must be the same as another. [See the Laravel documentation](https://laravel.com/docs/validation#rule-same) +The field value must be the same as another. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-same) ```php Field::make('password')->same('passwordConfirmation') @@ -359,7 +367,7 @@ Field::make('password')->same('passwordConfirmation') ### Starts With -The field must start with one of the given values. [See the Laravel documentation](https://laravel.com/docs/validation#rule-starts-with) +The field must start with one of the given values. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-starts-with) ```php Field::make('name')->startsWith(['a']) @@ -367,14 +375,14 @@ Field::make('name')->startsWith(['a']) ### String -The field must be a string. [See the Laravel documentation](https://laravel.com/docs/validation#rule-string) +The field must be a string. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-string) ```php Field::make('name')->string() ``` ### Unique -The field value must not exist in the database. [See the Laravel documentation](https://laravel.com/docs/validation#rule-unique) +The field value must not exist in the database. [See the Laravel documentation.](https://laravel.com/docs/validation#rule-unique) ```php Field::make('email')->unique() @@ -419,7 +427,7 @@ Field::make('email') ### UUID -The field must be a valid RFC 4122 (version 1, 3, 4, or 5) universally unique identifier (UUID). [See the Laravel documentation](https://laravel.com/docs/validation#rule-uuid) +The field must be a valid RFC 4122 (version 1, 3, 4, or 5) universally unique identifier (UUID). [See the Laravel documentation.](https://laravel.com/docs/validation#rule-uuid) ```php Field::make('identifer')->uuid() diff --git a/packages/forms/docs/08-adding-a-form-to-a-livewire-component.md b/packages/forms/docs/08-adding-a-form-to-a-livewire-component.md index aacfd27923..6fa9214f1c 100644 --- a/packages/forms/docs/08-adding-a-form-to-a-livewire-component.md +++ b/packages/forms/docs/08-adding-a-form-to-a-livewire-component.md @@ -25,7 +25,7 @@ use Illuminate\Support\Facades\Route; Route::get('posts/create', CreatePost::class); ``` -### Adding the form +## Adding the form There are 5 main tasks when adding a form to a Livewire component class. Each one is essential: diff --git a/packages/forms/resources/views/components/affixes.blade.php b/packages/forms/resources/views/components/affixes.blade.php index a459cf0e35..75cf0146ba 100644 --- a/packages/forms/resources/views/components/affixes.blade.php +++ b/packages/forms/resources/views/components/affixes.blade.php @@ -53,7 +53,7 @@ @endif - @if ($prefix) + @if (filled($prefix)) - @if ($suffix) + @if (filled($suffix)) rule('ascii', $condition); + + return $this; + } + public function confirmed(bool | Closure $condition = true): static { $this->rule('confirmed', $condition); diff --git a/packages/forms/src/Components/Concerns/HasAffixes.php b/packages/forms/src/Components/Concerns/HasAffixes.php index aca6867c88..5529f507fd 100644 --- a/packages/forms/src/Components/Concerns/HasAffixes.php +++ b/packages/forms/src/Components/Concerns/HasAffixes.php @@ -162,11 +162,6 @@ trait HasAffixes return $this->evaluate($this->prefixLabel); } - public function getPostfixLabel(): ?string - { - return $this->getSuffixLabel(); - } - public function getSuffixLabel(): ?string { return $this->evaluate($this->suffixLabel); diff --git a/packages/infolists/docs/05-adding-an-infolist-to-a-livewire-component.md b/packages/infolists/docs/05-adding-an-infolist-to-a-livewire-component.md new file mode 100644 index 0000000000..05891078cc --- /dev/null +++ b/packages/infolists/docs/05-adding-an-infolist-to-a-livewire-component.md @@ -0,0 +1,95 @@ +--- +title: Adding an infolist to a Livewire component +--- + +## Setting up the Livewire component + +First, generate a new Livewire component: + +```bash +php artisan make:livewire ViewProduct +``` + +Then, render your Livewire component on the page: + +```blade +@livewire('view-product') +``` + +Alternatively, you can use a full-page Livewire component: + +```php +use App\Http\Livewire\ViewProduct; +use Illuminate\Support\Facades\Route; + +Route::get('products/{product}', ViewProduct::class); +``` + +## Adding the infolist + +Next, add a method to the Livewire component which accepts an `$infolist` object, modifies it, and returns it: + +```php +use Filament\Infolists\Infolist; + +public function productInfolist(Infolist $infolist): Infolist +{ + return $infolist + ->record($this->product) + ->schema([ + // ... + ]); +} +``` + +Finally, render the infolist in the Livewire component's view: + +```blade +{{ $this->productInfolist }} +``` + +## Passing data to the infolist + +You can pass data to the infolist in two ways: + +Either pass an Eloquent model instance to the `record()` method of the infolist, to automatically map all the model attributes and relationships to the entries in the infolist's schema: + +```php +use Filament\Infolists\Components\TextEntry; +use Filament\Infolists\Infolist; + +public function productInfolist(Infolist $infolist): Infolist +{ + return $infolist + ->record($this->product) + ->schema([ + TextEntry::make('name'), + TextEntry::make('category.name'), + // ... + ]); +} +``` + +Alternatively, you can pass an array of data to the `state()` method of the infolist, to manually map the data to the entries in the infolist's schema: + +```php +use Filament\Infolists\Components\TextEntry; +use Filament\Infolists\Infolist; + +public function productInfolist(Infolist $infolist): Infolist +{ + return $infolist + ->state([ + 'name' => 'MacBook Pro', + 'category' => [ + 'name' => 'Laptops', + ], + // ... + ]) + ->schema([ + TextEntry::make('name'), + TextEntry::make('category.name'), + // ... + ]); +} +``` diff --git a/packages/spatie-laravel-settings-plugin/composer.json b/packages/spatie-laravel-settings-plugin/composer.json index 833d7d9e97..5cd784b573 100644 --- a/packages/spatie-laravel-settings-plugin/composer.json +++ b/packages/spatie-laravel-settings-plugin/composer.json @@ -13,7 +13,7 @@ "illuminate/console": "^9.0|^10.0", "illuminate/filesystem": "^9.0|^10.0", "illuminate/support": "^9.0|^10.0", - "spatie/laravel-settings": "^2.2" + "spatie/laravel-settings": "^2.2|^3.0" }, "autoload": { "psr-4": { diff --git a/packages/support/dist/index.js b/packages/support/dist/index.js index 1922418529..657904e5da 100644 --- a/packages/support/dist/index.js +++ b/packages/support/dist/index.js @@ -1,4 +1,4 @@ -(()=>{function et(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function Dt(e){return["top","bottom"].includes(et(e))?"x":"y"}function xe(e){return e==="y"?"height":"width"}function Ke(e,t,n){let{reference:i,floating:o}=e,r=i.x+i.width/2-o.width/2,a=i.y+i.height/2-o.height/2,l=Dt(t),s=xe(l),c=i[s]/2-o[s]/2,f=et(t),u=l==="x",d;switch(f){case"top":d={x:r,y:i.y-o.height};break;case"bottom":d={x:r,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:a};break;case"left":d={x:i.x-o.width,y:a};break;default:d={x:i.x,y:i.y}}switch(bt(t)){case"start":d[l]-=c*(n&&u?-1:1);break;case"end":d[l]+=c*(n&&u?-1:1);break}return d}var di=async(e,t,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:a}=n,l=await(a.isRTL==null?void 0:a.isRTL(t));if(a==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),r.filter(g=>{let{name:v}=g;return v==="autoPlacement"||v==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Ke(s,i,l),u=i,d={},p=0;for(let g=0;g100)throw new Error(["Floating UI: The middleware lifecycle appears to be","running in an infinite loop. This is usually caused by a `reset`","continually being returned without a break condition."].join(" "));let{name:v,fn:x}=r[g],{x:y,y:E,data:O,reset:A}=await x({x:c,y:f,initialPlacement:i,placement:u,strategy:o,middlewareData:d,rects:s,platform:a,elements:{reference:e,floating:t}});if(c=y??c,f=E??f,d={...d,[v]:{...d[v],...O}},A){typeof A=="object"&&(A.placement&&(u=A.placement),A.rects&&(s=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:c,y:f}=Ke(s,u,l)),g=-1;continue}}return{x:c,y:f,placement:u,strategy:o,middlewareData:d}};function hi(e){return{top:0,right:0,bottom:0,left:0,...e}}function De(e){return typeof e!="number"?hi(e):{top:e,right:e,bottom:e,left:e}}function Ft(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xt(e,t){var n;t===void 0&&(t={});let{x:i,y:o,platform:r,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=t,g=De(p),x=l[d?u==="floating"?"reference":"floating":u],y=Ft(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(x)))==null||n?x:x.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:s})),E=Ft(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?{...a.floating,x:i,y:o}:a.reference,offsetParent:await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),strategy:s}):a[u]);return{top:y.top-E.top+g.top,bottom:E.bottom-y.bottom+g.bottom,left:y.left-E.left+g.left,right:E.right-y.right+g.right}}var ln=Math.min,dt=Math.max;function ye(e,t,n){return dt(e,ln(t,n))}var sn=e=>({name:"arrow",options:e,async fn(t){let{element:n,padding:i=0}=e??{},{x:o,y:r,placement:a,rects:l,platform:s}=t;if(n==null)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};let c=De(i),f={x:o,y:r},u=Dt(a),d=xe(u),p=await s.getDimensions(n),g=u==="y"?"top":"left",v=u==="y"?"bottom":"right",x=l.reference[d]+l.reference[u]-f[u]-l.floating[d],y=f[u]-l.reference[u],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(n)),O=E?u==="y"?E.clientHeight||0:E.clientWidth||0:0,A=x/2-y/2,D=c[g],h=O-p[d]-c[v],m=O/2-p[d]/2+A,S=ye(D,m,h);return{data:{[u]:S,centerOffset:m-S}}}}),pi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(e){return e.replace(/left|right|bottom|top/g,t=>pi[t])}function cn(e,t,n){n===void 0&&(n=!1);let i=bt(e),o=Dt(e),r=xe(o),a=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=Ut(a)),{main:a,cross:Ut(a)}}var gi={start:"end",end:"start"};function Ee(e){return e.replace(/start|end/g,t=>gi[t])}var un=["top","right","bottom","left"],mi=un.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function vi(e,t,n){return(e?[...n.filter(o=>bt(o)===e),...n.filter(o=>bt(o)!==e)]:n.filter(o=>et(o)===o)).filter(o=>e?bt(o)===e||(t?Ee(o)!==o:!1):!0)}var Ce=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,o,r,a;let{x:l,y:s,rects:c,middlewareData:f,placement:u,platform:d,elements:p}=t,{alignment:g=null,allowedPlacements:v=mi,autoAlignment:x=!0,...y}=e,E=vi(g,x,v),O=await xt(t,y),A=(n=(i=f.autoPlacement)==null?void 0:i.index)!=null?n:0,D=E[A];if(D==null)return{};let{main:h,cross:m}=cn(D,c,await(d.isRTL==null?void 0:d.isRTL(p.floating)));if(u!==D)return{x:l,y:s,reset:{placement:E[0]}};let S=[O[et(D)],O[h],O[m]],w=[...(o=(r=f.autoPlacement)==null?void 0:r.overflows)!=null?o:[],{placement:D,overflows:S}],N=E[A+1];if(N)return{data:{index:A+1,overflows:w},reset:{placement:N}};let _=w.slice().sort((I,j)=>I.overflows[0]-j.overflows[0]),k=(a=_.find(I=>{let{overflows:j}=I;return j.every(Y=>Y<=0)}))==null?void 0:a.placement,F=k??_[0].placement;return F!==u?{data:{index:A+1,overflows:w},reset:{placement:F}}:{}}}};function bi(e){let t=Ut(e);return[Ee(e),t,Ee(t)]}var fn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;let{placement:i,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...g}=e,v=et(i),y=u||(v===a||!p?[Ut(a)]:bi(a)),E=[a,...y],O=await xt(t,g),A=[],D=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&A.push(O[v]),f){let{main:w,cross:N}=cn(i,r,await(l.isRTL==null?void 0:l.isRTL(s.floating)));A.push(O[w],O[N])}if(D=[...D,{placement:i,overflows:A}],!A.every(w=>w<=0)){var h,m;let w=((h=(m=o.flip)==null?void 0:m.index)!=null?h:0)+1,N=E[w];if(N)return{data:{index:w,overflows:D},reset:{placement:N}};let _="bottom";switch(d){case"bestFit":{var S;let k=(S=D.map(F=>[F,F.overflows.filter(I=>I>0).reduce((I,j)=>I+j,0)]).sort((F,I)=>F[1]-I[1])[0])==null?void 0:S[0].placement;k&&(_=k);break}case"initialPlacement":_=a;break}if(i!==_)return{reset:{placement:_}}}return{}}}};function qe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qe(e){return un.some(t=>e[t]>=0)}var dn=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(i){let{rects:o}=i;switch(t){case"referenceHidden":{let r=await xt(i,{...n,elementContext:"reference"}),a=qe(r,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qe(a)}}}case"escaped":{let r=await xt(i,{...n,altBoundary:!0}),a=qe(r,o.floating);return{data:{escapedOffsets:a,escaped:Qe(a)}}}default:return{}}}}};function wi(e,t,n,i){i===void 0&&(i=!1);let o=et(e),r=bt(e),a=Dt(e)==="x",l=["left","top"].includes(o)?-1:1,s=i&&a?-1:1,c=typeof n=="function"?n({...t,placement:e}):n,{mainAxis:f,crossAxis:u,alignmentAxis:d}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return r&&typeof d=="number"&&(u=r==="end"?d*-1:d),a?{x:u*s,y:f*l}:{x:f*l,y:u*s}}var hn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:i,placement:o,rects:r,platform:a,elements:l}=t,s=wi(o,r,e,await(a.isRTL==null?void 0:a.isRTL(l.floating)));return{x:n+s.x,y:i+s.y,data:s}}}};function yi(e){return e==="x"?"y":"x"}var pn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...s}=e,c={x:n,y:i},f=await xt(t,s),u=Dt(et(o)),d=yi(u),p=c[u],g=c[d];if(r){let x=u==="y"?"top":"left",y=u==="y"?"bottom":"right",E=p+f[x],O=p-f[y];p=ye(E,p,O)}if(a){let x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",E=g+f[x],O=g-f[y];g=ye(E,g,O)}let v=l.fn({...t,[u]:p,[d]:g});return{...v,data:{x:v.x-n,y:v.y-i}}}}},gn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:i,platform:o,elements:r}=t,{apply:a,...l}=e,s=await xt(t,l),c=et(n),f=bt(n),u,d;c==="top"||c==="bottom"?(u=c,d=f===(await(o.isRTL==null?void 0:o.isRTL(r.floating))?"start":"end")?"left":"right"):(d=c,u=f==="end"?"top":"bottom");let p=dt(s.left,0),g=dt(s.right,0),v=dt(s.top,0),x=dt(s.bottom,0),y={height:i.floating.height-(["left","right"].includes(n)?2*(v!==0||x!==0?v+x:dt(s.top,s.bottom)):s[u]),width:i.floating.width-(["top","bottom"].includes(n)?2*(p!==0||g!==0?p+g:dt(s.left,s.right)):s[d])},E=await o.getDimensions(r.floating);a?.({...y,...i});let O=await o.getDimensions(r.floating);return E.width!==O.width||E.height!==O.height?{reset:{rects:!0}}:{}}}},mn=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;let{placement:i,elements:o,rects:r,platform:a,strategy:l}=t,{padding:s=2,x:c,y:f}=e,u=Ft(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:r.reference,offsetParent:await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),strategy:l}):r.reference),d=(n=await(a.getClientRects==null?void 0:a.getClientRects(o.reference)))!=null?n:[],p=De(s);function g(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&f!=null){var x;return(x=d.find(y=>c>y.left-p.left&&cy.top-p.top&&f=2){if(Dt(i)==="x"){let _=d[0],k=d[d.length-1],F=et(i)==="top",I=_.top,j=k.bottom,Y=F?_.left:k.left,U=F?_.right:k.right,K=U-Y,be=j-I;return{top:I,bottom:j,left:Y,right:U,width:K,height:be,x:Y,y:I}}let y=et(i)==="left",E=dt(...d.map(_=>_.right)),O=ln(...d.map(_=>_.left)),A=d.filter(_=>y?_.left===O:_.right===E),D=A[0].top,h=A[A.length-1].bottom,m=O,S=E,w=S-m,N=h-D;return{top:D,bottom:h,left:m,right:S,width:w,height:N,x:m,y:D}}return u}let v=await a.getElementRects({reference:{getBoundingClientRect:g},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};function vn(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function st(e){if(e==null)return window;if(!vn(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mt(e){return st(e).getComputedStyle(e)}function at(e){return vn(e)?"":e?(e.nodeName||"").toLowerCase():""}function nt(e){return e instanceof st(e).HTMLElement}function ht(e){return e instanceof st(e).Element}function Ei(e){return e instanceof st(e).Node}function Te(e){if(typeof ShadowRoot>"u")return!1;let t=st(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qt(e){let{overflow:t,overflowX:n,overflowY:i}=Mt(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function Si(e){return["table","td","th"].includes(at(e))}function bn(e){let t=navigator.userAgent.toLowerCase().includes("firefox"),n=Mt(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function wn(){return!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var Ze=Math.min,Rt=Math.max,Kt=Math.round;function lt(e,t,n){var i,o,r,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let l=e.getBoundingClientRect(),s=1,c=1;t&&nt(e)&&(s=e.offsetWidth>0&&Kt(l.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Kt(l.height)/e.offsetHeight||1);let f=ht(e)?st(e):window,u=!wn()&&n,d=(l.left+(u&&(i=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?i:0))/s,p=(l.top+(u&&(r=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?r:0))/c,g=l.width/s,v=l.height/c;return{width:g,height:v,top:p,right:d+g,bottom:p+v,left:d,x:d,y:p}}function pt(e){return((Ei(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zt(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function yn(e){return lt(pt(e)).left+Zt(e).scrollLeft}function xi(e){let t=lt(e);return Kt(t.width)!==e.offsetWidth||Kt(t.height)!==e.offsetHeight}function Di(e,t,n){let i=nt(t),o=pt(t),r=lt(e,i&&xi(t),n==="fixed"),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if(i||!i&&n!=="fixed")if((at(t)!=="body"||Qt(o))&&(a=Zt(t)),nt(t)){let s=lt(t,!0);l.x=s.x+t.clientLeft,l.y=s.y+t.clientTop}else o&&(l.x=yn(o));return{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function En(e){return at(e)==="html"?e:e.assignedSlot||e.parentNode||(Te(e)?e.host:null)||pt(e)}function Je(e){return!nt(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ci(e){let t=En(e);for(Te(t)&&(t=t.host);nt(t)&&!["html","body"].includes(at(t));){if(bn(t))return t;t=t.parentNode}return null}function Se(e){let t=st(e),n=Je(e);for(;n&&Si(n)&&getComputedStyle(n).position==="static";)n=Je(n);return n&&(at(n)==="html"||at(n)==="body"&&getComputedStyle(n).position==="static"&&!bn(n))?t:n||Ci(e)||t}function tn(e){if(nt(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=lt(e);return{width:t.width,height:t.height}}function Ti(e){let{rect:t,offsetParent:n,strategy:i}=e,o=nt(n),r=pt(n);if(n===r)return t;let a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if((o||!o&&i!=="fixed")&&((at(n)!=="body"||Qt(r))&&(a=Zt(n)),nt(n))){let s=lt(n,!0);l.x=s.x+n.clientLeft,l.y=s.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}}function Ai(e,t){let n=st(e),i=pt(e),o=n.visualViewport,r=i.clientWidth,a=i.clientHeight,l=0,s=0;if(o){r=o.width,a=o.height;let c=wn();(c||!c&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:r,height:a,x:l,y:s}}function _i(e){var t;let n=pt(e),i=Zt(e),o=(t=e.ownerDocument)==null?void 0:t.body,r=Rt(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Rt(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+yn(e),s=-i.scrollTop;return Mt(o||n).direction==="rtl"&&(l+=Rt(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:a,x:l,y:s}}function Sn(e){let t=En(e);return["html","body","#document"].includes(at(t))?e.ownerDocument.body:nt(t)&&Qt(t)?t:Sn(t)}function qt(e,t){var n;t===void 0&&(t=[]);let i=Sn(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),r=st(i),a=o?[r].concat(r.visualViewport||[],Qt(i)?i:[]):i,l=t.concat(a);return o?l:l.concat(qt(a))}function Oi(e,t){let n=t==null||t.getRootNode==null?void 0:t.getRootNode();if(e!=null&&e.contains(t))return!0;if(n&&Te(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function Ni(e,t){let n=lt(e,!1,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:i,left:o,x:o,y:i,right:o+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function en(e,t,n){return t==="viewport"?Ft(Ai(e,n)):ht(t)?Ni(t,n):Ft(_i(pt(e)))}function Pi(e){let t=qt(e),i=["absolute","fixed"].includes(Mt(e).position)&&nt(e)?Se(e):e;return ht(i)?t.filter(o=>ht(o)&&Oi(o,i)&&at(o)!=="body"):[]}function Ri(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e,a=[...n==="clippingAncestors"?Pi(t):[].concat(n),i],l=a[0],s=a.reduce((c,f)=>{let u=en(t,f,o);return c.top=Rt(u.top,c.top),c.right=Ze(u.right,c.right),c.bottom=Ze(u.bottom,c.bottom),c.left=Rt(u.left,c.left),c},en(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}var Ii={getClippingRect:Ri,convertOffsetParentRelativeRectToViewportRelativeRect:Ti,isElement:ht,getDimensions:tn,getOffsetParent:Se,getDocumentElement:pt,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:Di(t,Se(n),i),floating:{...tn(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Mt(e).direction==="rtl"};function nn(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:a=!0,animationFrame:l=!1}=i,s=!1,c=o&&!l,f=r&&!l,u=a&&!l,d=c||f?[...ht(e)?qt(e):[],...qt(t)]:[];d.forEach(y=>{c&&y.addEventListener("scroll",n,{passive:!0}),f&&y.addEventListener("resize",n)});let p=null;u&&(p=new ResizeObserver(n),ht(e)&&p.observe(e),p.observe(t));let g,v=l?lt(e):null;l&&x();function x(){if(s)return;let y=lt(e);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&n(),v=y,g=requestAnimationFrame(x)}return()=>{var y;s=!0,d.forEach(E=>{c&&E.removeEventListener("scroll",n),f&&E.removeEventListener("resize",n)}),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var rn=(e,t,n)=>di(e,t,{platform:Ii,...n}),Fi=e=>{let t={placement:"bottom",middleware:[]},n=Object.keys(e),i=o=>e[o];return n.includes("offset")&&t.middleware.push(hn(i("offset"))),n.includes("placement")&&(t.placement=i("placement")),n.includes("autoPlacement")&&!n.includes("flip")&&t.middleware.push(Ce(i("autoPlacement"))),n.includes("flip")&&t.middleware.push(fn(i("flip"))),n.includes("shift")&&t.middleware.push(pn(i("shift"))),n.includes("inline")&&t.middleware.push(mn(i("inline"))),n.includes("arrow")&&t.middleware.push(sn(i("arrow"))),n.includes("hide")&&t.middleware.push(dn(i("hide"))),n.includes("size")&&t.middleware.push(gn(i("size"))),t},Mi=(e,t)=>{let n={component:{trap:!1},float:{placement:"bottom",strategy:"absolute",middleware:[]}},i=o=>e[e.indexOf(o)+1];return e.includes("trap")&&(n.component.trap=!0),e.includes("teleport")&&(n.float.strategy="fixed"),e.includes("offset")&&n.float.middleware.push(hn(t.offset||10)),e.includes("placement")&&(n.float.placement=i("placement")),e.includes("autoPlacement")&&!e.includes("flip")&&n.float.middleware.push(Ce(t.autoPlacement)),e.includes("flip")&&n.float.middleware.push(fn(t.flip)),e.includes("shift")&&n.float.middleware.push(pn(t.shift)),e.includes("inline")&&n.float.middleware.push(mn(t.inline)),e.includes("arrow")&&n.float.middleware.push(sn(t.arrow)),e.includes("hide")&&n.float.middleware.push(dn(t.hide)),e.includes("size")&&n.float.middleware.push(gn(t.size)),n},ki=e=>{var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;i{(t===void 0||t.includes(n))&&(i.forEach(o=>o()),delete e._x_attributeCleanups[n])})}var Ae=new MutationObserver(xn),_e=!1;function ji(){Ae.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),_e=!0}function Xi(){Yi(),Ae.disconnect(),_e=!1}var It=[],we=!1;function Yi(){It=It.concat(Ae.takeRecords()),It.length&&!we&&(we=!0,queueMicrotask(()=>{Vi(),we=!1}))}function Vi(){xn(It),It.length=0}function on(e){if(!_e)return e();Xi();let t=e();return ji(),t}var $i=!1,an=[];function xn(e){if($i){an=an.concat(e);return}let t=[],n=[],i=new Map,o=new Map;for(let r=0;ra.nodeType===1&&t.push(a)),e[r].removedNodes.forEach(a=>a.nodeType===1&&n.push(a))),e[r].type==="attributes")){let a=e[r].target,l=e[r].attributeName,s=e[r].oldValue,c=()=>{i.has(a)||i.set(a,[]),i.get(a).push({name:l,value:a.getAttribute(l)})},f=()=>{o.has(a)||o.set(a,[]),o.get(a).push(l)};a.hasAttribute(l)&&s===null?c():a.hasAttribute(l)?(f(),c()):f()}o.forEach((r,a)=>{Wi(a,r)}),i.forEach((r,a)=>{Li.forEach(l=>l(a,r))});for(let r of n)if(!t.includes(r)&&(Bi.forEach(a=>a(r)),r._x_cleanups))for(;r._x_cleanups.length;)r._x_cleanups.pop()();t.forEach(r=>{r._x_ignoreSelf=!0,r._x_ignore=!0});for(let r of t)n.includes(r)||r.isConnected&&(delete r._x_ignoreSelf,delete r._x_ignore,Hi.forEach(a=>a(r)),r._x_ignore=!0,r._x_ignoreSelf=!0);t.forEach(r=>{delete r._x_ignoreSelf,delete r._x_ignore}),t=null,n=null,i=null,o=null}function Gi(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}function zi(e){let t={dismissable:!0,trap:!1};function n(r,a,l=null){if(a){if(a.hasAttribute("aria-expanded")||a.setAttribute("aria-expanded",!1),l.hasAttribute("id"))a.setAttribute("aria-controls",l.getAttribute("id"));else{let s=`panel-${ki(8)}`;a.setAttribute("aria-controls",s),l.setAttribute("id",s)}l.setAttribute("aria-modal",!0),l.setAttribute("role","dialog")}}let i=document.querySelectorAll('[\\@click^="$float"]'),o=document.querySelectorAll('[x-on\\:click^="$float"]');[...i,...o].forEach(r=>{let a=r.parentElement.closest("[x-data]"),l=a.querySelector('[x-ref="panel"]');n(a,r,l)}),e.magic("float",r=>(a={},l={})=>{let s={...t,...l},c=Object.keys(a).length>0?Fi(a):{middleware:[Ce()]},f=r,u=r.parentElement.closest("[x-data]"),d=u.querySelector('[x-ref="panel"]');function p(){return d.style.display=="block"}function g(){d.style.display="",f.setAttribute("aria-expanded",!1),s.trap&&d.setAttribute("x-trap",!1),nn(r,d,y)}function v(){d.style.display="block",f.setAttribute("aria-expanded",!0),s.trap&&d.setAttribute("x-trap",!0),y()}function x(){p()?g():v()}async function y(){return await rn(r,d,c).then(({middlewareData:E,placement:O,x:A,y:D})=>{if(E.arrow){let h=E.arrow?.x,m=E.arrow?.y,S=c.middleware.filter(N=>N.name=="arrow")[0].options.element,w={top:"bottom",right:"left",bottom:"top",left:"right"}[O.split("-")[0]];Object.assign(S.style,{left:h!=null?`${h}px`:"",top:m!=null?`${m}px`:"",right:"",bottom:"",[w]:"-4px"})}if(E.hide){let{referenceHidden:h}=E.hide;Object.assign(d.style,{visibility:h?"hidden":"visible"})}Object.assign(d.style,{left:`${A}px`,top:`${D}px`})})}s.dismissable&&(window.addEventListener("click",E=>{!u.contains(E.target)&&p()&&x()}),window.addEventListener("keydown",E=>{E.key==="Escape"&&p()&&x()},!0)),x()}),e.directive("float",(r,{modifiers:a,expression:l},{evaluate:s,effect:c})=>{let f=l?s(l):{},u=a.length>0?Mi(a,f):{},d=null;u.float.strategy=="fixed"&&(r.style.position="fixed");let p=w=>r.parentElement&&!r.parentElement.closest("[x-data]").contains(w.target)?r.close():null,g=w=>w.key==="Escape"?r.close():null,v=r.getAttribute("x-ref"),x=r.parentElement.closest("[x-data]"),y=x.querySelectorAll(`[\\@click^="$refs.${v}"]`),E=x.querySelectorAll(`[x-on\\:click^="$refs.${v}"]`);r.style.setProperty("display","none"),n(x,[...y,...E][0],r),r._x_isShown=!1,r.trigger=null,r._x_doHide||(r._x_doHide=()=>{on(()=>{r.style.setProperty("display","none",a.includes("important")?"important":void 0)})}),r._x_doShow||(r._x_doShow=()=>{on(()=>{r.style.setProperty("display","block",a.includes("important")?"important":void 0)})});let O=()=>{r._x_doHide(),r._x_isShown=!1},A=()=>{r._x_doShow(),r._x_isShown=!0},D=()=>setTimeout(A),h=Gi(w=>w?A():O(),w=>{typeof r._x_toggleAndCascadeWithTransitions=="function"?r._x_toggleAndCascadeWithTransitions(r,w,A,O):w?D():O()}),m,S=!0;c(()=>s(w=>{!S&&w===m||(a.includes("immediate")&&(w?D():O()),h(w),m=w,S=!1)})),r.open=async function(w){r.trigger=w.currentTarget?w.currentTarget:w,h(!0),r.trigger.setAttribute("aria-expanded",!0),u.component.trap&&r.setAttribute("x-trap",!0),d=nn(r.trigger,r,()=>{rn(r.trigger,r,u.float).then(({middlewareData:N,placement:_,x:k,y:F})=>{if(N.arrow){let I=N.arrow?.x,j=N.arrow?.y,Y=u.float.middleware.filter(K=>K.name=="arrow")[0].options.element,U={top:"bottom",right:"left",bottom:"top",left:"right"}[_.split("-")[0]];Object.assign(Y.style,{left:I!=null?`${I}px`:"",top:j!=null?`${j}px`:"",right:"",bottom:"",[U]:"-4px"})}if(N.hide){let{referenceHidden:I}=N.hide;Object.assign(r.style,{visibility:I?"hidden":"visible"})}Object.assign(r.style,{left:`${k}px`,top:`${F}px`})})}),window.addEventListener("click",p),window.addEventListener("keydown",g,!0)},r.close=function(){h(!1),r.trigger.setAttribute("aria-expanded",!1),u.component.trap&&r.setAttribute("x-trap",!1),d(),window.removeEventListener("click",p),window.removeEventListener("keydown",g,!1)},r.toggle=function(w){r._x_isShown?r.close():r.open(w)}})}var Dn=zi;var Tn=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Jt=Tn.join(","),An=typeof Element>"u",wt=An?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oe=!An&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},_n=function(t,n,i){var o=Array.prototype.slice.apply(t.querySelectorAll(Jt));return n&&wt.call(t,Jt)&&o.unshift(t),o=o.filter(i),o},On=function e(t,n,i){for(var o=[],r=Array.from(t);r.length;){var a=r.shift();if(a.tagName==="SLOT"){var l=a.assignedElements(),s=l.length?l:a.children,c=e(s,!0,i);i.flatten?o.push.apply(o,c):o.push({scope:a,candidates:c})}else{var f=wt.call(a,Jt);f&&i.filter(a)&&(n||!t.includes(a))&&o.push(a);var u=a.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(a),d=!i.shadowRootFilter||i.shadowRootFilter(a);if(u&&d){var p=e(u===!0?a.children:u.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scope:a,candidates:p})}else r.unshift.apply(r,a.children)}}return o},Nn=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},Ui=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Pn=function(t){return t.tagName==="INPUT"},Ki=function(t){return Pn(t)&&t.type==="hidden"},qi=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},Qi=function(t,n){for(var i=0;isummary:first-of-type"),a=r?t.parentElement:t;if(wt.call(a,"details:not([open]) *"))return!0;var l=Oe(t).host,s=l?.ownerDocument.contains(l)||t.ownerDocument.contains(t);if(!i||i==="full"){if(typeof o=="function"){for(var c=t;t;){var f=t.parentElement,u=Oe(t);if(f&&!f.shadowRoot&&o(f)===!0)return Cn(t);t.assignedSlot?t=t.assignedSlot:!f&&u!==t.ownerDocument?t=u.host:t=f}t=c}if(s)return!t.getClientRects().length}else if(i==="non-zero-area")return Cn(t);return!1},nr=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i=0)},rr=function e(t){var n=[],i=[];return t.forEach(function(o,r){var a=!!o.scope,l=a?o.scope:o,s=Nn(l,a),c=a?e(o.candidates):l;s===0?a?n.push.apply(n,c):n.push(l):i.push({documentOrder:r,tabIndex:s,item:o,isScope:a,content:c})}),i.sort(Ui).reduce(function(o,r){return r.isScope?o.push.apply(o,r.content):o.push(r.content),o},[]).concat(n)},Rn=function(t,n){n=n||{};var i;return n.getShadowRoot?i=On([t],n.includeContainer,{filter:Ne.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ir}):i=_n(t,n.includeContainer,Ne.bind(null,n)),rr(i)},ee=function(t,n){n=n||{};var i;return n.getShadowRoot?i=On([t],n.includeContainer,{filter:te.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):i=_n(t,n.includeContainer,te.bind(null,n)),i},kt=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wt.call(t,Jt)===!1?!1:Ne(n,t)},or=Tn.concat("iframe").join(","),Ct=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wt.call(t,or)===!1?!1:te(n,t)};function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Fn(e){for(var t=1;t0){var i=e[e.length-1];i!==n&&i.pause()}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(n){var i=e.indexOf(n);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}}}(),lr=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},sr=function(t){return t.key==="Escape"||t.key==="Esc"||t.keyCode===27},cr=function(t){return t.key==="Tab"||t.keyCode===9},kn=function(t){return setTimeout(t,0)},Ln=function(t,n){var i=-1;return t.every(function(o,r){return n(o)?(i=r,!1):!0}),i},Lt=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1?S-1:0),N=1;N=0)h=i.activeElement;else{var m=r.tabbableGroups[0],S=m&&m.firstTabbableNode;h=S||c("fallbackFocus")}if(!h)throw new Error("Your focus-trap needs to have at least one focusable element");return h},u=function(){if(r.containerGroups=r.containers.map(function(h){var m=Rn(h,o.tabbableOptions),S=ee(h,o.tabbableOptions);return{container:h,tabbableNodes:m,focusableNodes:S,firstTabbableNode:m.length>0?m[0]:null,lastTabbableNode:m.length>0?m[m.length-1]:null,nextTabbableNode:function(N){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=S.findIndex(function(F){return F===N});if(!(k<0))return _?S.slice(k+1).find(function(F){return kt(F,o.tabbableOptions)}):S.slice(0,k).reverse().find(function(F){return kt(F,o.tabbableOptions)})}}}),r.tabbableGroups=r.containerGroups.filter(function(h){return h.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function D(h){if(h!==!1&&h!==i.activeElement){if(!h||!h.focus){D(f());return}h.focus({preventScroll:!!o.preventScroll}),r.mostRecentlyFocusedNode=h,lr(h)&&h.select()}},p=function(h){var m=c("setReturnFocus",h);return m||(m===!1?!1:h)},g=function(h){var m=ne(h);if(!(s(m)>=0)){if(Lt(o.clickOutsideDeactivates,h)){a.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Ct(m,o.tabbableOptions)});return}Lt(o.allowOutsideClick,h)||h.preventDefault()}},v=function(h){var m=ne(h),S=s(m)>=0;S||m instanceof Document?S&&(r.mostRecentlyFocusedNode=m):(h.stopImmediatePropagation(),d(r.mostRecentlyFocusedNode||f()))},x=function(h){var m=ne(h);u();var S=null;if(r.tabbableGroups.length>0){var w=s(m),N=w>=0?r.containerGroups[w]:void 0;if(w<0)h.shiftKey?S=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:S=r.tabbableGroups[0].firstTabbableNode;else if(h.shiftKey){var _=Ln(r.tabbableGroups,function(U){var K=U.firstTabbableNode;return m===K});if(_<0&&(N.container===m||Ct(m,o.tabbableOptions)&&!kt(m,o.tabbableOptions)&&!N.nextTabbableNode(m,!1))&&(_=w),_>=0){var k=_===0?r.tabbableGroups.length-1:_-1,F=r.tabbableGroups[k];S=F.lastTabbableNode}}else{var I=Ln(r.tabbableGroups,function(U){var K=U.lastTabbableNode;return m===K});if(I<0&&(N.container===m||Ct(m,o.tabbableOptions)&&!kt(m,o.tabbableOptions)&&!N.nextTabbableNode(m))&&(I=w),I>=0){var j=I===r.tabbableGroups.length-1?0:I+1,Y=r.tabbableGroups[j];S=Y.firstTabbableNode}}}else S=c("fallbackFocus");S&&(h.preventDefault(),d(S))},y=function(h){if(sr(h)&&Lt(o.escapeDeactivates,h)!==!1){h.preventDefault(),a.deactivate();return}if(cr(h)){x(h);return}},E=function(h){var m=ne(h);s(m)>=0||Lt(o.clickOutsideDeactivates,h)||Lt(o.allowOutsideClick,h)||(h.preventDefault(),h.stopImmediatePropagation())},O=function(){if(r.active)return Mn.activateTrap(a),r.delayInitialFocusTimer=o.delayInitialFocus?kn(function(){d(f())}):d(f()),i.addEventListener("focusin",v,!0),i.addEventListener("mousedown",g,{capture:!0,passive:!1}),i.addEventListener("touchstart",g,{capture:!0,passive:!1}),i.addEventListener("click",E,{capture:!0,passive:!1}),i.addEventListener("keydown",y,{capture:!0,passive:!1}),a},A=function(){if(r.active)return i.removeEventListener("focusin",v,!0),i.removeEventListener("mousedown",g,!0),i.removeEventListener("touchstart",g,!0),i.removeEventListener("click",E,!0),i.removeEventListener("keydown",y,!0),a};return a={get active(){return r.active},get paused(){return r.paused},activate:function(h){if(r.active)return this;var m=l(h,"onActivate"),S=l(h,"onPostActivate"),w=l(h,"checkCanFocusTrap");w||u(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=i.activeElement,m&&m();var N=function(){w&&u(),O(),S&&S()};return w?(w(r.containers.concat()).then(N,N),this):(N(),this)},deactivate:function(h){if(!r.active)return this;var m=Fn({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},h);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,A(),r.active=!1,r.paused=!1,Mn.deactivateTrap(a);var S=l(m,"onDeactivate"),w=l(m,"onPostDeactivate"),N=l(m,"checkCanReturnFocus"),_=l(m,"returnFocus","returnFocusOnDeactivate");S&&S();var k=function(){kn(function(){_&&d(p(r.nodeFocusedBeforeActivation)),w&&w()})};return _&&N?(N(p(r.nodeFocusedBeforeActivation)).then(k,k),this):(k(),this)},pause:function(){return r.paused||!r.active?this:(r.paused=!0,A(),this)},unpause:function(){return!r.paused||!r.active?this:(r.paused=!1,u(),O(),this)},updateContainerElements:function(h){var m=[].concat(h).filter(Boolean);return r.containers=m.map(function(S){return typeof S=="string"?i.querySelector(S):S}),r.active&&u(),this}},a.updateContainerElements(t),a};function ur(e){let t,n;window.addEventListener("focusin",()=>{t=n,n=document.activeElement}),e.magic("focus",i=>{let o=i;return{__noscroll:!1,__wrapAround:!1,within(r){return o=r,this},withoutScrolling(){return this.__noscroll=!0,this},noscroll(){return this.__noscroll=!0,this},withWrapAround(){return this.__wrapAround=!0,this},wrap(){return this.withWrapAround()},focusable(r){return Ct(r)},previouslyFocused(){return t},lastFocused(){return t},focused(){return n},focusables(){return Array.isArray(o)?o:ee(o,{displayCheck:"none"})},all(){return this.focusables()},isFirst(r){let a=this.all();return a[0]&&a[0].isSameNode(r)},isLast(r){let a=this.all();return a.length&&a.slice(-1)[0].isSameNode(r)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let r=this.all(),a=document.activeElement;if(r.indexOf(a)!==-1)return this.__wrapAround&&r.indexOf(a)===r.length-1?r[0]:r[r.indexOf(a)+1]},getPrevious(){let r=this.all(),a=document.activeElement;if(r.indexOf(a)!==-1)return this.__wrapAround&&r.indexOf(a)===0?r.slice(-1)[0]:r[r.indexOf(a)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(r){r&&setTimeout(()=>{r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.focus({preventScroll:this._noscroll})})}}}),e.directive("trap",e.skipDuringClone((i,{expression:o,modifiers:r},{effect:a,evaluateLater:l,cleanup:s})=>{let c=l(o),f=!1,u={escapeDeactivates:!1,allowOutsideClick:!0,fallbackFocus:()=>i},d=i.querySelector("[autofocus]");d&&(u.initialFocus=d);let p=Bn(i,u),g=()=>{},v=()=>{},x=()=>{g(),g=()=>{},v(),v=()=>{},p.deactivate({returnFocus:!r.includes("noreturn")})};a(()=>c(y=>{f!==y&&(y&&!f&&setTimeout(()=>{r.includes("inert")&&(g=Hn(i)),r.includes("noscroll")&&(v=fr()),p.activate()}),!y&&f&&x(),f=!!y)})),s(x)},(i,{expression:o,modifiers:r},{evaluate:a})=>{r.includes("inert")&&a(o)&&Hn(i)}))}function Hn(e){let t=[];return Wn(e,n=>{let i=n.hasAttribute("aria-hidden");n.setAttribute("aria-hidden","true"),t.push(()=>i||n.removeAttribute("aria-hidden"))}),()=>{for(;t.length;)t.pop()()}}function Wn(e,t){e.isSameNode(document.body)||!e.parentNode||Array.from(e.parentNode.children).forEach(n=>{n.isSameNode(e)?Wn(e.parentNode,t):t(n)})}function fr(){let e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${n}px`,()=>{document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}var jn=ur;function Xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ot(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function pr(e,t){if(e==null)return{};var n=hr(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var gr="1.15.0";function ct(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ft=ct(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Gt=ct(/Edge/i),Yn=ct(/firefox/i),jt=ct(/safari/i)&&!ct(/chrome/i)&&!ct(/android/i),Qn=ct(/iP(ad|od|hone)/i),Zn=ct(/chrome/i)&&ct(/android/i),Jn={capture:!1,passive:!1};function M(e,t,n){e.addEventListener(t,n,!ft&&Jn)}function R(e,t,n){e.removeEventListener(t,n,!ft&&Jn)}function de(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function mr(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function it(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&de(e,t):de(e,t))||i&&e===n)return e;if(e===n)break}while(e=mr(e))}return null}var Vn=/\s+/g;function q(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Vn," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Vn," ")}}function C(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Nt(e,t){var n="";if(typeof e=="string")n=e;else do{var i=C(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function ti(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o=r:a=o<=r,!a)return i;if(i===rt())break;i=vt(i,!1)}return!1}function Pt(e,t,n,i){for(var o=0,r=0,a=e.children;r2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=pr(i,Dr);zt.pluginEvent.bind(T)(t,n,ot({dragEl:b,parentEl:H,ghostEl:P,rootEl:L,nextEl:St,lastDownEl:se,cloneEl:B,cloneHidden:mt,dragStarted:Bt,putSortable:V,activeSortable:T.active,originalEvent:o,oldIndex:Ot,oldDraggableIndex:Yt,newIndex:Q,newDraggableIndex:gt,hideGhostForTarget:li,unhideGhostForTarget:si,cloneNowHidden:function(){mt=!0},cloneNowShown:function(){mt=!1},dispatchSortableEvent:function(l){G({sortable:n,name:l,originalEvent:o})}},r))};function G(e){xr(ot({putSortable:V,cloneEl:B,targetEl:b,rootEl:L,oldIndex:Ot,oldDraggableIndex:Yt,newIndex:Q,newDraggableIndex:gt},e))}var b,H,P,L,St,se,B,mt,Ot,Q,Yt,gt,ie,V,_t=!1,he=!1,pe=[],yt,tt,Ie,Fe,zn,Un,Bt,At,Vt,$t=!1,re=!1,ce,$,Me=[],We=!1,ge=[],ve=typeof document<"u",oe=Qn,Kn=Gt||ft?"cssFloat":"float",Cr=ve&&!Zn&&!Qn&&"draggable"in document.createElement("div"),ri=function(){if(ve){if(ft)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),oi=function(t,n){var i=C(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Pt(t,0,n),a=Pt(t,1,n),l=r&&C(r),s=a&&C(a),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width,f=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+X(a).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=o&&i[Kn]==="none"||a&&i[Kn]==="none"&&c+f>o)?"vertical":"horizontal"},Tr=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,a=i?t.width:t.height,l=i?n.left:n.top,s=i?n.right:n.bottom,c=i?n.width:n.height;return o===l||r===s||o+a/2===l+c/2},Ar=function(t,n){var i;return pe.some(function(o){var r=o[Z].options.emptyInsertThreshold;if(!(!r||Ve(o))){var a=X(o),l=t>=a.left-r&&t<=a.right+r,s=n>=a.top-r&&n<=a.bottom+r;if(l&&s)return i=o}}),i},ai=function(t){function n(r,a){return function(l,s,c,f){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||u))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(l,s,c,f),a)(l,s,c,f);var d=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var i={},o=t.group;(!o||le(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},li=function(){!ri&&P&&C(P,"display","none")},si=function(){!ri&&P&&C(P,"display","")};ve&&!Zn&&document.addEventListener("click",function(e){if(he)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),he=!1,!1},!0);var Et=function(t){if(b){t=t.touches?t.touches[0]:t;var n=Ar(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Z]._onDragOver(i)}}},_r=function(t){b&&b.parentNode[Z]._isOutsideThisEl(t.target)};function T(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ut({},t),e[Z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return oi(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:T.supportPointer!==!1&&"PointerEvent"in window&&!jt,emptyInsertThreshold:5};zt.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);ai(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Cr,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?M(e,"pointerdown",this._onTapStart):(M(e,"mousedown",this._onTapStart),M(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(M(e,"dragover",this),M(e,"dragenter",this)),pe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ut(this,yr())}T.prototype={constructor:T,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(At=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,b):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,f=o.filter;if(kr(i),!b&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&jt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=it(s,o.draggable,i,!1),!(s&&s.animated)&&se!==s)){if(Ot=J(s),Yt=J(s,o.draggable),typeof f=="function"){if(f.call(this,t,s,this)){G({sortable:n,rootEl:c,name:"filter",targetEl:s,toEl:i,fromEl:i}),z("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(f&&(f=f.split(",").some(function(u){if(u=it(c,u.trim(),i,!1),u)return G({sortable:n,rootEl:u,name:"filter",targetEl:s,fromEl:i,toEl:i}),z("filter",n,{evt:t}),!0}),f)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!it(c,o.handle,i,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,a=o.options,l=r.ownerDocument,s;if(i&&!b&&i.parentNode===r){var c=X(i);if(L=r,b=i,H=b.parentNode,St=b.nextSibling,se=i,ie=a.group,T.dragged=b,yt={target:b,clientX:(n||t).clientX,clientY:(n||t).clientY},zn=yt.clientX-c.left,Un=yt.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,b.style["will-change"]="all",s=function(){if(z("delayEnded",o,{evt:t}),T.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Yn&&o.nativeDraggable&&(b.draggable=!0),o._triggerDragStart(t,n),G({sortable:o,name:"choose",originalEvent:t}),q(b,a.chosenClass,!0)},a.ignore.split(",").forEach(function(f){ti(b,f.trim(),ke)}),M(l,"dragover",Et),M(l,"mousemove",Et),M(l,"touchmove",Et),M(l,"mouseup",o._onDrop),M(l,"touchend",o._onDrop),M(l,"touchcancel",o._onDrop),Yn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,b.draggable=!0),z("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Gt||ft))){if(T.eventCanceled){this._onDrop();return}M(l,"mouseup",o._disableDelayedDrag),M(l,"touchend",o._disableDelayedDrag),M(l,"touchcancel",o._disableDelayedDrag),M(l,"mousemove",o._delayedDragTouchMoveHandler),M(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&M(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){b&&ke(b),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;R(t,"mouseup",this._disableDelayedDrag),R(t,"touchend",this._disableDelayedDrag),R(t,"touchcancel",this._disableDelayedDrag),R(t,"mousemove",this._delayedDragTouchMoveHandler),R(t,"touchmove",this._delayedDragTouchMoveHandler),R(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?M(document,"pointermove",this._onTouchMove):n?M(document,"touchmove",this._onTouchMove):M(document,"mousemove",this._onTouchMove):(M(b,"dragend",this),M(L,"dragstart",this._onDragStart));try{document.selection?ue(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(_t=!1,L&&b){z("dragStarted",this,{evt:n}),this.nativeDraggable&&M(document,"dragover",_r);var i=this.options;!t&&q(b,i.dragClass,!1),q(b,i.ghostClass,!0),T.active=this,t&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(tt){this._lastX=tt.clientX,this._lastY=tt.clientY,li();for(var t=document.elementFromPoint(tt.clientX,tt.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(tt.clientX,tt.clientY),t!==n);)n=t;if(b.parentNode[Z]._isOutsideThisEl(t),n)do{if(n[Z]){var i=void 0;if(i=n[Z]._onDragOver({clientX:tt.clientX,clientY:tt.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);si()}},_onTouchMove:function(t){if(yt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=P&&Nt(P,!0),l=P&&a&&a.a,s=P&&a&&a.d,c=oe&&$&&Gn($),f=(r.clientX-yt.clientX+o.x)/(l||1)+(c?c[0]-Me[0]:0)/(l||1),u=(r.clientY-yt.clientY+o.y)/(s||1)+(c?c[1]-Me[1]:0)/(s||1);if(!T.active&&!_t){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(G({rootEl:H,name:"add",toEl:H,fromEl:L,originalEvent:t}),G({sortable:this,name:"remove",toEl:H,originalEvent:t}),G({rootEl:H,name:"sort",toEl:H,fromEl:L,originalEvent:t}),G({sortable:this,name:"sort",toEl:H,originalEvent:t})),V&&V.save()):Q!==Ot&&Q>=0&&(G({sortable:this,name:"update",toEl:H,originalEvent:t}),G({sortable:this,name:"sort",toEl:H,originalEvent:t})),T.active&&((Q==null||Q===-1)&&(Q=Ot,gt=Yt),G({sortable:this,name:"end",toEl:H,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){z("nulling",this),L=b=H=P=St=B=se=mt=yt=tt=Bt=Q=gt=Ot=Yt=At=Vt=V=ie=T.dragged=T.ghost=T.clone=T.active=null,ge.forEach(function(t){t.checked=!0}),ge.length=Ie=Fe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":b&&(this._onDragOver(t),Or(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,a=this.options;oi.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function Ir(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,c=i?n.height:n.width,f=i?n.top:n.left,u=i?n.bottom:n.right,d=!1;if(!a){if(l&&cef+c*r/2:su-ce)return-Vt}else if(s>f+c*(1-o)/2&&su-c*r/2)?s>f+c/2?1:-1:0}function Fr(e){return J(b){e.directive("sortable",t=>{t.sortable=ze.create(t,{draggable:"[x-sortable-item]",handle:"[x-sortable-handle]",dataIdAttr:"x-sortable-item"})})};document.addEventListener("alpine:init",()=>{window.Alpine.plugin(jn),window.Alpine.plugin(ui),window.Alpine.plugin(Dn)});var Br=function(e,t,n){function i(f,u){for(let d of f){let p=o(d,u);if(p!==null)return p}}function o(f,u){let d=f.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s);if(d===null||d.length!==3)return null;let p=d[1],g=d[2];if(p.includes(",")){let[v,x]=p.split(",",2);if(x==="*"&&u>=v)return g;if(v==="*"&&u<=x)return g;if(u>=v&&u<=x)return g}return p==u?g:null}function r(f){return f.toString().charAt(0).toUpperCase()+f.toString().slice(1)}function a(f,u){if(u.length===0)return f;let d={};for(let[p,g]of Object.entries(u))d[":"+r(p??"")]=r(g??""),d[":"+p.toUpperCase()]=g.toString().toUpperCase(),d[":"+p]=g;return Object.entries(d).forEach(([p,g])=>{f=f.replaceAll(p,g)}),f}function l(f){return f.map(u=>u.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}let s=e.split("|"),c=i(s,t);return c!=null?a(c.trim(),n):(s=l(s),a(s.length>1&&t>1?s[1]:s[0],n))};window.pluralize=Br;})(); +(()=>{function et(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function Dt(e){return["top","bottom"].includes(et(e))?"x":"y"}function xe(e){return e==="y"?"height":"width"}function Ke(e,t,n){let{reference:i,floating:o}=e,r=i.x+i.width/2-o.width/2,a=i.y+i.height/2-o.height/2,l=Dt(t),s=xe(l),c=i[s]/2-o[s]/2,f=et(t),u=l==="x",d;switch(f){case"top":d={x:r,y:i.y-o.height};break;case"bottom":d={x:r,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:a};break;case"left":d={x:i.x-o.width,y:a};break;default:d={x:i.x,y:i.y}}switch(bt(t)){case"start":d[l]-=c*(n&&u?-1:1);break;case"end":d[l]+=c*(n&&u?-1:1);break}return d}var hi=async(e,t,n)=>{let{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:a}=n,l=await(a.isRTL==null?void 0:a.isRTL(t));if(a==null&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),r.filter(g=>{let{name:v}=g;return v==="autoPlacement"||v==="flip"}).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`","middleware detected. This will lead to an infinite loop. Ensure only","one of either has been passed to the `middleware` array."].join(" "));let s=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Ke(s,i,l),u=i,d={},p=0;for(let g=0;g100)throw new Error(["Floating UI: The middleware lifecycle appears to be","running in an infinite loop. This is usually caused by a `reset`","continually being returned without a break condition."].join(" "));let{name:v,fn:x}=r[g],{x:y,y:E,data:O,reset:A}=await x({x:c,y:f,initialPlacement:i,placement:u,strategy:o,middlewareData:d,rects:s,platform:a,elements:{reference:e,floating:t}});if(c=y??c,f=E??f,d={...d,[v]:{...d[v],...O}},A){typeof A=="object"&&(A.placement&&(u=A.placement),A.rects&&(s=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:c,y:f}=Ke(s,u,l)),g=-1;continue}}return{x:c,y:f,placement:u,strategy:o,middlewareData:d}};function pi(e){return{top:0,right:0,bottom:0,left:0,...e}}function De(e){return typeof e!="number"?pi(e):{top:e,right:e,bottom:e,left:e}}function Ft(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xt(e,t){var n;t===void 0&&(t={});let{x:i,y:o,platform:r,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=t,g=De(p),x=l[d?u==="floating"?"reference":"floating":u],y=Ft(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(x)))==null||n?x:x.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:s})),E=Ft(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u==="floating"?{...a.floating,x:i,y:o}:a.reference,offsetParent:await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),strategy:s}):a[u]);return{top:y.top-E.top+g.top,bottom:E.bottom-y.bottom+g.bottom,left:y.left-E.left+g.left,right:E.right-y.right+g.right}}var ln=Math.min,dt=Math.max;function ye(e,t,n){return dt(e,ln(t,n))}var sn=e=>({name:"arrow",options:e,async fn(t){let{element:n,padding:i=0}=e??{},{x:o,y:r,placement:a,rects:l,platform:s}=t;if(n==null)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};let c=De(i),f={x:o,y:r},u=Dt(a),d=xe(u),p=await s.getDimensions(n),g=u==="y"?"top":"left",v=u==="y"?"bottom":"right",x=l.reference[d]+l.reference[u]-f[u]-l.floating[d],y=f[u]-l.reference[u],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(n)),O=E?u==="y"?E.clientHeight||0:E.clientWidth||0:0,A=x/2-y/2,D=c[g],h=O-p[d]-c[v],m=O/2-p[d]/2+A,S=ye(D,m,h);return{data:{[u]:S,centerOffset:m-S}}}}),gi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(e){return e.replace(/left|right|bottom|top/g,t=>gi[t])}function cn(e,t,n){n===void 0&&(n=!1);let i=bt(e),o=Dt(e),r=xe(o),a=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=Ut(a)),{main:a,cross:Ut(a)}}var mi={start:"end",end:"start"};function Ee(e){return e.replace(/start|end/g,t=>mi[t])}var un=["top","right","bottom","left"],vi=un.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function bi(e,t,n){return(e?[...n.filter(o=>bt(o)===e),...n.filter(o=>bt(o)!==e)]:n.filter(o=>et(o)===o)).filter(o=>e?bt(o)===e||(t?Ee(o)!==o:!1):!0)}var Ce=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,o,r,a;let{x:l,y:s,rects:c,middlewareData:f,placement:u,platform:d,elements:p}=t,{alignment:g=null,allowedPlacements:v=vi,autoAlignment:x=!0,...y}=e,E=bi(g,x,v),O=await xt(t,y),A=(n=(i=f.autoPlacement)==null?void 0:i.index)!=null?n:0,D=E[A];if(D==null)return{};let{main:h,cross:m}=cn(D,c,await(d.isRTL==null?void 0:d.isRTL(p.floating)));if(u!==D)return{x:l,y:s,reset:{placement:E[0]}};let S=[O[et(D)],O[h],O[m]],w=[...(o=(r=f.autoPlacement)==null?void 0:r.overflows)!=null?o:[],{placement:D,overflows:S}],N=E[A+1];if(N)return{data:{index:A+1,overflows:w},reset:{placement:N}};let _=w.slice().sort((I,W)=>I.overflows[0]-W.overflows[0]),M=(a=_.find(I=>{let{overflows:W}=I;return W.every(Y=>Y<=0)}))==null?void 0:a.placement,F=M??_[0].placement;return F!==u?{data:{index:A+1,overflows:w},reset:{placement:F}}:{}}}};function wi(e){let t=Ut(e);return[Ee(e),t,Ee(t)]}var fn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;let{placement:i,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...g}=e,v=et(i),y=u||(v===a||!p?[Ut(a)]:wi(a)),E=[a,...y],O=await xt(t,g),A=[],D=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&A.push(O[v]),f){let{main:w,cross:N}=cn(i,r,await(l.isRTL==null?void 0:l.isRTL(s.floating)));A.push(O[w],O[N])}if(D=[...D,{placement:i,overflows:A}],!A.every(w=>w<=0)){var h,m;let w=((h=(m=o.flip)==null?void 0:m.index)!=null?h:0)+1,N=E[w];if(N)return{data:{index:w,overflows:D},reset:{placement:N}};let _="bottom";switch(d){case"bestFit":{var S;let M=(S=D.map(F=>[F,F.overflows.filter(I=>I>0).reduce((I,W)=>I+W,0)]).sort((F,I)=>F[1]-I[1])[0])==null?void 0:S[0].placement;M&&(_=M);break}case"initialPlacement":_=a;break}if(i!==_)return{reset:{placement:_}}}return{}}}};function qe(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qe(e){return un.some(t=>e[t]>=0)}var dn=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(i){let{rects:o}=i;switch(t){case"referenceHidden":{let r=await xt(i,{...n,elementContext:"reference"}),a=qe(r,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Qe(a)}}}case"escaped":{let r=await xt(i,{...n,altBoundary:!0}),a=qe(r,o.floating);return{data:{escapedOffsets:a,escaped:Qe(a)}}}default:return{}}}}};function yi(e,t,n,i){i===void 0&&(i=!1);let o=et(e),r=bt(e),a=Dt(e)==="x",l=["left","top"].includes(o)?-1:1,s=i&&a?-1:1,c=typeof n=="function"?n({...t,placement:e}):n,{mainAxis:f,crossAxis:u,alignmentAxis:d}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return r&&typeof d=="number"&&(u=r==="end"?d*-1:d),a?{x:u*s,y:f*l}:{x:f*l,y:u*s}}var hn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:n,y:i,placement:o,rects:r,platform:a,elements:l}=t,s=yi(o,r,e,await(a.isRTL==null?void 0:a.isRTL(l.floating)));return{x:n+s.x,y:i+s.y,data:s}}}};function Ei(e){return e==="x"?"y":"x"}var pn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:x=>{let{x:y,y:E}=x;return{x:y,y:E}}},...s}=e,c={x:n,y:i},f=await xt(t,s),u=Dt(et(o)),d=Ei(u),p=c[u],g=c[d];if(r){let x=u==="y"?"top":"left",y=u==="y"?"bottom":"right",E=p+f[x],O=p-f[y];p=ye(E,p,O)}if(a){let x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",E=g+f[x],O=g-f[y];g=ye(E,g,O)}let v=l.fn({...t,[u]:p,[d]:g});return{...v,data:{x:v.x-n,y:v.y-i}}}}},gn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:n,rects:i,platform:o,elements:r}=t,{apply:a,...l}=e,s=await xt(t,l),c=et(n),f=bt(n),u,d;c==="top"||c==="bottom"?(u=c,d=f===(await(o.isRTL==null?void 0:o.isRTL(r.floating))?"start":"end")?"left":"right"):(d=c,u=f==="end"?"top":"bottom");let p=dt(s.left,0),g=dt(s.right,0),v=dt(s.top,0),x=dt(s.bottom,0),y={height:i.floating.height-(["left","right"].includes(n)?2*(v!==0||x!==0?v+x:dt(s.top,s.bottom)):s[u]),width:i.floating.width-(["top","bottom"].includes(n)?2*(p!==0||g!==0?p+g:dt(s.left,s.right)):s[d])},E=await o.getDimensions(r.floating);a?.({...y,...i});let O=await o.getDimensions(r.floating);return E.width!==O.width||E.height!==O.height?{reset:{rects:!0}}:{}}}},mn=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){var n;let{placement:i,elements:o,rects:r,platform:a,strategy:l}=t,{padding:s=2,x:c,y:f}=e,u=Ft(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:r.reference,offsetParent:await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),strategy:l}):r.reference),d=(n=await(a.getClientRects==null?void 0:a.getClientRects(o.reference)))!=null?n:[],p=De(s);function g(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&f!=null){var x;return(x=d.find(y=>c>y.left-p.left&&cy.top-p.top&&f=2){if(Dt(i)==="x"){let _=d[0],M=d[d.length-1],F=et(i)==="top",I=_.top,W=M.bottom,Y=F?_.left:M.left,U=F?_.right:M.right,K=U-Y,be=W-I;return{top:I,bottom:W,left:Y,right:U,width:K,height:be,x:Y,y:I}}let y=et(i)==="left",E=dt(...d.map(_=>_.right)),O=ln(...d.map(_=>_.left)),A=d.filter(_=>y?_.left===O:_.right===E),D=A[0].top,h=A[A.length-1].bottom,m=O,S=E,w=S-m,N=h-D;return{top:D,bottom:h,left:m,right:S,width:w,height:N,x:m,y:D}}return u}let v=await a.getElementRects({reference:{getBoundingClientRect:g},floating:o.floating,strategy:l});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};function vn(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function st(e){if(e==null)return window;if(!vn(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function kt(e){return st(e).getComputedStyle(e)}function at(e){return vn(e)?"":e?(e.nodeName||"").toLowerCase():""}function nt(e){return e instanceof st(e).HTMLElement}function ht(e){return e instanceof st(e).Element}function Si(e){return e instanceof st(e).Node}function Te(e){if(typeof ShadowRoot>"u")return!1;let t=st(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Qt(e){let{overflow:t,overflowX:n,overflowY:i}=kt(e);return/auto|scroll|overlay|hidden/.test(t+i+n)}function xi(e){return["table","td","th"].includes(at(e))}function bn(e){let t=navigator.userAgent.toLowerCase().includes("firefox"),n=kt(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function wn(){return!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var Ze=Math.min,Rt=Math.max,Kt=Math.round;function lt(e,t,n){var i,o,r,a;t===void 0&&(t=!1),n===void 0&&(n=!1);let l=e.getBoundingClientRect(),s=1,c=1;t&&nt(e)&&(s=e.offsetWidth>0&&Kt(l.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Kt(l.height)/e.offsetHeight||1);let f=ht(e)?st(e):window,u=!wn()&&n,d=(l.left+(u&&(i=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?i:0))/s,p=(l.top+(u&&(r=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?r:0))/c,g=l.width/s,v=l.height/c;return{width:g,height:v,top:p,right:d+g,bottom:p+v,left:d,x:d,y:p}}function pt(e){return((Si(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zt(e){return ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function yn(e){return lt(pt(e)).left+Zt(e).scrollLeft}function Di(e){let t=lt(e);return Kt(t.width)!==e.offsetWidth||Kt(t.height)!==e.offsetHeight}function Ci(e,t,n){let i=nt(t),o=pt(t),r=lt(e,i&&Di(t),n==="fixed"),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if(i||!i&&n!=="fixed")if((at(t)!=="body"||Qt(o))&&(a=Zt(t)),nt(t)){let s=lt(t,!0);l.x=s.x+t.clientLeft,l.y=s.y+t.clientTop}else o&&(l.x=yn(o));return{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function En(e){return at(e)==="html"?e:e.assignedSlot||e.parentNode||(Te(e)?e.host:null)||pt(e)}function Je(e){return!nt(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ti(e){let t=En(e);for(Te(t)&&(t=t.host);nt(t)&&!["html","body"].includes(at(t));){if(bn(t))return t;t=t.parentNode}return null}function Se(e){let t=st(e),n=Je(e);for(;n&&xi(n)&&getComputedStyle(n).position==="static";)n=Je(n);return n&&(at(n)==="html"||at(n)==="body"&&getComputedStyle(n).position==="static"&&!bn(n))?t:n||Ti(e)||t}function tn(e){if(nt(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=lt(e);return{width:t.width,height:t.height}}function Ai(e){let{rect:t,offsetParent:n,strategy:i}=e,o=nt(n),r=pt(n);if(n===r)return t;let a={scrollLeft:0,scrollTop:0},l={x:0,y:0};if((o||!o&&i!=="fixed")&&((at(n)!=="body"||Qt(r))&&(a=Zt(n)),nt(n))){let s=lt(n,!0);l.x=s.x+n.clientLeft,l.y=s.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+l.x,y:t.y-a.scrollTop+l.y}}function _i(e,t){let n=st(e),i=pt(e),o=n.visualViewport,r=i.clientWidth,a=i.clientHeight,l=0,s=0;if(o){r=o.width,a=o.height;let c=wn();(c||!c&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:r,height:a,x:l,y:s}}function Oi(e){var t;let n=pt(e),i=Zt(e),o=(t=e.ownerDocument)==null?void 0:t.body,r=Rt(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Rt(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-i.scrollLeft+yn(e),s=-i.scrollTop;return kt(o||n).direction==="rtl"&&(l+=Rt(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:a,x:l,y:s}}function Sn(e){let t=En(e);return["html","body","#document"].includes(at(t))?e.ownerDocument.body:nt(t)&&Qt(t)?t:Sn(t)}function qt(e,t){var n;t===void 0&&(t=[]);let i=Sn(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),r=st(i),a=o?[r].concat(r.visualViewport||[],Qt(i)?i:[]):i,l=t.concat(a);return o?l:l.concat(qt(a))}function Ni(e,t){let n=t==null||t.getRootNode==null?void 0:t.getRootNode();if(e!=null&&e.contains(t))return!0;if(n&&Te(n)){let i=t;do{if(i&&e===i)return!0;i=i.parentNode||i.host}while(i)}return!1}function Pi(e,t){let n=lt(e,!1,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:i,left:o,x:o,y:i,right:o+e.clientWidth,bottom:i+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function en(e,t,n){return t==="viewport"?Ft(_i(e,n)):ht(t)?Pi(t,n):Ft(Oi(pt(e)))}function Ri(e){let t=qt(e),i=["absolute","fixed"].includes(kt(e).position)&&nt(e)?Se(e):e;return ht(i)?t.filter(o=>ht(o)&&Ni(o,i)&&at(o)!=="body"):[]}function Ii(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e,a=[...n==="clippingAncestors"?Ri(t):[].concat(n),i],l=a[0],s=a.reduce((c,f)=>{let u=en(t,f,o);return c.top=Rt(u.top,c.top),c.right=Ze(u.right,c.right),c.bottom=Ze(u.bottom,c.bottom),c.left=Rt(u.left,c.left),c},en(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}var Fi={getClippingRect:Ii,convertOffsetParentRelativeRectToViewportRelativeRect:Ai,isElement:ht,getDimensions:tn,getOffsetParent:Se,getDocumentElement:pt,getElementRects:e=>{let{reference:t,floating:n,strategy:i}=e;return{reference:Ci(t,Se(n),i),floating:{...tn(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>kt(e).direction==="rtl"};function nn(e,t,n,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:a=!0,animationFrame:l=!1}=i,s=!1,c=o&&!l,f=r&&!l,u=a&&!l,d=c||f?[...ht(e)?qt(e):[],...qt(t)]:[];d.forEach(y=>{c&&y.addEventListener("scroll",n,{passive:!0}),f&&y.addEventListener("resize",n)});let p=null;u&&(p=new ResizeObserver(n),ht(e)&&p.observe(e),p.observe(t));let g,v=l?lt(e):null;l&&x();function x(){if(s)return;let y=lt(e);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&n(),v=y,g=requestAnimationFrame(x)}return()=>{var y;s=!0,d.forEach(E=>{c&&E.removeEventListener("scroll",n),f&&E.removeEventListener("resize",n)}),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var rn=(e,t,n)=>hi(e,t,{platform:Fi,...n}),ki=e=>{let t={placement:"bottom",middleware:[]},n=Object.keys(e),i=o=>e[o];return n.includes("offset")&&t.middleware.push(hn(i("offset"))),n.includes("placement")&&(t.placement=i("placement")),n.includes("autoPlacement")&&!n.includes("flip")&&t.middleware.push(Ce(i("autoPlacement"))),n.includes("flip")&&t.middleware.push(fn(i("flip"))),n.includes("shift")&&t.middleware.push(pn(i("shift"))),n.includes("inline")&&t.middleware.push(mn(i("inline"))),n.includes("arrow")&&t.middleware.push(sn(i("arrow"))),n.includes("hide")&&t.middleware.push(dn(i("hide"))),n.includes("size")&&t.middleware.push(gn(i("size"))),t},Mi=(e,t)=>{let n={component:{trap:!1},float:{placement:"bottom",strategy:"absolute",middleware:[]}},i=o=>e[e.indexOf(o)+1];return e.includes("trap")&&(n.component.trap=!0),e.includes("teleport")&&(n.float.strategy="fixed"),e.includes("offset")&&n.float.middleware.push(hn(t.offset||10)),e.includes("placement")&&(n.float.placement=i("placement")),e.includes("autoPlacement")&&!e.includes("flip")&&n.float.middleware.push(Ce(t.autoPlacement)),e.includes("flip")&&n.float.middleware.push(fn(t.flip)),e.includes("shift")&&n.float.middleware.push(pn(t.shift)),e.includes("inline")&&n.float.middleware.push(mn(t.inline)),e.includes("arrow")&&n.float.middleware.push(sn(t.arrow)),e.includes("hide")&&n.float.middleware.push(dn(t.hide)),e.includes("size")&&n.float.middleware.push(gn(t.size)),n},Li=e=>{var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;i{(t===void 0||t.includes(n))&&(i.forEach(o=>o()),delete e._x_attributeCleanups[n])})}var Ae=new MutationObserver(xn),_e=!1;function Xi(){Ae.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),_e=!0}function Yi(){$i(),Ae.disconnect(),_e=!1}var It=[],we=!1;function $i(){It=It.concat(Ae.takeRecords()),It.length&&!we&&(we=!0,queueMicrotask(()=>{zi(),we=!1}))}function zi(){xn(It),It.length=0}function on(e){if(!_e)return e();Yi();let t=e();return Xi(),t}var Vi=!1,an=[];function xn(e){if(Vi){an=an.concat(e);return}let t=[],n=[],i=new Map,o=new Map;for(let r=0;ra.nodeType===1&&t.push(a)),e[r].removedNodes.forEach(a=>a.nodeType===1&&n.push(a))),e[r].type==="attributes")){let a=e[r].target,l=e[r].attributeName,s=e[r].oldValue,c=()=>{i.has(a)||i.set(a,[]),i.get(a).push({name:l,value:a.getAttribute(l)})},f=()=>{o.has(a)||o.set(a,[]),o.get(a).push(l)};a.hasAttribute(l)&&s===null?c():a.hasAttribute(l)?(f(),c()):f()}o.forEach((r,a)=>{Wi(a,r)}),i.forEach((r,a)=>{Bi.forEach(l=>l(a,r))});for(let r of n)if(!t.includes(r)&&(Hi.forEach(a=>a(r)),r._x_cleanups))for(;r._x_cleanups.length;)r._x_cleanups.pop()();t.forEach(r=>{r._x_ignoreSelf=!0,r._x_ignore=!0});for(let r of t)n.includes(r)||r.isConnected&&(delete r._x_ignoreSelf,delete r._x_ignore,ji.forEach(a=>a(r)),r._x_ignore=!0,r._x_ignoreSelf=!0);t.forEach(r=>{delete r._x_ignoreSelf,delete r._x_ignore}),t=null,n=null,i=null,o=null}function Gi(e,t=()=>{}){let n=!1;return function(){n?t.apply(this,arguments):(n=!0,e.apply(this,arguments))}}function Ui(e){let t={dismissable:!0,trap:!1};function n(r,a,l=null){if(a){if(a.hasAttribute("aria-expanded")||a.setAttribute("aria-expanded",!1),l.hasAttribute("id"))a.setAttribute("aria-controls",l.getAttribute("id"));else{let s=`panel-${Li(8)}`;a.setAttribute("aria-controls",s),l.setAttribute("id",s)}l.setAttribute("aria-modal",!0),l.setAttribute("role","dialog")}}let i=document.querySelectorAll('[\\@click^="$float"]'),o=document.querySelectorAll('[x-on\\:click^="$float"]');[...i,...o].forEach(r=>{let a=r.parentElement.closest("[x-data]"),l=a.querySelector('[x-ref="panel"]');n(a,r,l)}),e.magic("float",r=>(a={},l={})=>{let s={...t,...l},c=Object.keys(a).length>0?ki(a):{middleware:[Ce()]},f=r,u=r.parentElement.closest("[x-data]"),d=u.querySelector('[x-ref="panel"]');function p(){return d.style.display=="block"}function g(){d.style.display="",f.setAttribute("aria-expanded",!1),s.trap&&d.setAttribute("x-trap",!1),nn(r,d,y)}function v(){d.style.display="block",f.setAttribute("aria-expanded",!0),s.trap&&d.setAttribute("x-trap",!0),y()}function x(){p()?g():v()}async function y(){return await rn(r,d,c).then(({middlewareData:E,placement:O,x:A,y:D})=>{if(E.arrow){let h=E.arrow?.x,m=E.arrow?.y,S=c.middleware.filter(N=>N.name=="arrow")[0].options.element,w={top:"bottom",right:"left",bottom:"top",left:"right"}[O.split("-")[0]];Object.assign(S.style,{left:h!=null?`${h}px`:"",top:m!=null?`${m}px`:"",right:"",bottom:"",[w]:"-4px"})}if(E.hide){let{referenceHidden:h}=E.hide;Object.assign(d.style,{visibility:h?"hidden":"visible"})}Object.assign(d.style,{left:`${A}px`,top:`${D}px`})})}s.dismissable&&(window.addEventListener("click",E=>{!u.contains(E.target)&&p()&&x()}),window.addEventListener("keydown",E=>{E.key==="Escape"&&p()&&x()},!0)),x()}),e.directive("float",(r,{modifiers:a,expression:l},{evaluate:s,effect:c})=>{let f=l?s(l):{},u=a.length>0?Mi(a,f):{},d=null;u.float.strategy=="fixed"&&(r.style.position="fixed");let p=w=>r.parentElement&&!r.parentElement.closest("[x-data]").contains(w.target)?r.close():null,g=w=>w.key==="Escape"?r.close():null,v=r.getAttribute("x-ref"),x=r.parentElement.closest("[x-data]"),y=x.querySelectorAll(`[\\@click^="$refs.${v}"]`),E=x.querySelectorAll(`[x-on\\:click^="$refs.${v}"]`);r.style.setProperty("display","none"),n(x,[...y,...E][0],r),r._x_isShown=!1,r.trigger=null,r._x_doHide||(r._x_doHide=()=>{on(()=>{r.style.setProperty("display","none",a.includes("important")?"important":void 0)})}),r._x_doShow||(r._x_doShow=()=>{on(()=>{r.style.setProperty("display","block",a.includes("important")?"important":void 0)})});let O=()=>{r._x_doHide(),r._x_isShown=!1},A=()=>{r._x_doShow(),r._x_isShown=!0},D=()=>setTimeout(A),h=Gi(w=>w?A():O(),w=>{typeof r._x_toggleAndCascadeWithTransitions=="function"?r._x_toggleAndCascadeWithTransitions(r,w,A,O):w?D():O()}),m,S=!0;c(()=>s(w=>{!S&&w===m||(a.includes("immediate")&&(w?D():O()),h(w),m=w,S=!1)})),r.open=async function(w){r.trigger=w.currentTarget?w.currentTarget:w,h(!0),r.trigger.setAttribute("aria-expanded",!0),u.component.trap&&r.setAttribute("x-trap",!0),d=nn(r.trigger,r,()=>{rn(r.trigger,r,u.float).then(({middlewareData:N,placement:_,x:M,y:F})=>{if(N.arrow){let I=N.arrow?.x,W=N.arrow?.y,Y=u.float.middleware.filter(K=>K.name=="arrow")[0].options.element,U={top:"bottom",right:"left",bottom:"top",left:"right"}[_.split("-")[0]];Object.assign(Y.style,{left:I!=null?`${I}px`:"",top:W!=null?`${W}px`:"",right:"",bottom:"",[U]:"-4px"})}if(N.hide){let{referenceHidden:I}=N.hide;Object.assign(r.style,{visibility:I?"hidden":"visible"})}Object.assign(r.style,{left:`${M}px`,top:`${F}px`})})}),window.addEventListener("click",p),window.addEventListener("keydown",g,!0)},r.close=function(){h(!1),r.trigger.setAttribute("aria-expanded",!1),u.component.trap&&r.setAttribute("x-trap",!1),d(),window.removeEventListener("click",p),window.removeEventListener("keydown",g,!1)},r.toggle=function(w){r._x_isShown?r.close():r.open(w)}})}var Dn=Ui;function Ki(e){e.directive("load-css",(t,{expression:n},{evaluate:i})=>{try{i(n)?.forEach(r=>{if(document.querySelector(`link[href="${r}"]`))return;let a=document.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=r;let l=t.attributes?.media?.value;l&&(a.media=l),document.getElementsByTagName("head")[0].appendChild(a)})}catch(o){console.error(o)}}),e.directive("load-js",(t,{expression:n},{evaluate:i})=>{try{i(n)?.forEach(r=>{if(document.querySelector(`script[src="${r}"]`))return;let a=document.createElement("script");a.src=r,document.getElementsByTagName("head")[0].appendChild(a)})}catch(o){console.error(o)}})}var Cn=Ki;var An=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Jt=An.join(","),_n=typeof Element>"u",wt=_n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oe=!_n&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},On=function(t,n,i){var o=Array.prototype.slice.apply(t.querySelectorAll(Jt));return n&&wt.call(t,Jt)&&o.unshift(t),o=o.filter(i),o},Nn=function e(t,n,i){for(var o=[],r=Array.from(t);r.length;){var a=r.shift();if(a.tagName==="SLOT"){var l=a.assignedElements(),s=l.length?l:a.children,c=e(s,!0,i);i.flatten?o.push.apply(o,c):o.push({scope:a,candidates:c})}else{var f=wt.call(a,Jt);f&&i.filter(a)&&(n||!t.includes(a))&&o.push(a);var u=a.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(a),d=!i.shadowRootFilter||i.shadowRootFilter(a);if(u&&d){var p=e(u===!0?a.children:u.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scope:a,candidates:p})}else r.unshift.apply(r,a.children)}}return o},Pn=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},qi=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Rn=function(t){return t.tagName==="INPUT"},Qi=function(t){return Rn(t)&&t.type==="hidden"},Zi=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},Ji=function(t,n){for(var i=0;isummary:first-of-type"),a=r?t.parentElement:t;if(wt.call(a,"details:not([open]) *"))return!0;var l=Oe(t).host,s=l?.ownerDocument.contains(l)||t.ownerDocument.contains(t);if(!i||i==="full"){if(typeof o=="function"){for(var c=t;t;){var f=t.parentElement,u=Oe(t);if(f&&!f.shadowRoot&&o(f)===!0)return Tn(t);t.assignedSlot?t=t.assignedSlot:!f&&u!==t.ownerDocument?t=u.host:t=f}t=c}if(s)return!t.getClientRects().length}else if(i==="non-zero-area")return Tn(t);return!1},rr=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i=0)},ar=function e(t){var n=[],i=[];return t.forEach(function(o,r){var a=!!o.scope,l=a?o.scope:o,s=Pn(l,a),c=a?e(o.candidates):l;s===0?a?n.push.apply(n,c):n.push(l):i.push({documentOrder:r,tabIndex:s,item:o,isScope:a,content:c})}),i.sort(qi).reduce(function(o,r){return r.isScope?o.push.apply(o,r.content):o.push(r.content),o},[]).concat(n)},In=function(t,n){n=n||{};var i;return n.getShadowRoot?i=Nn([t],n.includeContainer,{filter:Ne.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:or}):i=On(t,n.includeContainer,Ne.bind(null,n)),ar(i)},ee=function(t,n){n=n||{};var i;return n.getShadowRoot?i=Nn([t],n.includeContainer,{filter:te.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):i=On(t,n.includeContainer,te.bind(null,n)),i},Mt=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wt.call(t,Jt)===!1?!1:Ne(n,t)},lr=An.concat("iframe").join(","),Ct=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return wt.call(t,lr)===!1?!1:te(n,t)};function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function kn(e){for(var t=1;t0){var i=e[e.length-1];i!==n&&i.pause()}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(n){var i=e.indexOf(n);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}}}(),cr=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},ur=function(t){return t.key==="Escape"||t.key==="Esc"||t.keyCode===27},fr=function(t){return t.key==="Tab"||t.keyCode===9},Ln=function(t){return setTimeout(t,0)},Bn=function(t,n){var i=-1;return t.every(function(o,r){return n(o)?(i=r,!1):!0}),i},Lt=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1?S-1:0),N=1;N=0)h=i.activeElement;else{var m=r.tabbableGroups[0],S=m&&m.firstTabbableNode;h=S||c("fallbackFocus")}if(!h)throw new Error("Your focus-trap needs to have at least one focusable element");return h},u=function(){if(r.containerGroups=r.containers.map(function(h){var m=In(h,o.tabbableOptions),S=ee(h,o.tabbableOptions);return{container:h,tabbableNodes:m,focusableNodes:S,firstTabbableNode:m.length>0?m[0]:null,lastTabbableNode:m.length>0?m[m.length-1]:null,nextTabbableNode:function(N){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,M=S.findIndex(function(F){return F===N});if(!(M<0))return _?S.slice(M+1).find(function(F){return Mt(F,o.tabbableOptions)}):S.slice(0,M).reverse().find(function(F){return Mt(F,o.tabbableOptions)})}}}),r.tabbableGroups=r.containerGroups.filter(function(h){return h.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function D(h){if(h!==!1&&h!==i.activeElement){if(!h||!h.focus){D(f());return}h.focus({preventScroll:!!o.preventScroll}),r.mostRecentlyFocusedNode=h,cr(h)&&h.select()}},p=function(h){var m=c("setReturnFocus",h);return m||(m===!1?!1:h)},g=function(h){var m=ne(h);if(!(s(m)>=0)){if(Lt(o.clickOutsideDeactivates,h)){a.deactivate({returnFocus:o.returnFocusOnDeactivate&&!Ct(m,o.tabbableOptions)});return}Lt(o.allowOutsideClick,h)||h.preventDefault()}},v=function(h){var m=ne(h),S=s(m)>=0;S||m instanceof Document?S&&(r.mostRecentlyFocusedNode=m):(h.stopImmediatePropagation(),d(r.mostRecentlyFocusedNode||f()))},x=function(h){var m=ne(h);u();var S=null;if(r.tabbableGroups.length>0){var w=s(m),N=w>=0?r.containerGroups[w]:void 0;if(w<0)h.shiftKey?S=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:S=r.tabbableGroups[0].firstTabbableNode;else if(h.shiftKey){var _=Bn(r.tabbableGroups,function(U){var K=U.firstTabbableNode;return m===K});if(_<0&&(N.container===m||Ct(m,o.tabbableOptions)&&!Mt(m,o.tabbableOptions)&&!N.nextTabbableNode(m,!1))&&(_=w),_>=0){var M=_===0?r.tabbableGroups.length-1:_-1,F=r.tabbableGroups[M];S=F.lastTabbableNode}}else{var I=Bn(r.tabbableGroups,function(U){var K=U.lastTabbableNode;return m===K});if(I<0&&(N.container===m||Ct(m,o.tabbableOptions)&&!Mt(m,o.tabbableOptions)&&!N.nextTabbableNode(m))&&(I=w),I>=0){var W=I===r.tabbableGroups.length-1?0:I+1,Y=r.tabbableGroups[W];S=Y.firstTabbableNode}}}else S=c("fallbackFocus");S&&(h.preventDefault(),d(S))},y=function(h){if(ur(h)&&Lt(o.escapeDeactivates,h)!==!1){h.preventDefault(),a.deactivate();return}if(fr(h)){x(h);return}},E=function(h){var m=ne(h);s(m)>=0||Lt(o.clickOutsideDeactivates,h)||Lt(o.allowOutsideClick,h)||(h.preventDefault(),h.stopImmediatePropagation())},O=function(){if(r.active)return Mn.activateTrap(a),r.delayInitialFocusTimer=o.delayInitialFocus?Ln(function(){d(f())}):d(f()),i.addEventListener("focusin",v,!0),i.addEventListener("mousedown",g,{capture:!0,passive:!1}),i.addEventListener("touchstart",g,{capture:!0,passive:!1}),i.addEventListener("click",E,{capture:!0,passive:!1}),i.addEventListener("keydown",y,{capture:!0,passive:!1}),a},A=function(){if(r.active)return i.removeEventListener("focusin",v,!0),i.removeEventListener("mousedown",g,!0),i.removeEventListener("touchstart",g,!0),i.removeEventListener("click",E,!0),i.removeEventListener("keydown",y,!0),a};return a={get active(){return r.active},get paused(){return r.paused},activate:function(h){if(r.active)return this;var m=l(h,"onActivate"),S=l(h,"onPostActivate"),w=l(h,"checkCanFocusTrap");w||u(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=i.activeElement,m&&m();var N=function(){w&&u(),O(),S&&S()};return w?(w(r.containers.concat()).then(N,N),this):(N(),this)},deactivate:function(h){if(!r.active)return this;var m=kn({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},h);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,A(),r.active=!1,r.paused=!1,Mn.deactivateTrap(a);var S=l(m,"onDeactivate"),w=l(m,"onPostDeactivate"),N=l(m,"checkCanReturnFocus"),_=l(m,"returnFocus","returnFocusOnDeactivate");S&&S();var M=function(){Ln(function(){_&&d(p(r.nodeFocusedBeforeActivation)),w&&w()})};return _&&N?(N(p(r.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(){return r.paused||!r.active?this:(r.paused=!0,A(),this)},unpause:function(){return!r.paused||!r.active?this:(r.paused=!1,u(),O(),this)},updateContainerElements:function(h){var m=[].concat(h).filter(Boolean);return r.containers=m.map(function(S){return typeof S=="string"?i.querySelector(S):S}),r.active&&u(),this}},a.updateContainerElements(t),a};function dr(e){let t,n;window.addEventListener("focusin",()=>{t=n,n=document.activeElement}),e.magic("focus",i=>{let o=i;return{__noscroll:!1,__wrapAround:!1,within(r){return o=r,this},withoutScrolling(){return this.__noscroll=!0,this},noscroll(){return this.__noscroll=!0,this},withWrapAround(){return this.__wrapAround=!0,this},wrap(){return this.withWrapAround()},focusable(r){return Ct(r)},previouslyFocused(){return t},lastFocused(){return t},focused(){return n},focusables(){return Array.isArray(o)?o:ee(o,{displayCheck:"none"})},all(){return this.focusables()},isFirst(r){let a=this.all();return a[0]&&a[0].isSameNode(r)},isLast(r){let a=this.all();return a.length&&a.slice(-1)[0].isSameNode(r)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let r=this.all(),a=document.activeElement;if(r.indexOf(a)!==-1)return this.__wrapAround&&r.indexOf(a)===r.length-1?r[0]:r[r.indexOf(a)+1]},getPrevious(){let r=this.all(),a=document.activeElement;if(r.indexOf(a)!==-1)return this.__wrapAround&&r.indexOf(a)===0?r.slice(-1)[0]:r[r.indexOf(a)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(r){r&&setTimeout(()=>{r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.focus({preventScroll:this._noscroll})})}}}),e.directive("trap",e.skipDuringClone((i,{expression:o,modifiers:r},{effect:a,evaluateLater:l,cleanup:s})=>{let c=l(o),f=!1,u={escapeDeactivates:!1,allowOutsideClick:!0,fallbackFocus:()=>i},d=i.querySelector("[autofocus]");d&&(u.initialFocus=d);let p=Hn(i,u),g=()=>{},v=()=>{},x=()=>{g(),g=()=>{},v(),v=()=>{},p.deactivate({returnFocus:!r.includes("noreturn")})};a(()=>c(y=>{f!==y&&(y&&!f&&setTimeout(()=>{r.includes("inert")&&(g=jn(i)),r.includes("noscroll")&&(v=hr()),p.activate()}),!y&&f&&x(),f=!!y)})),s(x)},(i,{expression:o,modifiers:r},{evaluate:a})=>{r.includes("inert")&&a(o)&&jn(i)}))}function jn(e){let t=[];return Wn(e,n=>{let i=n.hasAttribute("aria-hidden");n.setAttribute("aria-hidden","true"),t.push(()=>i||n.removeAttribute("aria-hidden"))}),()=>{for(;t.length;)t.pop()()}}function Wn(e,t){e.isSameNode(document.body)||!e.parentNode||Array.from(e.parentNode.children).forEach(n=>{n.isSameNode(e)?Wn(e.parentNode,t):t(n)})}function hr(){let e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${n}px`,()=>{document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}var Xn=dr;function Yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ot(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function mr(e,t){if(e==null)return{};var n=gr(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var vr="1.15.0";function ct(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ft=ct(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Vt=ct(/Edge/i),$n=ct(/firefox/i),Wt=ct(/safari/i)&&!ct(/chrome/i)&&!ct(/android/i),Zn=ct(/iP(ad|od|hone)/i),Jn=ct(/chrome/i)&&ct(/android/i),ti={capture:!1,passive:!1};function k(e,t,n){e.addEventListener(t,n,!ft&&ti)}function R(e,t,n){e.removeEventListener(t,n,!ft&&ti)}function de(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function br(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function it(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&de(e,t):de(e,t))||i&&e===n)return e;if(e===n)break}while(e=br(e))}return null}var zn=/\s+/g;function q(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(zn," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(zn," ")}}function C(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Nt(e,t){var n="";if(typeof e=="string")n=e;else do{var i=C(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function ei(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o=r:a=o<=r,!a)return i;if(i===rt())break;i=vt(i,!1)}return!1}function Pt(e,t,n,i){for(var o=0,r=0,a=e.children;r2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=mr(i,Tr);Gt.pluginEvent.bind(T)(t,n,ot({dragEl:b,parentEl:H,ghostEl:P,rootEl:L,nextEl:St,lastDownEl:se,cloneEl:B,cloneHidden:mt,dragStarted:Bt,putSortable:$,activeSortable:T.active,originalEvent:o,oldIndex:Ot,oldDraggableIndex:Yt,newIndex:Q,newDraggableIndex:gt,hideGhostForTarget:si,unhideGhostForTarget:ci,cloneNowHidden:function(){mt=!0},cloneNowShown:function(){mt=!1},dispatchSortableEvent:function(l){V({sortable:n,name:l,originalEvent:o})}},r))};function V(e){Cr(ot({putSortable:$,cloneEl:B,targetEl:b,rootEl:L,oldIndex:Ot,oldDraggableIndex:Yt,newIndex:Q,newDraggableIndex:gt},e))}var b,H,P,L,St,se,B,mt,Ot,Q,Yt,gt,ie,$,_t=!1,he=!1,pe=[],yt,tt,Ie,Fe,Un,Kn,Bt,At,$t,zt=!1,re=!1,ce,z,ke=[],je=!1,ge=[],ve=typeof document<"u",oe=Zn,qn=Vt||ft?"cssFloat":"float",Ar=ve&&!Jn&&!Zn&&"draggable"in document.createElement("div"),oi=function(){if(ve){if(ft)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),ai=function(t,n){var i=C(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Pt(t,0,n),a=Pt(t,1,n),l=r&&C(r),s=a&&C(a),c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width,f=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+X(a).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||c>=o&&i[qn]==="none"||a&&i[qn]==="none"&&c+f>o)?"vertical":"horizontal"},_r=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,a=i?t.width:t.height,l=i?n.left:n.top,s=i?n.right:n.bottom,c=i?n.width:n.height;return o===l||r===s||o+a/2===l+c/2},Or=function(t,n){var i;return pe.some(function(o){var r=o[Z].options.emptyInsertThreshold;if(!(!r||$e(o))){var a=X(o),l=t>=a.left-r&&t<=a.right+r,s=n>=a.top-r&&n<=a.bottom+r;if(l&&s)return i=o}}),i},li=function(t){function n(r,a){return function(l,s,c,f){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||u))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return n(r(l,s,c,f),a)(l,s,c,f);var d=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var i={},o=t.group;(!o||le(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},si=function(){!oi&&P&&C(P,"display","none")},ci=function(){!oi&&P&&C(P,"display","")};ve&&!Jn&&document.addEventListener("click",function(e){if(he)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),he=!1,!1},!0);var Et=function(t){if(b){t=t.touches?t.touches[0]:t;var n=Or(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Z]._onDragOver(i)}}},Nr=function(t){b&&b.parentNode[Z]._isOutsideThisEl(t.target)};function T(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ut({},t),e[Z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ai(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:T.supportPointer!==!1&&"PointerEvent"in window&&!Wt,emptyInsertThreshold:5};Gt.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);li(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:Ar,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?k(e,"pointerdown",this._onTapStart):(k(e,"mousedown",this._onTapStart),k(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(k(e,"dragover",this),k(e,"dragenter",this)),pe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ut(this,Sr())}T.prototype={constructor:T,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(At=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,b):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,f=o.filter;if(Br(i),!b&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Wt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=it(s,o.draggable,i,!1),!(s&&s.animated)&&se!==s)){if(Ot=J(s),Yt=J(s,o.draggable),typeof f=="function"){if(f.call(this,t,s,this)){V({sortable:n,rootEl:c,name:"filter",targetEl:s,toEl:i,fromEl:i}),G("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(f&&(f=f.split(",").some(function(u){if(u=it(c,u.trim(),i,!1),u)return V({sortable:n,rootEl:u,name:"filter",targetEl:s,fromEl:i,toEl:i}),G("filter",n,{evt:t}),!0}),f)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!it(c,o.handle,i,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,a=o.options,l=r.ownerDocument,s;if(i&&!b&&i.parentNode===r){var c=X(i);if(L=r,b=i,H=b.parentNode,St=b.nextSibling,se=i,ie=a.group,T.dragged=b,yt={target:b,clientX:(n||t).clientX,clientY:(n||t).clientY},Un=yt.clientX-c.left,Kn=yt.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,b.style["will-change"]="all",s=function(){if(G("delayEnded",o,{evt:t}),T.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!$n&&o.nativeDraggable&&(b.draggable=!0),o._triggerDragStart(t,n),V({sortable:o,name:"choose",originalEvent:t}),q(b,a.chosenClass,!0)},a.ignore.split(",").forEach(function(f){ei(b,f.trim(),Me)}),k(l,"dragover",Et),k(l,"mousemove",Et),k(l,"touchmove",Et),k(l,"mouseup",o._onDrop),k(l,"touchend",o._onDrop),k(l,"touchcancel",o._onDrop),$n&&this.nativeDraggable&&(this.options.touchStartThreshold=4,b.draggable=!0),G("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Vt||ft))){if(T.eventCanceled){this._onDrop();return}k(l,"mouseup",o._disableDelayedDrag),k(l,"touchend",o._disableDelayedDrag),k(l,"touchcancel",o._disableDelayedDrag),k(l,"mousemove",o._delayedDragTouchMoveHandler),k(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&k(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){b&&Me(b),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;R(t,"mouseup",this._disableDelayedDrag),R(t,"touchend",this._disableDelayedDrag),R(t,"touchcancel",this._disableDelayedDrag),R(t,"mousemove",this._delayedDragTouchMoveHandler),R(t,"touchmove",this._delayedDragTouchMoveHandler),R(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?k(document,"pointermove",this._onTouchMove):n?k(document,"touchmove",this._onTouchMove):k(document,"mousemove",this._onTouchMove):(k(b,"dragend",this),k(L,"dragstart",this._onDragStart));try{document.selection?ue(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(_t=!1,L&&b){G("dragStarted",this,{evt:n}),this.nativeDraggable&&k(document,"dragover",Nr);var i=this.options;!t&&q(b,i.dragClass,!1),q(b,i.ghostClass,!0),T.active=this,t&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(tt){this._lastX=tt.clientX,this._lastY=tt.clientY,si();for(var t=document.elementFromPoint(tt.clientX,tt.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(tt.clientX,tt.clientY),t!==n);)n=t;if(b.parentNode[Z]._isOutsideThisEl(t),n)do{if(n[Z]){var i=void 0;if(i=n[Z]._onDragOver({clientX:tt.clientX,clientY:tt.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);ci()}},_onTouchMove:function(t){if(yt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,a=P&&Nt(P,!0),l=P&&a&&a.a,s=P&&a&&a.d,c=oe&&z&&Gn(z),f=(r.clientX-yt.clientX+o.x)/(l||1)+(c?c[0]-ke[0]:0)/(l||1),u=(r.clientY-yt.clientY+o.y)/(s||1)+(c?c[1]-ke[1]:0)/(s||1);if(!T.active&&!_t){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(V({rootEl:H,name:"add",toEl:H,fromEl:L,originalEvent:t}),V({sortable:this,name:"remove",toEl:H,originalEvent:t}),V({rootEl:H,name:"sort",toEl:H,fromEl:L,originalEvent:t}),V({sortable:this,name:"sort",toEl:H,originalEvent:t})),$&&$.save()):Q!==Ot&&Q>=0&&(V({sortable:this,name:"update",toEl:H,originalEvent:t}),V({sortable:this,name:"sort",toEl:H,originalEvent:t})),T.active&&((Q==null||Q===-1)&&(Q=Ot,gt=Yt),V({sortable:this,name:"end",toEl:H,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){G("nulling",this),L=b=H=P=St=B=se=mt=yt=tt=Bt=Q=gt=Ot=Yt=At=$t=$=ie=T.dragged=T.ghost=T.clone=T.active=null,ge.forEach(function(t){t.checked=!0}),ge.length=Ie=Fe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":b&&(this._onDragOver(t),Pr(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,a=this.options;oi.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function kr(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,c=i?n.height:n.width,f=i?n.top:n.left,u=i?n.bottom:n.right,d=!1;if(!a){if(l&&cef+c*r/2:su-ce)return-$t}else if(s>f+c*(1-o)/2&&su-c*r/2)?s>f+c/2?1:-1:0}function Mr(e){return J(b){e.directive("sortable",t=>{t.sortable=Ge.create(t,{draggable:"[x-sortable-item]",handle:"[x-sortable-handle]",dataIdAttr:"x-sortable-item"})})};document.addEventListener("alpine:init",()=>{window.Alpine.plugin(Xn),window.Alpine.plugin(fi),window.Alpine.plugin(Dn),window.Alpine.plugin(Cn)});var jr=function(e,t,n){function i(f,u){for(let d of f){let p=o(d,u);if(p!==null)return p}}function o(f,u){let d=f.match(/^[\{\[]([^\[\]\{\}]*)[\}\]](.*)/s);if(d===null||d.length!==3)return null;let p=d[1],g=d[2];if(p.includes(",")){let[v,x]=p.split(",",2);if(x==="*"&&u>=v)return g;if(v==="*"&&u<=x)return g;if(u>=v&&u<=x)return g}return p==u?g:null}function r(f){return f.toString().charAt(0).toUpperCase()+f.toString().slice(1)}function a(f,u){if(u.length===0)return f;let d={};for(let[p,g]of Object.entries(u))d[":"+r(p??"")]=r(g??""),d[":"+p.toUpperCase()]=g.toString().toUpperCase(),d[":"+p]=g;return Object.entries(d).forEach(([p,g])=>{f=f.replaceAll(p,g)}),f}function l(f){return f.map(u=>u.replace(/^[\{\[]([^\[\]\{\}]*)[\}\]]/,""))}let s=e.split("|"),c=i(s,t);return c!=null?a(c.trim(),n):(s=l(s),a(s.length>1&&t>1?s[1]:s[0],n))};window.pluralize=jr;})(); /*! Bundled license information: tabbable/dist/index.esm.js: diff --git a/packages/support/resources/js/index.js b/packages/support/resources/js/index.js index 12f590dc40..4ba7bd7f5c 100644 --- a/packages/support/resources/js/index.js +++ b/packages/support/resources/js/index.js @@ -1,4 +1,5 @@ import AlpineFloatingUI from '@awcodes/alpine-floating-ui' +import AlpineLazyLoadAssets from 'alpine-lazy-load-assets' import Focus from '@alpinejs/focus' import Sortable from './sortable' @@ -6,6 +7,7 @@ document.addEventListener('alpine:init', () => { window.Alpine.plugin(Focus) window.Alpine.plugin(Sortable) window.Alpine.plugin(AlpineFloatingUI) + window.Alpine.plugin(AlpineLazyLoadAssets) }) // https://github.com/laravel/framework/blob/5299c22321c0f1ea8ff770b84a6c6469c4d6edec/src/Illuminate/Translation/MessageSelector.php#L15 diff --git a/packages/support/resources/views/components/button.blade.php b/packages/support/resources/views/components/button.blade.php index 05a994ae03..5673ddd0a7 100644 --- a/packages/support/resources/views/components/button.blade.php +++ b/packages/support/resources/views/components/button.blade.php @@ -164,6 +164,9 @@ @if ($tag === 'button') @elseif ($tag === 'a') map(fn (string $keyBinding): string => str_replace('+', '-', $keyBinding))->implode('.') }} @endif @if ($tooltip) x-tooltip.raw="{{ $tooltip }}" @endif - @if ($keyBindings || $tooltip) - x-data="{}" - @endif {{ $attributes ->merge([ diff --git a/packages/support/resources/views/components/link.blade.php b/packages/support/resources/views/components/link.blade.php index 3830aae213..954a911bcc 100644 --- a/packages/support/resources/views/components/link.blade.php +++ b/packages/support/resources/views/components/link.blade.php @@ -115,15 +115,15 @@ @elseif ($tag === 'button')