diff --git a/.agents/skills/inertia-react-development/SKILL.md b/.agents/skills/inertia-react-development/SKILL.md deleted file mode 100644 index e440560..0000000 --- a/.agents/skills/inertia-react-development/SKILL.md +++ /dev/null @@ -1,524 +0,0 @@ ---- -name: inertia-react-development -description: "Develops Inertia.js v3 React client-side applications. Activates when creating React pages, forms, or navigation; using ,
, useForm, useHttp, setLayoutProps, or router; working with deferred props, prefetching, optimistic updates, instant visits, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation." -license: MIT -metadata: - author: laravel ---- - -# Inertia React Development - -## When to Apply - -Activate this skill when: - -- Creating or modifying React page components for Inertia -- Working with forms in React (using ``, `useForm`, or `useHttp`) -- Implementing client-side navigation with `` or `router` -- Using v3 features: deferred props, prefetching, optimistic updates, instant visits, layout props, HTTP requests, WhenVisible, InfiniteScroll, once props, flash data, or polling -- Building React-specific features with the Inertia protocol - -## Documentation - -Use `search-docs` for detailed Inertia v3 React patterns and documentation. - -## Basic Usage - -### Page Components Location - -React page components should be placed in the `resources/js/pages` directory. - -### Page Component Structure - - -```react -export default function UsersIndex({ users }) { - return ( -
-

Users

- -
- ) -} -``` - -## Client-Side Navigation - -### Basic Link Component - -Use `` for client-side navigation instead of traditional `` tags: - - -```react -import { Link, router } from '@inertiajs/react' - -Home -Users -View User -``` - -### Link with Method - - -```react -import { Link } from '@inertiajs/react' - - - Logout - -``` - -### Prefetching - -Prefetch pages to improve perceived performance: - - -```react -import { Link } from '@inertiajs/react' - - - Users - -``` - -### Programmatic Navigation - - -```react -import { router } from '@inertiajs/react' - -function handleClick() { - router.visit('/users') -} - -// Or with options -router.visit('/users', { - method: 'post', - data: { name: 'John' }, - onSuccess: () => console.log('Success!'), -}) -``` - -## Form Handling - -### Form Component (Recommended) - -The recommended way to build forms is with the `` component: - - -```react -import { Form } from '@inertiajs/react' - -export default function CreateUser() { - return ( - - {({ errors, processing, wasSuccessful }) => ( - <> - - {errors.name &&
{errors.name}
} - - - {errors.email &&
{errors.email}
} - - - - {wasSuccessful &&
User created!
} - - )} - - ) -} -``` - -### Form Component With All Props - - -```react -import { Form } from '@inertiajs/react' - -
- {({ - errors, - hasErrors, - processing, - progress, - wasSuccessful, - recentlySuccessful, - clearErrors, - resetAndClearErrors, - defaults, - isDirty, - reset, - submit - }) => ( - <> - - {errors.name &&
{errors.name}
} - - - - {progress && ( - - {progress.percentage}% - - )} - - {wasSuccessful &&
Saved!
} - - )} -
-``` - -### Form Component Reset Props - -The `
` component supports automatic resetting: - -- `resetOnError` - Reset form data when the request fails -- `resetOnSuccess` - Reset form data when the request succeeds -- `setDefaultsOnSuccess` - Update default values on success - -Use the `search-docs` tool with a query of `form component resetting` for detailed guidance. - - -```react -import { Form } from '@inertiajs/react' - - - {({ errors, processing, wasSuccessful }) => ( - <> - - {errors.name &&
{errors.name}
} - - - - )} -
-``` - -Forms can also be built using the `useForm` helper for more programmatic control. Use the `search-docs` tool with a query of `useForm helper` for guidance. - -### `useForm` Hook - -For more programmatic control or to follow existing conventions, use the `useForm` hook: - - -```react -import { useForm } from '@inertiajs/react' - -export default function CreateUser() { - const { data, setData, post, processing, errors, reset } = useForm({ - name: '', - email: '', - password: '', - }) - - function submit(e) { - e.preventDefault() - post('/users', { - onSuccess: () => reset('password'), - }) - } - - return ( -
- setData('name', e.target.value)} - /> - {errors.name &&
{errors.name}
} - - setData('email', e.target.value)} - /> - {errors.email &&
{errors.email}
} - - setData('password', e.target.value)} - /> - {errors.password &&
{errors.password}
} - - -
- ) -} -``` - -## Inertia v3 Features - -### HTTP Requests - -Use the `useHttp` hook for standalone HTTP requests that do not trigger Inertia page visits. It provides the same developer experience as `useForm`, but for plain JSON endpoints. - - -```react -import { useHttp } from '@inertiajs/react' - -export default function Search() { - const { data, setData, get, processing } = useHttp({ - query: '', - }) - - function search(e) { - setData('query', e.target.value) - get('/api/search', { - onSuccess: (response) => { - console.log(response) - }, - }) - } - - return ( - <> - - {processing &&
Searching...
} - - ) -} -``` - -### Optimistic Updates - -Apply data changes instantly before the server responds, with automatic rollback on failure: - - -```react -import { router } from '@inertiajs/react' - -function like(post) { - router.optimistic((props) => ({ - post: { - ...props.post, - likes: props.post.likes + 1, - }, - })).post(`/posts/${post.id}/like`) -} -``` - -Optimistic updates also work with `useForm` and the `
` component: - - -```react -import { Form } from '@inertiajs/react' - - ({ - todos: [...props.todos, { id: Date.now(), name: data.name, done: false }], - })} -> - - -
-``` - -### Instant Visits - -Navigate to a new page immediately without waiting for the server response. The target component renders right away with shared props, while page-specific props load in the background. - - -```react -import { Link } from '@inertiajs/react' - -Dashboard - - - View Post - -``` - -### Layout Props - -Share dynamic data between pages and persistent layouts: - - -```react -export default function Layout({ title = 'My App', showSidebar = true, children }) { - return ( - <> -
{title}
- {showSidebar && } -
{children}
- - ) -} -``` - - -```react -import { setLayoutProps } from '@inertiajs/react' - -export default function Dashboard() { - setLayoutProps({ - title: 'Dashboard', - showSidebar: false, - }) - - return

Dashboard

-} -``` - -### Deferred Props - -Use deferred props to load data after initial page render: - - -```react -export default function UsersIndex({ users }) { - return ( -
-

Users

- {!users ? ( -
-
-
-
- ) : ( -
    - {users.map(user => ( -
  • {user.name}
  • - ))} -
- )} -
- ) -} -``` - -### Polling - -Use the `usePoll` hook to automatically refresh data at intervals. It handles cleanup on unmount and throttles polling when the tab is inactive. - - -```react -import { usePoll } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - usePoll(5000) - - return ( -
-

Dashboard

-
Active Users: {stats.activeUsers}
-
- ) -} -``` - - -```react -import { usePoll } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - const { start, stop } = usePoll(5000, { - only: ['stats'], - onStart() { - console.log('Polling request started') - }, - onFinish() { - console.log('Polling request finished') - }, - }, { - autoStart: false, - keepAlive: true, - }) - - return ( -
-

Dashboard

-
Active Users: {stats.activeUsers}
- - -
- ) -} -``` - -- `autoStart` (default `true`) - set to `false` to start polling manually via the returned `start()` function -- `keepAlive` (default `false`) - set to `true` to prevent throttling when the browser tab is inactive - -### WhenVisible - -Lazy-load a prop when an element scrolls into view. Useful for deferring expensive data that sits below the fold: - - -```react -import { WhenVisible } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - return ( -
-

Dashboard

- - Loading stats...
}> - {({ fetching }) => ( -
-

Total Users: {stats.total_users}

-

Revenue: {stats.revenue}

- {fetching && Refreshing...} -
- )} - - - ) -} -``` - -### InfiniteScroll - -Automatically load additional pages of paginated data as users scroll: - - -```react -import { InfiniteScroll } from '@inertiajs/react' - -export default function Users({ users }) { - return ( - - {users.data.map(user => ( -
{user.name}
- ))} -
- ) -} -``` - -The server must use `Inertia::scroll()` to configure the paginated data. Use the `search-docs` tool with a query of `infinite scroll` for detailed guidance on buffers, manual loading, reverse mode, and custom trigger elements. - -## Server-Side Patterns - -Server-side patterns (Inertia::render, props, middleware) are covered in inertia-laravel guidelines. - -## Common Pitfalls - -- Using traditional `
` links instead of Inertia's `` component (breaks SPA behavior) -- Forgetting to add loading states (skeleton screens) when using deferred props -- Not handling the `undefined` state of deferred props before data loads -- Using `
` without preventing default submission (use `` component or `e.preventDefault()`) -- Forgetting to check if `` component is available in your Inertia version -- Using `router.cancel()` instead of `router.cancelAll()` (v3 breaking change) -- Using `router.on('invalid', ...)` or `router.on('exception', ...)` instead of the renamed `httpException` and `networkError` events \ No newline at end of file diff --git a/.claude/skills/inertia-react-development/SKILL.md b/.claude/skills/inertia-react-development/SKILL.md deleted file mode 100644 index e440560..0000000 --- a/.claude/skills/inertia-react-development/SKILL.md +++ /dev/null @@ -1,524 +0,0 @@ ---- -name: inertia-react-development -description: "Develops Inertia.js v3 React client-side applications. Activates when creating React pages, forms, or navigation; using , , useForm, useHttp, setLayoutProps, or router; working with deferred props, prefetching, optimistic updates, instant visits, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation." -license: MIT -metadata: - author: laravel ---- - -# Inertia React Development - -## When to Apply - -Activate this skill when: - -- Creating or modifying React page components for Inertia -- Working with forms in React (using ``, `useForm`, or `useHttp`) -- Implementing client-side navigation with `` or `router` -- Using v3 features: deferred props, prefetching, optimistic updates, instant visits, layout props, HTTP requests, WhenVisible, InfiniteScroll, once props, flash data, or polling -- Building React-specific features with the Inertia protocol - -## Documentation - -Use `search-docs` for detailed Inertia v3 React patterns and documentation. - -## Basic Usage - -### Page Components Location - -React page components should be placed in the `resources/js/pages` directory. - -### Page Component Structure - - -```react -export default function UsersIndex({ users }) { - return ( -
-

Users

-
    - {users.map(user =>
  • {user.name}
  • )} -
-
- ) -} -``` - -## Client-Side Navigation - -### Basic Link Component - -Use `` for client-side navigation instead of traditional `
` tags: - - -```react -import { Link, router } from '@inertiajs/react' - -Home -Users -View User -``` - -### Link with Method - - -```react -import { Link } from '@inertiajs/react' - - - Logout - -``` - -### Prefetching - -Prefetch pages to improve perceived performance: - - -```react -import { Link } from '@inertiajs/react' - - - Users - -``` - -### Programmatic Navigation - - -```react -import { router } from '@inertiajs/react' - -function handleClick() { - router.visit('/users') -} - -// Or with options -router.visit('/users', { - method: 'post', - data: { name: 'John' }, - onSuccess: () => console.log('Success!'), -}) -``` - -## Form Handling - -### Form Component (Recommended) - -The recommended way to build forms is with the `` component: - - -```react -import { Form } from '@inertiajs/react' - -export default function CreateUser() { - return ( - - {({ errors, processing, wasSuccessful }) => ( - <> - - {errors.name &&
{errors.name}
} - - - {errors.email &&
{errors.email}
} - - - - {wasSuccessful &&
User created!
} - - )} - - ) -} -``` - -### Form Component With All Props - - -```react -import { Form } from '@inertiajs/react' - -
- {({ - errors, - hasErrors, - processing, - progress, - wasSuccessful, - recentlySuccessful, - clearErrors, - resetAndClearErrors, - defaults, - isDirty, - reset, - submit - }) => ( - <> - - {errors.name &&
{errors.name}
} - - - - {progress && ( - - {progress.percentage}% - - )} - - {wasSuccessful &&
Saved!
} - - )} -
-``` - -### Form Component Reset Props - -The `
` component supports automatic resetting: - -- `resetOnError` - Reset form data when the request fails -- `resetOnSuccess` - Reset form data when the request succeeds -- `setDefaultsOnSuccess` - Update default values on success - -Use the `search-docs` tool with a query of `form component resetting` for detailed guidance. - - -```react -import { Form } from '@inertiajs/react' - - - {({ errors, processing, wasSuccessful }) => ( - <> - - {errors.name &&
{errors.name}
} - - - - )} -
-``` - -Forms can also be built using the `useForm` helper for more programmatic control. Use the `search-docs` tool with a query of `useForm helper` for guidance. - -### `useForm` Hook - -For more programmatic control or to follow existing conventions, use the `useForm` hook: - - -```react -import { useForm } from '@inertiajs/react' - -export default function CreateUser() { - const { data, setData, post, processing, errors, reset } = useForm({ - name: '', - email: '', - password: '', - }) - - function submit(e) { - e.preventDefault() - post('/users', { - onSuccess: () => reset('password'), - }) - } - - return ( -
- setData('name', e.target.value)} - /> - {errors.name &&
{errors.name}
} - - setData('email', e.target.value)} - /> - {errors.email &&
{errors.email}
} - - setData('password', e.target.value)} - /> - {errors.password &&
{errors.password}
} - - -
- ) -} -``` - -## Inertia v3 Features - -### HTTP Requests - -Use the `useHttp` hook for standalone HTTP requests that do not trigger Inertia page visits. It provides the same developer experience as `useForm`, but for plain JSON endpoints. - - -```react -import { useHttp } from '@inertiajs/react' - -export default function Search() { - const { data, setData, get, processing } = useHttp({ - query: '', - }) - - function search(e) { - setData('query', e.target.value) - get('/api/search', { - onSuccess: (response) => { - console.log(response) - }, - }) - } - - return ( - <> - - {processing &&
Searching...
} - - ) -} -``` - -### Optimistic Updates - -Apply data changes instantly before the server responds, with automatic rollback on failure: - - -```react -import { router } from '@inertiajs/react' - -function like(post) { - router.optimistic((props) => ({ - post: { - ...props.post, - likes: props.post.likes + 1, - }, - })).post(`/posts/${post.id}/like`) -} -``` - -Optimistic updates also work with `useForm` and the `
` component: - - -```react -import { Form } from '@inertiajs/react' - - ({ - todos: [...props.todos, { id: Date.now(), name: data.name, done: false }], - })} -> - - -
-``` - -### Instant Visits - -Navigate to a new page immediately without waiting for the server response. The target component renders right away with shared props, while page-specific props load in the background. - - -```react -import { Link } from '@inertiajs/react' - -Dashboard - - - View Post - -``` - -### Layout Props - -Share dynamic data between pages and persistent layouts: - - -```react -export default function Layout({ title = 'My App', showSidebar = true, children }) { - return ( - <> -
{title}
- {showSidebar && } -
{children}
- - ) -} -``` - - -```react -import { setLayoutProps } from '@inertiajs/react' - -export default function Dashboard() { - setLayoutProps({ - title: 'Dashboard', - showSidebar: false, - }) - - return

Dashboard

-} -``` - -### Deferred Props - -Use deferred props to load data after initial page render: - - -```react -export default function UsersIndex({ users }) { - return ( -
-

Users

- {!users ? ( -
-
-
-
- ) : ( -
    - {users.map(user => ( -
  • {user.name}
  • - ))} -
- )} -
- ) -} -``` - -### Polling - -Use the `usePoll` hook to automatically refresh data at intervals. It handles cleanup on unmount and throttles polling when the tab is inactive. - - -```react -import { usePoll } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - usePoll(5000) - - return ( -
-

Dashboard

-
Active Users: {stats.activeUsers}
-
- ) -} -``` - - -```react -import { usePoll } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - const { start, stop } = usePoll(5000, { - only: ['stats'], - onStart() { - console.log('Polling request started') - }, - onFinish() { - console.log('Polling request finished') - }, - }, { - autoStart: false, - keepAlive: true, - }) - - return ( -
-

Dashboard

-
Active Users: {stats.activeUsers}
- - -
- ) -} -``` - -- `autoStart` (default `true`) - set to `false` to start polling manually via the returned `start()` function -- `keepAlive` (default `false`) - set to `true` to prevent throttling when the browser tab is inactive - -### WhenVisible - -Lazy-load a prop when an element scrolls into view. Useful for deferring expensive data that sits below the fold: - - -```react -import { WhenVisible } from '@inertiajs/react' - -export default function Dashboard({ stats }) { - return ( -
-

Dashboard

- - Loading stats...
}> - {({ fetching }) => ( -
-

Total Users: {stats.total_users}

-

Revenue: {stats.revenue}

- {fetching && Refreshing...} -
- )} - - - ) -} -``` - -### InfiniteScroll - -Automatically load additional pages of paginated data as users scroll: - - -```react -import { InfiniteScroll } from '@inertiajs/react' - -export default function Users({ users }) { - return ( - - {users.data.map(user => ( -
{user.name}
- ))} -
- ) -} -``` - -The server must use `Inertia::scroll()` to configure the paginated data. Use the `search-docs` tool with a query of `infinite scroll` for detailed guidance on buffers, manual loading, reverse mode, and custom trigger elements. - -## Server-Side Patterns - -Server-side patterns (Inertia::render, props, middleware) are covered in inertia-laravel guidelines. - -## Common Pitfalls - -- Using traditional `
` links instead of Inertia's `` component (breaks SPA behavior) -- Forgetting to add loading states (skeleton screens) when using deferred props -- Not handling the `undefined` state of deferred props before data loads -- Using `
` without preventing default submission (use `` component or `e.preventDefault()`) -- Forgetting to check if `` component is available in your Inertia version -- Using `router.cancel()` instead of `router.cancelAll()` (v3 breaking change) -- Using `router.on('invalid', ...)` or `router.on('exception', ...)` instead of the renamed `httpException` and `networkError` events \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index e34262c..23f3e23 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,7 +9,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. -- php - 8.4 +- php - 8.3 - inertiajs/inertia-laravel (INERTIA_LARAVEL) - v3 - laravel/fortify (FORTIFY) - v1 - laravel/framework (LARAVEL) - v13 @@ -118,13 +118,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac - Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications. -=== herd rules === - -# Laravel Herd - -- The application is served by Laravel Herd at `https?://[kebab-case-project-dir].test`. Use the `get-absolute-url` tool to generate valid URLs. Never run commands to serve the site. It is always available. -- Use the `herd` CLI to manage services, PHP versions, and sites (e.g. `herd sites`, `herd services:start `, `herd php:list`). Run `herd list` to discover all available commands. - === tests rules === # Test Enforcement diff --git a/CLAUDE.md b/CLAUDE.md index e34262c..23f3e23 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. -- php - 8.4 +- php - 8.3 - inertiajs/inertia-laravel (INERTIA_LARAVEL) - v3 - laravel/fortify (FORTIFY) - v1 - laravel/framework (LARAVEL) - v13 @@ -118,13 +118,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac - Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications. -=== herd rules === - -# Laravel Herd - -- The application is served by Laravel Herd at `https?://[kebab-case-project-dir].test`. Use the `get-absolute-url` tool to generate valid URLs. Never run commands to serve the site. It is always available. -- Use the `herd` CLI to manage services, PHP versions, and sites (e.g. `herd sites`, `herd services:start `, `herd php:list`). Run `herd list` to discover all available commands. - === tests rules === # Test Enforcement diff --git a/GEMINI.md b/GEMINI.md index 1ad45de..d52b17f 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -9,7 +9,7 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. -- php - 8.4 +- php - 8.3 - inertiajs/inertia-laravel (INERTIA_LARAVEL) - v3 - laravel/fortify (FORTIFY) - v1 - laravel/framework (LARAVEL) - v13 @@ -118,13 +118,6 @@ This project has domain-specific skills available in `**/skills/**`. You MUST ac - Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications. -=== herd rules === - -# Laravel Herd - -- The application is served by Laravel Herd at `https?://[kebab-case-project-dir].test`. Use the `get-absolute-url` tool to generate valid URLs. Never run commands to serve the site. It is always available. -- Use the `herd` CLI to manage services, PHP versions, and sites (e.g. `herd sites`, `herd services:start `, `herd php:list`). Run `herd list` to discover all available commands. - === tests rules === # Test Enforcement diff --git a/app/Http/Controllers/ThemesController.php b/app/Http/Controllers/ThemesController.php index 04740aa..ce50848 100644 --- a/app/Http/Controllers/ThemesController.php +++ b/app/Http/Controllers/ThemesController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Models\Theme; +use App\Services\AiService; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; @@ -13,24 +14,42 @@ class ThemesController extends Controller { - public function create() + public function create(Request $request) { - return Inertia::render('themes/create'); + $baseTheme = null; + if ($fork = $request->query('fork')) { + $baseTheme = Theme::where('name', $fork)->first(); + if ($baseTheme) { + $baseTheme->load('tags'); + $tags = $baseTheme->tags->pluck('name')->toArray(); + $baseTheme = $baseTheme->toArray(); + $baseTheme['tags'] = $tags; + } + } + + return Inertia::render('themes/create', [ + 'baseTheme' => $baseTheme, + ]); } public function store(Request $request) { $request->validate([ - 'url' => ['required', 'url'], + 'url' => ['required_without:theme_data', 'nullable', 'url'], + 'theme_data' => ['required_without:url', 'nullable', 'array'], ]); - $response = Http::get($request->url); + if ($request->url) { + $response = Http::get($request->url); - if ($response->failed()) { - return back()->withErrors(['url' => 'Could not fetch registry from the provided URL.']); - } + if ($response->failed()) { + return back()->withErrors(['url' => 'Could not fetch registry from the provided URL.']); + } - $data = $response->json(); + $data = $response->json(); + } else { + $data = $request->theme_data; + } if (empty($data) || ! is_array($data)) { return back()->withErrors(['url' => 'Invalid registry JSON format.']); @@ -56,6 +75,12 @@ public function store(Request $request) $errors[] = '"cssVars.dark" must be an object.'; } } + } elseif (isset($data['vars_light']) && isset($data['vars_dark'])) { + // Support direct vars_light/vars_dark for manual/AI creation + $data['cssVars'] = [ + 'light' => $data['vars_light'], + 'dark' => $data['vars_dark'], + ]; } if (isset($data['files'])) { @@ -100,22 +125,28 @@ public function store(Request $request) } if (! empty($errors)) { - return back()->withErrors(['url' => implode(' ', $errors)]); + $errorKey = $request->url ? 'url' : 'theme_data'; + + return back()->withErrors([$errorKey => implode(' ', $errors)]); } $data['name'] = Str::kebab($data['name']); $data['type'] = 'registry:theme'; if (! ($data['author'] ?? null)) { - $host = Str::of(parse_url($request->url, PHP_URL_HOST)) - ->replaceFirst('www.', '') - ->before('.') - ->toString(); - $data['author'] = $host; + if ($request->url) { + $host = Str::of(parse_url($request->url, PHP_URL_HOST)) + ->replaceFirst('www.', '') + ->before('.') + ->toString(); + $data['author'] = $host; + } else { + $data['author'] = auth()->user()->name; + } } if (Theme::where('name', $data['name'])->exists()) { - return back()->withErrors(['url' => "A theme named [{$data['name']}] already exists."]); + $data['name'] = $data['name'].'-'.Str::random(4); } $theme = Theme::fromRegistry($data); @@ -133,6 +164,21 @@ public function store(Request $request) ->with('success', 'Theme created successfully.'); } + public function generate(Request $request, AiService $aiService) + { + $request->validate([ + 'prompt' => ['required', 'string', 'max:500'], + ]); + + $themeData = $aiService->generateFullTheme($request->prompt); + + if (empty($themeData)) { + return response()->json(['error' => 'Failed to generate theme.'], 500); + } + + return response()->json($themeData); + } + public function index() { $availableTags = Cache::remember('themes:available_tags', 3600, function () { diff --git a/app/Models/Theme.php b/app/Models/Theme.php index a64dc26..2cb44b7 100644 --- a/app/Models/Theme.php +++ b/app/Models/Theme.php @@ -6,6 +6,7 @@ use App\Observers\ThemeObserver; use Illuminate\Database\Eloquent\Attributes\Fillable; use Illuminate\Database\Eloquent\Attributes\ObservedBy; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\SoftDeletes; @@ -27,7 +28,7 @@ #[ObservedBy(ThemeObserver::class)] class Theme extends Model { - use HasTags, HasTheme, SoftDeletes; + use HasFactory, HasTags, HasTheme, SoftDeletes; protected $table = 'themes'; diff --git a/boost.json b/boost.json index cc8eb0d..4662d93 100644 --- a/boost.json +++ b/boost.json @@ -15,7 +15,6 @@ "socialite-development", "wayfinder-development", "pest-testing", - "inertia-react-development", "tailwindcss-development" ] } diff --git a/composer.json b/composer.json index 10d3750..881ac39 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,8 @@ "laravel/tinker": "^3.0", "laravel/wayfinder": "^0.1.14", "spatie/laravel-permission": "^7.4", - "spatie/laravel-tags": "^4.11" + "spatie/laravel-tags": "^4.11", + "symfony/var-dumper": "7.4.*" }, "require-dev": { "fakerphp/faker": "^1.24", diff --git a/composer.lock b/composer.lock index 63db79a..27b8397 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aefce61ee91cb5c06002bf16498e9e32", + "content-hash": "bc5a42e18cc15a4d663e8aab6a3d55ea", "packages": [ { "name": "bacon/bacon-qr-code", @@ -8151,31 +8151,31 @@ }, { "name": "symfony/var-dumper", - "version": "v8.0.8", + "version": "v7.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1" + "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", - "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9510c3966f749a1d1ff0059e1eabef6cc621e7fd", + "reference": "9510c3966f749a1d1ff0059e1eabef6cc621e7fd", "shasum": "" }, "require": { - "php": ">=8.4", - "symfony/polyfill-mbstring": "^1.0" + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<7.4", - "symfony/error-handler": "<7.4" + "symfony/console": "<6.4" }, "require-dev": { - "symfony/console": "^7.4|^8.0", - "symfony/http-kernel": "^7.4|^8.0", - "symfony/process": "^7.4|^8.0", - "symfony/uid": "^7.4|^8.0", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/uid": "^6.4|^7.0|^8.0", "twig/twig": "^3.12" }, "bin": [ @@ -8214,7 +8214,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v8.0.8" + "source": "https://github.com/symfony/var-dumper/tree/v7.4.8" }, "funding": [ { @@ -8234,7 +8234,7 @@ "type": "tidelift" } ], - "time": "2026-03-31T07:15:36+00:00" + "time": "2026-03-30T13:44:50+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -12441,5 +12441,5 @@ "php": "^8.4" }, "platform-dev": {}, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/database/factories/ThemeFactory.php b/database/factories/ThemeFactory.php new file mode 100644 index 0000000..e64b6ba --- /dev/null +++ b/database/factories/ThemeFactory.php @@ -0,0 +1,40 @@ + + */ +class ThemeFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + $name = $this->faker->unique()->slug(); + + return [ + 'user_id' => User::factory(), + 'name' => $name, + 'title' => $this->faker->words(3, true), + 'description' => $this->faker->sentence(), + 'vars_light' => [ + 'background' => '0 0% 100%', + 'foreground' => '240 10% 3.9%', + 'primary' => '240 5.9% 10%', + ], + 'vars_dark' => [ + 'background' => '240 10% 3.9%', + 'foreground' => '0 0% 98%', + 'primary' => '0 0% 98%', + ], + ]; + } +} diff --git a/npm_dev.log b/npm_dev.log new file mode 100644 index 0000000..8ec6c5c --- /dev/null +++ b/npm_dev.log @@ -0,0 +1,5 @@ + +> dev +> vite + +sh: 1: vite: not found diff --git a/package-lock.json b/package-lock.json index ebe0ac9..f80e1e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "laravel-vite-plugin": "^3.1.0", "lucide-react": "^0.475.0", "motion": "^12.38.0", - "openai": "^6.37.0", + "openai": "^6.38.0", "prismjs": "^1.30.0", "radix-ui": "^1.4.3", "react": "^19.2.6", @@ -9232,9 +9232,9 @@ } }, "node_modules/openai": { - "version": "6.37.0", - "resolved": "https://registry.npmjs.org/openai/-/openai-6.37.0.tgz", - "integrity": "sha512-0H5dEGFmmLv6KSd0W1w2nyL8WsLkX6yoLeQpU+dZAOuGcany5qkYQMmj35ZrKgb6yiyYqpUzFOpR8mZQkgqeEQ==", + "version": "6.38.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-6.38.0.tgz", + "integrity": "sha512-AoMplt2UalrpgUDMh3L09QWjNRlgJPipclQvA6sYAaeF6nHNBMgmikAZGmcYLn8on4d9sQY9Q8bOLfrBS7Lc8g==", "license": "Apache-2.0", "bin": { "openai": "bin/cli" diff --git a/php_server.log b/php_server.log new file mode 100644 index 0000000..6dac293 --- /dev/null +++ b/php_server.log @@ -0,0 +1,311 @@ + + INFO Server running on [http://127.0.0.1:8000]. + + Press Ctrl+C to stop the server + + 2026-05-16 13:00:41 /login ..................................... ~ 500.69ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.24ms + 2026-05-16 13:00:42 /build/assets/app-DwgJtLjQ.css ............... ~ 0.32ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.48ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.48ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.53ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.58ms + 2026-05-16 13:00:42 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.04ms + 2026-05-16 13:00:42 /build/assets/login-B4lH5do8.js .............. ~ 0.07ms + 2026-05-16 13:00:42 /build/assets/label-D-AkZnW_.js .............. ~ 0.20ms + 2026-05-16 13:00:42 /build/assets/dist-CyCRNm1V.js ............... ~ 0.41ms + 2026-05-16 13:00:42 /build/assets/check-CCTwZBIw.js .............. ~ 0.55ms + 2026-05-16 13:00:42 /build/assets/socialite-DAGU8Gzo.js .......... ~ 0.71ms + 2026-05-16 13:00:42 /build/assets/app-CVlP31Z1.js ................ ~ 0.89ms + 2026-05-16 13:00:42 /_debugbar/assets ............................ ~ 0.66ms + 2026-05-16 13:00:42 /build/assets/github-BytY2MM3.js ............. ~ 0.34ms + 2026-05-16 13:00:42 /build/assets/password-input-QL8S9D3F.js ..... ~ 0.65ms + 2026-05-16 13:00:42 /build/assets/input-error-BdHD9-x4.js ........ ~ 0.29ms + 2026-05-16 13:00:42 /build/assets/text-link-B7waIO2E.js .......... ~ 0.38ms + 2026-05-16 13:00:42 /build/assets/spinner-CoRrGFqk.js ............ ~ 0.48ms + 2026-05-16 13:00:42 /_debugbar/assets ............................ ~ 0.03ms + 2026-05-16 13:00:42 /build/assets/loader-circle-XO7crStb.js ...... ~ 0.87ms + 2026-05-16 13:00:42 /build/assets/password-CsunKxsK.js ........... ~ 0.74ms + 2026-05-16 13:00:42 /build/assets/confirm-iDcX_7zW.js ............ ~ 0.87ms + 2026-05-16 13:00:43 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.13ms + 2026-05-16 13:00:43 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.21ms + 2026-05-16 13:01:37 /login ....................................... ~ 0.12ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.08ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.14ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.19ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.24ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.35ms + 2026-05-16 13:01:37 /build/assets/app-DwgJtLjQ.css ............... ~ 0.46ms + 2026-05-16 13:01:37 /_debugbar/assets ............................ ~ 0.10ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.09ms + 2026-05-16 13:01:37 /build/assets/login-B4lH5do8.js .............. ~ 0.14ms + 2026-05-16 13:01:37 /build/assets/label-D-AkZnW_.js .............. ~ 0.36ms + 2026-05-16 13:01:37 /build/assets/dist-CyCRNm1V.js ............... ~ 0.50ms + 2026-05-16 13:01:37 /build/assets/app-CVlP31Z1.js ................ ~ 0.68ms + 2026-05-16 13:01:37 /build/assets/check-CCTwZBIw.js .............. ~ 0.06ms + 2026-05-16 13:01:37 /build/assets/socialite-DAGU8Gzo.js .......... ~ 0.25ms + 2026-05-16 13:01:37 /build/assets/password-input-QL8S9D3F.js ..... ~ 0.36ms + 2026-05-16 13:01:37 /build/assets/github-BytY2MM3.js ............. ~ 0.44ms + 2026-05-16 13:01:37 /build/assets/input-error-BdHD9-x4.js ........ ~ 0.60ms + 2026-05-16 13:01:37 /build/assets/text-link-B7waIO2E.js .......... ~ 0.18ms + 2026-05-16 13:01:37 /build/assets/spinner-CoRrGFqk.js ............ ~ 0.29ms + 2026-05-16 13:01:37 /build/assets/password-CsunKxsK.js ........... ~ 0.30ms + 2026-05-16 13:01:37 /build/assets/loader-circle-XO7crStb.js ...... ~ 0.58ms + 2026-05-16 13:01:37 /build/assets/confirm-iDcX_7zW.js ............ ~ 0.57ms + 2026-05-16 13:01:37 /_debugbar/assets ............................ ~ 0.16ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 500.55ms + 2026-05-16 13:01:37 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.30ms + 2026-05-16 13:01:38 /login ..................................... ~ 500.42ms + 2026-05-16 13:01:39 /dashboard ................................... ~ 0.03ms + 2026-05-16 13:01:39 /_debugbar/open .............................. ~ 0.04ms + 2026-05-16 13:01:39 /_debugbar/open .............................. ~ 0.31ms + 2026-05-16 13:01:41 /themes/create ............................... ~ 0.11ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.13ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.19ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.24ms + 2026-05-16 13:01:41 /build/assets/create-DWmMMfkI.js ............. ~ 0.28ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.40ms + 2026-05-16 13:01:41 /build/assets/main-layout-DiaP0ISn.js ........ ~ 0.45ms + 2026-05-16 13:01:41 /build/assets/app-DwgJtLjQ.css ............... ~ 0.04ms + 2026-05-16 13:01:41 /build/assets/placeholder-pattern-CMjSLXXB.js ~ 0.05ms + 2026-05-16 13:01:41 /build/assets/sun-CDBr7ehg.js ................ ~ 0.38ms + 2026-05-16 13:01:41 /build/assets/glow-stack-DaYuOL5d.js ......... ~ 0.30ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.67ms + 2026-05-16 13:01:41 /build/assets/card-BMwhGcsv.js ............... ~ 0.47ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.22ms + 2026-05-16 13:01:41 /build/assets/label-D-AkZnW_.js .............. ~ 0.11ms + 2026-05-16 13:01:41 /build/assets/check-CCTwZBIw.js .............. ~ 0.23ms + 2026-05-16 13:01:41 /build/assets/app-CVlP31Z1.js ................ ~ 0.39ms + 2026-05-16 13:01:41 /build/assets/github-BytY2MM3.js ............. ~ 0.51ms + 2026-05-16 13:01:41 /build/assets/loader-circle-XO7crStb.js ...... ~ 0.69ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.03ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-600-normal-B9e8oLYv.woff ~ 0.04ms + 2026-05-16 13:01:41 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.09ms + 2026-05-16 13:07:46 /login ....................................... ~ 0.13ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.09ms + 2026-05-16 13:07:46 /build/assets/app-Cepr_1pM.css ............... ~ 0.16ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.30ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.35ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.40ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.44ms + 2026-05-16 13:07:46 /_debugbar/assets ............................ ~ 0.02ms + 2026-05-16 13:07:46 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.07ms + 2026-05-16 13:07:46 /build/assets/login-Dl7zqRmw.js .............. ~ 0.12ms + 2026-05-16 13:07:46 /build/assets/label-BEGn4mDy.js .............. ~ 0.26ms + 2026-05-16 13:07:46 /build/assets/dist-FMp-wKgF.js ............... ~ 0.38ms + 2026-05-16 13:07:46 /build/assets/app-t0zkJl3W.js ................ ~ 0.57ms + 2026-05-16 13:07:46 /build/assets/check-lG57EO4u.js .............. ~ 0.07ms + 2026-05-16 13:07:46 /build/assets/socialite-B5uUfCjR.js .......... ~ 0.32ms + 2026-05-16 13:07:46 /build/assets/password-input-0Arh7dRl.js ..... ~ 0.45ms + 2026-05-16 13:07:46 /build/assets/github-D4O3YWJ6.js ............. ~ 0.53ms + 2026-05-16 13:07:46 /build/assets/input-error-nM-55OXd.js ........ ~ 0.67ms + 2026-05-16 13:07:46 /build/assets/text-link-D6AsDMWO.js .......... ~ 0.17ms + 2026-05-16 13:07:46 /build/assets/spinner-Ca5g_4_r.js ............ ~ 0.20ms + 2026-05-16 13:07:46 /build/assets/loader-circle-CBDF0HJ_.js ...... ~ 0.43ms + 2026-05-16 13:07:46 /build/assets/password-oDltnRva.js ........... ~ 0.52ms + 2026-05-16 13:07:46 /build/assets/confirm-yRWW3fdM.js ............ ~ 0.65ms + 2026-05-16 13:07:46 /_debugbar/assets ............................ ~ 0.62ms + 2026-05-16 13:07:47 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.04ms + 2026-05-16 13:07:47 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.09ms + 2026-05-16 13:07:48 /login ..................................... ~ 500.43ms + 2026-05-16 13:07:48 /dashboard ................................... ~ 0.03ms + 2026-05-16 13:07:48 /_debugbar/open .............................. ~ 0.10ms + 2026-05-16 13:07:48 /_debugbar/open .............................. ~ 0.39ms + 2026-05-16 13:07:50 /themes/create ............................... ~ 0.17ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.09ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.14ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.18ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.23ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.30ms + 2026-05-16 13:07:50 /build/assets/create-b8caykA-.js ............. ~ 0.35ms + 2026-05-16 13:07:50 /build/assets/popover-Cvj6nQrP.js ............ ~ 0.07ms + 2026-05-16 13:07:50 /build/assets/tabs-DGRbvRwG.js ............... ~ 0.24ms + 2026-05-16 13:07:50 /build/assets/app-Cepr_1pM.css ............... ~ 0.40ms + 2026-05-16 13:07:50 /build/assets/color-utils-EgcE6_BX.js ........ ~ 0.51ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.62ms + 2026-05-16 13:07:50 /build/assets/main-layout-C-4RrJnG.js ........ ~ 0.67ms + 2026-05-16 13:07:50 /build/assets/sun-CWyb80F9.js ................ ~ 0.07ms + 2026-05-16 13:07:50 /build/assets/placeholder-pattern-CbHbctQs.js ~ 0.21ms + 2026-05-16 13:07:50 /build/assets/glow-stack-CKER3ASb.js ......... ~ 0.26ms + 2026-05-16 13:07:50 /build/assets/card-CrkRsm4M.js ............... ~ 0.40ms + 2026-05-16 13:07:50 /build/assets/main-theme-card-Oa0nREEd.js .... ~ 0.54ms + 2026-05-16 13:07:50 /build/assets/glow-radial-Evr5btJB.js ........ ~ 0.71ms + 2026-05-16 13:07:50 /build/assets/label-BEGn4mDy.js .............. ~ 0.06ms + 2026-05-16 13:07:50 /build/assets/check-lG57EO4u.js .............. ~ 0.27ms + 2026-05-16 13:07:50 /build/assets/github-D4O3YWJ6.js ............. ~ 0.40ms + 2026-05-16 13:07:50 /build/assets/app-t0zkJl3W.js ................ ~ 0.59ms + 2026-05-16 13:07:50 /build/assets/loader-circle-CBDF0HJ_.js ...... ~ 0.71ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.04ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-600-normal-B9e8oLYv.woff ~ 0.09ms + 2026-05-16 13:07:50 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.14ms + 2026-05-16 13:16:30 /login ....................................... ~ 0.18ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.04ms + 2026-05-16 13:16:30 /_debugbar/assets ............................ ~ 0.04ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.30ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.36ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.41ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.50ms + 2026-05-16 13:16:30 /build/assets/app-Cepr_1pM.css ............... ~ 0.60ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.07ms + 2026-05-16 13:16:30 /build/assets/login-ChcC_8AO.js .............. ~ 0.12ms + 2026-05-16 13:16:30 /build/assets/label-Bm_XQ51m.js .............. ~ 0.25ms + 2026-05-16 13:16:30 /build/assets/dist-BbyHtHkN.js ............... ~ 0.38ms + 2026-05-16 13:16:30 /build/assets/check-DyiRX4Xw.js .............. ~ 0.53ms + 2026-05-16 13:16:30 /build/assets/app-oD_smNiH.js ................ ~ 0.69ms + 2026-05-16 13:16:30 /build/assets/socialite-nLlijaNu.js .......... ~ 1.67ms + 2026-05-16 13:16:30 /build/assets/password-input-edyn0ldP.js ..... ~ 1.90ms + 2026-05-16 13:16:30 /build/assets/github-CKHGr0Eu.js ............. ~ 2.03ms + 2026-05-16 13:16:30 /build/assets/input-error-BKflSobO.js ........ ~ 2.16ms + 2026-05-16 13:16:30 /build/assets/text-link-CLgvsck4.js .......... ~ 0.73ms + 2026-05-16 13:16:30 /build/assets/spinner-G1qHHBFp.js ............ ~ 0.07ms + 2026-05-16 13:16:30 /build/assets/loader-circle-TxyH1sMW.js ...... ~ 0.22ms + 2026-05-16 13:16:30 /_debugbar/assets ............................ ~ 0.29ms + 2026-05-16 13:16:30 /build/assets/password-BYr0oeQb.js ........... ~ 0.62ms + 2026-05-16 13:16:30 /build/assets/confirm-4rcYKmMR.js ............ ~ 0.88ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.04ms + 2026-05-16 13:16:30 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.09ms + 2026-05-16 13:16:31 /login ..................................... ~ 500.46ms + 2026-05-16 13:16:32 /dashboard ................................... ~ 0.03ms + 2026-05-16 13:16:32 /_debugbar/open .............................. ~ 0.03ms + 2026-05-16 13:16:32 /_debugbar/open .............................. ~ 0.30ms + 2026-05-16 13:16:33 /themes/create ............................... ~ 0.11ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.14ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.19ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.24ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.29ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.33ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.33ms + 2026-05-16 13:16:33 /build/assets/app-Cepr_1pM.css ............... ~ 0.07ms + 2026-05-16 13:16:33 /build/assets/create-CKJR6MW9.js ............. ~ 0.20ms + 2026-05-16 13:16:33 /build/assets/popover-CMxhrS4e.js ............ ~ 0.34ms + 2026-05-16 13:16:33 /build/assets/tabs-CIeNcDCw.js ............... ~ 0.50ms + 2026-05-16 13:16:33 /build/assets/label-Bm_XQ51m.js .............. ~ 0.68ms + 2026-05-16 13:16:33 /build/assets/color-utils-EgcE6_BX.js ........ ~ 0.38ms + 2026-05-16 13:16:33 /build/assets/main-layout-CZKESKz-.js ........ ~ 0.46ms + 2026-05-16 13:16:33 /build/assets/app-oD_smNiH.js ................ ~ 1.02ms + 2026-05-16 13:16:33 /build/assets/sun-D0QtTDKA.js ................ ~ 0.69ms + 2026-05-16 13:16:33 /build/assets/placeholder-pattern-DQ049twe.js ~ 0.06ms + 2026-05-16 13:16:33 /build/assets/glow-stack-BsODASz1.js ......... ~ 0.10ms + 2026-05-16 13:16:33 /build/assets/card-DbftTBhB.js ............... ~ 0.20ms + 2026-05-16 13:16:33 /build/assets/main-theme-card-C5qy-QOO.js .... ~ 0.39ms + 2026-05-16 13:16:33 /build/assets/glow-radial-DzS8n93o.js ........ ~ 0.06ms + 2026-05-16 13:16:33 /build/assets/check-DyiRX4Xw.js .............. ~ 0.15ms + 2026-05-16 13:16:33 /build/assets/github-CKHGr0Eu.js ............. ~ 0.28ms + 2026-05-16 13:16:33 /build/assets/loader-circle-TxyH1sMW.js ...... ~ 0.39ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.05ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-600-normal-B9e8oLYv.woff ~ 0.10ms + 2026-05-16 13:16:33 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.14ms + 2026-05-16 13:19:21 /login ....................................... ~ 0.15ms + 2026-05-16 13:19:21 /build/assets/app-Cepr_1pM.css ............... ~ 0.09ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.23ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.29ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.33ms + 2026-05-16 13:19:21 /_debugbar/assets ............................ ~ 0.03ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.66ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.71ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.31ms + 2026-05-16 13:19:21 /build/assets/login-DBeospjT.js .............. ~ 0.11ms + 2026-05-16 13:19:21 /build/assets/app-CDTTmT5q.js ................ ~ 0.52ms + 2026-05-16 13:19:21 /build/assets/label-HjChP4NT.js .............. ~ 0.06ms + 2026-05-16 13:19:21 /build/assets/dist-BSWObGKZ.js ............... ~ 0.19ms + 2026-05-16 13:19:21 /build/assets/check-DIZpAYhB.js .............. ~ 0.33ms + 2026-05-16 13:19:21 /build/assets/socialite-j_TSd3nX.js .......... ~ 0.52ms + 2026-05-16 13:19:21 /build/assets/password-input-Ce0OxZVs.js ..... ~ 0.63ms + 2026-05-16 13:19:21 /build/assets/github-Dvrv3DFg.js ............. ~ 0.06ms + 2026-05-16 13:19:21 /build/assets/input-error-DOkH3rlS.js ........ ~ 0.19ms + 2026-05-16 13:19:21 /build/assets/text-link-CWPOkL8O.js .......... ~ 0.27ms + 2026-05-16 13:19:21 /build/assets/spinner-CkkNsEZR.js ............ ~ 0.38ms + 2026-05-16 13:19:21 /build/assets/loader-circle-BneiEJoj.js ...... ~ 0.50ms + 2026-05-16 13:19:21 /_debugbar/assets ............................ ~ 0.03ms + 2026-05-16 13:19:21 /build/assets/password-CKTtsbof.js ........... ~ 0.31ms + 2026-05-16 13:19:21 /build/assets/confirm-EeVTAroS.js ............ ~ 0.46ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.13ms + 2026-05-16 13:19:21 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.21ms + 2026-05-16 13:19:22 /login ..................................... ~ 504.25ms + 2026-05-16 13:19:23 /dashboard ................................... ~ 0.03ms + 2026-05-16 13:19:23 /_debugbar/open ............................ ~ 500.51ms + 2026-05-16 13:19:23 /_debugbar/open ............................ ~ 500.87ms + 2026-05-16 13:19:24 /themes/create ............................... ~ 0.10ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.08ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.13ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.44ms + 2026-05-16 13:19:24 /build/assets/create-CBrpIMIh.js ............. ~ 0.62ms + 2026-05-16 13:19:24 /build/assets/popover-CU2Pu7oR.js ............ ~ 0.78ms + 2026-05-16 13:19:24 /build/assets/tabs-3sMR4DIH.js ............... ~ 0.93ms + 2026-05-16 13:19:24 /build/assets/app-Cepr_1pM.css ............... ~ 0.08ms + 2026-05-16 13:19:24 /build/assets/color-utils-EgcE6_BX.js ........ ~ 0.08ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.45ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.22ms + 2026-05-16 13:19:24 /build/assets/sun-CaRqgIa8.js ................ ~ 0.27ms + 2026-05-16 13:19:24 /build/assets/main-layout-BBVsjXRW.js ........ ~ 0.46ms + 2026-05-16 13:19:24 /build/assets/placeholder-pattern-BxzTt3oZ.js ~ 0.54ms + 2026-05-16 13:19:24 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.07ms + 2026-05-16 13:19:24 /build/assets/glow-stack-CD0aM0Yh.js ......... ~ 0.12ms + 2026-05-16 13:19:24 /build/assets/card-B0uGXLso.js ............... ~ 0.28ms + 2026-05-16 13:19:24 /build/assets/main-theme-card-CXCXK_av.js .... ~ 0.42ms + 2026-05-16 13:19:24 /build/assets/glow-radial-TZeI-bSg.js ........ ~ 0.49ms + 2026-05-16 13:19:24 /build/assets/label-HjChP4NT.js .............. ~ 0.06ms + 2026-05-16 13:19:24 /build/assets/check-DIZpAYhB.js .............. ~ 0.19ms + 2026-05-16 13:19:24 /build/assets/github-Dvrv3DFg.js ............. ~ 0.32ms + 2026-05-16 13:19:24 /build/assets/loader-circle-BneiEJoj.js ...... ~ 0.45ms + 2026-05-16 13:19:24 /build/assets/app-CDTTmT5q.js ................ ~ 1.13ms + 2026-05-16 13:19:25 /build/assets/instrument-sans-600-normal-B9e8oLYv.woff ~ 0.16ms + 2026-05-16 13:19:25 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.24ms + 2026-05-16 13:19:25 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.29ms + 2026-05-16 16:30:13 /login ..................................... ~ 517.06ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 1.07ms + 2026-05-16 16:30:14 /build/assets/app-DN02iwDR.css ............... ~ 1.17ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 1.19ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 1.14ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 1.17ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 1.22ms + 2026-05-16 16:30:14 /_debugbar/assets ............................ ~ 0.03ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 1.06ms + 2026-05-16 16:30:14 /build/assets/login-00JrbYrx.js .............. ~ 0.12ms + 2026-05-16 16:30:14 /build/assets/label-fRwP89Ez.js .............. ~ 0.60ms + 2026-05-16 16:30:14 /build/assets/dist-D5bK512v.js ............... ~ 0.77ms + 2026-05-16 16:30:14 /build/assets/app-D7MKN1zp.js ................ ~ 0.95ms + 2026-05-16 16:30:14 /build/assets/check-BBvDdM_9.js .............. ~ 0.06ms + 2026-05-16 16:30:14 /build/assets/socialite-BBNBBxaD.js .......... ~ 0.19ms + 2026-05-16 16:30:14 /build/assets/password-input-__9RhIwi.js ..... ~ 0.78ms + 2026-05-16 16:30:14 /build/assets/github-Be9qoVk0.js ............. ~ 0.86ms + 2026-05-16 16:30:14 /build/assets/input-error-CzZYqI_U.js ........ ~ 0.99ms + 2026-05-16 16:30:14 /build/assets/text-link-BlYfkXNw.js .......... ~ 0.06ms + 2026-05-16 16:30:14 /build/assets/spinner-CCI0ZpZ9.js ............ ~ 1.02ms + 2026-05-16 16:30:14 /build/assets/loader-circle-YfjFJaoY.js ...... ~ 1.17ms + 2026-05-16 16:30:14 /build/assets/password-BDtte38w.js ........... ~ 1.26ms + 2026-05-16 16:30:14 /build/assets/confirm-tDhmficG.js ............ ~ 1.38ms + 2026-05-16 16:30:14 /_debugbar/assets ............................ ~ 0.04ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.21ms + 2026-05-16 16:30:14 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.26ms + 2026-05-16 16:30:15 /login ........................................... ~ 1s + 2026-05-16 16:30:16 /dashboard ................................... ~ 0.04ms + 2026-05-16 16:30:16 /_debugbar/open .............................. ~ 0.04ms + 2026-05-16 16:30:16 /_debugbar/open .............................. ~ 0.26ms + 2026-05-16 16:30:17 /themes/create ............................... ~ 0.16ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-400-normal-DRC__1Mx.woff2 ~ 0.09ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-400-normal-Q_nF8v4l.woff2 ~ 0.20ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-500-normal-Dk9ku72i.woff2 ~ 0.27ms + 2026-05-16 16:30:17 /build/assets/create-BmSt6sO8.js ............. ~ 0.31ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-500-normal-CTEe1bJa.woff2 ~ 0.44ms + 2026-05-16 16:30:17 /build/assets/popover-B2UUPq8p.js ............ ~ 0.48ms + 2026-05-16 16:30:17 /build/assets/app-DN02iwDR.css ............... ~ 0.04ms + 2026-05-16 16:30:17 /build/assets/tabs-CNNfAj8l.js ............... ~ 0.26ms + 2026-05-16 16:30:17 /build/assets/color-utils-DTvyGxAC.js ........ ~ 0.22ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-600-normal-B7fBEWYG.woff2 ~ 0.35ms + 2026-05-16 16:30:17 /build/assets/sun-r0X8DC4y.js ................ ~ 0.41ms + 2026-05-16 16:30:17 /build/assets/placeholder-pattern-DUvj6lOE.js ~ 0.55ms + 2026-05-16 16:30:17 /build/assets/main-layout-qej9zSi0.js ........ ~ 0.61ms + 2026-05-16 16:30:17 /build/assets/glow-stack-BaNii-nE.js ......... ~ 0.08ms + 2026-05-16 16:30:17 /build/assets/instrument-sans-600-normal-BsaQcF38.woff2 ~ 0.17ms + 2026-05-16 16:30:17 /build/assets/card-C1ekp7Ou.js ............... ~ 0.22ms + 2026-05-16 16:30:17 /build/assets/main-theme-card-B0GTBBPN.js .... ~ 0.36ms + 2026-05-16 16:30:17 /build/assets/glow-radial-CIe4ekoG.js ........ ~ 0.42ms + 2026-05-16 16:30:17 /build/assets/app-D7MKN1zp.js ................ ~ 0.51ms + 2026-05-16 16:30:17 /build/assets/label-fRwP89Ez.js .............. ~ 0.06ms + 2026-05-16 16:30:17 /build/assets/check-BBvDdM_9.js .............. ~ 0.19ms + 2026-05-16 16:30:17 /build/assets/github-Be9qoVk0.js ............. ~ 0.32ms + 2026-05-16 16:30:17 /build/assets/loader-circle-YfjFJaoY.js ...... ~ 0.89ms + 2026-05-16 16:30:18 /build/assets/instrument-sans-600-normal-B9e8oLYv.woff ~ 0.14ms + 2026-05-16 16:30:18 /build/assets/instrument-sans-400-normal-D1W7dsQl.woff ~ 0.22ms + 2026-05-16 16:30:18 /build/assets/instrument-sans-500-normal-Z6ESRlEs.woff ~ 0.27ms diff --git a/public/build/assets/animate-css-BwrG5zYQ.js b/public/build/assets/animate-css-BwrG5zYQ.js new file mode 100644 index 0000000..487103d --- /dev/null +++ b/public/build/assets/animate-css-BwrG5zYQ.js @@ -0,0 +1,7 @@ +import{t as e}from"./check-BBvDdM_9.js";import{t}from"./chevron-down-DuPWSveW.js";import{t as n}from"./copy-HrVumo6t.js";import{t as r}from"./heart-BDAPM7f6.js";import{t as i}from"./main-layout-qej9zSi0.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./main-registry-installer-_-xwUN0S.js";import{At as d,B as f,C as p,Ct as m,Dt as h,Et as g,Ft as _,G as v,H as y,It as b,K as x,Kt as S,Mt as C,Nt as w,Ot as T,Pt as E,Q as D,St as O,Tt as k,V as A,Wt as j,_t as M,an as N,bt as P,dt as F,ft as I,gt as ee,ht as L,jt as te,kt as R,ln as z,lt as ne,mt as re,nn as ie,pt as B,qt as ae,r as V,rn as oe,tn as se,ut as H,vt as ce,wt as le,xt as ue,yt as de}from"./app-D7MKN1zp.js";import{a as fe,n as pe,o as me,t as he}from"./card-C1ekp7Ou.js";import{c as ge,i as U,o as _e,r as ve,s as ye,t as be}from"./dialog-CM260op0.js";import{l as xe}from"./glow-stack-BaNii-nE.js";var Se=v(`Share`,[[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}],[`polyline`,{points:`16 6 12 2 8 6`,key:`m901s6`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`15`,key:`1p0rca`}]]),Ce=v(`ThumbsUp`,[[`path`,{d:`M7 10v12`,key:`1qc93n`}],[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}]]),W=z(oe()),we=ae();function Te(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Ee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var De={autoSleep:120,force3D:`auto`,nullTargetWarn:1,units:{lineHeight:``}},G={duration:.5,overwrite:!1,delay:0},Oe,ke,K,Ae=1e8,je=1/Ae,Me=Math.PI*2,Ne=Me/4,Pe=0,Fe=Math.sqrt,Ie=Math.cos,Le=Math.sin,Re=function(e){return typeof e==`string`},ze=function(e){return typeof e==`function`},Be=function(e){return typeof e==`number`},Ve=function(e){return e===void 0},He=function(e){return typeof e==`object`},Ue=function(e){return e!==!1},We=function(){return typeof window<`u`},Ge=function(e){return ze(e)||Re(e)},Ke=typeof ArrayBuffer==`function`&&ArrayBuffer.isView||function(){},qe=Array.isArray,Je=/random\([^)]+\)/g,Ye=/,\s*/g,Xe=/(?:-?\.?\d|\.)+/gi,Ze=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Qe=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,$e=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,et=/[+-]=-?[.\d]+/,tt=/[^,'"\[\]\s]+/gi,nt=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,rt,it,at,ot,st={},ct={},lt,ut=function(e){return(ct=Ht(e,st))&&ci},dt=function(e,t){return console.warn(`Invalid property`,e,`set to`,t,`Missing plugin? gsap.registerPlugin()`)},ft=function(e,t){return!t&&console.warn(e)},pt=function(e,t){return e&&(st[e]=t)&&ct&&(ct[e]=t)||st},mt=function(){return 0},ht={suppressEvents:!0,isStart:!0,kill:!1},gt={suppressEvents:!0,kill:!1},_t={suppressEvents:!0},vt={},yt=[],bt={},xt,St={},Ct={},wt=30,Tt=[],Et=``,Dt=function(e){var t=e[0],n,r;if(He(t)||ze(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=Tt.length;r--&&!Tt[r].targetTest(t););n=Tt[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new vr(e[r],n)))||e.splice(r,1);return e},Ot=function(e){return e._gsap||Dt(En(e))[0]._gsap},kt=function(e,t,n){return(n=e[t])&&ze(n)?e[t]():Ve(n)&&e.getAttribute&&e.getAttribute(t)||n},At=function(e,t){return(e=e.split(`,`)).forEach(t)||e},jt=function(e){return Math.round(e*1e5)/1e5||0},Mt=function(e){return Math.round(e*1e7)/1e7||0},Nt=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n===`+`?e+r:n===`-`?e-r:n===`*`?e*r:e/r},Pt=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++ro;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=a,t.parent=t._dp=e,t},Jt=function(e,t,n,r){n===void 0&&(n=`_first`),r===void 0&&(r=`_last`);var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Yt=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Xt=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Zt=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Qt=function(e,t,n,r){return e._startAt&&(ke?e._startAt.revert(gt):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},$t=function e(t){return!t||t._ts&&e(t.parent)},en=function(e){return e._repeat?tn(e._tTime,e=e.duration()+e._rDelay)*e:0},tn=function(e,t){var n=Math.floor(e=Mt(e/t));return e&&n===e?n-1:n},nn=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},rn=function(e){return e._end=Mt(e._start+(e._tDur/Math.abs(e._ts||e._rts||je)||0))},an=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Mt(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),rn(e),n._dirty||Xt(n,e)),e},on=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._startje)&&t.render(n,!0)),Xt(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-je}},sn=function(e,t,n,r){return t.parent&&Yt(t),t._start=Mt((Be(n)?n:n||e!==rt?_n(e,n,t):e._time)+t._delay),t._end=Mt(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),qt(e,t,`_first`,`_last`,e._sort?`_start`:0),dn(t)||(e._recent=t),r||on(e,t),e._ts<0&&an(e,e._tTime),e},cn=function(e,t){return(st.ScrollTrigger||dt(`scrollTrigger`,t))&&st.ScrollTrigger.create(t,e)},ln=function(e,t,n,r,i){if(Dr(e,t,i),!e._initted)return 1;if(!n&&e._pt&&!ke&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&xt!==ir.frame)return yt.push(e),e._lazy=[i,r],1},un=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},dn=function(e){var t=e.data;return t===`isFromStart`||t===`isStart`},fn=function(e,t,n,r){var i=e.ratio,a=t<0||!t&&(!e._start&&un(e)&&!(!e._initted&&dn(e))||(e._ts<0||e._dp._ts<0)&&!dn(e))?0:1,o=e._rDelay,s=0,c,l,u;if(o&&e._repeat&&(s=bn(0,e._tDur,t),l=tn(s,o),e._yoyo&&l&1&&(a=1-a),l!==tn(e._tTime,o)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||ke||r||e._zTime===je||!t&&e._zTime){if(!e._initted&&ln(e,t,r,n,s))return;for(u=e._zTime,e._zTime=t||(n?je:0),n||=t&&!u,e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=s,c=e._pt;c;)c.r(a,c.d),c=c._next;t<0&&Qt(e,t,n,!0),e._onUpdate&&!n&&Un(e,`onUpdate`),s&&e._repeat&&!n&&e.parent&&Un(e,`onRepeat`),(t>=e._tDur||t<0)&&e.ratio===a&&(a&&Yt(e,1),!n&&!ke&&(Un(e,a?`onComplete`:`onReverseComplete`,!0),e._prom&&e._prom()))}else e._zTime||=t},pn=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data===`isPause`&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data===`isPause`&&r._start0&&!r&&an(e,e._tTime=e._tDur*o),e.parent&&rn(e),n||Xt(e.parent,e),e},hn=function(e){return e instanceof br?Xt(e):mn(e,e._dur)},gn={_start:0,endTime:mt,totalDuration:mt},_n=function e(t,n,r){var i=t.labels,a=t._recent||gn,o=t.duration()>=Ae?a.endTime(!1):t._dur,s,c,l;return Re(n)&&(isNaN(n)||n in i)?(c=n.charAt(0),l=n.substr(-1)===`%`,s=n.indexOf(`=`),c===`<`||c===`>`?(s>=0&&(n=n.replace(/=/,``)),(c===`<`?a._start:a.endTime(a._repeat>=0))+(parseFloat(n.substr(1))||0)*(l?(s<0?a:r).totalDuration()/100:1)):s<0?(n in i||(i[n]=o),i[n]):(c=parseFloat(n.charAt(s-1)+n.substr(s+1)),l&&r&&(c=c/100*(qe(r)?r[0]:r).totalDuration()),s>1?e(t,n.substr(0,s-1),r)+c:o+c)):n==null?o:+n},vn=function(e,t,n){var r=Be(t[1]),i=(r?2:1)+(e<2?0:1),a=t[i],o,s;if(r&&(a.duration=t[1]),a.parent=n,e){for(o=a,s=n;s&&!(`immediateRender`in o);)o=s.vars.defaults||{},s=Ue(s.vars.inherit)&&s.parent;a.immediateRender=Ue(o.immediateRender),e<2?a.runBackwards=1:a.startAt=t[i-1]}return new Pr(t[0],a,t[i+1])},yn=function(e,t){return e||e===0?t(e):t},bn=function(e,t,n){return nt?t:n},xn=function(e,t){return!Re(e)||!(t=nt.exec(e))?``:t[1]},Sn=function(e,t,n){return yn(n,function(n){return bn(e,t,n)})},Cn=[].slice,wn=function(e,t){return e&&He(e)&&`length`in e&&(!t&&!e.length||e.length-1 in e&&He(e[0]))&&!e.nodeType&&e!==it},Tn=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(e){var r;return Re(e)&&!t||wn(e,1)?(r=n).push.apply(r,En(e)):n.push(e)})||n},En=function(e,t,n){return K&&!t&&K.selector?K.selector(e):Re(e)&&!n&&(at||!ar())?Cn.call((t||ot).querySelectorAll(e),0):qe(e)?Tn(e,n):wn(e)?Cn.call(e,0):e?[e]:[]},Dn=function(e){return e=En(e)[0]||ft(`Invalid scope`)||{},function(t){var n=e.current||e.nativeElement||e;return En(t,n.querySelectorAll?n:n===e?ft(`Invalid scope`)||ot.createElement(`div`):e)}},On=function(e){return e.sort(function(){return .5-Math.random()})},kn=function(e){if(ze(e))return e;var t=He(e)?e:{each:e},n=pr(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,c=t.axis,l=r,u=r;return Re(r)?l=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(l=r[0],u=r[1]),function(e,o,d){var f=(d||t).length,p=a[f],m,h,g,_,v,y,b,x,S;if(!p){if(S=t.grid===`auto`?0:(t.grid||[1,Ae])[1],!S){for(b=-Ae;b<(b=d[S++].getBoundingClientRect().left)&&Sb&&(b=v),vf?f-1:c?c===`y`?f/S:S:Math.max(S,f/S))||0)*(r===`edges`?-1:1),p.b=f<0?i-f:i,p.u=xn(t.amount||t.each)||0,n=n&&f<0?fr(n):n}return f=(p[e]-p.min)/p.max||0,Mt(p.b+(n?n(f):f)*p.v)+p.u}},An=function(e){var t=10**((e+``).split(`.`)[1]||``).length;return function(n){var r=Mt(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(Be(n)?0:xn(n))}},jn=function(e,t){var n=qe(e),r,i;return!n&&He(e)&&(r=n=e.radius||Ae,e.values?(e=En(e.values),(i=!Be(e[0]))&&(r*=r)):e=An(e.increment)),yn(t,n?ze(e)?function(t){return i=e(t),Math.abs(i-t)<=r?i:t}:function(t){for(var n=parseFloat(i?t.x:t),a=parseFloat(i?t.y:0),o=Ae,s=0,c=e.length,l,u;c--;)i?(l=e[c].x-n,u=e[c].y-a,l=l*l+u*u):l=Math.abs(e[c]-n),li?a-e:e)})},zn=function(e){return e.replace(Je,function(e){var t=e.indexOf(`[`)+1,n=e.substring(t||7,t?e.indexOf(`]`):e.length-1).split(Ye);return Mn(t?n:+n[0],t?0:+n[1],+n[2]||1e-5)})},Bn=function(e,t,n,r,i){var a=t-e,o=r-n;return yn(i,function(t){return n+((t-e)/a*o||0)})},Vn=function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o=Re(t),s={},c,l,u,d,f;if(r===!0&&(i=1)&&(r=null),o)t={p:t},n={p:n};else if(qe(t)&&!qe(n)){for(u=[],d=t.length,f=d-2,l=1;l(o=Math.abs(o))&&(s=a,i=o);return s},Un=function(e,t,n){var r=e.vars,i=r[t],a=K,o=e._ctx,s,c,l;if(i)return s=r[t+`Params`],c=r.callbackScope||e,n&&yt.length&&Ft(),o&&(K=o),l=s?i.apply(c,s):i.call(c),K=a,l},Wn=function(e){return Yt(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ke),e.progress()<1&&Un(e,`onInterrupt`),e},Gn,Kn=[],qn=function(e){if(e)if(e=!e.name&&e.default||e,We()||e.headless){var t=e.name,n=ze(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:mt,render:Ur,add:Sr,kill:Gr,modifier:Wr,rawVars:0},a={targetTest:0,get:0,getSetter:zr,aliases:{},register:0};if(ar(),e!==r){if(St[t])return;Bt(r,Bt(Wt(e,i),a)),Ht(r.prototype,Ht(i,Wt(e,a))),St[r.prop=t]=r,e.targetTest&&(Tt.push(r),vt[t]=1),t=(t===`css`?`CSS`:t.charAt(0).toUpperCase()+t.substr(1))+`Plugin`}pt(t,r),e.register&&e.register(ci,r,Jr)}else Kn.push(e)},Jn=255,Yn={aqua:[0,Jn,Jn],lime:[0,Jn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Jn],navy:[0,0,128],white:[Jn,Jn,Jn],olive:[128,128,0],yellow:[Jn,Jn,0],orange:[Jn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Jn,0,0],pink:[Jn,192,203],cyan:[0,Jn,Jn],transparent:[Jn,Jn,Jn,0]},Xn=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Jn+.5|0},Zn=function(e,t,n){var r=e?Be(e)?[e>>16,e>>8&Jn,e&Jn]:0:Yn.black,i,a,o,s,c,l,u,d,f,p;if(!r){if(e.substr(-1)===`,`&&(e=e.substr(0,e.length-1)),Yn[e])r=Yn[e];else if(e.charAt(0)===`#`){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),o=e.charAt(3),e=`#`+i+i+a+a+o+o+(e.length===5?e.charAt(4)+e.charAt(4):``)),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Jn,r&Jn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Jn,e&Jn]}else if(e.substr(0,3)===`hsl`){if(r=p=e.match(Xe),!t)s=r[0]%360/360,c=r[1]/100,l=r[2]/100,a=l<=.5?l*(c+1):l+c-l*c,i=l*2-a,r.length>3&&(r[3]*=1),r[0]=Xn(s+1/3,i,a),r[1]=Xn(s,i,a),r[2]=Xn(s-1/3,i,a);else if(~e.indexOf(`=`))return r=e.match(Ze),n&&r.length<4&&(r[3]=1),r}else r=e.match(Xe)||Yn.transparent;r=r.map(Number)}return t&&!p&&(i=r[0]/Jn,a=r[1]/Jn,o=r[2]/Jn,u=Math.max(i,a,o),d=Math.min(i,a,o),l=(u+d)/2,u===d?s=c=0:(f=u-d,c=l>.5?f/(2-u-d):f/(u+d),s=u===i?(a-o)/f+(at||h<0)&&(r+=h-n),i+=h,y=i-r,_=y-o,(_>0||g)&&(b=++d.frame,f=y-d.time*1e3,d.time=y/=1e3,o+=_+(_>=a?4:a-_),v=1),g||(c=l(u)),v)for(p=0;p=t&&p--},_listeners:s},d}(),ar=function(){return!rr&&ir.wake()},or={},sr=/^[\d.\-M][\d.\-,\s]/,cr=/["']/g,lr=function(e){for(var t={},n=e.substr(1,e.length-3).split(`:`),r=n[0],i=1,a=n.length,o,s,c;i1&&n.config?n.config.apply(null,~e.indexOf(`{`)?[lr(t[1])]:ur(e).split(`,`).map(Rt)):or._CE&&sr.test(e)?or._CE(``,e):n},fr=function(e){return function(t){return 1-e(1-t)}},pr=function(e,t){return e&&(ze(e)?e:or[e]||dr(e))||t},mr=function(e,t,n,r){n===void 0&&(n=function(e){return 1-t(1-e)}),r===void 0&&(r=function(e){return e<.5?t(e*2)/2:1-t((1-e)*2)/2});var i={easeIn:t,easeOut:n,easeInOut:r},a;return At(e,function(e){for(var t in or[e]=st[e]=i,or[a=e.toLowerCase()]=n,i)or[a+(t===`easeIn`?`.in`:t===`easeOut`?`.out`:`.inOut`)]=or[e+`.`+t]=i[t]}),i},hr=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},gr=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/Me*(Math.asin(1/i)||0),s=function(e){return e===1?1:i*2**(-10*e)*Le((e-o)*a)+1},c=t===`out`?s:t===`in`?function(e){return 1-s(1-e)}:hr(s);return a=Me/a,c.config=function(n,r){return e(t,n,r)},c},_r=function e(t,n){n===void 0&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i=t===`out`?r:t===`in`?function(e){return 1-r(1-e)}:hr(r);return i.config=function(n){return e(t,n)},i};At(`Linear,Quad,Cubic,Quart,Quint,Strong`,function(e,t){var n=t<5?t+1:t;mr(e+`,Power`+(n-1),t?function(e){return e**+n}:function(e){return e},function(e){return 1-(1-e)**n},function(e){return e<.5?(e*2)**n/2:1-((1-e)*2)**n/2})}),or.Linear.easeNone=or.none=or.Linear.easeIn,mr(`Elastic`,gr(`in`),gr(`out`),gr()),(function(e,t){var n=1/t,r=2*n,i=2.5*n,a=function(a){return a0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,mn(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(ar(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(an(this,e),!n._dp||n.parent||on(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e0||!this._tDur&&!e)&&sn(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===je||!this._initted&&this._dur&&e||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),Lt(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+en(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-e:e)+en(this),t):this.duration()?Math.min(1,this._time/this._dur):+(this.rawTime()>0)},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?tn(this._tTime,n)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-je?0:this._rts;if(this._rts===e)return this;var n=this.parent&&this._ts?nn(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-je?0:this._rts,this.totalTime(bn(-Math.abs(this._delay),this.totalDuration(),n),t!==!1),rn(this),Zt(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ar(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==je&&(this._tTime-=je)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=Mt(e);var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&sn(t,this,this._start-this._delay),this}return this._start},t.endTime=function(e){return this._start+(Ue(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?nn(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){e===void 0&&(e=_t);var t=ke;return ke=e,It(this)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),this.data!==`nested`&&e.kill!==!1&&this.kill(),ke=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,hn(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,hn(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(_n(this,e),Ue(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,Ue(t)),this._dur||(this._zTime=-je),this},t.play=function(e,t){return e!=null&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return e!=null&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return e!=null&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-je:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-je,this},t.isActive=function(){var e=this.parent||this._dp,t=this._start,n;return!!(!e||this._ts&&this._initted&&e.isActive()&&(n=e.rawTime(!0))>=t&&n1?(t?(r[e]=t,n&&(r[e+`Params`]=n),e===`onUpdate`&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this,n=t._prom;return new Promise(function(r){var i=ze(e)?e:zt,a=function(){var e=t.then;t.then=null,n&&n(),ze(i)&&(i=i(t))&&(i.then||i===t)&&(t.then=e),r(i),t.then=e};t._initted&&t.totalProgress()===1&&t._ts>=0||!t._tTime&&t._ts<0?a():t._prom=a})},t.kill=function(){Wn(this)},e}();Bt(yr.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-je,_prom:0,_ps:!1,_rts:1});var br=function(e){Ee(t,e);function t(t,n){var r;return t===void 0&&(t={}),r=e.call(this,t)||this,r.labels={},r.smoothChildTiming=!!t.smoothChildTiming,r.autoRemoveChildren=!!t.autoRemoveChildren,r._sort=Ue(t.sortChildren),rt&&sn(t.parent||rt,Te(r),n),t.reversed&&r.reverse(),t.paused&&r.paused(!0),t.scrollTrigger&&cn(Te(r),t.scrollTrigger),r}var n=t.prototype;return n.to=function(e,t,n){return vn(0,arguments,this),this},n.from=function(e,t,n){return vn(1,arguments,this),this},n.fromTo=function(e,t,n,r){return vn(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Gt(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Pr(e,t,_n(this,n),1),this},n.call=function(e,t,n){return sn(this,Pr.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Pr(e,n,_n(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,Gt(n).immediateRender=Ue(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,Gt(r).immediateRender=Ue(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r=this._time,i=this._dirty?this.totalDuration():this._tDur,a=this._dur,o=e<=0?0:Mt(e),s=this._zTime<0!=e<0&&(this._initted||!a),c,l,u,d,f,p,m,h,g,_,v,y;if(this!==rt&&o>i&&e>=0&&(o=i),o!==this._tTime||n||s){if(r!==this._time&&a&&(o+=this._time-r,e+=this._time-r),c=o,g=this._start,h=this._ts,p=!h,s&&(a||(r=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(v=this._yoyo,f=a+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(f*100+e,t,n);if(c=Mt(o%f),o===i?(d=this._repeat,c=a):(_=Mt(o/f),d=~~_,d&&d===_&&(c=a,d--),c>a&&(c=a)),_=tn(this._tTime,f),!r&&this._tTime&&_!==d&&this._tTime-_*f-this._dur<=0&&(_=d),v&&d&1&&(c=a-c,y=1),d!==_&&!this._lock){var b=v&&_&1,x=b===(v&&d&1);if(d<_&&(b=!b),r=b?0:o%a?a:o,this._lock=1,this.render(r||(y?0:Mt(d*f)),t,!a)._lock=0,this._tTime=o,!t&&this.parent&&Un(this,`onRepeat`),this.vars.repeatRefresh&&!y&&(this.invalidate()._lock=1,_=d),r&&r!==this._time||p!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act||(a=this._dur,i=this._tDur,x&&(this._lock=2,r=b?a:-1e-4,this.render(r,!0),this.vars.repeatRefresh&&!y&&this.invalidate()),this._lock=0,!this._ts&&!p))return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(m=pn(this,Mt(r),Mt(c)),m&&(o-=c-(c=m._start))),this._tTime=o,this._time=c,this._act=!!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,r=0),!r&&o&&a&&!t&&!_&&(Un(this,`onStart`),this._tTime!==o))return this;if(c>=r&&e>=0)for(l=this._first;l;){if(u=l._next,(l._act||c>=l._start)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(c-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(c-l._start)*l._ts,t,n),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=-je);break}}l=u}else{l=this._last;for(var S=e<0?e:c;l;){if(u=l._prev,(l._act||S<=l._end)&&l._ts&&m!==l){if(l.parent!==this)return this.render(e,t,n);if(l.render(l._ts>0?(S-l._start)*l._ts:(l._dirty?l.totalDuration():l._tDur)+(S-l._start)*l._ts,t,n||ke&&It(l)),c!==this._time||!this._ts&&!p){m=0,u&&(o+=this._zTime=S?-je:je);break}}l=u}}if(m&&!t&&(this.pause(),m.render(c>=r?0:-je)._zTime=c>=r?1:-1,this._ts))return this._start=g,rn(this),this.render(e,t,n);this._onUpdate&&!t&&Un(this,`onUpdate`,!0),(o===i&&this._tTime>=this.totalDuration()||!o&&r)&&(g===this._start||Math.abs(h)!==Math.abs(this._ts))&&(this._lock||((e||!a)&&(o===i&&this._ts>0||!o&&this._ts<0)&&Yt(this,1),!t&&!(e<0&&!r)&&(o||r||!i)&&(Un(this,o===i&&e>=0?`onComplete`:`onReverseComplete`,!0),this._prom&&!(o0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(Be(t)||(t=_n(this,t,e)),!(e instanceof yr)){if(qe(e))return e.forEach(function(e){return n.add(e,t)}),this;if(Re(e))return this.addLabel(e,t);if(ze(e))e=Pr.delayedCall(0,e);else return this}return this===e?this:sn(this,e,t)},n.getChildren=function(e,t,n,r){e===void 0&&(e=!0),t===void 0&&(t=!0),n===void 0&&(n=!0),r===void 0&&(r=-Ae);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Pr?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return Re(e)?this.removeLabel(e):ze(e)?this.killTweensOf(e):(e.parent===this&&Jt(this,e),e===this._recent&&(this._recent=this._last),Xt(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Mt(ir.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=_n(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Pr.delayedCall(0,t||mt,n);return r.data=`isPause`,this._hasPause=1,sn(this,r,_n(this,e))},n.removePause=function(e){var t=this._first;for(e=_n(this,e);t;)t._start===e&&t.data===`isPause`&&Yt(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)Tr!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n=[],r=En(e),i=this._first,a=Be(t),o;i;)i instanceof Pr?Pt(i._targets,r)&&(a?(!Tr||i._initted&&i._ts)&&i.globalTime(0)<=t&&i.globalTime(i.totalDuration())>t:!t||i.isActive())&&n.push(i):(o=i.getTweensOf(r,t)).length&&n.push.apply(n,o),i=i._next;return n},n.tweenTo=function(e,t){t||={};var n=this,r=_n(n,e),i=t,a=i.startAt,o=i.onStart,s=i.onStartParams,c=i.immediateRender,l,u=Pr.to(n,Bt({ease:t.ease||`none`,lazy:!1,immediateRender:!1,time:r,overwrite:`auto`,duration:t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale())||je,onStart:function(){if(n.pause(),!l){var e=t.duration||Math.abs((r-(a&&`time`in a?a.time:n._time))/n.timeScale());u._dur!==e&&mn(u,e,0,1).render(u._time,!0,!0),l=1}o&&o.apply(u,s||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,Bt({startAt:{time:_n(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return e===void 0&&(e=this._time),Hn(this,_n(this,e))},n.previousLabel=function(e){return e===void 0&&(e=this._time),Hn(this,_n(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+je)},n.shiftChildren=function(e,t,n){n===void 0&&(n=0);var r=this._first,i=this.labels,a;for(e=Mt(e);r;)r._start>=n&&(r._start+=e,r._end+=e),r=r._next;if(t)for(a in i)i[a]>=n&&(i[a]+=e);return Xt(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){e===void 0&&(e=!0);for(var t=this._first,n;t;)n=t._next,this.remove(t),t=n;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Xt(this)},n.totalDuration=function(e){var t=0,n=this,r=n._last,i=Ae,a,o,s;if(arguments.length)return n.timeScale((n._repeat<0?n.duration():n.totalDuration())/(n.reversed()?-e:e));if(n._dirty){for(s=n.parent;r;)a=r._prev,r._dirty&&r.totalDuration(),o=r._start,o>i&&n._sort&&r._ts&&!n._lock?(n._lock=1,sn(n,r,o-r._delay,1)._lock=0):i=o,o<0&&r._ts&&(t-=o,(!s&&!n._dp||s&&s.smoothChildTiming)&&(n._start+=Mt(o/n._ts),n._time-=o,n._tTime-=o),n.shiftChildren(-o,!1,-1/0),i=0),r._end>t&&r._ts&&(t=r._end),r=a;mn(n,n===rt&&n._time>t?n._time:t,1,1),n._dirty=0}return n._tDur},t.updateRoot=function(e){if(rt._ts&&(Lt(rt,nn(e,rt)),xt=ir.frame),ir.frame>=wt){wt+=De.autoSleep||120;var t=rt._first;if((!t||!t._ts)&&De.autoSleep&&ir._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||ir.sleep()}}},t}(yr);Bt(br.prototype,{_lock:0,_hasPause:0,_forcing:0});var xr=function(e,t,n,r,i,a,o){var s=new Jr(this._pt,e,t,0,1,Hr,null,i),c=0,l=0,u,d,f,p,m,h,g,_;for(s.b=n,s.e=r,n+=``,r+=``,(g=~r.indexOf(`random(`))&&(r=zn(r)),a&&(_=[n,r],a(_,e,t),n=_[0],r=_[1]),d=n.match($e)||[];u=$e.exec(r);)p=u[0],m=r.substring(c,u.index),f?f=(f+1)%5:m.substr(-5)===`rgba(`&&(f=1),p!==d[l++]&&(h=parseFloat(d[l-1])||0,s._pt={_next:s._pt,p:m||l===1?m:`,`,s:h,c:p.charAt(1)===`=`?Nt(h,p)-h:parseFloat(p)-h,m:f&&f<4?Math.round:0},c=$e.lastIndex);return s.c=c`)}),_.duration();else{for(x in y={},f)x===`ease`||x===`easeEach`||Ar(x,f[x],y,f.easeEach);for(x in y)for(D=y[x].sort(function(e,t){return e.t-t.t}),E=0,v=0;vi-je&&!o?i:ea&&(c=a)),p=this._yoyo&&u&1,p&&(c=a-c),f=tn(this._tTime,d),c===r&&!n&&this._initted&&u===f)return this._tTime=s,this;u!==f&&this.vars.repeatRefresh&&!p&&!this._lock&&c!==d&&this._initted&&(this._lock=n=1,this.render(Mt(d*u),!0).invalidate()._lock=0)}if(!this._initted){if(ln(this,o?e:c,n,t,s))return this._tTime=0,this;if(r!==this._time&&!(n&&this.vars.repeatRefresh&&u!==f))return this;if(a!==this._dur)return this.render(e,t,n)}if(this._rEase){var g=c0||!s&&this._ts<0)&&Yt(this,1),!t&&!(o&&!r)&&(s||r||p)&&(Un(this,s===i?`onComplete`:`onReverseComplete`,!0),this._prom&&!(s0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r,i){rr||ir.wake(),this._ts||this.play();var a=Math.min(this._dur,(this._dp._time-this._start)*this._ts),o;return this._initted||Dr(this,a),o=this._ease(a/this._dur),Or(this,e,t,n,r,o,a,i)?this.resetTo(e,t,n,r,1):(an(this,0),this.parent||qt(this._dp,this,`_first`,`_last`,this._dp._sort?`_start`:0),this.render(0))},n.kill=function(e,t){if(t===void 0&&(t=`all`),!e&&(!t||t===`all`))return this._lazy=this._pt=0,this.parent?Wn(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ke),this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,Tr&&Tr.vars.overwrite!==!0)._first||Wn(this),this.parent&&n!==this.timeline.totalDuration()&&mn(this,this._dur*this.timeline._tDur/n,0,1),this}var r=this._targets,i=e?En(e):r,a=this._ptLookup,o=this._pt,s,c,l,u,d,f,p;if((!t||t===`all`)&&Kt(r,i))return t===`all`&&(this._pt=0),Wn(this);for(s=this._op=this._op||[],t!==`all`&&(Re(t)&&(d={},At(t,function(e){return d[e]=1}),t=d),t=kr(r,t)),p=r.length;p--;)if(~i.indexOf(r[p]))for(d in c=a[p],t===`all`?(s[p]=t,u=c,l={}):(l=s[p]=s[p]||{},u=t),u)f=c&&c[d],f&&((!(`kill`in f.d)||f.d.kill(d)===!0)&&Jt(this,f,`_pt`),delete c[d]),l!==`all`&&(l[d]=1);return this._initted&&!this._pt&&o&&Wn(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return vn(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return vn(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return rt.killTweensOf(e,t,n)},t}(yr);Bt(Pr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),At(`staggerTo,staggerFrom,staggerFromTo`,function(e){Pr[e]=function(){var t=new br,n=Cn.call(arguments,0);return n.splice(e===`staggerFromTo`?5:4,0,0),t[e].apply(t,n)}});var Fr=function(e,t,n){return e[t]=n},Ir=function(e,t,n){return e[t](n)},Lr=function(e,t,n,r){return e[t](r.fp,n)},Rr=function(e,t,n){return e.setAttribute(t,n)},zr=function(e,t){return ze(e[t])?Ir:Ve(e[t])&&e.setAttribute?Rr:Fr},Br=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},Vr=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Hr=function(e,t){var n=t._pt,r=``;if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},Ur=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},Wr=function(e,t,n,r){for(var i=this._pt,a;i;)a=i._next,i.p===r&&i.modifier(e,t,n),i=a},Gr=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Jt(this,t,`_pt`):t.dep||(n=1),t=r;return!n},Kr=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},qr=function(e){for(var t=e._pt,n,r,i,a;t;){for(n=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:a)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:a=t,t=n}e._pt=i},Jr=function(){function e(e,t,n,r,i,a,o,s,c){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||Br,this.d=o||this,this.set=s||Fr,this.pr=c||0,this._next=e,e&&(e._prev=this)}var t=e.prototype;return t.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=Kr,this.m=e,this.mt=n,this.tween=t},e}();At(Et+`parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse`,function(e){return vt[e]=1}),st.TweenMax=st.TweenLite=Pr,st.TimelineLite=st.TimelineMax=br,rt=new br({sortChildren:!1,defaults:G,autoRemoveChildren:!0,id:`root`,smoothChildTiming:!0}),De.stringFilter=nr;var Yr=[],Xr={},Zr=[],Qr=0,$r=0,ei=function(e){return(Xr[e]||Zr).map(function(e){return e()})},ti=function(){var e=Date.now(),t=[];e-Qr>2&&(ei(`matchMediaInit`),Yr.forEach(function(e){var n=e.queries,r=e.conditions,i,a,o,s;for(a in n)i=it.matchMedia(n[a]).matches,i&&(o=1),i!==r[a]&&(r[a]=i,s=1);s&&(e.revert(),o&&t.push(e))}),ei(`matchMediaRevert`),t.forEach(function(e){return e.onMatch(e,function(t){return e.add(null,t)})}),Qr=e,ei(`matchMedia`))},ni=function(){function e(e,t){this.selector=t&&Dn(t),this.data=[],this._r=[],this.isReverted=!1,this.id=$r++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){ze(e)&&(n=t,t=e,e=ze);var r=this,i=function(){var e=K,i=r.selector,a;return e&&e!==r&&e.data.push(r),n&&(r.selector=Dn(n)),K=r,a=t.apply(r,arguments),ze(a)&&r._r.push(a),K=e,r.selector=i,r.isReverted=!1,a};return r.last=i,e===ze?i(r,function(e){return r.add(null,e)}):e?r[e]=i:i},t.ignore=function(e){var t=K;K=null,e(this),K=t},t.getTweens=function(){var t=[];return this.data.forEach(function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Pr&&!(n.parent&&n.parent.data===`nested`)&&t.push(n)}),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e?(function(){for(var t=n.getTweens(),r=n.data.length,i;r--;)i=n.data[r],i.data===`isFlip`&&(i.revert(),i.getChildren(!0,!0,!1).forEach(function(e){return t.splice(t.indexOf(e),1)}));for(t.map(function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}}).sort(function(e,t){return t.g-e.g||-1/0}).forEach(function(t){return t.t.revert(e)}),r=n.data.length;r--;)i=n.data[r],i instanceof br?i.data!==`nested`&&(i.scrollTrigger&&i.scrollTrigger.revert(),i.kill()):!(i instanceof Pr)&&i.revert&&i.revert(e);n._r.forEach(function(t){return t(e,n)}),n.isReverted=!0})():this.data.forEach(function(e){return e.kill&&e.kill()}),this.clear(),t)for(var r=Yr.length;r--;)Yr[r].id===this.id&&Yr.splice(r,1)},t.revert=function(e){this.kill(e||{})},e}(),ri=function(){function e(e){this.contexts=[],this.scope=e,K&&K.data.push(this)}var t=e.prototype;return t.add=function(e,t,n){He(e)||(e={matches:e});var r=new ni(0,n||this.scope),i=r.conditions={},a,o,s;for(o in K&&!r.selector&&(r.selector=K.selector),this.contexts.push(r),t=r.add(`onMatch`,t),r.queries=e,e)o===`all`?s=1:(a=it.matchMedia(e[o]),a&&(Yr.indexOf(r)<0&&Yr.push(r),(i[o]=a.matches)&&(s=1),a.addListener?a.addListener(ti):a.addEventListener(`change`,ti)));return s&&t(r,function(e){return r.add(null,e)}),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach(function(t){return t.kill(e,!0)})},e}(),ii={registerPlugin:function(){[...arguments].forEach(function(e){return qn(e)})},timeline:function(e){return new br(e)},getTweensOf:function(e,t){return rt.getTweensOf(e,t)},getProperty:function(e,t,n,r){Re(e)&&(e=En(e)[0]);var i=Ot(e||{}).get,a=n?zt:Rt;return n===`native`&&(n=``),e&&(t?a((St[t]&&St[t].get||i)(e,t,n,r)):function(t,n,r){return a((St[t]&&St[t].get||i)(e,t,n,r))})},quickSetter:function(e,t,n){if(e=En(e),e.length>1){var r=e.map(function(e){return ci.quickSetter(e,t,n)}),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=St[t],o=Ot(e),s=o.harness&&(o.harness.aliases||{})[t]||t,c=a?function(t){var r=new a;Gn._pt=0,r.init(e,n?t+n:t,Gn,0,[e]),r.render(1,r),Gn._pt&&Ur(1,Gn)}:o.set(e,s);return a?c:function(t){return c(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=ci.to(e,Bt((r={},r[t]=`+=0.1`,r.paused=!0,r.stagger=0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return rt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=pr(e.ease,G.ease)),Ut(G,e||{})},config:function(e){return Ut(De,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||``).split(`,`).forEach(function(e){return e&&!St[e]&&!st[e]&&ft(t+` effect requires `+e+` plugin.`)}),Ct[t]=function(e,t,r){return n(En(e),Bt(t||{},i),r)},a&&(br.prototype[t]=function(e,n,r){return this.add(Ct[t](e,He(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){or[e]=pr(t)},parseEase:function(e,t){return arguments.length?pr(e,t):or},getById:function(e){return rt.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new br(e),r,i;for(n.smoothChildTiming=Ue(e.smoothChildTiming),rt.remove(n),n._dp=0,n._time=n._tTime=rt._time,r=rt._first;r;)i=r._next,(t||!(!r._dur&&r instanceof Pr&&r.vars.onComplete===r._targets[0]))&&sn(n,r,r._start-r._delay),r=i;return sn(rt,n,0),n},context:function(e,t){return e?new ni(e,t):K},matchMedia:function(e){return new ri(e)},matchMediaRefresh:function(){return Yr.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||ti()},addEventListener:function(e,t){var n=Xr[e]||(Xr[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=Xr[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:Ln,wrapYoyo:Rn,distribute:kn,random:Mn,snap:jn,normalize:Fn,getUnit:xn,clamp:Sn,splitColor:Zn,toArray:En,selector:Dn,mapRange:Bn,pipe:Nn,unitize:Pn,interpolate:Vn,shuffle:On},install:ut,effects:Ct,ticker:ir,updateRoot:br.updateRoot,plugins:St,globalTimeline:rt,core:{PropTween:Jr,globals:pt,Tween:Pr,Timeline:br,Animation:yr,getCache:Ot,_removeLinkedListItem:Jt,reverting:function(){return ke},context:function(e){return e&&K&&(K.data.push(e),e._ctx=K),K},suppressOverwrites:function(e){return Oe=e}}};At(`to,from,fromTo,delayedCall,set,killTweensOf`,function(e){return ii[e]=Pr[e]}),ir.add(br.updateRoot),Gn=ii.to({},{duration:0});var ai=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},oi=function(e,t){var n=e._targets,r,i,a;for(r in t)for(i=n.length;i--;)a=e._ptLookup[i][r],(a&&=a.d)&&(a._pt&&(a=ai(a,r)),a&&a.modifier&&a.modifier(t[r],e,n[i],r))},si=function(e,t){return{name:e,headless:1,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(Re(n)&&(r={},At(n,function(e){return r[e]=1}),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}oi(e,n)}}}},ci=ii.registerPlugin({name:`attr`,init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||``,o=this.add(e,`setAttribute`,(s||0)+``,t[a],r,i,0,0,a),o.op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)ke?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:`endArray`,headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},si(`roundProps`,An),si(`modifiers`),si(`snap`,jn))||ii;Pr.version=br.version=ci.version=`3.15.0`,lt=1,We()&&ar(),or.Power0,or.Power1,or.Power2,or.Power3,or.Power4,or.Linear,or.Quad,or.Cubic,or.Quart,or.Quint,or.Strong,or.Elastic,or.Back,or.SteppedEase,or.Bounce,or.Sine,or.Expo,or.Circ;var li,ui,di,fi,pi,mi,hi,gi=function(){return typeof window<`u`},_i={},vi=180/Math.PI,yi=Math.PI/180,bi=Math.atan2,xi=1e8,Si=/([A-Z])/g,Ci=/(left|right|width|margin|padding|x)/i,wi=/[\s,\(]\S/,Ti={autoAlpha:`opacity,visibility`,scale:`scaleX,scaleY`,alpha:`opacity`},Ei=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Di=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Oi=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},ki=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Ai=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},ji=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Mi=function(e,t){return t.set(t.t,t.p,e===1?t.e:t.b,t)},Ni=function(e,t,n){return e.style[t]=n},Pi=function(e,t,n){return e.style.setProperty(t,n)},Fi=function(e,t,n){return e._gsap[t]=n},Ii=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},Li=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},Ri=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},zi=`transform`,Bi=zi+`Origin`,Vi=function e(t,n){var r=this,i=this.target,a=i.style,o=i._gsap;if(t in _i&&a){if(this.tfm=this.tfm||{},t!==`transform`)t=Ti[t]||t,~t.indexOf(`,`)?t.split(`,`).forEach(function(e){return r.tfm[e]=oa(i,e)}):this.tfm[t]=o.x?o[t]:oa(i,t),t===Bi&&(this.tfm.zOrigin=o.zOrigin);else return Ti.transform.split(`,`).forEach(function(t){return e.call(r,t,n)});if(this.props.indexOf(zi)>=0)return;o.svg&&(this.svgo=i.getAttribute(`data-svg-origin`),this.props.push(Bi,n,``)),t=zi}(a||n)&&this.props.push(t,n,a[t])},Hi=function(e){e.translate&&(e.removeProperty(`translate`),e.removeProperty(`scale`),e.removeProperty(`rotate`))},Ui=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,i,a;for(i=0;i=0?Ji[i]:``)+e},Xi=function(){gi()&&window.document&&(li=window,ui=li.document,di=ui.documentElement,pi=Ki(`div`)||{style:{}},Ki(`div`),zi=Yi(zi),Bi=zi+`Origin`,pi.style.cssText=`border-width:0;line-height:0;position:absolute;padding:0`,Gi=!!Yi(`perspective`),hi=ci.core.reverting,fi=1)},Zi=function(e){var t=e.ownerSVGElement,n=Ki(`svg`,t&&t.getAttribute(`xmlns`)||`http://www.w3.org/2000/svg`),r=e.cloneNode(!0),i;r.style.display=`block`,n.appendChild(r),di.appendChild(n);try{i=r.getBBox()}catch{}return n.removeChild(r),di.removeChild(n),i},Qi=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},$i=function(e){var t,n;try{t=e.getBBox()}catch{t=Zi(e),n=1}return t&&(t.width||t.height)||n||(t=Zi(e)),t&&!t.width&&!t.x&&!t.y?{x:+Qi(e,[`x`,`cx`,`x1`])||0,y:+Qi(e,[`y`,`cy`,`y1`])||0,width:0,height:0}:t},ea=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&$i(e))},ta=function(e,t){if(t){var n=e.style,r;t in _i&&t!==Bi&&(t=zi),n.removeProperty?(r=t.substr(0,2),(r===`ms`||t.substr(0,6)===`webkit`)&&(t=`-`+t),n.removeProperty(r===`--`?t:t.replace(Si,`-$1`).toLowerCase())):n.removeAttribute(t)}},na=function(e,t,n,r,i,a){var o=new Jr(e._pt,t,n,0,1,a?Mi:ji);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},ra={deg:1,rad:1,turn:1},ia={grid:1,flex:1},aa=function e(t,n,r,i){var a=parseFloat(r)||0,o=(r+``).trim().substr((a+``).length)||`px`,s=pi.style,c=Ci.test(n),l=t.tagName.toLowerCase()===`svg`,u=(l?`client`:`offset`)+(c?`Width`:`Height`),d=100,f=i===`px`,p=i===`%`,m,h,g,_;if(i===o||!a||ra[i]||ra[o])return a;if(o!==`px`&&!f&&(a=e(t,n,r,`px`)),_=t.getCTM&&ea(t),(p||o===`%`)&&(_i[n]||~n.indexOf(`adius`)))return m=_?t.getBBox()[c?`width`:`height`]:t[u],jt(p?a/m*d:a/100*m);if(s[c?`width`:`height`]=d+(f?o:i),h=i!==`rem`&&~n.indexOf(`adius`)||i===`em`&&t.appendChild&&!l?t:t.parentNode,_&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===ui||!h.appendChild)&&(h=ui.body),g=h._gsap,g&&p&&g.width&&c&&g.time===ir.time&&!g.uncache)return jt(a/g.width*d);if(p&&(n===`height`||n===`width`)){var v=t.style[n];t.style[n]=d+i,m=t[u],v?t.style[n]=v:ta(t,n)}else (p||o===`%`)&&!ia[qi(h,`display`)]&&(s.position=qi(t,`position`)),h===t&&(s.position=`static`),h.appendChild(pi),m=pi[u],h.removeChild(pi),s.position=`absolute`;return c&&p&&(g=Ot(h),g.time=ir.time,g.width=h[u]),jt(f?m*a/d:m&&a?d/m*a:0)},oa=function(e,t,n,r){var i;return fi||Xi(),t in Ti&&t!==`transform`&&(t=Ti[t],~t.indexOf(`,`)&&(t=t.split(`,`)[0])),_i[t]&&t!==`transform`?(i=va(e,r),i=t===`transformOrigin`?i.svg?i.origin:ya(qi(e,Bi))+` `+i.zOrigin+`px`:i[t]):(i=e.style[t],(!i||i===`auto`||r||~(i+``).indexOf(`calc(`))&&(i=da[t]&&da[t](e,t,n)||qi(e,t)||kt(e,t)||+(t===`opacity`))),n&&!~(i+``).trim().indexOf(` `)?aa(e,t,i,n)+n:i},sa=function(e,t,n,r){if(!n||n===`none`){var i=Yi(t,e,1),a=i&&qi(e,i,1);a&&a!==n?(t=i,n=a):t===`borderColor`&&(n=qi(e,`borderTopColor`))}var o=new Jr(this._pt,e.style,t,0,1,Hr),s=0,c=0,l,u,d,f,p,m,h,g,_,v,y,b;if(o.b=n,o.e=r,n+=``,r+=``,r.substring(0,6)===`var(--`&&(r=qi(e,r.substring(4,r.indexOf(`)`)))),r===`auto`&&(m=e.style[t],e.style[t]=r,r=qi(e,t)||r,m?e.style[t]=m:ta(e,t)),l=[n,r],nr(l),n=l[0],r=l[1],d=n.match(Qe)||[],b=r.match(Qe)||[],b.length){for(;u=Qe.exec(r);)h=u[0],_=r.substring(s,u.index),p?p=(p+1)%5:(_.substr(-5)===`rgba(`||_.substr(-5)===`hsla(`)&&(p=1),h!==(m=d[c++]||``)&&(f=parseFloat(m)||0,y=m.substr((f+``).length),h.charAt(1)===`=`&&(h=Nt(f,h)+y),g=parseFloat(h),v=h.substr((g+``).length),s=Qe.lastIndex-v.length,v||(v=v||De.units[t]||y,s===r.length&&(r+=v,o.e+=v)),y!==v&&(f=aa(e,t,m,v)||0),o._pt={_next:o._pt,p:_||c===1?_:`,`,s:f,c:g-f,m:p&&p<4||t===`zIndex`?Math.round:0});o.c=s-1;)o=i[c],_i[o]&&(s=1,o=o===`transformOrigin`?Bi:zi),ta(n,o);s&&(ta(n,zi),a&&(a.svg&&n.removeAttribute(`transform`),r.scale=r.rotate=r.translate=`none`,va(n,1),a.uncache=1,Hi(r)))}},da={clearProps:function(e,t,n,r,i){if(i.data!==`isFromStart`){var a=e._pt=new Jr(e._pt,t,n,0,0,ua);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},fa=[1,0,0,1,0,0],pa={},ma=function(e){return e===`matrix(1, 0, 0, 1, 0, 0)`||e===`none`||!e},ha=function(e){var t=qi(e,zi);return ma(t)?fa:t.substr(7).match(Ze).map(jt)},ga=function(e,t){var n=e._gsap||Ot(e),r=e.style,i=ha(e),a,o,s,c;return n.svg&&e.getAttribute(`transform`)?(s=e.transform.baseVal.consolidate().matrix,i=[s.a,s.b,s.c,s.d,s.e,s.f],i.join(`,`)===`1,0,0,1,0,0`?fa:i):(i===fa&&!e.offsetParent&&e!==di&&!n.svg&&(s=r.display,r.display=`block`,a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,o=e.nextElementSibling,di.appendChild(e)),i=ha(e),s?r.display=s:ta(e,`display`),c&&(o?a.insertBefore(e,o):a?a.appendChild(e):di.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},_a=function(e,t,n,r,i,a){var o=e._gsap,s=i||ga(e,!0),c=o.xOrigin||0,l=o.yOrigin||0,u=o.xOffset||0,d=o.yOffset||0,f=s[0],p=s[1],m=s[2],h=s[3],g=s[4],_=s[5],v=t.split(` `),y=parseFloat(v[0])||0,b=parseFloat(v[1])||0,x,S,C,w;n?s!==fa&&(S=f*h-p*m)&&(C=h/S*y+b*(-m/S)+(m*_-h*g)/S,w=y*(-p/S)+f/S*b-(f*_-p*g)/S,y=C,b=w):(x=$i(e),y=x.x+(~v[0].indexOf(`%`)?y/100*x.width:y),b=x.y+(~(v[1]||v[0]).indexOf(`%`)?b/100*x.height:b)),r||r!==!1&&o.smooth?(g=y-c,_=b-l,o.xOffset=u+(g*f+_*m)-g,o.yOffset=d+(g*p+_*h)-_):o.xOffset=o.yOffset=0,o.xOrigin=y,o.yOrigin=b,o.smooth=!!r,o.origin=t,o.originIsAbsolute=!!n,e.style[Bi]=`0px 0px`,a&&(na(a,o,`xOrigin`,c,y),na(a,o,`yOrigin`,l,b),na(a,o,`xOffset`,u,o.xOffset),na(a,o,`yOffset`,d,o.yOffset)),e.setAttribute(`data-svg-origin`,y+` `+b)},va=function(e,t){var n=e._gsap||new vr(e);if(`x`in n&&!t&&!n.uncache)return n;var r=e.style,i=n.scaleX<0,a=`px`,o=`deg`,s=getComputedStyle(e),c=qi(e,Bi)||`0`,l=u=d=m=h=g=_=v=y=0,u,d,f=p=1,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,ee,L,te,R;return n.svg=!!(e.getCTM&&ea(e)),s.translate&&((s.translate!==`none`||s.scale!==`none`||s.rotate!==`none`)&&(r[zi]=(s.translate===`none`?``:`translate3d(`+(s.translate+` 0 0`).split(` `).slice(0,3).join(`, `)+`) `)+(s.rotate===`none`?``:`rotate(`+s.rotate+`) `)+(s.scale===`none`?``:`scale(`+s.scale.split(` `).join(`,`)+`) `)+(s[zi]===`none`?``:s[zi])),r.scale=r.rotate=r.translate=`none`),S=ga(e,n.svg),n.svg&&(n.uncache?(N=e.getBBox(),c=n.xOrigin-N.x+`px `+(n.yOrigin-N.y)+`px`,M=``):M=!t&&e.getAttribute(`data-svg-origin`),_a(e,M||c,!!M||n.originIsAbsolute,n.smooth!==!1,S)),b=n.xOrigin||0,x=n.yOrigin||0,S!==fa&&(E=S[0],D=S[1],O=S[2],k=S[3],l=A=S[4],u=j=S[5],S.length===6?(f=Math.sqrt(E*E+D*D),p=Math.sqrt(k*k+O*O),m=E||D?bi(D,E)*vi:0,_=O||k?bi(O,k)*vi+m:0,_&&(p*=Math.abs(Math.cos(_*yi))),n.svg&&(l-=b-(b*E+x*O),u-=x-(b*D+x*k))):(R=S[6],L=S[7],F=S[8],I=S[9],ee=S[10],te=S[11],l=S[12],u=S[13],d=S[14],C=bi(R,ee),h=C*vi,C&&(w=Math.cos(-C),T=Math.sin(-C),M=A*w+F*T,N=j*w+I*T,P=R*w+ee*T,F=A*-T+F*w,I=j*-T+I*w,ee=R*-T+ee*w,te=L*-T+te*w,A=M,j=N,R=P),C=bi(-O,ee),g=C*vi,C&&(w=Math.cos(-C),T=Math.sin(-C),M=E*w-F*T,N=D*w-I*T,P=O*w-ee*T,te=k*T+te*w,E=M,D=N,O=P),C=bi(D,E),m=C*vi,C&&(w=Math.cos(C),T=Math.sin(C),M=E*w+D*T,N=A*w+j*T,D=D*w-E*T,j=j*w-A*T,E=M,A=N),h&&Math.abs(h)+Math.abs(m)>359.9&&(h=m=0,g=180-g),f=jt(Math.sqrt(E*E+D*D+O*O)),p=jt(Math.sqrt(j*j+R*R)),C=bi(A,j),_=Math.abs(C)>2e-4?C*vi:0,y=te?1/(te<0?-te:te):0),n.svg&&(M=e.getAttribute(`transform`),n.forceCSS=e.setAttribute(`transform`,``)||!ma(qi(e,zi)),M&&e.setAttribute(`transform`,M))),Math.abs(_)>90&&Math.abs(_)<270&&(i?(f*=-1,_+=m<=0?180:-180,m+=m<=0?180:-180):(p*=-1,_+=_<=0?180:-180)),t||=n.uncache,n.x=l-((n.xPercent=l&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-l)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+a,n.y=u-((n.yPercent=u&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-u)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+a,n.z=d+a,n.scaleX=jt(f),n.scaleY=jt(p),n.rotation=jt(m)+o,n.rotationX=jt(h)+o,n.rotationY=jt(g)+o,n.skewX=_+o,n.skewY=v+o,n.transformPerspective=y+a,(n.zOrigin=parseFloat(c.split(` `)[2])||!t&&n.zOrigin||0)&&(r[Bi]=ya(c)),n.xOffset=n.yOffset=0,n.force3D=De.force3D,n.renderTransform=n.svg?Ea:Gi?Ta:xa,n.uncache=0,n},ya=function(e){return(e=e.split(` `))[0]+` `+e[1]},ba=function(e,t,n){var r=xn(t);return jt(parseFloat(t)+parseFloat(aa(e,`x`,n+`px`,r)))+r},xa=function(e,t){t.z=`0px`,t.rotationY=t.rotationX=`0deg`,t.force3D=0,Ta(e,t)},Sa=`0deg`,Ca=`0px`,wa=`) `,Ta=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,c=n.rotation,l=n.rotationY,u=n.rotationX,d=n.skewX,f=n.skewY,p=n.scaleX,m=n.scaleY,h=n.transformPerspective,g=n.force3D,_=n.target,v=n.zOrigin,y=``,b=g===`auto`&&e&&e!==1||g===!0;if(v&&(u!==Sa||l!==Sa)){var x=parseFloat(l)*yi,S=Math.sin(x),C=Math.cos(x),w;x=parseFloat(u)*yi,w=Math.cos(x),a=ba(_,a,S*w*-v),o=ba(_,o,-Math.sin(x)*-v),s=ba(_,s,C*w*-v+v)}h!==Ca&&(y+=`perspective(`+h+wa),(r||i)&&(y+=`translate(`+r+`%, `+i+`%) `),(b||a!==Ca||o!==Ca||s!==Ca)&&(y+=s!==Ca||b?`translate3d(`+a+`, `+o+`, `+s+`) `:`translate(`+a+`, `+o+wa),c!==Sa&&(y+=`rotate(`+c+wa),l!==Sa&&(y+=`rotateY(`+l+wa),u!==Sa&&(y+=`rotateX(`+u+wa),(d!==Sa||f!==Sa)&&(y+=`skew(`+d+`, `+f+wa),(p!==1||m!==1)&&(y+=`scale(`+p+`, `+m+wa),_.style[zi]=y||`translate(0, 0)`},Ea=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.rotation,c=n.skewX,l=n.skewY,u=n.scaleX,d=n.scaleY,f=n.target,p=n.xOrigin,m=n.yOrigin,h=n.xOffset,g=n.yOffset,_=n.forceCSS,v=parseFloat(a),y=parseFloat(o),b,x,S,C,w;s=parseFloat(s),c=parseFloat(c),l=parseFloat(l),l&&(l=parseFloat(l),c+=l,s+=l),s||c?(s*=yi,c*=yi,b=Math.cos(s)*u,x=Math.sin(s)*u,S=Math.sin(s-c)*-d,C=Math.cos(s-c)*d,c&&(l*=yi,w=Math.tan(c-l),w=Math.sqrt(1+w*w),S*=w,C*=w,l&&(w=Math.tan(l),w=Math.sqrt(1+w*w),b*=w,x*=w)),b=jt(b),x=jt(x),S=jt(S),C=jt(C)):(b=u,C=d,x=S=0),(v&&!~(a+``).indexOf(`px`)||y&&!~(o+``).indexOf(`px`))&&(v=aa(f,`x`,a,`px`),y=aa(f,`y`,o,`px`)),(p||m||h||g)&&(v=jt(v+p-(p*b+m*S)+h),y=jt(y+m-(p*x+m*C)+g)),(r||i)&&(w=f.getBBox(),v=jt(v+r/100*w.width),y=jt(y+i/100*w.height)),w=`matrix(`+b+`,`+x+`,`+S+`,`+C+`,`+v+`,`+y+`)`,f.setAttribute(`transform`,w),_&&(f.style[zi]=w)},Da=function(e,t,n,r,i){var a=360,o=Re(i),s=parseFloat(i)*(o&&~i.indexOf(`rad`)?vi:1)-r,c=r+s+`deg`,l,u;return o&&(l=i.split(`_`)[1],l===`short`&&(s%=a,s!==s%(a/2)&&(s+=s<0?a:-a)),l===`cw`&&s<0?s=(s+a*xi)%a-~~(s/a)*a:l===`ccw`&&s>0&&(s=(s-a*xi)%a-~~(s/a)*a)),e._pt=u=new Jr(e._pt,t,n,r,s,Di),u.e=c,u.u=`deg`,e._props.push(n),u},Oa=function(e,t){for(var n in t)e[n]=t[n];return e},ka=function(e,t,n){var r=Oa({},n._gsap),i=`perspective,force3D,transformOrigin,svgOrigin`,a=n.style,o,s,c,l,u,d,f,p;for(s in r.svg?(c=n.getAttribute(`transform`),n.setAttribute(`transform`,``),a[zi]=t,o=va(n,1),ta(n,zi),n.setAttribute(`transform`,c)):(c=getComputedStyle(n)[zi],a[zi]=t,o=va(n,1),a[zi]=c),_i)c=r[s],l=o[s],c!==l&&i.indexOf(s)<0&&(f=xn(c),p=xn(l),u=f===p?parseFloat(c):aa(n,s,c,p),d=parseFloat(l),e._pt=new Jr(e._pt,o,s,u,d-u,Ei),e._pt.u=p||0,e._props.push(s));Oa(o,r)};At(`padding,margin,Width,Radius`,function(e,t){var n=`Top`,r=`Right`,i=`Bottom`,a=`Left`,o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map(function(n){return t<2?e+n:`border`+n+e});da[t>1?`border`+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map(function(t){return oa(e,t,n)}),s=a.join(` `),s.split(a[0]).length===5?a[0]:s;a=(r+``).split(` `),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),e.init(t,s,i)}});var Aa={name:`css`,register:Xi,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a=this._props,o=e.style,s=n.vars.startAt,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;for(m in fi||Xi(),this.styles=this.styles||Wi(e),C=this.styles.props,this.tween=n,t)if(m!==`autoRound`&&(l=t[m],!(St[m]&&wr(m,t,n,r,e,i)))){if(f=typeof l,p=da[m],f===`function`&&(l=l.call(n,r,e,i),f=typeof l),f===`string`&&~l.indexOf(`random(`)&&(l=zn(l)),p)p(this,e,m,l,n)&&(S=1);else if(m.substr(0,2)===`--`)c=(getComputedStyle(e).getPropertyValue(m)+``).trim(),l+=``,er.lastIndex=0,er.test(c)||(h=xn(c),g=xn(l),g?h!==g&&(c=aa(e,m,c,g)+g):h&&(l+=h)),this.add(o,`setProperty`,c,l,r,i,0,0,m),a.push(m),C.push(m,0,o[m]);else if(f!==`undefined`){if(s&&m in s?(c=typeof s[m]==`function`?s[m].call(n,r,e,i):s[m],Re(c)&&~c.indexOf(`random(`)&&(c=zn(c)),xn(c+``)||c===`auto`||(c+=De.units[m]||xn(oa(e,m))||``),(c+``).charAt(1)===`=`&&(c=oa(e,m))):c=oa(e,m),d=parseFloat(c),_=f===`string`&&l.charAt(1)===`=`&&l.substr(0,2),_&&(l=l.substr(2)),u=parseFloat(l),m in Ti&&(m===`autoAlpha`&&(d===1&&oa(e,`visibility`)===`hidden`&&u&&(d=0),C.push(`visibility`,0,o.visibility),na(this,o,`visibility`,d?`inherit`:`hidden`,u?`inherit`:`hidden`,!u)),m!==`scale`&&m!==`transform`&&(m=Ti[m],~m.indexOf(`,`)&&(m=m.split(`,`)[0]))),v=m in _i,v){if(this.styles.save(m),w=l,f===`string`&&l.substring(0,6)===`var(--`){if(l=qi(e,l.substring(4,l.indexOf(`)`))),l.substring(0,5)===`calc(`){var T=e.style.perspective;e.style.perspective=l,l=qi(e,`perspective`),T?e.style.perspective=T:ta(e,`perspective`)}u=parseFloat(l)}if(y||(b=e._gsap,b.renderTransform&&!t.parseTransform||va(e,t.parseTransform),x=t.smoothOrigin!==!1&&b.smooth,y=this._pt=new Jr(this._pt,o,zi,0,1,b.renderTransform,b,0,-1),y.dep=1),m===`scale`)this._pt=new Jr(this._pt,b,`scaleY`,b.scaleY,(_?Nt(b.scaleY,_+u):u)-b.scaleY||0,Ei),this._pt.u=0,a.push(`scaleY`,m),m+=`X`;else if(m===`transformOrigin`){C.push(Bi,0,o[Bi]),l=la(l),b.svg?_a(e,l,0,x,0,this):(g=parseFloat(l.split(` `)[2])||0,g!==b.zOrigin&&na(this,b,`zOrigin`,b.zOrigin,g),na(this,o,m,ya(c),ya(l)));continue}else if(m===`svgOrigin`){_a(e,l,1,x,0,this);continue}else if(m in pa){Da(this,b,m,d,_?Nt(d,_+l):l);continue}else if(m===`smoothOrigin`){na(this,b,`smooth`,b.smooth,l);continue}else if(m===`force3D`){b[m]=l;continue}else if(m===`transform`){ka(this,l,e);continue}}else m in o||(m=Yi(m)||m);if(v||(u||u===0)&&(d||d===0)&&!wi.test(l)&&m in o)h=(c+``).substr((d+``).length),u||=0,g=xn(l)||(m in De.units?De.units[m]:h),h!==g&&(d=aa(e,m,c,g)),this._pt=new Jr(this._pt,v?b:o,m,d,(_?Nt(d,_+u):u)-d,!v&&(g===`px`||m===`zIndex`)&&t.autoRound!==!1?Ai:Ei),this._pt.u=g||0,v&&w!==l?(this._pt.b=c,this._pt.e=w,this._pt.r=ki):h!==g&&g!==`%`&&(this._pt.b=c,this._pt.r=Oi);else if(m in o)sa.call(this,e,m,c,_?_+l:l);else if(m in e)this.add(e,m,c||e[m],_?_+l:l,r,i);else if(m!==`parseTransform`){dt(m,l);continue}v||(m in o?C.push(m,0,o[m]):typeof e[m]==`function`?C.push(m,2,e[m]()):C.push(m,1,c||e[m])),a.push(m)}}S&&qr(this)},render:function(e,t){if(t.tween._time||!hi())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:oa,aliases:Ti,getSetter:function(e,t,n){var r=Ti[t];return r&&r.indexOf(`,`)<0&&(t=r),t in _i&&t!==Bi&&(e._gsap.x||oa(e,`x`))?n&&mi===n?t===`scale`?Ii:Fi:(mi=n||{})&&(t===`scale`?Li:Ri):e.style&&!Ve(e.style[t])?Ni:~t.indexOf(`-`)?Pi:zr(e,t)},core:{_removeProperty:ta,_getMatrix:ga}};ci.utils.checkPrefix=Yi,ci.core.getStyleSaver=Wi,(function(e,t,n,r){var i=At(e+`,`+t+`,`+n,function(e){_i[e]=1});At(t,function(e){De.units[e]=`deg`,pa[e]=1}),Ti[i[13]]=e+`,`+t,At(r,function(e){var t=e.split(`:`);Ti[t[1]]=i[t[0]]})})(`x,y,z,scale,scaleX,scaleY,xPercent,yPercent`,`rotation,rotationX,rotationY,skewX,skewY`,`transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective`,`0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY`),At(`x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective`,function(e){De.units[e]=`px`}),ci.registerPlugin(Aa);var ja=ci.registerPlugin(Aa)||ci;ja.core.Tween;var Ma=typeof document<`u`?W.useLayoutEffect:W.useEffect,Na=e=>e&&!Array.isArray(e)&&typeof e==`object`,Pa=[],Fa={},Ia=ja,La=(e,t=Pa)=>{let n=Fa;Na(e)?(n=e,e=null,t=`dependencies`in n?n.dependencies:Pa):Na(t)&&(n=t,t=`dependencies`in n?n.dependencies:Pa),e&&typeof e!=`function`&&console.warn(`First parameter must be a function or config object`);let{scope:r,revertOnUpdate:i}=n,a=(0,W.useRef)(!1),o=(0,W.useRef)(Ia.context(()=>{},r)),s=(0,W.useRef)(e=>o.current.add(null,e)),c=t&&t.length&&!i;return c&&Ma(()=>(a.current=!0,()=>o.current.revert()),Pa),Ma(()=>{if(e&&o.current.add(e,r),!c||!a.current)return()=>o.current.revert()},t),{context:o.current,contextSafe:s.current}};La.register=e=>{Ia=e},La.headless=!0;function Ra(e,t){for(var n=0;ns?(i=r,r=e,o=a,a=c):n?r+=e:r=i+(e-i)/(c-o)*(a-o)};return{update:l,reset:function(){i=r=n?0:r,o=a=0},getVelocity:function(e){var t=o,s=i,u=io();return(e||e===0)&&e!==r&&l(e),a===o||u-o>c?0:(r+(n?s:-s))/((n?u:a)-t)*1e3}}},So=function(e,t){return t&&!e._gsapAllow&&e.cancelable!==!1&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},Co=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},wo=function(){Ja=Ba.core.globals().ScrollTrigger,Ja&&Ja.core&&oo()},To=function(e){return Ba=e||$a(),!Va&&Ba&&typeof document<`u`&&document.body&&(Ha=window,Ua=document,Wa=Ua.documentElement,Ga=Ua.body,Ya=[Ha,Ua,Wa,Ga],Ba.utils.clamp,Qa=Ba.core.context||function(){},qa=`onpointerenter`in Ga?`pointer`:`mouse`,Ka=Eo.isTouch=Ha.matchMedia&&Ha.matchMedia(`(hover: none), (pointer: coarse)`).matches?1:`ontouchstart`in Ha||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Za=Eo.eventTypes=(`ontouchstart`in Wa?`touchstart,touchmove,touchcancel,touchend`:`onpointerdown`in Wa?`pointerdown,pointermove,pointercancel,pointerup`:`mousedown,mousemove,mouseup,mouseup`).split(`,`),setTimeout(function(){return eo=0},500),Va=1),Ja||wo(),Va};go.op=_o,no.cache=0;var Eo=function(){function e(e){this.init(e)}var t=e.prototype;return t.init=function(e){Va||To(Ba)||console.warn(`Please gsap.registerPlugin(Observer)`),Ja||wo();var t=e.tolerance,n=e.dragMinimum,r=e.type,i=e.target,a=e.lineHeight,o=e.debounce,s=e.preventDefault,c=e.onStop,l=e.onStopDelay,u=e.ignore,d=e.wheelSpeed,f=e.event,p=e.onDragStart,m=e.onDragEnd,h=e.onDrag,g=e.onPress,_=e.onRelease,v=e.onRight,y=e.onLeft,b=e.onUp,x=e.onDown,S=e.onChangeX,C=e.onChangeY,w=e.onChange,T=e.onToggleX,E=e.onToggleY,D=e.onHover,O=e.onHoverEnd,k=e.onMove,A=e.ignoreCheck,j=e.isNormalizer,M=e.onGestureStart,N=e.onGestureEnd,P=e.onWheel,F=e.onEnable,I=e.onDisable,ee=e.onClick,L=e.scrollSpeed,te=e.capture,R=e.allowClicks,z=e.lockAxis,ne=e.onLockAxis;this.target=i=vo(i)||Wa,this.vars=e,u&&=Ba.utils.toArray(u),t||=1e-9,n||=0,d||=1,L||=1,r||=`wheel,touch,pointer`,o=o!==!1,a||=parseFloat(Ha.getComputedStyle(Ga).lineHeight)||22;var re,ie,B,ae,V,oe,se,H=this,ce=0,le=0,ue=e.passive||!s&&e.passive!==!1,de=bo(i,go),fe=bo(i,_o),pe=de(),me=fe(),he=~r.indexOf(`touch`)&&!~r.indexOf(`pointer`)&&Za[0]===`pointerdown`,ge=co(i),U=i.ownerDocument||Ua,_e=[0,0,0],ve=[0,0,0],ye=0,be=function(){return ye=io()},xe=function(e,t){return(H.event=e)&&u&&yo(e.target,u)||t&&he&&e.pointerType!==`touch`||A&&A(e,t)},Se=function(){H._vx.reset(),H._vy.reset(),ie.pause(),c&&c(H)},Ce=function(){var e=H.deltaX=Co(_e),n=H.deltaY=Co(ve),r=Math.abs(e)>=t,i=Math.abs(n)>=t;w&&(r||i)&&w(H,e,n,_e,ve),r&&(v&&H.deltaX>0&&v(H),y&&H.deltaX<0&&y(H),S&&S(H),T&&H.deltaX<0!=ce<0&&T(H),ce=H.deltaX,_e[0]=_e[1]=_e[2]=0),i&&(x&&H.deltaY>0&&x(H),b&&H.deltaY<0&&b(H),C&&C(H),E&&H.deltaY<0!=le<0&&E(H),le=H.deltaY,ve[0]=ve[1]=ve[2]=0),(ae||B)&&(k&&k(H),B&&=(p&&B===1&&p(H),h&&h(H),0),ae=!1),oe&&!(oe=!1)&&ne&&ne(H),V&&=(P(H),!1),re=0},W=function(e,t,n){_e[n]+=e,ve[n]+=t,H._vx.update(e),H._vy.update(t),o?re||=requestAnimationFrame(Ce):Ce()},we=function(e,t){z&&!se&&(H.axis=se=Math.abs(e)>Math.abs(t)?`x`:`y`,oe=!0),se!==`y`&&(_e[2]+=e,H._vx.update(e,!0)),se!==`x`&&(ve[2]+=t,H._vy.update(t,!0)),o?re||=requestAnimationFrame(Ce):Ce()},Te=function(e){if(!xe(e,1)){e=So(e,s);var t=e.clientX,r=e.clientY,i=t-H.x,a=r-H.y,o=H.isDragging;H.x=t,H.y=r,(o||(i||a)&&(Math.abs(H.startX-t)>=n||Math.abs(H.startY-r)>=n))&&(B||=o?2:1,o||(H.isDragging=!0),we(i,a))}},Ee=H.onPress=function(e){xe(e,1)||e&&e.button||(H.axis=se=null,ie.pause(),H.isPressed=!0,e=So(e),ce=le=0,H.startX=H.x=e.clientX,H.startY=H.y=e.clientY,H._vx.reset(),H._vy.reset(),lo(j?i:U,Za[1],Te,ue,!0),H.deltaX=H.deltaY=0,g&&g(H))},De=H.onRelease=function(e){if(!xe(e,1)){uo(j?i:U,Za[1],Te,!0);var t=!isNaN(H.y-H.startY),n=H.isDragging,r=n&&(Math.abs(H.x-H.startX)>3||Math.abs(H.y-H.startY)>3),a=So(e);!r&&t&&(H._vx.reset(),H._vy.reset(),s&&R&&Ba.delayedCall(.08,function(){if(io()-ye>300&&!e.defaultPrevented){if(e.target.click)e.target.click();else if(U.createEvent){var t=U.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,Ha,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}})),H.isDragging=H.isGesturing=H.isPressed=!1,c&&n&&!j&&ie.restart(!0),B&&Ce(),m&&n&&m(H),_&&_(H,r)}},G=function(e){return e.touches&&e.touches.length>1&&(H.isGesturing=!0)&&M(e,H.isDragging)},Oe=function(){return(H.isGesturing=!1)||N(H)},ke=function(e){if(!xe(e)){var t=de(),n=fe();W((t-pe)*L,(n-me)*L,1),pe=t,me=n,c&&ie.restart(!0)}},K=function(e){if(!xe(e)){e=So(e,s),P&&(V=!0);var t=(e.deltaMode===1?a:e.deltaMode===2?Ha.innerHeight:1)*d;W(e.deltaX*t,e.deltaY*t,0),c&&!j&&ie.restart(!0)}},Ae=function(e){if(!xe(e)){var t=e.clientX,n=e.clientY,r=t-H.x,i=n-H.y;H.x=t,H.y=n,ae=!0,c&&ie.restart(!0),(r||i)&&we(r,i)}},je=function(e){H.event=e,D(H)},Me=function(e){H.event=e,O(H)},Ne=function(e){return xe(e)||So(e,s)&&ee(H)};ie=H._dc=Ba.delayedCall(l||.25,Se).pause(),H.deltaX=H.deltaY=0,H._vx=xo(0,50,!0),H._vy=xo(0,50,!0),H.scrollX=de,H.scrollY=fe,H.isDragging=H.isGesturing=H.isPressed=!1,Qa(this),H.enable=function(e){return H.isEnabled||(lo(ge?U:i,`scroll`,mo),r.indexOf(`scroll`)>=0&&lo(ge?U:i,`scroll`,ke,ue,te),r.indexOf(`wheel`)>=0&&lo(i,`wheel`,K,ue,te),(r.indexOf(`touch`)>=0&&Ka||r.indexOf(`pointer`)>=0)&&(lo(i,Za[0],Ee,ue,te),lo(U,Za[2],De),lo(U,Za[3],De),R&&lo(i,`click`,be,!0,!0),ee&&lo(i,`click`,Ne),M&&lo(U,`gesturestart`,G),N&&lo(U,`gestureend`,Oe),D&&lo(i,qa+`enter`,je),O&&lo(i,qa+`leave`,Me),k&&lo(i,qa+`move`,Ae)),H.isEnabled=!0,H.isDragging=H.isGesturing=H.isPressed=ae=B=!1,H._vx.reset(),H._vy.reset(),pe=de(),me=fe(),e&&e.type&&Ee(e),F&&F(H)),H},H.disable=function(){H.isEnabled&&(to.filter(function(e){return e!==H&&co(e.target)}).length||uo(ge?U:i,`scroll`,mo),H.isPressed&&(H._vx.reset(),H._vy.reset(),uo(j?i:U,Za[1],Te,!0)),uo(ge?U:i,`scroll`,ke,te),uo(i,`wheel`,K,te),uo(i,Za[0],Ee,te),uo(U,Za[2],De),uo(U,Za[3],De),uo(i,`click`,be,!0),uo(i,`click`,Ne),uo(U,`gesturestart`,G),uo(U,`gestureend`,Oe),uo(i,qa+`enter`,je),uo(i,qa+`leave`,Me),uo(i,qa+`move`,Ae),H.isEnabled=H.isPressed=H.isDragging=!1,I&&I(H))},H.kill=H.revert=function(){H.disable();var e=to.indexOf(H);e>=0&&to.splice(e,1),Xa===H&&(Xa=0)},to.push(H),j&&co(i)&&(Xa=H),H.enable(f)},za(e,[{key:`velocityX`,get:function(){return this._vx.getVelocity()}},{key:`velocityY`,get:function(){return this._vy.getVelocity()}}]),e}();Eo.version=`3.15.0`,Eo.create=function(e){return new Eo(e)},Eo.register=To,Eo.getAll=function(){return to.slice()},Eo.getById=function(e){return to.filter(function(t){return t.vars.id===e})[0]},$a()&&Ba.registerPlugin(Eo);var q,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os=1,ss=Date.now,cs=ss(),ls=0,us=0,ds=function(e,t,n){var r=Ds(e)&&(e.substr(0,6)===`clamp(`||e.indexOf(`max`)>-1);return n[`_`+t+`Clamp`]=r,r?e.substr(6,e.length-7):e},fs=function(e,t){return t&&(!Ds(e)||e.substr(0,6)!==`clamp(`)?`clamp(`+e+`)`:e},ps=function e(){return us&&requestAnimationFrame(e)},ms=function(){return zo=1},hs=function(){return zo=0},gs=function(e){return e},_s=function(e){return Math.round(e*1e5)/1e5||0},vs=function(){return typeof window<`u`},ys=function(){return q||vs()&&(q=window.gsap)&&q.registerPlugin&&q},bs=function(e){return!!~Mo.indexOf(e)},xs=function(e){return(e===`Height`?ns:Oo[`inner`+e])||Ao[`client`+e]||jo[`client`+e]},Ss=function(e){return so(e,`getBoundingClientRect`)||(bs(e)?function(){return Yc.width=Oo.innerWidth,Yc.height=ns,Yc}:function(){return Qs(e)})},Cs=function(e,t,n){var r=n.d,i=n.d2,a=n.a;return(a=so(e,`getBoundingClientRect`))?function(){return a()[r]}:function(){return(t?xs(i):e[`client`+i])||0}},ws=function(e,t){return!t||~ro.indexOf(e)?Ss(e):function(){return Yc}},Ts=function(e,t){var n=t.s,r=t.d2,i=t.d,a=t.a;return Math.max(0,(n=`scroll`+r)&&(a=so(e,n))?a()-Ss(e)()[i]:bs(e)?(Ao[n]||jo[n])-xs(r):e[n]-e[`offset`+r])},Es=function(e,t){for(var n=0;n0){for(e-=i,a=0;a=e)return n[a];return n[a-1]}else for(a=n.length,e+=i;a--;)if(n[a]<=e)return n[a];return n[0]}:function(n,r,i){i===void 0&&(i=.001);var a=t(n);return!r||Math.abs(a-n)n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in uc?uc[e]*t:~e.indexOf(`%`)?parseFloat(e)*t/100:parseFloat(e)||0)}return e},fc=function(e,t,n,r,i,a,o,s){var c=i.startColor,l=i.endColor,u=i.fontSize,d=i.indent,f=i.fontWeight,p=ko.createElement(`div`),m=bs(n)||so(n,`pinType`)===`fixed`,h=e.indexOf(`scroller`)!==-1,g=m?jo:n.tagName===`IFRAME`?n.contentDocument.body:n,_=e.indexOf(`start`)!==-1,v=_?c:l,y=`border-color:`+v+`;font-size:`+u+`;color:`+v+`;font-weight:`+f+`;pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;`;return y+=`position:`+((h||s)&&m?`fixed;`:`absolute;`),(h||s||!m)&&(y+=(r===_o?Is:Ls)+`:`+(a+parseFloat(d))+`px;`),o&&(y+=`box-sizing:border-box;text-align:left;width:`+o.offsetWidth+`px;`),p._isStart=_,p.setAttribute(`class`,`gsap-marker-`+e+(t?` marker-`+t:``)),p.style.cssText=y,p.innerText=t||t===0?e+`-`+t:e,g.children[0]?g.insertBefore(p,g.children[0]):g.appendChild(p),p._offset=p[`offset`+r.op.d2],pc(p,0,r,_),p},pc=function(e,t,n,r){var i={display:`block`},a=n[r?`os2`:`p2`],o=n[r?`p2`:`os2`];e._isFlipped=r,i[n.a+`Percent`]=r?-100:0,i[n.a]=r?`1px`:0,i[`border`+a+Ks]=1,i[`border`+o+Ks]=0,i[n.p]=t+`px`,q.set(e,i)},mc=[],hc={},gc,_c=function(){return ss()-ls>34&&(gc||=requestAnimationFrame(Bc))},vc=function(){(!Jo||!Jo.isPressed||Jo.startX>jo.clientWidth)&&(no.cache++,Jo?gc||=requestAnimationFrame(Bc):Bc(),ls||wc(`scrollStart`),ls=ss())},yc=function(){Zo=Oo.innerWidth,Xo=Oo.innerHeight},bc=function(e){no.cache++,(e===!0||!Ro&&!qo&&!ko.fullscreenElement&&!ko.webkitFullscreenElement&&(!Yo||Zo!==Oo.innerWidth||Math.abs(Oo.innerHeight-Xo)>Oo.innerHeight*.25))&&No.restart(!0)},xc={},Sc=[],Cc=function e(){return oc(nl,`scrollEnd`,e)||Ic(!0)},wc=function(e){return xc[e]&&xc[e].map(function(e){return e()})||Sc},Tc=[],Ec=function(e){for(var t=0;tt,r=e._startClamp&&e.start>=t;(n||r)&&e.setPositions(r?t-1:e.start,n?Math.max(r?t:e.start+1,t):e.end,!0)}),Fc(!1),is=0,n.forEach(function(e){return e&&e.render&&e.render(-1)}),no.forEach(function(e){Os(e)&&(e.smooth&&requestAnimationFrame(function(){return e.target.style.scrollBehavior=`smooth`}),e.rec&&e(e.rec))}),kc(es,1),No.pause(),jc++,Ac=2,Bc(2),mc.forEach(function(e){return Os(e.vars.onRefresh)&&e.vars.onRefresh(e)}),Ac=nl.isRefreshing=!1,wc(`refresh`)},Lc=0,Rc=1,zc,Bc=function(e){if(e===2||!Ac&&!rs){nl.isUpdating=!0,zc&&zc.update(0);var t=mc.length,n=ss(),r=n-cs>=50,i=t&&mc[0].scroll();if(Rc=Lc>i?-1:1,Ac||(Lc=i),r&&(ls&&!zo&&n-ls>200&&(ls=0,wc(`scrollEnd`)),Io=cs,cs=n),Rc<0){for(Vo=t;Vo-- >0;)mc[Vo]&&mc[Vo].update(0,r);Rc=1}else for(Vo=0;Vo20),n-=n-x}if(p&&(s[p]=e||-.001,e<0&&(e=0)),a){var C=e+n,w=a._isStart;h=`scroll`+r.d2,pc(a,C,r,w&&C>20||!w&&(u?Math.max(jo[h],Ao[h]):a.parentNode[h])<=C+1),u&&(c=Qs(o),u&&(a.style[r.op.p]=c[r.op.p]-r.op.m-a._offset+Js))}return f&&_&&(h=Qs(_),f.seek(d),g=Qs(_),f._caScrollDist=h[r.p]-g[r.p],e=e/f._caScrollDist*d),f&&f.seek(m),f?e:Math.round(e)},Zc=/(webkit|moz|length|cssText|inset)/i,Qc=function(e,t,n,r){if(e.parentNode!==t){var i=e.style,a,o;if(t===jo){for(a in e._stOrig=i.cssText,o=Ys(e),o)!+a&&!Zc.test(a)&&o[a]&&typeof i[a]==`string`&&a!==`0`&&(i[a]=o[a]);i.top=n,i.left=r}else i.cssText=e._stOrig;q.core.getCache(e).uncache=1,t.appendChild(e)}},$c=function(e,t,n){var r=t,i=r;return function(t){var a=Math.round(e());return a!==r&&a!==i&&Math.abs(a-r)>3&&Math.abs(a-i)>3&&(t=a,n&&n()),i=r,r=Math.round(t),r}},el=function(e,t,n){var r={};r[t.p]=`+=`+n,q.set(e,r)},tl=function(e,t){var n=bo(e,t),r=`_scroll`+t.p2,i=function t(i,a,o,s,c){var l=t.tween,u=a.onComplete,d={};o||=n();var f=$c(n,o,function(){l.kill(),t.tween=0});return c=s&&c||0,s||=i-o,l&&l.kill(),a[r]=i,a.inherit=!1,a.modifiers=d,d[r]=function(){return f(o+s*l.ratio+c*l.ratio*l.ratio)},a.onUpdate=function(){no.cache++,t.tween&&Bc()},a.onComplete=function(){t.tween=0,u&&u.call(l)},l=t.tween=q.to(e,a),l};return e[r]=n,n.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},ac(e,`wheel`,n.wheelHandler),nl.isTouch&&ac(e,`touchmove`,n.wheelHandler),i},nl=function(){function e(t,n){Do||e.register(q)||console.warn(`Please gsap.registerPlugin(ScrollTrigger)`),$o(this),this.init(t,n)}var t=e.prototype;return t.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!us){this.update=this.refresh=this.kill=gs;return}t=Zs(Ds(t)||ks(t)||t.nodeType?{trigger:t}:t,lc);var r=t,i=r.onUpdate,a=r.toggleClass,o=r.id,s=r.onToggle,c=r.onRefresh,l=r.scrub,u=r.trigger,d=r.pin,f=r.pinSpacing,p=r.invalidateOnRefresh,m=r.anticipatePin,h=r.onScrubComplete,g=r.onSnapComplete,_=r.once,v=r.snap,y=r.pinReparent,b=r.pinSpacer,x=r.containerAnimation,S=r.fastScrollEnd,C=r.preventOverlaps,w=t.horizontal||t.containerAnimation&&t.horizontal!==!1?go:_o,T=!l&&l!==0,E=vo(t.scroller||Oo),D=q.core.getCache(E),O=bs(E),k=(`pinType`in t?t.pinType:so(E,`pinType`)||O&&`fixed`)===`fixed`,A=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],j=T&&t.toggleActions.split(` `),M=`markers`in t?t.markers:lc.markers,N=O?0:parseFloat(Ys(E)[`border`+w.p2+Ks])||0,P=this,F=t.onRefreshInit&&function(){return t.onRefreshInit(P)},I=Cs(E,O,w),ee=ws(E,O),L=0,te=0,R=0,z=bo(E,w),ne,re,ie,B,ae,V,oe,se,H,ce,le,ue,de,fe,pe,me,he,ge,U,_e,ve,ye,be,xe,Se,Ce,W,we,Te,Ee,De,G,Oe,ke,K,Ae,je,Me,Ne;if(P._startClamp=P._endClamp=!1,P._dir=w,m*=45,P.scroller=E,P.scroll=x?x.time.bind(x):z,B=z(),P.vars=t,n||=t.animation,`refreshPriority`in t&&(Go=1,t.refreshPriority===-9999&&(zc=P)),D.tweenScroll=D.tweenScroll||{top:tl(E,_o),left:tl(E,go)},P.tweenTo=ne=D.tweenScroll[w.p],P.scrubDuration=function(e){Oe=ks(e)&&e,Oe?G?G.duration(e):G=q.to(n,{ease:`expo`,totalProgress:`+=0`,inherit:!1,duration:Oe,paused:!0,onComplete:function(){return h&&h(P)}}):(G&&G.progress(1).kill(),G=0)},n&&(n.vars.lazy=!1,n._initted&&!P.isReverted||n.vars.immediateRender!==!1&&t.immediateRender!==!1&&n.duration()&&n.render(0,!0,!0),P.animation=n.pause(),n.scrollTrigger=P,P.scrubDuration(l),Ee=0,o||=n.vars.id),v&&((!As(v)||v.push)&&(v={snapTo:v}),`scrollBehavior`in jo.style&&q.set(O?[jo,Ao]:E,{scrollBehavior:`auto`}),no.forEach(function(e){return Os(e)&&e.target===(O?ko.scrollingElement||Ao:E)&&(e.smooth=!1)}),ie=Os(v.snapTo)?v.snapTo:v.snapTo===`labels`?tc(n):v.snapTo===`labelsDirectional`?rc(n):v.directional===!1?q.utils.snap(v.snapTo):function(e,t){return nc(v.snapTo)(e,ss()-te<500?0:t.direction)},ke=v.duration||{min:.1,max:2},ke=As(ke)?Fo(ke.min,ke.max):Fo(ke,ke),K=q.delayedCall(v.delay||Oe/2||.1,function(){var e=z(),t=ss()-te<500,r=ne.tween;if((t||Math.abs(P.getVelocity())<10)&&!r&&!zo&&L!==e){var i=(e-V)/fe,a=n&&!T?n.totalProgress():i,o=t?0:(a-De)/(ss()-Io)*1e3||0,s=q.utils.clamp(-i,1-i,Ns(o/2)*o/.185),c=i+(v.inertia===!1?0:s),l,u,d=v,f=d.onStart,p=d.onInterrupt,m=d.onComplete;if(l=ie(c,P),ks(l)||(l=c),u=Math.max(0,Math.round(V+l*fe)),e<=oe&&e>=V&&u!==e){if(r&&!r._initted&&r.data<=Ns(u-e))return;v.inertia===!1&&(s=l-i),ne(u,{duration:ke(Ns(Math.max(Ns(c-a),Ns(l-a))*.185/o/.05||0)),ease:v.ease||`power3`,data:Ns(u-e),onInterrupt:function(){return K.restart(!0)&&p&&Ms(P,p)},onComplete:function(){P.update(),L=z(),n&&!T&&(G?G.resetTo(`totalProgress`,l,n._tTime/n._tDur):n.progress(l)),Ee=De=n&&!T?n.totalProgress():P.progress,g&&g(P),m&&Ms(P,m)}},e,s*fe,u-e-s*fe),f&&Ms(P,f,ne.tween)}}else P.isActive&&L!==e&&K.restart(!0)}).pause()),o&&(hc[o]=P),u=P.trigger=vo(u||d!==!0&&d),Ne=u&&u._gsap&&u._gsap.stRevert,Ne&&=Ne(P),d=d===!0?u:vo(d),Ds(a)&&(a={targets:u,className:a}),d&&(f===!1||f===Gs||(f=!f&&d.parentNode&&d.parentNode.style&&Ys(d.parentNode).display===`flex`?!1:Ws),P.pin=d,re=q.core.getCache(d),re.spacer?pe=re.pinState:(b&&(b=vo(b),b&&!b.nodeType&&(b=b.current||b.nativeElement),re.spacerIsNative=!!b,b&&(re.spacerState=qc(b))),re.spacer=ge=b||ko.createElement(`div`),ge.classList.add(`pin-spacer`),o&&ge.classList.add(`pin-spacer-`+o),re.pinState=pe=qc(d)),t.force3D!==!1&&q.set(d,{force3D:!0}),P.spacer=ge=re.spacer,Te=Ys(d),xe=Te[f+w.os2],_e=q.getProperty(d),ve=q.quickSetter(d,w.a,Js),Wc(d,ge,Te),he=qc(d)),M){ue=As(M)?Zs(M,cc):cc,ce=fc(`scroller-start`,o,E,w,ue,0),le=fc(`scroller-end`,o,E,w,ue,0,ce),U=ce[`offset`+w.op.d2];var Pe=vo(so(E,`content`)||E);se=this.markerStart=fc(`start`,o,Pe,w,ue,U,0,x),H=this.markerEnd=fc(`end`,o,Pe,w,ue,U,0,x),x&&(Me=q.quickSetter([se,H],w.a,Js)),!k&&!(ro.length&&so(E,`fixedMarkers`)===!0)&&(Xs(O?jo:E),q.set([ce,le],{force3D:!0}),Ce=q.quickSetter(ce,w.a,Js),we=q.quickSetter(le,w.a,Js))}if(x){var Fe=x.vars.onUpdate,Ie=x.vars.onUpdateParams;x.eventCallback(`onUpdate`,function(){P.update(0,0,1),Fe&&Fe.apply(x,Ie||[])})}if(P.previous=function(){return mc[mc.indexOf(P)-1]},P.next=function(){return mc[mc.indexOf(P)+1]},P.revert=function(e,t){if(!t)return P.kill(!0);var r=e!==!1||!P.enabled,i=Ro;r!==P.isReverted&&(r&&(Ae=Math.max(z(),P.scroll.rec||0),R=P.progress,je=n&&n.progress()),se&&[se,H,ce,le].forEach(function(e){return e.style.display=r?`none`:`block`}),r&&(Ro=P,P.update(r)),d&&(!y||!P.isActive)&&(r?Uc(d,ge,pe):Wc(d,ge,Ys(d),Se)),r||P.update(r),Ro=i,P.isReverted=r)},P.refresh=function(r,i,a,o){if(!((Ro||!P.enabled)&&!i)){if(d&&r&&ls){ac(e,`scrollEnd`,Cc);return}!Ac&&F&&F(P),Ro=P,ne.tween&&!a&&(ne.tween.kill(),ne.tween=0),G&&G.pause(),p&&n&&(n.revert({kill:!1}).invalidate(),n.getChildren?n.getChildren(!0,!0,!1).forEach(function(e){return e.vars.immediateRender&&e.render(0,!0,!0)}):n.vars.immediateRender&&n.render(0,!0,!0)),P.isReverted||P.revert(!0,!0),P._subPinOffset=!1;var s=I(),l=ee(),m=x?x.duration():Ts(E,w),h=fe<=.01||!fe,g=0,_=o||0,v=As(a)?a.end:t.end,b=t.endTrigger||u,S=As(a)?a.start:t.start||(t.start===0||!u?0:d?`0 0`:`0 100%`),C=P.pinnedContainer=t.pinnedContainer&&vo(t.pinnedContainer,P),D=u&&Math.max(0,mc.indexOf(P))||0,A=D,j,re,ie,ue,U,ve,xe,Ce,we,Te,Ee,De,Oe;for(M&&As(a)&&(De=q.getProperty(ce,w.p),Oe=q.getProperty(le,w.p));A-- >0;)ve=mc[A],ve.end||ve.refresh(0,1)||(Ro=P),xe=ve.pin,xe&&(xe===u||xe===d||xe===C)&&!ve.isReverted&&(Te||=[],Te.unshift(ve),ve.revert(!0,!0)),ve!==mc[A]&&(D--,A--);for(Os(S)&&(S=S(P)),S=ds(S,`start`,P),V=Xc(S,u,s,w,z(),se,ce,P,l,N,k,m,x,P._startClamp&&`_startClamp`)||(d?-.001:0),Os(v)&&(v=v(P)),Ds(v)&&!v.indexOf(`+=`)&&(~v.indexOf(` `)?v=(Ds(S)?S.split(` `)[0]:``)+v:(g=dc(v.substr(2),s),v=Ds(S)?S:(x?q.utils.mapRange(0,x.duration(),x.scrollTrigger.start,x.scrollTrigger.end,V):V)+g,b=u)),v=ds(v,`end`,P),oe=Math.max(V,Xc(v||(b?`100% 0`:m),b,s,w,z()+g,H,le,P,l,N,k,m,x,P._endClamp&&`_endClamp`))||-.001,g=0,A=D;A--;)ve=mc[A]||{},xe=ve.pin,xe&&ve.start-ve._pinPush<=V&&!x&&ve.end>0&&(j=ve.end-(P._startClamp?Math.max(0,ve.start):ve.start),(xe===u&&ve.start-ve._pinPush=Ts(E,w)))j=Ys(d),ue=w===_o,ie=z(),ye=parseFloat(_e(w.a))+_,!m&&oe>1&&(Ee=(O?ko.scrollingElement||Ao:E).style,Ee={style:Ee,value:Ee[`overflow`+w.a.toUpperCase()]},O&&Ys(jo)[`overflow`+w.a.toUpperCase()]!==`scroll`&&(Ee.style[`overflow`+w.a.toUpperCase()]=`scroll`)),Wc(d,ge,j),he=qc(d),re=Qs(d,!0),Ce=k&&bo(E,ue?go:_o)(),f?(Se=[f+w.os2,fe+_+Js],Se.t=ge,A=f===Ws?$s(d,w)+fe+_:0,A&&(Se.push(w.d,A+Js),ge.style.flexBasis!==`auto`&&(ge.style.flexBasis=A+Js)),Kc(Se),C&&mc.forEach(function(e){e.pin===C&&e.vars.pinSpacing!==!1&&(e._subPinOffset=!0)}),k&&z(Ae)):(A=$s(d,w),A&&ge.style.flexBasis!==`auto`&&(ge.style.flexBasis=A+Js)),k&&(U={top:re.top+(ue?ie-V:Ce)+Js,left:re.left+(ue?Ce:ie-V)+Js,boxSizing:`border-box`,position:`fixed`},U[Rs]=U[`max`+Ks]=Math.ceil(re.width)+Js,U[zs]=U[`max`+qs]=Math.ceil(re.height)+Js,U[Gs]=U[Gs+Hs]=U[Gs+Bs]=U[Gs+Us]=U[Gs+Vs]=`0`,U[Ws]=j[Ws],U[Ws+Hs]=j[Ws+Hs],U[Ws+Bs]=j[Ws+Bs],U[Ws+Us]=j[Ws+Us],U[Ws+Vs]=j[Ws+Vs],me=Jc(pe,U,y),Ac&&z(0)),n?(we=n._initted,Ko(1),n.render(n.duration(),!0,!0),be=_e(w.a)-ye+fe+_,W=Math.abs(fe-be)>1,k&&W&&me.splice(me.length-2,2),n.render(0,!0,!0),we||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),Ko(0)):be=fe,Ee&&(Ee.value?Ee.style[`overflow`+w.a.toUpperCase()]=Ee.value:Ee.style.removeProperty(`overflow-`+w.a));else if(u&&z()&&!x)for(re=u.parentNode;re&&re!==jo;)re._pinOffset&&(V-=re._pinOffset,oe-=re._pinOffset),re=re.parentNode;Te&&Te.forEach(function(e){return e.revert(!1,!0)}),P.start=V,P.end=oe,B=ae=Ac?Ae:z(),!x&&!Ac&&(B0?mc.slice(0,t).reverse():mc.slice(t+1);return(Ds(e)?n.filter(function(t){return t.vars.preventOverlaps===e}):n).filter(function(e){return P.direction>0?e.end<=V:e.start>=oe})},P.update=function(e,t,r){if(!(x&&!r&&!e)){var o=Ac===!0?Ae:P.scroll(),c=e?0:(o-V)/fe,u=c<0?0:c>1?1:c||0,p=P.progress,h,g,b,D,O,M,N,F;if(t&&(ae=B,B=x?z():o,v&&(De=Ee,Ee=n&&!T?n.totalProgress():u)),m&&d&&!Ro&&!os&&ls&&(!u&&Vo+(o-ae)/(ss()-Io)*m&&(u=.9999)),u!==p&&P.enabled){if(h=P.isActive=!!u&&u<1,g=!!p&&p<1,M=h!==g,O=M||!!u!=!!p,P.direction=u>p?1:-1,P.progress=u,O&&!Ro&&(b=u&&!p?0:u===1?1:p===1?2:3,T&&(D=!M&&j[b+1]!==`none`&&j[b+1]||j[b],F=n&&(D===`complete`||D===`reset`||D in n))),C&&(M||F)&&(F||l||!n)&&(Os(C)?C(P):P.getTrailing(C).forEach(function(e){return e.endAnimation()})),T||(G&&!Ro&&!os?(G._dp._time-G._start!==G._time&&G.render(G._dp._time-G._start),G.resetTo?G.resetTo(`totalProgress`,u,n._tTime/n._tDur):(G.vars.totalProgress=u,G.invalidate().restart())):n&&n.totalProgress(u,!!(Ro&&(te||e)))),d){if(e&&f&&(ge.style[f+w.os2]=xe),!k)ve(_s(ye+be*u));else if(O){if(N=!e&&u>p&&oe+1>o&&o+1>=Ts(E,w),y)if(!e&&(h||N)){var I=Qs(d,!0),ee=o-V;Qc(d,jo,I.top+(w===_o?ee:0)+Js,I.left+(w===_o?0:ee)+Js)}else Qc(d,ge);Kc(h||N?me:he),W&&u<1&&h||ve(ye+(u===1&&!N?be:0))}}v&&!ne.tween&&!Ro&&!os&&K.restart(!0),a&&(M||_&&u&&(u<1||!as))&&Po(a.targets).forEach(function(e){return e.classList[h||_?`add`:`remove`](a.className)}),i&&!T&&!e&&i(P),O&&!Ro?(T&&(F&&(D===`complete`?n.pause().totalProgress(1):D===`reset`?n.restart(!0).pause():D===`restart`?n.restart(!0):n[D]()),i&&i(P)),(M||!as)&&(s&&M&&Ms(P,s),A[b]&&Ms(P,A[b]),_&&(u===1?P.kill(!1,1):A[b]=0),M||(b=u===1?1:3,A[b]&&Ms(P,A[b]))),S&&!h&&Math.abs(P.getVelocity())>(ks(S)?S:2500)&&(js(P.callbackAnimation),G?G.progress(1):js(n,D===`reverse`?1:!u,1))):T&&i&&!Ro&&i(P)}if(we){var L=x?o/x.duration()*(x._caScrollDist||0):o;Ce(L+ +!!ce._isFlipped),we(L)}Me&&Me(-o/x.duration()*(x._caScrollDist||0))}},P.enable=function(t,n){P.enabled||(P.enabled=!0,ac(E,`resize`,bc),O||ac(E,`scroll`,vc),F&&ac(e,`refreshInit`,F),t!==!1&&(P.progress=R=0,B=ae=L=z()),n!==!1&&P.refresh())},P.getTween=function(e){return e&&ne?ne.tween:G},P.setPositions=function(e,t,n,r){if(x){var i=x.scrollTrigger,a=x.duration(),o=i.end-i.start;e=i.start+o*e/a,t=i.start+o*t/a}P.refresh(!1,!1,{start:fs(e,n&&!!P._startClamp),end:fs(t,n&&!!P._endClamp)},r),P.update()},P.adjustPinSpacing=function(e){if(Se&&e){var t=Se.indexOf(w.d)+1;Se[t]=parseFloat(Se[t])+e+Js,Se[1]=parseFloat(Se[1])+e+Js,Kc(Se)}},P.disable=function(t,n){if(t!==!1&&P.revert(!0,!0),P.enabled&&(P.enabled=P.isActive=!1,n||G&&G.pause(),Ae=0,re&&(re.uncache=1),F&&oc(e,`refreshInit`,F),K&&(K.pause(),ne.tween&&ne.tween.kill()&&(ne.tween=0)),!O)){for(var r=mc.length;r--;)if(mc[r].scroller===E&&mc[r]!==P)return;oc(E,`resize`,bc),O||oc(E,`scroll`,vc)}},P.kill=function(e,r){P.disable(e,r),G&&!r&&G.kill(),o&&delete hc[o];var i=mc.indexOf(P);i>=0&&mc.splice(i,1),i===Vo&&Rc>0&&Vo--,i=0,mc.forEach(function(e){return e.scroller===P.scroller&&(i=1)}),i||Ac||(P.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),se&&[se,H,ce,le].forEach(function(e){return e.parentNode&&e.parentNode.removeChild(e)}),zc===P&&(zc=0),d&&(re&&(re.uncache=1),i=0,mc.forEach(function(e){return e.pin===d&&i++}),i||(re.spacer=0)),t.onKill&&t.onKill(P)},mc.push(P),P.enable(!1,!1),Ne&&Ne(P),n&&n.add&&!fe){var Le=P.update;P.update=function(){P.update=Le,no.cache++,V||oe||P.refresh()},q.delayedCall(.01,P.update),fe=.01,V=oe=0}else P.refresh();d&&Nc()},e.register=function(t){return Do||=(q=t||ys(),vs()&&window.document&&e.enable(),us),Do},e.defaults=function(e){if(e)for(var t in e)lc[t]=e[t];return lc},e.disable=function(e,t){us=0,mc.forEach(function(n){return n[t?`kill`:`disable`](e)}),oc(Oo,`wheel`,vc),oc(ko,`scroll`,vc),clearInterval(Lo),oc(ko,`touchcancel`,gs),oc(jo,`touchstart`,gs),ic(oc,ko,`pointerdown,touchstart,mousedown`,ms),ic(oc,ko,`pointerup,touchend,mouseup`,hs),No.kill(),Es(oc);for(var n=0;n0&&r.left+i0&&r.top+i=0&&Tc.splice(t,5),Tc.push(e,e.style.cssText,e.getBBox&&e.getAttribute(`transform`),q.core.getCache(e),$o())}}):Tc},nl.revert=function(e,t){return Oc(!e,t)},nl.create=function(e,t){return new nl(e,t)},nl.refresh=function(e){return e?bc(!0):(Do||nl.register())&&Ic(!0)},nl.update=function(e){return++no.cache&&Bc(e===!0?2:0)},nl.clearScrollMemory=kc,nl.maxScroll=function(e,t){return Ts(e,t?go:_o)},nl.getScrollFunc=function(e,t){return bo(vo(e),t?go:_o)},nl.getById=function(e){return hc[e]},nl.getAll=function(){return mc.filter(function(e){return e.vars.id!==`ScrollSmoother`})},nl.isScrolling=function(){return!!ls},nl.snapDirectional=nc,nl.addEventListener=function(e,t){var n=xc[e]||(xc[e]=[]);~n.indexOf(t)||n.push(t)},nl.removeEventListener=function(e,t){var n=xc[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},nl.batch=function(e,t){var n=[],r={},i=t.interval||.016,a=t.batchMax||1e9,o=function(e,t){var n=[],r=[],o=q.delayedCall(i,function(){t(n,r),n=[],r=[]}).pause();return function(e){n.length||o.restart(!0),n.push(e.trigger),r.push(e),a<=n.length&&o.progress(1)}},s;for(s in t)r[s]=s.substr(0,2)===`on`&&Os(t[s])&&s!==`onRefreshInit`?o(s,t[s]):t[s];return Os(a)&&(a=a(),ac(nl,`refresh`,function(){return a=t.batchMax()})),Po(e).forEach(function(e){var t={};for(s in r)t[s]=r[s];t.trigger=e,n.push(nl.create(t))}),n};var rl=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},il=function e(t,n){n===!0?t.style.removeProperty(`touch-action`):t.style.touchAction=n===!0?`auto`:n?`pan-`+n+(Eo.isTouch?` pinch-zoom`:``):`none`,t===Ao&&e(jo,n)},al={auto:1,scroll:1},ol=function(e){var t=e.event,n=e.target,r=e.axis,i=(t.changedTouches?t.changedTouches[0]:t).target,a=i._gsap||q.core.getCache(i),o=ss(),s;if(!a._isScrollT||o-a._isScrollT>2e3){for(;i&&i!==jo&&(i.scrollHeight<=i.clientHeight&&i.scrollWidth<=i.clientWidth||!(al[(s=Ys(i)).overflowY]||al[s.overflowX]));)i=i.parentNode;a._isScroll=i&&i!==n&&!bs(i)&&(al[(s=Ys(i)).overflowY]||al[s.overflowX]),a._isScrollT=o}(a._isScroll||r===`x`)&&(t.stopPropagation(),t._gsapAllow=!0)},sl=function(e,t,n,r){return Eo.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r&&=ol,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&ac(ko,Eo.eventTypes[0],ul,!1,!0)},onDisable:function(){return oc(ko,Eo.eventTypes[0],ul,!0)}})},cl=/(input|label|select|textarea)/i,ll,ul=function(e){var t=cl.test(e.target.tagName);(t||ll)&&(e._gsapAllow=!0,ll=t)},dl=function(e){As(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||=`wheel,touch`,e.debounce=!!e.debounce,e.id=e.id||`normalizer`;var t=e,n=t.normalizeScrollX,r=t.momentum,i=t.allowNestedScroll,a=t.onRelease,o,s,c=vo(e.target)||Ao,l=q.core.globals().ScrollSmoother,u=l&&l.get(),d=Qo&&(e.content&&vo(e.content)||u&&e.content!==!1&&!u.smooth()&&u.content()),f=bo(c,_o),p=bo(c,go),m=1,h=(Eo.isTouch&&Oo.visualViewport?Oo.visualViewport.scale*Oo.visualViewport.width:Oo.outerWidth)/Oo.innerWidth,g=0,_=Os(r)?function(){return r(o)}:function(){return r||2.8},v,y,b=sl(c,e.type,!0,i),x=function(){return y=!1},S=gs,C=gs,w=function(){s=Ts(c,_o),C=Fo(+!!Qo,s),n&&(S=Fo(0,Ts(c,go))),v=jc},T=function(){d._gsap.y=_s(parseFloat(d._gsap.y)+f.offset)+`px`,d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+parseFloat(d._gsap.y)+`, 0, 1)`,f.offset=f.cacheID=0},E=function(){if(y){requestAnimationFrame(x);var e=_s(o.deltaY/2),t=C(f.v-e);if(d&&t!==f.v+f.offset){f.offset=t-f.v;var n=_s((parseFloat(d&&d._gsap.y)||0)-f.offset);d.style.transform=`matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, `+n+`, 0, 1)`,d._gsap.y=n+`px`,f.cacheID=no.cache,Bc()}return!0}f.offset&&T(),y=!0},D,O,k,A,j=function(){w(),D.isActive()&&D.vars.scrollY>s&&(f()>s?D.progress(1)&&f(s):D.resetTo(`scrollY`,s))};return d&&q.set(d,{y:`+=0`}),e.ignoreCheck=function(e){return Qo&&e.type===`touchmove`&&E(e)||m>1.05&&e.type!==`touchstart`||o.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){y=!1;var e=m;m=_s((Oo.visualViewport&&Oo.visualViewport.scale||1)/h),D.pause(),e!==m&&il(c,m>1.01?!0:n?!1:`x`),O=p(),k=f(),w(),v=jc},e.onRelease=e.onGestureStart=function(e,t){if(f.offset&&T(),!t)A.restart(!0);else{no.cache++;var r=_(),i,o;n&&(i=p(),o=i+r*.05*-e.velocityX/.227,r*=rl(p,i,o,Ts(c,go)),D.vars.scrollX=S(o)),i=f(),o=i+r*.05*-e.velocityY/.227,r*=rl(f,i,o,Ts(c,_o)),D.vars.scrollY=C(o),D.invalidate().duration(r).play(.01),(Qo&&D.vars.scrollY>=s||i>=s-1)&&q.to({},{onUpdate:j,duration:r})}a&&a(e)},e.onWheel=function(){D._ts&&D.pause(),ss()-g>1e3&&(v=0,g=ss())},e.onChange=function(e,t,r,i,a){if(jc!==v&&w(),t&&n&&p(S(i[2]===t?O+(e.startX-e.x):p()+t-i[1])),r){f.offset&&T();var o=a[2]===r,s=o?k+e.startY-e.y:f()+r-a[1],c=C(s);o&&s!==c&&(k+=c-s),f(c)}(r||t)&&Bc()},e.onEnable=function(){il(c,n?!1:`x`),nl.addEventListener(`refresh`,j),ac(Oo,`resize`,j),f.smooth&&=(f.target.style.scrollBehavior=`auto`,p.smooth=!1),b.enable()},e.onDisable=function(){il(c,!0),oc(Oo,`resize`,j),nl.removeEventListener(`refresh`,j),b.kill()},e.lockAxis=e.lockAxis!==!1,o=new Eo(e),o.iOS=Qo,Qo&&!f()&&f(1),Qo&&q.ticker.add(gs),A=o._dc,D=q.to(o,{ease:`power4`,paused:!0,inherit:!1,scrollX:n?`+=0.1`:`+=0`,scrollY:`+=0.1`,modifiers:{scrollY:$c(f,f(),function(){return D.pause()})},onUpdate:Bc,onComplete:A.vars.onComplete}),o};nl.sort=function(e){if(Os(e))return mc.sort(e);var t=Oo.pageYOffset||0;return nl.getAll().forEach(function(e){return e._sortY=e.trigger?t+e.trigger.getBoundingClientRect().top:e.start+Oo.innerHeight}),mc.sort(e||function(e,t){return(e.vars.refreshPriority||0)*-1e6+(e.vars.containerAnimation?1e6:e._sortY)-((t.vars.containerAnimation?1e6:t._sortY)+(t.vars.refreshPriority||0)*-1e6)})},nl.observe=function(e){return new Eo(e)},nl.normalizeScroll=function(e){if(e===void 0)return Jo;if(e===!0&&Jo)return Jo.enable();if(e===!1){Jo&&Jo.kill(),Jo=e;return}var t=e instanceof Eo?e:dl(e);return Jo&&Jo.target===t.target&&Jo.kill(),bs(t.target)&&(Jo=t),t},nl.core={_getVelocityProp:xo,_inputObserver:sl,_scrollers:no,_proxies:ro,bridge:{ss:function(){ls||wc(`scrollStart`),ls=ss()},ref:function(){return Ro}}},ys()&&q.registerPlugin(nl);var J=j();function fl(t){let r=(0,we.c)(31),{code:i,language:s,className:c,variant:l,showCopyButton:u}=t,d=s===void 0?`bash`:s,f=l===void 0?`default`:l,p=u===void 0?!0:u,[m,h]=(0,W.useState)(!1),{normalizedLanguage:g,highlightedCode:_}=a(i,d),{copy:v}=o(),y;r[0]!==i||r[1]!==v?(y=async()=>{await v(i)?(h(!0),S.success(`Copied to clipboard`),setTimeout(()=>h(!1),2e3)):S.error(`Failed to copy to clipboard`)},r[0]=i,r[1]=v,r[2]=y):y=r[2];let b=y,x;r[3]===c?x=r[4]:(x=D(`group/code-block relative rounded-md border border-border bg-muted/30 text-sm`,c),r[3]=c,r[4]=x);let C;r[5]!==m||r[6]!==b||r[7]!==g||r[8]!==p||r[9]!==f?(C=f===`default`&&(0,J.jsxs)(`div`,{className:`flex h-14 items-center justify-between border-b border-border bg-muted/50 px-3 py-2`,children:[(0,J.jsx)(`span`,{className:`font-mono text-sm font-bold text-muted-foreground`,children:g}),p&&(0,J.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,J.jsx)(`span`,{className:D(`text-xs text-green-500 transition-opacity duration-200`,m?`opacity-100`:`pointer-events-none opacity-0`),children:`Copied`}),(0,J.jsxs)(A,{variant:`ghost`,size:`icon`,onClick:b,className:`transition-opacity hover:opacity-100`,children:[m?(0,J.jsx)(e,{className:`size-4 text-green-500`}):(0,J.jsx)(n,{className:`size-4`}),(0,J.jsx)(`span`,{className:`sr-only`,children:`Copy`})]})]})]}),r[5]=m,r[6]=b,r[7]=g,r[8]=p,r[9]=f,r[10]=C):C=r[10];let w;r[11]!==m||r[12]!==b||r[13]!==p||r[14]!==f?(w=f===`minimal`&&p&&(0,J.jsxs)(`div`,{className:`absolute top-2 right-2 z-10 flex items-center gap-1 opacity-0 transition-opacity group-hover/code-block:opacity-100`,children:[(0,J.jsx)(`span`,{className:D(`text-xs text-green-500 transition-opacity duration-200`,m?`opacity-100`:`pointer-events-none opacity-0`),children:`Copied`}),(0,J.jsxs)(A,{variant:`ghost`,size:`icon`,onClick:b,children:[m?(0,J.jsx)(e,{className:`size-4 text-green-500`}):(0,J.jsx)(n,{className:`size-4`}),(0,J.jsx)(`span`,{className:`sr-only`,children:`Copy`})]})]}),r[11]=m,r[12]=b,r[13]=p,r[14]=f,r[15]=w):w=r[15];let T=f===`default`?`rounded-none! p-3!`:`rounded-md! p-4!`,E;r[16]===T?E=r[17]:(E=D(`m-0! font-mono! text-sm leading-relaxed`,T),r[16]=T,r[17]=E);let O;r[18]===_?O=r[19]:(O=(0,J.jsx)(`span`,{dangerouslySetInnerHTML:{__html:_}}),r[18]=_,r[19]=O);let k;r[20]!==d||r[21]!==O?(k=(0,J.jsx)(`code`,{"data-language":d,suppressHydrationWarning:!0,children:O}),r[20]=d,r[21]=O,r[22]=k):k=r[22];let j;r[23]!==k||r[24]!==E?(j=(0,J.jsx)(`div`,{className:`overflow-x-auto`,children:(0,J.jsx)(`pre`,{className:E,children:k})}),r[23]=k,r[24]=E,r[25]=j):j=r[25];let M;return r[26]!==j||r[27]!==x||r[28]!==C||r[29]!==w?(M=(0,J.jsxs)(`div`,{className:x,children:[C,w,j]}),r[26]=j,r[27]=x,r[28]=C,r[29]=w,r[30]=M):M=r[30],M}function pl({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}var ml={};function hl(e,t){let n=W.useRef(ml);return n.current===ml&&(n.current=e(t)),n}var gl=W[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],_l=gl&&gl!==W.useLayoutEffect?gl:e=>e();function Y(e){let t=hl(vl).current;return t.next=e,_l(t.effect),t.trampoline}function vl(){let e={next:void 0,callback:yl,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function yl(){}var X=typeof document<`u`?W.useLayoutEffect:()=>{},bl=W.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function xl(){return W.useContext(bl)}function Sl(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Y(i),o=W.useRef(0),s=hl(wl).current,c=hl(Cl).current,[l,u]=W.useState(0),d=W.useRef(l),f=Y((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=Y(e=>{c.delete(e),d.current+=1,u(d.current)}),m=W.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(Tl).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);X(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),X(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),X(()=>()=>{n.current=[]},[n]),X(()=>()=>{r&&(r.current=[])},[r]);let h=Y(e=>(s.add(e),()=>{s.delete(e)}));X(()=>{s.forEach(e=>e(m))},[s,m]);let g=W.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,J.jsx)(bl.Provider,{value:g,children:t})}function Cl(){return new Map}function wl(){return new Set}function Tl(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var El=W.createContext(void 0);function Dl(){return W.useContext(El)?.direction??`ltr`}function Ol(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var kl=Ol(`https://base-ui.com/production-error`,`Base UI`);function Al(e,t,n,r){let i=hl(Ml).current;return Nl(i,e,t,n,r)&&Fl(i,[e,t,n,r]),i.callback}function jl(e){let t=hl(Ml).current;return Pl(t,e)&&Fl(t,e),t.callback}function Ml(){return{callback:null,cleanup:null,refs:[]}}function Nl(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Pl(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Fl(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e{for(let e=0;e=e}function Rl(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(Ll(19)?n?.ref:t.ref)??null}function zl(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Bl(){}var Vl=Object.freeze([]),Hl=Object.freeze({});function Ul(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Wl(e,t){return typeof e==`function`?e(t):e}function Gl(e,t){return typeof e==`function`?e(t):e}var Kl={};function ql(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Yl(t);let a=Yl(e);return t&&(a=Xl(a,t)),n&&(a=Xl(a,n)),r&&(a=Xl(a,r)),i&&(a=Xl(a,i)),a}function Jl(e){if(e.length===0)return Kl;if(e.length===1)return Yl(e[0]);let t=Yl(e[0]);for(let n=1;n=65&&i<=90&&(typeof t==`function`||t===void 0)}function eu(e){return typeof e==`function`}function tu(e,t){return eu(e)?e(t):e??Kl}function nu(e,t){return t?e?(...n)=>{let r=n[0];if(ou(r)){let i=r;iu(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:ru(t):e}function ru(e){return e&&((...t)=>{let n=t[0];return ou(n)&&iu(n),e(...t)})}function iu(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function au(e,t){return t?e?t+` `+e:t:e}function ou(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function su(e,t,n={}){let r=t.render,i=cu(t,n);return n.enabled===!1?null:du(e,r,i,n.state??Hl)}function cu(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Hl,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Wl(n,a):void 0,d=l?Gl(r,a):void 0,f=l?Ul(a,c):Hl,p=l&&s?lu(s):void 0,m=l?zl(f,p)??{}:Hl;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=jl([m.ref,Rl(i),...o]):m.ref=Al(m.ref,Rl(i),o):Al(null,null)),l?(u!==void 0&&(m.className=au(m.className,u)),d!==void 0&&(m.style=zl(m.style,d)),m):Hl}function lu(e){return Array.isArray(e)?Jl(e):ql(void 0,e)}var uu=Symbol.for(`react.lazy`);function du(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ql(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===uu&&(i=W.Children.toArray(t)[0]),W.cloneElement(i,e)}if(e&&typeof e==`string`)return fu(e,n);throw Error(kl(8))}function fu(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}var pu=`none`,mu=`trigger-press`,hu=`outside-press`,gu=`item-press`,_u=`close-press`,vu=`clear-press`,yu=`input-change`,bu=`input-clear`,xu=`input-press`,Su=`focus-out`,Cu=`escape-key`,wu=`list-navigation`;function Tu(e,t,n,r){let i=!1,a=!1,o=r??Hl;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Eu(e,t,n){let r=n??Hl;return{reason:e,event:t??new Event(`base-ui`),...r}}var Du={...W},Ou=0;function ku(e,t=`mui`){let[n,r]=W.useState(e),i=e||n;return W.useEffect(()=>{n??(Ou+=1,r(`${t}-${Ou}`))},[n,t]),i}var Au=Du.useId;function ju(e,t){if(Au!==void 0){let n=Au();return e??(t?`${t}-${n}`:n)}return ku(e,t)}function Mu(e){return ju(e,`base-ui`)}var Nu=[];function Pu(e){W.useEffect(e,Nu)}var Fu=null;globalThis.requestAnimationFrame;var Iu=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Lu=class e{static create(){return new e}static request(e){return Iu.request(e)}static cancel(e){return Iu.cancel(e)}currentId=Fu;request(e){this.cancel(),this.currentId=Iu.request(()=>{this.currentId=Fu,e()})}cancel=()=>{this.currentId!==Fu&&(Iu.cancel(this.currentId),this.currentId=Fu)};disposeEffect=()=>this.cancel};function Ru(){let e=hl(Lu.create).current;return Pu(e.disposeEffect),e}function zu(e){return e==null?e:`current`in e?e.current:e}var Bu=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Vu={[Bu.startingStyle]:``},Hu={[Bu.endingStyle]:``},Uu={transitionStatus(e){return e===`starting`?Vu:e===`ending`?Hu:null}},Wu=z(ie());function Gu(e,t=!1,n=!0){let r=Ru();return Y((i,a=null)=>{r.cancel();let o=zu(e);if(o==null)return;let s=o,c=()=>{Wu.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Bu.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Ku(e,t=!1,n=!1){let[r,i]=W.useState(e&&t?`idle`:void 0),[a,o]=W.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),X(()=>{if(!e&&a&&r!==`ending`&&n){let e=Lu.request(()=>{i(`ending`)});return()=>{Lu.cancel(e)}}},[e,a,r,n]),X(()=>{if(!e||t)return;let n=Lu.request(()=>{i(void 0)});return()=>{Lu.cancel(n)}},[t,e]),X(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Lu.request(()=>{i(`idle`)});return()=>{Lu.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var qu=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function Ju(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=xl(),f=W.useRef(-1),[p,m]=W.useState(a??(i===qu.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=W.useRef(null),g=W.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return X(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),X(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),W.useMemo(()=>({ref:g,index:p}),[p,g])}var Yu=W.createContext(void 0);function Xu(e=!1){let t=W.useContext(Yu);if(t===void 0&&!e)throw Error(kl(16));return t}function Zu(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:W.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Qu(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=W.useRef(null),s=Xu(!0),c=a??s!==void 0,{props:l}=Zu({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=W.useCallback(()=>{let e=o.current;$u(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return X(u,[u]),{getButtonProps:W.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return ql({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(iu(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=$u(a),l=!i&&ed(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(iu(e),a?.(e),e.target===e.currentTarget&&i&&c&&$u(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Y(e=>{o.current=e,u()})}}function $u(e){return O(e)&&e.tagName===`BUTTON`}function ed(e){return!!(e?.tagName===`A`&&e?.href)}var td=typeof navigator<`u`,nd=dd(),rd=pd(),id=fd(),ad=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),od=nd.platform===`MacIntel`&&nd.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(nd.platform),sd=td&&/firefox/i.test(id),cd=td&&/apple/i.test(navigator.vendor);td&&/Edg/i.test(id);var ld=td&&/android/i.test(rd)||/android/i.test(id);td&&rd.toLowerCase().startsWith(`mac`)&&navigator.maxTouchPoints;var ud=id.includes(`jsdom/`);function dd(){if(!td)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function fd(){if(!td)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function pd(){if(!td)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var md=`data-base-ui-focusable`,hd=`ArrowLeft`,gd=`ArrowRight`,_d=`ArrowUp`,vd=`ArrowDown`;function yd(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bd(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&g(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function xd(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Sd(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Cd(e){return e.matches(`html,body`)}function wd(e){return O(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Td(e){return e?e.getAttribute(`role`)===`combobox`&&wd(e):!1}function Ed(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Dd(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Dd(e,t.id,n)])}function Od(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function kd(e){e.preventDefault(),e.stopPropagation()}function Ad(e){return`nativeEvent`in e}function jd(e){return e.pointerType===``&&e.isTrusted?!0:ld&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Md(e){return ud?!1:!ld&&e.width===0&&e.height===0||ld&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Nd(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Pd(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Fd(e,t,n){return Math.floor(e/t)!==n}function Id(e,t){return t<0||t>=e.length}function Ld(e,t){return zd(e.current,{disabledIndices:t})}function Rd(e,t){return zd(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function zd(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Wd(e,a,r));return a}function Bd(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:f=!1}){let p=u,m;if(t.key===`ArrowUp`?m=`up`:t.key===`ArrowDown`&&(m=`down`),m){let n=[],a=[],h=!1,g=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;g+=1;let o=e.closest(`[role="row"]`);o&&(h=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let _=!1,v=0;if(h)for(let e of n){let t=e.length;t>v&&(v=t),t!==o&&(_=!0)}let y=_&&g{if(!_||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f=n.length){if(!r||y)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Wd(e,n,s))return n}}},S=t=>{if(!y||u===-1)return;let n=u%b,i=t===`up`?-b:b,a=l-l%b,o=d(l/b)+1;for(let t=u-n+i,c=0;cl){if(!r)return;t=t<0?a:0}let i=Math.min(t+b-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Wd(e,r,s))return r}};f&&kd(t);let C=x(m)??S(m);if(C!==void 0)p=C;else if(u===-1)p=m===`up`?l:c;else if(p=zd(e,{startingIndex:u,amount:b,decrement:m===`up`,disabledIndices:s}),r){if(m===`up`&&(u-be?r:r-b,i&&(p=i(t,u,p))}m===`down`&&u+b>l&&(p=zd(e,{startingIndex:u%b-b,amount:b,disabledIndices:s}),i&&(p=i(t,u,p)))}Id(e,p)&&(p=u)}if(n===`both`){let n=d(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(f&&kd(t),u%o===o-1?r&&(p=zd(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(p=i(t,u,p))):(p=zd(e,{startingIndex:u,disabledIndices:s}),r&&Fd(p,o,n)&&(p=zd(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(p=i(t,u,p)))),Fd(p,o,n)&&(p=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(f&&kd(t),u%o===0?r&&(p=zd(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(p=i(t,u,p))):(p=zd(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Fd(p,o,n)&&(p=zd(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(p=i(t,u,p)))),Fd(p,o,n)&&(p=u));let c=d(l/o)===n;Id(e,p)&&(r&&c?(p=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:zd(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(p=i(t,u,p))):p=u)}return p}function Vd(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;rr[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Hd(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Ud(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Wd(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Kd(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Gd(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Kd(e,t=e?M(e):null){return!e||!e.isConnected||!t||Gd(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}function qd(e){return e?.ownerDocument||document}var Jd=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Yd(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return g(n)?n.host:null}function Xd(e){for(let t of Array.from(e.children))if(ce(t)===`summary`)return t;return null}function Zd(e,t){let n=Xd(t);return!!n&&(e===n||bd(n,e))}function Qd(e){let t=e?ce(e):``;return e!=null&&e.matches(Jd)&&(t!==`summary`||e.parentElement!=null&&ce(e.parentElement)===`details`&&Xd(e.parentElement)===e)&&(t!==`details`||Xd(e)==null)&&(t!==`input`||e.type!==`hidden`)}function $d(e){if(!Qd(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Yd(t)){let n=t!==e,r=ce(t)===`slot`;if(t.hasAttribute(`inert`)||n&&ce(t)===`details`&&!t.open&&!Zd(e,t)||t.hasAttribute(`hidden`)||!r&&!ef(t,n))return!1}return!0}function ef(e,t){let n=M(e);return t?n.display!==`none`:Kd(e,n)}function tf(e){let t=e.tabIndex;if(t<0){let t=ce(e);if(t===`details`||t===`audio`||t===`video`||O(e)&&e.isContentEditable)return 0}return t}function nf(e){if(ce(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function rf(e,t){let n=nf(e);if(!n)return!0;let r=t.find(e=>{let t=nf(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=nf(e);return t?.name===n.name&&t.form===n.form})===n}function af(e){if(O(e)&&ce(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return O(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function of(e,t){af(e).forEach(e=>{Qd(e)&&t.push(e),of(e,t)})}function sf(e,t,n){af(e).forEach(e=>{O(e)&&e.matches(t)&&n.push(e),sf(e,t,n)})}function cf(e){return $d(e)&&tf(e)>=0}function lf(e){let t=[];return of(e,t),t.filter($d)}function uf(e){let t=lf(e);return t.filter(e=>tf(e)>=0&&rf(e,t))}function df(e,t){let n=uf(e),r=n.length;if(r===0)return;let i=yd(qd(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ff(e){return df(qd(e).body,1)||e}function pf(e){return df(qd(e).body,-1)||e}function mf(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!bd(n,r)}function hf(e){uf(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function gf(e){let t=[];sf(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function _f(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function vf(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Y(i),o=Gu(r,n,!1);W.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function yf(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var bf=0,xf=class e{static create(){return new e}currentId=bf;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=bf,t()},e)}isStarted(){return this.currentId!==bf}clear=()=>{this.currentId!==bf&&(clearTimeout(this.currentId),this.currentId=bf)};disposeEffect=()=>this.clear};function Sf(){let e=hl(xf.create).current;return Pu(e.disposeEffect),e}var Cf={},wf={},Tf=``;function Ef(e){if(typeof document>`u`)return!1;let t=qd(e);return P(t).innerWidth-t.documentElement.clientWidth>0}function Df(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=qd(e),n=t.documentElement,r=t.body,i=k(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Of(e){let t=qd(e),n=t.documentElement,r=t.body,i=k(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function kf(e){let t=qd(e),n=t.documentElement,r=t.body,i=P(n),a=0,o=0,s=!1,c=Lu.create();if(ad&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Cf={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Tf=n.style.scrollBehavior,wf={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=k(n)?n:r;if(s=Df(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Cf),Object.assign(r.style,wf),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Tf)}function d(){u(),c.request(l)}l();let f=_f(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Af=new class{lockCount=0;restore=null;timeoutLock=xf.create();timeoutUnlock=xf.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=qd(e).documentElement,n=P(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=Bl;return}let r=od||!Ef(e);this.restore=r?Of(e):kf(e)}};function jf(e=!0,t=null){X(()=>{if(e)return Af.acquire(t)},[e,t])}function Mf(...e){return()=>{for(let t=0;t{t.current=t.next}};return t}var Ff={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},If={...Ff,position:`fixed`,top:0,left:0},Lf={...Ff,position:`absolute`},Rf=W.forwardRef(function(e,t){let[n,r]=W.useState();X(()=>{cd&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,J.jsx)(`span`,{...e,ref:t,style:If,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function zf(e){return`data-base-ui-${e}`}var Bf=0;function Vf(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Bf);let a=()=>e?.focus({preventScroll:n});if(i)return a(),Bl;let o=requestAnimationFrame(a);return Bf=o,()=>{Bf===o&&(cancelAnimationFrame(o),Bf=0)}}var Hf={inert:new WeakMap,"aria-hidden":new WeakMap},Uf=`data-base-ui-inert`,Wf={inert:new WeakSet,"aria-hidden":new WeakSet},Gf=new WeakMap,Kf=0;function qf(e){return Wf[e]}function Jf(e){return e?g(e)?e.host:Jf(e.parentNode):null}var Yf=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Jf(t);return e.contains(n)?n:null}).filter(e=>e!=null),Xf=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Zf=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{ce(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Qf(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=Yf(t,e),u=i?Yf(t,a):[],d=new Set(u),f=i?Zf(t,Xf(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=Hf[o],n=qf(o);c=n,s=e;let r=Yf(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);Zf(t,Xf(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(Gf.get(e)||0)+1;Gf.set(e,t),m.push(e),t===1&&e.setAttribute(Uf,``)}),Kf+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(Gf.get(e)||0)-1;Gf.set(e,t),t||e.removeAttribute(Uf)}),--Kf,Kf||(Hf.inert=new WeakMap,Hf[`aria-hidden`]=new WeakMap,Wf.inert=new WeakSet,Wf[`aria-hidden`]=new WeakSet,Gf=new WeakMap)}}function $f(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=qd(e[0]).body;return Qf(e,o,n,r,{mark:i,markerIgnoreElements:a})}var ep={style:{transition:`none`}},tp={fallbackAxisSide:`none`},np={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},rp=W.createContext(null),ip=()=>W.useContext(rp),ap=zf(`portal`);function op(e={}){let{ref:t,container:n,componentProps:r=Hl,elementProps:i}=e,a=ju(),o=ip()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=Y(e=>{e!==null&&u(e)}),f=W.useRef(null);X(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(le(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=su(`div`,r,{ref:[t,d],props:[{id:a,[ap]:``},i]});return{portalNode:l,portalSubtree:s&&p?Wu.createPortal(p,s):null}}var sp=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,style:s,...c}=e,{portalNode:l,portalSubtree:u}=op({container:r,ref:t,componentProps:e,elementProps:c}),d=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),[h,g]=W.useState(null),_=W.useRef(!1),v=h?.modal,y=h?.open,b=typeof o==`boolean`?o:!!h&&!h.modal&&h.open&&!!l;W.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&mf(e)&&(e.type===`focusin`?_.current&&=(gf(l),!1):(hf(l),_.current=!0))}return Mf(_f(l,`focusin`,e,!0),_f(l,`focusout`,e,!0))},[l,v]),W.useEffect(()=>{!l||y!==!1||(gf(l),_.current=!1)},[y,l]);let x=W.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,J.jsxs)(W.Fragment,{children:[u,(0,J.jsxs)(rp.Provider,{value:x,children:[b&&l&&(0,J.jsx)(Rf,{"data-type":`outside`,ref:d,onFocus:e=>{mf(e,l)?p.current?.focus():pf(h?h.domReference:null)?.focus()}}),b&&l&&(0,J.jsx)(`span`,{"aria-owns":l.id,style:np}),l&&Wu.createPortal(n,l),b&&l&&(0,J.jsx)(Rf,{"data-type":`outside`,ref:f,onFocus:e=>{mf(e,l)?m.current?.focus():(ff(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Tu(`focus-out`,e.nativeEvent)))}})]})]})});function cp(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var lp=W.createContext(null),up=W.createContext(null),dp=()=>W.useContext(lp)?.id||null,fp=e=>{let t=W.useContext(up);return e??t};function pp(e,t){let n=P(xd(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var mp=20,hp=[];function gp(){hp=hp.filter(e=>e.deref()?.isConnected)}function _p(e){gp(),e&&ce(e)!==`body`&&(hp.push(new WeakRef(e)),hp.length>mp&&(hp=hp.slice(-mp)))}function vp(){return gp(),hp[hp.length-1]?.deref()}function yp(e){return e?cf(e)?e:uf(e)[0]||e:null}function bp(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=lf(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return cf(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function xp(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=Y(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Td(_)&&S,w=W.useRef([`content`]),T=Nf(i),E=Nf(a),D=Nf(l),k=fp(p),A=ip(),j=W.useRef(!1),M=W.useRef(!1),N=W.useRef(!1),P=W.useRef(null),F=W.useRef(``),I=W.useRef(``),ee=W.useRef(null),L=W.useRef(null),te=Al(ee,f,A?.beforeInsideRef),R=Al(L,A?.afterInsideRef),z=Sf(),ne=Sf(),re=Ru(),ie=A!=null,B=Ed(v),ae=Y((e=B)=>e?uf(e):[]),V=Y(()=>m?.().filter(e=>e!=null)??[]);W.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&bd(B,yd(qd(B)))&&ae().length===0&&!C&&kd(e)}return _f(qd(B),`keydown`,e)},[r,_,B,s,w,C,ae]),W.useEffect(()=>{if(r||!g)return;let e=qd(B);function t(){N.current=!1}function n(e){let t=xd(e),n=V();N.current=!(bd(v,t)||bd(_,t)||bd(A?.portalNode,t)||n.some(e=>e===t||bd(e,t))),I.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(M.current=!0)}function i(){I.current=`keyboard`}return Mf(_f(e,`pointerdown`,n,!0),_f(e,`pointerup`,t,!0),_f(e,`pointercancel`,t,!0),_f(e,`keydown`,i,!0))},[r,v,_,B,g,A,V]),W.useEffect(()=>{if(r||!c)return;let e=qd(B);function t(){M.current=!0,ne.start(0,()=>{M.current=!1})}function n(e){let t=xd(e);cf(t)&&(P.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=xd(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=V(),f=n?.hasAttribute(zf(`focus-guard`))&&[ee.current,L.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,zu(d),zu(u)].includes(n),p=!(bd(_,n)||bd(v,n)||bd(n,v)||bd(A?.portalNode,n)||l.some(e=>e===n||bd(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>bd(e,n))||f||k&&(Dd(k.nodesRef.current,a).find(e=>bd(e.context?.elements.floating,n)||bd(e.context?.elements.domReference,n))||Od(k.nodesRef.current,a).find(e=>[e.context?.elements.floating,Ed(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&B&&bp(B,w),o&&r!==_&&!Kd(i)&&yd(e)===e.body){if(O(B)&&(B.focus(),o===`popup`)){re.request(()=>{B.focus()});return}let e=ae(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||B;O(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!M.current&&(C||n!==vp())&&(j.current=!0,h.setOpen(!1,Tu(Su,t)))})}function a(){N.current||(b.current.insideReactTree=!0,z.start(0,()=>{b.current.insideReactTree=!1}))}let l=O(_)?_:null;if(!(!v&&!l))return Mf(l&&_f(l,`focusout`,i),l&&_f(l,`pointerdown`,t),v&&_f(v,`focusin`,n),v&&_f(v,`focusout`,i),v&&A&&_f(v,`focusout`,a,!0))},[r,_,v,B,s,k,A,h,c,o,ae,C,x,w,b,z,ne,re,u,d,V]),W.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${zf(`portal`)}]`)||[]),t=(k?Od(k.nodesRef.current,x()):[]).find(e=>Td(e.context?.elements.domReference||null))?.context?.elements.domReference,n=$f([v,...e,ee.current,L.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...V(),t,zu(d),zu(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=$f([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,w,A,C,k,x,u,d,V]),X(()=>{if(!g||r||!O(B))return;let e=yd(qd(B));queueMicrotask(()=>{let t=T.current,n=typeof t==`function`?t(D.current||``):t;if(n===void 0||n===!1||bd(B,e))return;let r=null,i=()=>(r??=ae(B),r[0]||B),a;a=n===!0||n===null?i():zu(n),a||=i(),Vf(a,{preventScroll:a===B})})},[r,g,B,S,ae,T,D]),X(()=>{if(r||!B)return;let e=qd(B);_p(yd(e));function t(e){if(e.open||(F.current=pp(e.nativeEvent,I.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(j.current=!0),e.reason===`outside-press`)if(e.nested)j.current=!1;else if(jd(e.nativeEvent)||Md(e.nativeEvent))j.current=!1;else{let e=!1;qd(B).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(F.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||vp();return e&&e.isConnected?e:null}let n=_||vp();return zu(t)||n||null}return()=>{y.off(`openchange`,t);let r=yd(e),i=V(),a=bd(v,r)||i.some(e=>e===r||bd(e,r))||k&&Dd(k.nodesRef.current,x(),!1).some(e=>bd(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=yp(s),n=typeof o!=`boolean`;o&&!j.current&&O(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),j.current=!1})}},[r,v,B,E,b,y,k,_,x,V]),X(()=>{if(!ad||g||!v)return;let e=yd(qd(v));!O(e)||!wd(e)||bd(v,e)&&e.blur()},[g,v]),X(()=>{if(!(r||!A))return A.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,s,g,h,c,_]),X(()=>{if(!(r||!B))return bp(B,w),()=>{queueMicrotask(gp)}},[r,B,w]);let oe=!r&&(s?!C:!0)&&(ie||s);return(0,J.jsxs)(W.Fragment,{children:[oe&&(0,J.jsx)(Rf,{"data-type":`inside`,ref:te,onFocus:e=>{if(s){let e=ae();Vf(e[e.length-1])}else A?.portalNode&&(j.current=!1,mf(e,A.portalNode)?ff(_)?.focus():zu(d??A.beforeOutsideRef)?.focus())}}),n,oe&&(0,J.jsx)(Rf,{"data-type":`inside`,ref:R,onFocus:e=>{s?Vf(ae()[0]):A?.portalNode&&(c&&(j.current=!0),mf(e,A.portalNode)?pf(_)?.focus():zu(u??A.afterOutsideRef)?.focus())}})]})}function Sp(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=mu}=t,d=W.useRef(void 0),f=Ru(),p=Sf(),m=W.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||Nd(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`)),y=xd(i);if(wd(y)){let e=Tu(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let b=e.currentTarget;f.request(()=>{let e=Tu(u,i,b);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(Nd(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||Pd(f))),g=Tu(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return W.useMemo(()=>i?{reference:m}:Hl,[i,m])}var Cp={intentional:`onClick`,sloppy:`onPointerDown`};function wp(){return!1}function Tp(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Ep(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=wp,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,_=fp(p),v=Y(typeof c==`function`?c:()=>!1),y=typeof c==`function`?v:c,b=y!==!1,x=Y(()=>l),S=W.useRef(!1),C=W.useRef(!1),w=W.useRef(!1),{escapeKey:T,outsidePress:E}=Tp(f),D=W.useRef(null),k=Sf(),A=Sf(),j=Y(()=>{A.clear(),a.current.insideReactTree=!1}),N=W.useRef(!1),P=W.useRef(``),F=Y(u),I=Y(e=>{if(!r||!o||!s||e.key!==`Escape`||N.current)return;let t=a.current.floatingContext?.nodeId,i=_?Dd(_.nodesRef.current,t):[];if(!T&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=Tu(Cu,Ad(e)?e.nativeEvent:e);n.setOpen(!1,c),!T&&!c.isPropagationAllowed&&e.stopPropagation()}),ee=Y(()=>{a.current.insideReactTree=!0,A.start(0,j)});W.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=T,a.current.__outsidePressBubbles=E;let e=new xf,t=new xf;function c(){e.clear(),N.current=!0}function l(){e.start(h()?5:0,()=>{N.current=!1})}function u(){w.current=!0,t.start(0,()=>{w.current=!1})}function d(){S.current=!1,C.current=!1}function f(){let e=P.current,t=e===`pen`||!e?`mouse`:e,n=x(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function v(e){let t=a.current.floatingContext?.nodeId,r=_&&Dd(_.nodesRef.current,t).some(t=>Sd(e,t.context?.elements.floating));return Sd(e,n.select(`floatingElement`))||Sd(e,n.select(`domReferenceElement`))||r}function A(e){if(p(e)){j();return}if(a.current.insideReactTree){j();return}let r=xd(e),i=`[${zf(`inert`)}]`,o=ue(r)?r.getRootNode():null,s=Array.from((g(o)?o:qd(n.select(`floatingElement`))).querySelectorAll(i)),c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>bd(e,r))))return;let l=ue(r)?r:null;for(;l&&!m(l);){let e=de(l);if(m(e)||!ue(e))break;l=e}if(s.length&&ue(r)&&!Cd(r)&&!bd(r,n.select(`floatingElement`))&&s.every(e=>!bd(l,e)))return;if(O(r)&&!(`touches`in e)){let t=m(r),n=M(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(v(e))return;if(f()===`intentional`&&w.current){t.clear(),w.current=!1;return}if(typeof y==`function`&&!y(e))return;let u=a.current.floatingContext?.nodeId,d=_?Dd(_.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,Tu(hu,e)),j()}function F(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||Sd(e,n.select(`floatingElement`))||Sd(e,n.select(`domReferenceElement`))||A(e)}function ee(e){if(f()!==`sloppy`||!n.select(`open`)||!o||Sd(e,n.select(`floatingElement`))||Sd(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(D.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},k.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=xd(e);if(!n)return;let r=_f(n,e.type,()=>{t(e),r()})}function te(e){P.current=`touch`,L(e,ee)}function R(e){k.clear(),e.type===`pointerdown`&&(P.current=e.pointerType),!(e.type===`mousedown`&&D.current&&!D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):A(e)})}function z(e){if(!S.current)return;let n=C.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!v(e)){if(n){u();return}typeof y==`function`&&!y(e)||(t.clear(),w.current=!0,j())}}}function ne(e){if(f()!==`sloppy`||!D.current||Sd(e,n.select(`floatingElement`))||Sd(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-D.current.startX),i=Math.abs(t.clientY-D.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(D.current.dismissOnTouchEnd=!0),a>10&&(A(e),k.clear(),D.current=null)}function re(e){L(e,ne)}function ie(e){f()!==`sloppy`||!D.current||Sd(e,n.select(`floatingElement`))||Sd(e,n.select(`domReferenceElement`))||(D.current.dismissOnTouchEnd&&A(e),k.clear(),D.current=null)}function B(e){L(e,ie)}let ae=qd(i),V=Mf(s&&Mf(_f(ae,`keydown`,I),_f(ae,`compositionstart`,c),_f(ae,`compositionend`,l)),b&&Mf(_f(ae,`click`,R,!0),_f(ae,`pointerdown`,R,!0),_f(ae,`pointerup`,z,!0),_f(ae,`pointercancel`,z,!0),_f(ae,`mousedown`,R,!0),_f(ae,`mouseup`,z,!0),_f(ae,`touchstart`,te,!0),_f(ae,`touchmove`,re,!0),_f(ae,`touchend`,B,!0)));return()=>{V(),e.clear(),t.clear(),d(),w.current=!1}},[a,i,s,b,y,r,o,T,E,I,j,x,_,n,k]),W.useEffect(j,[y,j]);let L=W.useMemo(()=>({onKeyDown:I,[Cp[d]]:e=>{F()&&n.setOpen(!1,Tu(mu,e.nativeEvent))},...d!==`intentional`&&{onClick(e){F()&&n.setOpen(!1,Tu(`trigger-press`,e.nativeEvent))}}}),[I,n,d,F]),te=Y(e=>{if(!r||!o||e.button!==0)return;let t=xd(e.nativeEvent);bd(n.select(`floatingElement`),t)&&(S.current||(S.current=!0,C.current=!1))}),R=Y(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)}),z=W.useMemo(()=>({onKeyDown:I,onPointerDown:R,onMouseDown:R,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[I,ee,te,R]);return W.useMemo(()=>o?{reference:L,floating:z,trigger:L}:{},[o,L,z])}var Z=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(kl(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Dp=N((e=>{var t=oe(),n=p();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Op=N(((e,t)=>{t.exports=Dp()})),kp=[],Ap=void 0;function jp(){return Ap}function Mp(e){kp.push(e)}var Np=p(),Pp=Op(),Fp=Ll(19)?Lp:Rp;function Q(e,t,n,r,i){return Fp(e,t,n,r,i)}function Ip(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Np.useSyncExternalStore)(e.subscribe,a,a)}Mp({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Np.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Lp(e,t,n,r,i){let a=jp();if(!a)return Ip(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Rp(e,t,n,r,i){return(0,Pp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var zp=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Q(this,e,t,n,r)}},Bp=class extends zp{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e),X(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;X(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;X(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=t!==void 0;X(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return W.useDebugValue(e),Q(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=Y(t??Bl);this.context[e]=n}useStateSetter(e){let t=W.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Vp={open:Z(e=>e.open),transitionStatus:Z(e=>e.transitionStatus),domReferenceElement:Z(e=>e.domReferenceElement),referenceElement:Z(e=>e.positionReference??e.referenceElement),floatingElement:Z(e=>e.floatingElement),floatingId:Z(e=>e.floatingId)},Hp=class extends Bp{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:cp(),nested:n,triggerElements:i},Vp),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Pd(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}},Up=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Wp(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ju(),a=dp()!=null,o=hl(()=>new Hp({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Up,floatingId:i,syncOnly:!1,nested:a})).current;return X(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=ue(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Gp(e={}){let{nodeId:t,externalTree:n}=e,r=Wp(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=W.useState(null),c=W.useRef(null),l=fp(n);X(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=L({...e,elements:{...a,...o&&{reference:o}}}),d=W.useCallback(e=>{let t=ue(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=W.useState(void 0),[m,h]=W.useState(null);i.useSyncedValue(`referenceElement`,f??null);let g=ue(f)?f:null;i.useSyncedValue(`domReferenceElement`,f===void 0?a.domReference:g),i.useSyncedValue(`floatingElement`,m);let _=W.useCallback(e=>{(ue(e)||e===null)&&(c.current=e,p(e)),(ue(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!ue(e))&&u.refs.setReference(e)},[u.refs,p]),v=W.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),y=W.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:d,domReference:c}),[u.refs,_,v,d]),b=W.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=W.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:y,elements:b,nodeId:t,rootStore:i}),[u,y,b,t,i,x,S]);return X(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),W.useMemo(()=>({...u,context:C,refs:y,elements:b,rootStore:i}),[u,y,b,C,i])}function Kp(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=W.useCallback(t=>qp(t,e,`reference`),t),o=W.useCallback(t=>qp(t,e,`floating`),n),s=W.useCallback(t=>qp(t,e,`item`),r),c=W.useCallback(t=>qp(t,e,`trigger`),i);return W.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function qp(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[md]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;or.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Yp=`Escape`;function Xp(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Zp(e,t){return Xp(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Qp(e,t,n){return Xp(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function $p(e,t,n){return Xp(t,n?e===hd:e===gd,e===vd)}function em(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===Yp:Xp(t,n?e===gd:e===hd,e===_d)}function tm(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:b=void 0,orientation:x=`vertical`,parentOrientation:S,cols:C=1,id:w,resetOnPointerLeave:T=!0,externalTree:E}=t,D=Nf(Ed(i)),k=dp(),A=fp(E);X(()=>{o.current.orientation=x},[o,x]);let j=Td(a),M=W.useRef(_),N=W.useRef(d??-1),P=W.useRef(null),F=W.useRef(!0),I=Y(e=>{l(N.current===-1?null:N.current,e)}),ee=W.useRef(I),L=W.useRef(!!i),te=W.useRef(r),R=W.useRef(!1),z=W.useRef(!1),ne=W.useRef(null),re=Nf(b),ie=Nf(r),B=Nf(d),ae=Nf(T),V=Y(()=>{function e(e){g?A?.events.emit(`virtualfocus`,e):ne.current=Vf(e,{sync:R.current,preventScroll:!0})}let t=s.current[N.current],n=z.current;t&&e(t),(R.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[N.current]||t;r&&(t||e(r),H&&(n||!F.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});X(()=>{u&&(r&&i?(N.current=d??-1,M.current&&d!=null&&(z.current=!0,I())):L.current&&(N.current=-1,ee.current()))},[u,r,i,d,I]),X(()=>{if(u){if(!r){R.current=!1;return}if(i)if(c==null){if(R.current=!1,B.current!=null)return;if(L.current&&(N.current=-1,V()),(!te.current||!L.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(N.current=P.current==null||Qp(P.current,x,h)||m?Ld(s):Rd(s),P.current=null,I())};t()}}else Id(s.current,c)||(N.current=c,V(),z.current=!1)}},[u,r,i,c,B,m,s,x,h,I,V,re]),X(()=>{if(!u||i||!A||g||!L.current)return;let e=A.nodesRef.current,t=e.find(e=>e.id===k)?.context?.elements.floating,n=yd(qd(i)),r=e.some(e=>e.context&&bd(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[u,i,A,k,g]),X(()=>{ee.current=I,te.current=r,L.current=!!i}),X(()=>{r||(P.current=null,M.current=_)},[r,_]);let oe=c!=null,se=Y(e=>{if(!ie.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||c!==t)&&(N.current=t,I(e))}),H=W.useMemo(()=>({onFocus(e){R.current=!0,se(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){R.current=!0,z.current=!1,v&&se(e)},onPointerLeave(e){if(!ie.current||!F.current||e.pointerType===`touch`)return;R.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&ae.current&&(ne.current?.(),ne.current=null,N.current=-1,I(e),!g)){let e=D.current,t=yd(qd(e));e&&bd(e,t)&&e.focus({preventScroll:!0})}}}),[se,ie,D,v,s,I,ae,g]),ce=W.useCallback(()=>S??A?.nodesRef.current.find(e=>e.id===k)?.context?.dataRef?.current.orientation,[k,A,S]),le=Y(e=>{if(F.current=!1,R.current=!0,e.which===229||!ie.current&&e.currentTarget===D.current)return;if(m&&em(e.key,x,h,C)){Zp(e.key,ce())||kd(e),n.setOpen(!1,Tu(wu,e.nativeEvent)),O(a)&&(g?A?.events.emit(`virtualfocus`,a):a.focus());return}let t=N.current,i=Ld(s,b),o=Rd(s,b);if(j||(e.key===`Home`&&(kd(e),N.current=i,I(e)),e.key===`End`&&(kd(e),N.current=o,I(e))),C>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=Vd(t,C,!1),r=n.findIndex(e=>e!=null&&!Wd(s.current,e,b)),a=n.reduce((e,t,n)=>t!=null&&!Wd(s.current,t,b)?n:e,-1),c=n[Bd(n.map(e=>e==null?null:s.current[e]),{event:e,orientation:x,loopFocus:p,rtl:h,cols:C,disabledIndices:Ud([...(typeof b==`function`?null:b)||s.current.map((e,t)=>Wd(s.current,t,b)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:Hd(N.current>o?i:N.current,t,n,C,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(N.current=c,I(e)),x===`both`)return}if(Zp(e.key,x)){if(kd(e),r&&!g&&yd(e.currentTarget.ownerDocument)===e.currentTarget){N.current=Qp(e.key,x,h)?i:o,I(e);return}Qp(e.key,x,h)?p?t>=o?f&&t!==s.current.length?N.current=-1:(R.current=!1,N.current=i):N.current=zd(s.current,{startingIndex:t,disabledIndices:b}):N.current=Math.min(o,zd(s.current,{startingIndex:t,disabledIndices:b})):p?t<=i?f&&t!==-1?N.current=s.current.length:(R.current=!1,N.current=o):N.current=zd(s.current,{startingIndex:t,decrement:!0,disabledIndices:b}):N.current=Math.max(i,zd(s.current,{startingIndex:t,decrement:!0,disabledIndices:b})),Id(s.current,N.current)&&(N.current=-1),I(e)}}),ue=W.useMemo(()=>g&&r&&oe&&{"aria-activedescendant":`${w}-${c}`},[g,r,oe,w,c]),de=W.useMemo(()=>({"aria-orientation":x===`both`?void 0:x,...j?{}:ue,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=xd(e.nativeEvent);if(t&&!bd(D.current,t))return;kd(e),n.setOpen(!1,Tu(Su,e.nativeEvent)),O(a)&&a.focus();return}le(e)},onPointerMove(){F.current=!0}}),[ue,le,D,x,j,n,r,g,a]),fe=W.useMemo(()=>{function e(e){_===`auto`&&jd(e.nativeEvent)&&(M.current=!g)}function t(e){M.current=_,_===`auto`&&Md(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(e){let t=n.select(`open`);F.current=!1;let r=e.key.startsWith(`Arrow`),i=$p(e.key,ce(),h),a=Zp(e.key,x),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return le(e);if(!(!t&&!y&&r)){if(o){let t=Zp(e.key,ce());P.current=m&&t?null:e.key}if(m){i&&(kd(e),t?(N.current=Ld(s,re.current),I(e)):n.setOpen(!0,Tu(wu,e.nativeEvent,e.currentTarget)));return}a&&(B.current!=null&&(N.current=B.current),kd(e),!t&&y?n.setOpen(!0,Tu(wu,e.nativeEvent,e.currentTarget)):le(e),t&&I(e))}},onFocus(e){n.select(`open`)&&!g&&(N.current=-1,I(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[le,re,_,s,m,I,n,y,x,ce,h,B,g]),pe=W.useMemo(()=>({...ue,...fe}),[ue,fe]);return W.useMemo(()=>u?{reference:pe,floating:de,item:H,trigger:fe}:{},[u,pe,de,fe,H])}function nm(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=Sf(),m=W.useRef(``),h=W.useRef(f??s??-1),g=W.useRef(null);X(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),X(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=Y(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=Y(e=>{function t(e){let t=o?.current[e];return!t||Kd(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n0&&e.key===` `&&(kd(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(kd(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=Y(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=bd(r,t),o=bd(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),b=W.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),x=W.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return W.useMemo(()=>u?{reference:b,floating:x}:{},[u,b,x])}function rm(e){let t=W.useRef(``),n=W.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:W.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function im(e,t){let n=W.useRef(e),r=Y(t);X(()=>{n.current!==e&&r(n.current)},[e,r]),X(()=>{n.current=e},[e])}function am(e){let[t,n]=W.useState(null),r=Y((t,r)=>{e||n(r||(od?`touch`:``))});im(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=rm(r);return W.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}var om=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Bu.startingStyle]=`startingStyle`,e[e.endingStyle=Bu.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),sm=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),cm={[sm.popupOpen]:``},lm={[sm.popupOpen]:``,[sm.pressed]:``},um={[om.open]:``},dm={[om.closed]:``},fm={[om.anchorHidden]:``},pm={open(e){return e?cm:null}},mm={open(e){return e?lm:null}},hm={open(e){return e?um:dm},anchorHidden(e){return e?fm:null}};function gm(e){return Ll(19)?e:e?`true`:void 0}var _m=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,J.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),vm=W.createContext(void 0),ym=W.createContext(void 0),bm=W.createContext(void 0),xm=W.createContext(``);function Sm(){let e=W.useContext(vm);if(!e)throw Error(kl(22));return e}function Cm(){let e=W.useContext(ym);if(!e)throw Error(kl(23));return e}function wm(){let e=W.useContext(bm);if(!e)throw Error(kl(24));return e}function Tm(){return W.useContext(xm)}var Em=(e,t)=>Object.is(e,t);function Dm(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Om(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Dm(t,e,n))}function km(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Dm(e,t,n))}function Am(e,t,n){return e.filter(e=>!Dm(t,e,n))}function jm(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Mm(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Nm(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Mm(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Pm(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return jm(e)}function Fm(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?jm(e.value):jm(e)}var $={id:Z(e=>e.id),labelId:Z(e=>e.labelId),items:Z(e=>e.items),selectedValue:Z(e=>e.selectedValue),hasSelectionChips:Z(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:Z(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:Z((e,t)=>t?Nm(e.items):!1),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMounted:Z(e=>e.forceMounted),inline:Z(e=>e.inline),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>Dm(t,e,n)):Dm(t,r,n)}),transitionStatus:Z(e=>e.transitionStatus),popupProps:Z(e=>e.popupProps),inputProps:Z(e=>e.inputProps),triggerProps:Z(e=>e.triggerProps),getItemProps:Z(e=>e.getItemProps),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),triggerElement:Z(e=>e.triggerElement),inputElement:Z(e=>e.inputElement),inputGroupElement:Z(e=>e.inputGroupElement),popupSide:Z(e=>e.popupSide),openMethod:Z(e=>e.openMethod),inputInsidePopup:Z(e=>e.inputInsidePopup),selectionMode:Z(e=>e.selectionMode),name:Z(e=>e.name),form:Z(e=>e.form),disabled:Z(e=>e.disabled),readOnly:Z(e=>e.readOnly),required:Z(e=>e.required),grid:Z(e=>e.grid),virtualized:Z(e=>e.virtualized),itemToStringLabel:Z(e=>e.itemToStringLabel),isItemEqualToValue:Z(e=>e.isItemEqualToValue),modal:Z(e=>e.modal),autoHighlight:Z(e=>e.autoHighlight),submitOnItemClick:Z(e=>e.submitOnItemClick)},Im=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Lm={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Rm={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},zm={disabled:!1,...Rm},Bm={valid(e){return e===null?null:e?{[Im.valid]:``}:{[Im.invalid]:``}}},Vm=W.createContext({invalid:void 0,name:void 0,validityData:{state:Lm,errors:[],error:``,value:``,initialValue:null},setValidityData:Bl,disabled:void 0,touched:Rm.touched,setTouched:Bl,dirty:Rm.dirty,setDirty:Bl,filled:Rm.filled,setFilled:Bl,focused:Rm.focused,setFocused:Bl,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:zm,markedDirtyRef:{current:!1},registerFieldControl:Bl,validation:{getValidationProps:(e=Hl)=>e,getInputValidationProps:(e=Hl)=>e,inputRef:{current:null},commit:async()=>{}}});function Hm(e=!0){let t=W.useContext(Vm);if(t.setValidityData===Bl&&!e)throw Error(kl(28));return t}function Um(e,t){let{enabled:n=!0,getValue:r,id:i,value:a}=t,{registerFieldControl:o}=Hm(),s=W.useRef(null);s.current||=Symbol(),X(()=>{let t=s.current;if(!(!t||!n))return o(t,{controlRef:e,getValue:r,id:i,value:a}),()=>{o(t,void 0)}},[e,n,r,i,o,a])}var Wm=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Bl,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Gm(){return W.useContext(Wm)}var Km=W.createContext({controlId:void 0,registerControlId:Bl,labelId:void 0,setLabelId:Bl,messageIds:[],setMessageIds:Bl,getDescriptionProps:e=>e});function qm(){return W.useContext(Km)}function Jm(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=qm(),o=Mu(t),s=n?i:void 0,c=hl(()=>Symbol(`labelable-control`)),l=W.useRef(!1),u=W.useRef(t!=null),d=Y(()=>{!l.current||a===Bl||(l.current=!1,a(c.current,void 0))});return X(()=>{if(a===Bl)return;let e;if(n){let n=r?.current;e=ue(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),W.useEffect(()=>d,[d]),i??o}function Ym(e,t){return(n,r)=>{if(n==null)return!1;let i=Pm(n,t);return e.contains(i,r)}}function Xm(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=Pm(r,t),o=n==null?``:Pm(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var Zm=new Map;function Qm(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${$m(e.locale)}|${JSON.stringify(t)}`,r=Zm.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Pm(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Pm(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Pm(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return Zm.set(n,a),a}function $m(e){return Array.isArray(e)?e.map(e=>$m(e)).join(`,`):e==null?``:String(e)}var eh=Qm,th=Symbol(`none`),nh={value:th,index:-1};function rh(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:i,onSelectedValueChange:a,defaultInputValue:o,inputValue:s,open:c,defaultOpen:l=!1,selectionMode:u=`none`,onItemHighlighted:d,name:f,form:p,disabled:m=!1,readOnly:h=!1,required:g=!1,inputRef:_,grid:v=!1,items:y,filteredItems:b,filter:x,openOnInputClick:S=!0,autoHighlight:C=!1,keepHighlight:w=!1,highlightItemOnHover:T=!0,loopFocus:E=!0,itemToStringLabel:D,itemToStringValue:O,isItemEqualToValue:k=Em,virtualized:A=!1,inline:j=!1,fillInputOnItemPress:M=!0,modal:N=!1,limit:P=-1,autoComplete:F=`list`,formAutoComplete:I,locale:ee,submitOnItemClick:L=!1}=e,{clearErrors:te}=Gm(),{setDirty:R,validityData:z,shouldValidateOnChange:ne,setFilled:re,name:ie,disabled:B,setTouched:ae,setFocused:V,validationMode:oe,validation:se}=Hm(),H=Jm({id:t}),ce=eh({locale:ee}),[le,ue]=W.useState(!1),[de,fe]=W.useState(null),pe=W.useRef([]),me=W.useRef([]),he=W.useRef(null),ge=W.useRef(null),U=W.useRef(null),_e=W.useRef(null),ve=W.useRef(null),ye=W.useRef(!0),be=W.useRef(!1),xe=W.useRef(null),Se=W.useRef(null),Ce=W.useRef(null),we=W.useRef(nh),Te=W.useRef(null),Ee=W.useRef([]),De=W.useRef([]),G=B||m,Oe=ie??f,ke=u===`multiple`,K=u===`single`,Ae=s!==void 0||o!==void 0,je=y!==void 0,Me=b!==void 0,Ne;Ne=C===`always`?`always`:C?`input-change`:!1;let[Pe,Fe]=pl({controlled:i,default:ke?r??Vl:r,name:`Combobox`,state:`selectedValue`}),Ie=W.useMemo(()=>x===null?()=>!0:x===void 0?K&&!le?Xm(ce,D,Pe):Ym(ce,D):x,[x,K,Pe,le,ce,D]),Le=hl(()=>Ae?o??``:K?Pm(Pe,D):``).current,[Re,ze]=pl({controlled:s,default:Le,name:`Combobox`,state:`inputValue`}),[Be,Ve]=pl({controlled:c,default:l,name:`Combobox`,state:`open`}),He=Mm(y),Ue=de??(Re===``?``:String(Re).trim()),We=K?Pm(Pe,D):``,Ge=K&&!le&&Ue!==``&&We!==``&&We.length===Ue.length&&ce.contains(We,Ue),Ke=Ge?``:Ue,qe=je&&Me&&Ge,Je=W.useMemo(()=>y?He?y.flatMap(e=>e.items):y:Vl,[y,He]),Ye=W.useMemo(()=>{if(b&&!qe)return b;if(!y)return Vl;if(He){let e=y,t=[],n=0;for(let r of e){if(P>-1&&n>=P)break;let e=Ke===``?r.items:r.items.filter(e=>Ie(e,Ke,D));if(e.length===0)continue;let i=P>-1?P-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Ke===``)return P>-1?Je.slice(0,P):Je;let e=[];for(let t of Je){if(P>-1&&e.length>=P)break;Ie(t,Ke,D)&&e.push(t)}return e},[b,qe,y,He,Ke,P,Ie,D,Je]),Xe=W.useMemo(()=>He?Ye.flatMap(e=>e.items):Ye,[Ye,He]),Ze=hl(()=>new zp({id:H,labelId:void 0,selectedValue:Pe,open:Be,filter:Ie,query:Ue,items:y,selectionMode:u,listRef:pe,labelsRef:me,popupRef:he,emptyRef:ve,inputRef:ge,startDismissRef:U,endDismissRef:_e,keyboardActiveRef:ye,chipsContainerRef:xe,clearRef:Se,valuesRef:Ee,allValuesRef:De,selectionEventRef:Ce,name:Oe,form:p,disabled:G,readOnly:h,required:g,grid:v,isGrouped:He,virtualized:A,openOnInputClick:S,itemToStringLabel:D,isItemEqualToValue:k,modal:N,autoHighlight:Ne,submitOnItemClick:L,hasInputValue:Ae,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:j,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:n||Bl,setOpen:Bl,setInputValue:Bl,setSelectedValue:Bl,setIndices:Bl,onItemHighlighted:Bl,handleSelection:Bl,getItemProps:()=>Hl,forceMount:Bl,requestSubmit:Bl})).current,Qe=u===`none`?Re:Pe,$e=W.useMemo(()=>u===`none`?Qe:Array.isArray(Pe)?Pe.map(e=>Fm(e,O)):Fm(Pe,O),[Qe,O,u,Pe]),et=Y(d),tt=Y(n),nt=Q(Ze,$.activeIndex),rt=Q(Ze,$.selectedIndex),it=Q(Ze,$.positionerElement),at=Q(Ze,$.listElement),ot=Q(Ze,$.triggerElement),st=Q(Ze,$.inputElement),ct=Q(Ze,$.inputGroupElement),lt=Q(Ze,$.inline),ut=Q(Ze,$.inputInsidePopup),dt=Nf(ot),{mounted:ft,setMounted:pt,transitionStatus:mt}=Ku(Be),{openMethod:ht,triggerProps:gt}=am(Be),_t=Y(()=>$e);Um(ut?dt:ge,{id:H,value:Qe,getValue:_t});let vt=Y(()=>{y?me.current=Xe.map(e=>Pm(e,D)):Ze.set(`forceMounted`,!0)}),yt=W.useRef(Pe);X(()=>{Pe!==yt.current&&vt()},[vt,Pe]);let bt=Y(e=>{Ze.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)we.current!==nh&&(we.current=nh,et(void 0,Eu(t,void 0,{index:-1})));else{let n=Ee.current[e.activeIndex];we.current={value:n,index:e.activeIndex},et(n,Eu(t,void 0,{index:e.activeIndex}))}}),xt=Y((t,n)=>{if(be.current=n.reason===bu,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&ue(!0),Te.current={hasQuery:e},e&&Ne&&Ze.state.activeIndex==null&&Ze.set(`activeIndex`,0)}}ze(t)}}),St=Y((t,n)=>{if(Be!==t&&(n.reason===`escape-key`&&je&&Xe.length===0&&!Ze.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(!t&&le&&(K?(lt||fe(Ue),Ue===``&&ue(!1)):ke&&(lt||ut?bt({activeIndex:null}):fe(Ue),xt(``,Tu(bu,n.event)))),Ve(t),!t&&ut&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(ae(!0),V(!1),oe===`onBlur`)))){let e=u===`none`?Re:Pe;se.commit(e)}}),Ct=Y((e,t)=>{a?.(e,t),!t.isCanceled&&(Fe(e),(u===`none`&&he.current&&M||K&&!Ze.state.inputInsidePopup)&&xt(Pm(e,D),Tu(t.reason,t.event)),K&&e!=null&&t.reason!==`input-change`&&le&&!lt&&fe(Ue))}),wt=Y((e,t)=>{let n=t;if(n===void 0){if(nt===null)return;n=Ee.current[nt]}let r=xd(e),i=Ce.current??e;Ce.current=null;let a=Tu(gu,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&St(!1,a);return}if(ke){let e=Array.isArray(Pe)?Pe:[];if(Ct(Om(e,n,Ze.state.isItemEqualToValue)?Am(e,n,Ze.state.isItemEqualToValue):[...e,n],a),!(ge.current&&ge.current.value.trim()!==``))return;Ze.state.inputInsidePopup?xt(``,Tu(bu,a.event)):St(!1,a)}else Ct(n,a),St(!1,a)}),Tt=Y(()=>{if(!Ze.state.submitOnItemClick)return;let e=se.inputRef.current?.form??Ze.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),Et=Y(()=>{if(pt(!1),tt?.(!1),ue(!1),fe(null),bt(u===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),ke&&ge.current&&ge.current.value!==``&&!be.current&&xt(``,Tu(bu)),K)if(Ze.state.inputInsidePopup)ge.current&&ge.current.value!==``&&xt(``,Tu(bu));else{let e=Pm(Pe,D);ge.current&&ge.current.value!==e&&xt(e,Tu(e===``?bu:pu))}}),Dt=W.useMemo(()=>lt&&it?{current:it.closest(`[role="dialog"]`)}:he,[lt,it]);vf({enabled:!e.actionsRef,open:Be,ref:Dt,onComplete(){Be||Et()}}),W.useImperativeHandle(e.actionsRef,()=>({unmount:Et}),[Et]),X(function(){if(Be||u===`none`)return;let e=y?Je:De.current;if(ke){let t=Array.isArray(Pe)?Pe:[],n=t[t.length-1],r=km(e,n,k);bt({selectedIndex:r===-1?null:r})}else{let t=km(e,Pe,k);bt({selectedIndex:t===-1?null:t})}},[Be,Pe,y,u,Je,ke,k,bt]),X(()=>{y&&(Ee.current=Xe,pe.current.length=Xe.length)},[y,Xe]),X(()=>{let e=Te.current;if(e&&(e.hasQuery?Ne&&Ze.set(`activeIndex`,0):Ne===`always`&&Ze.set(`activeIndex`,0),Te.current=null),!Be&&!lt)return;let t=je||Me?Xe:Ee.current,n=Ze.state.activeIndex;if(n==null){if(Ne===`always`&&t.length>0){Ze.set(`activeIndex`,0);return}we.current!==nh&&(we.current=nh,Ze.state.onItemHighlighted(void 0,Eu(pu,void 0,{index:-1})));return}if(n>=t.length){we.current!==nh&&(we.current=nh,Ze.state.onItemHighlighted(void 0,Eu(pu,void 0,{index:-1}))),Ze.set(`activeIndex`,null);return}let r=t[n],i=we.current.value,a=i!==th&&Dm(r,i,Ze.state.isItemEqualToValue);(we.current.index!==n||!a)&&(we.current={value:r,index:n},Ze.state.onItemHighlighted(r,Eu(pu,void 0,{index:n})))},[nt,Ne,Me,je,Xe,lt,Be,Ze]),X(()=>{if(u===`none`){re(String(Re)!==``);return}re(ke?Array.isArray(Pe)&&Pe.length>0:Pe!=null)},[re,u,Re,Pe,ke]),W.useEffect(()=>{je&&Ne&&Xe.length===0&&bt({activeIndex:null})},[je,Ne,Xe.length,bt]),im(Ue,()=>{!Be||Ue===``||Ue===String(Le)||ue(!0)}),im(Pe,()=>{if(u!==`none`&&(te(Oe),R(Pe!==z.initialValue),ne()?se.commit(Pe):se.commit(Pe,!0),K&&!Ae&&!ut)){let e=Pm(Pe,D);Re!==e&&xt(e,Tu(pu))}}),im(Re,()=>{u===`none`&&(te(Oe),R(Re!==z.initialValue),ne()?se.commit(Re):se.commit(Re,!0))}),im(y,()=>{if(!K||Ae||ut||le)return;let e=Pm(Pe,D);Re!==e&&xt(e,Tu(pu))});let Ot=Wp({open:lt?!0:Be,onOpenChange:St,elements:{reference:ut?ot:st,floating:it}}),kt,At;lt||(kt=v?`grid`:`listbox`,At=Be?`true`:`false`);let{getReferenceProps:jt,getFloatingProps:Mt,getItemProps:Nt}=Kp([W.useMemo(()=>{let e=st?.tagName===`INPUT`,t=st==null||e,n=t||Be,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=At,r[`aria-haspopup`]=kt,r[`aria-controls`]=Be?at?.id:void 0,r[`aria-autocomplete`]=F),{reference:r,floating:{role:`presentation`}}},[st,Be,At,kt,at?.id,F]),Sp(Ot,{enabled:!h&&!G&&S,event:`mousedown-only`,toggle:!1,touchOpenDelay:ut?0:100,reason:xu}),Ep(Ot,{enabled:!h&&!G&&!lt,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:lt?!0:void 0,outsidePress(e){let t=xd(e);return!bd(ot,t)&&!bd(Se.current,t)&&!bd(xe.current,t)&&!bd(ct,t)}}),tm(Ot,{enabled:!h&&!G,id:H,listRef:pe,activeIndex:nt,selectedIndex:rt,virtual:!0,loopFocus:E,allowEscape:E&&!Ne,focusItemOnOpen:le||u===`none`&&!Ne?!1:`auto`,focusItemOnHover:T,resetOnPointerLeave:!w,cols:v?2:1,orientation:v?`horizontal`:void 0,disabledIndices:Vl,onNavigate(e,t){!t&&!Be||mt===`ending`||bt(t?{activeIndex:e,type:ye.current?`keyboard`:`pointer`}:{activeIndex:e})}})]);yf(()=>{Ze.update({inline:j,popupProps:Mt(),inputProps:jt(),triggerProps:gt,getItemProps:Nt,setOpen:St,setInputValue:xt,setSelectedValue:Ct,setIndices:bt,onItemHighlighted:et,handleSelection:wt,forceMount:vt,requestSubmit:Tt})}),X(()=>{Ze.update({id:H,selectedValue:Pe,open:Be,mounted:ft,transitionStatus:mt,items:y,inline:j,popupProps:Mt(),inputProps:jt(),triggerProps:gt,openMethod:ht,getItemProps:Nt,selectionMode:u,name:Oe,form:p,disabled:G,readOnly:h,required:g,grid:v,isGrouped:He,virtualized:A,onOpenChangeComplete:tt,openOnInputClick:S,itemToStringLabel:D,modal:N,autoHighlight:Ne,isItemEqualToValue:k,submitOnItemClick:L,hasInputValue:Ae,requestSubmit:Tt})},[Ze,H,Pe,Be,ft,mt,y,Mt,jt,Nt,ht,gt,u,Oe,G,h,g,se,v,He,A,tt,S,D,N,k,L,Ae,j,Tt,Ne,p]);let Pt=Al(_,se.inputRef),Ft=W.useMemo(()=>({query:Ue,hasItems:je,filteredItems:Ye,flatFilteredItems:Xe}),[Ue,je,Ye,Xe]),It=W.useMemo(()=>Array.isArray(Qe)?``:Fm(Qe,O),[Qe,O]),Lt=ke&&Array.isArray(Pe)&&Pe.length>0,Rt=ke||u===`none`?void 0:Oe,zt=W.useMemo(()=>!ke||!Array.isArray(Pe)||!Oe?null:Pe.map(e=>{let t=Fm(e,O);return(0,J.jsx)(`input`,{type:`hidden`,form:p,name:Oe,value:t},t)}),[ke,Pe,p,Oe,O]),Bt=(0,J.jsxs)(W.Fragment,{children:[e.children,(0,J.jsx)(`input`,{...se.getInputValidationProps({onFocus(){if(ut){ot?.focus();return}(ge.current||ot)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.currentTarget.value,n=Tu(pu,e.nativeEvent);function r(){if(ke)return;if(u===`none`){R(t!==z.initialValue),xt(t,n),ne()&&se.commit(t);return}let e=Ee.current.find(e=>Fm(e,O).toLowerCase()===t.toLowerCase()||Pm(e,D).toLowerCase()===t.toLowerCase());e!=null&&(R(e!==z.initialValue),Ct?.(e,n),ne()&&se.commit(e))}y?r():(vt(),queueMicrotask(r))}}),id:H&&Rt==null?`${H}-hidden-input`:void 0,form:p,name:Rt,autoComplete:I,disabled:G,required:g&&!Lt,readOnly:h,value:It,ref:Pt,style:Rt?Lf:If,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),zt]});return(0,J.jsx)(vm.Provider,{value:Ze,children:(0,J.jsx)(ym.Provider,{value:Ot,children:(0,J.jsx)(bm.Provider,{value:Ft,children:(0,J.jsx)(xm.Provider,{value:Re,children:Bt})})})})}var ih={...mm,...Bm,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null};function ah(e){let t=e.getBoundingClientRect(),n=P(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function oh(e,t){return e??t}var sh=2,ch=W.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=Hm(),{labelId:h}=qm(),g=Sm(),{filteredItems:_}=wm(),v=Q(g,$.selectionMode),y=Q(g,$.disabled),b=Q(g,$.readOnly),x=Q(g,$.required),S=Q(g,$.mounted),C=Q(g,$.popupSide),w=Q(g,$.positionerElement),T=Q(g,$.listElement),E=Q(g,$.triggerProps),D=Q(g,$.triggerElement),O=Q(g,$.inputInsidePopup),k=Q(g,$.id),A=Q(g,$.labelId),j=Q(g,$.open),M=Q(g,$.selectedValue),N=Q(g,$.activeIndex),P=Q(g,$.selectedIndex),F=Q(g,$.hasSelectedValue),I=Cm(),ee=Tm(),L=Sf(),te=u||y||a,R=_.length===0,z=S&&w?C:null;Jm({id:O?o:void 0});let ne=O?o??k:o,re=oh(h,A),ie=W.useRef(``);function B(e){ie.current=e.pointerType}let ae=I.useState(`domReferenceElement`);W.useEffect(()=>{O&&D&&D!==ae&&I.set(`domReferenceElement`,D)},[D,ae,I,O]);let{reference:V}=nm(I,{enabled:!j&&!b&&!y&&v===`single`,listRef:g.state.labelsRef,activeIndex:N,selectedIndex:P,onMatch(e){let t=g.state.valuesRef.current[e];t!==void 0&&g.state.setSelectedValue(t,Tu(`none`))}}),{reference:oe}=Sp(I,{enabled:!b&&!y,event:`mousedown`}),{buttonRef:se,getButtonProps:H}=Qu({native:i,disabled:te}),ce={...l,open:j,disabled:te,popupSide:z,listEmpty:R,placeholder:v===`none`?!1:!F};return su(`button`,e,{ref:[t,se,Y(e=>{g.set(`triggerElement`,e)})],state:ce,props:[E,oe,V,{id:ne,tabIndex:O?0:-1,role:O?`combobox`:void 0,"aria-expanded":j?`true`:`false`,"aria-haspopup":O?`dialog`:`listbox`,"aria-controls":j?T?.id:void 0,"aria-required":O&&x||void 0,"aria-labelledby":re,onPointerDown:B,onPointerEnter:B,onFocus(){f(!0),!(te||b)&&L.start(0,g.state.forceMount)},onBlur(e){if(!bd(w,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=v===`none`?ee:M;m.commit(e)}},onMouseDown(e){if(te||b||(O||I.set(`domReferenceElement`,e.currentTarget),g.state.forceMount(),ie.current!==`touch`&&(g.state.inputRef.current?.focus(),O||e.preventDefault()),j))return;let t=qd(e.currentTarget);function n(e){if(!D)return;let t=xd(e),n=g.state.positionerElement,r=g.state.listElement;if(bd(D,t)||bd(n,t)||bd(r,t)||t===D)return;let i=ah(D),a=e.clientX>=i.left-sh&&e.clientX<=i.right+sh,o=e.clientY>=i.top-sh&&e.clientY<=i.bottom+sh;a&&o||g.state.setOpen(!1,Tu(`cancel-open`,e))}O&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){te||b||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(kd(e),g.state.setOpen(!0,Tu(wu,e.nativeEvent)),g.state.inputRef.current?.focus())}},m?m.getValidationProps(c):c,H],stateAttributesMapping:ih})}),lh=W.createContext(void 0);function uh(){return W.useContext(lh)}var dh=W.createContext(void 0);function fh(e){let t=W.useContext(dh);if(t===void 0&&!e)throw Error(kl(21));return t}var ph=W.forwardRef(function(e,t){let n=Sm(),{buttonRef:r,getButtonProps:i}=Qu({native:!1});return(0,J.jsx)(`span`,{ref:Al(t,r),...i({onClick:Y(e=>{n.state.setOpen(!1,Tu(_u,e.nativeEvent,e.currentTarget))})}),"aria-label":`Dismiss`,tabIndex:void 0,style:Lf})}),mh=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:l,setTouched:u,setFocused:d,validationMode:f,validation:p}=Hm(),{labelId:m}=qm(),h=uh(),g=!!fh(!0),_=Sm(),{filteredItems:v}=wm(),y=Tm(),b=Dl(),x=Q(_,$.required),S=Q(_,$.disabled),C=Q(_,$.readOnly),w=Q(_,$.name),T=Q(_,$.form),E=Q(_,$.selectionMode),D=Q(_,$.autoHighlight),O=Q(_,$.inputProps),k=Q(_,$.triggerProps),A=Q(_,$.open),j=Q(_,$.mounted),M=Q(_,$.selectedValue),N=Q(_,$.popupSide),P=Q(_,$.positionerElement),F=Q(_,$.id),I=Q(_,$.inline),ee=Q(_,$.modal),L=!!D,te=j&&P?N:null,R=l||S||i,z=v.length===0,ne=g||I,re=!ne||ee,ie=Mu(a??(ne?void 0:F)),B=oh(m,void 0),ae=g?Rm:c,[V,oe]=W.useState(null),se=W.useRef(!1),H=W.useRef(null),ce=W.useRef(!1),le=Y(e=>{let t=g||_.state.inline;t&&!_.state.hasInputValue&&_.state.setInputValue(``,Tu(pu)),_.update({inputElement:e,inputInsidePopup:t})}),ue=g||!p?s:p.getValidationProps(s),de={...ae,open:A,disabled:R,readOnly:C,popupSide:te,listEmpty:z};function fe(e){if(!h)return;let t,{highlightedChipIndex:n}=h,r=h.chipsRef.current.length;if(n!==void 0){if(e.key===`ArrowLeft`)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===`ArrowRight`)e.preventDefault(),t=n=M.length-1?M.length-2:n;t=r>=0?r:void 0,_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===`ArrowLeft`&&(e.currentTarget.selectionStart??0)===0&&M.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&M.length>0&&(_.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let pe=su(`input`,e,{state:de,ref:[t,_.state.inputRef,le],props:[O,k,{type:`text`,value:e.value??V??y,"aria-readonly":C||void 0,"aria-required":x||void 0,"aria-labelledby":B,disabled:R,readOnly:C,required:E===`none`?x:void 0,form:T,...E===`none`&&w&&{name:w},id:ie,onFocus(){if(d(!0),!I||!ce.current)return;ce.current=!1;let e=H.current;e==null||!Object.hasOwn(_.state.valuesRef.current,e)||_.state.setIndices({activeIndex:e})},onBlur(){u(!0),d(!1);let e=_.state.activeIndex;if(I&&e!==null&&D!==`always`&&(H.current=e,ce.current=!0,_.state.setIndices({activeIndex:null})),f===`onBlur`){let e=E===`none`?y:M;p.commit(e)}},onCompositionStart(e){ld||(se.current=!0,oe(e.currentTarget.value))},onCompositionEnd(e){se.current=!1;let t=e.currentTarget.value;oe(null),_.state.setInputValue(t,Tu(yu,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=se.current||!n;if(se.current){let t=e.currentTarget.value;oe(t),t===``&&!_.state.openOnInputClick&&!_.state.inputInsidePopup&&_.state.setOpen(!1,Tu(bu,e.nativeEvent));let n=t.trim(),i=L&&n!==``;!C&&!R&&n&&r&&(_.state.setOpen(!0,Tu(yu,e.nativeEvent)),L||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),A&&_.state.activeIndex!==null&&!i&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}_.state.setInputValue(e.currentTarget.value,Tu(yu,e.nativeEvent));let i=e.currentTarget.value===``,a=Tu(bu,e.nativeEvent);i&&!_.state.inputInsidePopup&&(E===`single`&&_.state.setSelectedValue(null,a),_.state.openOnInputClick||_.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!C&&!R&&o&&r&&(_.state.setOpen(!0,Tu(yu,e.nativeEvent)),L||_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})),A&&_.state.activeIndex!==null&&!L&&_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(R||C||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;_.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=b===`rtl`;if(e.key===`Home`){kd(e);let n=sd&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){kd(e);let i=sd&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!j&&e.key===`Escape`){let t=E===`multiple`&&Array.isArray(M)?M.length===0:M===null,n=Tu(Cu,e.nativeEvent),r=E===`multiple`?[]:null;_.state.setInputValue(``,n),_.state.setSelectedValue(r,n),!t&&!_.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(h&&e.key===`Backspace`&&t.value===``&&h.highlightedChipIndex===void 0&&Array.isArray(M)&&M.length>0){let t=h.chipsRef.current.length,n=t>0?t-1:M.length-1,r=M.filter((e,t)=>t!==n);_.state.setIndices({activeIndex:null,selectedIndex:null,type:_.state.keyboardActiveRef.current?`keyboard`:`pointer`}),_.state.setSelectedValue(r,Tu(pu,e.nativeEvent));return}let i=h?.highlightedChipIndex!==void 0,a=fe(e);if(h?.setHighlightedChipIndex(a),a===void 0?i&&_.state.inputRef.current?.focus():h?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&A){let t=_.state.activeIndex,n=e.nativeEvent;if(t===null){if(I)return;_.state.setOpen(!1,Tu(pu,n));return}kd(e);let r=_.state.listRef.current[t];r&&(_.state.selectionEventRef.current=n,r.click(),_.state.selectionEventRef.current=null)}},onPointerMove(){_.state.keyboardActiveRef.current=!1},onPointerDown(){_.state.keyboardActiveRef.current=!1}},ue],stateAttributesMapping:ih});return(0,J.jsxs)(W.Fragment,{children:[A&&re&&(0,J.jsx)(ph,{ref:_.state.startDismissRef}),pe]})}),hh={...Uu,...pm},gh=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=Hm(),u=Sm(),d=Q(u,$.selectionMode),f=Q(u,$.disabled),p=Q(u,$.readOnly),m=Q(u,$.open),h=Q(u,$.selectedValue),g=Q(u,$.hasSelectionChips),_=Tm(),v=!1;v=d===`none`?_!==``:d===`single`?h!=null:g;let y=l||f||i,{buttonRef:b,getButtonProps:x}=Qu({native:a,disabled:y}),{mounted:S,transitionStatus:C,setMounted:w}=Ku(v),T={disabled:y,open:m,transitionStatus:C};vf({open:v,ref:u.state.clearRef,onComplete(){v||w(!1)}});let E=su(`button`,e,{state:T,ref:[t,b,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(y||p)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,Tu(vu,e.nativeEvent)),d===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(h)?[]:null,Tu(vu,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,x],stateAttributesMapping:hh});return o||S?E:null}),_h=W.createContext(null);function vh(){return W.useContext(_h)}function yh(e){let{children:t}=e,{filteredItems:n}=wm(),r=vh(),i=r?r.items:n;return i?(0,J.jsx)(W.Fragment,{children:i.map(t)}):null}var bh=W.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=Sm(),l=Cm(),u=!!fh(!0),{filteredItems:d,hasItems:f}=wm(),p=Q(c,$.selectionMode),m=Q(c,$.grid),h=Q(c,$.popupProps),g=Q(c,$.virtualized),_=p===`multiple`,v=d.length===0,y=Y(e=>{c.set(`positionerElement`,e)}),b=Y(e=>{c.set(`listElement`,e)}),x=W.useMemo(()=>typeof o==`function`?n||=(0,J.jsx)(yh,{children:o}):o,[o]),S={empty:v},C=l.useState(`floatingId`),w=su(`div`,e,{state:S,ref:[t,b,u?null:y],props:[h,{children:x,tabIndex:-1,id:C,role:m?`grid`:`listbox`,"aria-multiselectable":_?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;kd(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});return g?w:(0,J.jsx)(Sl,{elementsRef:c.state.listRef,labelsRef:f?void 0:c.state.labelsRef,children:w})}),xh=W.createContext(void 0);function Sh(){let e=W.useContext(xh);if(e===void 0)throw Error(kl(20));return e}var Ch=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Sm(),a=Q(i,$.mounted),o=Q(i,$.forceMounted);return a||n||o?(0,J.jsx)(xh.Provider,{value:n,children:(0,J.jsx)(sp,{ref:t,...r})}):null}),wh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=R(e,t)||{};if(l==null)return{};let f=E(u),p={x:n,y:r},m=C(i),h=w(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],D=d===`real`?await o.getOffsetParent?.(l):s.floating,O=s.floating[b]||a.floating[h];(!O||!await o.isElement?.(D))&&(O=s.floating[b]||a.floating[h]);let k=x/2-S/2,A=O/2-g[h]/2-1,j=Math.min(f[v],A),M=Math.min(f[y],A),N=j,P=O-g[h]-M,F=O/2-g[h]/2+k,I=T(N,F,P),ee=!c.arrow&&te(i)!=null&&F!==I&&a.reference[h]/2-(F({...wh(e),options:[e,t]}),Eh={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await H().fn(e)).data?.referenceHidden||a}}}},Dh={sideX:`left`,sideY:`top`};function Oh(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function kh(e,t,n){let{rects:r,placement:i}=e;return{side:Oh(t,_(i),n),align:te(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ah(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:x=!1,externalTree:S}=e,[C,w]=W.useState(null);!m&&C!==null&&w(null);let T=h.side||`flip`,E=h.align||`flip`,D=h.fallbackAxisSide||`end`,O=typeof t==`function`?t:void 0,k=Y(O),A=O?k:t,j=Nf(t),M=Nf(m),N=Dl()===`rtl`,L=C||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[r],R=a===`center`?L:`${L}-${a}`,z=c,ie=+(r===`bottom`),ae=+(r===`top`),V=+(r===`right`),oe=+(r===`left`);typeof z==`number`?z={top:z+ie,right:z+oe,bottom:z+ae,left:z+V}:z&&={top:(z.top||0)+ie,right:(z.right||0)+oe,bottom:(z.bottom||0)+ae,left:(z.left||0)+V};let se={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:z},H=W.useRef(null),ce=Nf(i),le=Nf(o),ue=[I(e=>{let t=kh(e,r,N),n=typeof ce.current==`function`?ce.current(t):ce.current,i=typeof le.current==`function`?le.current(t):le.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,N,r])],de=E===`none`&&T!==`shift`,fe=!de&&(l||g||T===`shift`),pe=T===`none`?null:ne({...se,padding:{top:z.top+1,right:z.right+1,bottom:z.bottom+1,left:z.left+1},mainAxis:!g&&T===`flip`,crossAxis:E===`flip`?`alignment`:!1,fallbackAxisSideDirection:D}),me=de?null:B(e=>{let t=qd(e.elements.floating).documentElement;return{...se,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:E!==`none`,crossAxis:fe,limiter:l||g?void 0:F(e=>{if(!H.current)return{};let{width:t,height:n}=H.current.getBoundingClientRect(),r=b(_(e.placement)),i=r===`y`?t:n,a=r===`y`?z.left+z.right:z.top+z.bottom;return{offset:i/2+a/2}})}},[se,l,g,z,E]);T===`shift`||E===`shift`||a===`center`?ue.push(me,pe):ue.push(pe,me),ue.push(re({...se,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=P(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Th(()=>({element:H.current||qd(H.current).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=_(a),l=b(c),u=H.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,v=Math.abs(n.shift?.y||0),y=o.reference.height/2,x=typeof i==`function`?i(kh(e,r,N)):i,S=v>x,C={top:`${h}px calc(100% + ${x}px)`,bottom:`${h}px ${-x}px`,left:`calc(100% + ${x}px) ${g}px`,right:`${-x}px ${g}px`}[c],w=`${h}px ${o.reference.y+y-s}px`;return t.floating.style.setProperty(`--transform-origin`,fe&&l===`y`&&S?w:C),{}}},Eh,y),X(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,p]);let he=W.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ge,elements:U,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=Gp({rootContext:p,open:f?m:void 0,placement:R,middleware:ue,strategy:n,whileElementsMounted:f?void 0:(...e)=>ee(...e,he),nodeId:v,externalTree:S}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||Dh,De=Ce?n:`fixed`,G=W.useMemo(()=>{let e=y?{position:De,[Te]:_e,[Ee]:ve}:{position:De,...we};return Ce||(e.opacity=0),e},[y,De,Te,_e,Ee,ve,we,Ce]),Oe=W.useRef(null);X(()=>{if(!m)return;let e=j.current,t=typeof e==`function`?e():e,n=(jh(t)?t.current:t)||null;n!==Oe.current&&(ge.setPositionReference(n),Oe.current=n)},[m,ge,A,j]),W.useEffect(()=>{if(!m)return;let e=j.current;typeof e!=`function`&&jh(e)&&e.current!==Oe.current&&(ge.setPositionReference(e.current),Oe.current=e.current)},[m,ge,A,j]),W.useEffect(()=>{if(f&&m&&U.domReference&&U.floating)return ee(U.domReference,U.floating,be,he)},[f,m,U,be,he]);let ke=_(xe),K=Oh(r,ke,N),Ae=te(xe)||`center`,je=!!ye.hide?.referenceHidden;X(()=>{x&&m&&Ce&&w(ke)},[x,m,Ce,ke]);let Me=W.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Ne=ye.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:G,arrowStyles:Me,arrowRef:H,arrowUncentered:Ne,side:K,align:Ae,physicalSide:ke,anchorHidden:je,refs:ge,context:Se,isPositioned:Ce,update:be}),[G,Me,H,Ne,K,Ae,ke,je,ge,Se,Ce,be])}function jh(e){return e!=null&&`current`in e}function Mh(e){return e===`starting`?ep:Hl}function Nh(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),su(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Mh(r),i],stateAttributesMapping:hm})}var Ph=20;function Fh(e,t,n,r){let[i,a]=W.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=qd(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Ph)},[e,t,n]),jf(e&&(!t||i),r)}var Ih=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=tp,style:g,..._}=e,v=Sm(),{filteredItems:y}=wm(),b=Cm(),x=Sh(),S=Q(v,$.modal),C=Q(v,$.open),w=Q(v,$.mounted),T=Q(v,$.openMethod),E=Q(v,$.positionerElement),D=Q(v,$.triggerElement),O=Q(v,$.inputElement),k=Q(v,$.inputGroupElement),A=Q(v,$.inputInsidePopup),j=Q(v,$.transitionStatus),M=y.length===0,N=Ah({anchor:i??(A?D:k??O),floatingRootContext:b,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:h,lazyFlip:!0});Fh(C&&S,T===`touch`,E,D);let P={open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:M};X(()=>{v.set(`popupSide`,N.side)},[v,N.side]);let F=Y(e=>{v.set(`positionerElement`,e)}),I=Nh(e,P,{styles:N.positionerStyles,transitionStatus:j,props:_,refs:[t,F],hidden:!w,inert:!C});return(0,J.jsxs)(dh.Provider,{value:N,children:[w&&S&&(0,J.jsx)(_m,{inert:gm(!C),cutout:k??O??D}),I]})}),Lh={...hm,...Uu},Rh=W.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Sm(),l=fh(),u=Cm(),{filteredItems:d}=wm(),f=Q(c,$.mounted),p=Q(c,$.open),m=Q(c,$.openMethod),h=Q(c,$.transitionStatus),g=Q(c,$.inputInsidePopup),_=Q(c,$.inputElement),v=Q(c,$.modal),y=d.length===0;vf({open:p,ref:c.state.popupRef,onComplete(){p&&c.state.onOpenChangeComplete(!0)}});let b=su(`div`,e,{state:{open:p,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:h,empty:y},ref:[t,c.state.popupRef],props:[{role:g?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=xd(e.nativeEvent);m!==`touch`&&(bd(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},Mh(h),s],stateAttributesMapping:Lh}),x=a===void 0?g?e=>e===`touch`?c.state.popupRef.current:_:!1:a,S;S=o??(g?void 0:!1);let C=!g||v;return(0,J.jsx)(xp,{context:u,disabled:!f,modal:C,openInteractionType:m,initialFocus:x,returnFocus:S,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,J.jsxs)(W.Fragment,{children:[b,C&&(0,J.jsx)(ph,{ref:c.state.endDismissRef})]})})}),zh=W.createContext(void 0);function Bh(){let e=W.useContext(zh);if(!e)throw Error(kl(19));return e}var Vh=W.createContext(!1);function Hh(){return W.useContext(Vh)}var Uh=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,value:i=null,index:a,disabled:o=!1,nativeButton:s=!1,style:c,...l}=e,u=W.useRef(!1),d=W.useRef(null),f=Ju({index:a,textRef:d,indexGuessBehavior:qu.GuessFromOrder}),p=Sm(),m=Hh(),{flatFilteredItems:h,hasItems:g}=wm(),_=Q(p,$.open),v=Q(p,$.selectionMode),y=Q(p,$.readOnly),b=Q(p,$.virtualized),x=Q(p,$.isItemEqualToValue),S=v!==`none`,C=a??(b?km(h,i,x):f.index),w=f.index!==-1,T=Q(p,$.id),E=Q(p,$.isActive,C),D=Q(p,$.isSelected,i),O=Q(p,$.getItemProps),k=W.useRef(null),A=T!=null&&w?`${T}-${C}`:void 0,j=D&&S;X(()=>{if(!(w&&(b||a!=null)))return;let e=p.state.listRef.current;return e[C]=k.current,()=>{delete e[C]}},[w,b,C,a,p]),X(()=>{if(!w||g)return;let e=p.state.valuesRef.current;return e[C]=i,v!==`none`&&p.state.allValuesRef.current.push(i),()=>{delete e[C]}},[w,g,C,i,p,v]),X(()=>{if(!_){u.current=!1;return}if(!w||g)return;let e=p.state.selectedValue;Dm(i,Array.isArray(e)?e[e.length-1]:e,x)&&p.set(`selectedIndex`,C)},[w,g,_,p,C,i,x]);let M={disabled:o,selected:j,highlighted:E},N=O({active:E,selected:j});N.id=void 0,N.onFocus=void 0;let{getButtonProps:P,buttonRef:F}=Qu({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function I(e){function t(){p.state.handleSelection(e,i)}p.state.submitOnItemClick?(Wu.flushSync(t),p.state.requestSubmit()):t()}let ee={id:A,role:m?`gridcell`:`option`,"aria-selected":S?j:void 0,tabIndex:void 0,onPointerDownCapture(e){u.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){o||y||I(e.nativeEvent)},onMouseUp(e){let t=u.current;u.current=!1,!(o||y||e.button!==0||t||!E)&&I(e.nativeEvent)}},L=su(`div`,e,{ref:[F,t,f.ref,k],state:M,props:[N,ee,l,P]}),te=W.useMemo(()=>({selected:j,textRef:d}),[j,d]);return(0,J.jsx)(zh.Provider,{value:te,children:L})}));function Wh(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,J.jsx)(rh,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Gh=W.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=Bh();return n||r?(0,J.jsx)(Kh,{...e,ref:t}):null}),Kh=W.memo(W.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=Bh(),c=W.useRef(null),{transitionStatus:l,setMounted:u}=Ku(s),d=su(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Uu});return vf({open:s,ref:c,onComplete(){s||u(!1)}}),d}));function qh(e){let t=(0,we.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=D(`group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30`,`h-9 min-w-0 has-[>textarea]:h-auto`,`has-[>[data-align=inline-start]]:[&>input]:pl-2`,`has-[>[data-align=inline-end]]:[&>input]:pr-2`,`has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3`,`has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3`,`has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50`,`has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Jh=x(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]`,"inline-end":`order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]`,"block-start":`order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3`,"block-end":`order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3`}},defaultVariants:{align:`inline-start`}});function Yh(e){let t=(0,we.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=D(Jh({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,J.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":a,className:o,onClick:Xh,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Xh(e){e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()}var Zh=x(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5`,sm:`h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5`,"icon-xs":`size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Qh(e){let t=(0,we.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:n,type:i,variant:a,size:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=i===void 0?`button`:i,c=a===void 0?`ghost`:a,l=o===void 0?`xs`:o,u;t[6]!==n||t[7]!==l?(u=D(Zh({size:l}),n),t[6]=n,t[7]=l,t[8]=u):u=t[8];let d;return t[9]!==r||t[10]!==l||t[11]!==u||t[12]!==s||t[13]!==c?(d=(0,J.jsx)(A,{type:s,"data-size":l,variant:c,className:u,...r}),t[9]=r,t[10]=l,t[11]=u,t[12]=s,t[13]=c,t[14]=d):d=t[14],d}function $h(e){let t=(0,we.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=D(`flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(f,{"data-slot":`input-group-control`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var eg=Wh;function tg(e){let n=(0,we.c)(11),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=D(`[&_svg:not([class*='size-'])]:size-4`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(t,{"data-slot":`combobox-trigger-icon`,className:`pointer-events-none size-4 text-muted-foreground`}),n[6]=s):s=n[6];let c;return n[7]!==r||n[8]!==a||n[9]!==o?(c=(0,J.jsxs)(ch,{"data-slot":`combobox-trigger`,className:o,...a,children:[r,s]}),n[7]=r,n[8]=a,n[9]=o,n[10]=c):c=n[10],c}function ng(e){let t=(0,we.c)(10),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(Qh,{variant:`ghost`,size:`icon-xs`}),t[3]=i):i=t[3];let a;t[4]===n?a=t[5]:(a=D(n),t[4]=n,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(y,{className:`pointer-events-none`}),t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==a?(s=(0,J.jsx)(gh,{"data-slot":`combobox-clear`,render:i,className:a,...r,children:o}),t[7]=r,t[8]=a,t[9]=s):s=t[9],s}function rg(e){let t=(0,we.c)(28),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:r,children:n,disabled:a,showTrigger:o,showClear:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?!1:a,l=o===void 0?!0:o,u=s===void 0?!1:s,d;t[7]===r?d=t[8]:(d=D(`w-auto`,r),t[7]=r,t[8]=d);let f;t[9]===c?f=t[10]:(f=(0,J.jsx)($h,{disabled:c}),t[9]=c,t[10]=f);let p;t[11]!==i||t[12]!==f?(p=(0,J.jsx)(mh,{render:f,...i}),t[11]=i,t[12]=f,t[13]=p):p=t[13];let m;t[14]!==c||t[15]!==l?(m=l&&(0,J.jsx)(Qh,{size:`icon-xs`,variant:`ghost`,asChild:!0,"data-slot":`input-group-button`,className:`group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent`,disabled:c,children:(0,J.jsx)(tg,{})}),t[14]=c,t[15]=l,t[16]=m):m=t[16];let h;t[17]!==c||t[18]!==u?(h=u&&(0,J.jsx)(ng,{disabled:c}),t[17]=c,t[18]=u,t[19]=h):h=t[19];let g;t[20]!==m||t[21]!==h?(g=(0,J.jsxs)(Yh,{align:`inline-end`,children:[m,h]}),t[20]=m,t[21]=h,t[22]=g):g=t[22];let _;return t[23]!==n||t[24]!==d||t[25]!==p||t[26]!==g?(_=(0,J.jsxs)(qh,{className:d,children:[p,g,n]}),t[23]=n,t[24]=d,t[25]=p,t[26]=g,t[27]=_):_=t[27],_}function ig(e){let t=(0,we.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,anchor:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`bottom`:a,u=o===void 0?6:o,d=s===void 0?`start`:s,f=c===void 0?0:c,p=!!n,m;t[8]===r?m=t[9]:(m=D(`group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[8]=r,t[9]=m);let h;t[10]!==i||t[11]!==p||t[12]!==m?(h=(0,J.jsx)(Rh,{"data-slot":`combobox-content`,"data-chips":p,className:m,...i}),t[10]=i,t[11]=p,t[12]=m,t[13]=h):h=t[13];let g;return t[14]!==d||t[15]!==f||t[16]!==n||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,J.jsx)(Ch,{children:(0,J.jsx)(Ih,{side:l,sideOffset:u,align:d,alignOffset:f,anchor:n,className:`isolate z-50`,children:h})}),t[14]=d,t[15]=f,t[16]=n,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}function ag(e){let t=(0,we.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=D(`max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(bh,{"data-slot":`combobox-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function og(t){let n=(0,we.c)(11),r,i,a;n[0]===t?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=D(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(Gh,{"data-slot":`combobox-item-indicator`,render:(0,J.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,J.jsx)(e,{className:`pointer-events-none size-4 pointer-coarse:size-5`})}),n[6]=s):s=n[6];let c;return n[7]!==r||n[8]!==a||n[9]!==o?(c=(0,J.jsxs)(Uh,{"data-slot":`combobox-item`,className:o,...a,children:[r,s]}),n[7]=r,n[8]=a,n[9]=o,n[10]=c):c=n[10],c}var sg=[`npm`,`pnpm`,`yarn`,`bun`];function cg(t){let r=(0,we.c)(67),{options:i,baseUrl:u,className:d,onValueChange:f}=t,p=u===void 0?``:u,{selectedManager:m,setSelectedManager:h}=s(),[g,_]=(0,W.useState)(i[0]?.value||``),[v,y]=(0,W.useState)(``),b;r[0]===v?b=r[1]:(b=e=>e.label.toLowerCase().includes(v.toLowerCase())||e.value.toLowerCase().includes(v.toLowerCase()),r[0]=v,r[1]=b);let x=i.filter(b),C;if(r[2]!==i||r[3]!==g){let e;r[5]===g?e=r[6]:(e=e=>e.value===g,r[5]=g,r[6]=e),C=i.find(e),r[2]=i,r[3]=g,r[4]=C}else C=r[4];let w=C,T={bun:`bunx --bun shadcn@latest add ${p}/r/${w?.code}.json`,npm:`npx shadcn@latest add ${p}/r/${w?.code}.json`,pnpm:`pnpm dlx shadcn@latest add ${p}/r/${w?.code}.json`,yarn:`yarn dlx shadcn@latest add ${p}/r/${w?.code}.json`},E=sg.filter(e=>T[e]),O=T[m]??``,{highlightedCode:k}=a(O,`bash`),{copy:j}=o(),[M,N]=(0,W.useState)(!1),P,F;r[7]===M?(P=r[8],F=r[9]):(P=()=>{if(M){let e=setTimeout(()=>{N(!1)},2e3);return()=>clearTimeout(e)}},F=[M],r[7]=M,r[8]=P,r[9]=F),(0,W.useEffect)(P,F);let I=async()=>{await j(O),S.success(`${m} command copied to clipboard!`),N(!0)},ee;r[10]===d?ee=r[11]:(ee=D(`group/package-manager relative min-w-0 rounded-lg border`,d),r[10]=d,r[11]=ee);let L;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsx)(c,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),r[12]=L):L=r[12];let te=l,R;r[13]===h?R=r[14]:(R=e=>h(e),r[13]=h,r[14]=R);let z=E.map(ug),ne;r[15]!==te||r[16]!==m||r[17]!==R||r[18]!==z?(ne=(0,J.jsx)(`div`,{children:(0,J.jsx)(te,{value:m,onChange:R,tabs:z,tabsClassName:`p-1 bg-primary/10 shrink-0`,activeTabClassName:`text-primary-foreground`,indicatorClassName:`bg-primary`,tabClassName:`px-2 py-1 text-xs font-medium `})}),r[15]=te,r[16]=m,r[17]=R,r[18]=z,r[19]=ne):ne=r[19];let re;r[20]!==ne||r[21]!==L?(re=(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[L,ne]}),r[20]=ne,r[21]=L,r[22]=re):re=r[22];let ie=eg,B;r[23]===f?B=r[24]:(B=e=>{e&&(_(e),f?.(e))},r[23]=f,r[24]=B);let ae;r[25]!==i||r[26]!==g?(ae=i.find(e=>e.value===g)?.label||`Select option...`,r[25]=i,r[26]=g,r[27]=ae):ae=r[27];let V;r[28]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>y(e.target.value),r[28]=V):V=r[28];let oe;r[29]!==v||r[30]!==ae?(oe=(0,J.jsx)(rg,{placeholder:ae,value:v,onChange:V,showTrigger:!0,showClear:!1,className:`h-8 max-w-42 min-w-0`}),r[29]=v,r[30]=ae,r[31]=oe):oe=r[31];let se=ig,H=ag,ce=x.map(lg),le;r[32]!==H||r[33]!==ce?(le=(0,J.jsx)(H,{children:ce}),r[32]=H,r[33]=ce,r[34]=le):le=r[34];let ue;r[35]!==se||r[36]!==le?(ue=(0,J.jsx)(se,{children:le}),r[35]=se,r[36]=le,r[37]=ue):ue=r[37];let de;r[38]!==ie||r[39]!==g||r[40]!==B||r[41]!==oe||r[42]!==ue?(de=(0,J.jsxs)(ie,{value:g,onValueChange:B,children:[oe,ue]}),r[38]=ie,r[39]=g,r[40]=B,r[41]=oe,r[42]=ue,r[43]=de):de=r[43];let fe=M?`opacity-100`:`pointer-events-none opacity-0`,pe;r[44]===fe?pe=r[45]:(pe=D(`text-xs text-green-500 transition-opacity duration-200`,fe),r[44]=fe,r[45]=pe);let me;r[46]===pe?me=r[47]:(me=(0,J.jsx)(`span`,{className:pe,children:`Copied`}),r[46]=pe,r[47]=me);let he;r[48]===M?he=r[49]:(he=M?(0,J.jsx)(e,{className:`size-4`}):(0,J.jsx)(n,{className:`size-4`}),r[48]=M,r[49]=he);let ge;r[50]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,J.jsx)(`span`,{className:`sr-only`,children:`Copy`}),r[50]=ge):ge=r[50];let U;r[51]!==I||r[52]!==he?(U=(0,J.jsxs)(A,{variant:`ghost`,size:`icon`,onClick:I,className:`transition-opacity hover:opacity-100`,children:[he,ge]}),r[51]=I,r[52]=he,r[53]=U):U=r[53];let _e;r[54]!==me||r[55]!==U?(_e=(0,J.jsxs)(`div`,{className:`flex w-22 items-center justify-end gap-1`,children:[me,U]}),r[54]=me,r[55]=U,r[56]=_e):_e=r[56];let ve;r[57]!==re||r[58]!==de||r[59]!==_e?(ve=(0,J.jsxs)(`div`,{className:`flex items-center justify-between border-b bg-muted/50 px-3 py-2`,children:[re,de,_e]}),r[57]=re,r[58]=de,r[59]=_e,r[60]=ve):ve=r[60];let ye;r[61]===k?ye=r[62]:(ye=(0,J.jsx)(`div`,{className:`max-w-full min-w-0 overflow-x-auto p-3`,children:(0,J.jsx)(`pre`,{className:`m-0! w-full min-w-0 rounded-none! bg-transparent! font-mono! text-sm leading-relaxed`,children:(0,J.jsx)(`code`,{className:`pr-6`,"data-language":`bash`,suppressHydrationWarning:!0,children:(0,J.jsx)(`span`,{dangerouslySetInnerHTML:{__html:k}})})})}),r[61]=k,r[62]=ye);let be;return r[63]!==ve||r[64]!==ye||r[65]!==ee?(be=(0,J.jsxs)(`div`,{className:ee,children:[ve,ye]}),r[63]=ve,r[64]=ye,r[65]=ee,r[66]=be):be=r[66],be}function lg(e){return(0,J.jsx)(og,{value:e.value,children:e.label},e.value)}function ug(e){return{id:e,label:e}}ja.registerPlugin(nl);function dg(e){let t=(0,we.c)(28),{animations:n,categories:r}=e,{url:i}=se().props,[a,o]=(0,W.useState)(n[0]?.name??`animate-bounce`),s;t[0]===n?s=t[1]:(s=n.map(pg),t[0]=n,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(V,{as:`h1`,title:`Animate.css Animations`,description:`Click any animation card to view and copy the code. 100+ + CSS-based animations available.`}),t[2]=l):l=t[2];let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(V,{as:`h2`,title:`About`,description:`is a library of CSS animations that you can use directly in + your components. Simply add the animation class name to any + element to animate it.`}),t[3]=d):d=t[3];let f,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,J.jsxs)(`ul`,{className:`mb-6 list-disc pl-6 text-muted-foreground`,children:[(0,J.jsx)(`li`,{children:`100+ built-in animation types`}),(0,J.jsx)(`li`,{children:`Simple CSS class-based animations`}),(0,J.jsx)(`li`,{children:`Works with any HTML element`}),(0,J.jsx)(`li`,{children:`Fully customizable duration and timing`}),(0,J.jsx)(`li`,{children:`Repeat and loop support`}),(0,J.jsx)(`li`,{children:`Works with Tailwind CSS`})]}),p=(0,J.jsx)(`h2`,{className:`mt-8 mb-2 text-2xl font-semibold text-foreground`,children:`Installation`}),t[4]=f,t[5]=p):(f=t[4],p=t[5]);let m=i,h;t[6]!==c||t[7]!==m?(h=(0,J.jsx)(cg,{className:`my-4`,options:c,baseUrl:m,onValueChange:o}),t[6]=c,t[7]=m,t[8]=h):h=t[8];let g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,J.jsx)(`h2`,{className:`mt-8 mb-4 text-2xl font-semibold text-foreground`,children:`Usage`}),t[9]=g):g=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`h3`,{className:`mb-2 text-lg font-medium text-foreground`,children:`Basic Usage`}),t[10]=_):_=t[10];let v=`
+ Bouncing Content +
`,y;t[11]===v?y=t[12]:(y=(0,J.jsx)(`div`,{className:`space-y-4`,children:(0,J.jsxs)(`div`,{children:[_,(0,J.jsx)(fl,{language:`html`,code:v})]})}),t[11]=v,t[12]=y);let b,x,S,C;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,J.jsx)(`h2`,{className:`mt-8 mb-2 text-2xl font-semibold text-foreground`,children:`Installation all animations`}),x=(0,J.jsx)(u,{code:`animate-css/animate-all`}),S=(0,J.jsx)(`h2`,{className:`mt-8 mb-4 text-2xl font-semibold text-foreground`,children:`Code Examples`}),C=(0,J.jsx)(`p`,{className:`text-balance text-muted-foreground`,children:`Click on any animation card below to view and copy the code.`}),t[13]=b,t[14]=x,t[15]=S,t[16]=C):(b=t[13],x=t[14],S=t[15],C=t[16]);let w;t[17]!==y||t[18]!==h?(w=(0,J.jsxs)(`div`,{className:`mb-12`,children:[d,f,p,h,g,y,b,x,S,C]}),t[17]=y,t[18]=h,t[19]=w):w=t[19];let T;if(t[20]!==n||t[21]!==r){let e;t[23]===n?e=t[24]:(e=e=>(0,J.jsxs)(`section`,{className:`mb-12`,children:[(0,J.jsx)(`h2`,{className:`mb-6 text-2xl font-semibold text-foreground`,children:e}),(0,J.jsx)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:n.filter(t=>t.category===e&&t.name!==`animate-all`).map(fg)})]},e),t[23]=n,t[24]=e),T=r.map(e),t[20]=n,t[21]=r,t[22]=T}else T=t[22];let E;return t[25]!==w||t[26]!==T?(E=(0,J.jsxs)(xe,{className:`pt-4`,children:[l,w,T]}),t[25]=w,t[26]=T,t[27]=E):E=t[27],E}function fg(e){return(0,J.jsx)(mg,{anim:e},e.name)}function pg(e){return{value:e.name,label:e.text,code:`animate-css/`+e.name}}dg.layout=i;function mg(e){let t=(0,we.c)(45),{anim:n}=e,i=`
`,a=` ${n.text}`,s;t[0]!==i||t[1]!==a?(s=[i,a,`
`],t[0]=i,t[1]=a,t[2]=s):s=t[2];let c=s.join(` +`),l=(0,W.useRef)(null),d=(0,W.useRef)(null),{copy:f}=o(),p,m;t[3]===n.name?(p=t[4],m=t[5]):(p=()=>{d.current&&l.current&&nl.create({trigger:l.current,start:`top 80%`,end:`bottom 20%`,onEnter:()=>d.current?.classList.add(n.name),onLeave:()=>d.current?.classList.remove(n.name),onEnterBack:()=>d.current?.classList.add(n.name),onLeaveBack:()=>d.current?.classList.remove(n.name),markers:!1})},m=[n.name],t[3]=n.name,t[4]=p,t[5]=m),La(p,m);let h;t[6]===n.title?h=t[7]:(h=(0,J.jsx)(fe,{children:(0,J.jsx)(me,{className:`flex items-baseline justify-between overflow-clip capitalize`,children:(0,J.jsx)(`span`,{children:n.title})})}),t[6]=n.title,t[7]=h);let g;t[8]===n.text?g=t[9]:(g=(0,J.jsx)(pe,{className:`aspect-video overflow-hidden`,children:(0,J.jsx)(`div`,{className:`grid aspect-video max-w-full place-items-center overflow-clip rounded-md bg-radial from-muted to-muted/50 text-center font-bebas-neue! text-sm text-[clamp(1.5rem,10vw+2rem,3rem)] font-medium text-foreground/40 transition-all delay-300 group-hover:repeat-infinite!`,children:(0,J.jsx)(`div`,{ref:d,children:n.text})})}),t[8]=n.text,t[9]=g);let _;t[10]!==h||t[11]!==g?(_=(0,J.jsx)(ge,{asChild:!0,children:(0,J.jsxs)(he,{ref:l,className:`group cursor-pointer transition-colors hover:bg-muted/50`,children:[h,g]})}),t[10]=h,t[11]=g,t[12]=_):_=t[12];let v;t[13]===n.name?v=t[14]:(v=n.name.replace(`animate-`,``),t[13]=n.name,t[14]=v);let y;t[15]===v?y=t[16]:(y=(0,J.jsx)(ye,{className:`capitalize`,children:v}),t[15]=v,t[16]=y);let b;t[17]===n.category?b=t[18]:(b=(0,J.jsxs)(U,{children:[`Animation type: `,n.category]}),t[17]=n.category,t[18]=b);let x;t[19]!==y||t[20]!==b?(x=(0,J.jsxs)(_e,{children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S=`grid aspect-video w-full place-items-center text-center font-bebas-neue text-[clamp(0.75rem,9vw+2rem,5rem)] font-medium delay-1000 ${n.name} repeat-infinite`,C;t[22]!==n.text||t[23]!==S?(C=(0,J.jsx)(`div`,{className:S,children:n.text}),t[22]=n.text,t[23]=S,t[24]=C):C=t[24];let w;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,J.jsx)(A,{variant:`ghost`,size:`icon`,children:(0,J.jsx)(Ce,{className:`size-4`})}),t[25]=w):w=t[25];let T;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,J.jsx)(A,{variant:`ghost`,size:`icon`,children:(0,J.jsx)(r,{className:`size-4`})}),t[26]=T):T=t[26];let E;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,J.jsx)(`div`,{className:`absolute inset-y-0 right-0 border-l border-border/25 bg-background/10 backdrop-blur-sm`,children:(0,J.jsxs)(`div`,{className:`sticky top-0 flex shrink-0 flex-col items-center justify-start space-y-4 p-4`,children:[w,T,(0,J.jsx)(A,{variant:`ghost`,size:`icon`,children:(0,J.jsx)(Se,{className:`size-4`})})]})}),t[27]=E):E=t[27];let D;t[28]===C?D=t[29]:(D=(0,J.jsx)(`div`,{className:`flex items-start rounded-md border border-border bg-card/30`,children:(0,J.jsxs)(`div`,{className:`relative flex-1 overflow-hidden rounded-md bg-radial from-muted to-muted/50 py-8`,children:[C,E]})}),t[28]=C,t[29]=D);let O=`animate-css/${n.name}`,k;t[30]===O?k=t[31]:(k=(0,J.jsx)(u,{code:O}),t[30]=O,t[31]=k);let j;t[32]===c?j=t[33]:(j=(0,J.jsx)(fl,{variant:`default`,language:`html`,code:c,showCopyButton:!0}),t[32]=c,t[33]=j);let M;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,J.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none sticky inset-x-0 -bottom-8 h-20 bg-linear-0 from-background to-transparent`}),t[34]=M):M=t[34];let N;t[35]!==D||t[36]!==k||t[37]!==j?(N=(0,J.jsxs)(`div`,{className:`no-scrollbar relative -mx-4 max-h-[60vh] [scrollbar-width:none] space-y-4 overflow-y-auto px-4 pt-1 pb-4 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,children:[D,k,j,M]}),t[35]=D,t[36]=k,t[37]=j,t[38]=N):N=t[38];let P;t[39]!==x||t[40]!==N?(P=(0,J.jsxs)(ve,{className:`max-h-[80vh] w-full sm:max-w-3xl`,children:[x,N]}),t[39]=x,t[40]=N,t[41]=P):P=t[41];let F;return t[42]!==P||t[43]!==_?(F=(0,J.jsxs)(be,{children:[_,P]}),t[42]=P,t[43]=_,t[44]=F):F=t[44],F}export{dg as default}; \ No newline at end of file diff --git a/public/build/assets/app-D7MKN1zp.js b/public/build/assets/app-D7MKN1zp.js new file mode 100644 index 0000000..125c3cf --- /dev/null +++ b/public/build/assets/app-D7MKN1zp.js @@ -0,0 +1,142 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/animate-css-BwrG5zYQ.js","assets/main-layout-qej9zSi0.js","assets/check-BBvDdM_9.js","assets/github-Be9qoVk0.js","assets/sun-r0X8DC4y.js","assets/placeholder-pattern-DUvj6lOE.js","assets/glow-stack-BaNii-nE.js","assets/main-registry-installer-_-xwUN0S.js","assets/copy-HrVumo6t.js","assets/chevron-down-DuPWSveW.js","assets/heart-BDAPM7f6.js","assets/card-C1ekp7Ou.js","assets/dialog-CM260op0.js","assets/confirm-password-BNeZIAHY.js","assets/label-fRwP89Ez.js","assets/password-input-__9RhIwi.js","assets/input-error-CzZYqI_U.js","assets/spinner-CCI0ZpZ9.js","assets/loader-circle-YfjFJaoY.js","assets/confirm-tDhmficG.js","assets/forgot-password-B5S_AFXd.js","assets/text-link-BlYfkXNw.js","assets/password-BDtte38w.js","assets/login-00JrbYrx.js","assets/dist-D5bK512v.js","assets/socialite-BBNBBxaD.js","assets/register-DjsSoOdi.js","assets/reset-password-CoN8fAaC.js","assets/two-factor-challenge-Miwtb12I.js","assets/use-two-factor-auth-Bdh-sKJ3.js","assets/verify-email-D806-GRE.js","assets/verification-D4buixpo.js","assets/dashboard-oAHwTN2S.js","assets/fonts-CaQ0upX0.js","assets/select-DsMxFFiu.js","assets/badge-D9nNMnEq.js","assets/home-C3JgkfjT.js","assets/popover-B2UUPq8p.js","assets/color-utils-DTvyGxAC.js","assets/plus-D1KRmSaN.js","assets/glow-radial-CIe4ekoG.js","assets/pricing-BiBh6JwN.js","assets/subscription-C-u-O6PN.js","assets/appearance-8Z1L6Aly.js","assets/appearance-tabs-BOBvnqrB.js","assets/profile-CQF7e4MZ.js","assets/security-BxjNuG8g.js","assets/use-clipboard-BvQkhUu9.js","assets/subscription-DJjwwh89.js","assets/create-BmSt6sO8.js","assets/tabs-CNNfAj8l.js","assets/main-theme-card-B0GTBBPN.js","assets/themes-dmvzolUC.js","assets/show-D6Z2FFsL.js"])))=>i.map(i=>d[i]); +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);function f(e){return typeof e==`symbol`||e instanceof Symbol}var p=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function m(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function h(){}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v(e){if(g(e))return e;if(Array.isArray(e)||_(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function y(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function b(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var x=`[object RegExp]`,S=`[object String]`,C=`[object Number]`,w=`[object Boolean]`,T=`[object Arguments]`,E=`[object Symbol]`,ee=`[object Date]`,D=`[object Map]`,O=`[object Set]`,k=`[object Array]`,te=`[object Function]`,A=`[object ArrayBuffer]`,j=`[object Object]`,M=`[object Error]`,N=`[object DataView]`,P=`[object Uint8Array]`,ne=`[object Uint8ClampedArray]`,re=`[object Uint16Array]`,F=`[object Uint32Array]`,I=`[object BigUint64Array]`,L=`[object Int8Array]`,ie=`[object Int16Array]`,ae=`[object Int32Array]`,oe=`[object BigInt64Array]`,R=`[object Float32Array]`,se=`[object Float64Array]`;function ce(e){return p.Buffer!==void 0&&p.Buffer.isBuffer(e)}function le(e,t){return ue(e,void 0,e,new Map,t)}function ue(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;aye(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case k:case P:case ne:case re:case F:case I:case L:case ie:case ae:case oe:case R:case se:if(ce(e)!==ce(t)||e.length!==t.length)return!1;for(let i=0;i=0}var Ce={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function we(e){return e.replace(/[&<>"']/g,e=>Ce[e])}function Te(e){return e!=null&&typeof e!=`function`&&Se(e.length)}function Ee(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function De(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function Oe(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(Oe).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function ke(e){if(Array.isArray(e))return e.map(De);if(typeof e==`symbol`)return[e];e=Oe(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(b(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),de(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case C:case S:case w:{let t=new e.constructor(e?.valueOf());return de(t,e),t}case T:{let t={};return de(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Pe(e){return Ne(e)}var Fe=/^(?:0|[1-9]\d*)$/;function Ie(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e{let r=e[t];(!(Object.hasOwn(e,t)&&_e(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function Ge(e,t,n,r){if(e==null&&!Me(e))return e;let i;i=Ue(t,e)?[t]:Array.isArray(t)?t:ke(t);let a=n(Ae(e,i)),o=e;for(let t=0;tn,()=>void 0)}function qe(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=m(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Je(e){return _(e)}function Ye(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;etypeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0,et=e=>e instanceof FormData?!0:$e(e)||typeof e==`object`&&!!e&&Object.values(e).some(e=>et(e)),tt=class extends Error{response;constructor(e){super(`HTTP error ${e.status}`),this.name=`HttpResponseError`,this.response=e}},nt=class extends Error{constructor(e=`Request was cancelled`){super(e),this.name=`HttpCancelledError`}},rt=class extends Error{constructor(e=`Network error`){super(e),this.name=`HttpNetworkError`}};function it(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):typeof n==`object`?t.append(e,JSON.stringify(n)):t.append(e,String(n)))}),t.toString()}function at(e,t,n){if(t&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=t.replace(/\/$/,``)+`/`+e.replace(/^\//,``)),n&&Object.keys(n).length>0){let t=it(n);t&&(e+=(e.includes(`?`)?`&`:`?`)+t)}return e}function ot(){return typeof window>`u`?null:window.axios?.defaults?.headers?.common?.[`X-Requested-With`]??null}function st(e,t=new FormData,n=null){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&ct(t,n?`${n}[${r}]`:r,e[r]);return t}function ct(e,t,n){if(Array.isArray(n))return n.forEach((n,r)=>ct(e,`${t}[${r}]`,n));if(n instanceof Date)return e.append(t,n.toISOString());if(typeof File<`u`&&n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);st(n,e,t)}function lt(e,t){if(e!=null)return e instanceof FormData?e:typeof e==`object`&&et(e)?st(e):typeof e==`object`||t[`Content-Type`]?.includes(`application/json`)?JSON.stringify(e):String(e)}function ut(e){let t={};return e.forEach((e,n)=>{t[n.toLowerCase()]=e}),t}function dt(e={}){let t=e.xsrfCookieName??`XSRF-TOKEN`,n=e.xsrfHeaderName??`X-XSRF-TOKEN`;function r(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(^|;\\s*)`+t+`=([^;]*)`));return e?decodeURIComponent(e[2]):null}return{setXsrfCookieName(e){t=e},setXsrfHeaderName(e){n=e},async request(e){let t=at(e.url,e.baseURL,e.params),i=e.method.toUpperCase(),a={},o=ot();o&&(a[`X-Requested-With`]=o),e.data!==void 0&&![`GET`,`DELETE`].includes(i)&&!(e.data instanceof FormData)&&!et(e.data)&&(a[`Content-Type`]=`application/json`),e.headers&&Object.entries(e.headers).forEach(([e,t])=>{t!==void 0&&(a[e]=String(t))});let s=r();s&&![`GET`,`HEAD`,`OPTIONS`].includes(i)&&(a[n]=s);let c=e.signal,l,u=e.timeout??3e4;if(u>0&&!c){let e=new AbortController;c=e.signal,l=setTimeout(()=>e.abort(),u)}let d=[`GET`,`DELETE`].includes(i)?void 0:lt(e.data,a);d instanceof FormData&&delete a[`Content-Type`];try{let n=await fetch(t,{method:i,headers:a,body:d,signal:c,credentials:e.credentials??`same-origin`});l&&clearTimeout(l);let r;r=n.headers.get(`content-type`)?.includes(`application/json`)?await n.json():await n.text();let o={status:n.status,data:r,headers:ut(n.headers)};if(!n.ok)throw new tt(o);return o}catch(e){throw l&&clearTimeout(l),e instanceof tt?e:e instanceof DOMException&&e.name===`AbortError`?new nt:e instanceof TypeError?new rt(e.message):e}}}}var ft=dt(),pt=ft,mt=void 0,ht=void 0,gt=`same-origin`,_t=e=>`${e.method}:${e.baseURL??mt??``}${e.url}`,vt=e=>e.status===204&&e.headers[`precognition-success`]===`true`,yt={},bt={get:(e,t={},n={})=>St(xt(`get`,e,t,n)),post:(e,t={},n={})=>St(xt(`post`,e,t,n)),patch:(e,t={},n={})=>St(xt(`patch`,e,t,n)),put:(e,t={},n={})=>St(xt(`put`,e,t,n)),delete:(e,t={},n={})=>St(xt(`delete`,e,t,n)),useHttpClient(e){return pt=e,bt},withBaseURL(e){return mt=e,bt},withTimeout(e){return ht=e,bt},withCredentials(e){return gt=typeof e==`string`?e:e?`include`:`omit`,bt},fingerprintRequestsUsing(e){return _t=e===null?()=>null:e,bt},determineSuccessUsing(e){return vt=e,bt},withXsrfCookieName(e){return ft.setXsrfCookieName(e),bt},withXsrfHeaderName(e){return ft.setXsrfHeaderName(e),bt}},xt=(e,t,n,r)=>({url:t,method:e,...r,...[`get`,`delete`].includes(e)?{params:Ze({},n,r?.params)}:{data:Ze({},n,r?.data)}}),St=(e={})=>{let t=[Ct,Tt,Et].reduce((e,t)=>t(e),e);return(t.onBefore??(()=>!0))()===!1?Promise.resolve(null):((t.onStart??(()=>null))(),pt.request({method:t.method,url:t.url,baseURL:t.baseURL??mt,data:t.data,params:t.params,headers:t.headers,signal:t.signal,timeout:t.timeout,credentials:gt}).then(async e=>{t.precognitive&&Dt(e);let n=e.status,r=e;return t.precognitive&&t.onPrecognitionSuccess&&vt(e)&&(r=await Promise.resolve(t.onPrecognitionSuccess(e)??r)),t.onSuccess&&wt(n)&&(r=await Promise.resolve(t.onSuccess(r)??r)),(kt(t,n)??(e=>e))(r)??r},e=>{if(Ot(e))return Promise.reject(e);let n=e;return t.precognitive&&Dt(n.response),(kt(t,n.response.status)??((e,t)=>Promise.reject(t)))(n.response,n)}).finally(t.onFinish??(()=>null)))},Ct=e=>{let t=e.only??e.validate;return{...e,timeout:e.timeout??ht,precognitive:e.precognitive!==!1,fingerprint:e.fingerprint===void 0?_t(e,pt):e.fingerprint,headers:{...e.headers,Accept:`application/json`,"Content-Type":At(e),...e.precognitive===!1?{}:{Precognition:!0},...t?{"Precognition-Validate-Only":Array.from(t).join()}:{}}}},wt=e=>e>=200&&e<300,Tt=e=>typeof e.fingerprint==`string`?(yt[e.fingerprint]?.abort(),delete yt[e.fingerprint],e):e,Et=e=>typeof e.fingerprint!=`string`||e.signal||!e.precognitive?e:(yt[e.fingerprint]=new AbortController,{...e,signal:yt[e.fingerprint].signal}),Dt=e=>{if(e.headers?.precognition!==`true`)throw Error(`Did not receive a Precognition response. Ensure you have the Precognition middleware in place for the route.`)},Ot=e=>!(e instanceof tt)||typeof e.response?.status!=`number`,kt=(e,t)=>({401:e.onUnauthorized,403:e.onForbidden,404:e.onNotFound,409:e.onConflict,422:e.onValidationError,423:e.onLocked})[t],At=e=>e.headers?.[`Content-Type`]??e.headers?.[`Content-type`]??e.headers?.[`content-type`]??(et(e.data)?`multipart/form-data`:`application/json`),jt=(e,t)=>{if(!e.includes(`*`))return[e];let n=e.split(`.`),r=[``];for(let e of n)if(e===`*`){let e=[];for(let n of r){let r=n?Ae(t,n):t;if(Array.isArray(r))for(let t=0;tt?`${t}.${e}`:e);return r},Mt=(e,t)=>t.includes(`*`)?RegExp(`^`+t.replace(/\./g,`\\.`).replace(/\*/g,`[^.]+`)+`$`).test(e):e===t,Nt=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.some(t=>Mt(e,t)))),Pt=(e,t={})=>{let n={errorsChanged:[],touchedChanged:[],validatingChanged:[],validatedChanged:[]},r=!1,i=!1,a=e=>e===i?[]:(i=e,n.validatingChanged),o=[],s=e=>{let t=[...new Set(e)];return o.length!==t.length||!t.every(e=>o.includes(e))?(o=t,n.validatedChanged):[]},c=()=>o.filter(e=>d[e]===void 0),l=[],u=e=>{let t=[...new Set(e)];return l.length!==t.length||!t.every(e=>l.includes(e))?(l=t,n.touchedChanged):[]},d={},f=e=>{let t=It(e);return xe(d,t)?[]:(d=t,n.errorsChanged)},p=e=>{let t={...d};return delete t[Lt(e)],f(t)},m=()=>Object.keys(d).length>0,h=1500,g=e=>{h=e,S.cancel(),S=x()},_=t,v=null,y=[],b=null,x=()=>qe(t=>{e({get:(e,n={},r={})=>bt.get(e,T(n),C(r,t,n)),post:(e,n={},r={})=>bt.post(e,T(n),C(r,t,n)),patch:(e,n={},r={})=>bt.patch(e,T(n),C(r,t,n)),put:(e,n={},r={})=>bt.put(e,T(n),C(r,t,n)),delete:(e,n={},r={})=>bt.delete(e,T(n),C(r,t,n))}).catch(e=>e instanceof nt||e instanceof tt&&e.response?.status===422?null:Promise.reject(e))},h,{leading:!0,trailing:!0}),S=x(),C=(e,t,n={})=>{let r={...e,...t},i=Array.from(r.only??r.validate??l);return{...t,...Ze({},e,t),only:i,timeout:r.timeout??5e3,onValidationError:(e,t)=>([...s([...o,...i]),...f(Ze(Nt({...d},i),e.data.errors))].forEach(e=>e()),r.onValidationError?r.onValidationError(e,t):Promise.reject(t)),onSuccess:e=>(s([...o,...i]).forEach(e=>e()),r.onSuccess?r.onSuccess(e):e),onPrecognitionSuccess:e=>([...s([...o,...i]),...f(Nt({...d},i))].forEach(e=>e()),r.onPrecognitionSuccess?r.onPrecognitionSuccess(e):e),onBefore:()=>{let e=l.some(e=>e.includes(`*`)),t=e?[...new Set(l.flatMap(e=>jt(e,n)))]:l;return r.onBeforeValidation&&r.onBeforeValidation({data:n,touched:t},{data:_,touched:y})===!1||(r.onBefore||(()=>!0))()===!1?!1:(e&&u(t).forEach(e=>e()),b=l,v=n,!0)},onStart:()=>{a(!0).forEach(e=>e()),(r.onStart??(()=>null))()},onFinish:()=>{a(!1).forEach(e=>e()),y=b,_=v,b=v=null,(r.onFinish??(()=>null))()}}},w=(e,t,n)=>{if(e===void 0){let e=Array.from(n?.only??n?.validate??[]);u([...l,...e]).forEach(e=>e()),S(n??{});return}if($e(t)&&!r){console.warn(`Precognition file validation is not active. Call the "validateFiles" function on your form to enable it.`);return}e=Lt(e),(e.includes(`*`)||Ae(_,e)!==t)&&(u([e,...l]).forEach(e=>e()),S(n??{}))},T=e=>r===!1?Rt(e):e,E={touched:()=>l,validate(e,t,n){return typeof e==`object`&&!(`target`in e)&&(n=e,e=t=void 0),w(e,t,n),E},touch(e){let t=Array.isArray(e)?e:[Lt(e)];return u([...l,...t]).forEach(e=>e()),E},validating:()=>i,valid:c,errors:()=>d,hasErrors:m,setErrors(e){return f(e).forEach(e=>e()),E},forgetError(e){return p(e).forEach(e=>e()),E},defaults(e){return t=e,_=e,E},reset(...e){if(e.length===0)u([]).forEach(e=>e());else{let n=[...l];e.forEach(e=>{n.includes(e)&&n.splice(n.indexOf(e),1),Ke(_,e,Ae(t,e))}),u(n).forEach(e=>e())}return E},setTimeout(e){return g(e),E},on(e,t){return n[e].push(t),E},validateFiles(){return r=!0,E},withoutFileValidation(){return r=!1,E}};return E},Ft=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:Array.isArray(e[n])?e[n][0]:e[n]}),{}),It=e=>Object.keys(e).reduce((t,n)=>({...t,[n]:typeof e[n]==`string`?[e[n]]:e[n]}),{}),Lt=e=>typeof e==`string`?e:e.target.name,Rt=e=>{let t={...e};return Object.keys(t).forEach(e=>{let n=t[e];if(n!==null){if($e(n)){delete t[e];return}if(Array.isArray(n)){t[e]=Object.values(Rt({...n}));return}if(typeof n==`object`){t[e]=Rt(t[e]);return}}}),t},zt=`modulepreload`,Bt=function(e){return`/build/`+e},Vt={},Ht=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Bt(t,n),t in Vt)return;Vt[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zt,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ut=new class{config={};defaults;constructor(e){this.defaults=e}extend(e){return e&&(this.defaults={...this.defaults,...e}),this}replace(e){this.config=e}get(e){return Re(this.config,e)?Ae(this.config,e):Ae(this.defaults,e)}set(e,t){typeof e==`string`?Ke(this.config,e,t):Object.entries(e).forEach(([e,t])=>{Ke(this.config,e,t)})}}({form:{recentlySuccessfulDuration:2e3,forceIndicesArrayFormatInFormData:!0,withAllErrors:!1},prefetch:{cacheFor:3e4,hoverDelay:75}});function Wt(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function Gt(e,t){return document.dispatchEvent(new CustomEvent(`inertia:${e}`,t))}var Kt=e=>Gt(`before`,{cancelable:!0,detail:{visit:e}}),qt=e=>Gt(`error`,{detail:{errors:e}}),Jt=e=>Gt(`networkError`,{cancelable:!0,detail:{error:e}}),Yt=e=>Gt(`finish`,{detail:{visit:e}}),Xt=e=>Gt(`httpException`,{cancelable:!0,detail:{response:e}}),Zt=e=>Gt(`beforeUpdate`,{detail:{page:e}}),Qt=e=>Gt(`navigate`,{detail:{page:e}}),$t=e=>Gt(`progress`,{detail:{progress:e}}),en=e=>Gt(`start`,{detail:{visit:e}}),tn=e=>Gt(`success`,{detail:{page:e}}),nn=(e,t)=>Gt(`prefetched`,{detail:{fetchedAt:Date.now(),response:e,visit:t}}),rn=e=>Gt(`prefetching`,{detail:{visit:e}}),an=e=>Gt(`flash`,{detail:{flash:e}}),on=class{static locationVisitKey=`inertiaLocationVisit`;static set(e,t){typeof window<`u`&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<`u`)return JSON.parse(window.sessionStorage.getItem(e)||`null`)}static merge(e,t){let n=this.get(e);n===null?this.set(e,t):this.set(e,{...n,...t})}static remove(e){typeof window<`u`&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let n=this.get(e);n!==null&&(delete n[t],this.set(e,n))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<`u`&&window.sessionStorage.clear()}},sn=async e=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);let t=fn(),n=await hn(await gn());if(!n)throw Error(`Unable to encrypt history`);return await un(t,n,e)},cn={key:`historyKey`,iv:`historyIv`},ln=async e=>{let t=fn(),n=await gn();if(!n)throw Error(`Unable to decrypt history`);return await dn(t,n,e)},un=async(e,t,n)=>{if(typeof window>`u`)throw Error(`Unable to encrypt history`);if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=new TextEncoder,i=JSON.stringify(n),a=new Uint8Array(i.length*3),o=r.encodeInto(i,a);return window.crypto.subtle.encrypt({name:`AES-GCM`,iv:e},t,a.subarray(0,o.written))},dn=async(e,t,n)=>{if(window.crypto.subtle===void 0)return console.warn(`Decryption is not supported in this environment. SSL is required.`),Promise.resolve(n);let r=await window.crypto.subtle.decrypt({name:`AES-GCM`,iv:e},t,n);return JSON.parse(new TextDecoder().decode(r))},fn=()=>{let e=on.get(cn.iv);if(e)return new Uint8Array(e);let t=window.crypto.getRandomValues(new Uint8Array(12));return on.set(cn.iv,Array.from(t)),t},pn=async()=>window.crypto.subtle===void 0?(console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve(null)):window.crypto.subtle.generateKey({name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]),mn=async e=>{if(window.crypto.subtle===void 0)return console.warn(`Encryption is not supported in this environment. SSL is required.`),Promise.resolve();let t=await window.crypto.subtle.exportKey(`raw`,e);on.set(cn.key,Array.from(new Uint8Array(t)))},hn=async e=>{if(e)return e;let t=await pn();return t?(await mn(t),t):null},gn=async()=>{let e=on.get(cn.key);return e?await window.crypto.subtle.importKey(`raw`,new Uint8Array(e),{name:`AES-GCM`,length:256},!0,[`encrypt`,`decrypt`]):null},_n=e=>{let t={};for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t},vn=(e,t,n)=>{if(e===t)return!0;for(let r in e)if(!n.includes(r)&&e[r]!==t[r]&&!yn(e[r],t[r]))return!1;for(let r in t)if(!n.includes(r)&&!(r in e))return!1;return!0},yn=(e,t)=>{switch(typeof e){case`object`:return vn(e,t,[]);case`function`:return e.toString()===t.toString();default:return e===t}},bn={ms:1,s:1e3,m:1e3*60,h:1e3*60*60,d:1e3*60*60*24},xn=e=>{if(typeof e==`number`)return e;for(let[t,n]of Object.entries(bn))if(e.endsWith(t))return parseFloat(e)*n;return parseInt(e)},Sn=new class{cached=[];inFlightRequests=[];removalTimers=[];currentUseId=null;add(e,t,{cacheFor:n,cacheTags:r}){if(this.findInFlight(e))return Promise.resolve();let i=this.findCached(e);if(!e.fresh&&i&&i.staleTimestamp>Date.now())return Promise.resolve();let[a,o]=this.extractStaleValues(n),s=new Promise((n,r)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),r()},onError:t=>{this.remove(e),e.onError(t),r()},onPrefetching(t){e.onPrefetching(t)},onPrefetched(t,n){e.onPrefetched(t,n)},onPrefetchResponse(e){n(e)},onPrefetchError(t){Sn.removeFromInFlight(e),r(t)}})}).then(t=>{this.remove(e);let n=t.getPageResponse();z.mergeOncePropsIntoResponse(n),this.cached.push({params:{...e},staleTimestamp:Date.now()+a,expiresAt:Date.now()+o,response:s,singleUse:o===0,timestamp:Date.now(),inFlight:!1,tags:Array.isArray(r)?r:[r]});let i=this.getShortestOncePropTtl(n);return this.scheduleForRemoval(e,i?Math.min(o,i):o),this.removeFromInFlight(e),t.handlePrefetch(),t});return this.inFlightRequests.push({params:{...e},response:s,staleTimestamp:null,inFlight:!0}),s}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}removeByTags(e){this.cached=this.cached.filter(t=>!t.tags.some(t=>e.includes(t)))}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}removeFromInFlight(e){this.inFlightRequests=this.inFlightRequests.filter(t=>!this.paramsAreEqual(t.params,e))}extractStaleValues(e){let[t,n]=this.cacheForToStaleAndExpires(e);return[xn(t),xn(n)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){let t=this.removalTimers.find(t=>this.paramsAreEqual(t.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(e=>e!==t))}scheduleForRemoval(e,t){if(!(typeof window>`u`)&&(this.clearTimer(e),t>0)){let n=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:n})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){let n=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=n,e.response.then(e=>{if(this.currentUseId===n)return e.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),e.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>this.paramsAreEqual(t.params,e)?!t.singleUse:!0)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}withoutPurposePrefetchHeader(e){let t=pe(e);return t.headers.Purpose===`prefetch`&&delete t.headers.Purpose,t}paramsAreEqual(e,t){return vn(this.withoutPurposePrefetchHeader(e),this.withoutPurposePrefetchHeader(t),[`showProgress`,`replace`,`prefetch`,`preserveScroll`,`preserveState`,`onBefore`,`onBeforeUpdate`,`onStart`,`onProgress`,`onFinish`,`onCancel`,`onSuccess`,`onError`,`onFlash`,`onPrefetched`,`onCancelToken`,`onPrefetching`,`async`,`viewTransition`,`optimistic`,`component`,`pageProps`])}updateCachedOncePropsFromCurrentPage(){this.cached.forEach(e=>{e.response.then(t=>{let n=t.getPageResponse();z.mergeOncePropsIntoResponse(n,{force:!0});for(let[e,t]of Object.entries(n.deferredProps??{})){let r=t.filter(e=>Ae(n.props,e)===void 0);r.length>0?n.deferredProps[e]=r:delete n.deferredProps[e]}let r=this.getShortestOncePropTtl(n);if(r===null)return;let i=e.expiresAt-Date.now(),a=Math.min(i,r);a>0?this.scheduleForRemoval(e.params,a):this.remove(e.params)})})}getShortestOncePropTtl(e){let t=Object.values(e.onceProps??{}).map(e=>e.expiresAt).filter(e=>!!e);return t.length===0?null:Math.min(...t)-Date.now()}},Cn=e=>{if(e.offsetParent===null)return!1;let t=e.getBoundingClientRect(),n=t.top=0,r=t.left=0;return n&&r},wn=e=>{let t=e=>{let t=window.getComputedStyle(e);return t.overflowY===`scroll`?!0:t.overflowY===`auto`?[`visible`,`clip`].includes(t.overflowX)?!0:r(t.maxHeight,e.style.height)||i(e,`height`):!1},n=e=>{let t=window.getComputedStyle(e);return t.overflowX===`scroll`?!0:t.overflowX===`auto`?[`visible`,`clip`].includes(t.overflowY)?!0:r(t.maxWidth,e.style.width)||i(e,`width`):!1},r=(e,t)=>!!(e&&e!==`none`&&e!==`0px`||t&&t!==`auto`&&t!==`0`),i=(e,t)=>{let n=e.parentElement;if(!n)return!1;let r=window.getComputedStyle(n);if([`flex`,`inline-flex`].includes(r.display)){let e=[`column`,`column-reverse`].includes(r.flexDirection);return t===`height`?e:!e}return[`grid`,`inline-grid`].includes(r.display)},a=e?.parentElement;for(;a;){let e=t(a)||n(a);if(window.getComputedStyle(a).display!==`contents`&&e)return a;a=a.parentElement}return null},Tn=(e,t)=>{if(!t)return e.filter(e=>Cn(e));let n=e.indexOf(t),r=[],i=[];for(let t=n;t>=0;t--){let n=e[t];if(Cn(n))r.push(n);else break}for(let t=n+1;t{window.requestAnimationFrame(()=>{t>1?En(e,t-1):e()})},Dn=e=>{if(typeof window>`u`)return null;let t=document.querySelector(`script[data-page="${e}"][type="application/json"]`);return t?.textContent?JSON.parse(t.textContent):null},On=typeof window>`u`,kn=!On&&/Firefox/i.test(window.navigator.userAgent),An=class{static save(){B.saveScrollPositions(this.getScrollRegions())}static getScrollRegions(){return Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft}))}static regions(){return document.querySelectorAll(`[scroll-region]`)}static scrollToTop(){if(kn&&getComputedStyle(document.documentElement).scrollBehavior===`smooth`)return En(()=>window.scrollTo(0,0),2);window.scrollTo(0,0)}static reset(){!On&&window.location.hash||this.scrollToTop(),this.regions().forEach(e=>{typeof e.scrollTo==`function`?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),this.scrollToAnchor()}static scrollToAnchor(){let e=On?null:window.location.hash;e&&setTimeout(()=>{let t=document.getElementById(e.slice(1));t?t.scrollIntoView():this.scrollToTop()})}static restore(e){On||window.requestAnimationFrame(()=>{this.restoreDocument(),this.restoreScrollRegions(e)})}static restoreScrollRegions(e){On||this.regions().forEach((t,n)=>{let r=e[n];r&&(typeof t.scrollTo==`function`?t.scrollTo(r.left,r.top):(t.scrollTop=r.top,t.scrollLeft=r.left))})}static restoreDocument(){let e=B.getDocumentScrollPosition();window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==`function`&&t.hasAttribute(`scroll-region`)&&this.save()}static onWindowScroll(){B.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}},jn=e=>typeof File<`u`&&e instanceof File||e instanceof Blob||typeof FileList<`u`&&e instanceof FileList&&e.length>0;function Mn(e){return jn(e)||e instanceof FormData&&Array.from(e.values()).some(e=>Mn(e))||typeof e==`object`&&!!e&&Object.values(e).some(e=>Mn(e))}var Nn=e=>e instanceof FormData;function Pn(e,t=new FormData,n=null,r=`brackets`){e||={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&In(t,Fn(n,i,`indices`),e[i],r);return t}function Fn(e,t,n){return e?n===`brackets`?`${e}[]`:`${e}[${t}]`:t}function In(e,t,n,r){if(Array.isArray(n))return Array.from(n.keys()).forEach(i=>In(e,Fn(t,i.toString(),r),n[i],r));if(n instanceof Date)return e.append(t,n.toISOString());if(n instanceof File)return e.append(t,n,n.name);if(n instanceof Blob)return e.append(t,n);if(typeof n==`boolean`)return e.append(t,n?`1`:`0`);if(typeof n==`string`)return e.append(t,n);if(typeof n==`number`)return e.append(t,`${n}`);if(n==null)return e.append(t,``);Pn(n,e,t,r)}function Ln(e){return/\[\d+\]/.test(decodeURIComponent(e.search))}function Rn(e){if(!e||e===`?`)return{};let t={};return e.replace(/^\?/,``).split(`&`).filter(Boolean).forEach(e=>{let[n,r]=Bn(e);Hn(t,Vn(n),Vn(r))}),t}function zn(e,t){let n=[];return Wn(e,``,n,t),n.length?`?`+n.join(`&`):``}function Bn(e){let t=e.indexOf(`=`);return t===-1?[e,``]:[e.substring(0,t),e.substring(t+1)]}function Vn(e){return decodeURIComponent(e.replace(/\+/g,` `))}function Hn(e,t,n){let r=Un(t);if(r.some(e=>e===`__proto__`))return;let i=e;for(;r.length>1;){let e=r.shift(),t=r[0]===``;(typeof i[e]!=`object`||i[e]===null)&&(i[e]=t?[]:{}),i=i[e]}let a=r.shift();a===``&&Array.isArray(i)?i.push(n):i[a]=n}function Un(e){let t=[],n=e.split(`[`)[0];n&&t.push(n);let r,i=/\[([^\]]*)\]/g;for(;(r=i.exec(e))!==null;)t.push(r[1]);return t}function Wn(e,t,n,r){if(e!==void 0){if(e===null){n.push(`${t}=`);return}if(Array.isArray(e)){e.forEach((e,i)=>{Wn(e,r===`indices`?`${t}[${i}]`:`${t}[]`,n,r)});return}if(typeof e==`object`){Object.keys(e).forEach(i=>{Wn(e[i],t?`${t}[${i}]`:i,n,r)});return}n.push(`${t}=${encodeURIComponent(String(e))}`)}}function Gn(e){return new URL(e.toString(),typeof window>`u`?void 0:window.location.toString())}var Kn=(e,t,n,r,i)=>{let a=typeof e==`string`?Gn(e):e;if((Mn(t)||r)&&!Nn(t)&&(Ut.get(`form.forceIndicesArrayFormatInFormData`)&&(i=`indices`),t=Pn(t,new FormData,null,i)),Nn(t))return[a,t];let[o,s]=qn(n,a,t,i);return[Gn(o),s]};function qn(e,t,n,r=`brackets`){let i=e===`get`&&!Nn(n)&&Object.keys(n).length>0,a=er(t.toString()),o=a||t.toString().startsWith(`/`)||t.toString()===``,s=!o&&!t.toString().startsWith(`#`)&&!t.toString().startsWith(`?`),c=/^[.]{1,2}([/]|$)/.test(t.toString()),l=t.toString().includes(`?`)||i,u=t.toString().includes(`#`),d=new URL(t.toString(),typeof window>`u`?`http://localhost`:window.location.toString());if(i){let e=Ln(d)?`indices`:r;d.search=zn({...Rn(d.search),...n},e)}return[[a?`${d.protocol}//${d.host}`:``,o?d.pathname:``,s?d.pathname.substring(+!c):``,l?d.search:``,u?d.hash:``].join(``),i?{}:n]}function Jn(e){return e=new URL(e.href),e.hash=``,e}var Yn=(e,t)=>{e.hash&&!t.hash&&Jn(e).href===t.href&&(t.hash=e.hash)},Xn=(e,t)=>Jn(e).href===Jn(t).href,Zn=(e,t)=>e.origin===t.origin&&e.pathname===t.pathname;function Qn(e){return typeof e==`object`&&!!e&&e!==void 0&&`url`in e&&`method`in e}function $n(e){return e.component?typeof e.component==`string`?e.component:(console.error(`The "component" property on the URL method pair received multiple components (${Object.keys(e.component).join(`, `)}), but only a single component string is supported for instant visits. Use the withComponent() method to specify which component to use.`),null):null}function er(e){return/^([a-z][a-z0-9+.-]*:)?\/\/[^/]/i.test(e)}function tr(e,t){let n=typeof e==`string`?Gn(e):e;return t?`${n.protocol}//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`}var z=new class{page;swapComponent;resolveComponent;onFlashCallback;componentId={};listeners=[];isFirstPageLoad=!0;cleared=!1;pendingDeferredProps=null;historyQuotaExceeded=!1;optimisticBaseline={};pendingOptimistics=[];optimisticCounter=0;init({initialPage:e,swapComponent:t,resolveComponent:n,onFlash:r}){return this.page={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]},this.swapComponent=t,this.resolveComponent=n,this.onFlashCallback=r,sr.on(`historyQuotaExceeded`,()=>{this.historyQuotaExceeded=!0}),this}set(e,{replace:t=!1,preserveScroll:n=!1,preserveState:r=!1,viewTransition:i=!1}={}){Object.keys(e.deferredProps||{}).length&&(this.pendingDeferredProps={deferredProps:e.deferredProps,component:e.component,url:e.url},e.initialDeferredProps===void 0&&(e.initialDeferredProps=e.deferredProps)),this.componentId={};let a=this.componentId;return e.clearHistory&&B.clear(),this.resolve(e.component,e).then(o=>{if(a!==this.componentId)return;e.rememberedState??={};let s=typeof window>`u`,c=s?new URL(e.url):window.location,l=!s&&n?An.getScrollRegions():[];t||=Xn(Gn(e.url),c);let u={...e,flash:{}};return new Promise(e=>t?B.replaceState(u,e):B.pushState(u,e)).then(()=>{let a=!this.isTheSame(e);if(!a&&Object.keys(e.props.errors||{}).length>0&&(i=!1),this.page=e,this.cleared=!1,this.hasOnceProps()&&Sn.updateCachedOncePropsFromCurrentPage(),a&&this.fireEventsFor(`newComponent`),this.isFirstPageLoad&&this.fireEventsFor(`firstLoad`),this.isFirstPageLoad=!1,this.historyQuotaExceeded){this.historyQuotaExceeded=!1;return}return this.swap({component:o,page:e,preserveState:r,viewTransition:i}).then(()=>{n?window.requestAnimationFrame(()=>An.restoreScrollRegions(l)):An.reset(),this.pendingDeferredProps&&this.pendingDeferredProps.component===e.component&&this.pendingDeferredProps.url===e.url&&sr.fireInternalEvent(`loadDeferredProps`,this.pendingDeferredProps.deferredProps),this.pendingDeferredProps=null,t||Qt(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component,e).then(n=>(this.page=e,this.cleared=!1,B.setCurrent(e),this.swap({component:n,page:e,preserveState:t,viewTransition:!1})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}getWithoutFlashData(){return{...this.page,flash:{}}}hasOnceProps(){return Object.keys(this.page.onceProps??{}).length>0}merge(e){this.page={...this.page,...e}}setPropsQuietly(e){return this.page={...this.page,props:e},this.resolve(this.page.component,this.page).then(e=>this.swap({component:e,page:this.page,preserveState:!0,viewTransition:!1}))}setFlash(e){this.page={...this.page,flash:e},this.onFlashCallback?.(e)}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:n,viewTransition:r}){let i=()=>this.swapComponent({component:e,page:t,preserveState:n});if(!r||!document?.startViewTransition||document.visibilityState===`hidden`)return i();let a=typeof r==`boolean`?()=>null:r;return new Promise(e=>{a(document.startViewTransition(()=>i().then(e)))})}resolve(e,t){return Promise.resolve(this.resolveComponent(e,t))}nextOptimisticId(){return++this.optimisticCounter}setBaseline(e,t){e in this.optimisticBaseline||(this.optimisticBaseline[e]=t)}updateBaseline(e,t){e in this.optimisticBaseline&&(this.optimisticBaseline[e]=t)}hasBaseline(e){return e in this.optimisticBaseline}registerOptimistic(e,t){this.pendingOptimistics.push({id:e,callback:t})}unregisterOptimistic(e){this.pendingOptimistics=this.pendingOptimistics.filter(t=>t.id!==e)}replayOptimistics(){let e=Object.keys(this.optimisticBaseline);if(e.length===0)return{};let t=pe(this.page.props);for(let n of e)t[n]=pe(this.optimisticBaseline[n]);for(let{callback:e}of this.pendingOptimistics){let n=e(pe(t));n&&Object.assign(t,n)}let n={};for(let r of e)n[r]=t[r];return n}pendingOptimisticCount(){return this.pendingOptimistics.length}clearOptimisticState(){this.optimisticBaseline={},this.pendingOptimistics=[]}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(n=>n.event!==e&&n.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(e=>e.callback())}mergeOncePropsIntoResponse(e,{force:t=!1}={}){Object.entries(e.onceProps??{}).forEach(([n,r])=>{let i=this.page.onceProps?.[n];i!==void 0&&(t||Ae(e.props,r.prop)===void 0)&&(Ke(e.props,r.prop,Ae(this.page.props,i.prop)),e.onceProps[n].expiresAt=i.expiresAt)})}},nr=class{items=[];processingPromise=null;add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??=this.processNext().finally(()=>{this.processingPromise=null}),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}},rr=typeof window>`u`,ir=new nr,ar=!rr&&/CriOS/.test(window.navigator.userAgent),or=class{rememberedState=`rememberedState`;scrollRegions=`scrollRegions`;preserveUrl=!1;current={};initialState=null;remember(e,t){this.replaceState({...z.getWithoutFlashData(),rememberedState:{...z.get()?.rememberedState??{},[t]:e}})}restore(e){if(!rr)return this.current[this.rememberedState]?.[e]===void 0?this.initialState?.[this.rememberedState]?.[e]:this.current[this.rememberedState]?.[e]}pushState(e,t=null){if(!rr){if(this.preserveUrl){t&&t();return}this.current=e,ir.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doPushState({page:n},e.url).then(()=>t?.());return ar?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}clonePageProps(e){try{return structuredClone(e.props),e}catch{return{...e,props:pe(e.props)}}}getPageData(e){let t=this.clonePageProps(e);return new Promise(n=>e.encryptHistory?sn(t).then(n):n(t))}processQueue(){return ir.process()}decrypt(e=null){if(rr)return Promise.resolve(e??z.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(e=>{if(!e)throw Error(`Unable to decrypt history`);return this.initialState===null?this.initialState=e??void 0:this.current=e??{},e})}decryptPageData(e){return e instanceof ArrayBuffer?ln(e):Promise.resolve(e)}saveScrollPositions(e){ir.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!xe(this.getScrollRegions(),e))return this.doReplaceState({page:window.history.state.page,scrollRegions:e})}))}saveDocumentScrollPosition(e){ir.add(()=>Promise.resolve().then(()=>{if(window.history.state?.page&&!xe(this.getDocumentScrollPosition(),e))return this.doReplaceState({page:window.history.state.page,documentScrollPosition:e})}))}getScrollRegions(){return window.history.state?.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state?.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){if(xe(this.current,e)){t&&t();return}let{flash:n,...r}=e;if(z.merge(r),!rr){if(this.preserveUrl){t&&t();return}this.current=e,ir.add(()=>this.getPageData(e).then(n=>{let r=()=>this.doReplaceState({page:n},e.url).then(()=>t?.());return ar?new Promise(e=>{setTimeout(()=>r().then(e))}):r()}))}}isHistoryThrottleError(e){return e instanceof Error&&e.name===`SecurityError`&&(e.message.includes(`history.pushState`)||e.message.includes(`history.replaceState`))}isQuotaExceededError(e){return e instanceof Error&&e.name===`QuotaExceededError`}withThrottleProtection(e){return Promise.resolve().then(()=>{try{return e()}catch(e){if(!this.isHistoryThrottleError(e))throw e;console.error(e.message)}})}doReplaceState(e,t){return this.withThrottleProtection(()=>{window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},``,t)})}doPushState(e,t){return this.withThrottleProtection(()=>{try{window.history.pushState(e,``,t)}catch(e){if(!this.isQuotaExceededError(e))throw e;sr.fireInternalEvent(`historyQuotaExceeded`,t)}})}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}clearInitialState(e){this.initialState&&this.initialState[e]!==void 0&&delete this.initialState[e]}browserHasHistoryEntry(){return!rr&&!!window.history.state?.page}clear(){on.remove(cn.key),on.remove(cn.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<`u`&&window.history.scrollRestoration&&(window.history.scrollRestoration=`manual`);var B=new or,sr=new class{internalListeners=[];init(){typeof window<`u`&&(window.addEventListener(`popstate`,this.handlePopstateEvent.bind(this)),window.addEventListener(`pageshow`,this.handlePageshowEvent.bind(this)),window.addEventListener(`scroll`,Wt(An.onWindowScroll.bind(An),100),!0)),typeof document<`u`&&document.addEventListener(`scroll`,Wt(An.onScroll.bind(An),100),!0)}onGlobalEvent(e,t){return this.registerListener(`inertia:${e}`,(e=>{let n=t(e);e.cancelable&&!e.defaultPrevented&&n===!1&&e.preventDefault()}))}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(e=>e.listener!==t)}}onMissingHistoryItem(){z.clear(),this.fireInternalEvent(`missingHistoryItem`)}fireInternalEvent(e,...t){this.internalListeners.filter(t=>t.event===e).forEach(e=>e.listener(...t))}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePageshowEvent(e){e.persisted&&B.decrypt().catch(()=>this.onMissingHistoryItem())}handlePopstateEvent(e){let t=e.state||null;if(t===null){let e=Gn(z.get().url);e.hash=window.location.hash,B.replaceState({...z.getWithoutFlashData(),url:e.href}),An.reset();return}if(!B.isValidState(t))return this.onMissingHistoryItem();B.decrypt(t.page).then(e=>{if(z.get().version!==e.version){this.onMissingHistoryItem();return}Qi.cancelAll({prefetch:!1}),z.setQuietly(e,{preserveState:!1}).then(()=>{An.restore(B.getScrollRegions()),Qt(z.get());let t={},n=z.get().props;for(let[r,i]of Object.entries(e.initialDeferredProps??e.deferredProps??{})){let e=i.filter(e=>Ae(n,e)===void 0);e.length>0&&(t[r]=e)}Object.keys(t).length>0&&this.fireInternalEvent(`loadDeferredProps`,t)})}).catch(()=>{this.onMissingHistoryItem()})}},cr=new class{type;constructor(){this.type=this.resolveType()}resolveType(){return typeof window>`u`?`navigate`:window.performance?.getEntriesByType(`navigation`)[0]?.type??`navigate`}get(){return this.type}isBackForward(){return this.type===`back_forward`}isReload(){return this.type===`reload`}},lr=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(e=>e.bind(this)())}static clearRememberedStateOnReload(){cr.isReload()&&(B.deleteState(B.rememberedState),B.clearInitialState(B.rememberedState))}static handleBackForward(){if(!cr.isBackForward()||!B.browserHasHistoryEntry())return!1;let e=B.getScrollRegions();return B.decrypt().then(t=>{z.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{An.restore(e),Qt(z.get())})}).catch(()=>{sr.onMissingHistoryItem()}),!0}static handleLocation(){if(!on.exists(on.locationVisitKey))return!1;let e=on.get(on.locationVisitKey)||{};return on.remove(on.locationVisitKey),typeof window<`u`&&z.setUrlHash(window.location.hash),B.decrypt(z.get()).then(()=>{let t=B.getState(B.rememberedState,{}),n=B.getScrollRegions();z.remember(t),z.set(z.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&An.restore(n),this.fireInitialEvents()})}).catch(()=>{sr.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<`u`&&z.setUrlHash(window.location.hash),z.set(z.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{cr.isReload()?An.restore(B.getScrollRegions()):An.scrollToAnchor(),this.fireInitialEvents()})}static fireInitialEvents(){let e=z.get();Qt(e),Object.keys(e.flash).length>0&&queueMicrotask(()=>an(e.flash))}},ur=class{id=null;throttle=!1;keepAlive=!1;cb;interval;cbCount=0;constructor(e,t,n){this.keepAlive=n.keepAlive??!1,this.cb=t,this.interval=e,(n.autoStart??!0)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){typeof window>`u`||(this.stop(),this.id=window.setInterval(()=>{(!this.throttle||this.cbCount%10==0)&&this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=this.keepAlive?!1:e,this.throttle&&(this.cbCount=0)}},dr=new class{polls=[];constructor(){this.setupVisibilityListener()}add(e,t,n){let r=new ur(e,t,n);return this.polls.push(r),{stop:()=>r.stop(),start:()=>r.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>`u`||document.addEventListener(`visibilitychange`,()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},fr=new class{requestHandlers=[];responseHandlers=[];errorHandlers=[];onRequest(e){return this.requestHandlers.push(e),()=>{this.requestHandlers=this.requestHandlers.filter(t=>t!==e)}}onResponse(e){return this.responseHandlers.push(e),()=>{this.responseHandlers=this.responseHandlers.filter(t=>t!==e)}}onError(e){return this.errorHandlers.push(e),()=>{this.errorHandlers=this.errorHandlers.filter(t=>t!==e)}}async processRequest(e){let t=e;for(let e of this.requestHandlers)t=await e(t);return t}async processResponse(e){let t=e;for(let e of this.responseHandlers)t=await e(t);return t}async processError(e){for(let t of this.errorHandlers)await t(e)}},pr=class extends Error{code;url;constructor(e,t,n){super(n?`${e} (${n})`:e),this.name=`HttpError`,this.code=t,this.url=n}},mr=class extends pr{response;constructor(e,t,n){super(e,`ERR_HTTP_RESPONSE`,n),this.name=`HttpResponseError`,this.response=t}},hr=class extends pr{constructor(e=`Request was cancelled`,t){super(e,`ERR_CANCELLED`,t),this.name=`HttpCancelledError`}},gr=class extends pr{cause;constructor(e,t,n){super(e,`ERR_NETWORK`,t),this.name=`HttpNetworkError`,this.cause=n}};function _r(e){let t=document.cookie.match(RegExp(`(^|;\\s*)(`+e+`)=([^;]*)`));return t?decodeURIComponent(t[3]):null}function vr(e){let t={};return e.getAllResponseHeaders().split(`\r +`).forEach(e=>{let n=e.indexOf(`:`);n>0&&(t[e.slice(0,n).toLowerCase().trim()]=e.slice(n+1).trim())}),t}function yr(e,t){if(!t.headers)return;let n=t.data instanceof FormData;Object.entries(t.headers).forEach(([t,r])=>{(t.toLowerCase()!==`content-type`||!n)&&e.setRequestHeader(t,String(r))})}function br(e,t){if(!t||Object.keys(t).length===0)return e;let[n]=qn(`get`,e,t);return n}var xr=class{xsrfCookieName;xsrfHeaderName;constructor(e={}){this.xsrfCookieName=e.xsrfCookieName??`XSRF-TOKEN`,this.xsrfHeaderName=e.xsrfHeaderName??`X-XSRF-TOKEN`}async request(e){let t=await fr.processRequest(e);try{let e=await this.doRequest(t);return await fr.processResponse(e)}catch(e){throw(e instanceof mr||e instanceof gr||e instanceof hr)&&await fr.processError(e),e}}doRequest(e){return new Promise((t,n)=>{let r=new XMLHttpRequest,i=br(e.url,e.params);r.open(e.method.toUpperCase(),i,!0);let a=_r(this.xsrfCookieName);a&&r.setRequestHeader(this.xsrfHeaderName,a);let o=null;e.data!==null&&e.data!==void 0&&(e.data instanceof FormData?o=e.data:typeof e.data==`object`?(o=JSON.stringify(e.data),!e.headers?.[`Content-Type`]&&!e.headers?.[`content-type`]&&r.setRequestHeader(`Content-Type`,`application/json`)):o=String(e.data)),yr(r,e),e.onUploadProgress&&(r.upload.onprogress=t=>{let n=t.lengthComputable?t.loaded/t.total:void 0;e.onUploadProgress({progress:n,percentage:n?Math.round(n*100):0,loaded:t.loaded,total:t.lengthComputable?t.total:void 0})}),e.signal&&e.signal.addEventListener(`abort`,()=>r.abort()),r.onabort=()=>n(new hr(`Request was cancelled`,e.url)),r.onerror=()=>n(new gr(`Network error`,e.url)),r.onload=()=>{let i={status:r.status,data:r.responseText,headers:vr(r)};r.status>=400?n(new mr(`Request failed with status ${r.status}`,i,e.url)):t(i)},r.send(o)})}},Sr=new xr;function Cr(e){return!(`request`in e)}var wr={getClient(){return Sr},setClient(e){if(!Cr(e)){Sr=e;return}Sr=new xr(e),e.xsrfCookieName&&bt.withXsrfCookieName(e.xsrfCookieName),e.xsrfHeaderName&&bt.withXsrfHeaderName(e.xsrfHeaderName)},onRequest:fr.onRequest.bind(fr),onResponse:fr.onResponse.bind(fr),onError:fr.onError.bind(fr),processRequest:fr.processRequest.bind(fr),processResponse:fr.processResponse.bind(fr),processError:fr.processError.bind(fr)},Tr=class e{callbacks=[];params;constructor(e){if(!e.prefetch)this.params=e;else{let t={onBefore:this.wrapCallback(e,`onBefore`),onBeforeUpdate:this.wrapCallback(e,`onBeforeUpdate`),onStart:this.wrapCallback(e,`onStart`),onProgress:this.wrapCallback(e,`onProgress`),onFinish:this.wrapCallback(e,`onFinish`),onCancel:this.wrapCallback(e,`onCancel`),onSuccess:this.wrapCallback(e,`onSuccess`),onError:this.wrapCallback(e,`onError`),onHttpException:this.wrapCallback(e,`onHttpException`),onNetworkError:this.wrapCallback(e,`onNetworkError`),onFlash:this.wrapCallback(e,`onFlash`),onCancelToken:this.wrapCallback(e,`onCancelToken`),onPrefetched:this.wrapCallback(e,`onPrefetched`),onPrefetching:this.wrapCallback(e,`onPrefetching`)};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{}),onPrefetchError:e.onPrefetchError||(()=>{})}}}static create(t){return new e(t)}data(){return this.params.method===`get`?null:this.params.data}queryParams(){return this.params.method===`get`?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}isPrefetch(){return this.params.prefetch===!0}isDeferredPropsRequest(){return this.params.deferredProps===!0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}onPrefetchError(e){this.params.onPrefetchError&&this.params.onPrefetchError(e)}all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[`X-Inertia-Partial-Component`]=z.get().component);let t=this.params.only.concat(this.params.reset);return t.length>0&&(e[`X-Inertia-Partial-Data`]=t.join(`,`)),this.params.except.length>0&&(e[`X-Inertia-Partial-Except`]=this.params.except.join(`,`)),this.params.reset.length>0&&(e[`X-Inertia-Reset`]=this.params.reset.join(`,`)),this.params.errorBag&&this.params.errorBag.length>0&&(e[`X-Inertia-Error-Bag`]=this.params.errorBag),e}setPreserveOptions(t){this.params.preserveScroll=e.resolvePreserveOption(this.params.preserveScroll,t),this.params.preserveState=e.resolvePreserveOption(this.params.preserveState,t)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...n)=>{this.recordCallback(t,n),e[t](...n)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}static resolvePreserveOption(e,t){return typeof e==`function`?e(t):e===`errors`?Object.keys(t.props.errors||{}).length>0:e}},Er={createIframeAndPage(e){typeof e==`object`&&(e=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(e)}`);let t=document.createElement(`html`);t.innerHTML=e,t.querySelectorAll(`a`).forEach(e=>e.setAttribute(`target`,`_top`));let n=document.createElement(`iframe`);return n.style.backgroundColor=`white`,n.style.borderRadius=`5px`,n.style.width=`100%`,n.style.height=`100%`,n.setAttribute(`sandbox`,`allow-scripts`),{iframe:n,page:t}},show(e){let{iframe:t,page:n}=this.createIframeAndPage(e);t.style.boxSizing=`border-box`,t.style.display=`block`;let r=document.createElement(`dialog`);r.id=`inertia-error-dialog`,Object.assign(r.style,{width:`calc(100vw - 100px)`,height:`calc(100vh - 100px)`,padding:`0`,margin:`auto`,border:`none`,backgroundColor:`transparent`});let i=document.createElement(`style`);i.textContent=` + dialog#inertia-error-dialog::backdrop { + background-color: rgba(0, 0, 0, 0.6); + } + + dialog#inertia-error-dialog:focus { + outline: none; + } + `;let a=Ut.get(`nonce`);a&&(i.nonce=a),document.head.appendChild(i),r.addEventListener(`click`,e=>{e.target===r&&r.close()}),r.addEventListener(`close`,()=>{i.remove(),r.remove()}),r.appendChild(t),document.body.prepend(r),r.showModal(),r.focus(),t.srcdoc=n.outerHTML}},Dr=(e,t)=>e===t||e.startsWith(`${t}.`),Or=(e,t)=>{let{only:n,except:r}=e;return!(n.length===0&&r.length===0||n.length>0&&!n.some(e=>Dr(t,e))||r.length>0&&r.some(e=>Dr(t,e)))},kr=(e,t)=>t.some(t=>Or(e,t)),Ar=new nr,jr=class e{constructor(e,t,n){this.requestParams=e,this.response=t,this.originatingPage=n}wasPrefetched=!1;processed=!1;static create(t,n,r){return new e(t,n,r)}isProcessed(){return this.processed}async handlePrefetch(){Xn(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Ar.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.wasPrefetched=!0,this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),nn(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),this.processed=!0,!this.isInertiaResponse())return this.handleNonInertiaResponse();if(this.isHttpException()){let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)===!1||!Xt(e))return}await B.processQueue(),B.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();let{flash:e}=z.get();Object.keys(e).length>0&&!this.requestParams.isDeferredPropsRequest()&&(an(e),this.requestParams.all().onFlash(e));let t=z.get().props.errors||{};if(Object.keys(t).length>0){let e=this.getScopedErrors(t);return qt(e),this.requestParams.all().onError(e)}Qi.flushByCacheTags(this.requestParams.all().invalidateCacheTags||[]),this.wasPrefetched||Qi.flush(z.get().url),tn(z.get()),await this.requestParams.all().onSuccess(z.get()),B.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}getPageResponse(){let e=this.getDataFromResponse(this.response.data);return typeof e==`object`?this.response.data={...e,flash:e.flash??{},rescuedProps:e.rescuedProps??[]}:this.response.data=e}async handleNonInertiaResponse(){if(this.isInertiaRedirect()){Qi.visit(this.getHeader(`x-inertia-redirect`),{...this.requestParams.all(),method:`get`,data:{}});return}if(this.isLocationVisit()){let e=Gn(this.getHeader(`x-inertia-location`));return Yn(this.requestParams.all().url,e),this.locationVisit(e)}let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(this.requestParams.all().onHttpException(e)!==!1&&Xt(e))return Er.show(e.data)}isInertiaResponse(){return this.hasHeader(`x-inertia`)}isHttpException(){return this.response.status>=400}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return this.getHeader(e)!==void 0}isInertiaRedirect(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-redirect`)}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader(`x-inertia-location`)}locationVisit(e){try{if(on.set(on.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),typeof window>`u`)return;Xn(window.location,e)?window.location.reload():window.location.href=e.href}catch{return!1}}async setPage(){let e=this.getPageResponse();return this.shouldSetPage(e)?(this.mergeProps(e),z.mergeOncePropsIntoResponse(e),this.preserveOptimisticProps(e),this.preserveEqualProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=B.preserveUrl?z.get().url:this.pageUrl(e),this.requestParams.all().onBeforeUpdate(e),Zt(e),z.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState,viewTransition:this.requestParams.all().viewTransition})):Promise.resolve()}getDataFromResponse(e){if(typeof e!=`string`)return e;try{return JSON.parse(e)}catch{return e}}shouldSetPage(e){if(!this.requestParams.all().async||this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==z.get().component)return!1;let t=Gn(this.originatingPage.url),n=Gn(z.get().url);return t.origin===n.origin&&t.pathname===n.pathname}pageUrl(e){let t=Gn(e.url);return e.preserveFragment?t.hash=this.requestParams.all().url.hash:Yn(this.requestParams.all().url,t),t.pathname+t.search+t.hash}preserveOptimisticProps(e){if(Qi.hasPendingOptimistic())for(let t of Object.keys(e.props))z.hasBaseline(t)&&(z.updateBaseline(t,e.props[t]),e.props[t]=z.get().props[t])}preserveEqualProps(e){if(e.component!==z.get().component)return;let t=z.get().props;Object.entries(e.props).forEach(([n,r])=>{xe(r,t[n])&&(e.props[n]=t[n])})}mergeProps(e){if(!this.requestParams.isPartial()||e.component!==z.get().component)return;let t=e.mergeProps||[],n=e.prependProps||[],r=e.deepMergeProps||[],i=e.matchPropsOn||[],a=(t,n)=>{let r=Ae(z.get().props,t),a=Ae(e.props,t);if(Array.isArray(a)){let o=this.mergeOrMatchItems(r||[],a,t,i,n);Ke(e.props,t,o)}else if(typeof a==`object`&&a){let n={...r||{},...a};Ke(e.props,t,n)}};t.forEach(e=>a(e,!0)),n.forEach(e=>a(e,!1)),r.forEach(t=>{let n=Ae(z.get().props,t),r=Ae(e.props,t),a=(e,t,n)=>Array.isArray(t)?this.mergeOrMatchItems(e,t,n,i):typeof t==`object`&&t?Object.keys(t).reduce((r,i)=>(r[i]=a(e?e[i]:void 0,t[i],`${n}.${i}`),r),{...e}):t;Ke(e.props,t,a(n,r,t))});let o=new Set([...this.requestParams.all().only,...this.requestParams.all().except].filter(e=>e.includes(`.`)).map(e=>e.split(`.`)[0]));for(let t of o){let n=z.get().props[t];this.isObject(n)&&this.isObject(e.props[t])&&(e.props[t]=this.deepMergeObjects(n,e.props[t]))}e.props={...z.get().props,...e.props},this.shouldPreserveErrors(e)&&(e.props.errors=z.get().props.errors),z.get().scrollProps&&(e.scrollProps={...z.get().scrollProps||{},...e.scrollProps||{}}),z.hasOnceProps()&&(e.onceProps={...z.get().onceProps||{},...e.onceProps||{}}),this.requestParams.isDeferredPropsRequest()&&(e.flash={...z.get().flash});let s=z.get().initialDeferredProps;s&&Object.keys(s).length>0&&(e.initialDeferredProps=s),e.rescuedProps=this.mergeRescuedProps(e)}mergeRescuedProps(e){let t=z.get().rescuedProps??[],n=e.rescuedProps??[],r=new Set(t.filter(e=>!Or(this.requestParams.all(),e)));return n.forEach(e=>r.add(e)),Array.from(r)}shouldPreserveErrors(e){if(!this.requestParams.all().preserveErrors)return!1;let t=z.get().props.errors;if(!t||Object.keys(t).length===0)return!1;let n=e.props.errors;return!(n&&Object.keys(n).length>0)}isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}deepMergeObjects(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];this.isObject(i)&&this.isObject(a)?n[r]=this.deepMergeObjects(i,a):n[r]=a}return n}mergeOrMatchItems(e,t,n,r,i=!0){let a=Array.isArray(e)?e:[],o=r.find(e=>e.split(`.`).slice(0,-1).join(`.`)===n);if(!o)return i?[...a,...t]:[...t,...a];let s=o.split(`.`).pop()||``,c=new Map;return t.forEach(e=>{this.hasUniqueProperty(e,s)&&c.set(e[s],e)}),i?this.appendWithMatching(a,t,c,s):this.prependWithMatching(a,t,c,s)}appendWithMatching(e,t,n,r){let i=e.map(e=>this.hasUniqueProperty(e,r)&&n.has(e[r])?n.get(e[r]):e),a=t.filter(t=>this.hasUniqueProperty(t,r)?!e.some(e=>this.hasUniqueProperty(e,r)&&e[r]===t[r]):!0);return[...i,...a]}prependWithMatching(e,t,n,r){let i=e.filter(e=>this.hasUniqueProperty(e,r)?!n.has(e[r]):!0);return[...t,...i]}hasUniqueProperty(e,t){return e&&typeof e==`object`&&t in e}async setRememberedState(e){let t=await B.getState(B.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===z.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||``]||{}:e}},Mr=class e{constructor(e,t,{optimistic:n=!1}={}){this.page=t,this.requestParams=Tr.create(e),this.cancelToken=new AbortController,this.optimistic=n}response;cancelToken;requestParams;requestHasFinished=!1;optimistic;static create(t,n,r){return new e(t,n,r)}isPrefetch(){return this.requestParams.isPrefetch()}isOptimistic(){return this.optimistic}isPendingOptimistic(){return this.isOptimistic()&&(!this.response||!this.response.isProcessed())}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),en(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),rn(this.requestParams.all()));let e=this.requestParams.all().prefetch;return wr.getClient().request({method:this.requestParams.all().method,url:Jn(this.requestParams.all().url).href,data:this.requestParams.data(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this)}).then(e=>(this.response=jr.create(this.requestParams,e,this.page),this.response.handle())).catch(e=>e instanceof mr?(this.response=jr.create(this.requestParams,e.response,this.page),this.response.handle()):Promise.reject(e)).catch(t=>{if(!(t instanceof hr)&&this.requestParams.all().onNetworkError(t)!==!1&&Jt(t))return e&&this.requestParams.onPrefetchError(t),Promise.reject(t)}).finally(()=>{this.finish(),e&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,Yt(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:e=!1,interrupted:t=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:e,interrupted:t}),this.fireFinishEvents())}onProgress(e){this.requestParams.data()instanceof FormData&&($t(e),this.requestParams.all().onProgress(e))}getHeaders(){let e={...this.requestParams.headers(),Accept:`text/html, application/xhtml+xml`,"X-Requested-With":`XMLHttpRequest`,"X-Inertia":!0},t=z.get();t.version&&(e[`X-Inertia-Version`]=t.version);let n=Object.entries(t.onceProps||{}).filter(([,e])=>Ae(t.props,e.prop)===void 0?!1:!e.expiresAt||e.expiresAt>Date.now()).map(([e])=>e);return n.length>0&&(e[`X-Inertia-Except-Once-Props`]=n.join(`,`)),e}},Nr=class{requests=[];maxConcurrent;interruptible;constructor({maxConcurrent:e,interruptible:t}){this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().finally(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight({prefetch:e=!0,optimistic:t=!0}={}){this.requests.filter(t=>e||!t.isPrefetch()).filter(e=>t||!e.isOptimistic()).forEach(e=>e.cancel({cancelled:!0}))}cancel({cancelled:e=!1,interrupted:t=!1}={},n=!1){!n&&!this.shouldCancel()||this.requests.shift()?.cancel({cancelled:e,interrupted:t})}shouldCancel(){return this.interruptible&&this.requests.length>=this.maxConcurrent}hasPendingOptimistic(){return this.requests.some(e=>e.isPendingOptimistic())}},Pr=()=>{},Fr=class{syncRequestStream=new Nr({maxConcurrent:1,interruptible:!0});asyncRequestStream=new Nr({maxConcurrent:1/0,interruptible:!1});clientVisitQueue=new nr;pendingOptimisticCallback=void 0;init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}){z.init({initialPage:e,resolveComponent:t,swapComponent:n,onFlash:r}),lr.handle(),sr.init(),sr.on(`missingHistoryItem`,()=>{typeof window<`u`&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),sr.on(`loadDeferredProps`,e=>{this.loadDeferredProps(e)}),sr.on(`historyQuotaExceeded`,e=>{window.location.href=e})}optimistic(e){return this.pendingOptimisticCallback=e,this}get(e,t={},n={}){return this.visit(e,{...n,method:`get`,data:t})}post(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`post`,data:t})}put(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`put`,data:t})}patch(e,t={},n={}){return this.visit(e,{preserveState:!0,...n,method:`patch`,data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:`delete`})}reload(e={}){return this.doReload(e)}doReload(e={}){if(!(typeof window>`u`))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},"Cache-Control":`no-cache`}})}remember(e,t=`default`){B.remember(e,t)}restore(e=`default`){return B.restore(e)}on(e,t){return typeof window>`u`?()=>{}:sr.onGlobalEvent(e,t)}hasPendingOptimistic(){return this.asyncRequestStream.hasPendingOptimistic()}cancelAll({async:e=!0,prefetch:t=!0,sync:n=!0}={}){e&&this.asyncRequestStream.cancelInFlight({prefetch:t}),n&&this.syncRequestStream.cancelInFlight()}poll(e,t={},n={}){return dr.add(e,()=>this.reload({preserveErrors:!0,...t}),{autoStart:n.autoStart??!0,keepAlive:n.keepAlive??!1})}visit(e,t={}){t.optimistic=t.optimistic??this.pendingOptimisticCallback,this.pendingOptimisticCallback=void 0,t.optimistic&&(t.async=t.async??!0);let n=this.getPendingVisit(e,{...t,showProgress:t.showProgress??(!t.async||!!t.optimistic)}),r=this.getVisitEvents(t);if(r.onBefore(n)===!1||!Kt(n))return;let i=Gn(z.get().url);(n.only.length>0||n.except.length>0||n.reset.length>0?Zn(n.url,i):Xn(n.url,i))||this.asyncRequestStream.cancelInFlight({prefetch:!1,optimistic:!1}),n.async||this.syncRequestStream.interruptInFlight(),t.optimistic&&this.applyOptimisticUpdate(t.optimistic,r),!z.isCleared()&&!n.preserveUrl&&An.save();let a={...n,...r},o=()=>{let e=Sn.get(a);e?(Ri.reveal(e.inFlight),Sn.use(e,a)):(Ri.reveal(!0),(n.async?this.asyncRequestStream:this.syncRequestStream).send(Mr.create(a,z.get(),{optimistic:!!t.optimistic})))};Array.isArray(n.component)&&(console.error(`The "component" prop received an array of components (${n.component.join(`, `)}), but only a single component string is supported for instant visits. Pass an explicit component name instead.`),n.component=null),n.component?B.processQueue().then(()=>{this.performInstantSwap(n).then(()=>{a.preserveState=!0,a.replace=!0,a.viewTransition=!1,o()})}):o()}getCached(e,t={}){return Sn.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){Sn.remove(this.getPrefetchParams(e,t))}flushAll(){Sn.removeAll()}flushByCacheTags(e){Sn.removeByTags(Array.isArray(e)?e:[e])}getPrefetching(e,t={}){return Sn.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},n={}){if((t.method??(Qn(e)?e.method:`get`))!==`get`)throw Error(`Prefetch requests must use the GET method`);let r=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1});if(r.url.origin+r.url.pathname+r.url.search===window.location.origin+window.location.pathname+window.location.search)return;let i=this.getVisitEvents(t);if(i.onBefore(r)===!1||!Kt(r))return;Ri.hide(),this.asyncRequestStream.interruptInFlight();let a={...r,...i};new Promise(e=>{let t=()=>{z.get()?e():setTimeout(t,50)};t()}).then(()=>{Sn.add(a,e=>{this.asyncRequestStream.send(Mr.create(e,z.get()))},{cacheFor:Ut.get(`prefetch.cacheFor`),cacheTags:[],...n})})}clearHistory(){B.clear()}decryptHistory(){return B.decrypt()}resolveComponent(e,t){return z.resolve(e,t)}replace(e){this.clientVisit(e,{replace:!0})}replaceProp(e,t,n){this.replace({preserveScroll:!0,preserveState:!0,props(n){let r=typeof t==`function`?t(Ae(n,e),n):t;return Ke(pe(n),e,r)},...n||{}})}appendToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[...e,r]},n)}prependToProp(e,t,n){this.replaceProp(e,(e,n)=>{let r=typeof t==`function`?t(e,n):t;return Array.isArray(e)||(e=e===void 0?[]:[e]),[r,...e]},n)}push(e){this.clientVisit(e)}flash(e,t){let n=z.get().flash,r;if(typeof e==`function`)r=e(n);else if(typeof e==`string`)r={...n,[e]:t};else if(e&&Object.keys(e).length)r={...n,...e};else return;z.setFlash(r),Object.keys(r).length&&an(r)}clientVisit(e,{replace:t=!1}={}){this.clientVisitQueue.add(()=>this.performClientVisit(e,{replace:t}))}performClientVisit(e,{replace:t=!1}={}){let n=z.get(),r=typeof e.props==`function`?Object.fromEntries(Object.values(n.onceProps??{}).map(e=>[e.prop,Ae(n.props,e.prop)])):{},i=typeof e.props==`function`?e.props(n.props,r):e.props??n.props,a=typeof e.flash==`function`?e.flash(n.flash):e.flash,{viewTransition:o,onError:s,onFinish:c,onFlash:l,onSuccess:u,...d}=e,f={...n,...d,flash:a??{},props:i},p=Tr.resolvePreserveOption(e.preserveScroll??!1,f),m=Tr.resolvePreserveOption(e.preserveState??!1,f);return z.set(f,{replace:t,preserveScroll:p,preserveState:m,viewTransition:o}).then(()=>{let t=z.get().flash;Object.keys(t).length>0&&(an(t),l?.(t));let n=z.get().props.errors||{};if(Object.keys(n).length===0){u?.(z.get());return}let r=e.errorBag?n[e.errorBag||``]||{}:n;s?.(r)}).finally(()=>c?.(e))}performInstantSwap(e){let t=z.get(),n=Object.fromEntries((t.sharedProps??[]).filter(e=>e in t.props).map(e=>[e,t.props[e]])),r=typeof e.pageProps==`function`?e.pageProps(pe(t.props),pe(n)):e.pageProps,i=r===null?{...n}:{...r},a={component:e.component,url:e.url.pathname+e.url.search+e.url.hash,version:t.version,props:{...i,errors:{}},flash:{},rescuedProps:[],clearHistory:!1,encryptHistory:t.encryptHistory,sharedProps:t.sharedProps,rememberedState:{}};return z.set(a,{replace:e.replace,preserveScroll:Tr.resolvePreserveOption(e.preserveScroll,a),preserveState:!1,viewTransition:e.viewTransition})}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0,viewTransition:!1}),...this.getVisitEvents(t)}}getPendingVisit(e,t){if(Qn(e)){let n=e;e=n.url,t.method=t.method??n.method}let n=Ut.get(`visitOptions`),r=n&&n(e.toString(),pe(t))||{},i={method:`get`,data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:``,forceFormData:!1,queryStringArrayFormat:`brackets`,async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,preserveErrors:!1,prefetch:!1,invalidateCacheTags:[],viewTransition:!1,component:null,pageProps:null,..._n(t),..._n(r)},[a,o]=Kn(e,i.data,i.method,i.forceFormData,i.queryStringArrayFormat),s={cancelled:!1,completed:!1,interrupted:!1,...i,url:a,data:o};return s.prefetch&&(s.headers.Purpose=`prefetch`),s}getVisitEvents(e){return{onCancelToken:e.onCancelToken||Pr,onBefore:e.onBefore||Pr,onBeforeUpdate:e.onBeforeUpdate||Pr,onStart:e.onStart||Pr,onProgress:e.onProgress||Pr,onFinish:e.onFinish||Pr,onCancel:e.onCancel||Pr,onSuccess:e.onSuccess||Pr,onError:e.onError||Pr,onHttpException:e.onHttpException||Pr,onNetworkError:e.onNetworkError||Pr,onFlash:e.onFlash||Pr,onPrefetched:e.onPrefetched||Pr,onPrefetching:e.onPrefetching||Pr}}applyOptimisticUpdate(e,t){let n=z.get().props,r=e(pe(n));if(!r)return;let i=[];for(let e of Object.keys(r))xe(n[e],r[e])||i.push(e);if(i.length===0)return;let a=z.nextOptimisticId(),o=z.get().component;for(let e of i)z.setBaseline(e,pe(n[e]));z.registerOptimistic(a,e),z.setPropsQuietly({...n,...r});let s=!0,c=t.onSuccess;t.onSuccess=e=>(s=!1,c(e));let l=t.onFinish;t.onFinish=e=>{if(z.unregisterOptimistic(a),s&&z.get().component===o){let e=z.replayOptimistics();Object.keys(e).length>0&&z.setPropsQuietly({...z.get().props,...e})}return z.pendingOptimisticCount()===0&&z.clearOptimisticState(),l(e)}}loadDeferredProps(e){e&&Object.values(e).forEach(e=>{this.doReload({only:e,deferredProps:!0,preserveErrors:!0})})}},Ir=class{static createWayfinderCallback(...e){return()=>e.length===1?Qn(e[0])?e[0]:e[0]():{method:typeof e[0]==`function`?e[0]():e[0],url:typeof e[1]==`function`?e[1]():e[1]}}static parseUseFormArguments(...e){return e.length===0?{rememberKey:null,data:{},precognitionEndpoint:null}:e.length===1?{rememberKey:null,data:e[0],precognitionEndpoint:null}:e.length===2?typeof e[0]==`string`?{rememberKey:e[0],data:e[1],precognitionEndpoint:null}:{rememberKey:null,data:e[1],precognitionEndpoint:this.createWayfinderCallback(e[0])}:{rememberKey:null,data:e[2],precognitionEndpoint:this.createWayfinderCallback(e[0],e[1])}}static parseSubmitArguments(e,t){return e.length===3||e.length===2&&typeof e[0]==`string`?{method:e[0],url:e[1],options:e[2]??{}}:Qn(e[0])?{...e[0],options:e[1]??{}}:{...t(),options:e[0]??{}}}static mergeHeadersForValidation(e,t,n){let r=e=>(e.headers={...n??{},...e.headers??{}},e);return e&&typeof e==`object`&&!(`target`in e)?e=r(e):t&&typeof t==`object`?t=r(t):typeof e==`string`?t=r(t??{}):e=r(e??{}),[e,t]}};function Lr(e){return e.includes(`.`)?e.replace(/\\\./g,`__ESCAPED_DOT__`).split(/(\[[^\]]*\])/).filter(Boolean).map(e=>e.startsWith(`[`)&&e.endsWith(`]`)?e:e.split(`.`).reduce((e,t,n)=>n===0?t:`${e}[${t}]`)).join(``).replace(/__ESCAPED_DOT__/g,`.`):e}function Rr(e){let t=[],n=/([^\[\]]+)|\[(\d*)\]/g,r;for(;(r=n.exec(e))!==null;)r[1]===void 0?r[2]!==void 0&&t.push(r[2]===``?``:Number(r[2])):t.push(r[1]);return t}function zr(e,t,n){let r=e;for(let e=0;e/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);return t.length===n.length&&n.length>0&&n[0]===0&&n.every((e,t)=>e===t)}function Vr(e){if(Array.isArray(e))return e.map(Vr);if(typeof e!=`object`||!e||jn(e))return e;if(Br(e)){let t=[];for(let n=0;n/^\d+$/.test(e)).map(Number).sort((e,t)=>e-t);Ke(t,n,e.length>0?[...e.map(e=>i[e]),r]:[r])}else Ke(t,n,[r]);continue}zr(t,e.map(String),r)}return Vr(t)}var Ur={buildDOMElement(e){let t=document.createElement(`template`);t.innerHTML=e;let n=t.content.firstChild;if(!e.startsWith(`