- accent
+ solid
|
fill-loud
@@ -146,7 +146,7 @@ Not every component supports the full set of variants and appearances. Component
### Button
-Buttons use **3 variants** (`primary`, `default`, `danger`) and **4 appearances** (`accent`, `filled`, `dashed`, `plain`). The `primary` variant maps to the `brand` color group rather than the shared `Variant` type.
+Buttons use **3 variants** (`accent`, `neutral`, `danger`) and **3 appearances** (`solid`, `outline`, `plain`).
@@ -174,7 +174,7 @@ export default class MyComponent extends LitElement {
static override styles: CSSResultGroup = [variantsStyles, styles];
@property({reflect: true})
- variant: VariantKey = Variant.Default;
+ variant: VariantKey = Variant.Neutral;
}
```
@@ -219,5 +219,5 @@ appearance: AppearanceKey = Appearance.Fill;
- **Reflect properties** - both `variant` and `appearance` should use `reflect: true` so they appear as HTML attributes for CSS matching.
- **Use `~=` selectors** - appearance selectors in existing components use `[appearance~='value']` (word matching) rather than `[appearance='value']` (exact matching).
-- **Default to neutral** - set sensible defaults (`Variant.Default` / the most common appearance) so components look correct without explicit attributes.
+- **Default to neutral** - set sensible defaults (`Variant.Neutral` / the most common appearance) so components look correct without explicit attributes.
- **Define custom subsets when needed** - if the standard `Variant` or `Appearance` type doesn't fit (like Button's `primary` variant), define component-specific values instead of forcing the shared types.
diff --git a/packages/craftcms-cp/src/stories/tokens/variants.stories.ts b/packages/craftcms-cp/src/stories/tokens/variants.stories.ts
index 77381a11ee1..308f5cdfca3 100644
--- a/packages/craftcms-cp/src/stories/tokens/variants.stories.ts
+++ b/packages/craftcms-cp/src/stories/tokens/variants.stories.ts
@@ -6,13 +6,13 @@ import '../../components/callout/callout.js';
import '../../components/button/button.js';
import '../../components/indicator/indicator.js';
-import {Appearance, Variant} from '@src/types';
+import {Appearance, Variant, ButtonAppearance, ButtonVariant} from '@src/types';
const variants = Object.values(Variant);
const appearances = Object.values(Appearance);
-const buttonVariants = ['primary', 'default', 'danger'] as const;
-const buttonAppearances = ['accent', 'filled', 'dashed', 'plain'] as const;
+const buttonVariants = Object.values(ButtonVariant);
+const buttonAppearances = Object.values(ButtonAppearance);
const meta: Meta = {
title: 'Tokens/Variants & Appearances',
@@ -65,8 +65,8 @@ export const CalloutMatrix: Story = {
};
/**
- * Buttons use their own variant subset (primary, default, danger)
- * and appearance subset (accent, filled, dashed, plain).
+ * Buttons use their own variant subset (accent, neutral, danger)
+ * and appearance subset (solid, outline, plain).
*/
export const ButtonMatrix: Story = {
name: 'Button Matrix',
@@ -89,9 +89,7 @@ export const ButtonMatrix: Story = {
|
${variant}
diff --git a/packages/craftcms-cp/src/styles/color-definitions.js b/packages/craftcms-cp/src/styles/color-definitions.js
index 34ec1a4e5fe..fcb11824292 100644
--- a/packages/craftcms-cp/src/styles/color-definitions.js
+++ b/packages/craftcms-cp/src/styles/color-definitions.js
@@ -1,6 +1,7 @@
import {Theme, Color, BackgroundColor} from '@adobe/leonardo-contrast-colors';
const contrastRatios = {
+ static: [1.45, 1.78, 2.22, 2.78, 3.54, 4.61, 5.92, 7.81, 10.21, 13.01, 15.91],
light: [1.08, 1.33, 1.58, 2.39, 3.01, 3.87, 5.07, 6.72, 8.84, 11.31, 13.94],
dark: [1.08, 1.58, 1.96, 2.45, 3.09, 3.9, 5.07, 6.02, 7.34, 8.77, 10.18],
base: [-1.2, 1, 1.2, 1.4, 2, 4, 5, 6.5, 10.21, 13.58, 17.04],
@@ -165,6 +166,12 @@ export const lightTheme = new Theme({
lightness: 97,
});
+export const staticTheme = new Theme({
+ colors: makeColors(contrastRatios.static),
+ backgroundColor: backgroundColor,
+ lightness: 100,
+});
+
export const darkTheme = new Theme({
colors: makeColors(contrastRatios.dark),
backgroundColor: backgroundColor,
diff --git a/packages/craftcms-cp/src/styles/shared/color-palette.css b/packages/craftcms-cp/src/styles/shared/color-palette.css
index a110be227df..00f6a78f08c 100644
--- a/packages/craftcms-cp/src/styles/shared/color-palette.css
+++ b/packages/craftcms-cp/src/styles/shared/color-palette.css
@@ -257,259 +257,259 @@
--color-base-950: #0f141c;
/* Static colors */
- --color-static-gray-50: #eaecef;
- --color-static-gray-100: #d4d7dd;
- --color-static-gray-200: #c2c6ce;
- --color-static-gray-300: #9ba1ae;
- --color-static-gray-400: #888e9c;
- --color-static-gray-500: #757b8a;
- --color-static-gray-600: #626978;
- --color-static-gray-700: #4f5665;
- --color-static-gray-800: #3e4555;
- --color-static-gray-900: #2e3545;
- --color-static-gray-950: #1e2635;
- --color-static-red-50: #fae8e8;
- --color-static-red-100: #f6cdcc;
- --color-static-red-200: #f4b6b4;
- --color-static-red-300: #ee817e;
- --color-static-red-400: #e8645f;
- --color-static-red-500: #dc463e;
- --color-static-red-600: #c72c22;
- --color-static-red-700: #a32720;
- --color-static-red-800: #80231f;
- --color-static-red-900: #631b18;
- --color-static-red-950: #4b110f;
- --color-static-orange-50: #fbead2;
- --color-static-orange-100: #f7d0a1;
- --color-static-orange-200: #f4ba7c;
- --color-static-orange-300: #ed8633;
- --color-static-orange-400: #e6692c;
- --color-static-orange-500: #d45124;
- --color-static-orange-600: #b5441d;
- --color-static-orange-700: #963816;
- --color-static-orange-800: #792c12;
- --color-static-orange-900: #5e220e;
- --color-static-orange-950: #44180b;
- --color-static-amber-50: #fbecaf;
- --color-static-amber-100: #f7d36f;
- --color-static-amber-200: #f4bd44;
- --color-static-amber-300: #df8e32;
- --color-static-amber-400: #ca7c2c;
- --color-static-amber-500: #b56825;
- --color-static-amber-600: #a0551e;
- --color-static-amber-700: #8a4217;
- --color-static-amber-800: #703411;
- --color-static-amber-900: #58270b;
- --color-static-amber-950: #411b06;
- --color-static-emerald-50: #cff6e1;
- --color-static-emerald-100: #9ae7be;
- --color-static-emerald-200: #77d9a6;
- --color-static-emerald-300: #51b37f;
- --color-static-emerald-400: #479e70;
- --color-static-emerald-500: #3d8961;
- --color-static-emerald-600: #327555;
- --color-static-emerald-700: #286048;
- --color-static-emerald-800: #1e4d3c;
- --color-static-emerald-900: #173b2e;
- --color-static-emerald-950: #112a21;
- --color-static-blue-50: #e2edfd;
- --color-static-blue-100: #c1d9fb;
- --color-static-blue-200: #a5c8fa;
- --color-static-blue-300: #68a2f7;
- --color-static-blue-400: #518cf6;
- --color-static-blue-500: #3e74f2;
- --color-static-blue-600: #305ce7;
- --color-static-blue-700: #2244d7;
- --color-static-blue-800: #2138a7;
- --color-static-blue-900: #1d2d7a;
- --color-static-blue-950: #192250;
- --color-static-yellow-50: #fcef90;
- --color-static-yellow-100: #f7d358;
- --color-static-yellow-200: #eebf40;
- --color-static-yellow-300: #ce9733;
- --color-static-yellow-400: #bd822c;
- --color-static-yellow-500: #aa6f24;
- --color-static-yellow-600: #945c1d;
- --color-static-yellow-700: #7c4b16;
- --color-static-yellow-800: #633c12;
- --color-static-yellow-900: #4c2e0e;
- --color-static-yellow-950: #37210a;
- --color-static-slate-50: #e9eef3;
- --color-static-slate-100: #ced7e2;
- --color-static-slate-200: #bdc7d4;
- --color-static-slate-300: #95a2b4;
- --color-static-slate-400: #828fa4;
- --color-static-slate-500: #6f7c94;
- --color-static-slate-600: #5c6982;
- --color-static-slate-700: #4a576d;
- --color-static-slate-800: #3a455a;
- --color-static-slate-900: #2b3549;
- --color-static-slate-950: #1e2637;
- --color-static-lime-50: #ddf7a2;
- --color-static-lime-100: #b4e758;
- --color-static-lime-200: #9ed742;
- --color-static-lime-300: #7ab034;
- --color-static-lime-400: #6a9c2d;
- --color-static-lime-500: #5d8726;
- --color-static-lime-600: #50731f;
- --color-static-lime-700: #435e18;
- --color-static-lime-800: #344c13;
- --color-static-lime-900: #273a0e;
- --color-static-lime-950: #1b2a09;
- --color-static-green-50: #cef7d8;
- --color-static-green-100: #96e9a8;
- --color-static-green-200: #6add82;
- --color-static-green-300: #52b555;
- --color-static-green-400: #48a04a;
- --color-static-green-500: #3e8b42;
- --color-static-green-600: #34763b;
- --color-static-green-700: #2b6133;
- --color-static-green-800: #234e2b;
- --color-static-green-900: #1b3b21;
- --color-static-green-950: #142b18;
- --color-static-teal-50: #c7f7ec;
- --color-static-teal-100: #90e7d6;
- --color-static-teal-200: #6dd7c4;
- --color-static-teal-300: #4fb0a1;
- --color-static-teal-400: #459c90;
- --color-static-teal-500: #3b877f;
- --color-static-teal-600: #31736d;
- --color-static-teal-700: #275f5b;
- --color-static-teal-800: #1e4c49;
- --color-static-teal-900: #163a39;
- --color-static-teal-950: #0f2a2a;
- --color-static-cyan-50: #c9f5fc;
- --color-static-cyan-100: #7fe6fa;
- --color-static-cyan-200: #66d4f1;
- --color-static-cyan-300: #4dacce;
- --color-static-cyan-400: #4397bb;
- --color-static-cyan-500: #3983a5;
- --color-static-cyan-600: #2f6f8d;
- --color-static-cyan-700: #265c74;
- --color-static-cyan-800: #1e4a5e;
- --color-static-cyan-900: #17384b;
- --color-static-cyan-950: #102836;
- --color-static-sky-50: #dceffc;
- --color-static-sky-100: #aaddfb;
- --color-static-sky-200: #84cefa;
- --color-static-sky-300: #4ca8eb;
- --color-static-sky-400: #4193d9;
- --color-static-sky-500: #377fc5;
- --color-static-sky-600: #2e6ca7;
- --color-static-sky-700: #25598a;
- --color-static-sky-800: #1d476f;
- --color-static-sky-900: #163655;
- --color-static-sky-950: #10273e;
- --color-static-zinc-50: #ededee;
- --color-static-zinc-100: #d6d6da;
- --color-static-zinc-200: #c5c5ca;
- --color-static-zinc-300: #a0a0a7;
- --color-static-zinc-400: #8d8d95;
- --color-static-zinc-500: #7b7b83;
- --color-static-zinc-600: #686872;
- --color-static-zinc-700: #55555f;
- --color-static-zinc-800: #44444c;
- --color-static-zinc-900: #34343b;
- --color-static-zinc-950: #25252b;
- --color-static-violet-50: #eeebfd;
- --color-static-violet-100: #d8d2fb;
- --color-static-violet-200: #c9bdfa;
- --color-static-violet-300: #a991f8;
- --color-static-violet-400: #9979f7;
- --color-static-violet-500: #8b5df5;
- --color-static-violet-600: #7c3cf4;
- --color-static-violet-700: #6a1be3;
- --color-static-violet-800: #5518b5;
- --color-static-violet-900: #401889;
- --color-static-violet-950: #2d0f69;
- --color-static-purple-50: #f2eafd;
- --color-static-purple-100: #e2cefb;
- --color-static-purple-200: #d6b9f9;
- --color-static-purple-300: #be88f8;
- --color-static-purple-400: #b16df7;
- --color-static-purple-500: #a24ff6;
- --color-static-purple-600: #902bf2;
- --color-static-purple-700: #7815d6;
- --color-static-purple-800: #6118a6;
- --color-static-purple-900: #4b167c;
- --color-static-purple-950: #380963;
- --color-static-fuchsia-50: #f7e7fd;
- --color-static-fuchsia-100: #eecafb;
- --color-static-fuchsia-200: #e9b2f9;
- --color-static-fuchsia-300: #dd78f7;
- --color-static-fuchsia-400: #d15bed;
- --color-static-fuchsia-500: #c23be0;
- --color-static-fuchsia-600: #ac22c8;
- --color-static-fuchsia-700: #8e1ea3;
- --color-static-fuchsia-800: #721c7f;
- --color-static-fuchsia-900: #571861;
- --color-static-fuchsia-950: #401146;
- --color-static-pink-50: #f9e7f2;
- --color-static-pink-100: #f4cbe4;
- --color-static-pink-200: #f1b3d8;
- --color-static-pink-300: #eb7bba;
- --color-static-pink-400: #e65ba6;
- --color-static-pink-500: #db3b88;
- --color-static-pink-600: #c2296a;
- --color-static-pink-700: #a22054;
- --color-static-pink-800: #801d44;
- --color-static-pink-900: #631735;
- --color-static-pink-950: #481127;
- --color-static-rose-50: #fbe8ea;
- --color-static-rose-100: #f7ccd0;
- --color-static-rose-200: #f3b6bd;
- --color-static-rose-300: #ee7f8f;
- --color-static-rose-400: #ec5e74;
- --color-static-rose-500: #e43852;
- --color-static-rose-600: #c7293f;
- --color-static-rose-700: #a52138;
- --color-static-rose-800: #851930;
- --color-static-rose-900: #681225;
- --color-static-rose-950: #4e0b1b;
- --color-static-neutral-50: #ededed;
- --color-static-neutral-100: #d7d7d7;
- --color-static-neutral-200: #c5c5c5;
- --color-static-neutral-300: #a0a0a0;
- --color-static-neutral-400: #8e8e8e;
- --color-static-neutral-500: #7c7c7c;
- --color-static-neutral-600: #686868;
- --color-static-neutral-700: #565656;
- --color-static-neutral-800: #444444;
- --color-static-neutral-900: #343434;
- --color-static-neutral-950: #262626;
- --color-static-stone-50: #eeedec;
- --color-static-stone-100: #d8d7d5;
- --color-static-stone-200: #c8c5c2;
- --color-static-stone-300: #a4a09b;
- --color-static-stone-400: #928e88;
- --color-static-stone-500: #807a75;
- --color-static-stone-600: #6d6862;
- --color-static-stone-700: #5a5550;
- --color-static-stone-800: #48443f;
- --color-static-stone-900: #373430;
- --color-static-stone-950: #282523;
- --color-static-indigo-50: #e7ebfd;
- --color-static-indigo-100: #cfd5fb;
- --color-static-indigo-200: #bbc2fa;
- --color-static-indigo-300: #9198f8;
- --color-static-indigo-400: #7b83f6;
- --color-static-indigo-500: #6b6cec;
- --color-static-indigo-600: #5a54e1;
- --color-static-indigo-700: #483bd6;
- --color-static-indigo-800: #3a2eaf;
- --color-static-indigo-900: #2e2681;
- --color-static-indigo-950: #221e56;
+ --color-static-gray-50: #d3d6dc;
+ --color-static-gray-100: #bec2cb;
+ --color-static-gray-200: #a9aeb9;
+ --color-static-gray-300: #959ba8;
+ --color-static-gray-400: #828896;
+ --color-static-gray-500: #6f7584;
+ --color-static-gray-600: #5e6473;
+ --color-static-gray-700: #4a5261;
+ --color-static-gray-800: #3a4151;
+ --color-static-gray-900: #2a3141;
+ --color-static-gray-950: #1a2231;
+ --color-static-red-50: #f6cdcc;
+ --color-static-red-100: #f3b2b1;
+ --color-static-red-200: #f09593;
+ --color-static-red-300: #ed7875;
+ --color-static-red-400: #e45a55;
+ --color-static-red-500: #d83930;
+ --color-static-red-600: #be2a21;
+ --color-static-red-700: #9a2620;
+ --color-static-red-800: #78221f;
+ --color-static-red-900: #5d1816;
+ --color-static-red-950: #440f0d;
+ --color-static-orange-50: #f7d0a1;
+ --color-static-orange-100: #f4b574;
+ --color-static-orange-200: #f09a47;
+ --color-static-orange-300: #eb7e31;
+ --color-static-orange-400: #e35f29;
+ --color-static-orange-500: #c94c22;
+ --color-static-orange-600: #ad411b;
+ --color-static-orange-700: #8f3515;
+ --color-static-orange-800: #722a11;
+ --color-static-orange-900: #571f0d;
+ --color-static-orange-950: #3d160a;
+ --color-static-amber-50: #f7d36f;
+ --color-static-amber-100: #f4b83f;
+ --color-static-amber-200: #ee9c37;
+ --color-static-amber-300: #d88930;
+ --color-static-amber-400: #c47529;
+ --color-static-amber-500: #ae6122;
+ --color-static-amber-600: #9a501c;
+ --color-static-amber-700: #843e15;
+ --color-static-amber-800: #69310f;
+ --color-static-amber-900: #51240a;
+ --color-static-amber-950: #3a1805;
+ --color-static-emerald-50: #99e6bd;
+ --color-static-emerald-100: #6fd6a1;
+ --color-static-emerald-200: #58c18a;
+ --color-static-emerald-300: #4eac7a;
+ --color-static-emerald-400: #44976a;
+ --color-static-emerald-500: #39825d;
+ --color-static-emerald-600: #306f52;
+ --color-static-emerald-700: #255b45;
+ --color-static-emerald-800: #1c4838;
+ --color-static-emerald-900: #15372b;
+ --color-static-emerald-950: #0f261e;
+ --color-static-blue-50: #c0d8fb;
+ --color-static-blue-100: #a0c4f9;
+ --color-static-blue-200: #7eb0f8;
+ --color-static-blue-300: #609bf7;
+ --color-static-blue-400: #4a84f6;
+ --color-static-blue-500: #396cee;
+ --color-static-blue-600: #2c55e4;
+ --color-static-blue-700: #2241cb;
+ --color-static-blue-800: #20369b;
+ --color-static-blue-900: #1c2a70;
+ --color-static-blue-950: #161e47;
+ --color-static-yellow-50: #f7d358;
+ --color-static-yellow-100: #ebbb3f;
+ --color-static-yellow-200: #daa538;
+ --color-static-yellow-300: #c99031;
+ --color-static-yellow-400: #b77c2a;
+ --color-static-yellow-500: #a26722;
+ --color-static-yellow-600: #8e571b;
+ --color-static-yellow-700: #754715;
+ --color-static-yellow-800: #5d3811;
+ --color-static-yellow-900: #462b0d;
+ --color-static-yellow-950: #311e09;
+ --color-static-slate-50: #ced7e2;
+ --color-static-slate-100: #b8c3d0;
+ --color-static-slate-200: #a4afc0;
+ --color-static-slate-300: #909caf;
+ --color-static-slate-400: #7c899f;
+ --color-static-slate-500: #68758e;
+ --color-static-slate-600: #57647c;
+ --color-static-slate-700: #475268;
+ --color-static-slate-800: #374256;
+ --color-static-slate-900: #283144;
+ --color-static-slate-950: #1a2232;
+ --color-static-lime-50: #b4e758;
+ --color-static-lime-100: #9bd340;
+ --color-static-lime-200: #87be39;
+ --color-static-lime-300: #75aa32;
+ --color-static-lime-400: #66952a;
+ --color-static-lime-500: #598023;
+ --color-static-lime-600: #4d6d1d;
+ --color-static-lime-700: #3f5a17;
+ --color-static-lime-800: #314712;
+ --color-static-lime-900: #24360d;
+ --color-static-lime-950: #182608;
+ --color-static-green-50: #96e9a8;
+ --color-static-green-100: #64d97a;
+ --color-static-green-200: #59c35e;
+ --color-static-green-300: #4faf52;
+ --color-static-green-400: #449947;
+ --color-static-green-500: #3a8440;
+ --color-static-green-600: #327039;
+ --color-static-green-700: #295c32;
+ --color-static-green-800: #214929;
+ --color-static-green-900: #19371f;
+ --color-static-green-950: #112616;
+ --color-static-teal-50: #8de6d4;
+ --color-static-teal-100: #67d4c1;
+ --color-static-teal-200: #57bfae;
+ --color-static-teal-300: #4caa9c;
+ --color-static-teal-400: #42958b;
+ --color-static-teal-500: #388079;
+ --color-static-teal-600: #2e6e68;
+ --color-static-teal-700: #255b57;
+ --color-static-teal-800: #1c4745;
+ --color-static-teal-900: #143636;
+ --color-static-teal-950: #0d2525;
+ --color-static-cyan-50: #7de4f9;
+ --color-static-cyan-100: #61d0ef;
+ --color-static-cyan-200: #55badb;
+ --color-static-cyan-300: #4aa6c8;
+ --color-static-cyan-400: #4091b5;
+ --color-static-cyan-500: #367c9d;
+ --color-static-cyan-600: #2d6a86;
+ --color-static-cyan-700: #24576f;
+ --color-static-cyan-800: #1c455a;
+ --color-static-cyan-900: #153446;
+ --color-static-cyan-950: #0f2431;
+ --color-static-sky-50: #aaddfb;
+ --color-static-sky-100: #7dcbfa;
+ --color-static-sky-200: #53b6f7;
+ --color-static-sky-300: #48a1e5;
+ --color-static-sky-400: #3e8cd4;
+ --color-static-sky-500: #3478bc;
+ --color-static-sky-600: #2c679f;
+ --color-static-sky-700: #235482;
+ --color-static-sky-800: #1c4369;
+ --color-static-sky-900: #14324f;
+ --color-static-sky-950: #0e2338;
+ --color-static-zinc-50: #d5d5d9;
+ --color-static-zinc-100: #c1c1c6;
+ --color-static-zinc-200: #adadb3;
+ --color-static-zinc-300: #9a9aa1;
+ --color-static-zinc-400: #87878f;
+ --color-static-zinc-500: #74747d;
+ --color-static-zinc-600: #63636d;
+ --color-static-zinc-700: #52525c;
+ --color-static-zinc-800: #404048;
+ --color-static-zinc-900: #303036;
+ --color-static-zinc-950: #212126;
+ --color-static-violet-50: #d8d2fb;
+ --color-static-violet-100: #c6b9fa;
+ --color-static-violet-200: #b5a1f8;
+ --color-static-violet-300: #a48af7;
+ --color-static-violet-400: #9570f6;
+ --color-static-violet-500: #8553f5;
+ --color-static-violet-600: #7831f4;
+ --color-static-violet-700: #6515dc;
+ --color-static-violet-800: #5018ab;
+ --color-static-violet-900: #3b1581;
+ --color-static-violet-950: #280d5f;
+ --color-static-purple-50: #e2cefb;
+ --color-static-purple-100: #d4b5f9;
+ --color-static-purple-200: #c79af8;
+ --color-static-purple-300: #ba80f8;
+ --color-static-purple-400: #ac64f7;
+ --color-static-purple-500: #9c44f5;
+ --color-static-purple-600: #8a20f0;
+ --color-static-purple-700: #7215cb;
+ --color-static-purple-800: #5b199b;
+ --color-static-purple-900: #451376;
+ --color-static-purple-950: #32075b;
+ --color-static-fuchsia-50: #eec9fb;
+ --color-static-fuchsia-100: #e8adf9;
+ --color-static-fuchsia-200: #e28ef8;
+ --color-static-fuchsia-300: #da6ef6;
+ --color-static-fuchsia-400: #cc51e9;
+ --color-static-fuchsia-500: #bc2eda;
+ --color-static-fuchsia-600: #a421be;
+ --color-static-fuchsia-700: #881d9a;
+ --color-static-fuchsia-800: #6b1c77;
+ --color-static-fuchsia-900: #51165a;
+ --color-static-fuchsia-950: #390f40;
+ --color-static-pink-50: #f3cae4;
+ --color-static-pink-100: #f0afd5;
+ --color-static-pink-200: #ed90c5;
+ --color-static-pink-300: #ea71b5;
+ --color-static-pink-400: #e4509e;
+ --color-static-pink-500: #d5317b;
+ --color-static-pink-600: #ba2664;
+ --color-static-pink-700: #9a1e4f;
+ --color-static-pink-800: #781d41;
+ --color-static-pink-900: #5b1631;
+ --color-static-pink-950: #410f23;
+ --color-static-rose-50: #f7ccd0;
+ --color-static-rose-100: #f3b1b8;
+ --color-static-rose-200: #f0949f;
+ --color-static-rose-300: #ee7587;
+ --color-static-rose-400: #eb516a;
+ --color-static-rose-500: #db3148;
+ --color-static-rose-600: #be273c;
+ --color-static-rose-700: #9d1f38;
+ --color-static-rose-800: #7e172e;
+ --color-static-rose-900: #611023;
+ --color-static-rose-950: #470918;
+ --color-static-neutral-50: #d6d6d6;
+ --color-static-neutral-100: #c2c2c2;
+ --color-static-neutral-200: #aeaeae;
+ --color-static-neutral-300: #9b9b9b;
+ --color-static-neutral-400: #888888;
+ --color-static-neutral-500: #757575;
+ --color-static-neutral-600: #646464;
+ --color-static-neutral-700: #525252;
+ --color-static-neutral-800: #414141;
+ --color-static-neutral-900: #313131;
+ --color-static-neutral-950: #222222;
+ --color-static-stone-50: #d7d5d3;
+ --color-static-stone-100: #c4c2bf;
+ --color-static-stone-200: #b1ada9;
+ --color-static-stone-300: #9f9a95;
+ --color-static-stone-400: #8d8782;
+ --color-static-stone-500: #7a746e;
+ --color-static-stone-600: #69635e;
+ --color-static-stone-700: #56514c;
+ --color-static-stone-800: #44403b;
+ --color-static-stone-900: #33302d;
+ --color-static-stone-950: #24211f;
+ --color-static-indigo-50: #ced4fb;
+ --color-static-indigo-100: #b7befa;
+ --color-static-indigo-200: #a0a8f9;
+ --color-static-indigo-300: #8a92f8;
+ --color-static-indigo-400: #767bf3;
+ --color-static-indigo-500: #6564e8;
+ --color-static-indigo-600: #564ede;
+ --color-static-indigo-700: #4335d3;
+ --color-static-indigo-800: #372ca4;
+ --color-static-indigo-900: #2b2474;
+ --color-static-indigo-950: #1e1b4d;
--color-static-base-50: #ffffff;
- --color-static-base-100: #f2f5f8;
- --color-static-base-200: #dae1e9;
- --color-static-base-300: #c8d2de;
- --color-static-base-400: #a6b1c1;
- --color-static-base-500: #6c7a92;
- --color-static-base-600: #5d6a83;
- --color-static-base-700: #4d5970;
- --color-static-base-800: #313c50;
- --color-static-base-900: #1f283b;
- --color-static-base-950: #0f141c;
+ --color-static-base-100: #fefefe;
+ --color-static-base-200: #e5ebf0;
+ --color-static-base-300: #d2dbe4;
+ --color-static-base-400: #acb8c7;
+ --color-static-base-500: #728097;
+ --color-static-base-600: #627089;
+ --color-static-base-700: #525e76;
+ --color-static-base-800: #374256;
+ --color-static-base-900: #252e41;
+ --color-static-base-950: #161c29;
}
[data-theme='dark'] {
diff --git a/packages/craftcms-cp/src/styles/shared/colorable.css b/packages/craftcms-cp/src/styles/shared/colorable.css
index a2868f9bdc8..ab9ce17f3e1 100644
--- a/packages/craftcms-cp/src/styles/shared/colorable.css
+++ b/packages/craftcms-cp/src/styles/shared/colorable.css
@@ -276,15 +276,15 @@
--c-color-success-on-loud: var(--color-emerald-50);
/* Semantics colors - warning */
- --c-color-warning-fill-quiet: var(--color-orange-50);
- --c-color-warning-fill-normal: var(--color-orange-100);
- --c-color-warning-fill-loud: var(--color-orange-600);
- --c-color-warning-border-quiet: var(--color-orange-400);
- --c-color-warning-border-normal: var(--color-orange-600);
- --c-color-warning-border-loud: var(--color-orange-800);
- --c-color-warning-on-quiet: var(--color-orange-800);
- --c-color-warning-on-normal: var(--color-orange-950);
- --c-color-warning-on-loud: var(--color-orange-50);
+ --c-color-warning-fill-quiet: var(--color-yellow-50);
+ --c-color-warning-fill-normal: var(--color-yellow-100);
+ --c-color-warning-fill-loud: var(--color-yellow-600);
+ --c-color-warning-border-quiet: var(--color-yellow-400);
+ --c-color-warning-border-normal: var(--color-yellow-600);
+ --c-color-warning-border-loud: var(--color-yellow-800);
+ --c-color-warning-on-quiet: var(--color-yellow-800);
+ --c-color-warning-on-normal: var(--color-yellow-950);
+ --c-color-warning-on-loud: var(--color-yellow-50);
/* Semantics colors - danger */
--c-color-danger-fill-quiet: var(--color-red-50);
diff --git a/packages/craftcms-cp/src/styles/shared/tokens.css b/packages/craftcms-cp/src/styles/shared/tokens.css
index d27db89a921..a7bc3ac1028 100644
--- a/packages/craftcms-cp/src/styles/shared/tokens.css
+++ b/packages/craftcms-cp/src/styles/shared/tokens.css
@@ -16,6 +16,7 @@
/* Text tokens (replaces --c-fg-*) */
--c-text-white: var(--color-white);
+ --c-text-black: var(--color-black);
--c-text-default: var(--color-slate-900);
--c-text-quiet: var(--color-slate-600);
--c-text-link: var(--color-blue-600);
@@ -108,6 +109,33 @@
/**
Components
*/
+ --c-color-static-success-fill: var(--color-static-emerald-200);
+ --c-color-static-success-on: var(--c-text-white);
+ --c-color-static-success-border: var(--color-static-emerald-500);
+
+ --c-color-static-warning-fill: var(--color-static-yellow-100);
+ --c-color-static-warning-on: var(--c-text-black);
+ --c-color-static-warning-border: var(--color-static-yellow-200);
+
+ --c-color-static-info-fill: var(--color-static-blue-400);
+ --c-color-static-info-on: var(--c-text-white);
+ --c-color-static-info-border: var(--color-static-blue-500);
+
+ --c-color-static-brand-fill: var(--color-static-red-500);
+ --c-color-static-brand-on: var(--c-text-white);
+ --c-color-static-brand-border: var(--color-static-red-600);
+
+ --c-color-static-danger-fill: var(--color-static-red-500);
+ --c-color-static-danger-on: var(--c-text-white);
+ --c-color-static-danger-border: var(--color-static-red-600);
+
+ --c-color-static-accent-fill: var(--color-static-blue-400);
+ --c-color-static-accent-on: var(--c-text-white);
+ --c-color-static-accent-border: var(--color-static-blue-500);
+
+ --c-color-static-neutral-fill: var(--color-static-slate-600);
+ --c-color-static-neutral-on: var(--c-text-white);
+ --c-color-static-neutral-border: var(--color-static-slate-700);
/**
Form controls
@@ -147,35 +175,6 @@
--c-select-spacing-block: var(--c-form-control-spacing-block);
--c-select-shadow: var(--shadow-sm);
- /**
- Buttons
- */
-
- /** Variants **/
- /* Default */
- --c-button-default-fill: var(--color-slate-200);
- --c-button-default-fill-hover: var(--color-slate-300);
- --c-button-default-text: var(--c-text-default);
- --c-button-default-text-hover: var(--c-button-default-text);
- --c-button-default-border: var(--color-slate-300);
- --c-button-default-border-hover: var(--c-button-default-border);
-
- /* Primary */
- --c-button-primary-fill: var(--color-red-600);
- --c-button-primary-border: var(--color-red-700);
- --c-button-primary-text: var(--color-white);
- --c-button-primary-fill-hover: var(--color-red-700);
- --c-button-primary-border-hover: var(--c-button-primary-border);
- --c-button-primary-text-hover: var(--c-button-primary-text);
-
- /* Danger */
- --c-button-danger-fill: var(--color-red-600);
- --c-button-danger-border: var(--color-red-700);
- --c-button-danger-text: var(--color-white);
- --c-button-danger-fill-hover: var(--color-red-700);
- --c-button-danger-border-hover: var(--c-button-danger-border);
- --c-button-danger-text-hover: var(--c-button-danger-text);
-
/** Appearances **/
/* Generic Panes */
--c-pane-fill: var(--c-surface-overlay);
diff --git a/packages/craftcms-cp/src/styles/static-variants.styles.ts b/packages/craftcms-cp/src/styles/static-variants.styles.ts
new file mode 100644
index 00000000000..667e70be918
--- /dev/null
+++ b/packages/craftcms-cp/src/styles/static-variants.styles.ts
@@ -0,0 +1,33 @@
+import {css} from 'lit';
+
+export default css`
+ :host([variant='neutral']) {
+ --c-color-static-fill: var(--c-color-static-neutral-fill);
+ --c-color-static-on: var(--c-color-static-neutral-on);
+ --c-color-static-border: var(--c-color-static-neutral-border);
+ }
+
+ :host([variant='danger']) {
+ --c-color-static-fill: var(--c-color-static-danger-fill);
+ --c-color-static-on: var(--c-color-static-danger-on);
+ --c-color-static-border: var(--c-color-static-danger-border);
+ }
+
+ :host([variant='info']) {
+ --c-color-static-fill: var(--c-color-static-info-fill);
+ --c-color-static-on: var(--c-color-static-info-on);
+ --c-color-static-border: var(--c-color-static-info-border);
+ }
+
+ :host([variant='warning']) {
+ --c-color-static-fill: var(--c-color-static-warning-fill);
+ --c-color-static-on: var(--c-color-static-warning-on);
+ --c-color-static-border: var(--c-color-static-warning-border);
+ }
+
+ :host([variant='success']) {
+ --c-color-static-fill: var(--c-color-static-success-fill);
+ --c-color-static-on: var(--c-color-static-success-on);
+ --c-color-static-border: var(--c-color-static-success-border);
+ }
+`;
diff --git a/packages/craftcms-cp/src/types/index.ts b/packages/craftcms-cp/src/types/index.ts
index 56a0e5ab4d5..bd710d410d6 100644
--- a/packages/craftcms-cp/src/types/index.ts
+++ b/packages/craftcms-cp/src/types/index.ts
@@ -1,5 +1,5 @@
export const Variant = {
- Default: 'default',
+ Neutral: 'neutral',
Success: 'success',
Warning: 'warning',
Danger: 'danger',
@@ -9,13 +9,25 @@ export const Variant = {
export type VariantKey = (typeof Variant)[keyof typeof Variant];
export const Appearance = {
- Accent: 'accent',
+ Solid: 'solid',
OutlineFill: 'outline-fill',
Fill: 'fill',
Outline: 'outline',
Plain: 'plain',
} as const;
+export const ButtonAppearance = {
+ Solid: 'solid',
+ Outline: 'outline',
+ Plain: 'plain',
+} as const;
+
+export const ButtonVariant = {
+ Accent: 'accent',
+ Neutral: 'neutral',
+ Danger: 'danger',
+} as const;
+
export type AppearanceKey = (typeof Appearance)[keyof typeof Appearance];
export interface DateObject {
diff --git a/resources/build/AppLayout.js b/resources/build/AppLayout.js
index 041102f8343..8265755d970 100644
--- a/resources/build/AppLayout.js
+++ b/resources/build/AppLayout.js
@@ -1 +1 @@
-import{$ as e,B as t,E as n,G as r,J as i,K as a,L as o,P as s,S as c,T as l,V as u,X as d,a as f,b as p,d as m,h,it as g,l as _,lt as v,rt as ee,t as y,v as b,w as x,x as S,y as C,z as w}from"./_plugin-vue_export-helper.js";import{r as T}from"./nav-item-9g3ebwBJ.js";import{a as E,i as D,n as O,r as k,t as A}from"./useAnnouncer.js";import{a as j,r as te}from"./dist.js";var M={class:`system-info__icon`},N=[`src`],P={class:`system-info__name`},F=y(n({__name:`SystemInfo`,setup(t){let n=j(),r=b(()=>n.system),a=b(()=>n.site),s=b(()=>a.value.url?`a`:`div`);return(t,n)=>(o(),p(u(s.value),{class:`system-info`,href:a.value.url,target:a.value.url?`_blank`:null},{default:i(()=>[C(`div`,M,[r.value.icon?(o(),c(`img`,{key:0,src:r.value.icon,alt:``},null,8,N)):S(``,!0)]),C(`div`,P,e(r.value.name),1)]),_:1},8,[`href`,`target`]))}}),[[`__scopeId`,`data-v-d8aced2c`]]),I=[`icon`,`href`,`active`,`indicator`],L={key:0,slot:`subnav`},R=[`active`,`href`,`indicator`],z=[`name`],B={key:1,class:`nav-indicator`,slot:`icon`},V=[`.displayedJob`,`.hasReservedJobs`,`.hasWaitingJobs`],H=y(n({__name:`MainNav`,setup(t){let n=_(),{nav:r}=j(),i=b(()=>n.props.queue);return(t,n)=>(o(),c(`craft-nav-list`,null,[(o(!0),c(h,null,w(v(r),t=>(o(),c(`craft-nav-item`,{key:t.url,icon:t.icon,href:t.url,active:t.sel,indicator:!!t.badgeCount},[x(e(t.label)+` `,1),t.subnav?(o(),c(h,{key:0},[t.subnav?(o(),c(`craft-nav-list`,L,[(o(!0),c(h,null,w(t.subnav,t=>(o(),c(`craft-nav-item`,{key:t.url,active:t.sel,href:t.url,indicator:!!t.badgeCount},[t.icon?(o(),c(`craft-icon`,{key:0,name:t.icon,slot:`icon`},null,8,z)):(o(),c(`span`,B)),x(` `+e(t.label),1)],8,R))),128))])):S(``,!0)],64)):S(``,!0)],8,I))),128)),C(`cp-queue-indicator`,{".displayedJob":i.value.displayedJob,".hasReservedJobs":i.value.hasReservedJobs,".hasWaitingJobs":i.value.hasWaitingJobs},null,40,V)]))}}),[[`__scopeId`,`data-v-2115cac3`]]),U={class:`flex justify-center py-4 px-2 text-muted`},W={lang:`en`,class:`flex items-center gap-2`},G={class:`edition-logo`},K={"aria-hidden":`true`},q={class:`sr-only`},J=y(n({__name:`EditionInfo`,setup(t){let{app:n}=j(),r=b(()=>`${n.edition.name} Edition`);return(t,i)=>(o(),c(`div`,U,[C(`div`,null,[C(`span`,W,[i[0]||=x(` Craft CMS `,-1),C(`span`,G,[C(`span`,K,e(v(n).edition.name),1),C(`span`,q,e(r.value),1)]),x(` `+e(v(n).version),1)])])]))}}),[[`__scopeId`,`data-v-f8b4ece7`]]),Y={},X={class:`dev-mode`};function Z(e,t){return o(),c(`div`,X,[...t[0]||=[C(`div`,{class:`inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg`},` Dev Mode is enabled `,-1)]])}var Q=y(Y,[[`render`,Z],[`__scopeId`,`data-v-52fa7a33`]]),ne=[`data-visibility`,`data-mode`,`aria-label`],re={class:`cp-sidebar__header`},ie={key:0,class:`sidebar-header`},ae=[`label`],oe={class:`cp-sidebar__body`},se={class:`cp-sidebar__footer`},ce=y(n({__name:`CpSidebar`,props:{mode:{default:`floating`},visibility:{default:`hidden`}},emits:[`close`,`dock`],setup(e,{emit:t}){let n=t,r=b(()=>e.mode===`floating`);return a(()=>e.visibility,async e=>{r.value&&e===`visible`&&(await s(),document.querySelector(`.cp-sidebar`).querySelector(`button, [href], [tabindex]:not([tabindex="-1"])`)?.focus())}),(t,r)=>(o(),c(`nav`,{class:`cp-sidebar`,"data-visibility":e.visibility,"data-mode":e.mode,"aria-label":v(T)(`Primary`)},[e.visibility===`visible`?(o(),c(h,{key:0},[C(`div`,re,[e.mode===`docked`?S(``,!0):(o(),c(`div`,ie,[l(F),r[1]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,{size:`small`,icon:``,onClick:r[0]||=e=>n(`close`),type:`button`},[C(`craft-icon`,{name:`x`,style:{"font-size":`0.7em`},label:v(T)(`Close`)},null,8,ae)])]))]),C(`div`,oe,[l(H)]),C(`div`,se,[l(J),l(Q)])],64)):S(``,!0)],8,ne))}}),[[`__scopeId`,`data-v-c4268663`]]),le=[`aria-label`],ue={class:`breadcrumbs`},de={key:2,class:`separator`},fe=y(n({__name:`Breadcrumbs`,props:{items:{},separator:{default:`/`}},setup(t){return(n,r)=>(o(),c(`nav`,{"aria-label":v(T)(`Breadcrumbs`)},[C(`ul`,ue,[(o(!0),c(h,null,w(t.items,(n,r)=>(o(),c(`li`,{key:r,class:d({"breadcrumb-item":!0,"breadcrumb-item--active":r===t.items.length-1})},[n.url?(o(),p(E,{key:0,href:n.url},{default:i(()=>[x(e(n.label),1)]),_:2},1032,[`href`])):(o(),c(h,{key:1},[x(e(n.label),1)],64)),r(o(),p(O,null,{default:i(()=>[v(n)?(o(),c(`div`,pe,e(v(n)),1)):S(``,!0)]),_:1}))}}),he={class:`cp`},ge={class:`cp__header`},_e=[`href`],ve={class:`flex gap-2 p-2`},ye=[`name`,`label`],be={icon:``,appearance:`plain`},xe=[`label`],Se={key:0,variant:`danger`,rounded:`none`},Ce={key:1,variant:`success`,rounded:`none`},we={class:`cp__sidebar`},Te={class:`cp__main`},Ee={key:0,class:`px-4 py-2 border-b border-b-neutral-border-quiet`},De={id:`main`,tabindex:`-1`},$={class:`index-grid index-grid--header`},Oe={class:`index-grid__aside`},ke={class:`text-xl`},Ae={class:`index-grid__main`},je={class:`cp__footer`},Me={key:0,class:`fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2`},Ne={class:`bg-blue-50 border border-blue-500 py-1 px-4 rounded`},Pe=[`label`],Fe=[`label`],Ie=y(n({__name:`AppLayout`,props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1},additionalSkipLinks:{}},setup(n){m(e=>({c87de578:W.value}));let i=n,{system:s}=j(),{messages:u}=D(),y=_(),x=b(()=>y.props.flash?.error??u.value.error??null),E=b(()=>y.props.flash?.success??u.value.success??null),O=b(()=>y.props.crumbs??null),M=b(()=>[{label:T(`Skip to main section`),url:`#main`},...i.additionalSkipLinks??[]]),N=r(`sidebarToggle`),{announcement:P,announce:I}=A(),L=b(()=>{let e=i.title?.trim();return e?`${e} - ${s.name}`:s.name});a(E,e=>I(e)),a(x,e=>I(e));let R=ee({sidebar:{mode:`floating`,visibility:`hidden`}}),z=te(`(min-width: 1024px)`),B=g(!1);a(z,e=>{e?(R.sidebar.mode=`docked`,R.sidebar.visibility=`visible`):(R.sidebar.mode=`floating`,R.sidebar.visibility=`hidden`)},{immediate:!0});function V(){R.sidebar.visibility===`visible`?R.sidebar.visibility=`hidden`:R.sidebar.visibility=`visible`}function H(){R.sidebar.visibility=`hidden`,N.value.focus()}let U=b(()=>R.sidebar.visibility===`visible`?`x`:`bars`),W=b(()=>R.sidebar.mode===`docked`?R.sidebar.visibility===`visible`?`var(--global-sidebar-width)`:`0`:`auto`);return(r,i)=>(o(),c(h,null,[l(v(f),{title:L.value},null,8,[`title`]),l(me,{debug:!0}),C(`div`,he,[C(`header`,ge,[(o(!0),c(h,null,w(M.value,t=>(o(),c(`a`,{key:t.url,href:t.url,class:`skip-link skip-link--global`},e(t.label),9,_e))),128)),C(`div`,ve,[v(z)?S(``,!0):(o(),c(`craft-button`,{key:0,icon:``,type:`button`,appearance:`plain`,onClick:V,ref_key:`sidebarToggle`,ref:N},[C(`craft-icon`,{name:U.value,label:v(T)(`Toggle menu`)},null,8,ye)],512)),v(z)?(o(),p(F,{key:1})):S(``,!0),i[2]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,be,[C(`craft-icon`,{name:`search`,label:v(T)(`Search`)},null,8,xe)])]),x.value?(o(),c(`craft-callout`,Se,e(x.value),1)):S(``,!0),E.value?(o(),c(`craft-callout`,Ce,e(E.value),1)):S(``,!0)]),C(`div`,we,[l(ce,{mode:R.sidebar.mode,visibility:R.sidebar.visibility,onClose:H},null,8,[`mode`,`visibility`])]),C(`div`,Te,[t(r.$slots,`main`,{},()=>[t(r.$slots,`breadcrumbs`,{},()=>[O.value?(o(),c(`div`,Ee,[l(fe,{items:O.value},null,8,[`items`])])):S(``,!0)],!0),C(`main`,De,[t(r.$slots,`header`,{},()=>[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[C(`div`,$,[C(`div`,Oe,[t(r.$slots,`title`,{},()=>[C(`h1`,ke,e(n.title),1)],!0),t(r.$slots,`title-badge`,{},void 0,!0)]),C(`div`,Ae,[t(r.$slots,`actions`,{},void 0,!0)])])],2)],!0),C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`default`,{},void 0,!0)],2)])],!0)]),C(`div`,je,[C(`footer`,null,[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`footer`,{},void 0,!0)],2)])])]),n.debug?(o(),c(`div`,Me,[C(`div`,Ne,e(v(P)??`No announcement`),1),C(`div`,null,[B.value?(o(),p(k,{key:0,data:n.debug,class:`max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full`},null,8,[`data`])):S(``,!0),B.value?(o(),c(`craft-button`,{key:1,icon:``,type:`button`,onClick:i[0]||=e=>B.value=!1},[C(`craft-icon`,{label:v(T)(`Close Debug panel`),name:`x`},null,8,Pe)])):(o(),c(`craft-button`,{key:2,type:`button`,onClick:i[1]||=e=>B.value=!0,icon:``},[C(`craft-icon`,{name:`code`,label:v(T)(`Show debug variables`)},null,8,Fe)]))])])):S(``,!0)],64))}}),[[`__scopeId`,`data-v-af8bc5be`]]);export{Ie as t};
\ No newline at end of file
+import{$ as e,B as t,E as n,G as r,J as i,K as a,L as o,P as s,S as c,T as l,V as u,X as d,a as f,b as p,d as m,h,it as g,l as _,lt as v,rt as ee,t as y,v as b,w as x,x as S,y as C,z as w}from"./_plugin-vue_export-helper.js";import{r as T}from"./nav-item-9g3ebwBJ.js";import{a as E,i as D,n as O,r as k,t as A}from"./useAnnouncer.js";import{a as j,r as te}from"./dist.js";var M={class:`system-info__icon`},N=[`src`],P={class:`system-info__name`},F=y(n({__name:`SystemInfo`,setup(t){let n=j(),r=b(()=>n.system),a=b(()=>n.site),s=b(()=>a.value.url?`a`:`div`);return(t,n)=>(o(),p(u(s.value),{class:`system-info`,href:a.value.url,target:a.value.url?`_blank`:null},{default:i(()=>[C(`div`,M,[r.value.icon?(o(),c(`img`,{key:0,src:r.value.icon,alt:``},null,8,N)):S(``,!0)]),C(`div`,P,e(r.value.name),1)]),_:1},8,[`href`,`target`]))}}),[[`__scopeId`,`data-v-d8aced2c`]]),I=[`icon`,`href`,`active`,`indicator`],L={key:0,slot:`subnav`},R=[`active`,`href`,`indicator`],z=[`name`],B={key:1,class:`nav-indicator`,slot:`icon`},V=[`.displayedJob`,`.hasReservedJobs`,`.hasWaitingJobs`],H=y(n({__name:`MainNav`,setup(t){let n=_(),{nav:r}=j(),i=b(()=>n.props.queue);return(t,n)=>(o(),c(`craft-nav-list`,null,[(o(!0),c(h,null,w(v(r),t=>(o(),c(`craft-nav-item`,{key:t.url,icon:t.icon,href:t.url,active:t.sel,indicator:!!t.badgeCount},[x(e(t.label)+` `,1),t.subnav?(o(),c(h,{key:0},[t.subnav?(o(),c(`craft-nav-list`,L,[(o(!0),c(h,null,w(t.subnav,t=>(o(),c(`craft-nav-item`,{key:t.url,active:t.sel,href:t.url,indicator:!!t.badgeCount},[t.icon?(o(),c(`craft-icon`,{key:0,name:t.icon,slot:`icon`},null,8,z)):(o(),c(`span`,B)),x(` `+e(t.label),1)],8,R))),128))])):S(``,!0)],64)):S(``,!0)],8,I))),128)),C(`cp-queue-indicator`,{".displayedJob":i.value.displayedJob,".hasReservedJobs":i.value.hasReservedJobs,".hasWaitingJobs":i.value.hasWaitingJobs},null,40,V)]))}}),[[`__scopeId`,`data-v-2115cac3`]]),U={class:`flex justify-center py-4 px-2 text-muted`},W={lang:`en`,class:`flex items-center gap-2`},G={class:`edition-logo`},K={"aria-hidden":`true`},q={class:`sr-only`},J=y(n({__name:`EditionInfo`,setup(t){let{app:n}=j(),r=b(()=>`${n.edition.name} Edition`);return(t,i)=>(o(),c(`div`,U,[C(`div`,null,[C(`span`,W,[i[0]||=x(` Craft CMS `,-1),C(`span`,G,[C(`span`,K,e(v(n).edition.name),1),C(`span`,q,e(r.value),1)]),x(` `+e(v(n).version),1)])])]))}}),[[`__scopeId`,`data-v-f8b4ece7`]]),Y={},X={class:`dev-mode`};function Z(e,t){return o(),c(`div`,X,[...t[0]||=[C(`div`,{class:`inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg`},` Dev Mode is enabled `,-1)]])}var Q=y(Y,[[`render`,Z],[`__scopeId`,`data-v-b7da7c4e`]]),ne=[`data-visibility`,`data-mode`,`aria-label`],re={class:`cp-sidebar__header`},ie={key:0,class:`sidebar-header`},ae=[`label`],oe={class:`cp-sidebar__body`},se={class:`cp-sidebar__footer`},ce=y(n({__name:`CpSidebar`,props:{mode:{default:`floating`},visibility:{default:`hidden`}},emits:[`close`,`dock`],setup(e,{emit:t}){let n=t,r=b(()=>e.mode===`floating`);return a(()=>e.visibility,async e=>{r.value&&e===`visible`&&(await s(),document.querySelector(`.cp-sidebar`).querySelector(`button, [href], [tabindex]:not([tabindex="-1"])`)?.focus())}),(t,r)=>(o(),c(`nav`,{class:`cp-sidebar`,"data-visibility":e.visibility,"data-mode":e.mode,"aria-label":v(T)(`Primary`)},[e.visibility===`visible`?(o(),c(h,{key:0},[C(`div`,re,[e.mode===`docked`?S(``,!0):(o(),c(`div`,ie,[l(F),r[1]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,{size:`small`,icon:``,onClick:r[0]||=e=>n(`close`),type:`button`},[C(`craft-icon`,{name:`x`,style:{"font-size":`0.7em`},label:v(T)(`Close`)},null,8,ae)])]))]),C(`div`,oe,[l(H)]),C(`div`,se,[l(J),l(Q)])],64)):S(``,!0)],8,ne))}}),[[`__scopeId`,`data-v-c4268663`]]),le=[`aria-label`],ue={class:`breadcrumbs`},de={key:2,class:`separator`},fe=y(n({__name:`Breadcrumbs`,props:{items:{},separator:{default:`/`}},setup(t){return(n,r)=>(o(),c(`nav`,{"aria-label":v(T)(`Breadcrumbs`)},[C(`ul`,ue,[(o(!0),c(h,null,w(t.items,(n,r)=>(o(),c(`li`,{key:r,class:d({"breadcrumb-item":!0,"breadcrumb-item--active":r===t.items.length-1})},[n.url?(o(),p(E,{key:0,href:n.url},{default:i(()=>[x(e(n.label),1)]),_:2},1032,[`href`])):(o(),c(h,{key:1},[x(e(n.label),1)],64)),r(o(),p(O,null,{default:i(()=>[v(n)?(o(),c(`div`,pe,e(v(n)),1)):S(``,!0)]),_:1}))}}),he={class:`cp`},ge={class:`cp__header`},_e=[`href`],ve={class:`flex gap-2 p-2`},ye=[`name`,`label`],be={icon:``,appearance:`plain`},xe=[`label`],Se={key:0,variant:`danger`,rounded:`none`},Ce={key:1,variant:`success`,rounded:`none`},we={class:`cp__sidebar`},Te={class:`cp__main`},Ee={key:0,class:`px-4 py-2 border-b border-b-neutral-border-quiet`},De={id:`main`,tabindex:`-1`},$={class:`index-grid index-grid--header`},Oe={class:`index-grid__aside`},ke={class:`text-xl`},Ae={class:`index-grid__main`},je={class:`cp__footer`},Me={key:0,class:`fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2`},Ne={class:`bg-blue-50 border border-blue-500 py-1 px-4 rounded`},Pe=[`label`],Fe=[`label`],Ie=y(n({__name:`AppLayout`,props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1},additionalSkipLinks:{}},setup(n){m(e=>({c87de578:W.value}));let i=n,{system:s}=j(),{messages:u}=D(),y=_(),x=b(()=>y.props.flash?.error??u.value.error??null),E=b(()=>y.props.flash?.success??u.value.success??null),O=b(()=>y.props.crumbs??null),M=b(()=>[{label:T(`Skip to main section`),url:`#main`},...i.additionalSkipLinks??[]]),N=r(`sidebarToggle`),{announcement:P,announce:I}=A(),L=b(()=>{let e=i.title?.trim();return e?`${e} - ${s.name}`:s.name});a(E,e=>I(e)),a(x,e=>I(e));let R=ee({sidebar:{mode:`floating`,visibility:`hidden`}}),z=te(`(min-width: 1024px)`),B=g(!1);a(z,e=>{e?(R.sidebar.mode=`docked`,R.sidebar.visibility=`visible`):(R.sidebar.mode=`floating`,R.sidebar.visibility=`hidden`)},{immediate:!0});function V(){R.sidebar.visibility===`visible`?R.sidebar.visibility=`hidden`:R.sidebar.visibility=`visible`}function H(){R.sidebar.visibility=`hidden`,N.value.focus()}let U=b(()=>R.sidebar.visibility===`visible`?`x`:`bars`),W=b(()=>R.sidebar.mode===`docked`?R.sidebar.visibility===`visible`?`var(--global-sidebar-width)`:`0`:`auto`);return(r,i)=>(o(),c(h,null,[l(v(f),{title:L.value},null,8,[`title`]),l(me,{debug:!0}),C(`div`,he,[C(`header`,ge,[(o(!0),c(h,null,w(M.value,t=>(o(),c(`a`,{key:t.url,href:t.url,class:`skip-link skip-link--global`},e(t.label),9,_e))),128)),C(`div`,ve,[v(z)?S(``,!0):(o(),c(`craft-button`,{key:0,icon:``,type:`button`,appearance:`plain`,onClick:V,ref_key:`sidebarToggle`,ref:N},[C(`craft-icon`,{name:U.value,label:v(T)(`Toggle menu`)},null,8,ye)],512)),v(z)?(o(),p(F,{key:1})):S(``,!0),i[2]||=C(`div`,{class:`ml-auto`},null,-1),C(`craft-button`,be,[C(`craft-icon`,{name:`search`,label:v(T)(`Search`)},null,8,xe)])]),x.value?(o(),c(`craft-callout`,Se,e(x.value),1)):S(``,!0),E.value?(o(),c(`craft-callout`,Ce,e(E.value),1)):S(``,!0)]),C(`div`,we,[l(ce,{mode:R.sidebar.mode,visibility:R.sidebar.visibility,onClose:H},null,8,[`mode`,`visibility`])]),C(`div`,Te,[t(r.$slots,`main`,{},()=>[t(r.$slots,`breadcrumbs`,{},()=>[O.value?(o(),c(`div`,Ee,[l(fe,{items:O.value},null,8,[`items`])])):S(``,!0)],!0),C(`main`,De,[t(r.$slots,`header`,{},()=>[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[C(`div`,$,[C(`div`,Oe,[t(r.$slots,`title`,{},()=>[C(`h1`,ke,e(n.title),1)],!0),t(r.$slots,`title-badge`,{},void 0,!0)]),C(`div`,Ae,[t(r.$slots,`actions`,{},void 0,!0)])])],2)],!0),C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`default`,{},void 0,!0)],2)])],!0)]),C(`div`,je,[C(`footer`,null,[C(`div`,{class:d({container:!0,"container--full":n.fullWidth})},[t(r.$slots,`footer`,{},void 0,!0)],2)])])]),n.debug?(o(),c(`div`,Me,[C(`div`,Ne,e(v(P)??`No announcement`),1),C(`div`,null,[B.value?(o(),p(k,{key:0,data:n.debug,class:`max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full`},null,8,[`data`])):S(``,!0),B.value?(o(),c(`craft-button`,{key:1,icon:``,type:`button`,onClick:i[0]||=e=>B.value=!1},[C(`craft-icon`,{label:v(T)(`Close Debug panel`),name:`x`},null,8,Pe)])):(o(),c(`craft-button`,{key:2,type:`button`,onClick:i[1]||=e=>B.value=!0,icon:``},[C(`craft-icon`,{name:`code`,label:v(T)(`Show debug variables`)},null,8,Fe)]))])])):S(``,!0)],64))}}),[[`__scopeId`,`data-v-af8bc5be`]]);export{Ie as t};
\ No newline at end of file
diff --git a/resources/build/InputCombobox.js b/resources/build/InputCombobox.js
index ff3dc4278d0..6b05f182b62 100644
--- a/resources/build/InputCombobox.js
+++ b/resources/build/InputCombobox.js
@@ -1,4 +1,4 @@
import{$ as e,B as t,E as n,F as r,G as i,I as a,J as o,K as s,L as c,P as l,Q as u,R as d,S as f,T as p,X as m,_ as h,at as g,b as _,ct as v,h as y,it as b,j as x,k as S,lt as C,nt as w,ot as T,q as E,rt as D,t as O,v as k,w as A,x as j,y as M,z as N}from"./_plugin-vue_export-helper.js";import{a as ee,c as P,d as te,f as F,i as ne,l as I,m as L,n as R,o as z,p as B,r as V,s as re,t as H,u as U}from"./keyboard.js";function W(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length{r=e},o}function ie(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var ae=(e,t)=>Math.abs(e-t)<1.01,oe=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},se=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ce=e=>e,le=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},ue=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(se(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(se(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},de={passive:!0},fe=typeof window>`u`?!0:`onscrollend`in window,pe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&fe?()=>void 0:oe(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,de);let l=e.options.useScrollendEvent&&fe;return l&&n.addEventListener(`scrollend`,c,de),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},me=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},he=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},ge=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ce,rangeExtractor:le,onChange:()=>{},measureElement:me,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=W(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=W(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=W(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=W(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=W(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=W(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ie(t[_e(0,t.length-1,e=>ie(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0,i=t=>{if(!this.targetWindow)return;let r=this.getOffsetForIndex(e,t);if(!r){console.warn(`Failed to get offset for index:`,e);return}let[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,o);if(!n){console.warn(`Failed to get offset for index:`,e);return}ae(n[0],t)||a(o)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}},_e=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=_e(0,i,a,n),s=o;if(r===1)for(;s1){let a=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function ye(e){let t=new ge(C(e)),n=g(t),r=t._didMount();return s(()=>C(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),s(()=>C(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;v(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),v(n)},{immediate:!0}),w(r),n}function be(e){return ye(k(()=>({observeElementRect:ue,observeElementOffset:pe,scrollToFn:he,...C(e)})))}function xe(e,t,n){let r=b(n?.value),i=k(()=>e.value!==void 0);return[k(()=>i.value?e.value:r.value),function(e){return i.value||(r.value=e),t?.(e)}]}function Se(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function G(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...e)})},setTimeout(...e){let n=setTimeout(...e);t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return Se(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=G();return e(t),this.add(()=>t.dispose())},add(t){return e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function Ce(){let e=G();return a(()=>e.dispose()),e}function we(){let e=Ce();return t=>{e.dispose(),e.nextFrame(t)}}var Te=Object.defineProperty,Ee=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>(Ee(e,typeof t==`symbol`?t:t+``,n),n),K=new class{constructor(){De(this,`current`,this.detect()),De(this,`currentId`,0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}};function Oe(e){if(K.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty(`value`)){let t=B(e);if(t)return t.ownerDocument}return document}var ke=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),Ae=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e))(Ae||{}),je=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(je||{}),Me=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(Me||{}),Ne=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(Ne||{});function Pe(e,t=0){return e===Oe(e)?.body?!1:F(t,{0(){return e.matches(ke)},1(){let t=e;for(;t!==null;){if(t.matches(ke))return!0;t=t.parentElement}return!1}})}var Fe=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(Fe||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0)),[`textarea`,`input`].join(`,`);function Ie(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Le(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Re(){return/Android/gi.test(window.navigator.userAgent)}function ze(){return Le()||Re()}function q(e,t,n){K.isServer||E(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Be(e,t,n){K.isServer||E(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Ve(e,t,n=k(()=>!0)){function r(r,i){if(!n.value||r.defaultPrevented)return;let a=i(r);if(a===null||!a.getRootNode().contains(a))return;let o=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of o){if(e===null)continue;let t=e instanceof HTMLElement?e:B(e);if(t!=null&&t.contains(a)||r.composed&&r.composedPath().includes(t))return}return!Pe(a,Ne.Loose)&&a.tabIndex!==-1&&r.preventDefault(),t(r,a)}let i=b(null);q(`pointerdown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`mousedown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`click`,e=>{ze()||(i.value&&=(r(e,()=>i.value),null))},!0),q(`touchend`,e=>r(e,()=>e.target instanceof HTMLElement?e.target:null),!0),Be(`blur`,e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e){return[e.screenX,e.screenY]}function Ue(){let e=b([-1,-1]);return{wasMoved(t){let n=He(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=He(t)}}}function We({container:e,accept:t,walk:n,enabled:r}){E(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let a=Oe(e);if(!a)return;let o=Object.assign(e=>t(e),{acceptNode:t}),s=a.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,o,!1);for(;s.nextNode();)n(s.currentNode)})}var Ge=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(Ge||{}),Ke=n({name:`Hidden`,props:{as:{type:[Object,String],default:`div`},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e;return z({ourProps:{"aria-hidden":(r&2)==2?!0:i[`aria-hidden`]??void 0,hidden:(r&4)==4?!0:void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(r&4)==4&&(r&2)!=2&&{display:`none`}}},theirProps:i,slot:{},attrs:n,slots:t,name:`Hidden`})}}}),qe=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(qe||{});function Je(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var J=[];Je(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&J[0]!==e.target&&(J.unshift(e.target),J=J.filter(e=>e!=null&&e.isConnected),J.splice(10))}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function Ye(e){throw Error(`Unexpected object: `+e)}var Y=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Y||{});function Xe(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(tt||{}),nt=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(nt||{}),rt=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(rt||{}),it=Symbol(`ComboboxContext`);function X(e){let t=x(it,null);if(t===null){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,X),t}return t}var at=Symbol(`VirtualContext`),ot=n({name:`VirtualProvider`,setup(e,{slots:t}){let n=X(`VirtualProvider`),r=k(()=>{let e=B(n.optionsRef);if(!e)return{start:0,end:0};let t=window.getComputedStyle(e);return{start:parseFloat(t.paddingBlockStart||t.paddingTop),end:parseFloat(t.paddingBlockEnd||t.paddingBottom)}}),i=be(k(()=>({scrollPaddingStart:r.value.start,scrollPaddingEnd:r.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return B(n.optionsRef)},overscan:12}))),a=k(()=>n.virtual.value?.options),o=b(0);return s([a],()=>{o.value+=1}),d(at,n.virtual.value?i:null),()=>[S(`div`,{style:{position:`relative`,width:`100%`,height:`${i.value.getTotalSize()}px`},ref:e=>{if(e){if(typeof process<`u`&&{}.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&i.value.scrollToIndex(n.activeOptionIndex.value)}}},i.value.getVirtualItems().map(e=>h(t.default({option:n.virtual.value.options[e.index],open:n.comboboxState.value===0})[0],{key:`${o.value}-${e.index}`,"data-index":e.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})))]}}),st=n({name:`Combobox`,emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:`template`},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:i}){let a=b(1),o=b(null),c=b(null),l=b(null),u=b(null),f=b({static:!1,hold:!1}),p=b([]),m=b(null),h=b(2),g=b(!1);function _(e=e=>e){let t=m.value===null?null:p.value[m.value],n=e(p.value.slice()),r=n.length>0&&n[0].dataRef.order.value!==null?n.sort((e,t)=>e.dataRef.order.value-t.dataRef.order.value):Ie(n,e=>B(e.dataRef.domRef)),i=t?r.indexOf(t):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let v=k(()=>+!!e.multiple),x=k(()=>e.nullable),[C,w]=xe(k(()=>e.modelValue),e=>i(`update:modelValue`,e),k(()=>e.defaultValue)),E=k(()=>C.value===void 0?F(v.value,{1:[],0:void 0}):C.value),O=null,A=null;function j(e){return F(v.value,{0(){return w?.(e)},1:()=>{let t=T(M.value.value).slice(),n=T(e),r=t.findIndex(e=>M.compare(n,T(e)));return r===-1?t.push(n):t.splice(r,1),w?.(t)}})}s([k(()=>{})],([e],[t])=>{if(M.virtual.value&&e&&t&&m.value!==null){let n=e.indexOf(t[m.value]);n===-1?m.value=null:m.value=n}});let M={comboboxState:a,value:E,mode:v,compare(t,n){if(typeof e.by==`string`){let r=e.by;return t?.[r]===n?.[r]}return e.by===null?et(t,n):e.by(t,n)},calculateIndex(t){return M.virtual.value?e.by===null?M.virtual.value.options.indexOf(t):M.virtual.value.options.findIndex(e=>M.compare(e,t)):p.value.findIndex(e=>M.compare(e.dataRef.value,t))},defaultValue:k(()=>e.defaultValue),nullable:x,immediate:k(()=>!1),virtual:k(()=>null),inputRef:c,labelRef:o,buttonRef:l,optionsRef:u,disabled:k(()=>e.disabled),options:p,change(e){w(e)},activeOptionIndex:k(()=>{if(g.value&&m.value===null&&(M.virtual.value?M.virtual.value.options.length>0:p.value.length>0)){if(M.virtual.value){let e=M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))});if(e!==-1)return e}let e=p.value.findIndex(e=>!e.dataRef.disabled);if(e!==-1)return e}return m.value}),activationTrigger:h,optionsPropsRef:f,closeCombobox(){g.value=!1,!e.disabled&&a.value!==1&&(a.value=1,m.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&a.value!==0){if(M.value.value){let e=M.calculateIndex(M.value.value);e!==-1&&(m.value=e)}a.value=0}},setActivationTrigger(e){h.value=e},goToOption(t,n,r){g.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(e.disabled||u.value&&!f.value.static&&a.value===1)return;if(M.virtual.value){m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>M.virtual.value.options,resolveActiveIndex:()=>M.activeOptionIndex.value??M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))})??null,resolveDisabled:e=>M.virtual.value.disabled(e),resolveId(){throw Error(`Function not implemented.`)}}),h.value=r??2;return}let i=_();if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.disabled);e!==-1&&(i.activeOptionIndex=e)}m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled}),h.value=r??2,p.value=i.options})},selectOption(e){let t=p.value.find(t=>t.id===e);if(!t)return;let{dataRef:n}=t;j(n.value)},selectActiveOption(){if(M.activeOptionIndex.value!==null){if(M.virtual.value)j(M.virtual.value.options[M.activeOptionIndex.value]);else{let{dataRef:e}=p.value[M.activeOptionIndex.value];j(e.value)}M.goToOption(Y.Specific,M.activeOptionIndex.value)}},registerOption(e,t){let n=D({id:e,dataRef:t});if(M.virtual.value){p.value.push(n);return}A&&cancelAnimationFrame(A);let r=_(e=>(e.push(n),e));m.value===null&&M.isSelected(t.value.value)&&(r.activeOptionIndex=r.options.indexOf(n)),p.value=r.options,m.value=r.activeOptionIndex,h.value=2,r.options.some(e=>!B(e.dataRef.domRef))&&(A=requestAnimationFrame(()=>{let e=_();p.value=e.options,m.value=e.activeOptionIndex}))},unregisterOption(e,t){if(O!==null&&cancelAnimationFrame(O),t&&(g.value=!0),M.virtual.value){p.value=p.value.filter(t=>t.id!==e);return}let n=_(t=>{let n=t.findIndex(t=>t.id===e);return n!==-1&&t.splice(n,1),t});p.value=n.options,m.value=n.activeOptionIndex,h.value=2},isSelected(e){return F(v.value,{0:()=>M.compare(T(M.value.value),T(e)),1:()=>T(M.value.value).some(t=>M.compare(T(t),T(e)))})},isActive(e){return m.value===M.calculateIndex(e)}};Ve([c,l,u],()=>M.closeCombobox(),k(()=>a.value===0)),d(it,M),ee(k(()=>F(a.value,{0:R.Open,1:R.Closed})));let N=k(()=>B(c)?.closest(`form`));return r(()=>{s([N],()=>{if(!N.value||e.defaultValue===void 0)return;function t(){M.change(e.defaultValue)}return N.value.addEventListener(`reset`,t),()=>{var e;(e=N.value)==null||e.removeEventListener(`reset`,t)}},{immediate:!0})}),()=>{let{name:r,disabled:i,form:o,...s}=e,c={open:a.value===0,disabled:i,activeIndex:M.activeOptionIndex.value,activeOption:M.activeOptionIndex.value===null?null:M.virtual.value?M.virtual.value.options[M.activeOptionIndex.value??0]:M.options.value[M.activeOptionIndex.value]?.dataRef.value??null,value:E.value};return S(y,[...r!=null&&E.value!=null?Ze({[r]:E.value}).map(([e,t])=>S(Ke,re({features:Ge.Hidden,key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:o,disabled:i,name:e,value:t}))):[],z({theirProps:{...n,...U(s,[`by`,`defaultValue`,`immediate`,`modelValue`,`multiple`,`nullable`,`onUpdate:modelValue`,`virtual`])},ourProps:{},slot:c,slots:t,attrs:n,name:`Combobox`})])}}});n({name:`ComboboxLabel`,props:{as:{type:[Object,String],default:`label`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){let r=e.id??`headlessui-combobox-label-${L()}`,i=X(`ComboboxLabel`);function a(){var e;(e=B(i.inputRef))==null||e.focus({preventScroll:!0})}return()=>{let o={open:i.comboboxState.value===0,disabled:i.disabled.value},{...s}=e;return z({ourProps:{id:r,ref:i.labelRef,onClick:a},theirProps:s,slot:o,attrs:t,slots:n,name:`ComboboxLabel`})}}});var ct=n({name:`ComboboxButton`,props:{as:{type:[Object,String],default:`button`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=e.id??`headlessui-combobox-button-${L()}`,a=X(`ComboboxButton`);r({el:a.buttonRef,$el:a.buttonRef});function o(e){a.disabled.value||(a.comboboxState.value===0?a.closeCombobox():(e.preventDefault(),a.openCombobox()),l(()=>B(a.inputRef)?.focus({preventScroll:!0})))}function s(e){switch(e.key){case H.ArrowDown:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&a.openCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.ArrowUp:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&(a.openCombobox(),l(()=>{a.value.value||a.goToOption(Y.Last)})),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.Escape:if(a.comboboxState.value!==0)return;e.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&e.stopPropagation(),a.closeCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return}}let c=te(k(()=>({as:e.as,type:t.type})),a.buttonRef);return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value,value:a.value.value},{...l}=e;return z({ourProps:{ref:a.buttonRef,id:i,type:c.value,tabindex:`-1`,"aria-haspopup":`listbox`,"aria-controls":B(a.optionsRef)?.id,"aria-expanded":a.comboboxState.value===0,"aria-labelledby":a.labelRef.value?[B(a.labelRef)?.id,i].join(` `):void 0,disabled:a.disabled.value===!0?!0:void 0,onKeydown:s,onClick:o},theirProps:l,slot:r,attrs:t,slots:n,name:`ComboboxButton`})}}}),lt=n({name:`ComboboxInput`,props:{as:{type:[Object,String],default:`input`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){let o=e.id??`headlessui-combobox-input-${L()}`,c=X(`ComboboxInput`),u=k(()=>Oe(B(c.inputRef))),d={value:!1};a({el:c.inputRef,$el:c.inputRef});function f(){c.change(null);let e=B(c.optionsRef);e&&(e.scrollTop=0),c.goToOption(Y.Nothing)}let p=k(()=>{let t=c.value.value;return B(c.inputRef)?e.displayValue!==void 0&&t!==void 0?e.displayValue(t)??``:typeof t==`string`?t:``:``});r(()=>{s([p,c.comboboxState,u],([e,t],[n,r])=>{if(d.value)return;let i=B(c.inputRef);i&&((r===0&&t===1||e!==n)&&(i.value=e),requestAnimationFrame(()=>{if(d.value||!i||u.value?.activeElement!==i)return;let{selectionStart:e,selectionEnd:t}=i;Math.abs((t??0)-(e??0))===0&&e===0&&i.setSelectionRange(i.value.length,i.value.length)}))},{immediate:!0}),s([c.comboboxState],([e],[t])=>{if(e===0&&t===1){if(d.value)return;let e=B(c.inputRef);if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value=``,e.value=t,i===null?e.setSelectionRange(n,r):e.setSelectionRange(n,r,i)}})});let m=b(!1);function h(){m.value=!0}function g(){G().nextFrame(()=>{m.value=!1})}let _=we();function v(e){switch(d.value=!0,_(()=>{d.value=!1}),e.key){case H.Enter:if(d.value=!1,c.comboboxState.value!==0||m.value)return;if(e.preventDefault(),e.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case H.ArrowDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Next),1:()=>c.openCombobox()});case H.ArrowUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Previous),1:()=>{c.openCombobox(),l(()=>{c.value.value||c.goToOption(Y.Last)})}});case H.Home:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.PageUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.End:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.PageDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.Escape:if(d.value=!1,c.comboboxState.value!==0)return;e.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&e.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&f(),c.closeCombobox();break;case H.Tab:if(d.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function y(e){t(`change`,e),c.nullable.value&&c.mode.value===0&&e.target.value===``&&f(),c.openCombobox()}function x(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);if(d.value=!1,!((t=B(c.optionsRef))!=null&&t.contains(r))&&!((n=B(c.buttonRef))!=null&&n.contains(r))&&c.comboboxState.value===0)return e.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?f():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function S(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);(t=B(c.buttonRef))!=null&&t.contains(r)||(n=B(c.optionsRef))!=null&&n.contains(r)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),G().nextFrame(()=>{c.setActivationTrigger(1)}))}let C=k(()=>e.defaultValue??(c.defaultValue.value===void 0?null:e.displayValue?.call(e,c.defaultValue.value))??c.defaultValue.value??``);return()=>{let t={open:c.comboboxState.value===0},{displayValue:r,onChange:a,...s}=e;return z({ourProps:{"aria-controls":c.optionsRef.value?.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?c.options.value.find(e=>!c.virtual.value.disabled(e.dataRef.value)&&c.compare(e.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value]))?.id:c.options.value[c.activeOptionIndex.value]?.id,"aria-labelledby":B(c.labelRef)?.id??B(c.buttonRef)?.id,"aria-autocomplete":`list`,id:o,onCompositionstart:h,onCompositionend:g,onKeydown:v,onInput:y,onFocus:S,onBlur:x,role:`combobox`,type:n.type??`text`,tabIndex:0,ref:c.inputRef,defaultValue:C.value,disabled:c.disabled.value===!0?!0:void 0},theirProps:s,slot:t,attrs:n,slots:i,features:P.RenderStrategy|P.Static,name:`ComboboxInput`})}}}),ut=n({name:`ComboboxOptions`,props:{as:{type:[Object,String],default:`ul`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:r}){let i=X(`ComboboxOptions`),a=`headlessui-combobox-options-${L()}`;r({el:i.optionsRef,$el:i.optionsRef}),E(()=>{i.optionsPropsRef.value.static=e.static}),E(()=>{i.optionsPropsRef.value.hold=e.hold});let o=V(),s=k(()=>o===null?i.comboboxState.value===0:(o.value&R.Open)===R.Open);We({container:k(()=>B(i.optionsRef)),enabled:k(()=>i.comboboxState.value===0),accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});function c(e){e.preventDefault()}return()=>{let r={open:i.comboboxState.value===0};return z({ourProps:{"aria-labelledby":B(i.labelRef)?.id??B(i.buttonRef)?.id,id:a,ref:i.optionsRef,role:`listbox`,"aria-multiselectable":i.mode.value===1?!0:void 0,onMousedown:c},theirProps:U(e,[`hold`]),slot:r,attrs:t,slots:i.virtual.value&&i.comboboxState.value===0?{...n,default:()=>[S(ot,{},n.default)]}:n,features:P.RenderStrategy|P.Static,visible:s.value,name:`ComboboxOptions`})}}}),dt=n({name:`ComboboxOption`,props:{as:{type:[Object,String],default:`li`},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:i}){let o=X(`ComboboxOption`),s=`headlessui-combobox-option-${L()}`,c=b(null),u=k(()=>e.disabled);i({el:c,$el:c});let d=k(()=>o.virtual.value?o.activeOptionIndex.value===o.calculateIndex(e.value):o.activeOptionIndex.value===null?!1:o.options.value[o.activeOptionIndex.value]?.id===s),f=k(()=>o.isSelected(e.value)),p=x(at,null),m=k(()=>({disabled:e.disabled,value:e.value,domRef:c,order:k(()=>e.order)}));r(()=>o.registerOption(s,m)),a(()=>o.unregisterOption(s,d.value)),E(()=>{let e=B(c);e&&p?.value.measureElement(e)}),E(()=>{o.comboboxState.value===0&&d.value&&(o.virtual.value||o.activationTrigger.value!==0&&l(()=>{var e;return((e=B(c))?.scrollIntoView)?.call(e,{block:`nearest`})}))});function h(e){e.preventDefault(),e.button===qe.Left&&(u.value||(o.selectOption(s),ze()||requestAnimationFrame(()=>B(o.inputRef)?.focus({preventScroll:!0})),o.mode.value===0&&o.closeCombobox()))}function g(){var t;if(e.disabled||(t=o.virtual.value)!=null&&t.disabled(e.value))return o.goToOption(Y.Nothing);let n=o.calculateIndex(e.value);o.goToOption(Y.Specific,n)}let _=Ue();function v(e){_.update(e)}function y(t){var n;if(!_.wasMoved(t)||e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value)return;let r=o.calculateIndex(e.value);o.goToOption(Y.Specific,r,0)}function S(t){var n;_.wasMoved(t)&&(e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value&&(o.optionsPropsRef.value.hold||o.goToOption(Y.Nothing)))}return()=>{let{disabled:r}=e,i={active:d.value,selected:f.value,disabled:r};return z({ourProps:{id:s,ref:c,role:`option`,tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":f.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:v,onMouseenter:v,onPointermove:y,onMousemove:y,onPointerleave:S,onMouseleave:S},theirProps:U(e,[`order`,`value`]),slot:i,attrs:n,slots:t,name:`ComboboxOption`})}}});function ft(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function pt(e,...t){e&&t.length>0&&e.classList.add(...t)}function Z(e,...t){e&&t.length>0&&e.classList.remove(...t)}var mt=(e=>(e.Finished=`finished`,e.Cancelled=`cancelled`,e))(mt||{});function ht(e,t){let n=G();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(`,`).filter(Boolean).map(e=>e.includes(`ms`)?parseFloat(e):parseFloat(e)*1e3).sort((e,t)=>t-e);return t});return a===0?t(`finished`):n.setTimeout(()=>t(`finished`),a+o),n.add(()=>t(`cancelled`)),n.dispose}function gt(e,t,n,r,i,a){let o=G(),s=a===void 0?()=>{}:ft(a);return Z(e,...i),pt(e,...t,...n),o.nextFrame(()=>{Z(e,...n),pt(e,...r),o.add(ht(e,n=>(Z(e,...r,...t),pt(e,...i),s(n))))}),o.add(()=>Z(e,...t,...n,...r,...i)),o.add(()=>s(`cancelled`)),o.dispose}function Q(e=``){return e.split(/\s+/).filter(e=>e.length>1)}var _t=Symbol(`TransitionContext`),vt=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(vt||{});function yt(){return x(_t,null)!==null}function bt(){let e=x(_t,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}function xt(){let e=x(St,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}var St=Symbol(`NestingContext`);function $(e){return`children`in e?$(e.children):e.value.filter(({state:e})=>e===`visible`).length>0}function Ct(e){let t=b([]),n=b(!1);r(()=>n.value=!0),a(()=>n.value=!1);function i(r,i=I.Hidden){let a=t.value.findIndex(({id:e})=>e===r);a!==-1&&(F(i,{[I.Unmount](){t.value.splice(a,1)},[I.Hidden](){t.value[a].state=`hidden`}}),!$(t)&&n.value&&e?.())}function o(e){let n=t.value.find(({id:t})=>t===e);return n?n.state!==`visible`&&(n.state=`visible`):t.value.push({id:e,state:`visible`}),()=>i(e,I.Unmount)}return{children:t,register:o,unregister:i}}var wt=P.RenderStrategy,Tt=n({props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:o}){let c=b(0);function l(){c.value|=R.Opening,t(`beforeEnter`)}function u(){c.value&=~R.Opening,t(`afterEnter`)}function f(){c.value|=R.Closing,t(`beforeLeave`)}function p(){c.value&=~R.Closing,t(`afterLeave`)}if(!yt()&&ne())return()=>S(Et,{...e,onBeforeEnter:l,onAfterEnter:u,onBeforeLeave:f,onAfterLeave:p},i);let h=b(null),g=k(()=>e.unmount?I.Unmount:I.Hidden);o({el:h,$el:h});let{show:_,appear:v}=bt(),{register:y,unregister:x}=xt(),C=b(_.value?`visible`:`hidden`),w={value:!0},T=L(),D={value:!1},O=Ct(()=>{!D.value&&C.value!==`hidden`&&(C.value=`hidden`,x(T),p())});r(()=>{a(y(T))}),E(()=>{if(g.value===I.Hidden&&T){if(_.value&&C.value!==`visible`){C.value=`visible`;return}F(C.value,{hidden:()=>x(T),visible:()=>y(T)})}});let A=Q(e.enter),j=Q(e.enterFrom),M=Q(e.enterTo),N=Q(e.entered),P=Q(e.leave),te=Q(e.leaveFrom),V=Q(e.leaveTo);r(()=>{E(()=>{if(C.value===`visible`){let e=B(h);if(e instanceof Comment&&e.data===``)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function re(e){let t=w.value&&!v.value,n=B(h);!n||!(n instanceof HTMLElement)||t||(D.value=!0,_.value&&l(),_.value||f(),e(_.value?gt(n,A,j,M,N,e=>{D.value=!1,e===mt.Finished&&u()}):gt(n,P,te,V,N,e=>{D.value=!1,e===mt.Finished&&($(O)||(C.value=`hidden`,x(T),p()))})))}return r(()=>{s([_],(e,t,n)=>{re(n),w.value=!1},{immediate:!0})}),d(St,O),ee(k(()=>F(C.value,{visible:R.Open,hidden:R.Closed})|c.value)),()=>{let{appear:t,show:r,enter:a,enterFrom:o,enterTo:s,entered:c,leave:l,leaveFrom:u,leaveTo:d,...f}=e,p={ref:h};return z({theirProps:{...f,...v.value&&_.value&&K.isServer?{class:m([n.class,f.class,...A,...j])}:{}},ourProps:p,slot:{},slots:i,attrs:n,features:wt,visible:C.value===`visible`,name:`TransitionChild`})}}}),Et=n({inheritAttrs:!1,props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i}){let a=V(),o=k(()=>e.show===null&&a!==null?(a.value&R.Open)===R.Open:e.show);E(()=>{if(![!0,!1].includes(o.value))throw Error('A is used but it is missing a `:show="true | false"` prop.')});let s=b(o.value?`visible`:`hidden`),c=Ct(()=>{s.value=`hidden`}),l=b(!0),u={show:o,appear:k(()=>e.appear||!l.value)};return r(()=>{E(()=>{l.value=!1,o.value?s.value=`visible`:$(c)||(s.value=`hidden`)})}),d(St,c),d(_t,u),()=>{let r=U(e,[`show`,`appear`,`unmount`,`onBeforeEnter`,`onBeforeLeave`,`onAfterEnter`,`onAfterLeave`]),a={unmount:e.unmount};return z({ourProps:{...a,as:`template`},theirProps:{},slot:{},slots:{...i,default:()=>[S(Tt,{onBeforeEnter:()=>t(`beforeEnter`),onAfterEnter:()=>t(`afterEnter`),onBeforeLeave:()=>t(`beforeLeave`),onAfterLeave:()=>t(`afterLeave`),...n,...a,...r},i.default)]},attrs:{},features:wt,visible:s.value===`visible`,name:`Transition`})}}}),Dt=[`active`,`checked`,`hint`],Ot={key:0},kt=n({__name:`InputComboboxOption`,props:{option:{}},setup(n){return(r,i)=>(c(),_(C(dt),{value:n.option,as:`template`},{default:o(({active:i,selected:a})=>[t(r.$slots,`option`,{option:n.option,active:i,selected:a},()=>[M(`craft-option`,{active:i,checked:a,hint:n.option.data?.hint},[n.option.label.startsWith(`$`)||n.option.label.startsWith(`@`)?(c(),f(`code`,Ot,e(n.option.label),1)):(c(),f(y,{key:1},[A(e(n.option.label),1)],64))],8,Dt)])]),_:3},8,[`value`]))}}),At={key:1},jt={class:`group-label`},Mt=O(n({__name:`InputCombobox`,props:{label:{},options:{default:()=>[]},modelValue:{default:``},requireOptionMatch:{type:Boolean,default:!1},transformModelValue:{type:Function,default:e=>e?e.value:``},class:{type:[Boolean,null,String,Object,Array]},placeholder:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,a=t,s=k({get(){let e=null;return a.options.forEach(t=>{t.type===`optgroup`?t.options.forEach(t=>{t.value===a.modelValue&&(e=t)}):t.value===a.modelValue&&(e=t)}),!e&&!a.requireOptionMatch&&(e={label:a.modelValue,value:a.modelValue}),e},set(e){r(`update:modelValue`,a.transformModelValue(e))}}),l=i(`reference`),d=b(a.modelValue??``),h=k(()=>l.value?.getBoundingClientRect()||new DOMRect);function g(e,t){let n=C(e).toLowerCase(),r=C(t);return r.label.toLowerCase().includes(n)||r.value.toLowerCase().includes(n)||(r.data?.keywords?.toLowerCase().includes(n)??!1)}function v(e,t){return C(t).map(t=>{if(t.type===`optgroup`){let n=t.options.filter(t=>g(e,t));return n.length>0?{...t,options:n}:null}return g(e,t)?t:null}).filter(e=>e!==null)}let x=k(()=>d.value===``?a.options:v(d,a.options));function S(e){return e?e.label:``}let w=k(()=>[``,`@`,`$`].includes(d.value)?null:{value:d.value,label:d.value});return(n,r)=>(c(),f(`div`,{class:`relative`,ref_key:`reference`,ref:l},[p(C(st),{modelValue:s.value,"onUpdate:modelValue":r[2]||=e=>s.value=e},{default:o(()=>[p(C(lt),{onChange:r[0]||=e=>d.value=e.target.value,class:m([`input`,a.class]),displayValue:S,placeholder:t.placeholder},null,8,[`class`,`placeholder`]),p(C(ct),{class:`absolute inset-y-1 right-1 flex items-center`,type:`button`,as:`craft-button`,appearance:`plain`,size:`small`,icon:``,"aria-label":t.label},{default:o(()=>[...r[3]||=[M(`craft-icon`,{name:`chevron-down`,style:{"font-size":`0.8em`}},null,-1)]]),_:1},8,[`aria-label`]),p(C(Et),{leave:`transition ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,onAfterLeave:r[1]||=e=>d.value=``},{default:o(()=>[p(C(ut),{class:`options`,style:u({position:`fixed`,insetInlineStart:`${h.value.left}px`,width:`${h.value.width}px`,insetBlockStart:`${h.value.bottom}px`})},{default:o(()=>[!t.requireOptionMatch&&w.value?(c(),_(kt,{key:0,option:w.value},null,8,[`option`])):x.value.length===0&&d.value!==``?(c(),f(`div`,At,` Nothing found. `)):j(``,!0),(c(!0),f(y,null,N(x.value,(t,n)=>(c(),f(y,{key:n},[t.type===`optgroup`?(c(),f(y,{key:0},[M(`div`,jt,e(t.label),1),(c(!0),f(y,null,N(t.options,(e,t)=>(c(),_(kt,{key:t,option:e},null,8,[`option`]))),128))],64)):(c(),_(kt,{key:1,option:t},null,8,[`option`]))],64))),128))]),_:1},8,[`style`])]),_:1})]),_:1},8,[`modelValue`])],512))}}),[[`__scopeId`,`data-v-edae8701`]]);export{Mt as t};
\ No newline at end of file
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function ie(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var ae=(e,t)=>Math.abs(e-t)<1.01,oe=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},se=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},ce=e=>e,le=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},ue=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(se(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(se(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},de={passive:!0},fe=typeof window>`u`?!0:`onscrollend`in window,pe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&fe?()=>void 0:oe(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,de);let l=e.options.useScrollendEvent&&fe;return l&&n.addEventListener(`scrollend`,c,de),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},me=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},he=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},ge=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ce,rangeExtractor:le,onChange:()=>{},measureElement:me,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=W(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.ende.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=W(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(e,t,n,r,i,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a}),{key:!1}),this.getMeasurements=W(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let s=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let c=this.measurementsCache.slice(0,s),l=Array(a).fill(void 0);for(let e=0;e1){s=a;let e=l[s],r=e===void 0?void 0:c[e];u=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?c[i-1]:this.getFurthestMeasurement(c,i);u=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(i,s)}let d=o.get(e),f=typeof d==`number`?d:this.options.estimateSize(i),p=u+f;c[i]={index:i,start:u,size:f,end:p,key:e,lane:s},l[s]=i}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=W(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=W(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=W(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ie(t[_e(0,t.length-1,e=>ie(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1)),this.currentScrollToIndex=e;let r=0,i=t=>{if(!this.targetWindow)return;let r=this.getOffsetForIndex(e,t);if(!r){console.warn(`Failed to get offset for index:`,e);return}let[i,o]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=()=>{if(this.currentScrollToIndex!==e)return;let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,o);if(!n){console.warn(`Failed to get offset for index:`,e);return}ae(n[0],t)||a(o)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(t):t()})},a=t=>{this.targetWindow&&this.currentScrollToIndex===e&&(r++,r<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}},_e=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(ar)t=i-1;else return i}return e>0?e-1:0};function ve({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=_e(0,i,a,n),s=o;if(r===1)for(;s1){let a=Array(r).fill(0);for(;se=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function ye(e){let t=new ge(C(e)),n=g(t),r=t._didMount();return s(()=>C(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),s(()=>C(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;v(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),v(n)},{immediate:!0}),w(r),n}function be(e){return ye(k(()=>({observeElementRect:ue,observeElementOffset:pe,scrollToFn:he,...C(e)})))}function xe(e,t,n){let r=b(n?.value),i=k(()=>e.value!==void 0);return[k(()=>i.value?e.value:r.value),function(e){return i.value||(r.value=e),t?.(e)}]}function Se(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function G(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...e)})},setTimeout(...e){let n=setTimeout(...e);t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return Se(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=G();return e(t),this.add(()=>t.dispose())},add(t){return e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function Ce(){let e=G();return a(()=>e.dispose()),e}function we(){let e=Ce();return t=>{e.dispose(),e.nextFrame(t)}}var Te=Object.defineProperty,Ee=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,De=(e,t,n)=>(Ee(e,typeof t==`symbol`?t:t+``,n),n),K=new class{constructor(){De(this,`current`,this.detect()),De(this,`currentId`,0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}};function Oe(e){if(K.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty(`value`)){let t=B(e);if(t)return t.ownerDocument}return document}var ke=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),Ae=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e))(Ae||{}),je=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(je||{}),Me=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(Me||{}),Ne=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(Ne||{});function Pe(e,t=0){return e===Oe(e)?.body?!1:F(t,{0(){return e.matches(ke)},1(){let t=e;for(;t!==null;){if(t.matches(ke))return!0;t=t.parentElement}return!1}})}var Fe=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(Fe||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0)),[`textarea`,`input`].join(`,`);function Ie(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Le(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Re(){return/Android/gi.test(window.navigator.userAgent)}function ze(){return Le()||Re()}function q(e,t,n){K.isServer||E(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Be(e,t,n){K.isServer||E(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Ve(e,t,n=k(()=>!0)){function r(r,i){if(!n.value||r.defaultPrevented)return;let a=i(r);if(a===null||!a.getRootNode().contains(a))return;let o=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e);for(let e of o){if(e===null)continue;let t=e instanceof HTMLElement?e:B(e);if(t!=null&&t.contains(a)||r.composed&&r.composedPath().includes(t))return}return!Pe(a,Ne.Loose)&&a.tabIndex!==-1&&r.preventDefault(),t(r,a)}let i=b(null);q(`pointerdown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`mousedown`,e=>{n.value&&(i.value=e.composedPath?.call(e)?.[0]||e.target)},!0),q(`click`,e=>{ze()||(i.value&&=(r(e,()=>i.value),null))},!0),q(`touchend`,e=>r(e,()=>e.target instanceof HTMLElement?e.target:null),!0),Be(`blur`,e=>r(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function He(e){return[e.screenX,e.screenY]}function Ue(){let e=b([-1,-1]);return{wasMoved(t){let n=He(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=He(t)}}}function We({container:e,accept:t,walk:n,enabled:r}){E(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let a=Oe(e);if(!a)return;let o=Object.assign(e=>t(e),{acceptNode:t}),s=a.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,o,!1);for(;s.nextNode();)n(s.currentNode)})}var Ge=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(Ge||{}),Ke=n({name:`Hidden`,props:{as:{type:[Object,String],default:`div`},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e;return z({ourProps:{"aria-hidden":(r&2)==2?!0:i[`aria-hidden`]??void 0,hidden:(r&4)==4?!0:void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(r&4)==4&&(r&2)!=2&&{display:`none`}}},theirProps:i,slot:{},attrs:n,slots:t,name:`Hidden`})}}}),qe=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(qe||{});function Je(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var J=[];Je(()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&J[0]!==e.target&&(J.unshift(e.target),J=J.filter(e=>e!=null&&e.isConnected),J.splice(10))}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function Ye(e){throw Error(`Unexpected object: `+e)}var Y=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Y||{});function Xe(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(tt||{}),nt=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(nt||{}),rt=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Focus=1]=`Focus`,e[e.Other=2]=`Other`,e))(rt||{}),it=Symbol(`ComboboxContext`);function X(e){let t=x(it,null);if(t===null){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,X),t}return t}var at=Symbol(`VirtualContext`),ot=n({name:`VirtualProvider`,setup(e,{slots:t}){let n=X(`VirtualProvider`),r=k(()=>{let e=B(n.optionsRef);if(!e)return{start:0,end:0};let t=window.getComputedStyle(e);return{start:parseFloat(t.paddingBlockStart||t.paddingTop),end:parseFloat(t.paddingBlockEnd||t.paddingBottom)}}),i=be(k(()=>({scrollPaddingStart:r.value.start,scrollPaddingEnd:r.value.end,count:n.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return B(n.optionsRef)},overscan:12}))),a=k(()=>n.virtual.value?.options),o=b(0);return s([a],()=>{o.value+=1}),d(at,n.virtual.value?i:null),()=>[S(`div`,{style:{position:`relative`,width:`100%`,height:`${i.value.getTotalSize()}px`},ref:e=>{if(e){if(typeof process<`u`&&{}.JEST_WORKER_ID!==void 0||n.activationTrigger.value===0)return;n.activeOptionIndex.value!==null&&n.virtual.value.options.length>n.activeOptionIndex.value&&i.value.scrollToIndex(n.activeOptionIndex.value)}}},i.value.getVirtualItems().map(e=>h(t.default({option:n.virtual.value.options[e.index],open:n.comboboxState.value===0})[0],{key:`${o.value}-${e.index}`,"data-index":e.index,"aria-setsize":n.virtual.value.options.length,"aria-posinset":e.index+1,style:{position:`absolute`,top:0,left:0,transform:`translateY(${e.start}px)`,overflowAnchor:`none`}})))]}}),st=n({name:`Combobox`,emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:`template`},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:i}){let a=b(1),o=b(null),c=b(null),l=b(null),u=b(null),f=b({static:!1,hold:!1}),p=b([]),m=b(null),h=b(2),g=b(!1);function _(e=e=>e){let t=m.value===null?null:p.value[m.value],n=e(p.value.slice()),r=n.length>0&&n[0].dataRef.order.value!==null?n.sort((e,t)=>e.dataRef.order.value-t.dataRef.order.value):Ie(n,e=>B(e.dataRef.domRef)),i=t?r.indexOf(t):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let v=k(()=>+!!e.multiple),x=k(()=>e.nullable),[C,w]=xe(k(()=>e.modelValue),e=>i(`update:modelValue`,e),k(()=>e.defaultValue)),E=k(()=>C.value===void 0?F(v.value,{1:[],0:void 0}):C.value),O=null,A=null;function j(e){return F(v.value,{0(){return w?.(e)},1:()=>{let t=T(M.value.value).slice(),n=T(e),r=t.findIndex(e=>M.compare(n,T(e)));return r===-1?t.push(n):t.splice(r,1),w?.(t)}})}s([k(()=>{})],([e],[t])=>{if(M.virtual.value&&e&&t&&m.value!==null){let n=e.indexOf(t[m.value]);n===-1?m.value=null:m.value=n}});let M={comboboxState:a,value:E,mode:v,compare(t,n){if(typeof e.by==`string`){let r=e.by;return t?.[r]===n?.[r]}return e.by===null?et(t,n):e.by(t,n)},calculateIndex(t){return M.virtual.value?e.by===null?M.virtual.value.options.indexOf(t):M.virtual.value.options.findIndex(e=>M.compare(e,t)):p.value.findIndex(e=>M.compare(e.dataRef.value,t))},defaultValue:k(()=>e.defaultValue),nullable:x,immediate:k(()=>!1),virtual:k(()=>null),inputRef:c,labelRef:o,buttonRef:l,optionsRef:u,disabled:k(()=>e.disabled),options:p,change(e){w(e)},activeOptionIndex:k(()=>{if(g.value&&m.value===null&&(M.virtual.value?M.virtual.value.options.length>0:p.value.length>0)){if(M.virtual.value){let e=M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))});if(e!==-1)return e}let e=p.value.findIndex(e=>!e.dataRef.disabled);if(e!==-1)return e}return m.value}),activationTrigger:h,optionsPropsRef:f,closeCombobox(){g.value=!1,!e.disabled&&a.value!==1&&(a.value=1,m.value=null)},openCombobox(){if(g.value=!0,!e.disabled&&a.value!==0){if(M.value.value){let e=M.calculateIndex(M.value.value);e!==-1&&(m.value=e)}a.value=0}},setActivationTrigger(e){h.value=e},goToOption(t,n,r){g.value=!1,O!==null&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{if(e.disabled||u.value&&!f.value.static&&a.value===1)return;if(M.virtual.value){m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>M.virtual.value.options,resolveActiveIndex:()=>M.activeOptionIndex.value??M.virtual.value.options.findIndex(e=>{var t;return!((t=M.virtual.value)!=null&&t.disabled(e))})??null,resolveDisabled:e=>M.virtual.value.disabled(e),resolveId(){throw Error(`Function not implemented.`)}}),h.value=r??2;return}let i=_();if(i.activeOptionIndex===null){let e=i.options.findIndex(e=>!e.dataRef.disabled);e!==-1&&(i.activeOptionIndex=e)}m.value=t===Y.Specific?n:Xe({focus:t},{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.disabled}),h.value=r??2,p.value=i.options})},selectOption(e){let t=p.value.find(t=>t.id===e);if(!t)return;let{dataRef:n}=t;j(n.value)},selectActiveOption(){if(M.activeOptionIndex.value!==null){if(M.virtual.value)j(M.virtual.value.options[M.activeOptionIndex.value]);else{let{dataRef:e}=p.value[M.activeOptionIndex.value];j(e.value)}M.goToOption(Y.Specific,M.activeOptionIndex.value)}},registerOption(e,t){let n=D({id:e,dataRef:t});if(M.virtual.value){p.value.push(n);return}A&&cancelAnimationFrame(A);let r=_(e=>(e.push(n),e));m.value===null&&M.isSelected(t.value.value)&&(r.activeOptionIndex=r.options.indexOf(n)),p.value=r.options,m.value=r.activeOptionIndex,h.value=2,r.options.some(e=>!B(e.dataRef.domRef))&&(A=requestAnimationFrame(()=>{let e=_();p.value=e.options,m.value=e.activeOptionIndex}))},unregisterOption(e,t){if(O!==null&&cancelAnimationFrame(O),t&&(g.value=!0),M.virtual.value){p.value=p.value.filter(t=>t.id!==e);return}let n=_(t=>{let n=t.findIndex(t=>t.id===e);return n!==-1&&t.splice(n,1),t});p.value=n.options,m.value=n.activeOptionIndex,h.value=2},isSelected(e){return F(v.value,{0:()=>M.compare(T(M.value.value),T(e)),1:()=>T(M.value.value).some(t=>M.compare(T(t),T(e)))})},isActive(e){return m.value===M.calculateIndex(e)}};Ve([c,l,u],()=>M.closeCombobox(),k(()=>a.value===0)),d(it,M),ee(k(()=>F(a.value,{0:R.Open,1:R.Closed})));let N=k(()=>B(c)?.closest(`form`));return r(()=>{s([N],()=>{if(!N.value||e.defaultValue===void 0)return;function t(){M.change(e.defaultValue)}return N.value.addEventListener(`reset`,t),()=>{var e;(e=N.value)==null||e.removeEventListener(`reset`,t)}},{immediate:!0})}),()=>{let{name:r,disabled:i,form:o,...s}=e,c={open:a.value===0,disabled:i,activeIndex:M.activeOptionIndex.value,activeOption:M.activeOptionIndex.value===null?null:M.virtual.value?M.virtual.value.options[M.activeOptionIndex.value??0]:M.options.value[M.activeOptionIndex.value]?.dataRef.value??null,value:E.value};return S(y,[...r!=null&&E.value!=null?Ze({[r]:E.value}).map(([e,t])=>S(Ke,re({features:Ge.Hidden,key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:o,disabled:i,name:e,value:t}))):[],z({theirProps:{...n,...U(s,[`by`,`defaultValue`,`immediate`,`modelValue`,`multiple`,`nullable`,`onUpdate:modelValue`,`virtual`])},ourProps:{},slot:c,slots:t,attrs:n,name:`Combobox`})])}}});n({name:`ComboboxLabel`,props:{as:{type:[Object,String],default:`label`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){let r=e.id??`headlessui-combobox-label-${L()}`,i=X(`ComboboxLabel`);function a(){var e;(e=B(i.inputRef))==null||e.focus({preventScroll:!0})}return()=>{let o={open:i.comboboxState.value===0,disabled:i.disabled.value},{...s}=e;return z({ourProps:{id:r,ref:i.labelRef,onClick:a},theirProps:s,slot:o,attrs:t,slots:n,name:`ComboboxLabel`})}}});var ct=n({name:`ComboboxButton`,props:{as:{type:[Object,String],default:`button`},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=e.id??`headlessui-combobox-button-${L()}`,a=X(`ComboboxButton`);r({el:a.buttonRef,$el:a.buttonRef});function o(e){a.disabled.value||(a.comboboxState.value===0?a.closeCombobox():(e.preventDefault(),a.openCombobox()),l(()=>B(a.inputRef)?.focus({preventScroll:!0})))}function s(e){switch(e.key){case H.ArrowDown:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&a.openCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.ArrowUp:e.preventDefault(),e.stopPropagation(),a.comboboxState.value===1&&(a.openCombobox(),l(()=>{a.value.value||a.goToOption(Y.Last)})),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return;case H.Escape:if(a.comboboxState.value!==0)return;e.preventDefault(),a.optionsRef.value&&!a.optionsPropsRef.value.static&&e.stopPropagation(),a.closeCombobox(),l(()=>a.inputRef.value?.focus({preventScroll:!0}));return}}let c=te(k(()=>({as:e.as,type:t.type})),a.buttonRef);return()=>{let r={open:a.comboboxState.value===0,disabled:a.disabled.value,value:a.value.value},{...l}=e;return z({ourProps:{ref:a.buttonRef,id:i,type:c.value,tabindex:`-1`,"aria-haspopup":`listbox`,"aria-controls":B(a.optionsRef)?.id,"aria-expanded":a.comboboxState.value===0,"aria-labelledby":a.labelRef.value?[B(a.labelRef)?.id,i].join(` `):void 0,disabled:a.disabled.value===!0?!0:void 0,onKeydown:s,onClick:o},theirProps:l,slot:r,attrs:t,slots:n,name:`ComboboxButton`})}}}),lt=n({name:`ComboboxInput`,props:{as:{type:[Object,String],default:`input`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:a}){let o=e.id??`headlessui-combobox-input-${L()}`,c=X(`ComboboxInput`),u=k(()=>Oe(B(c.inputRef))),d={value:!1};a({el:c.inputRef,$el:c.inputRef});function f(){c.change(null);let e=B(c.optionsRef);e&&(e.scrollTop=0),c.goToOption(Y.Nothing)}let p=k(()=>{let t=c.value.value;return B(c.inputRef)?e.displayValue!==void 0&&t!==void 0?e.displayValue(t)??``:typeof t==`string`?t:``:``});r(()=>{s([p,c.comboboxState,u],([e,t],[n,r])=>{if(d.value)return;let i=B(c.inputRef);i&&((r===0&&t===1||e!==n)&&(i.value=e),requestAnimationFrame(()=>{if(d.value||!i||u.value?.activeElement!==i)return;let{selectionStart:e,selectionEnd:t}=i;Math.abs((t??0)-(e??0))===0&&e===0&&i.setSelectionRange(i.value.length,i.value.length)}))},{immediate:!0}),s([c.comboboxState],([e],[t])=>{if(e===0&&t===1){if(d.value)return;let e=B(c.inputRef);if(!e)return;let t=e.value,{selectionStart:n,selectionEnd:r,selectionDirection:i}=e;e.value=``,e.value=t,i===null?e.setSelectionRange(n,r):e.setSelectionRange(n,r,i)}})});let m=b(!1);function h(){m.value=!0}function g(){G().nextFrame(()=>{m.value=!1})}let _=we();function v(e){switch(d.value=!0,_(()=>{d.value=!1}),e.key){case H.Enter:if(d.value=!1,c.comboboxState.value!==0||m.value)return;if(e.preventDefault(),e.stopPropagation(),c.activeOptionIndex.value===null){c.closeCombobox();return}c.selectActiveOption(),c.mode.value===0&&c.closeCombobox();break;case H.ArrowDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Next),1:()=>c.openCombobox()});case H.ArrowUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),F(c.comboboxState.value,{0:()=>c.goToOption(Y.Previous),1:()=>{c.openCombobox(),l(()=>{c.value.value||c.goToOption(Y.Last)})}});case H.Home:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.PageUp:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.First);case H.End:if(e.shiftKey)break;return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.PageDown:return d.value=!1,e.preventDefault(),e.stopPropagation(),c.goToOption(Y.Last);case H.Escape:if(d.value=!1,c.comboboxState.value!==0)return;e.preventDefault(),c.optionsRef.value&&!c.optionsPropsRef.value.static&&e.stopPropagation(),c.nullable.value&&c.mode.value===0&&c.value.value===null&&f(),c.closeCombobox();break;case H.Tab:if(d.value=!1,c.comboboxState.value!==0)return;c.mode.value===0&&c.activationTrigger.value!==1&&c.selectActiveOption(),c.closeCombobox();break}}function y(e){t(`change`,e),c.nullable.value&&c.mode.value===0&&e.target.value===``&&f(),c.openCombobox()}function x(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);if(d.value=!1,!((t=B(c.optionsRef))!=null&&t.contains(r))&&!((n=B(c.buttonRef))!=null&&n.contains(r))&&c.comboboxState.value===0)return e.preventDefault(),c.mode.value===0&&(c.nullable.value&&c.value.value===null?f():c.activationTrigger.value!==1&&c.selectActiveOption()),c.closeCombobox()}function S(e){var t,n;let r=e.relatedTarget??J.find(t=>t!==e.currentTarget);(t=B(c.buttonRef))!=null&&t.contains(r)||(n=B(c.optionsRef))!=null&&n.contains(r)||c.disabled.value||c.immediate.value&&c.comboboxState.value!==0&&(c.openCombobox(),G().nextFrame(()=>{c.setActivationTrigger(1)}))}let C=k(()=>e.defaultValue??(c.defaultValue.value===void 0?null:e.displayValue?.call(e,c.defaultValue.value))??c.defaultValue.value??``);return()=>{let t={open:c.comboboxState.value===0},{displayValue:r,onChange:a,...s}=e;return z({ourProps:{"aria-controls":c.optionsRef.value?.id,"aria-expanded":c.comboboxState.value===0,"aria-activedescendant":c.activeOptionIndex.value===null?void 0:c.virtual.value?c.options.value.find(e=>!c.virtual.value.disabled(e.dataRef.value)&&c.compare(e.dataRef.value,c.virtual.value.options[c.activeOptionIndex.value]))?.id:c.options.value[c.activeOptionIndex.value]?.id,"aria-labelledby":B(c.labelRef)?.id??B(c.buttonRef)?.id,"aria-autocomplete":`list`,id:o,onCompositionstart:h,onCompositionend:g,onKeydown:v,onInput:y,onFocus:S,onBlur:x,role:`combobox`,type:n.type??`text`,tabIndex:0,ref:c.inputRef,defaultValue:C.value,disabled:c.disabled.value===!0?!0:void 0},theirProps:s,slot:t,attrs:n,slots:i,features:P.RenderStrategy|P.Static,name:`ComboboxInput`})}}}),ut=n({name:`ComboboxOptions`,props:{as:{type:[Object,String],default:`ul`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:r}){let i=X(`ComboboxOptions`),a=`headlessui-combobox-options-${L()}`;r({el:i.optionsRef,$el:i.optionsRef}),E(()=>{i.optionsPropsRef.value.static=e.static}),E(()=>{i.optionsPropsRef.value.hold=e.hold});let o=V(),s=k(()=>o===null?i.comboboxState.value===0:(o.value&R.Open)===R.Open);We({container:k(()=>B(i.optionsRef)),enabled:k(()=>i.comboboxState.value===0),accept(e){return e.getAttribute(`role`)===`option`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});function c(e){e.preventDefault()}return()=>{let r={open:i.comboboxState.value===0};return z({ourProps:{"aria-labelledby":B(i.labelRef)?.id??B(i.buttonRef)?.id,id:a,ref:i.optionsRef,role:`listbox`,"aria-multiselectable":i.mode.value===1?!0:void 0,onMousedown:c},theirProps:U(e,[`hold`]),slot:r,attrs:t,slots:i.virtual.value&&i.comboboxState.value===0?{...n,default:()=>[S(ot,{},n.default)]}:n,features:P.RenderStrategy|P.Static,visible:s.value,name:`ComboboxOptions`})}}}),dt=n({name:`ComboboxOption`,props:{as:{type:[Object,String],default:`li`},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:t,attrs:n,expose:i}){let o=X(`ComboboxOption`),s=`headlessui-combobox-option-${L()}`,c=b(null),u=k(()=>e.disabled);i({el:c,$el:c});let d=k(()=>o.virtual.value?o.activeOptionIndex.value===o.calculateIndex(e.value):o.activeOptionIndex.value===null?!1:o.options.value[o.activeOptionIndex.value]?.id===s),f=k(()=>o.isSelected(e.value)),p=x(at,null),m=k(()=>({disabled:e.disabled,value:e.value,domRef:c,order:k(()=>e.order)}));r(()=>o.registerOption(s,m)),a(()=>o.unregisterOption(s,d.value)),E(()=>{let e=B(c);e&&p?.value.measureElement(e)}),E(()=>{o.comboboxState.value===0&&d.value&&(o.virtual.value||o.activationTrigger.value!==0&&l(()=>{var e;return((e=B(c))?.scrollIntoView)?.call(e,{block:`nearest`})}))});function h(e){e.preventDefault(),e.button===qe.Left&&(u.value||(o.selectOption(s),ze()||requestAnimationFrame(()=>B(o.inputRef)?.focus({preventScroll:!0})),o.mode.value===0&&o.closeCombobox()))}function g(){var t;if(e.disabled||(t=o.virtual.value)!=null&&t.disabled(e.value))return o.goToOption(Y.Nothing);let n=o.calculateIndex(e.value);o.goToOption(Y.Specific,n)}let _=Ue();function v(e){_.update(e)}function y(t){var n;if(!_.wasMoved(t)||e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value)return;let r=o.calculateIndex(e.value);o.goToOption(Y.Specific,r,0)}function S(t){var n;_.wasMoved(t)&&(e.disabled||(n=o.virtual.value)!=null&&n.disabled(e.value)||d.value&&(o.optionsPropsRef.value.hold||o.goToOption(Y.Nothing)))}return()=>{let{disabled:r}=e,i={active:d.value,selected:f.value,disabled:r};return z({ourProps:{id:s,ref:c,role:`option`,tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":f.value,disabled:void 0,onMousedown:h,onFocus:g,onPointerenter:v,onMouseenter:v,onPointermove:y,onMousemove:y,onPointerleave:S,onMouseleave:S},theirProps:U(e,[`order`,`value`]),slot:i,attrs:n,slots:t,name:`ComboboxOption`})}}});function ft(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function pt(e,...t){e&&t.length>0&&e.classList.add(...t)}function Z(e,...t){e&&t.length>0&&e.classList.remove(...t)}var mt=(e=>(e.Finished=`finished`,e.Cancelled=`cancelled`,e))(mt||{});function ht(e,t){let n=G();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,o]=[r,i].map(e=>{let[t=0]=e.split(`,`).filter(Boolean).map(e=>e.includes(`ms`)?parseFloat(e):parseFloat(e)*1e3).sort((e,t)=>t-e);return t});return a===0?t(`finished`):n.setTimeout(()=>t(`finished`),a+o),n.add(()=>t(`cancelled`)),n.dispose}function gt(e,t,n,r,i,a){let o=G(),s=a===void 0?()=>{}:ft(a);return Z(e,...i),pt(e,...t,...n),o.nextFrame(()=>{Z(e,...n),pt(e,...r),o.add(ht(e,n=>(Z(e,...r,...t),pt(e,...i),s(n))))}),o.add(()=>Z(e,...t,...n,...r,...i)),o.add(()=>s(`cancelled`)),o.dispose}function Q(e=``){return e.split(/\s+/).filter(e=>e.length>1)}var _t=Symbol(`TransitionContext`),vt=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(vt||{});function yt(){return x(_t,null)!==null}function bt(){let e=x(_t,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}function xt(){let e=x(St,null);if(e===null)throw Error(`A is used but it is missing a parent .`);return e}var St=Symbol(`NestingContext`);function $(e){return`children`in e?$(e.children):e.value.filter(({state:e})=>e===`visible`).length>0}function Ct(e){let t=b([]),n=b(!1);r(()=>n.value=!0),a(()=>n.value=!1);function i(r,i=I.Hidden){let a=t.value.findIndex(({id:e})=>e===r);a!==-1&&(F(i,{[I.Unmount](){t.value.splice(a,1)},[I.Hidden](){t.value[a].state=`hidden`}}),!$(t)&&n.value&&e?.())}function o(e){let n=t.value.find(({id:t})=>t===e);return n?n.state!==`visible`&&(n.state=`visible`):t.value.push({id:e,state:`visible`}),()=>i(e,I.Unmount)}return{children:t,register:o,unregister:i}}var wt=P.RenderStrategy,Tt=n({props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i,expose:o}){let c=b(0);function l(){c.value|=R.Opening,t(`beforeEnter`)}function u(){c.value&=~R.Opening,t(`afterEnter`)}function f(){c.value|=R.Closing,t(`beforeLeave`)}function p(){c.value&=~R.Closing,t(`afterLeave`)}if(!yt()&&ne())return()=>S(Et,{...e,onBeforeEnter:l,onAfterEnter:u,onBeforeLeave:f,onAfterLeave:p},i);let h=b(null),g=k(()=>e.unmount?I.Unmount:I.Hidden);o({el:h,$el:h});let{show:_,appear:v}=bt(),{register:y,unregister:x}=xt(),C=b(_.value?`visible`:`hidden`),w={value:!0},T=L(),D={value:!1},O=Ct(()=>{!D.value&&C.value!==`hidden`&&(C.value=`hidden`,x(T),p())});r(()=>{a(y(T))}),E(()=>{if(g.value===I.Hidden&&T){if(_.value&&C.value!==`visible`){C.value=`visible`;return}F(C.value,{hidden:()=>x(T),visible:()=>y(T)})}});let A=Q(e.enter),j=Q(e.enterFrom),M=Q(e.enterTo),N=Q(e.entered),P=Q(e.leave),te=Q(e.leaveFrom),V=Q(e.leaveTo);r(()=>{E(()=>{if(C.value===`visible`){let e=B(h);if(e instanceof Comment&&e.data===``)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function re(e){let t=w.value&&!v.value,n=B(h);!n||!(n instanceof HTMLElement)||t||(D.value=!0,_.value&&l(),_.value||f(),e(_.value?gt(n,A,j,M,N,e=>{D.value=!1,e===mt.Finished&&u()}):gt(n,P,te,V,N,e=>{D.value=!1,e===mt.Finished&&($(O)||(C.value=`hidden`,x(T),p()))})))}return r(()=>{s([_],(e,t,n)=>{re(n),w.value=!1},{immediate:!0})}),d(St,O),ee(k(()=>F(C.value,{visible:R.Open,hidden:R.Closed})|c.value)),()=>{let{appear:t,show:r,enter:a,enterFrom:o,enterTo:s,entered:c,leave:l,leaveFrom:u,leaveTo:d,...f}=e,p={ref:h};return z({theirProps:{...f,...v.value&&_.value&&K.isServer?{class:m([n.class,f.class,...A,...j])}:{}},ourProps:p,slot:{},slots:i,attrs:n,features:wt,visible:C.value===`visible`,name:`TransitionChild`})}}}),Et=n({inheritAttrs:!1,props:{as:{type:[Object,String],default:`div`},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:``},enterFrom:{type:[String],default:``},enterTo:{type:[String],default:``},entered:{type:[String],default:``},leave:{type:[String],default:``},leaveFrom:{type:[String],default:``},leaveTo:{type:[String],default:``}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:i}){let a=V(),o=k(()=>e.show===null&&a!==null?(a.value&R.Open)===R.Open:e.show);E(()=>{if(![!0,!1].includes(o.value))throw Error('A is used but it is missing a `:show="true | false"` prop.')});let s=b(o.value?`visible`:`hidden`),c=Ct(()=>{s.value=`hidden`}),l=b(!0),u={show:o,appear:k(()=>e.appear||!l.value)};return r(()=>{E(()=>{l.value=!1,o.value?s.value=`visible`:$(c)||(s.value=`hidden`)})}),d(St,c),d(_t,u),()=>{let r=U(e,[`show`,`appear`,`unmount`,`onBeforeEnter`,`onBeforeLeave`,`onAfterEnter`,`onAfterLeave`]),a={unmount:e.unmount};return z({ourProps:{...a,as:`template`},theirProps:{},slot:{},slots:{...i,default:()=>[S(Tt,{onBeforeEnter:()=>t(`beforeEnter`),onAfterEnter:()=>t(`afterEnter`),onBeforeLeave:()=>t(`beforeLeave`),onAfterLeave:()=>t(`afterLeave`),...n,...a,...r},i.default)]},attrs:{},features:wt,visible:s.value===`visible`,name:`Transition`})}}}),Dt=[`active`,`checked`,`hint`],Ot={key:0},kt=n({__name:`InputComboboxOption`,props:{option:{}},setup(n){return(r,i)=>(c(),_(C(dt),{value:n.option,as:`template`},{default:o(({active:i,selected:a})=>[t(r.$slots,`option`,{option:n.option,active:i,selected:a},()=>[M(`craft-option`,{active:i,checked:a,hint:n.option.data?.hint},[n.option.label.startsWith(`$`)||n.option.label.startsWith(`@`)?(c(),f(`code`,Ot,e(n.option.label),1)):(c(),f(y,{key:1},[A(e(n.option.label),1)],64))],8,Dt)])]),_:3},8,[`value`]))}}),At={key:1},jt={class:`group-label`},Mt=O(n({__name:`InputCombobox`,props:{label:{},options:{default:()=>[]},modelValue:{default:``},requireOptionMatch:{type:Boolean,default:!1},transformModelValue:{type:Function,default:e=>e?e.value:``},class:{type:[Boolean,null,String,Object,Array]},placeholder:{},disabled:{type:Boolean}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,a=t,s=k({get(){let e=null;return a.options.forEach(t=>{t.type===`optgroup`?t.options.forEach(t=>{t.value===a.modelValue&&(e=t)}):t.value===a.modelValue&&(e=t)}),!e&&!a.requireOptionMatch&&(e={label:a.modelValue,value:a.modelValue}),e},set(e){r(`update:modelValue`,a.transformModelValue(e))}}),l=i(`reference`),d=b(a.modelValue??``),h=k(()=>l.value?.getBoundingClientRect()||new DOMRect);function g(e,t){let n=C(e).toLowerCase(),r=C(t);return r.label.toLowerCase().includes(n)||r.value.toLowerCase().includes(n)||(r.data?.keywords?.toLowerCase().includes(n)??!1)}function v(e,t){return C(t).map(t=>{if(t.type===`optgroup`){let n=t.options.filter(t=>g(e,t));return n.length>0?{...t,options:n}:null}return g(e,t)?t:null}).filter(e=>e!==null)}let x=k(()=>d.value===``?a.options:v(d,a.options));function S(e){return e?e.label:``}let w=k(()=>[``,`@`,`$`].includes(d.value)?null:{value:d.value,label:d.value});return(n,r)=>(c(),f(`div`,{class:`relative`,ref_key:`reference`,ref:l},[p(C(st),{modelValue:s.value,"onUpdate:modelValue":r[2]||=e=>s.value=e,disabled:a.disabled},{default:o(()=>[p(C(lt),{onChange:r[0]||=e=>d.value=e.target.value,class:m([`input`,a.class]),displayValue:S,placeholder:t.placeholder},null,8,[`class`,`placeholder`]),p(C(ct),{class:`absolute inset-y-1 right-1 flex items-center`,type:`button`,as:`craft-button`,appearance:`plain`,size:`small`,icon:``,"aria-label":t.label},{default:o(()=>[...r[3]||=[M(`craft-icon`,{name:`chevron-down`,style:{"font-size":`0.8em`}},null,-1)]]),_:1},8,[`aria-label`]),p(C(Et),{leave:`transition ease-in duration-100`,leaveFrom:`opacity-100`,leaveTo:`opacity-0`,onAfterLeave:r[1]||=e=>d.value=``},{default:o(()=>[p(C(ut),{class:`options`,style:u({position:`fixed`,insetInlineStart:`${h.value.left}px`,width:`${h.value.width}px`,insetBlockStart:`${h.value.bottom}px`})},{default:o(()=>[!t.requireOptionMatch&&w.value?(c(),_(kt,{key:0,option:w.value},null,8,[`option`])):x.value.length===0&&d.value!==``?(c(),f(`div`,At,` Nothing found. `)):j(``,!0),(c(!0),f(y,null,N(x.value,(t,n)=>(c(),f(y,{key:n},[t.type===`optgroup`?(c(),f(y,{key:0},[M(`div`,jt,e(t.label),1),(c(!0),f(y,null,N(t.options,(e,t)=>(c(),_(kt,{key:t,option:e},null,8,[`option`]))),128))],64)):(c(),_(kt,{key:1,option:t},null,8,[`option`]))],64))),128))]),_:1},8,[`style`])]),_:1})]),_:1},8,[`modelValue`,`disabled`])],512))}}),[[`__scopeId`,`data-v-b00ef27e`]]);export{Mt as t};
\ No newline at end of file
diff --git a/resources/build/Install.js b/resources/build/Install.js
index a68c2b5962c..620c6027036 100644
--- a/resources/build/Install.js
+++ b/resources/build/Install.js
@@ -1 +1 @@
-import{$ as e,B as t,E as n,F as r,G as i,J as a,K as o,L as s,M as c,N as l,S as u,T as d,U as f,X as p,a as ee,b as m,c as h,d as te,h as g,it as _,l as v,lt as y,m as b,q as x,r as S,rt as C,t as w,v as T,w as E,x as D,y as O,z as k}from"./_plugin-vue_export-helper.js";import"./lit.js";import{r as A}from"./nav-item-9g3ebwBJ.js";import{t as j}from"./Select.js";import{t as M}from"./Pane.js";import{i as N}from"./dist.js";import{i as P}from"./useFetch.js";import{n as F}from"./wayfinder.js";import{t as I}from"./Modal.js";import{t as L}from"./CraftInput.js";import{t as ne}from"./CraftCombobox.js";var re=``+new URL(`assets/installer-bg.png`,import.meta.url).href,R=e=>{o(i(e),async e=>{e?.tagName.includes(`CRAFT-`)&&(await customElements.whenDefined(e.tagName.toLowerCase()),await e?.updateComplete),e?.focus()})},z=[`.modelValue`,`has-feedbck-for`],B={slot:`feedback`},V={key:0,class:`error-list`},H=n({name:`CraftInputPassword`,__name:`CraftInputPassword`,props:c({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=f(n,`modelValue`);return(i,a)=>(s(),u(`craft-input-password`,l(i.$attrs,{".modelValue":r.value,onModelValueChanged:a[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(i.$slots,`default`),O(`div`,B,[n.error?(s(),u(`ul`,V,[O(`li`,null,e(n.error),1)])):D(``,!0)])],48,z))}}),U=n({__name:`AccountFields`,props:{modelValue:{default:()=>({email:``,username:``,password:``})},errors:{default:()=>({email:``,username:``,password:``})}},emits:[`success`,`click:back`,`update:modelValue`],setup(e,{emit:t}){let n=t,r=e,i=v(),a=T(()=>!i.props.useEmailAsUsername),o=T({get(){return console.log(r.modelValue),r.modelValue},set(e){console.log(`value`,e),n(`update:modelValue`,e)}});return R(`username-input`),(t,n)=>(s(),u(g,null,[a.value?(s(),m(L,{key:0,label:y(A)(`Username`),id:`account-username`,name:`username`,modelValue:o.value.username,"onUpdate:modelValue":n[0]||=e=>o.value.username=e,error:e.errors?.username,maxlength:`255`,required:``,autofocus:``},null,8,[`label`,`modelValue`,`error`])):D(``,!0),d(L,{label:y(A)(`Email`),id:`account-email`,name:`email`,modelValue:o.value.email,"onUpdate:modelValue":n[1]||=e=>o.value.email=e,maxlength:`255`,autocomplete:`email`,error:e.errors?.email,required:``,type:`email`},null,8,[`label`,`modelValue`,`error`]),d(H,{label:y(A)(`Password`),id:`account-password`,name:`password`,modelValue:o.value.password,"onUpdate:modelValue":n[2]||=e=>o.value.password=e,error:e.errors?.password,required:``,autocomplete:`new-password`},null,8,[`label`,`modelValue`,`error`])],64))}}),W={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},G={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},K=n({__name:`SiteFields`,props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=v(),c=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}});return R(`site-name`),(n,r)=>(s(),u(g,null,[d(L,{name:`name`,label:y(A)(`System Name`),id:`site-name`,modelValue:c.value.name,"onUpdate:modelValue":r[0]||=e=>c.value.name=e,maxlength:`255`,ref:`site-name`,error:t.errors?.name},null,8,[`label`,`modelValue`,`error`]),d(ne,{modelValue:c.value.baseUrl,"onUpdate:modelValue":r[1]||=e=>c.value.baseUrl=e,label:y(A)(`Base URL`),"help-text":y(A)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:t.errors?.baseUrl,options:y(o).props.baseUrlSuggestions},{after:a(()=>[O(`craft-callout`,W,[E(e(y(A)(`This can begin with an environment variable or alias.`))+` `,1),O(`a`,G,e(y(A)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`options`]),d(j,{modelValue:c.value.language,"onUpdate:modelValue":r[2]||=e=>c.value.language=e,options:t.localeOptions,label:y(A)(`Language`),id:`site-language`,name:`language`},{"option-label":a(({option:t})=>[E(e(t.value)+` (`+e(t.label)+`) `,1)]),_:1},8,[`modelValue`,`options`,`label`])],64))}}),q=e=>({url:q.url(e),method:`post`});q.definition={methods:[`post`],url:`/admin/actions/install/validate-db`},q.url=e=>q.definition.url+F(e),q.post=e=>({url:q.url(e),method:`post`});var J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/install/validate-account`},J.url=e=>J.definition.url+F(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/install/validate-site`},Y.url=e=>Y.definition.url+F(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/install/install`},X.url=e=>X.definition.url+F(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`get`});Z.definition={methods:[`get`,`head`],url:`/admin/install`},Z.url=e=>Z.definition.url+F(e),Z.get=e=>({url:Z.url(e),method:`get`}),Z.head=e=>({url:Z.url(e),method:`head`});var ie=()=>{let e=_({start:{},license:{id:`license`,label:`License`},account:{id:`account`,label:`Account`,action:J().url,heading:A(`Create your account`)},db:{id:`db`,label:`Database`,action:q().url,heading:A(`Connect to your database`)},site:{id:`site`,label:`Site`,action:Y().url,heading:A(`Set up your site`),submitLabel:A(`Finish up`)},installing:{label:`Installing`,id:`installing`}}),t=T(()=>Object.keys(e.value).reduce((t,n)=>{let r=e.value[n];return(r.hidden??!1)||(t[n]=r),t},{})),n=T(()=>Object.keys(t.value).reduce((e,n)=>{let r=t.value[n];return(r.label??!1)&&(e[n]=r),e},{})),r=N(t),i=T(()=>r.stepNames.value[r.index.value]);return{...r,possibleSteps:e,currentId:i,dotSteps:n}},ae=``+new URL(`assets/account.png`,import.meta.url).href,oe=``+new URL(`assets/site.png`,import.meta.url).href,se=``+new URL(`assets/db.png`,import.meta.url).href,ce=w(n({__name:`Callout`,props:{variant:{default:`info`},appearance:{default:`default`}},setup(e){return(n,r)=>(s(),u(`div`,{class:p({callout:!0,"callout--danger":e.variant===`danger`,"callout--info":e.variant===`info`,"callout--success":e.variant===`success`,"callout--warning":e.variant===`warning`,"callout--emphasis":e.appearance===`emphasis`,"callout--default":e.appearance===`default`,"callout--outline":e.appearance===`outline`,"callout--plain":e.appearance===`plain`})},[t(n.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-2a01f40b`]]),le={class:`grid grid-cols-5 gap-2`},ue={class:`col-span-2`},de={class:`col-span-2`},fe={key:0,class:`error-list col-span-5`},pe={class:`grid grid-cols-2 gap-2`},me={key:0,class:`error-list col-span-2`},he={class:`grid grid-cols-4 gap-2`},ge={class:`col-span-2`},_e=n({__name:`DbFields`,props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}}),c=[{value:`mysql`,label:`MySQL`},{value:`pgsql`,label:`PostgreSQL`}];return R(`db-driver`),(n,r)=>(s(),u(g,null,[t.errors&&t.errors[`*`]?(s(),m(ce,{key:0,variant:`danger`},{default:a(()=>[O(`ul`,null,[(s(!0),u(g,null,k(t.errors[`*`],t=>(s(),u(`li`,null,e(t),1))),256))])]),_:1})):D(``,!0),O(`div`,le,[O(`div`,ue,[d(j,{label:y(A)(`Driver`),name:`driver`,id:`db-driver`,modelValue:o.value.driver,"onUpdate:modelValue":r[0]||=e=>o.value.driver=e,ref:`db-driver`,options:c,error:t.errors?.drive},null,8,[`label`,`modelValue`,`error`])]),O(`div`,de,[d(L,{label:y(A)(`Host`),name:`host`,id:`db-host`,modelValue:o.value.host,"onUpdate:modelValue":r[1]||=e=>o.value.host=e,placeholder:`127.0.0.1`,error:t.errors?.host},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(L,{label:y(A)(`Port`),name:`port`,id:`db-port`,modelValue:o.value.port,"onUpdate:modelValue":r[2]||=e=>o.value.port=e,size:`7`,error:t.errors?.port},null,8,[`label`,`modelValue`,`error`])]),t.errors?.server?(s(),u(`ul`,fe,[O(`li`,null,e(t.errors?.server),1)])):D(``,!0)]),O(`div`,pe,[O(`div`,null,[d(L,{label:y(A)(`Username`),name:`username`,id:`db-username`,modelValue:o.value.username,"onUpdate:modelValue":r[3]||=e=>o.value.username=e,placeholder:`root`,error:t.errors?.username},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(H,{label:y(A)(`Password`),name:`password`,id:`db-password`,modelValue:o.value.password,"onUpdate:modelValue":r[4]||=e=>o.value.password=e,error:t.errors?.password},null,8,[`label`,`modelValue`,`error`])]),t.errors?.user?(s(),u(`ul`,me,[O(`li`,null,e(t.errors?.user),1)])):D(``,!0)]),O(`div`,he,[O(`div`,ge,[d(L,{label:y(A)(`Database Name`),name:`name`,id:`db-database`,modelValue:o.value.database,"onUpdate:modelValue":r[5]||=e=>o.value.database=e,errors:t.errors?.database},null,8,[`label`,`modelValue`,`errors`])]),O(`div`,null,[d(L,{label:y(A)(`Prefix`),name:`prefix`,id:`db-prefix`,modelValue:o.value.prefix,"onUpdate:modelValue":r[6]||=e=>o.value.prefix=e,maxlength:`5`,size:`7`,error:t.errors?.prefix},null,8,[`label`,`modelValue`,`error`])])])],64))}}),ve={key:0,class:`content`},ye={key:1,class:`content`},be={key:2,class:`content`},xe={class:`text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs`},Se=w(n({__name:`InstallingScreen`,props:{data:{}},setup(t){let{props:n}=v(),i=t,{execute:o,error:c,isSuccess:l,isLoading:d,isError:f}=P(`/admin/actions/install/install`,{onSuccess:e=>{setTimeout(()=>{window.location.href=n.postCpLoginRedirect},1e3)}});return r(async()=>{await o(i.data)}),(t,n)=>(s(),m(M,{class:`max-w-[80ch] mx-auto`},{default:a(()=>[y(d)?(s(),u(`div`,ve,[O(`h2`,null,e(y(A)(`Installing Craft CMS…`)),1),n[0]||=O(`craft-spinner`,null,null,-1)])):y(l)?(s(),u(`div`,ye,[O(`h2`,null,e(y(A)(`Craft is installed! 🎉`)),1),n[1]||=O(`div`,{class:`flex justify-center items-center`},[O(`craft-icon`,{name:`circle-check`,variant:`regular`,style:{color:`var(--c-color-success-fill-loud)`,"font-size":`2.5rem`}})],-1)])):D(``,!0),y(f)?(s(),u(`div`,be,[O(`h2`,null,e(y(A)(`Install failed 😞`)),1),O(`div`,xe,e(y(c).message),1)])):D(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-900f8a00`]]),Ce={class:`grid md:grid-cols-2 gap-4 items-center`},we={class:`aspect-[352/455] w-1/2 md:w-3/4 mx-auto`},Te=[`src`],Ee={class:`mb-4`},De={class:`grid gap-3 md:pr-6`},Q=n({__name:`StepScreen`,props:{illustrationSrc:{default:``},heading:{default:``}},setup(n){return(r,i)=>(s(),u(`div`,Ce,[O(`div`,we,[O(`img`,{loading:`lazy`,src:n.illustrationSrc,alt:``,width:`368`},null,8,Te)]),O(`div`,null,[O(`h2`,Ee,e(n.heading),1),O(`div`,De,[t(r.$slots,`default`)])])]))}}),$={class:`install`},Oe=[`innerHTML`],ke={class:`flex justify-center w-full`},Ae={key:2},je={class:`grid grid-cols-3 items-center gap-2 w-full`},Me={class:`flex gap-2 justify-center`},Ne={class:`sr-only`},Pe=[`loading`],Fe=w(n({__name:`Install`,props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){te(e=>({v50826d02:n.value}));let n=T(()=>`url(${re})`),r=t,{dotSteps:i,current:o,currentId:c,goTo:l,goToNext:f,goToPrevious:_,isCurrent:v,possibleSteps:w}=ie();x(()=>{w.value.db.hidden=!r.showDbScreen});function j(){l(`license`)}let N=C({account:{},db:{},site:{}}),P=h({account:{username:``,email:``,password:``},db:{driver:r.dbConfig.driver,host:r.dbConfig.host,port:r.dbConfig.port,database:r.dbConfig.database,username:r.dbConfig.username,password:r.dbConfig.password,prefix:r.dbConfig.prefix},site:{name:r.defaultSystemName,baseUrl:r.defaultSiteUrl,language:r.defaultSiteLanguage}}),F=T(()=>!v(`start`));function L(e){if(P.processing)return;N[c.value]={};let t=e.currentTarget;P.transform(e=>e[c.value]).post(t.action,{onSuccess:()=>{f()},onError:e=>{N[c.value]=e}})}return(n,r)=>(s(),u(g,null,[d(y(ee),{title:y(A)(`Install Craft CMS`)},null,8,[`title`]),O(`div`,$,[y(v)(`start`)?(s(),u(`craft-button`,{key:0,type:`button`,onClick:j,variant:`primary`,class:`begin-button`},[E(e(y(A)(`Install Craft CMS`))+` `,1),r[6]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)])):D(``,!0),d(I,{"is-active":F.value,overlay:!1,width:`2xl`},{default:a(()=>[y(v)(`license`)?(s(),m(M,{key:0,class:`max-w-[80ch] mx-auto`},{actions:a(()=>[O(`div`,ke,[O(`craft-button`,{type:`button`,variant:`primary`,onClick:r[0]||=e=>y(l)(`account`)},e(y(A)(`Got it`)),1)])]),default:a(()=>[d(y(S),{data:`licenseHtml`},{fallback:a(()=>[...r[7]||=[O(`div`,{class:`flex justify-center`},[O(`craft-spinner`)],-1)]]),default:a(()=>[O(`div`,{class:`license`,innerHTML:t.licenseHtml},null,8,Oe)]),_:1})]),_:1})):y(v)(`installing`)?(s(),m(Se,{key:1,data:y(P),onSuccess:r[1]||=e=>y(f)()},null,8,[`data`])):(s(),u(`div`,Ae,[d(M,{as:`form`,action:y(o).action,onSubmit:b(L,[`prevent`])},{"footer-content":a(()=>[O(`div`,je,[O(`craft-button`,{type:`button`,onClick:r[5]||=(...e)=>y(_)&&y(_)(...e),appearance:`plain`,class:`justify-self-start`},[E(e(y(A)(`Back`))+` `,1),r[9]||=O(`craft-icon`,{name:`arrow-left`,slot:`prefix`},null,-1)]),O(`ul`,Me,[(s(!0),u(g,null,k(y(i),(t,n)=>(s(),u(`li`,{key:n},[O(`span`,{class:p([`dot`,{"dot--active":y(v)(n)}])},[O(`span`,Ne,e(t.label),1)],2)]))),128))]),O(`craft-button`,{class:`justify-self-end`,type:`submit`,variant:`primary`,loading:y(P).processing},[E(e(y(o).submitLabel??y(A)(`Next`))+` `,1),r[10]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)],8,Pe)])]),default:a(()=>[y(v)(`account`)?(s(),m(Q,{key:0,"illustration-src":y(ae),heading:y(o).heading,class:`screen`},{default:a(()=>[y(v)(`account`)?(s(),m(U,{key:0,modelValue:y(P).account,"onUpdate:modelValue":r[2]||=e=>y(P).account=e,errors:N.account},null,8,[`modelValue`,`errors`])):D(``,!0)]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`db`)?(s(),m(Q,{key:1,"illustration-src":y(se),heading:y(o).heading,class:`screen`},{default:a(()=>[d(_e,{modelValue:y(P).db,"onUpdate:modelValue":r[3]||=e=>y(P).db=e,errors:N.db},null,8,[`modelValue`,`errors`])]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`site`)?(s(),m(Q,{key:2,"illustration-src":y(oe),heading:y(o).heading,class:`screen`},{default:a(()=>[d(y(S),{data:`localeOptions`},{fallback:a(()=>[...r[8]||=[O(`craft-spinner`,null,null,-1)]]),default:a(()=>[d(K,{modelValue:y(P).site,"onUpdate:modelValue":r[4]||=e=>y(P).site=e,localeOptions:t.localeOptions,errors:N.site},null,8,[`modelValue`,`localeOptions`,`errors`])]),_:1})]),_:1},8,[`illustration-src`,`heading`])):D(``,!0)]),_:1},8,[`action`])]))]),_:1},8,[`is-active`])])],64))}}),[[`__scopeId`,`data-v-da5490c7`]]);export{Fe as default};
\ No newline at end of file
+import{$ as e,B as t,E as n,F as r,G as i,J as a,K as o,L as s,M as c,N as l,S as u,T as d,U as f,X as p,a as ee,b as m,c as h,d as te,h as g,it as _,l as v,lt as y,m as b,q as x,r as S,rt as C,t as w,v as T,w as E,x as D,y as O,z as k}from"./_plugin-vue_export-helper.js";import"./lit.js";import{r as A}from"./nav-item-9g3ebwBJ.js";import{t as j}from"./Select.js";import{t as M}from"./Pane.js";import{i as N}from"./dist.js";import{i as P}from"./useFetch.js";import{n as F}from"./wayfinder.js";import{t as I}from"./Modal.js";import{t as L}from"./CraftInput.js";import{t as ne}from"./CraftCombobox.js";var re=``+new URL(`assets/installer-bg.png`,import.meta.url).href,R=e=>{o(i(e),async e=>{e?.tagName.includes(`CRAFT-`)&&(await customElements.whenDefined(e.tagName.toLowerCase()),await e?.updateComplete),e?.focus()})},z=[`.modelValue`,`has-feedbck-for`],B={slot:`feedback`},V={key:0,class:`error-list`},H=n({name:`CraftInputPassword`,__name:`CraftInputPassword`,props:c({error:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(n){let r=f(n,`modelValue`);return(i,a)=>(s(),u(`craft-input-password`,l(i.$attrs,{".modelValue":r.value,onModelValueChanged:a[0]||=e=>r.value=e.target?.modelValue,"has-feedbck-for":n.error?`error`:``}),[t(i.$slots,`default`),O(`div`,B,[n.error?(s(),u(`ul`,V,[O(`li`,null,e(n.error),1)])):D(``,!0)])],48,z))}}),U=n({__name:`AccountFields`,props:{modelValue:{default:()=>({email:``,username:``,password:``})},errors:{default:()=>({email:``,username:``,password:``})}},emits:[`success`,`click:back`,`update:modelValue`],setup(e,{emit:t}){let n=t,r=e,i=v(),a=T(()=>!i.props.useEmailAsUsername),o=T({get(){return console.log(r.modelValue),r.modelValue},set(e){console.log(`value`,e),n(`update:modelValue`,e)}});return R(`username-input`),(t,n)=>(s(),u(g,null,[a.value?(s(),m(L,{key:0,label:y(A)(`Username`),id:`account-username`,name:`username`,modelValue:o.value.username,"onUpdate:modelValue":n[0]||=e=>o.value.username=e,error:e.errors?.username,maxlength:`255`,required:``,autofocus:``},null,8,[`label`,`modelValue`,`error`])):D(``,!0),d(L,{label:y(A)(`Email`),id:`account-email`,name:`email`,modelValue:o.value.email,"onUpdate:modelValue":n[1]||=e=>o.value.email=e,maxlength:`255`,autocomplete:`email`,error:e.errors?.email,required:``,type:`email`},null,8,[`label`,`modelValue`,`error`]),d(H,{label:y(A)(`Password`),id:`account-password`,name:`password`,modelValue:o.value.password,"onUpdate:modelValue":n[2]||=e=>o.value.password=e,error:e.errors?.password,required:``,autocomplete:`new-password`},null,8,[`label`,`modelValue`,`error`])],64))}}),W={variant:`info`,appearance:`plain`,class:`p-0`,icon:`lightbulb`},G={href:`https://craftcms.com/docs/5.x/configure.html#control-panel-settings`},K=n({__name:`SiteFields`,props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=v(),c=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}});return R(`site-name`),(n,r)=>(s(),u(g,null,[d(L,{name:`name`,label:y(A)(`System Name`),id:`site-name`,modelValue:c.value.name,"onUpdate:modelValue":r[0]||=e=>c.value.name=e,maxlength:`255`,ref:`site-name`,error:t.errors?.name},null,8,[`label`,`modelValue`,`error`]),d(ne,{modelValue:c.value.baseUrl,"onUpdate:modelValue":r[1]||=e=>c.value.baseUrl=e,label:y(A)(`Base URL`),"help-text":y(A)(`The base URL for the site.`),id:`base-url`,name:`baseUrl`,error:t.errors?.baseUrl,options:y(o).props.baseUrlSuggestions},{after:a(()=>[O(`craft-callout`,W,[E(e(y(A)(`This can begin with an environment variable or alias.`))+` `,1),O(`a`,G,e(y(A)(`Learn more`)),1)])]),_:1},8,[`modelValue`,`label`,`help-text`,`error`,`options`]),d(j,{modelValue:c.value.language,"onUpdate:modelValue":r[2]||=e=>c.value.language=e,options:t.localeOptions,label:y(A)(`Language`),id:`site-language`,name:`language`},{"option-label":a(({option:t})=>[E(e(t.value)+` (`+e(t.label)+`) `,1)]),_:1},8,[`modelValue`,`options`,`label`])],64))}}),q=e=>({url:q.url(e),method:`post`});q.definition={methods:[`post`],url:`/admin/actions/install/validate-db`},q.url=e=>q.definition.url+F(e),q.post=e=>({url:q.url(e),method:`post`});var J=e=>({url:J.url(e),method:`post`});J.definition={methods:[`post`],url:`/admin/actions/install/validate-account`},J.url=e=>J.definition.url+F(e),J.post=e=>({url:J.url(e),method:`post`});var Y=e=>({url:Y.url(e),method:`post`});Y.definition={methods:[`post`],url:`/admin/actions/install/validate-site`},Y.url=e=>Y.definition.url+F(e),Y.post=e=>({url:Y.url(e),method:`post`});var X=e=>({url:X.url(e),method:`post`});X.definition={methods:[`post`],url:`/admin/actions/install/install`},X.url=e=>X.definition.url+F(e),X.post=e=>({url:X.url(e),method:`post`});var Z=e=>({url:Z.url(e),method:`get`});Z.definition={methods:[`get`,`head`],url:`/admin/install`},Z.url=e=>Z.definition.url+F(e),Z.get=e=>({url:Z.url(e),method:`get`}),Z.head=e=>({url:Z.url(e),method:`head`});var ie=()=>{let e=_({start:{},license:{id:`license`,label:`License`},account:{id:`account`,label:`Account`,action:J().url,heading:A(`Create your account`)},db:{id:`db`,label:`Database`,action:q().url,heading:A(`Connect to your database`)},site:{id:`site`,label:`Site`,action:Y().url,heading:A(`Set up your site`),submitLabel:A(`Finish up`)},installing:{label:`Installing`,id:`installing`}}),t=T(()=>Object.keys(e.value).reduce((t,n)=>{let r=e.value[n];return(r.hidden??!1)||(t[n]=r),t},{})),n=T(()=>Object.keys(t.value).reduce((e,n)=>{let r=t.value[n];return(r.label??!1)&&(e[n]=r),e},{})),r=N(t),i=T(()=>r.stepNames.value[r.index.value]);return{...r,possibleSteps:e,currentId:i,dotSteps:n}},ae=``+new URL(`assets/account.png`,import.meta.url).href,oe=``+new URL(`assets/site.png`,import.meta.url).href,se=``+new URL(`assets/db.png`,import.meta.url).href,ce=w(n({__name:`Callout`,props:{variant:{default:`info`},appearance:{default:`default`}},setup(e){return(n,r)=>(s(),u(`div`,{class:p({callout:!0,"callout--danger":e.variant===`danger`,"callout--info":e.variant===`info`,"callout--success":e.variant===`success`,"callout--warning":e.variant===`warning`,"callout--emphasis":e.appearance===`emphasis`,"callout--default":e.appearance===`default`,"callout--outline":e.appearance===`outline`,"callout--plain":e.appearance===`plain`})},[t(n.$slots,`default`,{},void 0,!0)],2))}}),[[`__scopeId`,`data-v-2a01f40b`]]),le={class:`grid grid-cols-5 gap-2`},ue={class:`col-span-2`},de={class:`col-span-2`},fe={key:0,class:`error-list col-span-5`},pe={class:`grid grid-cols-2 gap-2`},me={key:0,class:`error-list col-span-2`},he={class:`grid grid-cols-4 gap-2`},ge={class:`col-span-2`},_e=n({__name:`DbFields`,props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=n,i=t,o=T({get(){return i.modelValue},set(e){r(`update:modelValue`,e)}}),c=[{value:`mysql`,label:`MySQL`},{value:`pgsql`,label:`PostgreSQL`}];return R(`db-driver`),(n,r)=>(s(),u(g,null,[t.errors&&t.errors[`*`]?(s(),m(ce,{key:0,variant:`danger`},{default:a(()=>[O(`ul`,null,[(s(!0),u(g,null,k(t.errors[`*`],t=>(s(),u(`li`,null,e(t),1))),256))])]),_:1})):D(``,!0),O(`div`,le,[O(`div`,ue,[d(j,{label:y(A)(`Driver`),name:`driver`,id:`db-driver`,modelValue:o.value.driver,"onUpdate:modelValue":r[0]||=e=>o.value.driver=e,ref:`db-driver`,options:c,error:t.errors?.drive},null,8,[`label`,`modelValue`,`error`])]),O(`div`,de,[d(L,{label:y(A)(`Host`),name:`host`,id:`db-host`,modelValue:o.value.host,"onUpdate:modelValue":r[1]||=e=>o.value.host=e,placeholder:`127.0.0.1`,error:t.errors?.host},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(L,{label:y(A)(`Port`),name:`port`,id:`db-port`,modelValue:o.value.port,"onUpdate:modelValue":r[2]||=e=>o.value.port=e,size:`7`,error:t.errors?.port},null,8,[`label`,`modelValue`,`error`])]),t.errors?.server?(s(),u(`ul`,fe,[O(`li`,null,e(t.errors?.server),1)])):D(``,!0)]),O(`div`,pe,[O(`div`,null,[d(L,{label:y(A)(`Username`),name:`username`,id:`db-username`,modelValue:o.value.username,"onUpdate:modelValue":r[3]||=e=>o.value.username=e,placeholder:`root`,error:t.errors?.username},null,8,[`label`,`modelValue`,`error`])]),O(`div`,null,[d(H,{label:y(A)(`Password`),name:`password`,id:`db-password`,modelValue:o.value.password,"onUpdate:modelValue":r[4]||=e=>o.value.password=e,error:t.errors?.password},null,8,[`label`,`modelValue`,`error`])]),t.errors?.user?(s(),u(`ul`,me,[O(`li`,null,e(t.errors?.user),1)])):D(``,!0)]),O(`div`,he,[O(`div`,ge,[d(L,{label:y(A)(`Database Name`),name:`name`,id:`db-database`,modelValue:o.value.database,"onUpdate:modelValue":r[5]||=e=>o.value.database=e,errors:t.errors?.database},null,8,[`label`,`modelValue`,`errors`])]),O(`div`,null,[d(L,{label:y(A)(`Prefix`),name:`prefix`,id:`db-prefix`,modelValue:o.value.prefix,"onUpdate:modelValue":r[6]||=e=>o.value.prefix=e,maxlength:`5`,size:`7`,error:t.errors?.prefix},null,8,[`label`,`modelValue`,`error`])])])],64))}}),ve={key:0,class:`content`},ye={key:1,class:`content`},be={key:2,class:`content`},xe={class:`text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs`},Se=w(n({__name:`InstallingScreen`,props:{data:{}},setup(t){let{props:n}=v(),i=t,{execute:o,error:c,isSuccess:l,isLoading:d,isError:f}=P(`/admin/actions/install/install`,{onSuccess:e=>{setTimeout(()=>{window.location.href=n.postCpLoginRedirect},1e3)}});return r(async()=>{await o(i.data)}),(t,n)=>(s(),m(M,{class:`max-w-[80ch] mx-auto`},{default:a(()=>[y(d)?(s(),u(`div`,ve,[O(`h2`,null,e(y(A)(`Installing Craft CMS…`)),1),n[0]||=O(`craft-spinner`,null,null,-1)])):y(l)?(s(),u(`div`,ye,[O(`h2`,null,e(y(A)(`Craft is installed! 🎉`)),1),n[1]||=O(`div`,{class:`flex justify-center items-center`},[O(`craft-icon`,{name:`circle-check`,variant:`regular`,style:{color:`var(--c-color-success-fill-loud)`,"font-size":`2.5rem`}})],-1)])):D(``,!0),y(f)?(s(),u(`div`,be,[O(`h2`,null,e(y(A)(`Install failed 😞`)),1),O(`div`,xe,e(y(c).message),1)])):D(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-900f8a00`]]),Ce={class:`grid md:grid-cols-2 gap-4 items-center`},we={class:`aspect-[352/455] w-1/2 md:w-3/4 mx-auto`},Te=[`src`],Ee={class:`mb-4`},De={class:`grid gap-3 md:pr-6`},Q=n({__name:`StepScreen`,props:{illustrationSrc:{default:``},heading:{default:``}},setup(n){return(r,i)=>(s(),u(`div`,Ce,[O(`div`,we,[O(`img`,{loading:`lazy`,src:n.illustrationSrc,alt:``,width:`368`},null,8,Te)]),O(`div`,null,[O(`h2`,Ee,e(n.heading),1),O(`div`,De,[t(r.$slots,`default`)])])]))}}),$={class:`install`},Oe=[`innerHTML`],ke={class:`flex justify-center w-full`},Ae={key:2},je={class:`grid grid-cols-3 items-center gap-2 w-full`},Me={class:`flex gap-2 justify-center`},Ne={class:`sr-only`},Pe=[`loading`],Fe=w(n({__name:`Install`,props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){te(e=>({v9fee5bf4:n.value}));let n=T(()=>`url(${re})`),r=t,{dotSteps:i,current:o,currentId:c,goTo:l,goToNext:f,goToPrevious:_,isCurrent:v,possibleSteps:w}=ie();x(()=>{w.value.db.hidden=!r.showDbScreen});function j(){l(`license`)}let N=C({account:{},db:{},site:{}}),P=h({account:{username:``,email:``,password:``},db:{driver:r.dbConfig.driver,host:r.dbConfig.host,port:r.dbConfig.port,database:r.dbConfig.database,username:r.dbConfig.username,password:r.dbConfig.password,prefix:r.dbConfig.prefix},site:{name:r.defaultSystemName,baseUrl:r.defaultSiteUrl,language:r.defaultSiteLanguage}}),F=T(()=>!v(`start`));function L(e){if(P.processing)return;N[c.value]={};let t=e.currentTarget;P.transform(e=>e[c.value]).post(t.action,{onSuccess:()=>{f()},onError:e=>{N[c.value]=e}})}return(n,r)=>(s(),u(g,null,[d(y(ee),{title:y(A)(`Install Craft CMS`)},null,8,[`title`]),O(`div`,$,[y(v)(`start`)?(s(),u(`craft-button`,{key:0,type:`button`,onClick:j,variant:`accent`,class:`begin-button`},[E(e(y(A)(`Install Craft CMS`))+` `,1),r[6]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)])):D(``,!0),d(I,{"is-active":F.value,overlay:!1,width:`2xl`},{default:a(()=>[y(v)(`license`)?(s(),m(M,{key:0,class:`max-w-[80ch] mx-auto`},{actions:a(()=>[O(`div`,ke,[O(`craft-button`,{type:`button`,variant:`accent`,onClick:r[0]||=e=>y(l)(`account`)},e(y(A)(`Got it`)),1)])]),default:a(()=>[d(y(S),{data:`licenseHtml`},{fallback:a(()=>[...r[7]||=[O(`div`,{class:`flex justify-center`},[O(`craft-spinner`)],-1)]]),default:a(()=>[O(`div`,{class:`license`,innerHTML:t.licenseHtml},null,8,Oe)]),_:1})]),_:1})):y(v)(`installing`)?(s(),m(Se,{key:1,data:y(P),onSuccess:r[1]||=e=>y(f)()},null,8,[`data`])):(s(),u(`div`,Ae,[d(M,{as:`form`,action:y(o).action,onSubmit:b(L,[`prevent`])},{"footer-content":a(()=>[O(`div`,je,[O(`craft-button`,{type:`button`,onClick:r[5]||=(...e)=>y(_)&&y(_)(...e),appearance:`plain`,class:`justify-self-start`},[E(e(y(A)(`Back`))+` `,1),r[9]||=O(`craft-icon`,{name:`arrow-left`,slot:`prefix`},null,-1)]),O(`ul`,Me,[(s(!0),u(g,null,k(y(i),(t,n)=>(s(),u(`li`,{key:n},[O(`span`,{class:p([`dot`,{"dot--active":y(v)(n)}])},[O(`span`,Ne,e(t.label),1)],2)]))),128))]),O(`craft-button`,{class:`justify-self-end`,type:`submit`,variant:`accent`,loading:y(P).processing},[E(e(y(o).submitLabel??y(A)(`Next`))+` `,1),r[10]||=O(`craft-icon`,{name:`arrow-right`,slot:`suffix`},null,-1)],8,Pe)])]),default:a(()=>[y(v)(`account`)?(s(),m(Q,{key:0,"illustration-src":y(ae),heading:y(o).heading,class:`screen`},{default:a(()=>[y(v)(`account`)?(s(),m(U,{key:0,modelValue:y(P).account,"onUpdate:modelValue":r[2]||=e=>y(P).account=e,errors:N.account},null,8,[`modelValue`,`errors`])):D(``,!0)]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`db`)?(s(),m(Q,{key:1,"illustration-src":y(se),heading:y(o).heading,class:`screen`},{default:a(()=>[d(_e,{modelValue:y(P).db,"onUpdate:modelValue":r[3]||=e=>y(P).db=e,errors:N.db},null,8,[`modelValue`,`errors`])]),_:1},8,[`illustration-src`,`heading`])):D(``,!0),y(v)(`site`)?(s(),m(Q,{key:2,"illustration-src":y(oe),heading:y(o).heading,class:`screen`},{default:a(()=>[d(y(S),{data:`localeOptions`},{fallback:a(()=>[...r[8]||=[O(`craft-spinner`,null,null,-1)]]),default:a(()=>[d(K,{modelValue:y(P).site,"onUpdate:modelValue":r[4]||=e=>y(P).site=e,localeOptions:t.localeOptions,errors:N.site},null,8,[`modelValue`,`localeOptions`,`errors`])]),_:1})]),_:1},8,[`illustration-src`,`heading`])):D(``,!0)]),_:1},8,[`action`])]))]),_:1},8,[`is-active`])])],64))}}),[[`__scopeId`,`data-v-2498bb7d`]]);export{Fe as default};
\ No newline at end of file
diff --git a/resources/build/ModalForm.js b/resources/build/ModalForm.js
index 7652d21fda7..e865228487c 100644
--- a/resources/build/ModalForm.js
+++ b/resources/build/ModalForm.js
@@ -1 +1 @@
-import{$ as e,B as t,C as n,E as r,J as i,L as a,S as o,T as s,b as c,m as l,v as u,y as d,z as f}from"./_plugin-vue_export-helper.js";import{r as p}from"./nav-item-9g3ebwBJ.js";import{t as m}from"./Pane.js";import{t as h}from"./Modal.js";var g=[`variant`],_=[`variant`],v=r({__name:`Badge`,props:{variant:{default:`default`}},setup(e){let n=e,r=u(()=>n.variant===`default`?`empty`:n.variant);return(n,i)=>(a(),o(`craft-callout`,{variant:e.variant,size:`small`,class:`items-center`,inline:``},[d(`craft-indicator`,{slot:`icon`,variant:r.value},null,8,_),d(`span`,null,[t(n.$slots,`default`)])],8,g))}}),y=[`loading`],b=r({__name:`ModalForm`,props:{isActive:{type:Boolean},overlay:{type:Boolean,default:!0},width:{},loading:{type:Boolean,default:!1},title:{},resetLabel:{default:p(`Cancel`)},submitLabel:{default:p(`Save`)}},emits:[`close`,`submit`],setup(r,{emit:o}){let u=o;function p(){u(`submit`)}return(o,g)=>(a(),c(h,{isActive:r.isActive,overlay:r.overlay,onClose:g[1]||=e=>u(`close`),width:r.width},{default:i(()=>[d(`form`,{onSubmit:l(p,[`prevent`])},[s(m,{title:r.title},n({"secondary-action":i(()=>[d(`craft-button`,{type:`reset`,onClick:g[0]||=e=>u(`close`),appearance:`plain`},e(r.resetLabel),1)]),"primary-action":i(()=>[d(`craft-button`,{type:`submit`,variant:`primary`,loading:r.loading},e(r.submitLabel),9,y)]),default:i(()=>[t(o.$slots,`default`)]),_:2},[f(o.$slots,(e,n)=>({name:n,fn:i(()=>[t(o.$slots,n)])}))]),1032,[`title`])],32)]),_:3},8,[`isActive`,`overlay`,`width`]))}});export{v as n,b as t};
\ No newline at end of file
+import{$ as e,B as t,C as n,E as r,J as i,L as a,S as o,T as s,b as c,m as l,v as u,y as d,z as f}from"./_plugin-vue_export-helper.js";import{r as p}from"./nav-item-9g3ebwBJ.js";import{t as m}from"./Pane.js";import{t as h}from"./Modal.js";var g=[`variant`],_=[`variant`],v=r({__name:`Badge`,props:{variant:{default:`default`}},setup(e){let n=e,r=u(()=>n.variant===`default`?`empty`:n.variant);return(n,i)=>(a(),o(`craft-callout`,{variant:e.variant,size:`small`,class:`items-center`,inline:``},[d(`craft-indicator`,{slot:`icon`,variant:r.value},null,8,_),d(`span`,null,[t(n.$slots,`default`)])],8,g))}}),y=[`loading`],b=r({__name:`ModalForm`,props:{isActive:{type:Boolean},overlay:{type:Boolean,default:!0},width:{},loading:{type:Boolean,default:!1},title:{},resetLabel:{default:p(`Cancel`)},submitLabel:{default:p(`Save`)}},emits:[`close`,`submit`],setup(r,{emit:o}){let u=o;function p(){u(`submit`)}return(o,g)=>(a(),c(h,{isActive:r.isActive,overlay:r.overlay,onClose:g[1]||=e=>u(`close`),width:r.width},{default:i(()=>[d(`form`,{onSubmit:l(p,[`prevent`])},[s(m,{title:r.title},n({"secondary-action":i(()=>[d(`craft-button`,{type:`reset`,onClick:g[0]||=e=>u(`close`),appearance:`plain`},e(r.resetLabel),1)]),"primary-action":i(()=>[d(`craft-button`,{type:`submit`,variant:`accent`,loading:r.loading},e(r.submitLabel),9,y)]),default:i(()=>[t(o.$slots,`default`)]),_:2},[f(o.$slots,(e,n)=>({name:n,fn:i(()=>[t(o.$slots,n)])}))]),1032,[`title`])],32)]),_:3},8,[`isActive`,`overlay`,`width`]))}});export{v as n,b as t};
\ No newline at end of file
diff --git a/resources/build/Queue.ts.js b/resources/build/Queue.ts.js
index 8b900c6047d..e1dfffbf894 100644
--- a/resources/build/Queue.ts.js
+++ b/resources/build/Queue.ts.js
@@ -1,4 +1,4 @@
-import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js";import{c as n,f as r,t as i}from"./lit.js";import{a}from"./decorators.js";function o(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function s(e,t,n){o(e,t),t.set(e,n)}function c(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function l(e,t,n){return e.set(c(e,t),n),n}function u(e,t){return e.get(c(e,t))}var d={Pending:1,Reserved:2,Done:3,Failed:4,Delayed:5,Cancelled:6},f={Default:`default`,Success:`success`,Warning:`warning`,Danger:`danger`,Info:`info`},p={Accent:`accent`,OutlineFill:`outline-fill`,Fill:`fill`,Outline:`outline`,Plain:`plain`};function m(e,t){o(e,t),t.add(e)}var h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakSet,D=class extends i{constructor(...e){super(...e),m(this,E),this.progress=0,this.failed=!1,this.color=`currentColor`,this.bgColor=`#a3afbb`,this.failColor=`#da5a47`,this.label=`Progress`,this.autoComplete=!1,s(this,h,null),s(this,g,0),s(this,_,0),s(this,v,0),s(this,y,0),s(this,b,0),s(this,x,null),s(this,S,0),s(this,C,null),s(this,w,0),s(this,T,!1)}connectedCallback(){super.connectedCallback(),l(T,this,window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)}disconnectedCallback(){super.disconnectedCallback(),c(E,this,ae).call(this)}firstUpdated(){l(h,this,this.renderRoot.querySelector(`canvas`)),c(E,this,ee).call(this),c(E,this,te).call(this)}updated(e){e.has(`progress`)?c(E,this,te).call(this):(e.has(`color`)||e.has(`bgColor`)||e.has(`failColor`)||e.has(`failed`))&&c(E,this,O).call(this)}get canvas(){return u(h,this)}get prefersReducedMotion(){return u(T,this)}runCompleteAnimation(){return new Promise(e=>{if(u(T,this)){l(b,this,1),u(h,this)&&(u(h,this).style.opacity=`0`),c(E,this,O).call(this),e();return}c(E,this,ie).call(this,1,()=>{u(h,this)&&(u(h,this).style.transition=`opacity 0.4s`,u(h,this).style.opacity=`0`),setTimeout(e,400)})})}async complete(){await this.runCompleteAnimation(),this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0}))}render(){return n`
+import{n as e}from"./rolldown-runtime.js";import{t}from"./decorate-EVKP5RjP.js";import{c as n,f as r,t as i}from"./lit.js";import{a}from"./decorators.js";function o(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function s(e,t,n){o(e,t),t.set(e,n)}function c(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function l(e,t,n){return e.set(c(e,t),n),n}function u(e,t){return e.get(c(e,t))}var d={Pending:1,Reserved:2,Done:3,Failed:4,Delayed:5,Cancelled:6},f={Neutral:`neutral`,Success:`success`,Warning:`warning`,Danger:`danger`,Info:`info`},p={Solid:`solid`,OutlineFill:`outline-fill`,Fill:`fill`,Outline:`outline`,Plain:`plain`};function m(e,t){o(e,t),t.add(e)}var h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakSet,D=class extends i{constructor(...e){super(...e),m(this,E),this.progress=0,this.failed=!1,this.color=`currentColor`,this.bgColor=`#a3afbb`,this.failColor=`#da5a47`,this.label=`Progress`,this.autoComplete=!1,s(this,h,null),s(this,g,0),s(this,_,0),s(this,v,0),s(this,y,0),s(this,b,0),s(this,x,null),s(this,S,0),s(this,C,null),s(this,w,0),s(this,T,!1)}connectedCallback(){super.connectedCallback(),l(T,this,window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)}disconnectedCallback(){super.disconnectedCallback(),c(E,this,ae).call(this)}firstUpdated(){l(h,this,this.renderRoot.querySelector(`canvas`)),c(E,this,ee).call(this),c(E,this,te).call(this)}updated(e){e.has(`progress`)?c(E,this,te).call(this):(e.has(`color`)||e.has(`bgColor`)||e.has(`failColor`)||e.has(`failed`))&&c(E,this,O).call(this)}get canvas(){return u(h,this)}get prefersReducedMotion(){return u(T,this)}runCompleteAnimation(){return new Promise(e=>{if(u(T,this)){l(b,this,1),u(h,this)&&(u(h,this).style.opacity=`0`),c(E,this,O).call(this),e();return}c(E,this,ie).call(this,1,()=>{u(h,this)&&(u(h,this).style.transition=`opacity 0.4s`,u(h,this).style.opacity=`0`),setTimeout(e,400)})})}async complete(){await this.runCompleteAnimation(),this.dispatchEvent(new CustomEvent(`complete`,{bubbles:!0,composed:!0}))}render(){return n`
|