From fce5d2f7c16ae809575b2996c0c442c3b182cb50 Mon Sep 17 00:00:00 2001 From: Stephan Lagerwaard Date: Mon, 13 Jan 2025 14:23:10 +0100 Subject: [PATCH 001/108] Embedded scaffolding wip --- api/package.json | 7 +- api/src/app.ts | 9 ++ package.json | 1 + packages/embedded-client/.gitignore | 1 + packages/embedded-client/biome.jsonc | 22 +++ packages/embedded-client/package.json | 24 ++++ packages/embedded-client/src/App.tsx | 19 +++ packages/embedded-client/src/index.tsx | 8 ++ packages/embedded-client/tsconfig.json | 21 +++ packages/embedded-client/tsconfig.node.json | 10 ++ packages/embedded-client/vite.config.ts | 26 ++++ packages/embedded/.gitignore | 1 + packages/embedded/biome.jsonc | 22 +++ packages/embedded/package.json | 40 ++++++ packages/embedded/src/index.tsx | 75 ++++++++++ packages/embedded/tsconfig.json | 16 +++ pnpm-lock.yaml | 144 +++++++++++++++++--- 17 files changed, 424 insertions(+), 22 deletions(-) create mode 100644 packages/embedded-client/.gitignore create mode 100644 packages/embedded-client/biome.jsonc create mode 100644 packages/embedded-client/package.json create mode 100644 packages/embedded-client/src/App.tsx create mode 100644 packages/embedded-client/src/index.tsx create mode 100644 packages/embedded-client/tsconfig.json create mode 100644 packages/embedded-client/tsconfig.node.json create mode 100644 packages/embedded-client/vite.config.ts create mode 100644 packages/embedded/.gitignore create mode 100644 packages/embedded/biome.jsonc create mode 100644 packages/embedded/package.json create mode 100644 packages/embedded/src/index.tsx create mode 100644 packages/embedded/tsconfig.json diff --git a/api/package.json b/api/package.json index 70f4c78c5..a919de568 100644 --- a/api/package.json +++ b/api/package.json @@ -34,7 +34,11 @@ "access": "public" }, "license": "MIT or Apache 2", - "keywords": ["hono", "local", "debugging"], + "keywords": [ + "hono", + "local", + "debugging" + ], "bin": { "fpx": "bin/cli.js" }, @@ -43,6 +47,7 @@ "@ai-sdk/mistral": "^1.0.3", "@ai-sdk/openai": "^1.0.5", "@fiberplane/fpx-types": "workspace:*", + "@fiberplane/embedded": "workspace:*", "@fiberplane/source-analysis": "workspace:*", "@hono/node-server": "^1.13.7", "@hono/zod-validator": "^0.4.1", diff --git a/api/src/app.ts b/api/src/app.ts index 4f1c2e780..783bf9471 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -13,6 +13,7 @@ import auth from "./routes/auth.js"; import inference from "./routes/inference/index.js"; import settings from "./routes/settings.js"; import traces from "./routes/traces.js"; +import { createRoutes } from "@fiberplane/embedded"; export function createApp( db: LibSQLDatabase, @@ -59,5 +60,13 @@ export function createApp( app.route("/", appRoutes); app.route("/", settings); + const embeddedRoutes = createRoutes<{ + Bindings: Bindings; + Variables: Variables; + }>(); + + // biome-ignore lint/suspicious/noExplicitAny: TODO: figure out why hono types break + app.route("/fp", embeddedRoutes as any); + return app; } diff --git a/package.json b/package.json index 9ff4d00a0..9076b9fbb 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "preinstall": "npx only-allow pnpm", "postinstall": "pnpm run build:types && pnpm run build:source-analysis", + "build:embedded": "pnpm --filter @fiberplane/embedded-client build && pnpm --filter @fiberplane/embedded build", "build:types": "pnpm --filter @fiberplane/fpx-types build", "build:source-analysis": "pnpm --filter @fiberplane/source-analysis build", "build:fpx-studio": "pnpm clean:fpx-studio && pnpm build:api && pnpm build:frontend", diff --git a/packages/embedded-client/.gitignore b/packages/embedded-client/.gitignore new file mode 100644 index 000000000..1521c8b76 --- /dev/null +++ b/packages/embedded-client/.gitignore @@ -0,0 +1 @@ +dist diff --git a/packages/embedded-client/biome.jsonc b/packages/embedded-client/biome.jsonc new file mode 100644 index 000000000..f79679edc --- /dev/null +++ b/packages/embedded-client/biome.jsonc @@ -0,0 +1,22 @@ +{ + "$schema": "../../node_modules/@biomejs/biome/configuration_schema.json", + "extends": ["../../biome.jsonc"], + "files": { + "ignore": ["dist", "node_modules"], + }, + "overrides": [ + { + "include": ["src"], + "linter": { + "enabled": true, + "rules": { + "suspicious": { + "noConsoleLog": { + "level": "warn", + }, + }, + }, + }, + }, + ], +} diff --git a/packages/embedded-client/package.json b/packages/embedded-client/package.json new file mode 100644 index 000000000..215d65641 --- /dev/null +++ b/packages/embedded-client/package.json @@ -0,0 +1,24 @@ +{ + "name": "@fiberplane/embedded-client", + "version": "0.0.1", + "type": "module", + "private": true, + "scripts": { + "build": "tsc && vite build", + "dev": "vite", + "format": "biome check . --write", + "lint": "biome lint .", + "typecheck": "tsc --noEmit" + }, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.0", + "@types/react-dom": "^18.2.0", + "typescript": "^5.0.0", + "@vitejs/plugin-react": "^4.0.0", + "vite": "^5.0.0" + } +} diff --git a/packages/embedded-client/src/App.tsx b/packages/embedded-client/src/App.tsx new file mode 100644 index 000000000..e44209a01 --- /dev/null +++ b/packages/embedded-client/src/App.tsx @@ -0,0 +1,19 @@ +import { useState } from "react"; + +export function App() { + const [counter, setCounter] = useState(0); + const increment = () => setCounter((current) => current + 1); + const decrement = () => setCounter((current) => current - 1); + + return ( +
+ + {counter} + +
+ ); +} diff --git a/packages/embedded-client/src/index.tsx b/packages/embedded-client/src/index.tsx new file mode 100644 index 000000000..d9ede58b6 --- /dev/null +++ b/packages/embedded-client/src/index.tsx @@ -0,0 +1,8 @@ +import { createRoot } from "react-dom/client"; +import { App } from "./App"; + +const container = document.getElementById("root"); +if (container) { + const root = createRoot(container); + root.render(); +} diff --git a/packages/embedded-client/tsconfig.json b/packages/embedded-client/tsconfig.json new file mode 100644 index 000000000..76459eced --- /dev/null +++ b/packages/embedded-client/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": ["src", "*.tsx"], + "references": [{ "path": "./tsconfig.node.json" }] +} \ No newline at end of file diff --git a/packages/embedded-client/tsconfig.node.json b/packages/embedded-client/tsconfig.node.json new file mode 100644 index 000000000..862dfb2b3 --- /dev/null +++ b/packages/embedded-client/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} \ No newline at end of file diff --git a/packages/embedded-client/vite.config.ts b/packages/embedded-client/vite.config.ts new file mode 100644 index 000000000..c77dc4599 --- /dev/null +++ b/packages/embedded-client/vite.config.ts @@ -0,0 +1,26 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], + build: { + lib: { + entry: "./src/index.tsx", + formats: ["es"], + fileName: "index", + }, + outDir: "dist", + rollupOptions: { + output: { + entryFileNames: "index.js", + }, + external: ["hono", "@hono/zod-validator", "zod"], + }, + target: "esnext", + }, + define: { + "process.env": "{}", + "process.platform": null, + "process.version": null, + }, +}); diff --git a/packages/embedded/.gitignore b/packages/embedded/.gitignore new file mode 100644 index 000000000..1521c8b76 --- /dev/null +++ b/packages/embedded/.gitignore @@ -0,0 +1 @@ +dist diff --git a/packages/embedded/biome.jsonc b/packages/embedded/biome.jsonc new file mode 100644 index 000000000..f79679edc --- /dev/null +++ b/packages/embedded/biome.jsonc @@ -0,0 +1,22 @@ +{ + "$schema": "../../node_modules/@biomejs/biome/configuration_schema.json", + "extends": ["../../biome.jsonc"], + "files": { + "ignore": ["dist", "node_modules"], + }, + "overrides": [ + { + "include": ["src"], + "linter": { + "enabled": true, + "rules": { + "suspicious": { + "noConsoleLog": { + "level": "warn", + }, + }, + }, + }, + }, + ], +} diff --git a/packages/embedded/package.json b/packages/embedded/package.json new file mode 100644 index 000000000..bff691bcf --- /dev/null +++ b/packages/embedded/package.json @@ -0,0 +1,40 @@ +{ + "name": "@fiberplane/embedded", + "version": "0.0.10", + "type": "module", + "exports": { + ".": { + "types": "./src/index.tsx", + "import": "./src/index.tsx" + } + }, + "publishConfig": { + "access": "public", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + } + } + }, + "license": "MIT or Apache 2", + "scripts": { + "clean": "rm -rf dist", + "build": "tsc", + "format": "biome check . --write", + "lint": "biome lint .", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "@types/node": "*", + "@types/react": "^18.2.0", + "@types/react-dom": "^18.2.0", + "hono": "^4.6.12", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "dependencies": { + "@fiberplane/embedded-client": "workspace:*", + "@hono/node-server": "^1.13.7" + } +} diff --git a/packages/embedded/src/index.tsx b/packages/embedded/src/index.tsx new file mode 100644 index 000000000..fd1cb0433 --- /dev/null +++ b/packages/embedded/src/index.tsx @@ -0,0 +1,75 @@ +/** @jsx jsx */ +/** @jsxImportSource hono/jsx */ +import { jsx } from "hono/jsx"; +// TODO: I think we need to include this if the consumer app doesn't have hono/jsx in tsconfig +// TODO: Figure out how to fix this + +import { Hono } from "hono"; +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; +import { existsSync } from "node:fs"; +import { join } from "node:path"; +import { readFileSync } from "node:fs"; +import type { BlankEnv, BlankSchema, Env, Schema } from "hono/types"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const clientDistPath = join(__dirname, "../../embedded-client/dist"); + +// TODO: Using Hono types returns in: +// Type instantiation is excessively deep and possibly infinite. +export function createRoutes< + E extends Env = BlankEnv, + S extends Schema = BlankSchema, + BasePath extends string = "/", +>() { + const app = new Hono(); + + app.get("/client/index.js", async (c) => { + const indexPath = join(clientDistPath, "index.js"); + + if (!existsSync(indexPath)) { + return c.text("File not found", 404); + } + + try { + const content = readFileSync(indexPath, "utf-8"); + + return new Response(content, { + status: 200, + headers: { + "Content-Type": "application/javascript", + "Cache-Control": "no-store, no-cache, must-revalidate", + Pragma: "no-cache", + }, + }); + } catch (error) { + return c.text("Error reading file", 500); + } + }); + + app.get("/", (c) => { + return c.html( + + + Embedded App + + + + +
+

Loading React application...

+
+ + + diff --git a/playground/package.json b/playground/package.json new file mode 100644 index 000000000..86189922d --- /dev/null +++ b/playground/package.json @@ -0,0 +1,39 @@ +{ + "name": "playground", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@radix-ui/react-slot": "^1.1.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "lucide-react": "^0.471.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "tailwind-merge": "^2.5.5", + "tailwindcss-animate": "^1.0.7" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/node": "^22.10.5", + "@types/react": "^18.3.18", + "@types/react-dom": "^18.3.5", + "@vitejs/plugin-react-swc": "^3.5.0", + "autoprefixer": "^10.4.20", + "eslint": "^9.17.0", + "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-refresh": "^0.4.16", + "globals": "^15.14.0", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", + "typescript": "~5.6.2", + "typescript-eslint": "^8.18.2", + "vite": "^6.0.5" + } +} diff --git a/playground/postcss.config.js b/playground/postcss.config.js new file mode 100644 index 000000000..2e7af2b7f --- /dev/null +++ b/playground/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/playground/public/vite.svg b/playground/public/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/playground/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playground/src/App.css b/playground/src/App.css new file mode 100644 index 000000000..b9d355df2 --- /dev/null +++ b/playground/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/playground/src/App.tsx b/playground/src/App.tsx new file mode 100644 index 000000000..9d1afe800 --- /dev/null +++ b/playground/src/App.tsx @@ -0,0 +1,100 @@ +import { Button } from "./components/ui/button" +import { Input } from "./components/ui/input" + +export default function App() { + return ( +
+
+ {/* Sidebar */} + + + {/* Main content */} +
+
+
+ 1.0.0 + OAS 3.0.0 +
+ +

Geese API

+

+ The Geese API allows for creating and managing wise geese quotes + and syncing the related data with supported systems +

+ + {/* Base URL section */} +
+

BASE URL

+
+ http://localhost:8788/requestor +
+
+ + {/* Client Libraries section */} +
+

CLIENT LIBRARIES

+
+ + + +
+
+
+
+
+
+ ) +} diff --git a/playground/src/assets/react.svg b/playground/src/assets/react.svg new file mode 100644 index 000000000..6c87de9bb --- /dev/null +++ b/playground/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playground/src/components/ui/button.tsx b/playground/src/components/ui/button.tsx new file mode 100644 index 000000000..65d4fcd9c --- /dev/null +++ b/playground/src/components/ui/button.tsx @@ -0,0 +1,57 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + { + variants: { + variant: { + default: + "bg-primary text-primary-foreground shadow hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", + outline: + "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2", + sm: "h-8 rounded-md px-3 text-xs", + lg: "h-10 rounded-md px-8", + icon: "h-9 w-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/playground/src/components/ui/input.tsx b/playground/src/components/ui/input.tsx new file mode 100644 index 000000000..69b64fb24 --- /dev/null +++ b/playground/src/components/ui/input.tsx @@ -0,0 +1,22 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +const Input = React.forwardRef>( + ({ className, type, ...props }, ref) => { + return ( + + ) + } +) +Input.displayName = "Input" + +export { Input } diff --git a/playground/src/index.css b/playground/src/index.css new file mode 100644 index 000000000..9de0433bd --- /dev/null +++ b/playground/src/index.css @@ -0,0 +1,137 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + --popover: 0 0% 100%; + --popover-foreground: 240 10% 3.9%; + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + --ring: 240 10% 3.9%; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + --radius: 0.5rem; + } + .dark { + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + --muted: 240 3.7% 15.9%; + --muted-foreground: 240 5% 64.9%; + --accent: 240 3.7% 15.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + --ring: 240 4.9% 83.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/playground/src/lib/utils.ts b/playground/src/lib/utils.ts new file mode 100644 index 000000000..bd0c391dd --- /dev/null +++ b/playground/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/playground/src/main.tsx b/playground/src/main.tsx new file mode 100644 index 000000000..bef5202a3 --- /dev/null +++ b/playground/src/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import './index.css' +import App from './App.tsx' + +createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/playground/src/vite-env.d.ts b/playground/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/playground/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/playground/tailwind.config.js b/playground/tailwind.config.js new file mode 100644 index 000000000..1422e4008 --- /dev/null +++ b/playground/tailwind.config.js @@ -0,0 +1,58 @@ +/** @type {import('tailwindcss').Config} */ +export default { + darkMode: ["class"], + content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}"], + theme: { + extend: { + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)' + }, + colors: { + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))' + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))' + }, + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))' + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))' + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))' + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))' + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))' + }, + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + chart: { + '1': 'hsl(var(--chart-1))', + '2': 'hsl(var(--chart-2))', + '3': 'hsl(var(--chart-3))', + '4': 'hsl(var(--chart-4))', + '5': 'hsl(var(--chart-5))' + } + } + } + }, + plugins: [require("tailwindcss-animate")], +}; + diff --git a/playground/tsconfig.app.json b/playground/tsconfig.app.json new file mode 100644 index 000000000..2ed01044f --- /dev/null +++ b/playground/tsconfig.app.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true, + + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["src"] +} diff --git a/playground/tsconfig.json b/playground/tsconfig.json new file mode 100644 index 000000000..fec8c8e5c --- /dev/null +++ b/playground/tsconfig.json @@ -0,0 +1,13 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/playground/tsconfig.node.json b/playground/tsconfig.node.json new file mode 100644 index 000000000..db0becc8b --- /dev/null +++ b/playground/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/playground/vite.config.ts b/playground/vite.config.ts new file mode 100644 index 000000000..45dd1c232 --- /dev/null +++ b/playground/vite.config.ts @@ -0,0 +1,13 @@ +import path from "node:path"; +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react-swc"; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + "@": path.resolve(__dirname, "./src"), + }, + }, +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab7e1961d..7856a1564 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -650,6 +650,79 @@ importers: specifier: ^3.23.8 version: 3.23.8 + playground: + dependencies: + '@radix-ui/react-slot': + specifier: ^1.1.0 + version: 1.1.0(@types/react@18.3.18)(react@18.3.1) + class-variance-authority: + specifier: ^0.7.1 + version: 0.7.1 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + lucide-react: + specifier: ^0.471.1 + version: 0.471.1(react@18.3.1) + react: + specifier: ^18.3.1 + version: 18.3.1 + react-dom: + specifier: ^18.3.1 + version: 18.3.1(react@18.3.1) + tailwind-merge: + specifier: ^2.5.5 + version: 2.5.5 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.15) + devDependencies: + '@eslint/js': + specifier: ^9.17.0 + version: 9.18.0 + '@types/node': + specifier: ^22.10.5 + version: 22.10.5 + '@types/react': + specifier: ^18.3.18 + version: 18.3.18 + '@types/react-dom': + specifier: ^18.3.5 + version: 18.3.5(@types/react@18.3.18) + '@vitejs/plugin-react-swc': + specifier: ^3.5.0 + version: 3.7.2(@swc/helpers@0.5.13)(vite@6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1)) + autoprefixer: + specifier: ^10.4.20 + version: 10.4.20(postcss@8.4.49) + eslint: + specifier: ^9.17.0 + version: 9.18.0(jiti@1.21.6) + eslint-plugin-react-hooks: + specifier: ^5.0.0 + version: 5.1.0(eslint@9.18.0(jiti@1.21.6)) + eslint-plugin-react-refresh: + specifier: ^0.4.16 + version: 0.4.18(eslint@9.18.0(jiti@1.21.6)) + globals: + specifier: ^15.14.0 + version: 15.14.0 + postcss: + specifier: ^8.4.49 + version: 8.4.49 + tailwindcss: + specifier: ^3.4.15 + version: 3.4.15 + typescript: + specifier: ~5.6.2 + version: 5.6.2 + typescript-eslint: + specifier: ^8.18.2 + version: 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + vite: + specifier: ^6.0.5 + version: 6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + studio: dependencies: '@codemirror/autocomplete': @@ -1818,6 +1891,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.17.19': resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} @@ -1854,6 +1933,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.17.19': resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} @@ -1890,6 +1975,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.17.19': resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} engines: {node: '>=12'} @@ -1926,6 +2017,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.17.19': resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} @@ -1962,6 +2059,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.17.19': resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} @@ -1998,6 +2101,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.17.19': resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} engines: {node: '>=12'} @@ -2034,6 +2143,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.17.19': resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} engines: {node: '>=12'} @@ -2070,6 +2185,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.17.19': resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} @@ -2106,6 +2227,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.17.19': resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} engines: {node: '>=12'} @@ -2142,6 +2269,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.17.19': resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} @@ -2178,6 +2311,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.17.19': resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} @@ -2214,6 +2353,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.17.19': resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} engines: {node: '>=12'} @@ -2250,6 +2395,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.17.19': resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} engines: {node: '>=12'} @@ -2286,6 +2437,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.17.19': resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} @@ -2322,6 +2479,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.17.19': resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} @@ -2358,6 +2521,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.17.19': resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} @@ -2394,6 +2563,18 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.17.19': resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} engines: {node: '>=12'} @@ -2430,6 +2611,12 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.23.1': resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} @@ -2442,6 +2629,12 @@ packages: cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.17.19': resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} @@ -2478,6 +2671,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.17.19': resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} engines: {node: '>=12'} @@ -2514,6 +2713,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.17.19': resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} @@ -2550,6 +2755,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.17.19': resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} engines: {node: '>=12'} @@ -2586,6 +2797,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.17.19': resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} @@ -2622,6 +2839,46 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.19.1': + resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.10.0': + resolution: {integrity: sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.18.0': + resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.5': + resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.5': + resolution: {integrity: sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@expressive-code/core@0.35.6': resolution: {integrity: sha512-xGqCkmfkgT7lr/rvmfnYdDSeTdCSp1otAHgoFS6wNEeO7wGDPpxdosVqYiIcQ8CfWUABh/pGqWG90q+MV3824A==} @@ -2735,6 +2992,26 @@ packages: '@huggingface/tasks@0.12.30': resolution: {integrity: sha512-A1ITdxbEzx9L8wKR8pF7swyrTLxWNDFIGDLUWInxvks2ruQ8PLRBZe8r0EcjC3CDdtlj9jV1V4cgV35K/iy3GQ==} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} + '@iarna/toml@2.2.5': resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} @@ -4706,6 +4983,9 @@ packages: '@types/node@22.10.1': resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + '@types/papaparse@5.3.15': resolution: {integrity: sha512-JHe6vF6x/8Z85nCX4yFdDslN11d+1pr12E526X8WAfhadOeaOTx5AuIkvDKIBopfvlzpzkdMx4YyvSKCM9oqtw==} @@ -4721,9 +5001,17 @@ packages: '@types/react-dom@18.3.1': resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} + '@types/react-dom@18.3.5': + resolution: {integrity: sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==} + peerDependencies: + '@types/react': ^18.0.0 + '@types/react@18.3.12': resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} + '@types/react@18.3.18': + resolution: {integrity: sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==} + '@types/resolve@1.20.6': resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} @@ -4772,6 +5060,53 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + '@typescript-eslint/eslint-plugin@8.19.1': + resolution: {integrity: sha512-tJzcVyvvb9h/PB96g30MpxACd9IrunT7GF9wfA9/0TJ1LxGOJx1TdPzSbBBnNED7K9Ka8ybJsnEpiXPktolTLg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + + '@typescript-eslint/parser@8.19.1': + resolution: {integrity: sha512-67gbfv8rAwawjYx3fYArwldTQKoYfezNUT4D5ioWetr/xCrxXxvleo3uuiFuKfejipvq+og7mjz3b0G2bVyUCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + + '@typescript-eslint/scope-manager@8.19.1': + resolution: {integrity: sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.19.1': + resolution: {integrity: sha512-Rp7k9lhDKBMRJB/nM9Ksp1zs4796wVNyihG9/TU9R6KCJDNkQbc2EOKjrBtLYh3396ZdpXLtr/MkaSEmNMtykw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + + '@typescript-eslint/types@8.19.1': + resolution: {integrity: sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.19.1': + resolution: {integrity: sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.8.0' + + '@typescript-eslint/utils@8.19.1': + resolution: {integrity: sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + + '@typescript-eslint/visitor-keys@8.19.1': + resolution: {integrity: sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript/vfs@1.6.0': resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} peerDependencies: @@ -5029,6 +5364,9 @@ packages: ajv: optional: true + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} @@ -5748,6 +6086,9 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -6368,6 +6709,11 @@ packages: engines: {node: '>=18'} hasBin: true + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -6387,15 +6733,64 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + eslint-plugin-react-hooks@5.1.0: + resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 + + eslint-plugin-react-refresh@0.4.18: + resolution: {integrity: sha512-IRGEoFn3OKalm3hjfolEWGqoF/jPqeEYFp+C8B0WMzwGwBMvlRDQd06kghDhF0C61uJ6WfSDhEZE/sAQjduKgw==} + peerDependencies: + eslint: '>=8.40' + + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.18.0: + resolution: {integrity: sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + esm@3.2.25: resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==} engines: {node: '>=6'} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + estree-util-attach-comments@3.0.0: resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} @@ -6423,6 +6818,10 @@ packages: estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -6513,6 +6912,9 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.0.3: resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} @@ -6566,6 +6968,10 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + file-type@17.1.6: resolution: {integrity: sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6601,6 +7007,10 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6612,9 +7022,16 @@ packages: find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + flatbuffers@1.12.0: resolution: {integrity: sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==} + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + flattie@1.1.1: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} @@ -6802,6 +7219,14 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.14.0: + resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} + engines: {node: '>=18'} + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -6827,6 +7252,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql-request@6.1.0: resolution: {integrity: sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==} peerDependencies: @@ -7280,12 +7708,18 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -7372,6 +7806,10 @@ packages: resolution: {integrity: sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + libsql@0.4.7: resolution: {integrity: sha512-T9eIRCs6b0J1SHKYIvD8+KCJMcWZ900iZyxdnSCdqxN12Z1ijzT+jY5nrk72Jw4B0HGzms2NgpryArlJqvc3Lw==} os: [darwin, linux, win32] @@ -7492,6 +7930,10 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7593,6 +8035,11 @@ packages: resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==} engines: {node: 14 || >=16.14} + lucide-react@0.471.1: + resolution: {integrity: sha512-syOxwPhf62gg2YOsz72HRn+CIpeudFy67AeKnSR8Hn/fIIF4ubhNbRF+pQ2CaJrl+X9Os4PL87z2DXQi3DVeDA==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + magic-bytes.js@1.10.0: resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==} @@ -8001,6 +8448,9 @@ packages: napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + nearley@2.20.1: resolution: {integrity: sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==} hasBin: true @@ -8203,6 +8653,10 @@ packages: option@0.2.4: resolution: {integrity: sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -8242,6 +8696,10 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8258,6 +8716,10 @@ packages: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8575,6 +9037,10 @@ packages: resolution: {integrity: sha512-gYBeFTZLu055D8Vv3cSPox/0iTPtkzxpLroSYYA7WXgRi31WCJ51Uyl8ZiPeUUjyvs2MBzK+S8v9JVUgHU/Sqw==} engines: {node: '>=18.12'} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier-plugin-astro@0.14.1: resolution: {integrity: sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==} engines: {node: ^14.15.0 || >=16.0.0} @@ -9361,6 +9827,10 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + strip-literal@2.1.1: resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} @@ -9580,6 +10050,12 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + ts-api-utils@2.0.0: + resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-error@1.0.6: resolution: {integrity: sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==} @@ -9658,6 +10134,10 @@ packages: turbo-stream@2.4.0: resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + type-detect@4.1.0: resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} engines: {node: '>=4'} @@ -9695,6 +10175,13 @@ packages: typescript-auto-import-cache@0.3.5: resolution: {integrity: sha512-fAIveQKsoYj55CozUiBoj4b/7WpN0i4o74wiGY5JVUEoD0XiqDk1tJqTEjgzL2/AizKQrXxyRosSebyDzBZKjw==} + typescript-eslint@8.19.1: + resolution: {integrity: sha512-LKPUQpdEMVOeKluHi8md7rwLcoXHhwvWp3x+sJkMuq3gGm9yaYJtPo8sRZSblMFJ5pcOGCAak/scKf1mvZDlQw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.8.0' + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -9806,6 +10293,9 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-join@4.0.1: resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} @@ -9916,17 +10406,53 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vite@6.0.1: + resolution: {integrity: sha512-Ldn6gorLGr4mCdFnmeAOLweJxZ34HjKnDm4HGo6P66IEqTxQb36VEdFJQENKxWjupNfoIjvRUnswjn1hpYEpjQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' less: '*' lightningcss: ^1.21.0 sass: '*' sass-embedded: '*' stylus: '*' sugarss: '*' - terser: ^5.4.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 peerDependenciesMeta: '@types/node': optional: true + jiti: + optional: true less: optional: true lightningcss: @@ -9941,9 +10467,13 @@ packages: optional: true terser: optional: true + tsx: + optional: true + yaml: + optional: true - vite@6.0.1: - resolution: {integrity: sha512-Ldn6gorLGr4mCdFnmeAOLweJxZ34HjKnDm4HGo6P66IEqTxQb36VEdFJQENKxWjupNfoIjvRUnswjn1hpYEpjQ==} + vite@6.0.7: + resolution: {integrity: sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: @@ -10254,6 +10784,10 @@ packages: resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} engines: {node: '>= 12.0.0'} + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -10378,6 +10912,10 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + yocto-queue@1.1.1: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} @@ -11910,6 +12448,9 @@ snapshots: '@esbuild/aix-ppc64@0.24.0': optional: true + '@esbuild/aix-ppc64@0.24.2': + optional: true + '@esbuild/android-arm64@0.17.19': optional: true @@ -11928,6 +12469,9 @@ snapshots: '@esbuild/android-arm64@0.24.0': optional: true + '@esbuild/android-arm64@0.24.2': + optional: true + '@esbuild/android-arm@0.17.19': optional: true @@ -11946,6 +12490,9 @@ snapshots: '@esbuild/android-arm@0.24.0': optional: true + '@esbuild/android-arm@0.24.2': + optional: true + '@esbuild/android-x64@0.17.19': optional: true @@ -11964,6 +12511,9 @@ snapshots: '@esbuild/android-x64@0.24.0': optional: true + '@esbuild/android-x64@0.24.2': + optional: true + '@esbuild/darwin-arm64@0.17.19': optional: true @@ -11982,6 +12532,9 @@ snapshots: '@esbuild/darwin-arm64@0.24.0': optional: true + '@esbuild/darwin-arm64@0.24.2': + optional: true + '@esbuild/darwin-x64@0.17.19': optional: true @@ -12000,6 +12553,9 @@ snapshots: '@esbuild/darwin-x64@0.24.0': optional: true + '@esbuild/darwin-x64@0.24.2': + optional: true + '@esbuild/freebsd-arm64@0.17.19': optional: true @@ -12018,6 +12574,9 @@ snapshots: '@esbuild/freebsd-arm64@0.24.0': optional: true + '@esbuild/freebsd-arm64@0.24.2': + optional: true + '@esbuild/freebsd-x64@0.17.19': optional: true @@ -12036,6 +12595,9 @@ snapshots: '@esbuild/freebsd-x64@0.24.0': optional: true + '@esbuild/freebsd-x64@0.24.2': + optional: true + '@esbuild/linux-arm64@0.17.19': optional: true @@ -12054,6 +12616,9 @@ snapshots: '@esbuild/linux-arm64@0.24.0': optional: true + '@esbuild/linux-arm64@0.24.2': + optional: true + '@esbuild/linux-arm@0.17.19': optional: true @@ -12072,6 +12637,9 @@ snapshots: '@esbuild/linux-arm@0.24.0': optional: true + '@esbuild/linux-arm@0.24.2': + optional: true + '@esbuild/linux-ia32@0.17.19': optional: true @@ -12090,6 +12658,9 @@ snapshots: '@esbuild/linux-ia32@0.24.0': optional: true + '@esbuild/linux-ia32@0.24.2': + optional: true + '@esbuild/linux-loong64@0.17.19': optional: true @@ -12108,6 +12679,9 @@ snapshots: '@esbuild/linux-loong64@0.24.0': optional: true + '@esbuild/linux-loong64@0.24.2': + optional: true + '@esbuild/linux-mips64el@0.17.19': optional: true @@ -12126,6 +12700,9 @@ snapshots: '@esbuild/linux-mips64el@0.24.0': optional: true + '@esbuild/linux-mips64el@0.24.2': + optional: true + '@esbuild/linux-ppc64@0.17.19': optional: true @@ -12144,6 +12721,9 @@ snapshots: '@esbuild/linux-ppc64@0.24.0': optional: true + '@esbuild/linux-ppc64@0.24.2': + optional: true + '@esbuild/linux-riscv64@0.17.19': optional: true @@ -12162,6 +12742,9 @@ snapshots: '@esbuild/linux-riscv64@0.24.0': optional: true + '@esbuild/linux-riscv64@0.24.2': + optional: true + '@esbuild/linux-s390x@0.17.19': optional: true @@ -12180,6 +12763,9 @@ snapshots: '@esbuild/linux-s390x@0.24.0': optional: true + '@esbuild/linux-s390x@0.24.2': + optional: true + '@esbuild/linux-x64@0.17.19': optional: true @@ -12198,6 +12784,12 @@ snapshots: '@esbuild/linux-x64@0.24.0': optional: true + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + '@esbuild/netbsd-x64@0.17.19': optional: true @@ -12216,12 +12808,18 @@ snapshots: '@esbuild/netbsd-x64@0.24.0': optional: true + '@esbuild/netbsd-x64@0.24.2': + optional: true + '@esbuild/openbsd-arm64@0.23.1': optional: true '@esbuild/openbsd-arm64@0.24.0': optional: true + '@esbuild/openbsd-arm64@0.24.2': + optional: true + '@esbuild/openbsd-x64@0.17.19': optional: true @@ -12240,6 +12838,9 @@ snapshots: '@esbuild/openbsd-x64@0.24.0': optional: true + '@esbuild/openbsd-x64@0.24.2': + optional: true + '@esbuild/sunos-x64@0.17.19': optional: true @@ -12258,6 +12859,9 @@ snapshots: '@esbuild/sunos-x64@0.24.0': optional: true + '@esbuild/sunos-x64@0.24.2': + optional: true + '@esbuild/win32-arm64@0.17.19': optional: true @@ -12276,6 +12880,9 @@ snapshots: '@esbuild/win32-arm64@0.24.0': optional: true + '@esbuild/win32-arm64@0.24.2': + optional: true + '@esbuild/win32-ia32@0.17.19': optional: true @@ -12294,6 +12901,9 @@ snapshots: '@esbuild/win32-ia32@0.24.0': optional: true + '@esbuild/win32-ia32@0.24.2': + optional: true + '@esbuild/win32-x64@0.17.19': optional: true @@ -12312,6 +12922,51 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true + '@esbuild/win32-x64@0.24.2': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@9.18.0(jiti@1.21.6))': + dependencies: + eslint: 9.18.0(jiti@1.21.6) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.19.1': + dependencies: + '@eslint/object-schema': 2.1.5 + debug: 4.4.0 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.10.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.4.0 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.18.0': {} + + '@eslint/object-schema@2.1.5': {} + + '@eslint/plugin-kit@0.2.5': + dependencies: + '@eslint/core': 0.10.0 + levn: 0.4.1 + '@expressive-code/core@0.35.6': dependencies: '@ctrl/tinycolor': 4.1.0 @@ -12461,6 +13116,19 @@ snapshots: '@huggingface/tasks@0.12.30': {} + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + '@iarna/toml@2.2.5': {} '@iconify-json/lucide@1.2.16': @@ -13533,6 +14201,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.18)(react@18.3.1)': + dependencies: + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-context@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 @@ -13830,6 +14504,13 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-slot@1.1.0(@types/react@18.3.18)(react@18.3.1)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.18)(react@18.3.1) + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-switch@1.1.1(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14736,6 +15417,10 @@ snapshots: dependencies: undici-types: 6.20.0 + '@types/node@22.10.5': + dependencies: + undici-types: 6.20.0 + '@types/papaparse@5.3.15': dependencies: '@types/node': 22.10.1 @@ -14758,11 +15443,20 @@ snapshots: dependencies: '@types/react': 18.3.12 + '@types/react-dom@18.3.5(@types/react@18.3.18)': + dependencies: + '@types/react': 18.3.18 + '@types/react@18.3.12': dependencies: '@types/prop-types': 15.7.13 csstype: 3.1.3 + '@types/react@18.3.18': + dependencies: + '@types/prop-types': 15.7.13 + csstype: 3.1.3 + '@types/resolve@1.20.6': {} '@types/responselike@1.0.3': @@ -14809,6 +15503,83 @@ snapshots: '@types/node': 22.10.1 optional: true + '@typescript-eslint/eslint-plugin@8.19.1(@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.19.1 + '@typescript-eslint/type-utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.19.1 + eslint: 9.18.0(jiti@1.21.6) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 2.0.0(typescript@5.6.2) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.19.1 + '@typescript-eslint/types': 8.19.1 + '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.19.1 + debug: 4.4.0 + eslint: 9.18.0(jiti@1.21.6) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.19.1': + dependencies: + '@typescript-eslint/types': 8.19.1 + '@typescript-eslint/visitor-keys': 8.19.1 + + '@typescript-eslint/type-utils@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) + '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + debug: 4.4.0 + eslint: 9.18.0(jiti@1.21.6) + ts-api-utils: 2.0.0(typescript@5.6.2) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.19.1': {} + + '@typescript-eslint/typescript-estree@8.19.1(typescript@5.6.2)': + dependencies: + '@typescript-eslint/types': 8.19.1 + '@typescript-eslint/visitor-keys': 8.19.1 + debug: 4.4.0 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 2.0.0(typescript@5.6.2) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.19.1 + '@typescript-eslint/types': 8.19.1 + '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) + eslint: 9.18.0(jiti@1.21.6) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.19.1': + dependencies: + '@typescript-eslint/types': 8.19.1 + eslint-visitor-keys: 4.2.0 + '@typescript/vfs@1.6.0(typescript@5.7.2)': dependencies: debug: 4.4.0(supports-color@8.1.1) @@ -14874,6 +15645,13 @@ snapshots: transitivePeerDependencies: - '@swc/helpers' + '@vitejs/plugin-react-swc@3.7.2(@swc/helpers@0.5.13)(vite@6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1))': + dependencies: + '@swc/core': 1.9.3(@swc/helpers@0.5.13) + vite: 6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + transitivePeerDependencies: + - '@swc/helpers' + '@vitest/expect@1.6.0': dependencies: '@vitest/spy': 1.6.0 @@ -15186,6 +15964,13 @@ snapshots: optionalDependencies: ajv: 8.17.1 + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 @@ -16004,6 +16789,10 @@ snapshots: optionalDependencies: supports-color: 5.5.0 + debug@4.4.0: + dependencies: + ms: 2.1.3 + debug@4.4.0(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -16035,6 +16824,8 @@ snapshots: deep-extend@0.6.0: {} + deep-is@0.1.4: {} + deepmerge@4.3.1: {} defaults@1.0.4: @@ -16464,6 +17255,34 @@ snapshots: '@esbuild/win32-ia32': 0.24.0 '@esbuild/win32-x64': 0.24.0 + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + escalade@3.2.0: {} escape-html@1.0.3: {} @@ -16474,11 +17293,85 @@ snapshots: escape-string-regexp@5.0.0: {} + eslint-plugin-react-hooks@5.1.0(eslint@9.18.0(jiti@1.21.6)): + dependencies: + eslint: 9.18.0(jiti@1.21.6) + + eslint-plugin-react-refresh@0.4.18(eslint@9.18.0(jiti@1.21.6)): + dependencies: + eslint: 9.18.0(jiti@1.21.6) + + eslint-scope@8.2.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint@9.18.0(jiti@1.21.6): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.6)) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.1 + '@eslint/core': 0.10.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.18.0 + '@eslint/plugin-kit': 0.2.5 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.0 + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 1.21.6 + transitivePeerDependencies: + - supports-color + esm@3.2.25: optional: true + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + esprima@4.0.1: {} + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + estree-util-attach-comments@3.0.0: dependencies: '@types/estree': 1.0.6 @@ -16516,6 +17409,8 @@ snapshots: dependencies: '@types/estree': 1.0.6 + esutils@2.0.3: {} + event-target-shim@5.0.1: {} eventemitter3@4.0.7: {} @@ -16624,6 +17519,8 @@ snapshots: fast-json-stable-stringify@2.1.0: {} + fast-levenshtein@2.0.6: {} + fast-uri@3.0.3: {} fast-xml-parser@4.4.1: @@ -16677,6 +17574,10 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + file-type@17.1.6: dependencies: readable-web-to-node-stream: 3.0.2 @@ -16713,6 +17614,11 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + find-up@6.3.0: dependencies: locate-path: 7.2.0 @@ -16727,8 +17633,15 @@ snapshots: micromatch: 4.0.8 pkg-dir: 4.2.0 + flat-cache@4.0.1: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + flatbuffers@1.12.0: {} + flatted@3.3.2: {} + flattie@1.1.1: {} fn.name@1.1.0: {} @@ -16927,6 +17840,10 @@ snapshots: globals@11.12.0: {} + globals@14.0.0: {} + + globals@15.14.0: {} + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -16970,6 +17887,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + graphql-request@6.1.0(encoding@0.1.13)(graphql@16.9.0): dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) @@ -17524,10 +18443,14 @@ snapshots: json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} json-schema@0.4.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} jsonc-parser@2.3.1: {} @@ -17643,6 +18566,11 @@ snapshots: leven@4.0.0: {} + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + libsql@0.4.7: dependencies: '@neon-rs/load': 0.0.4 @@ -17815,6 +18743,10 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + locate-path@7.2.0: dependencies: p-locate: 6.0.0 @@ -17907,6 +18839,10 @@ snapshots: lru-cache@9.1.2: {} + lucide-react@0.471.1(react@18.3.1): + dependencies: + react: 18.3.1 + magic-bytes.js@1.10.0: {} magic-string@0.25.9: @@ -18587,6 +19523,8 @@ snapshots: napi-build-utils@1.0.2: {} + natural-compare@1.4.0: {} + nearley@2.20.1: dependencies: commander: 2.20.3 @@ -18846,6 +19784,15 @@ snapshots: option@0.2.4: {} + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + ora@5.4.1: dependencies: bl: 4.1.0 @@ -18904,6 +19851,10 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-limit@4.0.0: dependencies: yocto-queue: 1.1.1 @@ -18920,6 +19871,10 @@ snapshots: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-locate@6.0.0: dependencies: p-limit: 4.0.0 @@ -19157,7 +20112,7 @@ snapshots: postcss-load-config@4.0.2(postcss@8.4.49): dependencies: - lilconfig: 3.1.2 + lilconfig: 3.1.3 yaml: 2.6.1 optionalDependencies: postcss: 8.4.49 @@ -19222,6 +20177,8 @@ snapshots: find-yarn-workspace-root2: 1.2.16 which-pm: 3.0.0 + prelude-ls@1.2.1: {} + prettier-plugin-astro@0.14.1: dependencies: '@astrojs/compiler': 2.10.3 @@ -20162,6 +21119,8 @@ snapshots: strip-json-comments@2.0.1: {} + strip-json-comments@3.1.1: {} + strip-literal@2.1.1: dependencies: js-tokens: 9.0.1 @@ -20430,6 +21389,10 @@ snapshots: trough@2.2.0: {} + ts-api-utils@2.0.0(typescript@5.6.2): + dependencies: + typescript: 5.6.2 + ts-error@1.0.6: {} ts-essentials@9.4.2(typescript@5.7.2): @@ -20543,6 +21506,10 @@ snapshots: turbo-stream@2.4.0: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + type-detect@4.1.0: {} type-fest@0.20.2: {} @@ -20567,6 +21534,16 @@ snapshots: dependencies: semver: 7.6.3 + typescript-eslint@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.19.1(@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) + eslint: 9.18.0(jiti@1.21.6) + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + typescript@5.6.2: {} typescript@5.7.2: {} @@ -20690,6 +21667,10 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + url-join@4.0.1: {} url-join@5.0.0: {} @@ -20878,6 +21859,19 @@ snapshots: tsx: 4.19.2 yaml: 2.6.1 + vite@6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): + dependencies: + esbuild: 0.24.2 + postcss: 8.4.49 + rollup: 4.28.1 + optionalDependencies: + '@types/node': 22.10.5 + fsevents: 2.3.3 + jiti: 1.21.6 + lightningcss: 1.28.1 + tsx: 4.19.2 + yaml: 2.6.1 + vitefu@1.0.4(vite@5.4.11(@types/node@22.10.1)(lightningcss@1.28.1)): optionalDependencies: vite: 5.4.11(@types/node@22.10.1)(lightningcss@1.28.1) @@ -21228,6 +22222,8 @@ snapshots: triple-beam: 1.4.1 winston-transport: 4.9.0 + word-wrap@1.2.5: {} + wordwrap@1.0.0: {} workerd@1.20241106.1: @@ -21427,6 +22423,8 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 + yocto-queue@0.1.0: {} + yocto-queue@1.1.1: {} youch@3.3.4: From b15084f46c9122033dcdd98ea80dc76db812c645 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Mon, 13 Jan 2025 15:09:01 +0100 Subject: [PATCH 004/108] Use port 6660 for playground vite server --- playground/vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 45dd1c232..d0b190d52 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -10,4 +10,7 @@ export default defineConfig({ "@": path.resolve(__dirname, "./src"), }, }, + server: { + port: 6660, + }, }) From 5c99caaa76757ec291714a6503adee52a4bd148e Mon Sep 17 00:00:00 2001 From: Laurynas Keturakis Date: Mon, 13 Jan 2025 15:24:16 +0100 Subject: [PATCH 005/108] unify the playground into the monorepo setup --- playground/biome.jsonc | 22 + playground/components.json | 2 +- playground/eslint.config.js | 24 +- playground/package.json | 8 +- playground/postcss.config.js | 2 +- playground/src/App.tsx | 60 +- playground/src/components/ui/button.tsx | 26 +- playground/src/components/ui/input.tsx | 16 +- playground/src/lib/utils.ts | 6 +- playground/src/main.tsx | 12 +- playground/tailwind.config.js | 103 ++-- playground/vite.config.ts | 4 +- pnpm-lock.yaml | 789 +++++------------------- pnpm-workspace.yaml | 1 + 14 files changed, 316 insertions(+), 759 deletions(-) create mode 100644 playground/biome.jsonc diff --git a/playground/biome.jsonc b/playground/biome.jsonc new file mode 100644 index 000000000..cd928dfd7 --- /dev/null +++ b/playground/biome.jsonc @@ -0,0 +1,22 @@ +{ + "$schema": "../node_modules/@biomejs/biome/configuration_schema.json", + "extends": ["../biome.jsonc"], + "files": { + "ignore": ["dist", "node_modules"] + }, + "overrides": [ + { + "include": ["src"], + "linter": { + "enabled": true, + "rules": { + "suspicious": { + "noArrayIndexKey": { + "level": "off" + } + } + } + } + } + ] +} diff --git a/playground/components.json b/playground/components.json index 51d59d26d..275d4164c 100644 --- a/playground/components.json +++ b/playground/components.json @@ -18,4 +18,4 @@ "hooks": "@/hooks" }, "iconLibrary": "lucide" -} \ No newline at end of file +} diff --git a/playground/eslint.config.js b/playground/eslint.config.js index 092408a9f..f6acaea80 100644 --- a/playground/eslint.config.js +++ b/playground/eslint.config.js @@ -1,28 +1,28 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' -import tseslint from 'typescript-eslint' +import js from "@eslint/js"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import globals from "globals"; +import tseslint from "typescript-eslint"; export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ["dist"] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ['**/*.{ts,tsx}'], + files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, + "react-hooks": reactHooks, + "react-refresh": reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, }, -) +); diff --git a/playground/package.json b/playground/package.json index 86189922d..dd20328d6 100644 --- a/playground/package.json +++ b/playground/package.json @@ -6,7 +6,8 @@ "scripts": { "dev": "vite", "build": "tsc -b && vite build", - "lint": "eslint .", + "lint": "biome lint .", + "format": "biome check . --write", "preview": "vite preview" }, "dependencies": { @@ -26,14 +27,11 @@ "@types/react-dom": "^18.3.5", "@vitejs/plugin-react-swc": "^3.5.0", "autoprefixer": "^10.4.20", - "eslint": "^9.17.0", - "eslint-plugin-react-hooks": "^5.0.0", - "eslint-plugin-react-refresh": "^0.4.16", + "@biomejs/biome": "^1.9.4", "globals": "^15.14.0", "postcss": "^8.4.49", "tailwindcss": "^3.4.15", "typescript": "~5.6.2", - "typescript-eslint": "^8.18.2", "vite": "^6.0.5" } } diff --git a/playground/postcss.config.js b/playground/postcss.config.js index 2e7af2b7f..2aa7205d4 100644 --- a/playground/postcss.config.js +++ b/playground/postcss.config.js @@ -3,4 +3,4 @@ export default { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/playground/src/App.tsx b/playground/src/App.tsx index 9d1afe800..02c592ac5 100644 --- a/playground/src/App.tsx +++ b/playground/src/App.tsx @@ -1,5 +1,5 @@ -import { Button } from "./components/ui/button" -import { Input } from "./components/ui/input" +import { Button } from "./components/ui/button"; +import { Input } from "./components/ui/input"; export default function App() { return ( @@ -13,11 +13,11 @@ export default function App() { API docs - +
- @@ -27,8 +27,8 @@ export default function App() { {/* Navigation */}
- ) + ); } diff --git a/playground/src/components/ui/button.tsx b/playground/src/components/ui/button.tsx index 65d4fcd9c..76f1b90f4 100644 --- a/playground/src/components/ui/button.tsx +++ b/playground/src/components/ui/button.tsx @@ -1,8 +1,8 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import { Slot } from "@radix-ui/react-slot"; +import { type VariantProps, cva } from "class-variance-authority"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", @@ -31,27 +31,27 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps { - asChild?: boolean + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : "button"; return ( - ) - } -) -Button.displayName = "Button" + ); + }, +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/playground/src/components/ui/input.tsx b/playground/src/components/ui/input.tsx index 69b64fb24..7db524115 100644 --- a/playground/src/components/ui/input.tsx +++ b/playground/src/components/ui/input.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Input = React.forwardRef>( ({ className, type, ...props }, ref) => { @@ -9,14 +9,14 @@ const Input = React.forwardRef>( type={type} className={cn( "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", - className + className, )} ref={ref} {...props} /> - ) - } -) -Input.displayName = "Input" + ); + }, +); +Input.displayName = "Input"; -export { Input } +export { Input }; diff --git a/playground/src/lib/utils.ts b/playground/src/lib/utils.ts index bd0c391dd..365058ceb 100644 --- a/playground/src/lib/utils.ts +++ b/playground/src/lib/utils.ts @@ -1,6 +1,6 @@ -import { clsx, type ClassValue } from "clsx" -import { twMerge } from "tailwind-merge" +import { type ClassValue, clsx } from "clsx"; +import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)) + return twMerge(clsx(inputs)); } diff --git a/playground/src/main.tsx b/playground/src/main.tsx index bef5202a3..eff7ccc67 100644 --- a/playground/src/main.tsx +++ b/playground/src/main.tsx @@ -1,10 +1,10 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import './index.css' -import App from './App.tsx' +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./index.css"; +import App from "./App.tsx"; -createRoot(document.getElementById('root')!).render( +createRoot(document.getElementById("root")!).render( , -) +); diff --git a/playground/tailwind.config.js b/playground/tailwind.config.js index 1422e4008..248760474 100644 --- a/playground/tailwind.config.js +++ b/playground/tailwind.config.js @@ -1,58 +1,57 @@ /** @type {import('tailwindcss').Config} */ export default { - darkMode: ["class"], - content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}"], + darkMode: ["class"], + content: ["./index.html", "./src/**/*.{ts,tsx,js,jsx}"], theme: { - extend: { - borderRadius: { - lg: 'var(--radius)', - md: 'calc(var(--radius) - 2px)', - sm: 'calc(var(--radius) - 4px)' - }, - colors: { - background: 'hsl(var(--background))', - foreground: 'hsl(var(--foreground))', - card: { - DEFAULT: 'hsl(var(--card))', - foreground: 'hsl(var(--card-foreground))' - }, - popover: { - DEFAULT: 'hsl(var(--popover))', - foreground: 'hsl(var(--popover-foreground))' - }, - primary: { - DEFAULT: 'hsl(var(--primary))', - foreground: 'hsl(var(--primary-foreground))' - }, - secondary: { - DEFAULT: 'hsl(var(--secondary))', - foreground: 'hsl(var(--secondary-foreground))' - }, - muted: { - DEFAULT: 'hsl(var(--muted))', - foreground: 'hsl(var(--muted-foreground))' - }, - accent: { - DEFAULT: 'hsl(var(--accent))', - foreground: 'hsl(var(--accent-foreground))' - }, - destructive: { - DEFAULT: 'hsl(var(--destructive))', - foreground: 'hsl(var(--destructive-foreground))' - }, - border: 'hsl(var(--border))', - input: 'hsl(var(--input))', - ring: 'hsl(var(--ring))', - chart: { - '1': 'hsl(var(--chart-1))', - '2': 'hsl(var(--chart-2))', - '3': 'hsl(var(--chart-3))', - '4': 'hsl(var(--chart-4))', - '5': 'hsl(var(--chart-5))' - } - } - } + extend: { + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + colors: { + background: "hsl(var(--background))", + foreground: "hsl(var(--foreground))", + card: { + DEFAULT: "hsl(var(--card))", + foreground: "hsl(var(--card-foreground))", + }, + popover: { + DEFAULT: "hsl(var(--popover))", + foreground: "hsl(var(--popover-foreground))", + }, + primary: { + DEFAULT: "hsl(var(--primary))", + foreground: "hsl(var(--primary-foreground))", + }, + secondary: { + DEFAULT: "hsl(var(--secondary))", + foreground: "hsl(var(--secondary-foreground))", + }, + muted: { + DEFAULT: "hsl(var(--muted))", + foreground: "hsl(var(--muted-foreground))", + }, + accent: { + DEFAULT: "hsl(var(--accent))", + foreground: "hsl(var(--accent-foreground))", + }, + destructive: { + DEFAULT: "hsl(var(--destructive))", + foreground: "hsl(var(--destructive-foreground))", + }, + border: "hsl(var(--border))", + input: "hsl(var(--input))", + ring: "hsl(var(--ring))", + chart: { + 1: "hsl(var(--chart-1))", + 2: "hsl(var(--chart-2))", + 3: "hsl(var(--chart-3))", + 4: "hsl(var(--chart-4))", + 5: "hsl(var(--chart-5))", + }, + }, + }, }, plugins: [require("tailwindcss-animate")], }; - diff --git a/playground/vite.config.ts b/playground/vite.config.ts index d0b190d52..da7ed529b 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -1,6 +1,6 @@ import path from "node:path"; -import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; +import { defineConfig } from "vite"; // https://vite.dev/config/ export default defineConfig({ @@ -13,4 +13,4 @@ export default defineConfig({ server: { port: 6660, }, -}) +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7856a1564..8c5396f18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -73,10 +73,10 @@ importers: version: 0.28.1 drizzle-orm: specifier: ^0.36.4 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.23.8) + version: 0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8) figlet: specifier: ^1.8.0 version: 1.8.0 @@ -165,7 +165,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.12 version: 4.6.12 @@ -193,7 +193,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.12 version: 4.6.12 @@ -212,7 +212,7 @@ importers: dependencies: drizzle-orm: specifier: ^0.36.4 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.7 version: 4.6.12 @@ -262,10 +262,10 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.23.8) + version: 0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8) hono: specifier: ^4.6.5 version: 4.6.12 @@ -309,7 +309,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.36.0 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.7 version: 4.6.12 @@ -334,7 +334,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.36.0 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) devDependencies: '@cloudflare/workers-types': specifier: ^4.20241106.0 @@ -350,7 +350,7 @@ importers: version: link:../../packages/client-library-otel drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.12 version: 4.6.12 @@ -393,7 +393,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.34.1 - version: 0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) hono: specifier: ^4.6.12 version: 4.6.12 @@ -405,7 +405,7 @@ importers: version: 4.19.2 vitest: specifier: ^2.1.6 - version: 2.1.6(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + version: 2.1.6(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) zod: specifier: ^3.23.8 version: 3.23.8 @@ -460,10 +460,10 @@ importers: version: 0.24.2 drizzle-orm: specifier: ^0.33.0 - version: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + version: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.24.0) + version: 0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.24.0) hono: specifier: ^4.6.13 version: 4.6.13 @@ -573,7 +573,7 @@ importers: version: 5.7.2 vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@22.10.1)(lightningcss@1.28.1) + version: 1.6.0(@types/node@22.10.5)(lightningcss@1.28.1) packages/mcp-server: dependencies: @@ -677,6 +677,9 @@ importers: specifier: ^1.0.7 version: 1.0.7(tailwindcss@3.4.15) devDependencies: + '@biomejs/biome': + specifier: ^1.9.4 + version: 1.9.4 '@eslint/js': specifier: ^9.17.0 version: 9.18.0 @@ -695,15 +698,6 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) - eslint: - specifier: ^9.17.0 - version: 9.18.0(jiti@1.21.6) - eslint-plugin-react-hooks: - specifier: ^5.0.0 - version: 5.1.0(eslint@9.18.0(jiti@1.21.6)) - eslint-plugin-react-refresh: - specifier: ^0.4.16 - version: 0.4.18(eslint@9.18.0(jiti@1.21.6)) globals: specifier: ^15.14.0 version: 15.14.0 @@ -716,9 +710,6 @@ importers: typescript: specifier: ~5.6.2 version: 5.6.2 - typescript-eslint: - specifier: ^8.18.2 - version: 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) vite: specifier: ^6.0.5 version: 6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) @@ -975,13 +966,13 @@ importers: version: 3.2.1 '@astrojs/starlight': specifier: ^0.28.6 - version: 0.28.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) + version: 0.28.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) '@iconify-json/lucide': specifier: ^1.2.16 version: 1.2.16 astro: specifier: ^4.16.16 - version: 4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) + version: 4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) astro-icon: specifier: ^1.1.4 version: 1.1.4 @@ -996,7 +987,7 @@ importers: version: 0.32.6 starlight-package-managers: specifier: ^0.6.0 - version: 0.6.0(@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)))(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) + version: 0.6.0(@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)))(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) tailwindcss: specifier: ^3.4.15 version: 3.4.15 @@ -2845,40 +2836,10 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.1': - resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/config-array@0.19.1': - resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@0.10.0': - resolution: {integrity: sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@3.2.0': - resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.18.0': resolution: {integrity: sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/object-schema@2.1.5': - resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/plugin-kit@0.2.5': - resolution: {integrity: sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@expressive-code/core@0.35.6': resolution: {integrity: sha512-xGqCkmfkgT7lr/rvmfnYdDSeTdCSp1otAHgoFS6wNEeO7wGDPpxdosVqYiIcQ8CfWUABh/pGqWG90q+MV3824A==} @@ -2992,26 +2953,6 @@ packages: '@huggingface/tasks@0.12.30': resolution: {integrity: sha512-A1ITdxbEzx9L8wKR8pF7swyrTLxWNDFIGDLUWInxvks2ruQ8PLRBZe8r0EcjC3CDdtlj9jV1V4cgV35K/iy3GQ==} - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.6': - resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/retry@0.3.1': - resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} - engines: {node: '>=18.18'} - - '@humanwhocodes/retry@0.4.1': - resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} - engines: {node: '>=18.18'} - '@iarna/toml@2.2.5': resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} @@ -5060,53 +5001,6 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.19.1': - resolution: {integrity: sha512-tJzcVyvvb9h/PB96g30MpxACd9IrunT7GF9wfA9/0TJ1LxGOJx1TdPzSbBBnNED7K9Ka8ybJsnEpiXPktolTLg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' - - '@typescript-eslint/parser@8.19.1': - resolution: {integrity: sha512-67gbfv8rAwawjYx3fYArwldTQKoYfezNUT4D5ioWetr/xCrxXxvleo3uuiFuKfejipvq+og7mjz3b0G2bVyUCw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' - - '@typescript-eslint/scope-manager@8.19.1': - resolution: {integrity: sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.19.1': - resolution: {integrity: sha512-Rp7k9lhDKBMRJB/nM9Ksp1zs4796wVNyihG9/TU9R6KCJDNkQbc2EOKjrBtLYh3396ZdpXLtr/MkaSEmNMtykw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' - - '@typescript-eslint/types@8.19.1': - resolution: {integrity: sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@8.19.1': - resolution: {integrity: sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '>=4.8.4 <5.8.0' - - '@typescript-eslint/utils@8.19.1': - resolution: {integrity: sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' - - '@typescript-eslint/visitor-keys@8.19.1': - resolution: {integrity: sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript/vfs@1.6.0': resolution: {integrity: sha512-hvJUjNVeBMp77qPINuUvYXj4FyWeeMMKZkxEATEU3hqBAQ7qdTBCUFT7Sp0Zu0faeEtFf+ldXxMEDr/bk73ISg==} peerDependencies: @@ -5364,9 +5258,6 @@ packages: ajv: optional: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ajv@8.17.1: resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} @@ -6086,9 +5977,6 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -6733,64 +6621,15 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - eslint-plugin-react-hooks@5.1.0: - resolution: {integrity: sha512-mpJRtPgHN2tNAvZ35AMfqeB3Xqeo273QxrHJsbBEPWODRM4r0yB6jfoROqKEYrOn27UtRPpcpHc2UqyBSuUNTw==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - - eslint-plugin-react-refresh@0.4.18: - resolution: {integrity: sha512-IRGEoFn3OKalm3hjfolEWGqoF/jPqeEYFp+C8B0WMzwGwBMvlRDQd06kghDhF0C61uJ6WfSDhEZE/sAQjduKgw==} - peerDependencies: - eslint: '>=8.40' - - eslint-scope@8.2.0: - resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.0: - resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@9.18.0: - resolution: {integrity: sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - esm@3.2.25: resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==} engines: {node: '>=6'} - espree@10.3.0: - resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - estree-util-attach-comments@3.0.0: resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} @@ -6818,10 +6657,6 @@ packages: estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -6912,9 +6747,6 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.0.3: resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} @@ -6968,10 +6800,6 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} - file-type@17.1.6: resolution: {integrity: sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7007,10 +6835,6 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - find-up@6.3.0: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7022,16 +6846,9 @@ packages: find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - flatbuffers@1.12.0: resolution: {integrity: sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==} - flatted@3.3.2: - resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} - flattie@1.1.1: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} @@ -7219,10 +7036,6 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - globals@15.14.0: resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} engines: {node: '>=18'} @@ -7252,9 +7065,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - graphql-request@6.1.0: resolution: {integrity: sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==} peerDependencies: @@ -7708,18 +7518,12 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -7806,10 +7610,6 @@ packages: resolution: {integrity: sha512-puehA3YKku3osqPlNuzGDUHq8WpwXupUg1V6NXdV38G+gr+gkBwFC8g1b/+YcIvp8gnqVIus+eJCH/eGsRmJNw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - libsql@0.4.7: resolution: {integrity: sha512-T9eIRCs6b0J1SHKYIvD8+KCJMcWZ900iZyxdnSCdqxN12Z1ijzT+jY5nrk72Jw4B0HGzms2NgpryArlJqvc3Lw==} os: [darwin, linux, win32] @@ -7930,10 +7730,6 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - locate-path@7.2.0: resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8448,9 +8244,6 @@ packages: napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - nearley@2.20.1: resolution: {integrity: sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==} hasBin: true @@ -8653,10 +8446,6 @@ packages: option@0.2.4: resolution: {integrity: sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==} - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -8696,10 +8485,6 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - p-limit@4.0.0: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -8716,10 +8501,6 @@ packages: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - p-locate@6.0.0: resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -9037,10 +8818,6 @@ packages: resolution: {integrity: sha512-gYBeFTZLu055D8Vv3cSPox/0iTPtkzxpLroSYYA7WXgRi31WCJ51Uyl8ZiPeUUjyvs2MBzK+S8v9JVUgHU/Sqw==} engines: {node: '>=18.12'} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - prettier-plugin-astro@0.14.1: resolution: {integrity: sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==} engines: {node: ^14.15.0 || >=16.0.0} @@ -9827,10 +9604,6 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - strip-literal@2.1.1: resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} @@ -10050,12 +9823,6 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@2.0.0: - resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==} - engines: {node: '>=18.12'} - peerDependencies: - typescript: '>=4.8.4' - ts-error@1.0.6: resolution: {integrity: sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==} @@ -10134,10 +9901,6 @@ packages: turbo-stream@2.4.0: resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - type-detect@4.1.0: resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} engines: {node: '>=4'} @@ -10175,13 +9938,6 @@ packages: typescript-auto-import-cache@0.3.5: resolution: {integrity: sha512-fAIveQKsoYj55CozUiBoj4b/7WpN0i4o74wiGY5JVUEoD0XiqDk1tJqTEjgzL2/AizKQrXxyRosSebyDzBZKjw==} - typescript-eslint@8.19.1: - resolution: {integrity: sha512-LKPUQpdEMVOeKluHi8md7rwLcoXHhwvWp3x+sJkMuq3gGm9yaYJtPo8sRZSblMFJ5pcOGCAak/scKf1mvZDlQw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' - typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -10293,9 +10049,6 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - url-join@4.0.1: resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} @@ -10784,10 +10537,6 @@ packages: resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} engines: {node: '>= 12.0.0'} - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -10912,10 +10661,6 @@ packages: yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - yocto-queue@1.1.1: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} @@ -11302,12 +11047,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@3.1.9(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2))': + '@astrojs/mdx@3.1.9(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2))': dependencies: '@astrojs/markdown-remark': 5.3.0 '@mdx-js/mdx': 3.1.0(acorn@8.14.0) acorn: 8.14.0 - astro: 4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) + astro: 4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) es-module-lexer: 1.5.4 estree-util-visit: 2.0.0 gray-matter: 4.0.3 @@ -11337,15 +11082,15 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.24.0 - '@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2))': + '@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2))': dependencies: - '@astrojs/mdx': 3.1.9(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) + '@astrojs/mdx': 3.1.9(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) '@astrojs/sitemap': 3.2.1 '@pagefind/default-ui': 1.2.0 '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - astro: 4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) - astro-expressive-code: 0.35.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) + astro: 4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) + astro-expressive-code: 0.35.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.3 @@ -12925,48 +12670,8 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.18.0(jiti@1.21.6))': - dependencies: - eslint: 9.18.0(jiti@1.21.6) - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.1': {} - - '@eslint/config-array@0.19.1': - dependencies: - '@eslint/object-schema': 2.1.5 - debug: 4.4.0 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/core@0.10.0': - dependencies: - '@types/json-schema': 7.0.15 - - '@eslint/eslintrc@3.2.0': - dependencies: - ajv: 6.12.6 - debug: 4.4.0 - espree: 10.3.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - '@eslint/js@9.18.0': {} - '@eslint/object-schema@2.1.5': {} - - '@eslint/plugin-kit@0.2.5': - dependencies: - '@eslint/core': 0.10.0 - levn: 0.4.1 - '@expressive-code/core@0.35.6': dependencies: '@ctrl/tinycolor': 4.1.0 @@ -13116,19 +12821,6 @@ snapshots: '@huggingface/tasks@0.12.30': {} - '@humanfs/core@0.19.1': {} - - '@humanfs/node@0.16.6': - dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.3.1 - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/retry@0.3.1': {} - - '@humanwhocodes/retry@0.4.1': {} - '@iarna/toml@2.2.5': {} '@iconify-json/lucide@1.2.16': @@ -13489,7 +13181,7 @@ snapshots: '@llamaindex/core@0.3.7(@aws-crypto/sha256-js@5.2.0)(@xenova/transformers@2.17.2)(gpt-tokenizer@2.8.1)(js-tiktoken@1.0.15)(pathe@1.1.2)': dependencies: '@llamaindex/env': 0.1.16(@aws-crypto/sha256-js@5.2.0)(@xenova/transformers@2.17.2)(gpt-tokenizer@2.8.1)(js-tiktoken@1.0.15)(pathe@1.1.2) - '@types/node': 22.10.1 + '@types/node': 22.10.5 magic-bytes.js: 1.10.0 zod: 3.24.0 zod-to-json-schema: 3.23.5(zod@3.24.0) @@ -15339,7 +15031,7 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/responselike': 1.0.3 '@types/cookie@0.6.0': {} @@ -15368,7 +15060,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/lodash-es@4.17.12': dependencies: @@ -15392,12 +15084,12 @@ snapshots: '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 form-data: 4.0.1 '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/node@17.0.45': {} @@ -15423,17 +15115,17 @@ snapshots: '@types/papaparse@5.3.15': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/pg@8.11.10': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 pg-protocol: 1.7.0 pg-types: 4.0.2 '@types/pg@8.11.6': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 pg-protocol: 1.7.0 pg-types: 4.0.2 @@ -15441,7 +15133,7 @@ snapshots: '@types/react-dom@18.3.1': dependencies: - '@types/react': 18.3.12 + '@types/react': 18.3.18 '@types/react-dom@18.3.5(@types/react@18.3.18)': dependencies: @@ -15461,19 +15153,19 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/retry@0.12.0': {} '@types/sax@1.2.7': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 '@types/shimmer@1.2.0': {} '@types/tar@6.1.13': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 minipass: 4.2.8 '@types/tough-cookie@4.0.5': {} @@ -15500,86 +15192,9 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 optional: true - '@typescript-eslint/eslint-plugin@8.19.1(@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.19.1 - '@typescript-eslint/type-utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.19.1 - eslint: 9.18.0(jiti@1.21.6) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 2.0.0(typescript@5.6.2) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': - dependencies: - '@typescript-eslint/scope-manager': 8.19.1 - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.19.1 - debug: 4.4.0 - eslint: 9.18.0(jiti@1.21.6) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@8.19.1': - dependencies: - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/visitor-keys': 8.19.1 - - '@typescript-eslint/type-utils@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': - dependencies: - '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) - '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - debug: 4.4.0 - eslint: 9.18.0(jiti@1.21.6) - ts-api-utils: 2.0.0(typescript@5.6.2) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/types@8.19.1': {} - - '@typescript-eslint/typescript-estree@8.19.1(typescript@5.6.2)': - dependencies: - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/visitor-keys': 8.19.1 - debug: 4.4.0 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 2.0.0(typescript@5.6.2) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 8.19.1 - '@typescript-eslint/types': 8.19.1 - '@typescript-eslint/typescript-estree': 8.19.1(typescript@5.6.2) - eslint: 9.18.0(jiti@1.21.6) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/visitor-keys@8.19.1': - dependencies: - '@typescript-eslint/types': 8.19.1 - eslint-visitor-keys: 4.2.0 - '@typescript/vfs@1.6.0(typescript@5.7.2)': dependencies: debug: 4.4.0(supports-color@8.1.1) @@ -15673,13 +15288,13 @@ snapshots: optionalDependencies: vite: 6.0.1(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) - '@vitest/mocker@2.1.6(vite@6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1))': + '@vitest/mocker@2.1.6(vite@6.0.1(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1))': dependencies: '@vitest/spy': 2.1.6 estree-walker: 3.0.3 magic-string: 0.30.14 optionalDependencies: - vite: 6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + vite: 6.0.1(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) '@vitest/pretty-format@2.1.6': dependencies: @@ -15964,13 +15579,6 @@ snapshots: optionalDependencies: ajv: 8.17.1 - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 @@ -16059,9 +15667,9 @@ snapshots: astring@1.9.0: {} - astro-expressive-code@0.35.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)): + astro-expressive-code@0.35.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)): dependencies: - astro: 4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) + astro: 4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) rehype-expressive-code: 0.35.6 astro-icon@1.1.4: @@ -16073,7 +15681,7 @@ snapshots: - debug - supports-color - astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2): + astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2): dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.1 @@ -16129,8 +15737,8 @@ snapshots: tsconfck: 3.1.4(typescript@5.7.2) unist-util-visit: 5.0.0 vfile: 6.0.3 - vite: 5.4.11(@types/node@22.10.1)(lightningcss@1.28.1) - vitefu: 1.0.4(vite@5.4.11(@types/node@22.10.1)(lightningcss@1.28.1)) + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.1) + vitefu: 1.0.4(vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.1)) which-pm: 3.0.0 xxhash-wasm: 1.1.0 yargs-parser: 21.1.1 @@ -16789,10 +16397,6 @@ snapshots: optionalDependencies: supports-color: 5.5.0 - debug@4.4.0: - dependencies: - ms: 2.1.3 - debug@4.4.0(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -16824,8 +16428,6 @@ snapshots: deep-extend@0.6.0: {} - deep-is@0.1.4: {} - deepmerge@4.3.1: {} defaults@1.0.4: @@ -16956,27 +16558,27 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1): + drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): optionalDependencies: '@cloudflare/workers-types': 4.20241205.0 '@libsql/client': 0.14.0 '@neondatabase/serverless': 0.10.4 '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 - '@types/react': 18.3.12 + '@types/react': 18.3.18 react: 18.3.1 - drizzle-orm@0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1): + drizzle-orm@0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): optionalDependencies: '@cloudflare/workers-types': 4.20241112.0 '@libsql/client': 0.14.0 '@neondatabase/serverless': 0.10.4 '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 - '@types/react': 18.3.12 + '@types/react': 18.3.18 react: 18.3.1 - drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1): + drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): dependencies: '@libsql/client-wasm': 0.14.0 optionalDependencies: @@ -16985,10 +16587,10 @@ snapshots: '@neondatabase/serverless': 0.10.4 '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 - '@types/react': 18.3.12 + '@types/react': 18.3.18 react: 18.3.1 - drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1): + drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): optionalDependencies: '@cloudflare/workers-types': 4.20241112.0 '@libsql/client': 0.14.0 @@ -16996,22 +16598,22 @@ snapshots: '@neondatabase/serverless': 0.10.4 '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 - '@types/react': 18.3.12 + '@types/react': 18.3.18 react: 18.3.1 - drizzle-zod@0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.24.0): + drizzle-zod@0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.24.0): dependencies: - drizzle-orm: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + drizzle-orm: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) zod: 3.24.0 - drizzle-zod@0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.23.8): + drizzle-zod@0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8): dependencies: - drizzle-orm: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + drizzle-orm: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) zod: 3.23.8 - drizzle-zod@0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1))(zod@3.23.8): + drizzle-zod@0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8): dependencies: - drizzle-orm: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.12)(react@18.3.1) + drizzle-orm: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) zod: 3.23.8 dset@3.1.4: {} @@ -17293,85 +16895,11 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-plugin-react-hooks@5.1.0(eslint@9.18.0(jiti@1.21.6)): - dependencies: - eslint: 9.18.0(jiti@1.21.6) - - eslint-plugin-react-refresh@0.4.18(eslint@9.18.0(jiti@1.21.6)): - dependencies: - eslint: 9.18.0(jiti@1.21.6) - - eslint-scope@8.2.0: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@4.2.0: {} - - eslint@9.18.0(jiti@1.21.6): - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@1.21.6)) - '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.1 - '@eslint/core': 0.10.0 - '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.18.0 - '@eslint/plugin-kit': 0.2.5 - '@humanfs/node': 0.16.6 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.1 - '@types/estree': 1.0.6 - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.0 - escape-string-regexp: 4.0.0 - eslint-scope: 8.2.0 - eslint-visitor-keys: 4.2.0 - espree: 10.3.0 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - optionalDependencies: - jiti: 1.21.6 - transitivePeerDependencies: - - supports-color - esm@3.2.25: optional: true - espree@10.3.0: - dependencies: - acorn: 8.14.0 - acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 4.2.0 - esprima@4.0.1: {} - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - estree-util-attach-comments@3.0.0: dependencies: '@types/estree': 1.0.6 @@ -17409,8 +16937,6 @@ snapshots: dependencies: '@types/estree': 1.0.6 - esutils@2.0.3: {} - event-target-shim@5.0.1: {} eventemitter3@4.0.7: {} @@ -17519,8 +17045,6 @@ snapshots: fast-json-stable-stringify@2.1.0: {} - fast-levenshtein@2.0.6: {} - fast-uri@3.0.3: {} fast-xml-parser@4.4.1: @@ -17574,10 +17098,6 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - file-type@17.1.6: dependencies: readable-web-to-node-stream: 3.0.2 @@ -17614,11 +17134,6 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - find-up@6.3.0: dependencies: locate-path: 7.2.0 @@ -17633,15 +17148,8 @@ snapshots: micromatch: 4.0.8 pkg-dir: 4.2.0 - flat-cache@4.0.1: - dependencies: - flatted: 3.3.2 - keyv: 4.5.4 - flatbuffers@1.12.0: {} - flatted@3.3.2: {} - flattie@1.1.1: {} fn.name@1.1.0: {} @@ -17840,8 +17348,6 @@ snapshots: globals@11.12.0: {} - globals@14.0.0: {} - globals@15.14.0: {} globby@11.1.0: @@ -17887,8 +17393,6 @@ snapshots: graceful-fs@4.2.11: {} - graphemer@1.4.0: {} - graphql-request@6.1.0(encoding@0.1.13)(graphql@16.9.0): dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) @@ -18443,14 +17947,10 @@ snapshots: json-parse-even-better-errors@2.3.1: {} - json-schema-traverse@0.4.1: {} - json-schema-traverse@1.0.0: {} json-schema@0.4.0: {} - json-stable-stringify-without-jsonify@1.0.1: {} - json5@2.2.3: {} jsonc-parser@2.3.1: {} @@ -18566,11 +18066,6 @@ snapshots: leven@4.0.0: {} - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - libsql@0.4.7: dependencies: '@neon-rs/load': 0.0.4 @@ -18743,10 +18238,6 @@ snapshots: dependencies: p-locate: 4.1.0 - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - locate-path@7.2.0: dependencies: p-locate: 6.0.0 @@ -19523,8 +19014,6 @@ snapshots: napi-build-utils@1.0.2: {} - natural-compare@1.4.0: {} - nearley@2.20.1: dependencies: commander: 2.20.3 @@ -19784,15 +19273,6 @@ snapshots: option@0.2.4: {} - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - ora@5.4.1: dependencies: bl: 4.1.0 @@ -19851,10 +19331,6 @@ snapshots: dependencies: p-try: 2.2.0 - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - p-limit@4.0.0: dependencies: yocto-queue: 1.1.1 @@ -19871,10 +19347,6 @@ snapshots: dependencies: p-limit: 2.3.0 - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - p-locate@6.0.0: dependencies: p-limit: 4.0.0 @@ -20177,8 +19649,6 @@ snapshots: find-yarn-workspace-root2: 1.2.16 which-pm: 3.0.0 - prelude-ls@1.2.1: {} - prettier-plugin-astro@0.14.1: dependencies: '@astrojs/compiler': 2.10.3 @@ -20236,7 +19706,7 @@ snapshots: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 22.10.1 + '@types/node': 22.10.5 long: 4.0.0 protobufjs@7.4.0: @@ -20251,7 +19721,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.10.1 + '@types/node': 22.10.5 long: 5.2.3 proxy-compare@3.0.1: {} @@ -21016,10 +20486,10 @@ snapshots: as-table: 1.0.55 get-source: 2.0.12 - starlight-package-managers@0.6.0(@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)))(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)): + starlight-package-managers@0.6.0(@astrojs/starlight@0.28.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)))(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)): dependencies: - '@astrojs/starlight': 0.28.6(astro@4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) - astro: 4.16.16(@types/node@22.10.1)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) + '@astrojs/starlight': 0.28.6(astro@4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2)) + astro: 4.16.16(@types/node@22.10.5)(lightningcss@1.28.1)(rollup@4.27.4)(typescript@5.7.2) state-local@1.0.7: {} @@ -21119,8 +20589,6 @@ snapshots: strip-json-comments@2.0.1: {} - strip-json-comments@3.1.1: {} - strip-literal@2.1.1: dependencies: js-tokens: 9.0.1 @@ -21389,10 +20857,6 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.0.0(typescript@5.6.2): - dependencies: - typescript: 5.6.2 - ts-error@1.0.6: {} ts-essentials@9.4.2(typescript@5.7.2): @@ -21506,10 +20970,6 @@ snapshots: turbo-stream@2.4.0: {} - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - type-detect@4.1.0: {} type-fest@0.20.2: {} @@ -21534,16 +20994,6 @@ snapshots: dependencies: semver: 7.6.3 - typescript-eslint@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2): - dependencies: - '@typescript-eslint/eslint-plugin': 8.19.1(@typescript-eslint/parser@8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/parser': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.19.1(eslint@9.18.0(jiti@1.21.6))(typescript@5.6.2) - eslint: 9.18.0(jiti@1.21.6) - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - typescript@5.6.2: {} typescript@5.7.2: {} @@ -21667,10 +21117,6 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - url-join@4.0.1: {} url-join@5.0.0: {} @@ -21759,13 +21205,31 @@ snapshots: - supports-color - terser + vite-node@1.6.0(@types/node@22.10.5)(lightningcss@1.28.1): + dependencies: + cac: 6.7.14 + debug: 4.4.0(supports-color@8.1.1) + pathe: 1.1.2 + picocolors: 1.1.1 + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite-node@2.1.6(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 6.0.1(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + vite: 6.0.7(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) transitivePeerDependencies: - '@types/node' - jiti @@ -21780,13 +21244,13 @@ snapshots: - tsx - yaml - vite-node@2.1.6(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): + vite-node@2.1.6(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: cac: 6.7.14 debug: 4.3.7(supports-color@5.5.0) es-module-lexer: 1.5.4 pathe: 1.1.2 - vite: 6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + vite: 6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) transitivePeerDependencies: - '@types/node' - jiti @@ -21833,6 +21297,16 @@ snapshots: fsevents: 2.3.3 lightningcss: 1.28.1 + vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.1): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.49 + rollup: 4.28.1 + optionalDependencies: + '@types/node': 22.10.5 + fsevents: 2.3.3 + lightningcss: 1.28.1 + vite@6.0.1(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: esbuild: 0.24.0 @@ -21846,13 +21320,26 @@ snapshots: tsx: 4.19.2 yaml: 2.6.1 - vite@6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): + vite@6.0.1(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: esbuild: 0.24.0 postcss: 8.4.49 rollup: 4.27.4 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 + fsevents: 2.3.3 + jiti: 1.21.6 + lightningcss: 1.28.1 + tsx: 4.19.2 + yaml: 2.6.1 + + vite@6.0.7(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): + dependencies: + esbuild: 0.24.2 + postcss: 8.4.49 + rollup: 4.28.1 + optionalDependencies: + '@types/node': 22.10.0 fsevents: 2.3.3 jiti: 1.21.6 lightningcss: 1.28.1 @@ -21872,9 +21359,9 @@ snapshots: tsx: 4.19.2 yaml: 2.6.1 - vitefu@1.0.4(vite@5.4.11(@types/node@22.10.1)(lightningcss@1.28.1)): + vitefu@1.0.4(vite@5.4.11(@types/node@22.10.5)(lightningcss@1.28.1)): optionalDependencies: - vite: 5.4.11(@types/node@22.10.1)(lightningcss@1.28.1) + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.1) vitest@1.6.0(@types/node@22.10.1)(lightningcss@1.28.1): dependencies: @@ -21910,6 +21397,40 @@ snapshots: - supports-color - terser + vitest@1.6.0(@types/node@22.10.5)(lightningcss@1.28.1): + dependencies: + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.4.0(supports-color@8.1.1) + execa: 8.0.1 + local-pkg: 0.5.1 + magic-string: 0.30.15 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 2.1.1 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.11(@types/node@22.10.5)(lightningcss@1.28.1) + vite-node: 1.6.0(@types/node@22.10.5)(lightningcss@1.28.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.10.5 + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vitest@2.1.6(@types/node@22.10.0)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: '@vitest/expect': 2.1.6 @@ -21948,10 +21469,10 @@ snapshots: - tsx - yaml - vitest@2.1.6(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): + vitest@2.1.6(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: '@vitest/expect': 2.1.6 - '@vitest/mocker': 2.1.6(vite@6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1)) + '@vitest/mocker': 2.1.6(vite@6.0.1(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1)) '@vitest/pretty-format': 2.1.6 '@vitest/runner': 2.1.6 '@vitest/snapshot': 2.1.6 @@ -21967,11 +21488,11 @@ snapshots: tinyexec: 0.3.1 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 6.0.1(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) - vite-node: 2.1.6(@types/node@22.10.1)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + vite: 6.0.1(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + vite-node: 2.1.6(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.5 transitivePeerDependencies: - jiti - less @@ -22222,8 +21743,6 @@ snapshots: triple-beam: 1.4.1 winston-transport: 4.9.0 - word-wrap@1.2.5: {} - wordwrap@1.0.0: {} workerd@1.20241106.1: @@ -22423,8 +21942,6 @@ snapshots: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 - yocto-queue@0.1.0: {} - yocto-queue@1.1.1: {} youch@3.3.4: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b3de4a6fe..26c55ef02 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,6 +3,7 @@ packages: - "api" - "fp-services" - "honc-code-gen" + - "playground" - "packages/*" - "examples/*" - "examples/service-bindings/*" From 889f53994955a007bcf1db6c27171b2f845a77df Mon Sep 17 00:00:00 2001 From: Laurynas Keturakis Date: Mon, 13 Jan 2025 15:31:45 +0100 Subject: [PATCH 006/108] update react to 19 cause why not --- playground/package.json | 6 +- pnpm-lock.yaml | 167 +++++++++++++++++++++++----------------- 2 files changed, 100 insertions(+), 73 deletions(-) diff --git a/playground/package.json b/playground/package.json index dd20328d6..ad71ffe3f 100644 --- a/playground/package.json +++ b/playground/package.json @@ -15,19 +15,19 @@ "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.471.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "tailwind-merge": "^2.5.5", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { + "@biomejs/biome": "^1.9.4", "@eslint/js": "^9.17.0", "@types/node": "^22.10.5", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@vitejs/plugin-react-swc": "^3.5.0", "autoprefixer": "^10.4.20", - "@biomejs/biome": "^1.9.4", "globals": "^15.14.0", "postcss": "^8.4.49", "tailwindcss": "^3.4.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c5396f18..2e4138dcf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,7 +58,7 @@ importers: version: 0.14.0 ai: specifier: ^4.0.7 - version: 4.0.7(react@18.3.1)(zod@3.23.8) + version: 4.0.7(react@19.0.0)(zod@3.23.8) chalk: specifier: ^5.3.0 version: 5.3.0 @@ -73,10 +73,10 @@ importers: version: 0.28.1 drizzle-orm: specifier: ^0.36.4 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8) + version: 0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.23.8) figlet: specifier: ^1.8.0 version: 1.8.0 @@ -165,7 +165,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.12 version: 4.6.12 @@ -193,7 +193,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.12 version: 4.6.12 @@ -212,7 +212,7 @@ importers: dependencies: drizzle-orm: specifier: ^0.36.4 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.7 version: 4.6.12 @@ -262,10 +262,10 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8) + version: 0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.23.8) hono: specifier: ^4.6.5 version: 4.6.12 @@ -309,7 +309,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.36.0 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.7 version: 4.6.12 @@ -334,7 +334,7 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.36.0 - version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) devDependencies: '@cloudflare/workers-types': specifier: ^4.20241106.0 @@ -350,7 +350,7 @@ importers: version: link:../../packages/client-library-otel drizzle-orm: specifier: ^0.35.3 - version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.12 version: 4.6.12 @@ -387,13 +387,13 @@ importers: version: 0.14.0 ai: specifier: ^3.4.33 - version: 3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8) + version: 3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.23.8))(react@19.0.0)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8) dotenv: specifier: ^16.4.5 version: 16.4.5 drizzle-orm: specifier: ^0.34.1 - version: 0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) hono: specifier: ^4.6.12 version: 4.6.12 @@ -451,7 +451,7 @@ importers: version: 0.2.28(@langchain/core@0.2.36(openai@4.76.0(encoding@0.1.13)(zod@3.24.0))) ai: specifier: ^3.4.33 - version: 3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.24.0))(react@18.3.1)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.24.0) + version: 3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.24.0))(react@19.0.0)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.24.0) dotenv: specifier: ^16.4.7 version: 16.4.7 @@ -460,16 +460,16 @@ importers: version: 0.24.2 drizzle-orm: specifier: ^0.33.0 - version: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + version: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) drizzle-zod: specifier: ^0.5.1 - version: 0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.24.0) + version: 0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.24.0) hono: specifier: ^4.6.13 version: 4.6.13 llamaindex: specifier: ^0.7.10 - version: 0.7.10(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0))(@aws-sdk/credential-providers@3.699.0(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(@xenova/transformers@2.17.2)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.2) + version: 0.7.10(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0))(@aws-sdk/credential-providers@3.699.0(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(@xenova/transformers@2.17.2)(encoding@0.1.13)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2) openai: specifier: ^4.76.0 version: 4.76.0(encoding@0.1.13)(zod@3.24.0) @@ -654,7 +654,7 @@ importers: dependencies: '@radix-ui/react-slot': specifier: ^1.1.0 - version: 1.1.0(@types/react@18.3.18)(react@18.3.1) + version: 1.1.0(@types/react@18.3.18)(react@19.0.0) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -663,13 +663,13 @@ importers: version: 2.1.1 lucide-react: specifier: ^0.471.1 - version: 0.471.1(react@18.3.1) + version: 0.471.1(react@19.0.0) react: - specifier: ^18.3.1 - version: 18.3.1 + specifier: ^19.0.0 + version: 19.0.0 react-dom: - specifier: ^18.3.1 - version: 18.3.1(react@18.3.1) + specifier: ^19.0.0 + version: 19.0.0(react@19.0.0) tailwind-merge: specifier: ^2.5.5 version: 2.5.5 @@ -7612,6 +7612,7 @@ packages: libsql@0.4.7: resolution: {integrity: sha512-T9eIRCs6b0J1SHKYIvD8+KCJMcWZ900iZyxdnSCdqxN12Z1ijzT+jY5nrk72Jw4B0HGzms2NgpryArlJqvc3Lw==} + cpu: [x64, arm64, wasm32] os: [darwin, linux, win32] lie@3.3.0: @@ -8981,6 +8982,11 @@ packages: peerDependencies: react: ^18.3.1 + react-dom@19.0.0: + resolution: {integrity: sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==} + peerDependencies: + react: ^19.0.0 + react-hook-form@7.53.2: resolution: {integrity: sha512-YVel6fW5sOeedd1524pltpHX+jgU2u3DSDtXEaBORNdqiNrsX/nUI/iGXONegttg0mJVnfrIkiV0cmTU6Oo2xw==} engines: {node: '>=18.0.0'} @@ -9056,6 +9062,10 @@ packages: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} + react@19.0.0: + resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==} + engines: {node: '>=0.10.0'} + read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -9301,6 +9311,9 @@ packages: scheduler@0.23.2: resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.25.0: + resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==} + section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} engines: {node: '>=4'} @@ -10811,34 +10824,34 @@ snapshots: dependencies: json-schema: 0.4.0 - '@ai-sdk/react@0.0.70(react@18.3.1)(zod@3.23.8)': + '@ai-sdk/react@0.0.70(react@19.0.0)(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - swr: 2.2.5(react@18.3.1) + swr: 2.2.5(react@19.0.0) throttleit: 2.1.0 optionalDependencies: - react: 18.3.1 + react: 19.0.0 zod: 3.23.8 - '@ai-sdk/react@0.0.70(react@18.3.1)(zod@3.24.0)': + '@ai-sdk/react@0.0.70(react@19.0.0)(zod@3.24.0)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.24.0) '@ai-sdk/ui-utils': 0.0.50(zod@3.24.0) - swr: 2.2.5(react@18.3.1) + swr: 2.2.5(react@19.0.0) throttleit: 2.1.0 optionalDependencies: - react: 18.3.1 + react: 19.0.0 zod: 3.24.0 - '@ai-sdk/react@1.0.3(react@18.3.1)(zod@3.23.8)': + '@ai-sdk/react@1.0.3(react@19.0.0)(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) '@ai-sdk/ui-utils': 1.0.2(zod@3.23.8) - swr: 2.2.5(react@18.3.1) + swr: 2.2.5(react@19.0.0) throttleit: 2.1.0 optionalDependencies: - react: 18.3.1 + react: 19.0.0 zod: 3.23.8 '@ai-sdk/solid@0.0.54(zod@3.23.8)': @@ -13351,10 +13364,10 @@ snapshots: - acorn - supports-color - '@mistralai/mistralai@1.3.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@3.24.0)': + '@mistralai/mistralai@1.3.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@3.24.0)': dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) zod: 3.24.0 '@mixedbread-ai/sdk@2.2.11(encoding@0.1.13)': @@ -13893,9 +13906,9 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 - '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.18)(react@18.3.1)': + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.18)(react@19.0.0)': dependencies: - react: 18.3.1 + react: 19.0.0 optionalDependencies: '@types/react': 18.3.18 @@ -14196,10 +14209,10 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 - '@radix-ui/react-slot@1.1.0(@types/react@18.3.18)(react@18.3.1)': + '@radix-ui/react-slot@1.1.0(@types/react@18.3.18)(react@19.0.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.18)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 optionalDependencies: '@types/react': 18.3.18 @@ -15508,11 +15521,11 @@ snapshots: clean-stack: 2.2.0 indent-string: 4.0.0 - ai@3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8): + ai@3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.23.8))(react@19.0.0)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) - '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) + '@ai-sdk/react': 0.0.70(react@19.0.0)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) '@ai-sdk/svelte': 0.0.57(svelte@4.2.19)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) @@ -15525,7 +15538,7 @@ snapshots: zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: openai: 4.76.0(encoding@0.1.13)(zod@3.23.8) - react: 18.3.1 + react: 19.0.0 sswr: 2.1.0(svelte@4.2.19) svelte: 4.2.19 zod: 3.23.8 @@ -15533,11 +15546,11 @@ snapshots: - solid-js - vue - ai@3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.24.0))(react@18.3.1)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.24.0): + ai@3.4.33(openai@4.76.0(encoding@0.1.13)(zod@3.24.0))(react@19.0.0)(sswr@2.1.0(svelte@4.2.19))(svelte@4.2.19)(vue@3.5.12(typescript@5.7.2))(zod@3.24.0): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.24.0) - '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.24.0) + '@ai-sdk/react': 0.0.70(react@19.0.0)(zod@3.24.0) '@ai-sdk/solid': 0.0.54(zod@3.24.0) '@ai-sdk/svelte': 0.0.57(svelte@4.2.19)(zod@3.24.0) '@ai-sdk/ui-utils': 0.0.50(zod@3.24.0) @@ -15550,7 +15563,7 @@ snapshots: zod-to-json-schema: 3.23.5(zod@3.24.0) optionalDependencies: openai: 4.76.0(encoding@0.1.13)(zod@3.24.0) - react: 18.3.1 + react: 19.0.0 sswr: 2.1.0(svelte@4.2.19) svelte: 4.2.19 zod: 3.24.0 @@ -15558,17 +15571,17 @@ snapshots: - solid-js - vue - ai@4.0.7(react@18.3.1)(zod@3.23.8): + ai@4.0.7(react@19.0.0)(zod@3.23.8): dependencies: '@ai-sdk/provider': 1.0.1 '@ai-sdk/provider-utils': 2.0.2(zod@3.23.8) - '@ai-sdk/react': 1.0.3(react@18.3.1)(zod@3.23.8) + '@ai-sdk/react': 1.0.3(react@19.0.0)(zod@3.23.8) '@ai-sdk/ui-utils': 1.0.2(zod@3.23.8) '@opentelemetry/api': 1.9.0 jsondiffpatch: 0.6.0 zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: - react: 18.3.1 + react: 19.0.0 zod: 3.23.8 ajv-draft-04@1.0.0(ajv@8.17.1): @@ -16558,7 +16571,7 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): + drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0): optionalDependencies: '@cloudflare/workers-types': 4.20241205.0 '@libsql/client': 0.14.0 @@ -16566,9 +16579,9 @@ snapshots: '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 '@types/react': 18.3.18 - react: 18.3.1 + react: 19.0.0 - drizzle-orm@0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): + drizzle-orm@0.34.1(@cloudflare/workers-types@4.20241112.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0): optionalDependencies: '@cloudflare/workers-types': 4.20241112.0 '@libsql/client': 0.14.0 @@ -16576,9 +16589,9 @@ snapshots: '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 '@types/react': 18.3.18 - react: 18.3.1 + react: 19.0.0 - drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): + drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0): dependencies: '@libsql/client-wasm': 0.14.0 optionalDependencies: @@ -16588,9 +16601,9 @@ snapshots: '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 '@types/react': 18.3.18 - react: 18.3.1 + react: 19.0.0 - drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1): + drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0): optionalDependencies: '@cloudflare/workers-types': 4.20241112.0 '@libsql/client': 0.14.0 @@ -16599,21 +16612,21 @@ snapshots: '@opentelemetry/api': 1.9.0 '@types/pg': 8.11.10 '@types/react': 18.3.18 - react: 18.3.1 + react: 19.0.0 - drizzle-zod@0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.24.0): + drizzle-zod@0.5.1(drizzle-orm@0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.24.0): dependencies: - drizzle-orm: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + drizzle-orm: 0.33.0(@cloudflare/workers-types@4.20241205.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) zod: 3.24.0 - drizzle-zod@0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8): + drizzle-zod@0.5.1(drizzle-orm@0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.23.8): dependencies: - drizzle-orm: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + drizzle-orm: 0.35.3(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) zod: 3.23.8 - drizzle-zod@0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1))(zod@3.23.8): + drizzle-zod@0.5.1(drizzle-orm@0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0))(zod@3.23.8): dependencies: - drizzle-orm: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@18.3.1) + drizzle-orm: 0.36.4(@cloudflare/workers-types@4.20241112.0)(@libsql/client-wasm@0.14.0)(@libsql/client@0.14.0)(@neondatabase/serverless@0.10.4)(@opentelemetry/api@1.9.0)(@types/pg@8.11.10)(@types/react@18.3.18)(react@19.0.0) zod: 3.23.8 dset@3.1.4: {} @@ -18137,7 +18150,7 @@ snapshots: lines-and-columns@1.2.4: {} - llamaindex@0.7.10(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0))(@aws-sdk/credential-providers@3.699.0(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(@xenova/transformers@2.17.2)(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.7.2): + llamaindex@0.7.10(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0))(@aws-sdk/credential-providers@3.699.0(@aws-sdk/client-sso-oidc@3.699.0(@aws-sdk/client-sts@3.699.0)))(@notionhq/client@2.2.15(encoding@0.1.13))(@xenova/transformers@2.17.2)(encoding@0.1.13)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(typescript@5.7.2): dependencies: '@anthropic-ai/sdk': 0.27.1(encoding@0.1.13) '@aws-crypto/sha256-js': 5.2.0 @@ -18160,7 +18173,7 @@ snapshots: '@llamaindex/openai': 0.1.24(@aws-crypto/sha256-js@5.2.0)(@xenova/transformers@2.17.2)(encoding@0.1.13)(gpt-tokenizer@2.8.1)(js-tiktoken@1.0.15)(pathe@1.1.2)(zod@3.24.0) '@llamaindex/portkey-ai': 0.0.8(@aws-crypto/sha256-js@5.2.0)(@xenova/transformers@2.17.2)(gpt-tokenizer@2.8.1)(js-tiktoken@1.0.15)(pathe@1.1.2) '@llamaindex/replicate': 0.0.8(@aws-crypto/sha256-js@5.2.0)(@xenova/transformers@2.17.2)(gpt-tokenizer@2.8.1)(js-tiktoken@1.0.15)(pathe@1.1.2) - '@mistralai/mistralai': 1.3.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(zod@3.24.0) + '@mistralai/mistralai': 1.3.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@3.24.0) '@mixedbread-ai/sdk': 2.2.11(encoding@0.1.13) '@pinecone-database/pinecone': 3.0.3 '@qdrant/js-client-rest': 1.12.0(typescript@5.7.2) @@ -18330,9 +18343,9 @@ snapshots: lru-cache@9.1.2: {} - lucide-react@0.471.1(react@18.3.1): + lucide-react@0.471.1(react@19.0.0): dependencies: - react: 18.3.1 + react: 19.0.0 magic-bytes.js@1.10.0: {} @@ -19831,6 +19844,11 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-dom@19.0.0(react@19.0.0): + dependencies: + react: 19.0.0 + scheduler: 0.25.0 + react-hook-form@7.53.2(react@18.3.1): dependencies: react: 18.3.1 @@ -19897,6 +19915,8 @@ snapshots: dependencies: loose-envify: 1.4.0 + react@19.0.0: {} + read-cache@1.0.0: dependencies: pify: 2.3.0 @@ -20269,6 +20289,8 @@ snapshots: dependencies: loose-envify: 1.4.0 + scheduler@0.25.0: {} + section-matter@1.0.0: dependencies: extend-shallow: 2.0.1 @@ -20669,11 +20691,11 @@ snapshots: csso: 5.0.5 picocolors: 1.1.1 - swr@2.2.5(react@18.3.1): + swr@2.2.5(react@19.0.0): dependencies: client-only: 0.0.1 - react: 18.3.1 - use-sync-external-store: 1.4.0(react@18.3.1) + react: 19.0.0 + use-sync-external-store: 1.4.0(react@19.0.0) swrev@4.0.0: {} @@ -21148,6 +21170,11 @@ snapshots: use-sync-external-store@1.4.0(react@18.3.1): dependencies: react: 18.3.1 + optional: true + + use-sync-external-store@1.4.0(react@19.0.0): + dependencies: + react: 19.0.0 util-deprecate@1.0.2: {} From 991a072bd054f22b6c73a807d01e4559bbef321d Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Mon, 13 Jan 2025 15:32:46 +0100 Subject: [PATCH 007/108] Start playing with colors --- playground/src/App.tsx | 208 +++++++++++++++-------- playground/src/index.css | 344 ++++++++++++++++++++++++++++----------- 2 files changed, 395 insertions(+), 157 deletions(-) diff --git a/playground/src/App.tsx b/playground/src/App.tsx index 02c592ac5..cc2d2c3e3 100644 --- a/playground/src/App.tsx +++ b/playground/src/App.tsx @@ -1,24 +1,24 @@ -import { Button } from "./components/ui/button"; -import { Input } from "./components/ui/input"; +import { Button } from "./components/ui/button" +import { Input } from "./components/ui/input" export default function App() { return (
{/* Sidebar */} -
- ); + ) } diff --git a/playground/src/index.css b/playground/src/index.css index 9de0433bd..1bf96aeda 100644 --- a/playground/src/index.css +++ b/playground/src/index.css @@ -2,105 +2,267 @@ @tailwind components; @tailwind utilities; -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; - - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} +@layer base { + :root { + /*** DO NOT TOUCH THESE COLOR AND TOKEN VARS, THEY WERE AUTOGENERATED BY A TOOL ***/ + /* Flame */ + --flame-50: 9 100% 96%; + --flame-100: 11 100% 92%; + --flame-200: 11 100% 84%; + --flame-300: 10 100% 77%; + --flame-400: 11 100% 69%; + --flame-500: 11 100% 60%; + --flame-600: 10 78% 51%; + --flame-700: 10 80% 37%; + --flame-800: 10 81% 28%; + --flame-900: 11 83% 19%; + --flame-950: 10 84% 10%; + /* --flame-15%: 11 100% 60% 0.15; */ + /* --flame-50%: 11 100% 60% 0.5; */ + + /* Neutral */ + --neutral-white: 0 0% 100%; + --neutral-50: 0 11% 96%; + --neutral-100: 30 4% 91%; + --neutral-200: 45 6% 87%; + --neutral-300: 40 6% 79%; + --neutral-400: 48 3% 68%; + --neutral-500: 45 2% 47%; + --neutral-600: 40 2% 34%; + --neutral-700: 40 3% 22%; + --neutral-800: 40 4% 15%; + --neutral-900: 40 6% 10%; + --neutral-950: 40 11% 5%; + + /* Shell */ + --shell-50: 45 20% 96%; + --shell-100: 44 20% 92%; + --shell-200: 45 23% 86%; + --shell-300: 45 25% 78%; + --shell-400: 45 15% 67%; + --shell-500: 45 15% 67%; + --shell-600: 45 13% 50%; + --shell-700: 45 14% 38%; + --shell-800: 46 16% 31%; + --shell-900: 44 17% 21%; + --shell-950: 46 16% 14%; + + /* Info */ + --info-50: 200 33% 95%; + --info-100: 202 39% 90%; + --info-200: 202 43% 84%; + --info-300: 202 45% 76%; + --info-400: 201 50% 68%; + --info-500: 201 51% 57%; + --info-600: 201 60% 46%; + --info-700: 202 63% 38%; + --info-800: 202 76% 29%; + --info-900: 201 77% 23%; + --info-950: 202 81% 13%; + /* --info-15%: 201 51% 57% 0.15; */ + /* --info-50%: 201 51% 57% 0.5; */ + + /* Success */ + --success-50: 78 38% 95%; + --success-100: 81 40% 90%; + --success-200: 81 40% 83%; + --success-300: 82 42% 72%; + --success-400: 82 40% 61%; + --success-500: 82 50% 42%; + --success-600: 82 62% 35%; + --success-700: 83 60% 22%; + --success-800: 83 80% 20%; + --success-900: 82 90% 16%; + --success-950: 82 90% 12%; + /* --success-15%: 82 40% 61% 0.15; */ + /* --success-50%: 82 40% 61% 0.5; */ -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} + /* Danger */ + --danger-50: 0 100% 97%; + --danger-100: 358 85% 92%; + --danger-200: 359 83% 86%; + --danger-300: 359 74% 78%; + --danger-400: 358 60% 71%; + --danger-500: 358 65% 65%; + --danger-600: 358 72% 56%; + --danger-700: 357 74% 44%; + --danger-800: 358 87% 31%; + --danger-900: 358 84% 22%; + --danger-950: 358 91% 14%; + /* --danger-15%: 358 70% 61% 0.15; */ + /* --danger-50%: 358 70% 61% 0.5; */ + + /* Warning */ + --warning-50: 33 53% 97%; + --warning-100: 38 67% 91%; + --warning-200: 38 82% 83%; + --warning-300: 37 80% 75%; + --warning-400: 38 76% 68%; + --warning-500: 38 72% 58%; + --warning-600: 38 75% 45%; + --warning-700: 38 92% 35%; + --warning-800: 38 93% 26%; + --warning-900: 38 100% 21%; + --warning-950: 38 88% 16%; + /* --warning-15%: 38 72% 58% 0.15; */ + /* --warning-50%: 38 72% 58% 0.5; */ + + /* Mint */ + --mint-500: 160 48% 62%; + --mint-600: 160 60% 55%; + + /* Purple */ + --purple-500: 273 77% 74%; + --purple-600: 273 67% 68%; -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} + /* Pink */ + --pink-500: 335 77% 74%; + --pink-600: 335 67% 67%; + + /* Color Tokens */ + --fg-default: var(--neutral-950); + --fg-muted: var(--neutral-900); + --fg-subtle: var(--neutral-400); + --fg-brand: var(--flame-600); + --fg-info: var(--info-600); + --fg-success: var(--success-600); + --fg-danger: var(--danger-600); + --fg-warning: var(--warning-600); + --fg-on-primary: var(--neutral-white); + --fg-accent-1: var(--mint-600); + --fg-accent-2: var(--purple-600); + --fg-accent-3: var(--pink-600); + + --bg-background: var(--shell-50); + --bg-primary: var(--neutral-900); + --bg-secondary: var(--shell-700); + --bg-brand: var(--flame-500); + --bg-emphasis: var(--shell-100); -h1 { - font-size: 3.2em; - line-height: 1.1; -} + /* these 4 used to be "15%" */ + --bg-info: var(--info-500); + --bg-success: var(--success-500); + --bg-danger: var(--danger-500); + --bg-warning: var(--warning-500); -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} + --bg-destructive: var(--danger-800); + --bg-popover: var(--neutral-white); + --bg-input: var(--neutral-white); -@media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} + --border-default: var(--neutral-200); + --border-primary: var(--neutral-800); + --border-secondary: var(--shell-700); + --border-accent-on-primary: var(--flame-500); + --border-brand: var(--flame-500); + /* --border-focus: var(--info-15%); */ + + /* Dark Theme Color Tokens */ + --fg-default-dark: var(--neutral-50); + --fg-muted-dark: var(--neutral-300); + --fg-subtle-dark: var(--neutral-500); + --fg-brand-dark: var(--flame-500); + --fg-info-dark: var(--info-500); + --fg-success-dark: var(--success-500); + --fg-danger-dark: var(--danger-500); + --fg-warning-dark: var(--warning-500); + --fg-on-primary-dark: var(--neutral-white); + --fg-accent-1-dark: var(--mint-500); + --fg-accent-2-dark: var(--purple-500); + --fg-accent-3-dark: var(--pink-500); + + --bg-background-dark: var(--neutral-900); + --bg-primary-dark: var(--flame-600); + --bg-secondary-dark: var(--neutral-700); + --bg-brand-dark: var(--flame-500); + --bg-emphasis-dark: var(--neutral-600); + /* --bg-info-dark: var(--info-15%); */ + /* --bg-success-dark: var(--success-15%); */ + /* --bg-danger-dark: var(--danger-15%); */ + /* --bg-warning-dark: var(--warning-15%); */ + --bg-destructive-dark: var(--danger-500); + --bg-popover-dark: var(--neutral-950); + --bg-input-dark: var(--neutral-800); + + --border-default-dark: var(--neutral-700); + --border-primary-dark: var(--flame-600); + --border-secondary-dark: var(--neutral-700); + --border-accent-on-primary-dark: var(--flame-500); + --border-brand-dark: var(--flame-500); + /* --border-focus-dark: var(--info-15%); */ + + /* Typography */ + --font-family-title: 'Instrument Sans'; + --font-family-body: 'Geist'; + --font-family-body-mono: 'Geist Mono'; + + --font-weight-light: 'Light'; + --font-weight-regular: 'Regular'; + --font-weight-medium: 'Medium'; + + --font-size-xs-desktop: 12px; + --font-size-sm-desktop: 14px; + --font-size-md-desktop: 16px; + --font-size-lg-desktop: 20px; + --font-size-xl-desktop: 24px; + --font-size-2xl-desktop: 28px; + + --font-size-xs-mobile: 10px; + --font-size-sm-mobile: 12px; + --font-size-md-mobile: 14px; + --font-size-lg-mobile: 16px; + --font-size-xl-mobile: 20px; + --font-size-2xl-mobile: 24px; + + --line-height-xs-desktop: 16px; + --line-height-sm-desktop: 20px; + --line-height-md-desktop: 24px; + --line-height-lg-desktop: 28px; + --line-height-xl-desktop: 32px; + --line-height-2xl-desktop: 40px; + + --line-height-xs-mobile: 12px; + --line-height-sm-mobile: 16px; + --line-height-md-mobile: 20px; + --line-height-lg-mobile: 24px; + --line-height-xl-mobile: 28px; + --line-height-2xl-mobile: 32px; + + /*** OKAY AFTER THIS LINE YOU CAN TOUCH THE COLORS AGAIN ***/ + + + /* Shadcn UI System Colors using Design System Tokens */ + --background: var(--bg-background); + --foreground: var(--fg-default); + + --card: var(--bg-popover); + --card-foreground: var(--fg-default); + + --popover: var(--bg-popover); + --popover-foreground: var(--fg-default); + + --primary: var(--bg-brand); + --primary-foreground: var(--fg-on-primary); + + --secondary: var(--bg-secondary); + --secondary-foreground: var(--fg-default); + + --muted: var(--bg-emphasis); + --muted-foreground: var(--fg-subtle); + + --accent: var(--bg-brand); + --accent-foreground: var(--fg-default); + + --destructive: var(--bg-destructive); + --destructive-foreground: var(--fg-on-primary); + + --border: var(--border-default); + --input: var(--bg-input); + --ring: var(--fg-info); -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 240 10% 3.9%; - --card: 0 0% 100%; - --card-foreground: 240 10% 3.9%; - --popover: 0 0% 100%; - --popover-foreground: 240 10% 3.9%; - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; - --secondary: 240 4.8% 95.9%; - --secondary-foreground: 240 5.9% 10%; - --muted: 240 4.8% 95.9%; - --muted-foreground: 240 3.8% 46.1%; - --accent: 240 4.8% 95.9%; - --accent-foreground: 240 5.9% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 240 5.9% 90%; - --input: 240 5.9% 90%; - --ring: 240 10% 3.9%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; --radius: 0.5rem; } .dark { - --background: 240 10% 3.9%; + /* --background: 240 10% 3.9%; --foreground: 0 0% 98%; --card: 240 10% 3.9%; --card-foreground: 0 0% 98%; @@ -123,7 +285,7 @@ button:focus-visible { --chart-2: 160 60% 45%; --chart-3: 30 80% 55%; --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; + --chart-5: 340 75% 55%; */ } } From ae6327c62301a72977c66eb3ea38495ad3ccc642 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Mon, 13 Jan 2025 16:42:37 +0100 Subject: [PATCH 008/108] Format --- playground/biome.jsonc | 8 +- playground/src/App.tsx | 69 ++++++++----- playground/src/index.css | 215 +++++++++++++++++++-------------------- playground/src/main.tsx | 1 + 4 files changed, 156 insertions(+), 137 deletions(-) diff --git a/playground/biome.jsonc b/playground/biome.jsonc index cd928dfd7..7e58a367e 100644 --- a/playground/biome.jsonc +++ b/playground/biome.jsonc @@ -2,7 +2,13 @@ "$schema": "../node_modules/@biomejs/biome/configuration_schema.json", "extends": ["../biome.jsonc"], "files": { - "ignore": ["dist", "node_modules"] + "ignore": [ + "dist", + "node_modules", + "tsconfig.node.json", + "tsconfig.json", + "tsconfig.app.json" + ] }, "overrides": [ { diff --git a/playground/src/App.tsx b/playground/src/App.tsx index cc2d2c3e3..1ad0c67c8 100644 --- a/playground/src/App.tsx +++ b/playground/src/App.tsx @@ -1,5 +1,5 @@ -import { Button } from "./components/ui/button" -import { Input } from "./components/ui/input" +import { Button } from "./components/ui/button"; +import { Input } from "./components/ui/input"; export default function App() { return ( @@ -13,11 +13,11 @@ export default function App() { API docs - +
- @@ -28,8 +28,8 @@ export default function App() { {/* Navigation */}
- - - - - - + + + + {/* Main content */} +
+
+
+ + 1.0.0 + + + OAS 3.0.0 + +
+ +

Geese API

+

+ The Geese API allows for creating and managing wise geese quotes and + syncing the related data with supported systems +

+ + {/* Base URL section */} +
+

+ BASE URL +

+
+ http://localhost:8788/requestor +
+
+ + {/* Client Libraries section */} +
+

+ CLIENT LIBRARIES +

+
+ + + +
+
+
+
+ + ); +} diff --git a/playground/vite.config.ts b/playground/vite.config.ts index da7ed529b..12050fa81 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -1,10 +1,14 @@ import path from "node:path"; import react from "@vitejs/plugin-react-swc"; import { defineConfig } from "vite"; +import { TanStackRouterVite } from '@tanstack/router-plugin/vite' // https://vite.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [ + react(), + TanStackRouterVite(), + ], resolve: { alias: { "@": path.resolve(__dirname, "./src"), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2e4138dcf..79c654140 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -655,6 +655,21 @@ importers: '@radix-ui/react-slot': specifier: ^1.1.0 version: 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@tanstack/react-query': + specifier: ^5.61.5 + version: 5.61.5(react@19.0.0) + '@tanstack/react-query-devtools': + specifier: ^5.64.1 + version: 5.64.1(@tanstack/react-query@5.61.5(react@19.0.0))(react@19.0.0) + '@tanstack/react-router': + specifier: ^1.95.5 + version: 1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@tanstack/router-devtools': + specifier: ^1.95.5 + version: 1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(csstype@3.1.3)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@tanstack/router-plugin': + specifier: ^1.95.5 + version: 1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(vite@6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1)) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -1445,6 +1460,10 @@ packages: resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} + '@babel/generator@7.26.5': + resolution: {integrity: sha512-2caSP6fN9I7HOe6nqhtft7V4g7/V/gfDsC3Ag4W7kEzzvRGKqiv0pu0HogPiZ3KaVSoNDhUws6IJjDjpfmYIXw==} + engines: {node: '>=6.9.0'} + '@babel/helper-annotate-as-pure@7.25.9': resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} @@ -1483,13 +1502,13 @@ packages: resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.2': - resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} + '@babel/parser@7.26.3': + resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/parser@7.26.3': - resolution: {integrity: sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==} + '@babel/parser@7.26.5': + resolution: {integrity: sha512-SRJ4jYmXRqV1/Xc+TIVG84WjHBXKlxO9sHQnA2Pf12QQEAp1LOh6kDzNHXcUnbH1QI0FDoPPVOt+vyUDucxpaw==} engines: {node: '>=6.0.0'} hasBin: true @@ -1499,6 +1518,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx@7.25.9': resolution: {integrity: sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==} engines: {node: '>=6.9.0'} @@ -1517,6 +1542,10 @@ packages: resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.26.5': + resolution: {integrity: sha512-rkOSPOw+AXbgtwUga3U4u8RpoK9FEFWBNAlTpcnkLFjL5CT+oyHNuUUC/xx6XefEJ16r38r8Bc/lfp6rYuHeJQ==} + engines: {node: '>=6.9.0'} + '@babel/types@7.26.0': resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} @@ -1525,6 +1554,10 @@ packages: resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} engines: {node: '>=6.9.0'} + '@babel/types@7.26.5': + resolution: {integrity: sha512-L6mZmwFDK6Cjh1nRCLXpa6no13ZIioJDz7mdkzHv399pThrTa/k0nUlNaenOeh2kWu/iaOQYElEpKPUswUa9Vg==} + engines: {node: '>=6.9.0'} + '@biomejs/biome@1.8.3': resolution: {integrity: sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==} engines: {node: '>=14.21.3'} @@ -4808,14 +4841,40 @@ packages: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} + '@tanstack/history@1.95.2': + resolution: {integrity: sha512-FgUauZLg+nRybH5dKyAYokmXs064rHc0qpMizKxTegSTMHj/z2B6T7pjEG2Zd6dBegeYNVL97ROg7Srr9cuBug==} + engines: {node: '>=12'} + '@tanstack/query-core@5.61.5': resolution: {integrity: sha512-iG5vqurEOEbv+paP6kW3zPENa99kSIrd1THISJMaTwVlJ+N5yjVDNOUwp9McK2DWqWCXM3v13ubBbAyhxT78UQ==} + '@tanstack/query-devtools@5.62.16': + resolution: {integrity: sha512-3ff6UBJr0H3nIhfLSl9911rvKqXf0u4B58jl0uYdDWLqPk9pCvYIbxC35cGxK2+8INl4IaFVUHb/IdgWrNkg3Q==} + + '@tanstack/react-query-devtools@5.64.1': + resolution: {integrity: sha512-8ajcGE3wXYlb4KuJnkFYkJwJKc/qmPNTpQD7YTgLRMBPTGGp1xk7VMzxL87DoXuweO8luplUUblJJ3noVs/luQ==} + peerDependencies: + '@tanstack/react-query': ^5.64.1 + react: ^18 || ^19 + '@tanstack/react-query@5.61.5': resolution: {integrity: sha512-rjy8aqPgBBEz/rjJnpnuhi8TVkVTorMUsJlM3lMvrRb5wK6yzfk34Er0fnJ7w/4qyF01SnXsLB/QsTBsLF5PaQ==} peerDependencies: react: ^18 || ^19 + '@tanstack/react-router@1.95.5': + resolution: {integrity: sha512-tNS3an0y5noCqUZf1PYDgd/o7W+YnAyDwRx/ZkD/cQ019M2Jc5comTzo1GwpRz/ozT1aKbe9OSsCi5brEYL0zA==} + engines: {node: '>=12'} + peerDependencies: + react: '>=18' + react-dom: '>=18' + + '@tanstack/react-store@0.7.0': + resolution: {integrity: sha512-S/Rq17HaGOk+tQHV/yrePMnG1xbsKZIl/VsNWnNXt4XW+tTY8dTlvpJH2ZQ3GRALsusG5K6Q3unAGJ2pd9W/Ng==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + '@tanstack/react-table@8.20.5': resolution: {integrity: sha512-WEHopKw3znbUZ61s9i0+i9g8drmDo6asTWbrQh8Us63DAk/M0FkmIqERew6P71HI75ksZ2Pxyuf4vvKh9rAkiA==} engines: {node: '>=12'} @@ -4823,10 +4882,49 @@ packages: react: '>=16.8' react-dom: '>=16.8' + '@tanstack/router-devtools@1.95.5': + resolution: {integrity: sha512-i6wzj3o8Qn1ZODgAYnOTHnVL9h0x1cYD3pzIXLunkhjhyUwECUhBow83gXsTxO/T7D1YFsuQj59TXaAoI+OcyQ==} + engines: {node: '>=12'} + peerDependencies: + '@tanstack/react-router': ^1.95.5 + react: '>=18' + react-dom: '>=18' + + '@tanstack/router-generator@1.95.5': + resolution: {integrity: sha512-Ot/IcIadFBZ7p3CiOVmUUOAT9PP4mIb+36QNtMK6/flstIcLy5+uPdSSjWyM7yeMjLQj8+B22m+djdtZ/XojnA==} + engines: {node: '>=12'} + peerDependencies: + '@tanstack/react-router': ^1.95.5 + peerDependenciesMeta: + '@tanstack/react-router': + optional: true + + '@tanstack/router-plugin@1.95.5': + resolution: {integrity: sha512-leVSXNJi3Vkqd9mA082bWCzz8AxpzCgI+poTBaIgVGwq3BoiU1j4XH/P/J/C1bfaFlg2hEcERmaeugDAaeTuAA==} + engines: {node: '>=12'} + peerDependencies: + '@rsbuild/core': '>=1.0.2' + vite: '>=5.0.0 || >=6.0.0' + webpack: '>=5.92.0' + peerDependenciesMeta: + '@rsbuild/core': + optional: true + vite: + optional: true + webpack: + optional: true + + '@tanstack/store@0.7.0': + resolution: {integrity: sha512-CNIhdoUsmD2NolYuaIs8VfWM467RK6oIBAW4nPEKZhg1smZ+/CwtCdpURgp7nxSqOaV9oKkzdWD80+bC66F/Jg==} + '@tanstack/table-core@8.20.5': resolution: {integrity: sha512-P9dF7XbibHph2PFRz8gfBKEXEY/HJPOhym8CHmjF8y3q5mWpKx9xtZapXQUWCgkqvsK0R46Azuz+VaxD4Xl+Tg==} engines: {node: '>=12'} + '@tanstack/virtual-file-routes@1.87.6': + resolution: {integrity: sha512-PTpeM8SHL7AJM0pJOacFvHribbUODS51qe9NsMqku4mogh6BWObY1EeVmeGnp9o3VngAEsf+rJMs2zqIVz3WFA==} + engines: {node: '>=12'} + '@tokenizer/token@0.3.0': resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} @@ -5398,6 +5496,9 @@ packages: b4a@1.6.7: resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} + babel-dead-code-elimination@1.0.8: + resolution: {integrity: sha512-og6HQERk0Cmm+nTT4Od2wbPtgABXFMPaHACjbKLulZIFMkYyXZLkUGuAxdgpMJBrxyt/XFpSz++lNzjbcMnPkQ==} + bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} @@ -7047,6 +7148,11 @@ packages: globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + goober@2.1.16: + resolution: {integrity: sha512-erjk19y1U33+XAMe1VTvIONHYoSqE4iS7BYUZfHaqeohLmnC0FdxEh7rQU+6MZ4OajItzjZFSRtVANrQwNq6/g==} + peerDependencies: + csstype: ^3.0.10 + google-auth-library@9.15.0: resolution: {integrity: sha512-7ccSEJFDFO7exFbO6NRyC+xH8/mZ1GZGG2xxx9iHxZWcjUjJpjWxIMw3cofAKcueZ6DATiukmmprD7yavQHOyQ==} engines: {node: '>=14'} @@ -8838,6 +8944,11 @@ packages: engines: {node: '>=14'} hasBin: true + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + engines: {node: '>=14'} + hasBin: true + pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -9748,6 +9859,9 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tiny-warning@1.0.3: + resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} + tiny-worker@2.3.0: resolution: {integrity: sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==} @@ -10056,6 +10170,10 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + unplugin@1.16.1: + resolution: {integrity: sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==} + engines: {node: '>=14.0.0'} + update-browserslist-db@1.1.1: resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true @@ -10481,6 +10599,9 @@ packages: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} @@ -11728,16 +11849,16 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.26.2 - '@babel/generator': 7.26.2 + '@babel/generator': 7.26.5 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.2 + '@babel/parser': 7.26.3 '@babel/template': 7.25.9 - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 + '@babel/traverse': 7.26.5 + '@babel/types': 7.26.3 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@5.5.0) + debug: 4.4.0(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -11746,15 +11867,23 @@ snapshots: '@babel/generator@7.26.2': dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 3.0.2 + + '@babel/generator@7.26.5': + dependencies: + '@babel/parser': 7.26.5 + '@babel/types': 7.26.5 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 '@babel/helper-compilation-targets@7.25.9': dependencies: @@ -11767,7 +11896,7 @@ snapshots: '@babel/helper-module-imports@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color @@ -11776,7 +11905,7 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-module-imports': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 + '@babel/traverse': 7.26.5 transitivePeerDependencies: - supports-color @@ -11791,21 +11920,26 @@ snapshots: '@babel/helpers@7.26.0': dependencies: '@babel/template': 7.25.9 - '@babel/types': 7.26.0 - - '@babel/parser@7.26.2': - dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 '@babel/parser@7.26.3': dependencies: '@babel/types': 7.26.3 + '@babel/parser@7.26.5': + dependencies: + '@babel/types': 7.26.5 + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -11813,7 +11947,7 @@ snapshots: '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 transitivePeerDependencies: - supports-color @@ -11824,17 +11958,29 @@ snapshots: '@babel/template@7.25.9': dependencies: '@babel/code-frame': 7.26.2 - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 '@babel/traverse@7.25.9': dependencies: '@babel/code-frame': 7.26.2 '@babel/generator': 7.26.2 - '@babel/parser': 7.26.2 + '@babel/parser': 7.26.3 '@babel/template': 7.25.9 - '@babel/types': 7.26.0 - debug: 4.3.7(supports-color@5.5.0) + '@babel/types': 7.26.3 + debug: 4.4.0(supports-color@8.1.1) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + + '@babel/traverse@7.26.5': + dependencies: + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.5 + '@babel/parser': 7.26.5 + '@babel/template': 7.25.9 + '@babel/types': 7.26.5 + debug: 4.4.0(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -11849,6 +11995,11 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@babel/types@7.26.5': + dependencies: + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@biomejs/biome@1.8.3': optionalDependencies: '@biomejs/cli-darwin-arm64': 1.8.3 @@ -14902,7 +15053,7 @@ snapshots: '@svgr/hast-util-to-babel-ast@8.0.0': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 entities: 4.5.0 '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.7.2))': @@ -14996,21 +15147,102 @@ snapshots: dependencies: defer-to-connect: 2.0.1 + '@tanstack/history@1.95.2': {} + '@tanstack/query-core@5.61.5': {} + '@tanstack/query-devtools@5.62.16': {} + + '@tanstack/react-query-devtools@5.64.1(@tanstack/react-query@5.61.5(react@19.0.0))(react@19.0.0)': + dependencies: + '@tanstack/query-devtools': 5.62.16 + '@tanstack/react-query': 5.61.5(react@19.0.0) + react: 19.0.0 + '@tanstack/react-query@5.61.5(react@18.3.1)': dependencies: '@tanstack/query-core': 5.61.5 react: 18.3.1 + '@tanstack/react-query@5.61.5(react@19.0.0)': + dependencies: + '@tanstack/query-core': 5.61.5 + react: 19.0.0 + + '@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@tanstack/history': 1.95.2 + '@tanstack/react-store': 0.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + jsesc: 3.0.2 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + tiny-invariant: 1.3.3 + tiny-warning: 1.0.3 + + '@tanstack/react-store@0.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@tanstack/store': 0.7.0 + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + use-sync-external-store: 1.4.0(react@19.0.0) + '@tanstack/react-table@8.20.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/table-core': 8.20.5 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) + '@tanstack/router-devtools@1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(csstype@3.1.3)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@tanstack/react-router': 1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + clsx: 2.1.1 + goober: 2.1.16(csstype@3.1.3) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + transitivePeerDependencies: + - csstype + + '@tanstack/router-generator@1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0))': + dependencies: + '@tanstack/virtual-file-routes': 1.87.6 + prettier: 3.4.2 + tsx: 4.19.2 + zod: 3.24.0 + optionalDependencies: + '@tanstack/react-router': 1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + + '@tanstack/router-plugin@1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(vite@6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1))': + dependencies: + '@babel/core': 7.26.0 + '@babel/generator': 7.26.5 + '@babel/parser': 7.26.3 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + '@babel/template': 7.25.9 + '@babel/traverse': 7.26.5 + '@babel/types': 7.26.3 + '@tanstack/router-generator': 1.95.5(@tanstack/react-router@1.95.5(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) + '@tanstack/virtual-file-routes': 1.87.6 + '@types/babel__core': 7.20.5 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.6 + babel-dead-code-elimination: 1.0.8 + chokidar: 3.6.0 + unplugin: 1.16.1 + zod: 3.24.0 + optionalDependencies: + vite: 6.0.7(@types/node@22.10.5)(jiti@1.21.6)(lightningcss@1.28.1)(tsx@4.19.2)(yaml@2.6.1) + transitivePeerDependencies: + - '@tanstack/react-router' + - supports-color + + '@tanstack/store@0.7.0': {} + '@tanstack/table-core@8.20.5': {} + '@tanstack/virtual-file-routes@1.87.6': {} + '@tokenizer/token@0.3.0': {} '@trysound/sax@0.2.0': {} @@ -15021,24 +15253,24 @@ snapshots: '@types/babel__core@7.20.5': dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 '@types/babel__generator': 7.6.8 '@types/babel__template': 7.4.4 '@types/babel__traverse': 7.20.6 '@types/babel__generator@7.6.8': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 '@types/babel__template@7.4.4': dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 '@types/babel__traverse@7.20.6': dependencies: - '@babel/types': 7.26.0 + '@babel/types': 7.26.3 '@types/cacheable-request@6.0.3': dependencies: @@ -15807,6 +16039,15 @@ snapshots: b4a@1.6.7: {} + babel-dead-code-elimination@1.0.8: + dependencies: + '@babel/core': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/traverse': 7.26.5 + '@babel/types': 7.26.3 + transitivePeerDependencies: + - supports-color + bail@2.0.2: {} balanced-match@1.0.2: {} @@ -17374,6 +17615,10 @@ snapshots: globrex@0.1.2: {} + goober@2.1.16(csstype@3.1.3): + dependencies: + csstype: 3.1.3 + google-auth-library@9.15.0(encoding@0.1.13): dependencies: base64-js: 1.5.1 @@ -18363,8 +18608,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.2 - '@babel/types': 7.26.0 + '@babel/parser': 7.26.3 + '@babel/types': 7.26.3 source-map-js: 1.2.1 make-dir@3.1.0: @@ -19675,6 +19920,8 @@ snapshots: prettier@3.4.1: {} + prettier@3.4.2: {} + pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 @@ -20807,6 +21054,8 @@ snapshots: tiny-invariant@1.3.3: {} + tiny-warning@1.0.3: {} + tiny-worker@2.3.0: dependencies: esm: 3.2.25 @@ -21133,6 +21382,11 @@ snapshots: unpipe@1.0.0: {} + unplugin@1.16.1: + dependencies: + acorn: 8.14.0 + webpack-virtual-modules: 0.6.2 + update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: browserslist: 4.24.2 @@ -21685,6 +21939,8 @@ snapshots: webidl-conversions@7.0.0: {} + webpack-virtual-modules@0.6.2: {} + whatwg-encoding@3.1.1: dependencies: iconv-lite: 0.6.3 From 24a265e7ee8eb9bf5d5f4302dc6e651394660d47 Mon Sep 17 00:00:00 2001 From: Laurynas Keturakis Date: Mon, 13 Jan 2025 17:14:30 +0100 Subject: [PATCH 010/108] stuff --- playground/package.json | 4 +- playground/src/routes/__root.tsx | 24 +-- pnpm-lock.yaml | 247 ++++++++++++++++++++++++++++++- 3 files changed, 261 insertions(+), 14 deletions(-) diff --git a/playground/package.json b/playground/package.json index ad194777f..d8a5eab9a 100644 --- a/playground/package.json +++ b/playground/package.json @@ -8,9 +8,11 @@ "build": "tsc -b && vite build", "lint": "biome lint .", "format": "biome check . --write", - "preview": "vite preview" + "preview": "vite preview", + "shadd": "pnpm dlx shadcn@latest add" }, "dependencies": { + "@radix-ui/react-navigation-menu": "^1.2.3", "@radix-ui/react-slot": "^1.1.0", "@tanstack/react-query": "^5.61.5", "@tanstack/react-query-devtools": "^5.64.1", diff --git a/playground/src/routes/__root.tsx b/playground/src/routes/__root.tsx index 59ee8d635..322ad374e 100644 --- a/playground/src/routes/__root.tsx +++ b/playground/src/routes/__root.tsx @@ -1,10 +1,22 @@ -import { Outlet, createRootRoute } from "@tanstack/react-router"; import React from "react"; +import { Outlet, createRootRoute } from "@tanstack/react-router"; export const Route = createRootRoute({ component: RootComponent, }); +function RootComponent() { + return ( +
+
+ +
+ + +
+ ); +} + const TanStackRouterDevtools = process.env.NODE_ENV === "production" ? () => null // Render nothing in production @@ -26,13 +38,3 @@ const ReactQueryDevtools = default: res.ReactQueryDevtools, })), ); - -function RootComponent() { - return ( -
- - - -
- ); -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79c654140..96e30c9ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -652,6 +652,9 @@ importers: playground: dependencies: + '@radix-ui/react-navigation-menu': + specifier: ^1.2.3 + version: 1.2.3(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@radix-ui/react-slot': specifier: ^1.1.0 version: 1.1.0(@types/react@18.3.18)(react@19.0.0) @@ -3750,6 +3753,9 @@ packages: '@radix-ui/primitive@1.1.0': resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} + '@radix-ui/primitive@1.1.1': + resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==} + '@radix-ui/react-accordion@1.2.1': resolution: {integrity: sha512-bg/l7l5QzUjgsh8kjwDFommzAshnUsuVMV5NM56QVCm+7ZckYdd9P/ExR8xG/Oup0OajVxNLaHJ1tb8mXk+nzQ==} peerDependencies: @@ -3815,6 +3821,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-collection@1.1.1': + resolution: {integrity: sha512-LwT3pSho9Dljg+wY2KN2mrrh6y3qELfftINERIzBUO9e0N+t0oMTyn3k9iv+ZqgrwGkRnLpNJrsMv9BZlt2yuA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-compose-refs@1.1.0': resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: @@ -3824,6 +3843,15 @@ packages: '@types/react': optional: true + '@radix-ui/react-compose-refs@1.1.1': + resolution: {integrity: sha512-Y9VzoRDSJtgFMUCoiZBDVo084VQ5hfpXxVE+NgkdNsjiDBByiImMZKKhxMwCbdHvhlENG6a833CbFkOQvTricw==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@radix-ui/react-context@1.1.0': resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} peerDependencies: @@ -3877,6 +3905,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-dismissable-layer@1.1.3': + resolution: {integrity: sha512-onrWn/72lQoEucDmJnr8uczSNTujT0vJnA/X5+3AkChVPowr8n1yvIKIabhWyMQeMvvmdpsvcyDqx3X1LEXCPg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-dropdown-menu@2.1.2': resolution: {integrity: sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA==} peerDependencies: @@ -3978,6 +4019,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-navigation-menu@1.2.3': + resolution: {integrity: sha512-IQWAsQ7dsLIYDrn0WqPU+cdM7MONTv9nqrLVYoie3BPiabSfUVDe6Fr+oEt0Cofsr9ONDcDe9xhmJbL1Uq1yKg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-popover@1.1.2': resolution: {integrity: sha512-u2HRUyWW+lOiA2g0Le0tMmT55FGOEWHwPFt1EPfbLly7uXQExFo5duNKqG2DzmFXIdqOeNd+TpE8baHWJCyP9w==} peerDependencies: @@ -4030,6 +4084,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-presence@1.1.2': + resolution: {integrity: sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-primitive@2.0.0': resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} peerDependencies: @@ -4043,6 +4110,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-primitive@2.0.1': + resolution: {integrity: sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-progress@1.1.0': resolution: {integrity: sha512-aSzvnYpP725CROcxAOEBVZZSIQVQdHgBr2QQFKySsaD14u8dNT0batuXI+AAGDdAHfXH8rbnHmjYFqVJ21KkRg==} peerDependencies: @@ -4104,6 +4184,15 @@ packages: '@types/react': optional: true + '@radix-ui/react-slot@1.1.1': + resolution: {integrity: sha512-RApLLOcINYJA+dMVbOju7MYv1Mb2EBp2nH4HdDzXTSyaR5optlm6Otrz1euW3HbdOR8UmmFK06TD+A9frYWv+g==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@radix-ui/react-switch@1.1.1': resolution: {integrity: sha512-diPqDDoBcZPSicYoMWdWx+bCPuTRH4QSp9J+65IvtdS0Kuzt67bI6n32vCj8q6NZmYW/ah+2orOtMwcX5eQwIg==} peerDependencies: @@ -4232,6 +4321,19 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-visually-hidden@1.1.1': + resolution: {integrity: sha512-vVfA2IZ9q/J+gEamvj761Oq1FpWgCDaNOOIfbPVp2MVPLEomUr5+Vf7kJGwQ24YxZSlQVar7Bes8kyTo5Dshpg==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/rect@1.1.0': resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} @@ -13981,6 +14083,8 @@ snapshots: '@radix-ui/primitive@1.1.0': {} + '@radix-ui/primitive@1.1.1': {} + '@radix-ui/react-accordion@1.2.1(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14051,6 +14155,18 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-collection@1.1.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-context': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-slot': 1.1.1(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 @@ -14063,6 +14179,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.18 + '@radix-ui/react-compose-refs@1.1.1(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-context@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 @@ -14075,6 +14197,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-context@1.1.1(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-dialog@1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14103,6 +14231,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-direction@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-dismissable-layer@1.1.1(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14116,6 +14250,19 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-dismissable-layer@1.1.3(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.1 + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/react-dropdown-menu@2.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14176,6 +14323,13 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-id@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-label@2.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -14229,6 +14383,28 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-navigation-menu@1.2.3(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/primitive': 1.1.1 + '@radix-ui/react-collection': 1.1.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-context': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-direction': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-id': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-presence': 1.1.2(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-use-previous': 1.1.0(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-visually-hidden': 1.1.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/react-popover@1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14290,6 +14466,16 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-presence@1.1.2(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.18)(react@19.0.0) + '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/react-primitive@2.0.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/react-slot': 1.1.0(@types/react@18.3.12)(react@18.3.1) @@ -14299,6 +14485,15 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-primitive@2.0.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-slot': 1.1.1(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/react-progress@1.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/react-context': 1.1.0(@types/react@18.3.12)(react@18.3.1) @@ -14367,6 +14562,13 @@ snapshots: optionalDependencies: '@types/react': 18.3.18 + '@radix-ui/react-slot@1.1.1(@types/react@18.3.18)(react@19.0.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-switch@1.1.1(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@radix-ui/primitive': 1.1.0 @@ -14444,6 +14646,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.12)(react@18.3.1) @@ -14451,6 +14659,13 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.12)(react@18.3.1) @@ -14458,18 +14673,37 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.18)(react@19.0.0) + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-use-previous@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-use-previous@1.1.0(@types/react@18.3.18)(react@19.0.0)': + dependencies: + react: 19.0.0 + optionalDependencies: + '@types/react': 18.3.18 + '@radix-ui/react-use-rect@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: '@radix-ui/rect': 1.1.0 @@ -14493,6 +14727,15 @@ snapshots: '@types/react': 18.3.12 '@types/react-dom': 18.3.1 + '@radix-ui/react-visually-hidden@1.1.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.5(@types/react@18.3.18))(@types/react@18.3.18)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + optionalDependencies: + '@types/react': 18.3.18 + '@types/react-dom': 18.3.5(@types/react@18.3.18) + '@radix-ui/rect@1.1.0': {} '@rollup/pluginutils@5.1.3(rollup@4.27.4)': @@ -15643,7 +15886,7 @@ snapshots: '@vue/compiler-core@3.5.12': dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.26.5 '@vue/shared': 3.5.12 entities: 4.5.0 estree-walker: 2.0.2 @@ -15656,7 +15899,7 @@ snapshots: '@vue/compiler-sfc@3.5.12': dependencies: - '@babel/parser': 7.26.3 + '@babel/parser': 7.26.5 '@vue/compiler-core': 3.5.12 '@vue/compiler-dom': 3.5.12 '@vue/compiler-ssr': 3.5.12 From c1b015a222a526ed7856dbc51bf5ff9888fe5f98 Mon Sep 17 00:00:00 2001 From: Stephan Lagerwaard Date: Mon, 13 Jan 2025 17:59:53 +0100 Subject: [PATCH 011/108] Rewrite embedded implementation to a middleware handler --- api/src/app.ts | 10 +---- packages/embedded-client/src/App.tsx | 3 +- packages/embedded-client/src/index.tsx | 4 +- packages/embedded/package.json | 4 +- packages/embedded/src/index.ts | 28 ++++++++++++ .../embedded/src/{index.tsx => router.tsx} | 43 +++++++------------ pnpm-lock.yaml | 3 ++ 7 files changed, 56 insertions(+), 39 deletions(-) create mode 100644 packages/embedded/src/index.ts rename packages/embedded/src/{index.tsx => router.tsx} (55%) diff --git a/api/src/app.ts b/api/src/app.ts index 783bf9471..dc25f230b 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -13,7 +13,7 @@ import auth from "./routes/auth.js"; import inference from "./routes/inference/index.js"; import settings from "./routes/settings.js"; import traces from "./routes/traces.js"; -import { createRoutes } from "@fiberplane/embedded"; +import { createMiddleware } from "@fiberplane/embedded"; export function createApp( db: LibSQLDatabase, @@ -60,13 +60,7 @@ export function createApp( app.route("/", appRoutes); app.route("/", settings); - const embeddedRoutes = createRoutes<{ - Bindings: Bindings; - Variables: Variables; - }>(); - - // biome-ignore lint/suspicious/noExplicitAny: TODO: figure out why hono types break - app.route("/fp", embeddedRoutes as any); + app.use("/fp/*", createMiddleware()); return app; } diff --git a/packages/embedded-client/src/App.tsx b/packages/embedded-client/src/App.tsx index e44209a01..bcf7688c6 100644 --- a/packages/embedded-client/src/App.tsx +++ b/packages/embedded-client/src/App.tsx @@ -1,12 +1,13 @@ import { useState } from "react"; -export function App() { +export function App({ mountPath }: { mountPath: string }) { const [counter, setCounter] = useState(0); const increment = () => setCounter((current) => current + 1); const decrement = () => setCounter((current) => current - 1); return (
+
App mount path: {mountPath}
diff --git a/packages/embedded-client/src/index.tsx b/packages/embedded-client/src/index.tsx index d9ede58b6..fd23686d4 100644 --- a/packages/embedded-client/src/index.tsx +++ b/packages/embedded-client/src/index.tsx @@ -3,6 +3,8 @@ import { App } from "./App"; const container = document.getElementById("root"); if (container) { + // biome-ignore lint/style/noNonNullAssertion: WIP + const mountPath = container.dataset.mountPath!; const root = createRoot(container); - root.render(); + root.render(); } diff --git a/packages/embedded/package.json b/packages/embedded/package.json index bff691bcf..19b97dd84 100644 --- a/packages/embedded/package.json +++ b/packages/embedded/package.json @@ -4,8 +4,8 @@ "type": "module", "exports": { ".": { - "types": "./src/index.tsx", - "import": "./src/index.tsx" + "types": "./src/index.ts", + "import": "./src/index.ts" } }, "publishConfig": { diff --git a/packages/embedded/src/index.ts b/packages/embedded/src/index.ts new file mode 100644 index 000000000..0fa669642 --- /dev/null +++ b/packages/embedded/src/index.ts @@ -0,0 +1,28 @@ +import type { Env, MiddlewareHandler } from "hono/types"; +import { createRouter } from "./router.js"; + +export const createMiddleware = + (): MiddlewareHandler => + async (c, next) => { + // The middleware gets mounted inside a consumer Hono app under a routePath, + // we need to remove the prefix routePath for our embedded router to make + // sure the embedded router matches properly + const mountedPath = c.req.routePath.replace("/*", ""); + const correctedPath = c.req.path.replace(mountedPath, ""); + + // Create a new request with the updated paths + const newUrl = new URL(c.req.url); + newUrl.pathname = correctedPath; + const newRequest = new Request(newUrl, c.req.raw); + + // Let our embedded router handle the request + const router = createRouter(mountedPath); + const response = await router.fetch(newRequest); + + // Skip the middleware and continue if the embedded router doesn't match + if (response.status === 404) { + return next(); + } + + return response; + }; diff --git a/packages/embedded/src/index.tsx b/packages/embedded/src/router.tsx similarity index 55% rename from packages/embedded/src/index.tsx rename to packages/embedded/src/router.tsx index fd1cb0433..366e38322 100644 --- a/packages/embedded/src/index.tsx +++ b/packages/embedded/src/router.tsx @@ -1,31 +1,23 @@ /** @jsx jsx */ /** @jsxImportSource hono/jsx */ +// @ts-nocheck import { jsx } from "hono/jsx"; -// TODO: I think we need to include this if the consumer app doesn't have hono/jsx in tsconfig -// TODO: Figure out how to fix this -import { Hono } from "hono"; -import { dirname } from "node:path"; +import { existsSync, readFileSync } from "node:fs"; +import path, { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; -import { existsSync } from "node:fs"; -import { join } from "node:path"; -import { readFileSync } from "node:fs"; -import type { BlankEnv, BlankSchema, Env, Schema } from "hono/types"; +import { type Env, Hono } from "hono"; +// TODO: This only works with node, fix asset loading for other runtimes as well const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const clientDistPath = join(__dirname, "../../embedded-client/dist"); -// TODO: Using Hono types returns in: -// Type instantiation is excessively deep and possibly infinite. -export function createRoutes< - E extends Env = BlankEnv, - S extends Schema = BlankSchema, - BasePath extends string = "/", ->() { - const app = new Hono(); +export function createRouter(mountedPath: string): Hono { + const router = new Hono(); - app.get("/client/index.js", async (c) => { + // TODO: This only works with node, fix asset loading for other runtimes as well + router.get("/client/index.js", async (c) => { const indexPath = join(clientDistPath, "index.js"); if (!existsSync(indexPath)) { @@ -34,7 +26,6 @@ export function createRoutes< try { const content = readFileSync(indexPath, "utf-8"); - return new Response(content, { status: 200, headers: { @@ -48,7 +39,7 @@ export function createRoutes< } }); - app.get("/", (c) => { + router.get("/*", (c) => { return c.html( @@ -57,19 +48,17 @@ export function createRoutes< -
+

Loading React application...

- + + + +
+ + diff --git a/playground/dist/index.js b/playground/dist/index.js new file mode 100644 index 000000000..f02045aea --- /dev/null +++ b/playground/dist/index.js @@ -0,0 +1,65 @@ +var kh=i=>{throw TypeError(i)};var wo=(i,u,s)=>u.has(i)||kh("Cannot "+s);var L=(i,u,s)=>(wo(i,u,"read from private field"),s?s.call(i):u.get(i)),xt=(i,u,s)=>u.has(i)?kh("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(i):u.set(i,s),pt=(i,u,s,o)=>(wo(i,u,"write to private field"),o?o.call(i,s):u.set(i,s),s),le=(i,u,s)=>(wo(i,u,"access private method"),s);var as=(i,u,s,o)=>({set _(f){pt(i,u,f,s)},get _(){return L(i,u,o)}});(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var Uo={exports:{}},Ci={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Fh;function C0(){if(Fh)return Ci;Fh=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function s(o,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var v in f)v!=="key"&&(d[v]=f[v])}else d=f;return f=d.ref,{$$typeof:i,type:o,key:m,ref:f!==void 0?f:null,props:d}}return Ci.Fragment=u,Ci.jsx=s,Ci.jsxs=s,Ci}var Wh;function D0(){return Wh||(Wh=1,Uo.exports=C0()),Uo.exports}var Q=D0(),No={exports:{}},ht={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $h;function w0(){if($h)return ht;$h=1;var i=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),b=Symbol.iterator;function R(S){return S===null||typeof S!="object"?null:(S=b&&S[b]||S["@@iterator"],typeof S=="function"?S:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,z={};function D(S,j,k){this.props=S,this.context=j,this.refs=z,this.updater=k||O}D.prototype.isReactComponent={},D.prototype.setState=function(S,j){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,j,"setState")},D.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function K(){}K.prototype=D.prototype;function V(S,j,k){this.props=S,this.context=j,this.refs=z,this.updater=k||O}var F=V.prototype=new K;F.constructor=V,C(F,D.prototype),F.isPureReactComponent=!0;var I=Array.isArray,q={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function rt(S,j,k,$,X,ut){return k=ut.ref,{$$typeof:i,type:S,key:j,ref:k!==void 0?k:null,props:ut}}function Y(S,j){return rt(S.type,j,void 0,void 0,void 0,S.props)}function H(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function P(S){var j={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(k){return j[k]})}var J=/\/+/g;function Z(S,j){return typeof S=="object"&&S!==null&&S.key!=null?P(""+S.key):j.toString(36)}function vt(){}function yt(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(vt,vt):(S.status="pending",S.then(function(j){S.status==="pending"&&(S.status="fulfilled",S.value=j)},function(j){S.status==="pending"&&(S.status="rejected",S.reason=j)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function ot(S,j,k,$,X){var ut=typeof S;(ut==="undefined"||ut==="boolean")&&(S=null);var lt=!1;if(S===null)lt=!0;else switch(ut){case"bigint":case"string":case"number":lt=!0;break;case"object":switch(S.$$typeof){case i:case u:lt=!0;break;case E:return lt=S._init,ot(lt(S._payload),j,k,$,X)}}if(lt)return X=X(S),lt=$===""?"."+Z(S,0):$,I(X)?(k="",lt!=null&&(k=lt.replace(J,"$&/")+"/"),ot(X,j,k,"",function(Lt){return Lt})):X!=null&&(H(X)&&(X=Y(X,k+(X.key==null||S&&S.key===X.key?"":(""+X.key).replace(J,"$&/")+"/")+lt)),j.push(X)),1;lt=0;var jt=$===""?".":$+":";if(I(S))for(var Et=0;Et>>1,S=G[dt];if(0>>1;dtf($,et))Xf(ut,$)?(G[dt]=ut,G[X]=et,dt=X):(G[dt]=$,G[k]=et,dt=k);else if(Xf(ut,et))G[dt]=ut,G[X]=et,dt=X;else break t}}return at}function f(G,at){var et=G.sortIndex-at.sortIndex;return et!==0?et:G.id-at.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var m=Date,v=m.now();i.unstable_now=function(){return m.now()-v}}var p=[],y=[],E=1,b=null,R=3,O=!1,C=!1,z=!1,D=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function F(G){for(var at=s(y);at!==null;){if(at.callback===null)o(y);else if(at.startTime<=G)o(y),at.sortIndex=at.expirationTime,u(p,at);else break;at=s(y)}}function I(G){if(z=!1,F(G),!C)if(s(p)!==null)C=!0,yt();else{var at=s(y);at!==null&&ot(I,at.startTime-G)}}var q=!1,W=-1,rt=5,Y=-1;function H(){return!(i.unstable_now()-YG&&H());){var dt=b.callback;if(typeof dt=="function"){b.callback=null,R=b.priorityLevel;var S=dt(b.expirationTime<=G);if(G=i.unstable_now(),typeof S=="function"){b.callback=S,F(G),at=!0;break e}b===s(p)&&o(p),F(G)}else o(p);b=s(p)}if(b!==null)at=!0;else{var j=s(y);j!==null&&ot(I,j.startTime-G),at=!1}}break t}finally{b=null,R=et,O=!1}at=void 0}}finally{at?J():q=!1}}}var J;if(typeof V=="function")J=function(){V(P)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,vt=Z.port2;Z.port1.onmessage=P,J=function(){vt.postMessage(null)}}else J=function(){D(P,0)};function yt(){q||(q=!0,J())}function ot(G,at){W=D(function(){G(i.unstable_now())},at)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(G){G.callback=null},i.unstable_continueExecution=function(){C||O||(C=!0,yt())},i.unstable_forceFrameRate=function(G){0>G||125dt?(G.sortIndex=et,u(y,G),s(p)===null&&G===s(y)&&(z?(K(W),W=-1):z=!0,ot(I,et-dt))):(G.sortIndex=S,u(p,G),C||O||(C=!0,yt())),G},i.unstable_shouldYield=H,i.unstable_wrapCallback=function(G){var at=R;return function(){var et=R;R=at;try{return G.apply(this,arguments)}finally{R=et}}}}(Ho)),Ho}var tm;function N0(){return tm||(tm=1,Lo.exports=U0()),Lo.exports}var qo={exports:{}},ie={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var em;function j0(){if(em)return ie;em=1;var i=Xi();function u(p){var y="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),qo.exports=j0(),qo.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var am;function H0(){if(am)return Di;am=1;var i=N0(),u=Xi(),s=L0();function o(t){var e="https://react.dev/errors/"+t;if(1)":-1l||g[a]!==M[l]){var U=` +`+g[a].replace(" at new "," at ");return t.displayName&&U.includes("")&&(U=U.replace("",t.displayName)),U}while(1<=a&&0<=l);break}}}finally{yt=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?vt(n):""}function G(t){switch(t.tag){case 26:case 27:case 5:return vt(t.type);case 16:return vt("Lazy");case 13:return vt("Suspense");case 19:return vt("SuspenseList");case 0:case 15:return t=ot(t.type,!1),t;case 11:return t=ot(t.type.render,!1),t;case 1:return t=ot(t.type,!0),t;default:return""}}function at(t){try{var e="";do e+=G(t),t=t.return;while(t);return e}catch(n){return` +Error generating stack: `+n.message+` +`+n.stack}}function et(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function dt(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function S(t){if(et(t)!==t)throw Error(o(188))}function j(t){var e=t.alternate;if(!e){if(e=et(t),e===null)throw Error(o(188));return e!==t?null:t}for(var n=t,a=e;;){var l=n.return;if(l===null)break;var r=l.alternate;if(r===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===r.child){for(r=l.child;r;){if(r===n)return S(l),t;if(r===a)return S(l),e;r=r.sibling}throw Error(o(188))}if(n.return!==a.return)n=l,a=r;else{for(var c=!1,h=l.child;h;){if(h===n){c=!0,n=l,a=r;break}if(h===a){c=!0,a=l,n=r;break}h=h.sibling}if(!c){for(h=r.child;h;){if(h===n){c=!0,n=r,a=l;break}if(h===a){c=!0,a=r,n=l;break}h=h.sibling}if(!c)throw Error(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?t:e}function k(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=k(t),e!==null)return e;t=t.sibling}return null}var $=Array.isArray,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ut={pending:!1,data:null,method:null,action:null},lt=[],jt=-1;function Et(t){return{current:t}}function Lt(t){0>jt||(t.current=lt[jt],lt[jt]=null,jt--)}function At(t,e){jt++,lt[jt]=t.current,t.current=e}var Dt=Et(null),se=Et(null),re=Et(null),ja=Et(null);function La(t,e){switch(At(re,e),At(se,t),At(Dt,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=Mh(t),e=Th(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Lt(Dt),At(Dt,e)}function Tn(){Lt(Dt),Lt(se),Lt(re)}function aa(t){t.memoizedState!==null&&At(ja,t);var e=Dt.current,n=Th(e,t.type);e!==n&&(At(se,t),At(Dt,n))}function Zi(t){se.current===t&&(Lt(Dt),Lt(se)),ja.current===t&&(Lt(ja),Ri._currentValue=ut)}var Ms=Object.prototype.hasOwnProperty,Ts=i.unstable_scheduleCallback,Rs=i.unstable_cancelCallback,rv=i.unstable_shouldYield,ov=i.unstable_requestPaint,ke=i.unstable_now,cv=i.unstable_getCurrentPriorityLevel,fc=i.unstable_ImmediatePriority,dc=i.unstable_UserBlockingPriority,Ki=i.unstable_NormalPriority,fv=i.unstable_LowPriority,hc=i.unstable_IdlePriority,dv=i.log,hv=i.unstable_setDisableYieldValue,Nl=null,ye=null;function mv(t){if(ye&&typeof ye.onCommitFiberRoot=="function")try{ye.onCommitFiberRoot(Nl,t,void 0,(t.current.flags&128)===128)}catch{}}function Rn(t){if(typeof dv=="function"&&hv(t),ye&&typeof ye.setStrictMode=="function")try{ye.setStrictMode(Nl,t)}catch{}}var pe=Math.clz32?Math.clz32:pv,vv=Math.log,yv=Math.LN2;function pv(t){return t>>>=0,t===0?32:31-(vv(t)/yv|0)|0}var Ji=128,ki=4194304;function la(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Fi(t,e){var n=t.pendingLanes;if(n===0)return 0;var a=0,l=t.suspendedLanes,r=t.pingedLanes,c=t.warmLanes;t=t.finishedLanes!==0;var h=n&134217727;return h!==0?(n=h&~l,n!==0?a=la(n):(r&=h,r!==0?a=la(r):t||(c=h&~c,c!==0&&(a=la(c))))):(h=n&~l,h!==0?a=la(h):r!==0?a=la(r):t||(c=n&~c,c!==0&&(a=la(c)))),a===0?0:e!==0&&e!==a&&!(e&l)&&(l=a&-a,c=e&-e,l>=c||l===32&&(c&4194176)!==0)?e:a}function jl(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function gv(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mc(){var t=Ji;return Ji<<=1,!(Ji&4194176)&&(Ji=128),t}function vc(){var t=ki;return ki<<=1,!(ki&62914560)&&(ki=4194304),t}function xs(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ll(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bv(t,e,n,a,l,r){var c=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var h=t.entanglements,g=t.expirationTimes,M=t.hiddenUpdates;for(n=c&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Mc={},Tc={};function Tv(t){return Ms.call(Tc,t)?!0:Ms.call(Mc,t)?!1:Mv.test(t)?Tc[t]=!0:(Mc[t]=!0,!1)}function Wi(t,e,n){if(Tv(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var a=e.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function $i(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function ln(t,e,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+a)}}function xe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Rc(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Rv(t){var e=Rc(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),a=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,r=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return l.call(this)},set:function(c){a=""+c,r.call(this,c)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(c){a=""+c},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Pi(t){t._valueTracker||(t._valueTracker=Rv(t))}function xc(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),a="";return t&&(a=Rc(t)?t.checked?"true":"false":t.value),t=a,t!==n?(e.setValue(t),!0):!1}function Ii(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var xv=/[\n"\\]/g;function Ae(t){return t.replace(xv,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function zs(t,e,n,a,l,r,c,h){t.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?t.type=c:t.removeAttribute("type"),e!=null?c==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+xe(e)):t.value!==""+xe(e)&&(t.value=""+xe(e)):c!=="submit"&&c!=="reset"||t.removeAttribute("value"),e!=null?Cs(t,c,xe(e)):n!=null?Cs(t,c,xe(n)):a!=null&&t.removeAttribute("value"),l==null&&r!=null&&(t.defaultChecked=!!r),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+xe(h):t.removeAttribute("name")}function Ac(t,e,n,a,l,r,c,h){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.type=r),e!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||e!=null))return;n=n!=null?""+xe(n):"",e=e!=null?""+xe(e):n,h||e===t.value||(t.value=e),t.defaultValue=e}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=h?t.checked:!!a,t.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.name=c)}function Cs(t,e,n){e==="number"&&Ii(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Qa(t,e,n,a){if(t=t.options,e){e={};for(var l=0;l=Yl),Gc=" ",Qc=!1;function Vc(t,e){switch(t){case"keyup":return ty.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yc(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Za=!1;function ny(t,e){switch(t){case"compositionend":return Yc(e);case"keypress":return e.which!==32?null:(Qc=!0,Gc);case"textInput":return t=e.data,t===Gc&&Qc?null:t;default:return null}}function ay(t,e){if(Za)return t==="compositionend"||!Qs&&Vc(t,e)?(t=Nc(),eu=Ls=An=null,Za=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=a}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=$c(n)}}function Ic(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ic(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function tf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ii(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ii(t.document)}return e}function Xs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function fy(t,e){var n=tf(e);e=t.focusedElem;var a=t.selectionRange;if(n!==e&&e&&e.ownerDocument&&Ic(e.ownerDocument.documentElement,e)){if(a!==null&&Xs(e)){if(t=a.start,n=a.end,n===void 0&&(n=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(n,e.value.length);else if(n=(t=e.ownerDocument||document)&&t.defaultView||window,n.getSelection){n=n.getSelection();var l=e.textContent.length,r=Math.min(a.start,l);a=a.end===void 0?r:Math.min(a.end,l),!n.extend&&r>a&&(l=a,a=r,r=l),l=Pc(e,r);var c=Pc(e,a);l&&c&&(n.rangeCount!==1||n.anchorNode!==l.node||n.anchorOffset!==l.offset||n.focusNode!==c.node||n.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),n.removeAllRanges(),r>a?(n.addRange(t),n.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),n.addRange(t)))}}for(t=[],n=e;n=n.parentNode;)n.nodeType===1&&t.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,Ka=null,Zs=null,Jl=null,Ks=!1;function ef(t,e,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ks||Ka==null||Ka!==Ii(a)||(a=Ka,"selectionStart"in a&&Xs(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Jl&&Kl(Jl,a)||(Jl=a,a=Vu(Zs,"onSelect"),0>=c,l-=c,un=1<<32-pe(e)+l|n<st?(Pt=it,it=null):Pt=it.sibling;var Rt=A(T,it,x[st],N);if(Rt===null){it===null&&(it=Pt);break}t&&it&&Rt.alternate===null&&e(T,it),_=r(Rt,_,st),bt===null?tt=Rt:bt.sibling=Rt,bt=Rt,it=Pt}if(st===x.length)return n(T,it),Tt&&fa(T,st),tt;if(it===null){for(;stst?(Pt=it,it=null):Pt=it.sibling;var Jn=A(T,it,Rt.value,N);if(Jn===null){it===null&&(it=Pt);break}t&&it&&Jn.alternate===null&&e(T,it),_=r(Jn,_,st),bt===null?tt=Jn:bt.sibling=Jn,bt=Jn,it=Pt}if(Rt.done)return n(T,it),Tt&&fa(T,st),tt;if(it===null){for(;!Rt.done;st++,Rt=x.next())Rt=B(T,Rt.value,N),Rt!==null&&(_=r(Rt,_,st),bt===null?tt=Rt:bt.sibling=Rt,bt=Rt);return Tt&&fa(T,st),tt}for(it=a(it);!Rt.done;st++,Rt=x.next())Rt=w(it,T,st,Rt.value,N),Rt!==null&&(t&&Rt.alternate!==null&&it.delete(Rt.key===null?st:Rt.key),_=r(Rt,_,st),bt===null?tt=Rt:bt.sibling=Rt,bt=Rt);return t&&it.forEach(function(z0){return e(T,z0)}),Tt&&fa(T,st),tt}function Qt(T,_,x,N){if(typeof x=="object"&&x!==null&&x.type===p&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case m:t:{for(var tt=x.key;_!==null;){if(_.key===tt){if(tt=x.type,tt===p){if(_.tag===7){n(T,_.sibling),N=l(_,x.props.children),N.return=T,T=N;break t}}else if(_.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===V&&bf(tt)===_.type){n(T,_.sibling),N=l(_,x.props),ti(N,x),N.return=T,T=N;break t}n(T,_);break}else e(T,_);_=_.sibling}x.type===p?(N=_a(x.props.children,T.mode,N,x.key),N.return=T,T=N):(N=wu(x.type,x.key,x.props,null,T.mode,N),ti(N,x),N.return=T,T=N)}return c(T);case v:t:{for(tt=x.key;_!==null;){if(_.key===tt)if(_.tag===4&&_.stateNode.containerInfo===x.containerInfo&&_.stateNode.implementation===x.implementation){n(T,_.sibling),N=l(_,x.children||[]),N.return=T,T=N;break t}else{n(T,_);break}else e(T,_);_=_.sibling}N=kr(x,T.mode,N),N.return=T,T=N}return c(T);case V:return tt=x._init,x=tt(x._payload),Qt(T,_,x,N)}if($(x))return nt(T,_,x,N);if(W(x)){if(tt=W(x),typeof tt!="function")throw Error(o(150));return x=tt.call(x),ct(T,_,x,N)}if(typeof x.then=="function")return Qt(T,_,hu(x),N);if(x.$$typeof===O)return Qt(T,_,zu(T,x),N);mu(T,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,_!==null&&_.tag===6?(n(T,_.sibling),N=l(_,x),N.return=T,T=N):(n(T,_),N=Jr(x,T.mode,N),N.return=T,T=N),c(T)):n(T,_)}return function(T,_,x,N){try{Il=0;var tt=Qt(T,_,x,N);return Pa=null,tt}catch(it){if(it===$l)throw it;var bt=je(29,it,null,T.mode);return bt.lanes=N,bt.return=T,bt}finally{}}}var ha=Sf(!0),Ef=Sf(!1),Ia=Et(null),vu=Et(0);function _f(t,e){t=gn,At(vu,t),At(Ia,e),gn=t|e.baseLanes}function tr(){At(vu,gn),At(Ia,Ia.current)}function er(){gn=vu.current,Lt(Ia),Lt(vu)}var we=Et(null),We=null;function zn(t){var e=t.alternate;At(Jt,Jt.current&1),At(we,t),We===null&&(e===null||Ia.current!==null||e.memoizedState!==null)&&(We=t)}function Mf(t){if(t.tag===22){if(At(Jt,Jt.current),At(we,t),We===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(We=t)}}else Cn()}function Cn(){At(Jt,Jt.current),At(we,we.current)}function rn(t){Lt(we),We===t&&(We=null),Lt(Jt)}var Jt=Et(0);function yu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var yy=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,a){t.push(a)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},py=i.unstable_scheduleCallback,gy=i.unstable_NormalPriority,kt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nr(){return{controller:new yy,data:new Map,refCount:0}}function ei(t){t.refCount--,t.refCount===0&&py(gy,function(){t.controller.abort()})}var ni=null,ar=0,tl=0,el=null;function by(t,e){if(ni===null){var n=ni=[];ar=0,tl=oo(),el={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ar++,e.then(Tf,Tf),e}function Tf(){if(--ar===0&&ni!==null){el!==null&&(el.status="fulfilled");var t=ni;ni=null,tl=0,el=null;for(var e=0;er?r:8;var c=H.T,h={};H.T=h,Sr(t,!1,e,n);try{var g=l(),M=H.S;if(M!==null&&M(h,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var U=Sy(g,a);ii(t,e,U,_e(t))}else ii(t,e,a,_e(t))}catch(B){ii(t,e,{then:function(){},status:"rejected",reason:B},_e())}finally{X.p=r,H.T=c}}function Ry(){}function gr(t,e,n,a){if(t.tag!==5)throw Error(o(476));var l=ed(t).queue;td(t,l,e,ut,n===null?Ry:function(){return nd(t),n(a)})}function ed(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:ut,baseState:ut,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:on,lastRenderedState:ut},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:on,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function nd(t){var e=ed(t).next.queue;ii(t,e,{},_e())}function br(){return ae(Ri)}function ad(){return Zt().memoizedState}function ld(){return Zt().memoizedState}function xy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=_e();t=jn(n);var a=Ln(e,t,n);a!==null&&(ce(a,e,n),ri(a,e,n)),e={cache:nr()},t.payload=e;return}e=e.return}}function Ay(t,e,n){var a=_e();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Ru(t)?ud(e,n):(n=Fs(t,e,n,a),n!==null&&(ce(n,t,a),sd(n,e,a)))}function id(t,e,n){var a=_e();ii(t,e,n,a)}function ii(t,e,n,a){var l={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ru(t))ud(e,l);else{var r=t.alternate;if(t.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var c=e.lastRenderedState,h=r(c,n);if(l.hasEagerState=!0,l.eagerState=h,ge(h,c))return ru(t,e,l,0),wt===null&&su(),!1}catch{}finally{}if(n=Fs(t,e,l,a),n!==null)return ce(n,t,a),sd(n,e,a),!0}return!1}function Sr(t,e,n,a){if(a={lane:2,revertLane:oo(),action:a,hasEagerState:!1,eagerState:null,next:null},Ru(t)){if(e)throw Error(o(479))}else e=Fs(t,n,a,2),e!==null&&ce(e,t,2)}function Ru(t){var e=t.alternate;return t===gt||e!==null&&e===gt}function ud(t,e){nl=gu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function sd(t,e,n){if(n&4194176){var a=e.lanes;a&=t.pendingLanes,n|=a,e.lanes=n,pc(t,n)}}var $e={readContext:ae,use:Eu,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt};$e.useCacheRefresh=Yt,$e.useMemoCache=Yt,$e.useHostTransitionStatus=Yt,$e.useFormState=Yt,$e.useActionState=Yt,$e.useOptimistic=Yt;var ya={readContext:ae,use:Eu,useCallback:function(t,e){return ve().memoizedState=[t,e===void 0?null:e],t},useContext:ae,useEffect:Kf,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Mu(4194308,4,Ff.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mu(4194308,4,t,e)},useInsertionEffect:function(t,e){Mu(4,2,t,e)},useMemo:function(t,e){var n=ve();e=e===void 0?null:e;var a=t();if(va){Rn(!0);try{t()}finally{Rn(!1)}}return n.memoizedState=[a,e],a},useReducer:function(t,e,n){var a=ve();if(n!==void 0){var l=n(e);if(va){Rn(!0);try{n(e)}finally{Rn(!1)}}}else l=e;return a.memoizedState=a.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},a.queue=t,t=t.dispatch=Ay.bind(null,gt,t),[a.memoizedState,t]},useRef:function(t){var e=ve();return t={current:t},e.memoizedState=t},useState:function(t){t=hr(t);var e=t.queue,n=id.bind(null,gt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:yr,useDeferredValue:function(t,e){var n=ve();return pr(n,t,e)},useTransition:function(){var t=hr(!1);return t=td.bind(null,gt,t.queue,!0,!1),ve().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var a=gt,l=ve();if(Tt){if(n===void 0)throw Error(o(407));n=n()}else{if(n=e(),wt===null)throw Error(o(349));Mt&60||Cf(a,e,n)}l.memoizedState=n;var r={value:n,getSnapshot:e};return l.queue=r,Kf(wf.bind(null,a,r,t),[t]),a.flags|=2048,ll(9,Df.bind(null,a,r,n,e),{destroy:void 0},null),n},useId:function(){var t=ve(),e=wt.identifierPrefix;if(Tt){var n=sn,a=un;n=(a&~(1<<32-pe(a)-1)).toString(32)+n,e=":"+e+"R"+n,n=bu++,0 title"))),ee(r,a,n),r[ne]=t,Ft(r),a=r;break t;case"link":var c=Nh("link","href",l).get(a+(n.href||""));if(c){for(var h=0;h<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof a.is=="string"?l.createElement("select",{is:a.is}):l.createElement("select"),a.multiple?t.multiple=!0:a.size&&(t.size=a.size);break;default:t=typeof a.is=="string"?l.createElement(n,{is:a.is}):l.createElement(n)}}t[ne]=e,t[he]=a;t:for(l=e.child;l!==null;){if(l.tag===5||l.tag===6)t.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break t;for(;l.sibling===null;){if(l.return===null||l.return===e)break t;l=l.return}l.sibling.return=l.return,l=l.sibling}e.stateNode=t;t:switch(ee(t,n,a),n){case"button":case"input":case"select":case"textarea":t=!!a.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&yn(e)}}return Ht(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&yn(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(o(166));if(t=re.current,kl(e)){if(t=e.stateNode,n=e.memoizedProps,a=null,l=oe,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}t[ne]=e,t=!!(t.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||_h(t.nodeValue,n)),t||da(e)}else t=Xu(t).createTextNode(a),t[ne]=e,e.stateNode=t}return Ht(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=kl(e),a!==null&&a.dehydrated!==null){if(t===null){if(!l)throw Error(o(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[ne]=e}else Fl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ht(e),l=!1}else Ve!==null&&(no(Ve),Ve=null),l=!0;if(!l)return e.flags&256?(rn(e),e):(rn(e),null)}if(rn(e),e.flags&128)return e.lanes=n,e;if(n=a!==null,t=t!==null&&t.memoizedState!==null,n){a=e.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool);var r=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==l&&(a.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),Uu(e,e.updateQueue),Ht(e),null;case 4:return Tn(),t===null&&mo(e.stateNode.containerInfo),Ht(e),null;case 10:return dn(e.type),Ht(e),null;case 19:if(Lt(Jt),l=e.memoizedState,l===null)return Ht(e),null;if(a=(e.flags&128)!==0,r=l.rendering,r===null)if(a)vi(l,!1);else{if(Gt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(r=yu(t),r!==null){for(e.flags|=128,vi(l,!1),t=r.updateQueue,e.updateQueue=t,Uu(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Wd(n,t),n=n.sibling;return At(Jt,Jt.current&1|2),e.child}t=t.sibling}l.tail!==null&&ke()>Nu&&(e.flags|=128,a=!0,vi(l,!1),e.lanes=4194304)}else{if(!a)if(t=yu(r),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Uu(e,t),vi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!Tt)return Ht(e),null}else 2*ke()-l.renderingStartTime>Nu&&n!==536870912&&(e.flags|=128,a=!0,vi(l,!1),e.lanes=4194304);l.isBackwards?(r.sibling=e.child,e.child=r):(t=l.last,t!==null?t.sibling=r:e.child=r,l.last=r)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ke(),e.sibling=null,t=Jt.current,At(Jt,a?t&1|2:t&1),e):(Ht(e),null);case 22:case 23:return rn(e),er(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?n&536870912&&!(e.flags&128)&&(Ht(e),e.subtreeFlags&6&&(e.flags|=8192)):Ht(e),n=e.updateQueue,n!==null&&Uu(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==n&&(e.flags|=2048),t!==null&&Lt(ma),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),dn(kt),Ht(e),null;case 25:return null}throw Error(o(156,e.tag))}function Ny(t,e){switch($s(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return dn(kt),Tn(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Zi(e),null;case 13:if(rn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));Fl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Jt),null;case 4:return Tn(),null;case 10:return dn(e.type),null;case 22:case 23:return rn(e),er(),t!==null&&Lt(ma),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return dn(kt),null;case 25:return null;default:return null}}function Id(t,e){switch($s(e),e.tag){case 3:dn(kt),Tn();break;case 26:case 27:case 5:Zi(e);break;case 4:Tn();break;case 13:rn(e);break;case 19:Lt(Jt);break;case 10:dn(e.type);break;case 22:case 23:rn(e),er(),t!==null&&Lt(ma);break;case 24:dn(kt)}}var jy={getCacheForType:function(t){var e=ae(kt),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},Ly=typeof WeakMap=="function"?WeakMap:Map,qt=0,wt=null,St=null,Mt=0,Ut=0,Ee=null,pn=!1,rl=!1,Fr=!1,gn=0,Gt=0,Qn=0,Ma=0,Wr=0,Le=0,ol=0,yi=null,Pe=null,$r=!1,Pr=0,Nu=1/0,ju=null,Vn=null,Lu=!1,Ta=null,pi=0,Ir=0,to=null,gi=0,eo=null;function _e(){if(qt&2&&Mt!==0)return Mt&-Mt;if(H.T!==null){var t=tl;return t!==0?t:oo()}return bc()}function th(){Le===0&&(Le=!(Mt&536870912)||Tt?mc():536870912);var t=we.current;return t!==null&&(t.flags|=32),Le}function ce(t,e,n){(t===wt&&Ut===2||t.cancelPendingCommit!==null)&&(cl(t,0),bn(t,Mt,Le,!1)),Ll(t,n),(!(qt&2)||t!==wt)&&(t===wt&&(!(qt&2)&&(Ma|=n),Gt===4&&bn(t,Mt,Le,!1)),Ie(t))}function eh(t,e,n){if(qt&6)throw Error(o(327));var a=!n&&(e&60)===0&&(e&t.expiredLanes)===0||jl(t,e),l=a?By(t,e):io(t,e,!0),r=a;do{if(l===0){rl&&!a&&bn(t,e,0,!1);break}else if(l===6)bn(t,e,0,!pn);else{if(n=t.current.alternate,r&&!Hy(n)){l=io(t,e,!1),r=!1;continue}if(l===2){if(r=e,t.errorRecoveryDisabledLanes&r)var c=0;else c=t.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){e=c;t:{var h=t;l=yi;var g=h.current.memoizedState.isDehydrated;if(g&&(cl(h,c).flags|=256),c=io(h,c,!1),c!==2){if(Fr&&!g){h.errorRecoveryDisabledLanes|=r,Ma|=r,l=4;break t}r=Pe,Pe=l,r!==null&&no(r)}l=c}if(r=!1,l!==2)continue}}if(l===1){cl(t,0),bn(t,e,0,!0);break}t:{switch(a=t,l){case 0:case 1:throw Error(o(345));case 4:if((e&4194176)===e){bn(a,e,Le,!pn);break t}break;case 2:Pe=null;break;case 3:case 5:break;default:throw Error(o(329))}if(a.finishedWork=n,a.finishedLanes=e,(e&62914560)===e&&(r=Pr+300-ke(),10n?32:n,H.T=null,Ta===null)var r=!1;else{n=to,to=null;var c=Ta,h=pi;if(Ta=null,pi=0,qt&6)throw Error(o(331));var g=qt;if(qt|=4,kd(c.current),Zd(c,c.current,h,n),qt=g,bi(0,!1),ye&&typeof ye.onPostCommitFiberRoot=="function")try{ye.onPostCommitFiberRoot(Nl,c)}catch{}r=!0}return r}finally{X.p=l,H.T=a,ch(t,e)}}return!1}function fh(t,e,n){e=ze(n,e),e=Mr(t.stateNode,e,2),t=Ln(t,e,2),t!==null&&(Ll(t,2),Ie(t))}function Ct(t,e,n){if(t.tag===3)fh(t,t,n);else for(;e!==null;){if(e.tag===3){fh(e,t,n);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Vn===null||!Vn.has(a))){t=ze(n,t),n=md(2),a=Ln(e,n,2),a!==null&&(vd(n,a,e,t),Ll(a,2),Ie(a));break}}e=e.return}}function uo(t,e,n){var a=t.pingCache;if(a===null){a=t.pingCache=new Ly;var l=new Set;a.set(e,l)}else l=a.get(e),l===void 0&&(l=new Set,a.set(e,l));l.has(n)||(Fr=!0,l.add(n),t=Vy.bind(null,t,e,n),e.then(t,t))}function Vy(t,e,n){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,wt===t&&(Mt&n)===n&&(Gt===4||Gt===3&&(Mt&62914560)===Mt&&300>ke()-Pr?!(qt&2)&&cl(t,0):Wr|=n,ol===Mt&&(ol=0)),Ie(t)}function dh(t,e){e===0&&(e=vc()),t=On(t,e),t!==null&&(Ll(t,e),Ie(t))}function Yy(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),dh(t,n)}function Xy(t,e){var n=0;switch(t.tag){case 13:var a=t.stateNode,l=t.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(e),dh(t,n)}function Zy(t,e){return Ts(t,e)}var Bu=null,hl=null,so=!1,Gu=!1,ro=!1,Ra=0;function Ie(t){t!==hl&&t.next===null&&(hl===null?Bu=hl=t:hl=hl.next=t),Gu=!0,so||(so=!0,Jy(Ky))}function bi(t,e){if(!ro&&Gu){ro=!0;do for(var n=!1,a=Bu;a!==null;){if(t!==0){var l=a.pendingLanes;if(l===0)var r=0;else{var c=a.suspendedLanes,h=a.pingedLanes;r=(1<<31-pe(42|t)+1)-1,r&=l&~(c&~h),r=r&201326677?r&201326677|1:r?r|2:0}r!==0&&(n=!0,vh(a,r))}else r=Mt,r=Fi(a,a===wt?r:0),!(r&3)||jl(a,r)||(n=!0,vh(a,r));a=a.next}while(n);ro=!1}}function Ky(){Gu=so=!1;var t=0;Ra!==0&&(e0()&&(t=Ra),Ra=0);for(var e=ke(),n=null,a=Bu;a!==null;){var l=a.next,r=hh(a,e);r===0?(a.next=null,n===null?Bu=l:n.next=l,l===null&&(hl=n)):(n=a,(t!==0||r&3)&&(Gu=!0)),a=l}bi(t)}function hh(t,e){for(var n=t.suspendedLanes,a=t.pingedLanes,l=t.expirationTimes,r=t.pendingLanes&-62914561;0"u"?null:document;function Ch(t,e,n){var a=vl;if(a&&typeof e=="string"&&e){var l=Ae(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),zh.has(l)||(zh.add(l),t={rel:t,crossOrigin:n,href:e},a.querySelector(l)===null&&(e=a.createElement("link"),ee(e,"link",t),Ft(e),a.head.appendChild(e)))}}function o0(t){Sn.D(t),Ch("dns-prefetch",t,null)}function c0(t,e){Sn.C(t,e),Ch("preconnect",t,e)}function f0(t,e,n){Sn.L(t,e,n);var a=vl;if(a&&t&&e){var l='link[rel="preload"][as="'+Ae(e)+'"]';e==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Ae(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Ae(n.imageSizes)+'"]')):l+='[href="'+Ae(t)+'"]';var r=l;switch(e){case"style":r=yl(t);break;case"script":r=pl(t)}He.has(r)||(t=P({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),He.set(r,t),a.querySelector(l)!==null||e==="style"&&a.querySelector(_i(r))||e==="script"&&a.querySelector(Mi(r))||(e=a.createElement("link"),ee(e,"link",t),Ft(e),a.head.appendChild(e)))}}function d0(t,e){Sn.m(t,e);var n=vl;if(n&&t){var a=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+Ae(a)+'"][href="'+Ae(t)+'"]',r=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=pl(t)}if(!He.has(r)&&(t=P({rel:"modulepreload",href:t},e),He.set(r,t),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Mi(r)))return}a=n.createElement("link"),ee(a,"link",t),Ft(a),n.head.appendChild(a)}}}function h0(t,e,n){Sn.S(t,e,n);var a=vl;if(a&&t){var l=Ba(a).hoistableStyles,r=yl(t);e=e||"default";var c=l.get(r);if(!c){var h={loading:0,preload:null};if(c=a.querySelector(_i(r)))h.loading=5;else{t=P({rel:"stylesheet",href:t,"data-precedence":e},n),(n=He.get(r))&&Mo(t,n);var g=c=a.createElement("link");Ft(g),ee(g,"link",t),g._p=new Promise(function(M,U){g.onload=M,g.onerror=U}),g.addEventListener("load",function(){h.loading|=1}),g.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ku(c,e,a)}c={type:"stylesheet",instance:c,count:1,state:h},l.set(r,c)}}}function m0(t,e){Sn.X(t,e);var n=vl;if(n&&t){var a=Ba(n).hoistableScripts,l=pl(t),r=a.get(l);r||(r=n.querySelector(Mi(l)),r||(t=P({src:t,async:!0},e),(e=He.get(l))&&To(t,e),r=n.createElement("script"),Ft(r),ee(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(l,r))}}function v0(t,e){Sn.M(t,e);var n=vl;if(n&&t){var a=Ba(n).hoistableScripts,l=pl(t),r=a.get(l);r||(r=n.querySelector(Mi(l)),r||(t=P({src:t,async:!0,type:"module"},e),(e=He.get(l))&&To(t,e),r=n.createElement("script"),Ft(r),ee(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(l,r))}}function Dh(t,e,n,a){var l=(l=re.current)?Zu(l):null;if(!l)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=yl(n.href),n=Ba(l).hoistableStyles,a=n.get(e),a||(a={type:"style",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=yl(n.href);var r=Ba(l).hoistableStyles,c=r.get(t);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(t,c),(r=l.querySelector(_i(t)))&&!r._p&&(c.instance=r,c.state.loading=5),He.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},He.set(t,n),r||y0(l,t,n,c.state))),e&&a===null)throw Error(o(528,""));return c}if(e&&a!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=pl(n),n=Ba(l).hoistableScripts,a=n.get(e),a||(a={type:"script",instance:null,count:0,state:null},n.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function yl(t){return'href="'+Ae(t)+'"'}function _i(t){return'link[rel="stylesheet"]['+t+"]"}function wh(t){return P({},t,{"data-precedence":t.precedence,precedence:null})}function y0(t,e,n,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),ee(e,"link",n),Ft(e),t.head.appendChild(e))}function pl(t){return'[src="'+Ae(t)+'"]'}function Mi(t){return"script[async]"+t}function Uh(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Ae(n.href)+'"]');if(a)return e.instance=a,Ft(a),a;var l=P({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),Ft(a),ee(a,"style",l),Ku(a,n.precedence,t),e.instance=a;case"stylesheet":l=yl(n.href);var r=t.querySelector(_i(l));if(r)return e.state.loading|=4,e.instance=r,Ft(r),r;a=wh(n),(l=He.get(l))&&Mo(a,l),r=(t.ownerDocument||t).createElement("link"),Ft(r);var c=r;return c._p=new Promise(function(h,g){c.onload=h,c.onerror=g}),ee(r,"link",a),e.state.loading|=4,Ku(r,n.precedence,t),e.instance=r;case"script":return r=pl(n.src),(l=t.querySelector(Mi(r)))?(e.instance=l,Ft(l),l):(a=n,(l=He.get(r))&&(a=P({},n),To(a,l)),t=t.ownerDocument||t,l=t.createElement("script"),Ft(l),ee(l,"link",a),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(a=e.instance,e.state.loading|=4,Ku(a,n.precedence,t));return e.instance}function Ku(t,e,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,r=l,c=0;c title"):null)}function p0(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Lh(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Ti=null;function g0(){}function b0(t,e,n){if(Ti===null)throw Error(o(475));var a=Ti;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var l=yl(n.href),r=t.querySelector(_i(l));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(a.count++,a=ku.bind(a),t.then(a,a)),e.state.loading|=4,e.instance=r,Ft(r);return}r=t.ownerDocument||t,n=wh(n),(l=He.get(l))&&Mo(n,l),r=r.createElement("link"),Ft(r);var c=r;c._p=new Promise(function(h,g){c.onload=h,c.onerror=g}),ee(r,"link",n),e.instance=r}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(a.count++,e=ku.bind(a),t.addEventListener("load",e),t.addEventListener("error",e))}}function S0(){if(Ti===null)throw Error(o(475));var t=Ti;return t.stylesheets&&t.count===0&&Ro(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),jo.exports=H0(),jo.exports}var B0=q0();const Ua="__TSR_index",im="popstate",um="beforeunload";function Lm(i){let u=i.getLocation();const s=new Set,o=m=>{u=i.getLocation(),s.forEach(v=>v({location:u,action:m}))},f=m=>{i.notifyOnIndexChange??!0?o(m):u=i.getLocation()},d=async({task:m,navigateOpts:v,...p})=>{var y,E;if((v==null?void 0:v.ignoreBlocker)??!1){m();return}const R=((y=i.getBlockers)==null?void 0:y.call(i))??[],O=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&R.length&&O)for(const C of R){const z=Bi(p.path,p.state);if(await C.blockerFn({currentLocation:u,nextLocation:z,action:p.type})){(E=i.onBlocked)==null||E.call(i);return}}m()};return{get location(){return u},get length(){return i.getLength()},subscribers:s,subscribe:m=>(s.add(m),()=>{s.delete(m)}),push:(m,v,p)=>{const y=u.state[Ua];v=$o(y+1,v),d({task:()=>{i.pushState(m,v),o({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:m,state:v})},replace:(m,v,p)=>{const y=u.state[Ua];v=$o(y,v),d({task:()=>{i.replaceState(m,v),o({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:m,state:v})},go:(m,v)=>{d({task:()=>{i.go(m),f({type:"GO",index:m})},navigateOpts:v,type:"GO"})},back:m=>{d({task:()=>{i.back((m==null?void 0:m.ignoreBlocker)??!1),f({type:"BACK"})},navigateOpts:m,type:"BACK"})},forward:m=>{d({task:()=>{i.forward((m==null?void 0:m.ignoreBlocker)??!1),f({type:"FORWARD"})},navigateOpts:m,type:"FORWARD"})},canGoBack:()=>u.state[Ua]!==0,createHref:m=>i.createHref(m),block:m=>{var v;if(!i.setBlockers)return()=>{};const p=((v=i.getBlockers)==null?void 0:v.call(i))??[];return i.setBlockers([...p,m]),()=>{var y,E;const b=((y=i.getBlockers)==null?void 0:y.call(i))??[];(E=i.setBlockers)==null||E.call(i,b.filter(R=>R!==m))}},flush:()=>{var m;return(m=i.flush)==null?void 0:m.call(i)},destroy:()=>{var m;return(m=i.destroy)==null?void 0:m.call(i)},notify:o}}function $o(i,u){return u||(u={}),{...u,key:V0(),[Ua]:i}}function G0(i){const u=typeof document<"u"?window:void 0,s=u.history.pushState,o=u.history.replaceState;let f=[];const d=()=>f,m=Y=>f=Y,v=Y=>Y,p=()=>Bi(`${u.location.pathname}${u.location.search}${u.location.hash}`,u.history.state);let y=p(),E,b=!1,R=!1,O=!1,C=!1;const z=()=>y;let D,K;const V=()=>{D&&(rt._ignoreSubscribers=!0,(D.isPush?u.history.pushState:u.history.replaceState)(D.state,"",D.href),rt._ignoreSubscribers=!1,D=void 0,K=void 0,E=void 0)},F=(Y,H,P)=>{const J=v(H);K||(E=y),y=Bi(H,P),D={href:J,state:P,isPush:(D==null?void 0:D.isPush)||Y==="push"},K||(K=Promise.resolve().then(()=>V()))},I=Y=>{y=p(),rt.notify({type:Y})},q=async()=>{if(R){R=!1;return}const Y=p(),H=Y.state[Ua]-y.state[Ua],P=H===1,J=H===-1,Z=!P&&!J||b;b=!1;const vt=Z?"GO":J?"BACK":"FORWARD",yt=Z?{type:"GO",index:H}:{type:J?"BACK":"FORWARD"};if(O)O=!1;else{const ot=d();if(typeof document<"u"&&ot.length){for(const G of ot)if(await G.blockerFn({currentLocation:y,nextLocation:Y,action:vt})){R=!0,u.history.go(1),rt.notify(yt);return}}}y=p(),rt.notify(yt)},W=Y=>{if(C){C=!1;return}let H=!1;const P=d();if(typeof document<"u"&&P.length)for(const J of P){const Z=J.enableBeforeUnload??!0;if(Z===!0){H=!0;break}if(typeof Z=="function"&&Z()===!0){H=!0;break}}if(H)return Y.preventDefault(),Y.returnValue=""},rt=Lm({getLocation:z,getLength:()=>u.history.length,pushState:(Y,H)=>F("push",Y,H),replaceState:(Y,H)=>F("replace",Y,H),back:Y=>(Y&&(O=!0),C=!0,u.history.back()),forward:Y=>{Y&&(O=!0),C=!0,u.history.forward()},go:Y=>{b=!0,u.history.go(Y)},createHref:Y=>v(Y),flush:V,destroy:()=>{u.history.pushState=s,u.history.replaceState=o,u.removeEventListener(um,W,{capture:!0}),u.removeEventListener(im,q)},onBlocked:()=>{E&&y!==E&&(y=E)},getBlockers:d,setBlockers:m,notifyOnIndexChange:!1});return u.addEventListener(um,W,{capture:!0}),u.addEventListener(im,q),u.history.pushState=function(...Y){const H=s.apply(u.history,Y);return rt._ignoreSubscribers||I("PUSH"),H},u.history.replaceState=function(...Y){const H=o.apply(u.history,Y);return rt._ignoreSubscribers||I("REPLACE"),H},rt}function Q0(i={initialEntries:["/"]}){const u=i.initialEntries;let s=i.initialIndex?Math.min(Math.max(i.initialIndex,0),u.length-1):u.length-1;const o=u.map((d,m)=>$o(m,void 0));return Lm({getLocation:()=>Bi(u[s],o[s]),getLength:()=>u.length,pushState:(d,m)=>{s{o[s]=m,u[s]=d},back:()=>{s=Math.max(s-1,0)},forward:()=>{s=Math.min(s+1,u.length-1)},go:d=>{s=Math.min(Math.max(s+d,0),u.length-1)},createHref:d=>d})}function Bi(i,u){const s=i.indexOf("#"),o=i.indexOf("?");return{href:i,pathname:i.substring(0,s>0?o>0?Math.min(s,o):s:o>0?o:i.length),hash:s>-1?i.substring(s):"",search:o>-1?i.slice(o,s===-1?void 0:s):"",state:u||{[Ua]:0}}}function V0(){return(Math.random()+1).toString(36).substring(7)}var Y0="Invariant failed";function Re(i,u){if(!i)throw new Error(Y0)}const Bo=ft.createContext(null);function Hm(){return typeof document>"u"?Bo:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Bo,Bo)}function Na(i){const u=ft.useContext(Hm());return i==null||i.warn,u}var Go={exports:{}},Qo={},Vo={exports:{}},Yo={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sm;function X0(){if(sm)return Yo;sm=1;var i=Xi();function u(b,R){return b===R&&(b!==0||1/b===1/R)||b!==b&&R!==R}var s=typeof Object.is=="function"?Object.is:u,o=i.useState,f=i.useEffect,d=i.useLayoutEffect,m=i.useDebugValue;function v(b,R){var O=R(),C=o({inst:{value:O,getSnapshot:R}}),z=C[0].inst,D=C[1];return d(function(){z.value=O,z.getSnapshot=R,p(z)&&D({inst:z})},[b,O,R]),f(function(){return p(z)&&D({inst:z}),b(function(){p(z)&&D({inst:z})})},[b]),m(O),O}function p(b){var R=b.getSnapshot;b=b.value;try{var O=R();return!s(b,O)}catch{return!0}}function y(b,R){return R()}var E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:v;return Yo.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:E,Yo}var rm;function Z0(){return rm||(rm=1,Vo.exports=X0()),Vo.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var om;function K0(){if(om)return Qo;om=1;var i=Xi(),u=Z0();function s(y,E){return y===E&&(y!==0||1/y===1/E)||y!==y&&E!==E}var o=typeof Object.is=="function"?Object.is:s,f=u.useSyncExternalStore,d=i.useRef,m=i.useEffect,v=i.useMemo,p=i.useDebugValue;return Qo.useSyncExternalStoreWithSelector=function(y,E,b,R,O){var C=d(null);if(C.current===null){var z={hasValue:!1,value:null};C.current=z}else z=C.current;C=v(function(){function K(W){if(!V){if(V=!0,F=W,W=R(W),O!==void 0&&z.hasValue){var rt=z.value;if(O(rt,W))return I=rt}return I=W}if(rt=I,o(F,W))return rt;var Y=R(W);return O!==void 0&&O(rt,Y)?(F=W,rt):(F=W,I=Y)}var V=!1,F,I,q=b===void 0?null:b;return[function(){return K(E())},q===null?void 0:function(){return K(q())}]},[E,b,R,O]);var D=f(y,C[0],C[1]);return m(function(){z.hasValue=!0,z.value=D},[D]),p(D),D},Qo}var cm;function J0(){return cm||(cm=1,Go.exports=K0()),Go.exports}var k0=J0();const bl=new WeakMap,ds=new WeakMap,vs={current:[]};let Xo=!1,Li=0;const Ni=new Set,ls=new Map;function qm(i){const u=Array.from(i).sort((s,o)=>s instanceof Sl&&s.options.deps.includes(o)?1:o instanceof Sl&&o.options.deps.includes(s)?-1:0);for(const s of u){if(vs.current.includes(s))continue;vs.current.push(s),s.recompute();const o=ds.get(s);if(o)for(const f of o){const d=bl.get(f);d&&qm(d)}}}function F0(i){i.listeners.forEach(u=>u({prevVal:i.prevState,currentVal:i.state}))}function W0(i){i.listeners.forEach(u=>u({prevVal:i.prevState,currentVal:i.state}))}function Bm(i){if(Li>0&&!ls.has(i)&&ls.set(i,i.prevState),Ni.add(i),!(Li>0)&&!Xo)try{for(Xo=!0;Ni.size>0;){const u=Array.from(Ni);Ni.clear();for(const s of u){const o=ls.get(s)??s.prevState;s.prevState=o,F0(s)}for(const s of u){const o=bl.get(s);o&&(vs.current.push(s),qm(o))}for(const s of u){const o=bl.get(s);if(o)for(const f of o)W0(f)}}}finally{Xo=!1,vs.current=[],ls.clear()}}function Zo(i){Li++;try{i()}finally{if(Li--,Li===0){const u=Array.from(Ni)[0];u&&Bm(u)}}}class Po{constructor(u,s){this.listeners=new Set,this.subscribe=o=>{var f,d;this.listeners.add(o);const m=(d=(f=this.options)==null?void 0:f.onSubscribe)==null?void 0:d.call(f,o,this);return()=>{this.listeners.delete(o),m==null||m()}},this.setState=o=>{var f,d,m;this.prevState=this.state,this.state=(f=this.options)!=null&&f.updateFn?this.options.updateFn(this.prevState)(o):o(this.prevState),(m=(d=this.options)==null?void 0:d.onUpdate)==null||m.call(d),Bm(this)},this.prevState=u,this.state=u,this.options=s}}class Sl{constructor(u){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const s=[],o=[];for(const f of this.options.deps)s.push(f.prevState),o.push(f.state);return this.lastSeenDepValues=o,{prevDepVals:s,currDepVals:o,prevVal:this.prevState??void 0}},this.recompute=()=>{var s,o;this.prevState=this.state;const{prevDepVals:f,currDepVals:d,prevVal:m}=this.getDepVals();this.state=this.options.fn({prevDepVals:f,currDepVals:d,prevVal:m}),(o=(s=this.options).onUpdate)==null||o.call(s)},this.checkIfRecalculationNeededDeeply=()=>{for(const d of this.options.deps)d instanceof Sl&&d.checkIfRecalculationNeededDeeply();let s=!1;const o=this.lastSeenDepValues,{currDepVals:f}=this.getDepVals();for(let d=0;d(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const s of this._subscriptions)s()}),this.subscribe=s=>{var o,f;this.listeners.add(s);const d=(f=(o=this.options).onSubscribe)==null?void 0:f.call(o,s,this);return()=>{this.listeners.delete(s),d==null||d()}},this.options=u,this.state=u.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(u=this.options.deps){for(const s of u)if(s instanceof Sl)s.registerOnGraph(),this.registerOnGraph(s.options.deps);else if(s instanceof Po){let o=bl.get(s);o||(o=new Set,bl.set(s,o)),o.add(this);let f=ds.get(this);f||(f=new Set,ds.set(this,f)),f.add(s)}}unregisterFromGraph(u=this.options.deps){for(const s of u)if(s instanceof Sl)this.unregisterFromGraph(s.options.deps);else if(s instanceof Po){const o=bl.get(s);o&&o.delete(this);const f=ds.get(this);f&&f.delete(s)}}}function $0(i,u=s=>s){return k0.useSyncExternalStoreWithSelector(i.subscribe,()=>i.state,()=>i.state,u,P0)}function P0(i,u){if(Object.is(i,u))return!0;if(typeof i!="object"||i===null||typeof u!="object"||u===null)return!1;if(i instanceof Map&&u instanceof Map){if(i.size!==u.size)return!1;for(const[o,f]of i)if(!u.has(o)||!Object.is(f,u.get(o)))return!1;return!0}if(i instanceof Set&&u instanceof Set){if(i.size!==u.size)return!1;for(const o of i)if(!u.has(o))return!1;return!0}const s=Object.keys(i);if(s.length!==Object.keys(u).length)return!1;for(let o=0;o{u.substring(0,1)==="?"&&(u=u.substring(1));const s=tp(u);for(const o in s){const f=s[o];if(typeof f=="string")try{s[o]=i(f)}catch{}}return s}}function lp(i,u){function s(o){if(typeof o=="object"&&o!==null)try{return i(o)}catch{}else if(typeof o=="string"&&typeof u=="function")try{return u(o),i(o)}catch{}return o}return o=>{o={...o},Object.keys(o).forEach(d=>{const m=o[d];typeof m>"u"||m===void 0?delete o[d]:o[d]=s(m)});const f=I0(o).toString();return f?`?${f}`:""}}function Hi(i){return i[i.length-1]}function ip(i){return typeof i=="function"}function is(i,u){return ip(i)?i(u):i}function hs(i,u){return u.reduce((s,o)=>(s[o]=i[o],s),{})}function qe(i,u){if(i===u)return i;const s=u,o=hm(i)&&hm(s);if(o||na(i)&&na(s)){const f=o?i:Object.keys(i),d=f.length,m=o?s:Object.keys(s),v=m.length,p=o?[]:{};let y=0;for(let E=0;E"u")return!0;const s=u.prototype;return!(!dm(s)||!s.hasOwnProperty("isPrototypeOf"))}function dm(i){return Object.prototype.toString.call(i)==="[object Object]"}function hm(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function mm(i,u){let s=Object.keys(i);return u&&(s=s.filter(o=>i[o]!==void 0)),s}function qi(i,u,s){if(i===u)return!0;if(typeof i!=typeof u)return!1;if(na(i)&&na(u)){const o=(s==null?void 0:s.ignoreUndefined)??!0,f=mm(i,o),d=mm(u,o);return!(s!=null&&s.partial)&&f.length!==d.length?!1:d.every(m=>qi(i[m],u[m],s))}return Array.isArray(i)&&Array.isArray(u)?i.length!==u.length?!1:!i.some((o,f)=>!qi(o,u[f],s)):!1}const us=typeof window<"u"?ft.useLayoutEffect:ft.useEffect;function gl(i){let u,s;const o=new Promise((f,d)=>{u=f,s=d});return o.status="pending",o.resolve=f=>{o.status="resolved",o.value=f,u(f),i==null||i(f)},o.reject=f=>{o.status="rejected",s(f)},o}function Ko(i){const u=ft.useRef({value:i,prev:null}),s=u.current.value;return i!==s&&(u.current={value:i,prev:s}),u.current.prev}function Mn(i){return gs(i.filter(u=>u!==void 0).join("/"))}function gs(i){return i.replace(/\/{2,}/g,"/")}function ac(i){return i==="/"?i:i.replace(/^\/{1,}/,"")}function Aa(i){return i==="/"?i:i.replace(/\/{1,}$/,"")}function up(i){return Aa(ac(i))}function sp({basepath:i,base:u,to:s,trailingSlash:o="never",caseSensitive:f}){var d,m;u=ys(i,u,f),s=ys(i,s,f);let v=Dl(u);const p=Dl(s);v.length>1&&((d=Hi(v))==null?void 0:d.value)==="/"&&v.pop(),p.forEach((E,b)=>{E.value==="/"?b?b===p.length-1&&v.push(E):v=[E]:E.value===".."?v.pop():E.value==="."||v.push(E)}),v.length>1&&(((m=Hi(v))==null?void 0:m.value)==="/"?o==="never"&&v.pop():o==="always"&&v.push({type:"pathname",value:"/"}));const y=Mn([i,...v.map(E=>E.value)]);return gs(y)}function Dl(i){if(!i)return[];i=gs(i);const u=[];if(i.slice(0,1)==="/"&&(i=i.substring(1),u.push({type:"pathname",value:"/"})),!i)return u;const s=i.split("/").filter(Boolean);return u.push(...s.map(o=>o==="$"||o==="*"?{type:"wildcard",value:o}:o.charAt(0)==="$"?{type:"param",value:o}:{type:"pathname",value:decodeURI(o)})),i.slice(-1)==="/"&&(i=i.substring(1),u.push({type:"pathname",value:"/"})),u}function ss({path:i,params:u,leaveWildcards:s,leaveParams:o,decodeCharMap:f}){const d=Dl(i),m={};for(const[v,p]of Object.entries(u)){const y=typeof p=="string";["*","_splat"].includes(v)?m[v]=y?encodeURI(p):p:m[v]=y?rp(p,f):p}return Mn(d.map(v=>{if(v.type==="wildcard"){const p=m._splat;return s?`${v.value}${p??""}`:p}if(v.type==="param"){if(o){const p=m[v.value];return`${v.value}${p??""}`}return m[v.value.substring(1)]??"undefined"}return v.value}))}function rp(i,u){let s=encodeURIComponent(i);if(u)for(const[o,f]of u)s=s.replaceAll(o,f);return s}function rs(i,u,s){const o=op(i,u,s);if(!(s.to&&!o))return o??{}}function ys(i,u,s=!1){const o=s?i:i.toLowerCase(),f=s?u:u.toLowerCase();switch(!0){case o==="/":return u;case f===o:return"";case u.length{for(let p=0;p=f.length-1,R=p>=d.length-1;if(E){if(E.type==="wildcard"){const O=decodeURI(Mn(f.slice(p).map(C=>C.value)));return m["*"]=O,m._splat=O,!0}if(E.type==="pathname"){if(E.value==="/"&&!(y!=null&&y.value))return!0;if(y){if(s.caseSensitive){if(E.value!==y.value)return!1}else if(E.value.toLowerCase()!==y.value.toLowerCase())return!1}}if(!y)return!1;if(E.type==="param"){if(y.value==="/")return!1;y.value.charAt(0)!=="$"&&(m[E.value.substring(1)]=decodeURIComponent(y.value))}}if(!b&&R)return m["**"]=Mn(f.slice(p+1).map(O=>O.value)),!!s.fuzzy&&(E==null?void 0:E.value)!=="/"}return!0})()?m:void 0}function xa(i){return!!(i!=null&&i.isRedirect)}function Jo(i){return!!(i!=null&&i.isRedirect)&&i.href}function lc(i){const u=i.errorComponent??bs;return Q.jsx(cp,{getResetKey:i.getResetKey,onCatch:i.onCatch,children:({error:s,reset:o})=>s?ft.createElement(u,{error:s,reset:o}):i.children})}class cp extends ft.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(u){return{resetKey:u.getResetKey()}}static getDerivedStateFromError(u){return{error:u}}reset(){this.setState({error:null})}componentDidUpdate(u,s){s.error&&s.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(u,s){this.props.onCatch&&this.props.onCatch(u,s)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function bs({error:i}){const[u,s]=ft.useState(!1);return Q.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[Q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[Q.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),Q.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(o=>!o),children:u?"Hide Error":"Show Error"})]}),Q.jsx("div",{style:{height:".25rem"}}),u?Q.jsx("div",{children:Q.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:i.message?Q.jsx("code",{children:i.message}):null})}):null]})}function Ge(i){const u=Na({warn:(i==null?void 0:i.router)===void 0}),s=(i==null?void 0:i.router)||u,o=ft.useRef();return $0(s.__store,f=>{if(i!=null&&i.select){if(i.structuralSharing??s.options.defaultStructuralSharing){const d=qe(o.current,i.select(f));return o.current=d,d}return i.select(f)}return f})}function Je(i){return!!(i!=null&&i.isNotFound)}function fp(i){const u=Ge({select:s=>`not-found-${s.location.pathname}-${s.status}`});return Q.jsx(lc,{getResetKey:()=>u,onCatch:(s,o)=>{var f;if(Je(s))(f=i.onCatch)==null||f.call(i,s,o);else throw s},errorComponent:({error:s})=>{var o;if(Je(s))return(o=i.fallback)==null?void 0:o.call(i,s);throw s},children:i.children})}function dp(){return Q.jsx("p",{children:"Not Found"})}const ji={stringify:i=>JSON.stringify(i,function(s,o){const f=this[s],d=cs.find(m=>m.stringifyCondition(f));return d?d.stringify(f):o}),parse:i=>JSON.parse(i,function(s,o){const f=this[s];if(na(f)){const d=cs.find(m=>m.parseCondition(f));if(d)return d.parse(f)}return o}),encode:i=>{if(Array.isArray(i))return i.map(s=>ji.encode(s));if(na(i))return Object.fromEntries(Object.entries(i).map(([s,o])=>[s,ji.encode(o)]));const u=cs.find(s=>s.stringifyCondition(i));return u?u.stringify(i):i},decode:i=>{if(na(i)){const u=cs.find(s=>s.parseCondition(i));if(u)return u.parse(i)}return Array.isArray(i)?i.map(u=>ji.decode(u)):na(i)?Object.fromEntries(Object.entries(i).map(([u,s])=>[u,ji.decode(s)])):i}},os=(i,u,s,o)=>({key:i,stringifyCondition:u,stringify:f=>({[`$${i}`]:s(f)}),parseCondition:f=>Object.hasOwn(f,`$${i}`),parse:f=>o(f[`$${i}`])}),cs=[os("undefined",i=>i===void 0,()=>0,()=>{}),os("date",i=>i instanceof Date,i=>i.toISOString(),i=>new Date(i)),os("error",i=>i instanceof Error,i=>({...i,message:i.message,stack:i.stack,cause:i.cause}),i=>Object.assign(new Error(i.message),i)),os("formData",i=>i instanceof FormData,i=>{const u={};return i.forEach((s,o)=>{const f=u[o];f!==void 0?Array.isArray(f)?f.push(s):u[o]=[f,s]:u[o]=s}),u},i=>{const u=new FormData;return Object.entries(i).forEach(([s,o])=>{Array.isArray(o)?o.forEach(f=>u.append(s,f)):u.append(s,o)}),u})],Gm=["component","errorComponent","pendingComponent","notFoundComponent"];function hp(i){var u;for(const s of Gm)if((u=i.options[s])!=null&&u.preload)return!0;return!1}function ko(i,u){if(i==null)return{};if("~standard"in i){const s=i["~standard"].validate(u);if(s instanceof Promise)throw new Io("Async validation not supported");if(s.issues)throw new Io(JSON.stringify(s.issues,void 0,2));return s.value}return"parse"in i?i.parse(u):typeof i=="function"?i(u):{}}function mp(i){return new vp(i)}class vp{constructor(u){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=s=>s(),this.update=s=>{var o;s.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const f=this.options;this.options={...this.options,...s},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(d=>[encodeURIComponent(d),d])):void 0,(!this.basepath||s.basepath&&s.basepath!==f.basepath)&&(s.basepath===void 0||s.basepath===""||s.basepath==="/"?this.basepath="/":this.basepath=`/${up(s.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?Q0({initialEntries:[this.basepath||"/"]}):G0()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Po(pp(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(d=>!["redirected"].includes(d.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((o=window.CSS)==null?void 0:o.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[s.id]=s);const o=m=>{m.forEach((v,p)=>{v.init({originalIndex:p,defaultSsr:this.options.defaultSsr});const y=this.routesById[v.id];if(Re(!y,`Duplicate routes found with id: ${String(v.id)}`),this.routesById[v.id]=v,!v.isRoot&&v.path){const b=Aa(v.fullPath);(!this.routesByPath[b]||v.fullPath.endsWith("/"))&&(this.routesByPath[b]=v)}const E=v.children;E!=null&&E.length&&o(E)})};o([this.routeTree]);const f=[];Object.values(this.routesById).forEach((m,v)=>{var p;if(m.isRoot||!m.path)return;const y=ac(m.fullPath),E=Dl(y);for(;E.length>1&&((p=E[0])==null?void 0:p.value)==="/";)E.shift();const b=E.map(R=>R.value==="/"?.75:R.type==="param"?.5:R.type==="wildcard"?.25:1);f.push({child:m,trimmed:y,parsed:E,index:v,scores:b})}),this.flatRoutes=f.sort((m,v)=>{const p=Math.min(m.scores.length,v.scores.length);for(let y=0;yv.parsed[y].value?1:-1;return m.index-v.index}).map((m,v)=>(m.child.rank=v,m.child))},this.subscribe=(s,o)=>{const f={eventType:s,fn:o};return this.subscribers.add(f),()=>{this.subscribers.delete(f)}},this.emit=s=>{this.subscribers.forEach(o=>{o.eventType===s.type&&o.fn(s)})},this.parseLocation=(s,o)=>{const f=({pathname:p,search:y,hash:E,state:b})=>{const R=this.options.parseSearch(y),O=this.options.stringifySearch(R);return{pathname:p,searchStr:O,search:qe(s==null?void 0:s.search,R),hash:E.split("#").reverse()[0]??"",href:`${p}${O}${E}`,state:qe(s==null?void 0:s.state,b)}},d=f(o??this.history.location),{__tempLocation:m,__tempKey:v}=d.state;if(m&&(!v||v===this.tempLocationKey)){const p=f(m);return p.state.key=d.state.key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(s,o)=>sp({basepath:this.basepath,base:s,to:gs(o),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(s,o)=>{let f={};const d=Aa(s.pathname),m=E=>rs(this.basepath,d,{to:E.fullPath,caseSensitive:E.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let v=(o==null?void 0:o.to)!==void 0?this.routesByPath[o.to]:void 0;v?f=m(v):v=this.flatRoutes.find(E=>{const b=m(E);return b?(f=b,!0):!1});let p=v||this.routesById[Te];const y=[p];for(;p.parentRoute;)p=p.parentRoute,y.unshift(p);return{matchedRoutes:y,routeParams:f,foundRoute:v}},this.cancelMatch=s=>{const o=this.getMatch(s);o&&(o.abortController.abort(),clearTimeout(o.pendingTimeout))},this.cancelMatches=()=>{var s;(s=this.state.pendingMatches)==null||s.forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=s=>{const o=(d={},m)=>{var v,p,y,E,b,R;const O=d._fromLocation?this.matchRoutes(d._fromLocation,{_buildLocation:!0}):this.state.matches,C=d.from!=null?O.find(J=>rs(this.basepath,Aa(J.pathname),{to:d.from,caseSensitive:!1,fuzzy:!1})):void 0,z=(C==null?void 0:C.pathname)||this.latestLocation.pathname;Re(d.from==null||C!=null,"Could not find match for from: "+d.from);const D=(v=this.state.pendingMatches)!=null&&v.length?(p=Hi(this.state.pendingMatches))==null?void 0:p.search:((y=Hi(O))==null?void 0:y.search)||this.latestLocation.search,K=m==null?void 0:m.matchedRoutes.filter(J=>O.find(Z=>Z.routeId===J.id));let V;if(d.to)V=this.resolvePathWithBase(z,`${d.to}`);else{const J=this.routesById[(E=K==null?void 0:K.find(Z=>{const vt=ss({path:Z.fullPath,params:(m==null?void 0:m.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Mn([this.basepath,vt])===z}))==null?void 0:E.id];V=this.resolvePathWithBase(z,(J==null?void 0:J.to)??z)}const F={...(b=Hi(O))==null?void 0:b.params};let I=(d.params??!0)===!0?F:{...F,...is(d.params,F)};Object.keys(I).length>0&&(m==null||m.matchedRoutes.map(J=>{var Z;return((Z=J.options.params)==null?void 0:Z.stringify)??J.options.stringifyParams}).filter(Boolean).forEach(J=>{I={...I,...J(I)}})),V=ss({path:V,params:I??{},leaveWildcards:!1,leaveParams:s.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let q=D;if(s._includeValidateSearch&&((R=this.options.search)!=null&&R.strict)){let J={};m==null||m.matchedRoutes.forEach(Z=>{try{Z.options.validateSearch&&(J={...J,...ko(Z.options.validateSearch,{...J,...q})??{}})}catch{}}),q=J}q=(J=>{const Z=(m==null?void 0:m.matchedRoutes.reduce((ot,G)=>{var at;const et=[];if("search"in G.options)(at=G.options.search)!=null&&at.middlewares&&et.push(...G.options.search.middlewares);else if(G.options.preSearchFilters||G.options.postSearchFilters){const dt=({search:S,next:j})=>{let k=S;"preSearchFilters"in G.options&&G.options.preSearchFilters&&(k=G.options.preSearchFilters.reduce((X,ut)=>ut(X),S));const $=j(k);return"postSearchFilters"in G.options&&G.options.postSearchFilters?G.options.postSearchFilters.reduce((X,ut)=>ut(X),$):$};et.push(dt)}if(s._includeValidateSearch&&G.options.validateSearch){const dt=({search:S,next:j})=>{try{const k=j(S);return{...k,...ko(G.options.validateSearch,k)??{}}}catch{}};et.push(dt)}return ot.concat(et)},[]))??[],vt=({search:ot})=>d.search?d.search===!0?ot:is(d.search,ot):{};Z.push(vt);const yt=(ot,G)=>{if(ot>=Z.length)return G;const at=Z[ot];return at({search:G,next:dt=>yt(ot+1,dt)})};return yt(0,J)})(q),q=qe(D,q);const rt=this.options.stringifySearch(q),Y=d.hash===!0?this.latestLocation.hash:d.hash?is(d.hash,this.latestLocation.hash):void 0,H=Y?`#${Y}`:"";let P=d.state===!0?this.latestLocation.state:d.state?is(d.state,this.latestLocation.state):{};return P=qe(this.latestLocation.state,P),{pathname:V,search:q,searchStr:rt,state:P,hash:Y??"",href:`${V}${rt}${H}`,unmaskOnReload:d.unmaskOnReload}},f=(d={},m)=>{var v;const p=o(d);let y=m?o(m):void 0;if(!y){let R={};const O=(v=this.options.routeMasks)==null?void 0:v.find(C=>{const z=rs(this.basepath,p.pathname,{to:C.from,caseSensitive:!1,fuzzy:!1});return z?(R=z,!0):!1});if(O){const{from:C,...z}=O;m={...hs(s,["from"]),...z,params:R},y=o(m)}}const E=this.getMatchedRoutes(p,d),b=o(d,E);if(y){const R=this.getMatchedRoutes(y,m),O=o(m,R);b.maskedLocation=O}return b};return s.mask?f(s,{...hs(s,["from"]),...s.mask}):f(s)},this.commitLocation=({viewTransition:s,ignoreBlocker:o,...f})=>{const d=()=>{f.state.key=this.latestLocation.state.key;const p=qi(f.state,this.latestLocation.state);return delete f.state.key,p},m=this.latestLocation.href===f.href,v=this.commitLocationPromise;if(this.commitLocationPromise=gl(()=>{v==null||v.resolve()}),m&&d())this.load();else{let{maskedLocation:p,hashScrollIntoView:y,...E}=f;p&&(E={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...E,search:E.searchStr,state:{...E.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(E.unmaskOnReload??this.options.unmaskOnReload??!1)&&(E.state.__tempKey=this.tempLocationKey)),E.state.__hashScrollIntoViewOptions=y??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[f.replace?"replace":"push"](E.href,E.state,{ignoreBlocker:o})}return this.resetNextScroll=f.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:o,hashScrollIntoView:f,viewTransition:d,ignoreBlocker:m,href:v,...p}={})=>{if(v){const E=this.history.location.state.__TSR_index,b=Bi(v,{__TSR_index:s?E:E+1});p.to=b.pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const y=this.buildLocation({...p,_includeValidateSearch:!0});return this.commitLocation({...y,viewTransition:d,replace:s,resetScroll:o,hashScrollIntoView:f,ignoreBlocker:m})},this.navigate=({to:s,reloadDocument:o,href:f,...d})=>{if(o){f||(f=this.buildLocation({to:s,...d}).href),d.replace?window.location.replace(f):window.location.href=f;return}return this.buildAndCommitLocation({...d,href:f,to:s})},this.load=async s=>{this.latestLocation=this.parseLocation(this.latestLocation);let o,f,d;for(d=new Promise(m=>{this.startReactTransition(async()=>{var v;try{const p=this.latestLocation,y=this.state.resolvedLocation,E=y.href!==p.href,b=y.pathname!==p.pathname;this.cancelMatches();let R;Zo(()=>{R=this.matchRoutes(p),this.__store.setState(O=>({...O,status:"pending",isLoading:!0,location:p,pendingMatches:R,cachedMatches:O.cachedMatches.filter(C=>!R.find(z=>z.id===C.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:y,toLocation:p,pathChanged:b,hrefChanged:E}),this.emit({type:"onBeforeLoad",fromLocation:y,toLocation:p,pathChanged:b,hrefChanged:E}),await this.loadMatches({sync:s==null?void 0:s.sync,matches:R,location:p,onReady:async()=>{this.startViewTransition(async()=>{let O,C,z;Zo(()=>{this.__store.setState(D=>{const K=D.matches,V=D.pendingMatches||D.matches;return O=K.filter(F=>!V.find(I=>I.id===F.id)),C=V.filter(F=>!K.find(I=>I.id===F.id)),z=K.filter(F=>V.find(I=>I.id===F.id)),{...D,isLoading:!1,loadedAt:Date.now(),matches:V,pendingMatches:void 0,cachedMatches:[...D.cachedMatches,...O.filter(F=>F.status!=="error")]}}),this.clearExpiredCache()}),[[O,"onLeave"],[C,"onEnter"],[z,"onStay"]].forEach(([D,K])=>{D.forEach(V=>{var F,I;(I=(F=this.looseRoutesById[V.routeId].options)[K])==null||I.call(F,V)})})})}})}catch(p){Jo(p)?(o=p,this.isServer||this.navigate({...o,replace:!0,ignoreBlocker:!0})):Je(p)&&(f=p),this.__store.setState(y=>({...y,statusCode:o?o.statusCode:f?404:y.matches.some(E=>E.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===d&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),m()})}),this.latestLoadPromise=d,await d;this.latestLoadPromise&&d!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=s=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let f;typeof o=="object"&&this.isViewTransitionTypesSupported?f={update:s,types:o.types}:f=s,document.startViewTransition(f)}else s()},this.updateMatch=(s,o)=>{var f;let d;const m=(f=this.state.pendingMatches)==null?void 0:f.find(E=>E.id===s),v=this.state.matches.find(E=>E.id===s),p=this.state.cachedMatches.find(E=>E.id===s),y=m?"pendingMatches":v?"matches":p?"cachedMatches":"";return y&&this.__store.setState(E=>{var b;return{...E,[y]:(b=E[y])==null?void 0:b.map(R=>R.id===s?d=o(R):R)}}),d},this.getMatch=s=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(o=>o.id===s),this.loadMatches=async({location:s,matches:o,preload:f,onReady:d,updateMatch:m=this.updateMatch,sync:v})=>{let p,y=!1;const E=async()=>{y||(y=!0,await(d==null?void 0:d()))},b=O=>!!(f&&!this.state.matches.find(C=>C.id===O));!this.isServer&&!this.state.matches.length&&E();const R=(O,C)=>{var z,D,K;if(Jo(C)&&!C.reloadDocument)throw C;if(xa(C)||Je(C)){if(m(O.id,V=>({...V,status:xa(C)?"redirected":Je(C)?"notFound":"error",isFetching:!1,error:C,beforeLoadPromise:void 0,loaderPromise:void 0})),C.routeId||(C.routeId=O.routeId),(z=O.beforeLoadPromise)==null||z.resolve(),(D=O.loaderPromise)==null||D.resolve(),(K=O.loadPromise)==null||K.resolve(),xa(C))throw y=!0,C=this.resolveRedirect({...C,_fromLocation:s}),C;if(Je(C))throw this._handleNotFound(o,C,{updateMatch:m}),C}};try{await new Promise((O,C)=>{(async()=>{var z,D,K;try{const V=(q,W,rt)=>{var Y,H;const{id:P,routeId:J}=o[q],Z=this.looseRoutesById[J];if(W instanceof Promise)throw W;W.routerCode=rt,p=p??q,R(this.getMatch(P),W);try{(H=(Y=Z.options).onError)==null||H.call(Y,W)}catch(vt){W=vt,R(this.getMatch(P),W)}m(P,vt=>{var yt,ot;return(yt=vt.beforeLoadPromise)==null||yt.resolve(),(ot=vt.loadPromise)==null||ot.resolve(),{...vt,error:W,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[q,{id:W,routeId:rt}]of o.entries()){const Y=this.getMatch(W),H=(z=o[q-1])==null?void 0:z.id,P=this.looseRoutesById[rt],J=P.options.pendingMs??this.options.defaultPendingMs,Z=!!(d&&!this.isServer&&!b(W)&&(P.options.loader||P.options.beforeLoad)&&typeof J=="number"&&J!==1/0&&(P.options.pendingComponent??this.options.defaultPendingComponent));let vt=!0;if((Y.beforeLoadPromise||Y.loaderPromise)&&(Z&&setTimeout(()=>{try{E()}catch{}},J),await Y.beforeLoadPromise,vt=this.getMatch(W).status!=="success"),vt){try{m(W,lt=>({...lt,loadPromise:gl(()=>{var jt;(jt=lt.loadPromise)==null||jt.resolve()}),beforeLoadPromise:gl()}));const yt=new AbortController;let ot;Z&&(ot=setTimeout(()=>{try{E()}catch{}},J));const{paramsError:G,searchError:at}=this.getMatch(W);G&&V(q,G,"PARSE_PARAMS"),at&&V(q,at,"VALIDATE_SEARCH");const et=()=>H?this.getMatch(H).context:this.options.context??{};m(W,lt=>({...lt,isFetching:"beforeLoad",fetchCount:lt.fetchCount+1,abortController:yt,pendingTimeout:ot,context:{...et(),...lt.__routeContext}}));const{search:dt,params:S,context:j,cause:k}=this.getMatch(W),$=b(W),X={search:dt,abortController:yt,params:S,preload:$,context:j,location:s,navigate:lt=>this.navigate({...lt,_fromLocation:s}),buildLocation:this.buildLocation,cause:$?"preload":k,matches:o};let ut=await((K=(D=P.options).beforeLoad)==null?void 0:K.call(D,X))??{};this.serializeLoaderData&&(ut=this.serializeLoaderData("__beforeLoadContext",ut,{router:this,match:this.getMatch(W)})),(xa(ut)||Je(ut))&&V(q,ut,"BEFORE_LOAD"),m(W,lt=>({...lt,__beforeLoadContext:ut,context:{...et(),...lt.__routeContext,...ut},abortController:yt}))}catch(yt){V(q,yt,"BEFORE_LOAD")}m(W,yt=>{var ot;return(ot=yt.beforeLoadPromise)==null||ot.resolve(),{...yt,beforeLoadPromise:void 0,isFetching:!1}})}}const F=o.slice(0,p),I=[];F.forEach(({id:q,routeId:W},rt)=>{I.push((async()=>{const{loaderPromise:Y}=this.getMatch(q);let H=!1,P=!1;if(Y){await Y;const J=this.getMatch(q);J.error&&R(J,J.error)}else{const J=I[rt-1],Z=this.looseRoutesById[W],vt=()=>{const{params:k,loaderDeps:$,abortController:X,context:ut,cause:lt}=this.getMatch(q),jt=b(q);return{params:k,deps:$,preload:!!jt,parentMatchPromise:J,abortController:X,context:ut,location:s,navigate:Et=>this.navigate({...Et,_fromLocation:s}),cause:jt?"preload":lt,route:Z}},yt=Date.now()-this.getMatch(q).updatedAt,ot=b(q),G=ot?Z.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:Z.options.staleTime??this.options.defaultStaleTime??0,at=Z.options.shouldReload,et=typeof at=="function"?at(vt()):at;m(q,k=>({...k,loaderPromise:gl(),preload:!!ot&&!this.state.matches.find($=>$.id===q)}));const dt=async()=>{var k,$,X,ut,lt,jt,Et,Lt;try{const At=async()=>{const Dt=this.getMatch(q);Dt.minPendingPromise&&await Dt.minPendingPromise};try{this.loadRouteChunk(Z),m(q,aa=>({...aa,isFetching:"loader"}));let Dt=await(($=(k=Z.options).loader)==null?void 0:$.call(k,vt()));this.serializeLoaderData&&(Dt=this.serializeLoaderData("loaderData",Dt,{router:this,match:this.getMatch(q)})),R(this.getMatch(q),Dt),await Z._lazyPromise,await At();const se=(ut=(X=Z.options).head)==null?void 0:ut.call(X,{matches:o,match:this.getMatch(q),params:this.getMatch(q).params,loaderData:Dt}),re=se==null?void 0:se.meta,ja=se==null?void 0:se.links,La=se==null?void 0:se.scripts,Tn=(jt=(lt=Z.options).headers)==null?void 0:jt.call(lt,{loaderData:Dt});m(q,aa=>({...aa,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:Dt,meta:re,links:ja,scripts:La,headers:Tn}))}catch(Dt){let se=Dt;await At(),R(this.getMatch(q),Dt);try{(Lt=(Et=Z.options).onError)==null||Lt.call(Et,Dt)}catch(re){se=re,R(this.getMatch(q),re)}m(q,re=>({...re,error:se,status:"error",isFetching:!1}))}await Z._componentsPromise}catch(At){m(q,Dt=>({...Dt,loaderPromise:void 0})),R(this.getMatch(q),At)}},{status:S,invalid:j}=this.getMatch(q);H=S==="success"&&(j||(et??yt>G)),ot&&Z.options.preload===!1||(H&&!v?(P=!0,(async()=>{try{await dt();const{loaderPromise:k,loadPromise:$}=this.getMatch(q);k==null||k.resolve(),$==null||$.resolve(),m(q,X=>({...X,loaderPromise:void 0}))}catch(k){Jo(k)&&await this.navigate(k)}})()):(S!=="success"||H&&v)&&await dt())}if(!P){const{loaderPromise:J,loadPromise:Z}=this.getMatch(q);J==null||J.resolve(),Z==null||Z.resolve()}return m(q,J=>({...J,isFetching:P?J.isFetching:!1,loaderPromise:P?J.loaderPromise:void 0,invalid:!1})),this.getMatch(q)})())}),await Promise.all(I),O()}catch(V){C(V)}})()}),await E()}catch(O){if(xa(O)||Je(O))throw Je(O)&&!f&&await E(),O}return o},this.invalidate=s=>{const o=f=>{var d;return((d=s==null?void 0:s.filter)==null?void 0:d.call(s,f))??!0?{...f,invalid:!0,...f.status==="error"?{status:"pending",error:void 0}:{}}:f};return this.__store.setState(f=>{var d;return{...f,matches:f.matches.map(o),cachedMatches:f.cachedMatches.map(o),pendingMatches:(d=f.pendingMatches)==null?void 0:d.map(o)}}),this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const o=s;return o.href||(o.href=this.buildLocation(o).href),o},this.clearCache=s=>{const o=s==null?void 0:s.filter;o!==void 0?this.__store.setState(f=>({...f,cachedMatches:f.cachedMatches.filter(d=>!o(d))})):this.__store.setState(f=>({...f,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=o=>{const f=this.looseRoutesById[o.routeId];if(!f.options.loader)return!0;const d=(o.preload?f.options.preloadGcTime??this.options.defaultPreloadGcTime:f.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(o.status!=="error"&&Date.now()-o.updatedAt(s._lazyPromise===void 0&&(s.lazyFn?s._lazyPromise=s.lazyFn().then(o=>{const{id:f,...d}=o.options;Object.assign(s.options,d)}):s._lazyPromise=Promise.resolve()),s._componentsPromise===void 0&&(s._componentsPromise=s._lazyPromise.then(()=>Promise.all(Gm.map(async o=>{const f=s.options[o];f!=null&&f.preload&&await f.preload()})))),s._componentsPromise),this.preloadRoute=async s=>{const o=this.buildLocation(s);let f=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:s});const d=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(v=>v.id)),m=new Set([...d,...this.state.cachedMatches.map(v=>v.id)]);Zo(()=>{f.forEach(v=>{m.has(v.id)||this.__store.setState(p=>({...p,cachedMatches:[...p.cachedMatches,v]}))})});try{return f=await this.loadMatches({matches:f,location:o,preload:!0,updateMatch:(v,p)=>{d.has(v)?f=f.map(y=>y.id===v?p(y):y):this.updateMatch(v,p)}}),f}catch(v){if(xa(v))return v.reloadDocument?void 0:await this.preloadRoute({...v,_fromLocation:o});console.error(v);return}},this.matchRoute=(s,o)=>{const f={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},d=this.buildLocation(f);if(o!=null&&o.pending&&this.state.status!=="pending")return!1;const v=((o==null?void 0:o.pending)===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation,p=rs(this.basepath,v.pathname,{...o,to:d.pathname});return!p||s.params&&!qi(p,s.params,{partial:!0})?!1:p&&((o==null?void 0:o.includeSearch)??!0)?qi(v.search,d.search,{partial:!0})?p:!1:p},this.dehydrate=()=>{var s;const o=((s=this.options.errorSerializer)==null?void 0:s.serialize)??gp;return{state:{dehydratedMatches:this.state.matches.map(f=>({...hs(f,["id","status","updatedAt"]),error:f.error?{data:o(f.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var s,o,f;let d;typeof document<"u"&&(d=this.options.transformer.parse((s=window.__TSR__)==null?void 0:s.dehydrated)),Re(d),this.dehydratedData=d.payload,(f=(o=this.options).hydrate)==null||f.call(o,d.payload);const m=d.router.state,v=this.matchRoutes(this.state.location).map(p=>{const y=m.dehydratedMatches.find(E=>E.id===p.id);return Re(y,`Could not find a client-side match for dehydrated match with id: ${p.id}!`),{...p,...y}});this.__store.setState(p=>({...p,matches:v})),this.manifest=d.router.manifest},this.injectedHtml=[],this.injectHtml=s=>{const o=()=>(this.injectedHtml=this.injectedHtml.filter(f=>f!==o),s);this.injectedHtml.push(o)},this.injectScript=(s,o)=>{this.injectHtml(` + + + +
+ + diff --git a/playground/dist/index.js b/playground/dist/index.js new file mode 100644 index 000000000..99e0f6656 --- /dev/null +++ b/playground/dist/index.js @@ -0,0 +1,150 @@ +var Kp=a=>{throw TypeError(a)};var Zc=(a,l,r)=>l.has(a)||Kp("Cannot "+r);var X=(a,l,r)=>(Zc(a,l,"read from private field"),r?r.call(a):l.get(a)),Ot=(a,l,r)=>l.has(a)?Kp("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(a):l.set(a,r),gt=(a,l,r,o)=>(Zc(a,l,"write to private field"),o?o.call(a,r):l.set(a,r),r),oe=(a,l,r)=>(Zc(a,l,"access private method"),r);var Jo=(a,l,r,o)=>({set _(u){gt(a,l,u,r)},get _(){return X(a,l,o)}});function BS(a,l){for(var r=0;ro[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(u){if(u.ep)return;u.ep=!0;const f=r(u);fetch(u.href,f)}})();function ey(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Fc={exports:{}},mr={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xp;function HS(){if(Xp)return mr;Xp=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(o,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var h in u)h!=="key"&&(f[h]=u[h])}else f=u;return u=f.ref,{$$typeof:a,type:o,key:d,ref:u!==void 0?u:null,props:f}}return mr.Fragment=l,mr.jsx=r,mr.jsxs=r,mr}var Zp;function GS(){return Zp||(Zp=1,Fc.exports=HS()),Fc.exports}var R=GS(),As=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(a){return this.listeners.add(a),this.onSubscribe(),()=>{this.listeners.delete(a),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ts=typeof window>"u"||"Deno"in globalThis;function We(){}function qS(a,l){return typeof a=="function"?a(l):a}function VS(a){return typeof a=="number"&&a>=0&&a!==1/0}function PS(a,l){return Math.max(a+(l||0)-Date.now(),0)}function Fp(a,l){return typeof a=="function"?a(l):a}function YS(a,l){return typeof a=="function"?a(l):a}function $p(a,l){const{type:r="all",exact:o,fetchStatus:u,predicate:f,queryKey:d,stale:h}=a;if(d){if(o){if(l.queryHash!==Hf(d,l.options))return!1}else if(!Mr(l.queryKey,d))return!1}if(r!=="all"){const v=l.isActive();if(r==="active"&&!v||r==="inactive"&&v)return!1}return!(typeof h=="boolean"&&l.isStale()!==h||u&&u!==l.state.fetchStatus||f&&!f(l))}function Jp(a,l){const{exact:r,status:o,predicate:u,mutationKey:f}=a;if(f){if(!l.options.mutationKey)return!1;if(r){if(_r(l.options.mutationKey)!==_r(f))return!1}else if(!Mr(l.options.mutationKey,f))return!1}return!(o&&l.state.status!==o||u&&!u(l))}function Hf(a,l){return((l==null?void 0:l.queryKeyHashFn)||_r)(a)}function _r(a){return JSON.stringify(a,(l,r)=>_f(r)?Object.keys(r).sort().reduce((o,u)=>(o[u]=r[u],o),{}):r)}function Mr(a,l){return a===l?!0:typeof a!=typeof l?!1:a&&l&&typeof a=="object"&&typeof l=="object"?!Object.keys(l).some(r=>!Mr(a[r],l[r])):!1}function ny(a,l){if(a===l)return a;const r=Wp(a)&&Wp(l);if(r||_f(a)&&_f(l)){const o=r?a:Object.keys(a),u=o.length,f=r?l:Object.keys(l),d=f.length,h=r?[]:{};let v=0;for(let m=0;m{setTimeout(l,a)})}function QS(a,l,r){return typeof r.structuralSharing=="function"?r.structuralSharing(a,l):r.structuralSharing!==!1?ny(a,l):l}function KS(a,l,r=0){const o=[...a,l];return r&&o.length>r?o.slice(1):o}function XS(a,l,r=0){const o=[l,...a];return r&&o.length>r?o.slice(0,-1):o}var Gf=Symbol();function ay(a,l){return!a.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!a.queryFn||a.queryFn===Gf?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}var ei,xa,nl,Xv,ZS=(Xv=class extends As{constructor(){super();Ot(this,ei);Ot(this,xa);Ot(this,nl);gt(this,nl,l=>{if(!Ts&&window.addEventListener){const r=()=>l();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){X(this,xa)||this.setEventListener(X(this,nl))}onUnsubscribe(){var l;this.hasListeners()||((l=X(this,xa))==null||l.call(this),gt(this,xa,void 0))}setEventListener(l){var r;gt(this,nl,l),(r=X(this,xa))==null||r.call(this),gt(this,xa,l(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(l){X(this,ei)!==l&&(gt(this,ei,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(r=>{r(l)})}isFocused(){var l;return typeof X(this,ei)=="boolean"?X(this,ei):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},ei=new WeakMap,xa=new WeakMap,nl=new WeakMap,Xv),iy=new ZS,al,Ea,il,Zv,FS=(Zv=class extends As{constructor(){super();Ot(this,al,!0);Ot(this,Ea);Ot(this,il);gt(this,il,l=>{if(!Ts&&window.addEventListener){const r=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){X(this,Ea)||this.setEventListener(X(this,il))}onUnsubscribe(){var l;this.hasListeners()||((l=X(this,Ea))==null||l.call(this),gt(this,Ea,void 0))}setEventListener(l){var r;gt(this,il,l),(r=X(this,Ea))==null||r.call(this),gt(this,Ea,l(this.setOnline.bind(this)))}setOnline(l){X(this,al)!==l&&(gt(this,al,l),this.listeners.forEach(o=>{o(l)}))}isOnline(){return X(this,al)}},al=new WeakMap,Ea=new WeakMap,il=new WeakMap,Zv),bs=new FS;function $S(){let a,l;const r=new Promise((u,f)=>{a=u,l=f});r.status="pending",r.catch(()=>{});function o(u){Object.assign(r,u),delete r.resolve,delete r.reject}return r.resolve=u=>{o({status:"fulfilled",value:u}),a(u)},r.reject=u=>{o({status:"rejected",reason:u}),l(u)},r}function JS(a){return Math.min(1e3*2**a,3e4)}function ly(a){return(a??"online")==="online"?bs.isOnline():!0}var ry=class extends Error{constructor(a){super("CancelledError"),this.revert=a==null?void 0:a.revert,this.silent=a==null?void 0:a.silent}};function $c(a){return a instanceof ry}function oy(a){let l=!1,r=0,o=!1,u;const f=$S(),d=x=>{var C;o||(S(new ry(x)),(C=a.abort)==null||C.call(a))},h=()=>{l=!0},v=()=>{l=!1},m=()=>iy.isFocused()&&(a.networkMode==="always"||bs.isOnline())&&a.canRun(),g=()=>ly(a.networkMode)&&a.canRun(),y=x=>{var C;o||(o=!0,(C=a.onSuccess)==null||C.call(a,x),u==null||u(),f.resolve(x))},S=x=>{var C;o||(o=!0,(C=a.onError)==null||C.call(a,x),u==null||u(),f.reject(x))},E=()=>new Promise(x=>{var C;u=O=>{(o||m())&&x(O)},(C=a.onPause)==null||C.call(a)}).then(()=>{var x;u=void 0,o||(x=a.onContinue)==null||x.call(a)}),_=()=>{if(o)return;let x;const C=r===0?a.initialPromise:void 0;try{x=C??a.fn()}catch(O){x=Promise.reject(O)}Promise.resolve(x).then(y).catch(O=>{var Q;if(o)return;const j=a.retry??(Ts?0:3),B=a.retryDelay??JS,H=typeof B=="function"?B(r,O):B,z=j===!0||typeof j=="number"&&rm()?void 0:E()).then(()=>{l?S(O):_()})})};return{promise:f,cancel:d,continue:()=>(u==null||u(),f),cancelRetry:h,continueRetry:v,canStart:g,start:()=>(g()?_():E().then(_),f)}}function WS(){let a=[],l=0,r=h=>{h()},o=h=>{h()},u=h=>setTimeout(h,0);const f=h=>{l?a.push(h):u(()=>{r(h)})},d=()=>{const h=a;a=[],h.length&&u(()=>{o(()=>{h.forEach(v=>{r(v)})})})};return{batch:h=>{let v;l++;try{v=h()}finally{l--,l||d()}return v},batchCalls:h=>(...v)=>{f(()=>{h(...v)})},schedule:f,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{u=h}}}var he=WS(),ni,Fv,sy=(Fv=class{constructor(){Ot(this,ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),VS(this.gcTime)&>(this,ni,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??(Ts?1/0:5*60*1e3))}clearGcTimeout(){X(this,ni)&&(clearTimeout(X(this,ni)),gt(this,ni,void 0))}},ni=new WeakMap,Fv),ll,rl,Qe,ue,Dr,ai,Ie,Vn,$v,IS=($v=class extends sy{constructor(l){super();Ot(this,Ie);Ot(this,ll);Ot(this,rl);Ot(this,Qe);Ot(this,ue);Ot(this,Dr);Ot(this,ai);gt(this,ai,!1),gt(this,Dr,l.defaultOptions),this.setOptions(l.options),this.observers=[],gt(this,Qe,l.cache),this.queryKey=l.queryKey,this.queryHash=l.queryHash,gt(this,ll,e1(this.options)),this.state=l.state??X(this,ll),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=X(this,ue))==null?void 0:l.promise}setOptions(l){this.options={...X(this,Dr),...l},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,Qe).remove(this)}setData(l,r){const o=QS(this.state.data,l,this.options);return oe(this,Ie,Vn).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(l,r){oe(this,Ie,Vn).call(this,{type:"setState",state:l,setStateOptions:r})}cancel(l){var o,u;const r=(o=X(this,ue))==null?void 0:o.promise;return(u=X(this,ue))==null||u.cancel(l),r?r.then(We).catch(We):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,ll))}isActive(){return this.observers.some(l=>YS(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(l=0){return this.state.isInvalidated||this.state.data===void 0||!PS(this.state.dataUpdatedAt,l)}onFocus(){var r;const l=this.observers.find(o=>o.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(r=X(this,ue))==null||r.continue()}onOnline(){var r;const l=this.observers.find(o=>o.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(r=X(this,ue))==null||r.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),X(this,Qe).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(r=>r!==l),this.observers.length||(X(this,ue)&&(X(this,ai)?X(this,ue).cancel({revert:!0}):X(this,ue).cancelRetry()),this.scheduleGc()),X(this,Qe).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,Ie,Vn).call(this,{type:"invalidate"})}fetch(l,r){var v,m,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(X(this,ue))return X(this,ue).continueRetry(),X(this,ue).promise}if(l&&this.setOptions(l),!this.options.queryFn){const y=this.observers.find(S=>S.options.queryFn);y&&this.setOptions(y.options)}const o=new AbortController,u=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(gt(this,ai,!0),o.signal)})},f=()=>{const y=ay(this.options,r),S={queryKey:this.queryKey,meta:this.meta};return u(S),gt(this,ai,!1),this.options.persister?this.options.persister(y,S,this):y(S)},d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};u(d),(v=this.options.behavior)==null||v.onFetch(d,this),gt(this,rl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=d.fetchOptions)==null?void 0:m.meta))&&oe(this,Ie,Vn).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta});const h=y=>{var S,E,_,x;$c(y)&&y.silent||oe(this,Ie,Vn).call(this,{type:"error",error:y}),$c(y)||((E=(S=X(this,Qe).config).onError)==null||E.call(S,y,this),(x=(_=X(this,Qe).config).onSettled)==null||x.call(_,this.state.data,y,this)),this.scheduleGc()};return gt(this,ue,oy({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,abort:o.abort.bind(o),onSuccess:y=>{var S,E,_,x;if(y===void 0){h(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(y)}catch(C){h(C);return}(E=(S=X(this,Qe).config).onSuccess)==null||E.call(S,y,this),(x=(_=X(this,Qe).config).onSettled)==null||x.call(_,y,this.state.error,this),this.scheduleGc()},onError:h,onFail:(y,S)=>{oe(this,Ie,Vn).call(this,{type:"failed",failureCount:y,error:S})},onPause:()=>{oe(this,Ie,Vn).call(this,{type:"pause"})},onContinue:()=>{oe(this,Ie,Vn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0})),X(this,ue).start()}},ll=new WeakMap,rl=new WeakMap,Qe=new WeakMap,ue=new WeakMap,Dr=new WeakMap,ai=new WeakMap,Ie=new WeakSet,Vn=function(l){const r=o=>{switch(l.type){case"failed":return{...o,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...t1(o.data,this.options),fetchMeta:l.meta??null};case"success":return{...o,data:l.data,dataUpdateCount:o.dataUpdateCount+1,dataUpdatedAt:l.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const u=l.error;return $c(u)&&u.revert&&X(this,rl)?{...X(this,rl),fetchStatus:"idle"}:{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error"};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...l.state}}};this.state=r(this.state),he.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),X(this,Qe).notify({query:this,type:"updated",action:l})})},$v);function t1(a,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ly(l.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function e1(a){const l=typeof a.initialData=="function"?a.initialData():a.initialData,r=l!==void 0,o=r?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mn,Jv,n1=(Jv=class extends As{constructor(l={}){super();Ot(this,mn);this.config=l,gt(this,mn,new Map)}build(l,r,o){const u=r.queryKey,f=r.queryHash??Hf(u,r);let d=this.get(f);return d||(d=new IS({cache:this,queryKey:u,queryHash:f,options:l.defaultQueryOptions(r),state:o,defaultOptions:l.getQueryDefaults(u)}),this.add(d)),d}add(l){X(this,mn).has(l.queryHash)||(X(this,mn).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const r=X(this,mn).get(l.queryHash);r&&(l.destroy(),r===l&&X(this,mn).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){he.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return X(this,mn).get(l)}getAll(){return[...X(this,mn).values()]}find(l){const r={exact:!0,...l};return this.getAll().find(o=>$p(r,o))}findAll(l={}){const r=this.getAll();return Object.keys(l).length>0?r.filter(o=>$p(l,o)):r}notify(l){he.batch(()=>{this.listeners.forEach(r=>{r(l)})})}onFocus(){he.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},mn=new WeakMap,Jv),pn,de,ii,vn,ga,Wv,a1=(Wv=class extends sy{constructor(l){super();Ot(this,vn);Ot(this,pn);Ot(this,de);Ot(this,ii);this.mutationId=l.mutationId,gt(this,de,l.mutationCache),gt(this,pn,[]),this.state=l.state||i1(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){X(this,pn).includes(l)||(X(this,pn).push(l),this.clearGcTimeout(),X(this,de).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){gt(this,pn,X(this,pn).filter(r=>r!==l)),this.scheduleGc(),X(this,de).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){X(this,pn).length||(this.state.status==="pending"?this.scheduleGc():X(this,de).remove(this))}continue(){var l;return((l=X(this,ii))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var u,f,d,h,v,m,g,y,S,E,_,x,C,O,j,B,H,z,Q,J;gt(this,ii,oy({fn:()=>this.options.mutationFn?this.options.mutationFn(l):Promise.reject(new Error("No mutationFn found")),onFail:(P,G)=>{oe(this,vn,ga).call(this,{type:"failed",failureCount:P,error:G})},onPause:()=>{oe(this,vn,ga).call(this,{type:"pause"})},onContinue:()=>{oe(this,vn,ga).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,de).canRun(this)}));const r=this.state.status==="pending",o=!X(this,ii).canStart();try{if(!r){oe(this,vn,ga).call(this,{type:"pending",variables:l,isPaused:o}),await((f=(u=X(this,de).config).onMutate)==null?void 0:f.call(u,l,this));const G=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,l));G!==this.state.context&&oe(this,vn,ga).call(this,{type:"pending",context:G,variables:l,isPaused:o})}const P=await X(this,ii).start();return await((m=(v=X(this,de).config).onSuccess)==null?void 0:m.call(v,P,l,this.state.context,this)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,P,l,this.state.context)),await((E=(S=X(this,de).config).onSettled)==null?void 0:E.call(S,P,null,this.state.variables,this.state.context,this)),await((x=(_=this.options).onSettled)==null?void 0:x.call(_,P,null,l,this.state.context)),oe(this,vn,ga).call(this,{type:"success",data:P}),P}catch(P){try{throw await((O=(C=X(this,de).config).onError)==null?void 0:O.call(C,P,l,this.state.context,this)),await((B=(j=this.options).onError)==null?void 0:B.call(j,P,l,this.state.context)),await((z=(H=X(this,de).config).onSettled)==null?void 0:z.call(H,void 0,P,this.state.variables,this.state.context,this)),await((J=(Q=this.options).onSettled)==null?void 0:J.call(Q,void 0,P,l,this.state.context)),P}finally{oe(this,vn,ga).call(this,{type:"error",error:P})}}finally{X(this,de).runNext(this)}}},pn=new WeakMap,de=new WeakMap,ii=new WeakMap,vn=new WeakSet,ga=function(l){const r=o=>{switch(l.type){case"failed":return{...o,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...o,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:l.error,failureCount:o.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=r(this.state),he.batch(()=>{X(this,pn).forEach(o=>{o.onMutationUpdate(l)}),X(this,de).notify({mutation:this,type:"updated",action:l})})},Wv);function i1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ce,Nr,Iv,l1=(Iv=class extends As{constructor(l={}){super();Ot(this,Ce);Ot(this,Nr);this.config=l,gt(this,Ce,new Map),gt(this,Nr,Date.now())}build(l,r,o){const u=new a1({mutationCache:this,mutationId:++Jo(this,Nr)._,options:l.defaultMutationOptions(r),state:o});return this.add(u),u}add(l){const r=Wo(l),o=X(this,Ce).get(r)??[];o.push(l),X(this,Ce).set(r,o),this.notify({type:"added",mutation:l})}remove(l){var o;const r=Wo(l);if(X(this,Ce).has(r)){const u=(o=X(this,Ce).get(r))==null?void 0:o.filter(f=>f!==l);u&&(u.length===0?X(this,Ce).delete(r):X(this,Ce).set(r,u))}this.notify({type:"removed",mutation:l})}canRun(l){var o;const r=(o=X(this,Ce).get(Wo(l)))==null?void 0:o.find(u=>u.state.status==="pending");return!r||r===l}runNext(l){var o;const r=(o=X(this,Ce).get(Wo(l)))==null?void 0:o.find(u=>u!==l&&u.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){he.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}getAll(){return[...X(this,Ce).values()].flat()}find(l){const r={exact:!0,...l};return this.getAll().find(o=>Jp(r,o))}findAll(l={}){return this.getAll().filter(r=>Jp(l,r))}notify(l){he.batch(()=>{this.listeners.forEach(r=>{r(l)})})}resumePausedMutations(){const l=this.getAll().filter(r=>r.state.isPaused);return he.batch(()=>Promise.all(l.map(r=>r.continue().catch(We))))}},Ce=new WeakMap,Nr=new WeakMap,Iv);function Wo(a){var l;return((l=a.options.scope)==null?void 0:l.id)??String(a.mutationId)}function tv(a){return{onFetch:(l,r)=>{var g,y,S,E,_;const o=l.options,u=(S=(y=(g=l.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:S.direction,f=((E=l.state.data)==null?void 0:E.pages)||[],d=((_=l.state.data)==null?void 0:_.pageParams)||[];let h={pages:[],pageParams:[]},v=0;const m=async()=>{let x=!1;const C=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(l.signal.aborted?x=!0:l.signal.addEventListener("abort",()=>{x=!0}),l.signal)})},O=ay(l.options,l.fetchOptions),j=async(B,H,z)=>{if(x)return Promise.reject();if(H==null&&B.pages.length)return Promise.resolve(B);const Q={queryKey:l.queryKey,pageParam:H,direction:z?"backward":"forward",meta:l.options.meta};C(Q);const J=await O(Q),{maxPages:P}=l.options,G=z?XS:KS;return{pages:G(B.pages,J,P),pageParams:G(B.pageParams,H,P)}};if(u&&f.length){const B=u==="backward",H=B?r1:ev,z={pages:f,pageParams:d},Q=H(o,z);h=await j(z,Q,B)}else{const B=a??f.length;do{const H=v===0?d[0]??o.initialPageParam:ev(o,h);if(v>0&&H==null)break;h=await j(h,H),v++}while(v{var x,C;return(C=(x=l.options).persister)==null?void 0:C.call(x,m,{queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},r)}:l.fetchFn=m}}}function ev(a,{pages:l,pageParams:r}){const o=l.length-1;return l.length>0?a.getNextPageParam(l[o],l,r[o],r):void 0}function r1(a,{pages:l,pageParams:r}){var o;return l.length>0?(o=a.getPreviousPageParam)==null?void 0:o.call(a,l[0],l,r[0],r):void 0}var Yt,wa,_a,ol,sl,Ma,ul,cl,ty,o1=(ty=class{constructor(a={}){Ot(this,Yt);Ot(this,wa);Ot(this,_a);Ot(this,ol);Ot(this,sl);Ot(this,Ma);Ot(this,ul);Ot(this,cl);gt(this,Yt,a.queryCache||new n1),gt(this,wa,a.mutationCache||new l1),gt(this,_a,a.defaultOptions||{}),gt(this,ol,new Map),gt(this,sl,new Map),gt(this,Ma,0)}mount(){Jo(this,Ma)._++,X(this,Ma)===1&&(gt(this,ul,iy.subscribe(async a=>{a&&(await this.resumePausedMutations(),X(this,Yt).onFocus())})),gt(this,cl,bs.subscribe(async a=>{a&&(await this.resumePausedMutations(),X(this,Yt).onOnline())})))}unmount(){var a,l;Jo(this,Ma)._--,X(this,Ma)===0&&((a=X(this,ul))==null||a.call(this),gt(this,ul,void 0),(l=X(this,cl))==null||l.call(this),gt(this,cl,void 0))}isFetching(a){return X(this,Yt).findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return X(this,wa).findAll({...a,status:"pending"}).length}getQueryData(a){var r;const l=this.defaultQueryOptions({queryKey:a});return(r=X(this,Yt).get(l.queryHash))==null?void 0:r.state.data}ensureQueryData(a){const l=this.getQueryData(a.queryKey);if(l===void 0)return this.fetchQuery(a);{const r=this.defaultQueryOptions(a),o=X(this,Yt).build(this,r);return a.revalidateIfStale&&o.isStaleByTime(Fp(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(l)}}getQueriesData(a){return X(this,Yt).findAll(a).map(({queryKey:l,state:r})=>{const o=r.data;return[l,o]})}setQueryData(a,l,r){const o=this.defaultQueryOptions({queryKey:a}),u=X(this,Yt).get(o.queryHash),f=u==null?void 0:u.state.data,d=qS(l,f);if(d!==void 0)return X(this,Yt).build(this,o).setData(d,{...r,manual:!0})}setQueriesData(a,l,r){return he.batch(()=>X(this,Yt).findAll(a).map(({queryKey:o})=>[o,this.setQueryData(o,l,r)]))}getQueryState(a){var r;const l=this.defaultQueryOptions({queryKey:a});return(r=X(this,Yt).get(l.queryHash))==null?void 0:r.state}removeQueries(a){const l=X(this,Yt);he.batch(()=>{l.findAll(a).forEach(r=>{l.remove(r)})})}resetQueries(a,l){const r=X(this,Yt),o={type:"active",...a};return he.batch(()=>(r.findAll(a).forEach(u=>{u.reset()}),this.refetchQueries(o,l)))}cancelQueries(a={},l={}){const r={revert:!0,...l},o=he.batch(()=>X(this,Yt).findAll(a).map(u=>u.cancel(r)));return Promise.all(o).then(We).catch(We)}invalidateQueries(a={},l={}){return he.batch(()=>{if(X(this,Yt).findAll(a).forEach(o=>{o.invalidate()}),a.refetchType==="none")return Promise.resolve();const r={...a,type:a.refetchType??a.type??"active"};return this.refetchQueries(r,l)})}refetchQueries(a={},l){const r={...l,cancelRefetch:(l==null?void 0:l.cancelRefetch)??!0},o=he.batch(()=>X(this,Yt).findAll(a).filter(u=>!u.isDisabled()).map(u=>{let f=u.fetch(void 0,r);return r.throwOnError||(f=f.catch(We)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(o).then(We)}fetchQuery(a){const l=this.defaultQueryOptions(a);l.retry===void 0&&(l.retry=!1);const r=X(this,Yt).build(this,l);return r.isStaleByTime(Fp(l.staleTime,r))?r.fetch(l):Promise.resolve(r.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(We).catch(We)}fetchInfiniteQuery(a){return a.behavior=tv(a.pages),this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(We).catch(We)}ensureInfiniteQueryData(a){return a.behavior=tv(a.pages),this.ensureQueryData(a)}resumePausedMutations(){return bs.isOnline()?X(this,wa).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,Yt)}getMutationCache(){return X(this,wa)}getDefaultOptions(){return X(this,_a)}setDefaultOptions(a){gt(this,_a,a)}setQueryDefaults(a,l){X(this,ol).set(_r(a),{queryKey:a,defaultOptions:l})}getQueryDefaults(a){const l=[...X(this,ol).values()];let r={};return l.forEach(o=>{Mr(a,o.queryKey)&&(r={...r,...o.defaultOptions})}),r}setMutationDefaults(a,l){X(this,sl).set(_r(a),{mutationKey:a,defaultOptions:l})}getMutationDefaults(a){const l=[...X(this,sl).values()];let r={};return l.forEach(o=>{Mr(a,o.mutationKey)&&(r={...r,...o.defaultOptions})}),r}defaultQueryOptions(a){if(a._defaulted)return a;const l={...X(this,_a).queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return l.queryHash||(l.queryHash=Hf(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.enabled!==!0&&l.queryFn===Gf&&(l.enabled=!1),l}defaultMutationOptions(a){return a!=null&&a._defaulted?a:{...X(this,_a).mutations,...(a==null?void 0:a.mutationKey)&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){X(this,Yt).clear(),X(this,wa).clear()}},Yt=new WeakMap,wa=new WeakMap,_a=new WeakMap,ol=new WeakMap,sl=new WeakMap,Ma=new WeakMap,ul=new WeakMap,cl=new WeakMap,ty),Jc={exports:{}},vt={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var nv;function s1(){if(nv)return vt;nv=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function S(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function C(A,V,nt){this.props=A,this.context=V,this.refs=x,this.updater=nt||E}C.prototype.isReactComponent={},C.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,V,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=C.prototype;function j(A,V,nt){this.props=A,this.context=V,this.refs=x,this.updater=nt||E}var B=j.prototype=new O;B.constructor=j,_(B,C.prototype),B.isPureReactComponent=!0;var H=Array.isArray,z={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function J(A,V,nt,it,et,ft){return nt=ft.ref,{$$typeof:a,type:A,key:V,ref:nt!==void 0?nt:null,props:ft}}function P(A,V){return J(A.type,V,void 0,void 0,void 0,A.props)}function G(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function tt(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(nt){return V[nt]})}var I=/\/+/g;function W(A,V){return typeof A=="object"&&A!==null&&A.key!=null?tt(""+A.key):V.toString(36)}function rt(){}function lt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(rt,rt):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function ut(A,V,nt,it,et){var ft=typeof A;(ft==="undefined"||ft==="boolean")&&(A=null);var ot=!1;if(A===null)ot=!0;else switch(ft){case"bigint":case"string":case"number":ot=!0;break;case"object":switch(A.$$typeof){case a:case l:ot=!0;break;case g:return ot=A._init,ut(ot(A._payload),V,nt,it,et)}}if(ot)return et=et(A),ot=it===""?"."+W(A,0):it,H(et)?(nt="",ot!=null&&(nt=ot.replace(I,"$&/")+"/"),ut(et,V,nt,"",function(Et){return Et})):et!=null&&(G(et)&&(et=P(et,nt+(et.key==null||A&&A.key===et.key?"":(""+et.key).replace(I,"$&/")+"/")+ot)),V.push(et)),1;ot=0;var Mt=it===""?".":it+":";if(H(A))for(var pt=0;pt(w.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),R.jsx(c1.Provider,{value:a,children:l}));const li="__TSR_index",iv="popstate",lv="beforeunload";function uy(a){let l=a.getLocation();const r=new Set,o=d=>{l=a.getLocation(),r.forEach(h=>h({location:l,action:d}))},u=d=>{a.notifyOnIndexChange??!0?o(d):l=a.getLocation()},f=async({task:d,navigateOpts:h,...v})=>{var m,g;if((h==null?void 0:h.ignoreBlocker)??!1){d();return}const S=((m=a.getBlockers)==null?void 0:m.call(a))??[],E=v.type==="PUSH"||v.type==="REPLACE";if(typeof document<"u"&&S.length&&E)for(const _ of S){const x=Rr(v.path,v.state);if(await _.blockerFn({currentLocation:l,nextLocation:x,action:v.type})){(g=a.onBlocked)==null||g.call(a);return}}d()};return{get location(){return l},get length(){return a.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,h,v)=>{const m=l.state[li];h=Mf(m+1,h),f({task:()=>{a.pushState(d,h),o({type:"PUSH"})},navigateOpts:v,type:"PUSH",path:d,state:h})},replace:(d,h,v)=>{const m=l.state[li];h=Mf(m,h),f({task:()=>{a.replaceState(d,h),o({type:"REPLACE"})},navigateOpts:v,type:"REPLACE",path:d,state:h})},go:(d,h)=>{f({task:()=>{a.go(d),u({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{f({task:()=>{a.back((d==null?void 0:d.ignoreBlocker)??!1),u({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{f({task:()=>{a.forward((d==null?void 0:d.ignoreBlocker)??!1),u({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>l.state[li]!==0,createHref:d=>a.createHref(d),block:d=>{var h;if(!a.setBlockers)return()=>{};const v=((h=a.getBlockers)==null?void 0:h.call(a))??[];return a.setBlockers([...v,d]),()=>{var m,g;const y=((m=a.getBlockers)==null?void 0:m.call(a))??[];(g=a.setBlockers)==null||g.call(a,y.filter(S=>S!==d))}},flush:()=>{var d;return(d=a.flush)==null?void 0:d.call(a)},destroy:()=>{var d;return(d=a.destroy)==null?void 0:d.call(a)},notify:o}}function Mf(a,l){return l||(l={}),{...l,key:m1(),[li]:a}}function d1(a){const l=typeof document<"u"?window:void 0,r=l.history.pushState,o=l.history.replaceState;let u=[];const f=()=>u,d=P=>u=P,h=P=>P,v=()=>Rr(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state);let m=v(),g,y=!1,S=!1,E=!1,_=!1;const x=()=>m;let C,O;const j=()=>{C&&(J._ignoreSubscribers=!0,(C.isPush?l.history.pushState:l.history.replaceState)(C.state,"",C.href),J._ignoreSubscribers=!1,C=void 0,O=void 0,g=void 0)},B=(P,G,tt)=>{const I=h(G);O||(g=m),m=Rr(G,tt),C={href:I,state:tt,isPush:(C==null?void 0:C.isPush)||P==="push"},O||(O=Promise.resolve().then(()=>j()))},H=P=>{m=v(),J.notify({type:P})},z=async()=>{if(S){S=!1;return}const P=v(),G=P.state[li]-m.state[li],tt=G===1,I=G===-1,W=!tt&&!I||y;y=!1;const rt=W?"GO":I?"BACK":"FORWARD",lt=W?{type:"GO",index:G}:{type:I?"BACK":"FORWARD"};if(E)E=!1;else{const ut=f();if(typeof document<"u"&&ut.length){for(const q of ut)if(await q.blockerFn({currentLocation:m,nextLocation:P,action:rt})){S=!0,l.history.go(1),J.notify(lt);return}}}m=v(),J.notify(lt)},Q=P=>{if(_){_=!1;return}let G=!1;const tt=f();if(typeof document<"u"&&tt.length)for(const I of tt){const W=I.enableBeforeUnload??!0;if(W===!0){G=!0;break}if(typeof W=="function"&&W()===!0){G=!0;break}}if(G)return P.preventDefault(),P.returnValue=""},J=uy({getLocation:x,getLength:()=>l.history.length,pushState:(P,G)=>B("push",P,G),replaceState:(P,G)=>B("replace",P,G),back:P=>(P&&(E=!0),_=!0,l.history.back()),forward:P=>{P&&(E=!0),_=!0,l.history.forward()},go:P=>{y=!0,l.history.go(P)},createHref:P=>h(P),flush:j,destroy:()=>{l.history.pushState=r,l.history.replaceState=o,l.removeEventListener(lv,Q,{capture:!0}),l.removeEventListener(iv,z)},onBlocked:()=>{g&&m!==g&&(m=g)},getBlockers:f,setBlockers:d,notifyOnIndexChange:!1});return l.addEventListener(lv,Q,{capture:!0}),l.addEventListener(iv,z),l.history.pushState=function(...P){const G=r.apply(l.history,P);return J._ignoreSubscribers||H("PUSH"),G},l.history.replaceState=function(...P){const G=o.apply(l.history,P);return J._ignoreSubscribers||H("REPLACE"),G},J}function h1(a={initialEntries:["/"]}){const l=a.initialEntries;let r=a.initialIndex?Math.min(Math.max(a.initialIndex,0),l.length-1):l.length-1;const o=l.map((f,d)=>Mf(d,void 0));return uy({getLocation:()=>Rr(l[r],o[r]),getLength:()=>l.length,pushState:(f,d)=>{r{o[r]=d,l[r]=f},back:()=>{r=Math.max(r-1,0)},forward:()=>{r=Math.min(r+1,l.length-1)},go:f=>{r=Math.min(Math.max(r+f,0),l.length-1)},createHref:f=>f})}function Rr(a,l){const r=a.indexOf("#"),o=a.indexOf("?");return{href:a,pathname:a.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:a.length),hash:r>-1?a.substring(r):"",search:o>-1?a.slice(o,r===-1?void 0:r):"",state:l||{[li]:0}}}function m1(){return(Math.random()+1).toString(36).substring(7)}var p1="Invariant failed";function Te(a,l){if(!a)throw new Error(p1)}const Wc=w.createContext(null);function cy(){return typeof document>"u"?Wc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Wc,Wc)}function si(a){const l=w.useContext(cy());return a==null||a.warn,l}var Ic={exports:{}},tf={},ef={exports:{}},nf={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rv;function v1(){if(rv)return nf;rv=1;var a=zr();function l(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var r=typeof Object.is=="function"?Object.is:l,o=a.useState,u=a.useEffect,f=a.useLayoutEffect,d=a.useDebugValue;function h(y,S){var E=S(),_=o({inst:{value:E,getSnapshot:S}}),x=_[0].inst,C=_[1];return f(function(){x.value=E,x.getSnapshot=S,v(x)&&C({inst:x})},[y,E,S]),u(function(){return v(x)&&C({inst:x}),y(function(){v(x)&&C({inst:x})})},[y]),d(E),E}function v(y){var S=y.getSnapshot;y=y.value;try{var E=S();return!r(y,E)}catch{return!0}}function m(y,S){return S()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return nf.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:g,nf}var ov;function y1(){return ov||(ov=1,ef.exports=v1()),ef.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sv;function g1(){if(sv)return tf;sv=1;var a=zr(),l=y1();function r(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var o=typeof Object.is=="function"?Object.is:r,u=l.useSyncExternalStore,f=a.useRef,d=a.useEffect,h=a.useMemo,v=a.useDebugValue;return tf.useSyncExternalStoreWithSelector=function(m,g,y,S,E){var _=f(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=h(function(){function O(Q){if(!j){if(j=!0,B=Q,Q=S(Q),E!==void 0&&x.hasValue){var J=x.value;if(E(J,Q))return H=J}return H=Q}if(J=H,o(B,Q))return J;var P=S(Q);return E!==void 0&&E(J,P)?(B=Q,J):(B=Q,H=P)}var j=!1,B,H,z=y===void 0?null:y;return[function(){return O(g())},z===null?void 0:function(){return O(z())}]},[g,y,S,E]);var C=u(m,_[0],_[1]);return d(function(){x.hasValue=!0,x.value=C},[C]),v(C),C},tf}var uv;function b1(){return uv||(uv=1,Ic.exports=g1()),Ic.exports}var S1=b1();const Ji=new WeakMap,ds=new WeakMap,Ss={current:[]};let af=!1,xr=0;const gr=new Set,Io=new Map;function fy(a){const l=Array.from(a).sort((r,o)=>r instanceof Wi&&r.options.deps.includes(o)?1:o instanceof Wi&&o.options.deps.includes(r)?-1:0);for(const r of l){if(Ss.current.includes(r))continue;Ss.current.push(r),r.recompute();const o=ds.get(r);if(o)for(const u of o){const f=Ji.get(u);f&&fy(f)}}}function x1(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function E1(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function dy(a){if(xr>0&&!Io.has(a)&&Io.set(a,a.prevState),gr.add(a),!(xr>0)&&!af)try{for(af=!0;gr.size>0;){const l=Array.from(gr);gr.clear();for(const r of l){const o=Io.get(r)??r.prevState;r.prevState=o,x1(r)}for(const r of l){const o=Ji.get(r);o&&(Ss.current.push(r),fy(o))}for(const r of l){const o=Ji.get(r);if(o)for(const u of o)E1(u)}}}finally{af=!1,Ss.current=[],Io.clear()}}function lf(a){xr++;try{a()}finally{if(xr--,xr===0){const l=Array.from(gr)[0];l&&dy(l)}}}class Rf{constructor(l,r){this.listeners=new Set,this.subscribe=o=>{var u,f;this.listeners.add(o);const d=(f=(u=this.options)==null?void 0:u.onSubscribe)==null?void 0:f.call(u,o,this);return()=>{this.listeners.delete(o),d==null||d()}},this.setState=o=>{var u,f,d;this.prevState=this.state,this.state=(u=this.options)!=null&&u.updateFn?this.options.updateFn(this.prevState)(o):o(this.prevState),(d=(f=this.options)==null?void 0:f.onUpdate)==null||d.call(f),dy(this)},this.prevState=l,this.state=l,this.options=r}}class Wi{constructor(l){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=[],o=[];for(const u of this.options.deps)r.push(u.prevState),o.push(u.state);return this.lastSeenDepValues=o,{prevDepVals:r,currDepVals:o,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,o;this.prevState=this.state;const{prevDepVals:u,currDepVals:f,prevVal:d}=this.getDepVals();this.state=this.options.fn({prevDepVals:u,currDepVals:f,prevVal:d}),(o=(r=this.options).onUpdate)==null||o.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const f of this.options.deps)f instanceof Wi&&f.checkIfRecalculationNeededDeeply();let r=!1;const o=this.lastSeenDepValues,{currDepVals:u}=this.getDepVals();for(let f=0;f(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var o,u;this.listeners.add(r);const f=(u=(o=this.options).onSubscribe)==null?void 0:u.call(o,r,this);return()=>{this.listeners.delete(r),f==null||f()}},this.options=l,this.state=l.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(l=this.options.deps){for(const r of l)if(r instanceof Wi)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Rf){let o=Ji.get(r);o||(o=new Set,Ji.set(r,o)),o.add(this);let u=ds.get(this);u||(u=new Set,ds.set(this,u)),u.add(r)}}unregisterFromGraph(l=this.options.deps){for(const r of l)if(r instanceof Wi)this.unregisterFromGraph(r.options.deps);else if(r instanceof Rf){const o=Ji.get(r);o&&o.delete(this);const u=ds.get(this);u&&u.delete(r)}}}function w1(a,l=r=>r){return S1.useSyncExternalStoreWithSelector(a.subscribe,()=>a.state,()=>a.state,l,_1)}function _1(a,l){if(Object.is(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;if(a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;for(const[o,u]of a)if(!l.has(o)||!Object.is(u,l.get(o)))return!1;return!0}if(a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(const o of a)if(!l.has(o))return!1;return!0}const r=Object.keys(a);if(r.length!==Object.keys(l).length)return!1;for(let o=0;o{l.substring(0,1)==="?"&&(l=l.substring(1));const r=R1(l);for(const o in r){const u=r[o];if(typeof u=="string")try{r[o]=a(u)}catch{}}return r}}function O1(a,l){function r(o){if(typeof o=="object"&&o!==null)try{return a(o)}catch{}else if(typeof o=="string"&&typeof l=="function")try{return l(o),a(o)}catch{}return o}return o=>{o={...o},Object.keys(o).forEach(f=>{const d=o[f];typeof d>"u"||d===void 0?delete o[f]:o[f]=r(d)});const u=M1(o).toString();return u?`?${u}`:""}}function Er(a){return a[a.length-1]}function D1(a){return typeof a=="function"}function ts(a,l){return D1(a)?a(l):a}function hs(a,l){return l.reduce((r,o)=>(r[o]=a[o],r),{})}function ke(a,l){if(a===l)return a;const r=l,o=dv(a)&&dv(r);if(o||Ra(a)&&Ra(r)){const u=o?a:Object.keys(a),f=u.length,d=o?r:Object.keys(r),h=d.length,v=o?[]:{};let m=0;for(let g=0;g"u")return!0;const r=l.prototype;return!(!fv(r)||!r.hasOwnProperty("isPrototypeOf"))}function fv(a){return Object.prototype.toString.call(a)==="[object Object]"}function dv(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function hv(a,l){let r=Object.keys(a);return l&&(r=r.filter(o=>a[o]!==void 0)),r}function wr(a,l,r){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(Ra(a)&&Ra(l)){const o=(r==null?void 0:r.ignoreUndefined)??!0,u=hv(a,o),f=hv(l,o);return!(r!=null&&r.partial)&&u.length!==f.length?!1:f.every(d=>wr(a[d],l[d],r))}return Array.isArray(a)&&Array.isArray(l)?a.length!==l.length?!1:!a.some((o,u)=>!wr(o,l[u],r)):!1}const es=typeof window<"u"?w.useLayoutEffect:w.useEffect;function $i(a){let l,r;const o=new Promise((u,f)=>{l=u,r=f});return o.status="pending",o.resolve=u=>{o.status="resolved",o.value=u,l(u),a==null||a(u)},o.reject=u=>{o.status="rejected",r(u)},o}function rf(a){const l=w.useRef({value:a,prev:null}),r=l.current.value;return a!==r&&(l.current={value:a,prev:r}),l.current.prev}function Pn(a){return Os(a.filter(l=>l!==void 0).join("/"))}function Os(a){return a.replace(/\/{2,}/g,"/")}function qf(a){return a==="/"?a:a.replace(/^\/{1,}/,"")}function ti(a){return a==="/"?a:a.replace(/\/{1,}$/,"")}function N1(a){return ti(qf(a))}function z1({basepath:a,base:l,to:r,trailingSlash:o="never",caseSensitive:u}){var f,d;l=xs(a,l,u),r=xs(a,r,u);let h=fl(l);const v=fl(r);h.length>1&&((f=Er(h))==null?void 0:f.value)==="/"&&h.pop(),v.forEach((g,y)=>{g.value==="/"?y?y===v.length-1&&h.push(g):h=[g]:g.value===".."?h.pop():g.value==="."||h.push(g)}),h.length>1&&(((d=Er(h))==null?void 0:d.value)==="/"?o==="never"&&h.pop():o==="always"&&h.push({type:"pathname",value:"/"}));const m=Pn([a,...h.map(g=>g.value)]);return Os(m)}function fl(a){if(!a)return[];a=Os(a);const l=[];if(a.slice(0,1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),!a)return l;const r=a.split("/").filter(Boolean);return l.push(...r.map(o=>o==="$"||o==="*"?{type:"wildcard",value:o}:o.charAt(0)==="$"?{type:"param",value:o}:{type:"pathname",value:decodeURI(o)})),a.slice(-1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),l}function ns({path:a,params:l,leaveWildcards:r,leaveParams:o,decodeCharMap:u}){const f=fl(a),d={};for(const[h,v]of Object.entries(l)){const m=typeof v=="string";["*","_splat"].includes(h)?d[h]=m?encodeURI(v):v:d[h]=m?j1(v,u):v}return Pn(f.map(h=>{if(h.type==="wildcard"){const v=d._splat;return r?`${h.value}${v??""}`:v}if(h.type==="param"){if(o){const v=d[h.value];return`${h.value}${v??""}`}return d[h.value.substring(1)]??"undefined"}return h.value}))}function j1(a,l){let r=encodeURIComponent(a);if(l)for(const[o,u]of l)r=r.replaceAll(o,u);return r}function as(a,l,r){const o=L1(a,l,r);if(!(r.to&&!o))return o??{}}function xs(a,l,r=!1){const o=r?a:a.toLowerCase(),u=r?l:l.toLowerCase();switch(!0){case o==="/":return l;case u===o:return"";case l.length{for(let v=0;v=u.length-1,S=v>=f.length-1;if(g){if(g.type==="wildcard"){const E=decodeURI(Pn(u.slice(v).map(_=>_.value)));return d["*"]=E,d._splat=E,!0}if(g.type==="pathname"){if(g.value==="/"&&!(m!=null&&m.value))return!0;if(m){if(r.caseSensitive){if(g.value!==m.value)return!1}else if(g.value.toLowerCase()!==m.value.toLowerCase())return!1}}if(!m)return!1;if(g.type==="param"){if(m.value==="/")return!1;m.value.charAt(0)!=="$"&&(d[g.value.substring(1)]=decodeURIComponent(m.value))}}if(!y&&S)return d["**"]=Pn(u.slice(v+1).map(E=>E.value)),!!r.fuzzy&&(g==null?void 0:g.value)!=="/"}return!0})()?d:void 0}function Wa(a){return!!(a!=null&&a.isRedirect)}function of(a){return!!(a!=null&&a.isRedirect)&&a.href}function Vf(a){const l=a.errorComponent??Ds;return R.jsx(U1,{getResetKey:a.getResetKey,onCatch:a.onCatch,children:({error:r,reset:o})=>r?w.createElement(l,{error:r,reset:o}):a.children})}class U1 extends w.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(l){return{resetKey:l.getResetKey()}}static getDerivedStateFromError(l){return{error:l}}reset(){this.setState({error:null})}componentDidUpdate(l,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(l,r){this.props.onCatch&&this.props.onCatch(l,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ds({error:a}){const[l,r]=w.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(o=>!o),children:l?"Hide Error":"Show Error"})]}),R.jsx("div",{style:{height:".25rem"}}),l?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a.message?R.jsx("code",{children:a.message}):null})}):null]})}function Ke(a){const l=si({warn:(a==null?void 0:a.router)===void 0}),r=(a==null?void 0:a.router)||l,o=w.useRef();return w1(r.__store,u=>{if(a!=null&&a.select){if(a.structuralSharing??r.options.defaultStructuralSharing){const f=ke(o.current,a.select(u));return o.current=f,f}return a.select(u)}return u})}function tn(a){return!!(a!=null&&a.isNotFound)}function B1(a){const l=Ke({select:r=>`not-found-${r.location.pathname}-${r.status}`});return R.jsx(Vf,{getResetKey:()=>l,onCatch:(r,o)=>{var u;if(tn(r))(u=a.onCatch)==null||u.call(a,r,o);else throw r},errorComponent:({error:r})=>{var o;if(tn(r))return(o=a.fallback)==null?void 0:o.call(a,r);throw r},children:a.children})}function H1(){return R.jsx("p",{children:"Not Found"})}const br={stringify:a=>JSON.stringify(a,function(r,o){const u=this[r],f=ls.find(d=>d.stringifyCondition(u));return f?f.stringify(u):o}),parse:a=>JSON.parse(a,function(r,o){const u=this[r];if(Ra(u)){const f=ls.find(d=>d.parseCondition(u));if(f)return f.parse(u)}return o}),encode:a=>{if(Array.isArray(a))return a.map(r=>br.encode(r));if(Ra(a))return Object.fromEntries(Object.entries(a).map(([r,o])=>[r,br.encode(o)]));const l=ls.find(r=>r.stringifyCondition(a));return l?l.stringify(a):a},decode:a=>{if(Ra(a)){const l=ls.find(r=>r.parseCondition(a));if(l)return l.parse(a)}return Array.isArray(a)?a.map(l=>br.decode(l)):Ra(a)?Object.fromEntries(Object.entries(a).map(([l,r])=>[l,br.decode(r)])):a}},is=(a,l,r,o)=>({key:a,stringifyCondition:l,stringify:u=>({[`$${a}`]:r(u)}),parseCondition:u=>Object.hasOwn(u,`$${a}`),parse:u=>o(u[`$${a}`])}),ls=[is("undefined",a=>a===void 0,()=>0,()=>{}),is("date",a=>a instanceof Date,a=>a.toISOString(),a=>new Date(a)),is("error",a=>a instanceof Error,a=>({...a,message:a.message,stack:a.stack,cause:a.cause}),a=>Object.assign(new Error(a.message),a)),is("formData",a=>a instanceof FormData,a=>{const l={};return a.forEach((r,o)=>{const u=l[o];u!==void 0?Array.isArray(u)?u.push(r):l[o]=[u,r]:l[o]=r}),l},a=>{const l=new FormData;return Object.entries(a).forEach(([r,o])=>{Array.isArray(o)?o.forEach(u=>l.append(r,u)):l.append(r,o)}),l})],hy=["component","errorComponent","pendingComponent","notFoundComponent"];function G1(a){var l;for(const r of hy)if((l=a.options[r])!=null&&l.preload)return!0;return!1}function sf(a,l){if(a==null)return{};if("~standard"in a){const r=a["~standard"].validate(l);if(r instanceof Promise)throw new Cf("Async validation not supported");if(r.issues)throw new Cf(JSON.stringify(r.issues,void 0,2));return r.value}return"parse"in a?a.parse(l):typeof a=="function"?a(l):{}}function q1(a){return new V1(a)}class V1{constructor(l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=r=>r(),this.update=r=>{var o;r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const u=this.options;this.options={...this.options,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(f=>[encodeURIComponent(f),f])):void 0,(!this.basepath||r.basepath&&r.basepath!==u.basepath)&&(r.basepath===void 0||r.basepath===""||r.basepath==="/"?this.basepath="/":this.basepath=`/${N1(r.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?h1({initialEntries:[this.basepath||"/"]}):d1()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Rf(Y1(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(f=>!["redirected"].includes(f.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((o=window.CSS)==null?void 0:o.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[r.id]=r);const o=d=>{d.forEach((h,v)=>{h.init({originalIndex:v,defaultSsr:this.options.defaultSsr});const m=this.routesById[h.id];if(Te(!m,`Duplicate routes found with id: ${String(h.id)}`),this.routesById[h.id]=h,!h.isRoot&&h.path){const y=ti(h.fullPath);(!this.routesByPath[y]||h.fullPath.endsWith("/"))&&(this.routesByPath[y]=h)}const g=h.children;g!=null&&g.length&&o(g)})};o([this.routeTree]);const u=[];Object.values(this.routesById).forEach((d,h)=>{var v;if(d.isRoot||!d.path)return;const m=qf(d.fullPath),g=fl(m);for(;g.length>1&&((v=g[0])==null?void 0:v.value)==="/";)g.shift();const y=g.map(S=>S.value==="/"?.75:S.type==="param"?.5:S.type==="wildcard"?.25:1);u.push({child:d,trimmed:m,parsed:g,index:h,scores:y})}),this.flatRoutes=u.sort((d,h)=>{const v=Math.min(d.scores.length,h.scores.length);for(let m=0;mh.parsed[m].value?1:-1;return d.index-h.index}).map((d,h)=>(d.child.rank=h,d.child))},this.subscribe=(r,o)=>{const u={eventType:r,fn:o};return this.subscribers.add(u),()=>{this.subscribers.delete(u)}},this.emit=r=>{this.subscribers.forEach(o=>{o.eventType===r.type&&o.fn(r)})},this.parseLocation=(r,o)=>{const u=({pathname:v,search:m,hash:g,state:y})=>{const S=this.options.parseSearch(m),E=this.options.stringifySearch(S);return{pathname:v,searchStr:E,search:ke(r==null?void 0:r.search,S),hash:g.split("#").reverse()[0]??"",href:`${v}${E}${g}`,state:ke(r==null?void 0:r.state,y)}},f=u(o??this.history.location),{__tempLocation:d,__tempKey:h}=f.state;if(d&&(!h||h===this.tempLocationKey)){const v=u(d);return v.state.key=f.state.key,delete v.state.__tempLocation,{...v,maskedLocation:f}}return f},this.resolvePathWithBase=(r,o)=>z1({basepath:this.basepath,base:r,to:Os(o),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(r,o)=>{let u={};const f=ti(r.pathname),d=g=>as(this.basepath,f,{to:g.fullPath,caseSensitive:g.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let h=(o==null?void 0:o.to)!==void 0?this.routesByPath[o.to]:void 0;h?u=d(h):h=this.flatRoutes.find(g=>{const y=d(g);return y?(u=y,!0):!1});let v=h||this.routesById[Ae];const m=[v];for(;v.parentRoute;)v=v.parentRoute,m.unshift(v);return{matchedRoutes:m,routeParams:u,foundRoute:h}},this.cancelMatch=r=>{const o=this.getMatch(r);o&&(o.abortController.abort(),clearTimeout(o.pendingTimeout))},this.cancelMatches=()=>{var r;(r=this.state.pendingMatches)==null||r.forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=r=>{const o=(f={},d)=>{var h,v,m,g,y,S;const E=f._fromLocation?this.matchRoutes(f._fromLocation,{_buildLocation:!0}):this.state.matches,_=f.from!=null?E.find(I=>as(this.basepath,ti(I.pathname),{to:f.from,caseSensitive:!1,fuzzy:!1})):void 0,x=(_==null?void 0:_.pathname)||this.latestLocation.pathname;Te(f.from==null||_!=null,"Could not find match for from: "+f.from);const C=(h=this.state.pendingMatches)!=null&&h.length?(v=Er(this.state.pendingMatches))==null?void 0:v.search:((m=Er(E))==null?void 0:m.search)||this.latestLocation.search,O=d==null?void 0:d.matchedRoutes.filter(I=>E.find(W=>W.routeId===I.id));let j;if(f.to)j=this.resolvePathWithBase(x,`${f.to}`);else{const I=this.routesById[(g=O==null?void 0:O.find(W=>{const rt=ns({path:W.fullPath,params:(d==null?void 0:d.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Pn([this.basepath,rt])===x}))==null?void 0:g.id];j=this.resolvePathWithBase(x,(I==null?void 0:I.to)??x)}const B={...(y=Er(E))==null?void 0:y.params};let H=(f.params??!0)===!0?B:{...B,...ts(f.params,B)};Object.keys(H).length>0&&(d==null||d.matchedRoutes.map(I=>{var W;return((W=I.options.params)==null?void 0:W.stringify)??I.options.stringifyParams}).filter(Boolean).forEach(I=>{H={...H,...I(H)}})),j=ns({path:j,params:H??{},leaveWildcards:!1,leaveParams:r.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let z=C;if(r._includeValidateSearch&&((S=this.options.search)!=null&&S.strict)){let I={};d==null||d.matchedRoutes.forEach(W=>{try{W.options.validateSearch&&(I={...I,...sf(W.options.validateSearch,{...I,...z})??{}})}catch{}}),z=I}z=(I=>{const W=(d==null?void 0:d.matchedRoutes.reduce((ut,q)=>{var at;const F=[];if("search"in q.options)(at=q.options.search)!=null&&at.middlewares&&F.push(...q.options.search.middlewares);else if(q.options.preSearchFilters||q.options.postSearchFilters){const $=({search:A,next:V})=>{let nt=A;"preSearchFilters"in q.options&&q.options.preSearchFilters&&(nt=q.options.preSearchFilters.reduce((et,ft)=>ft(et),A));const it=V(nt);return"postSearchFilters"in q.options&&q.options.postSearchFilters?q.options.postSearchFilters.reduce((et,ft)=>ft(et),it):it};F.push($)}if(r._includeValidateSearch&&q.options.validateSearch){const $=({search:A,next:V})=>{try{const nt=V(A);return{...nt,...sf(q.options.validateSearch,nt)??{}}}catch{}};F.push($)}return ut.concat(F)},[]))??[],rt=({search:ut})=>f.search?f.search===!0?ut:ts(f.search,ut):{};W.push(rt);const lt=(ut,q)=>{if(ut>=W.length)return q;const at=W[ut];return at({search:q,next:$=>lt(ut+1,$)})};return lt(0,I)})(z),z=ke(C,z);const J=this.options.stringifySearch(z),P=f.hash===!0?this.latestLocation.hash:f.hash?ts(f.hash,this.latestLocation.hash):void 0,G=P?`#${P}`:"";let tt=f.state===!0?this.latestLocation.state:f.state?ts(f.state,this.latestLocation.state):{};return tt=ke(this.latestLocation.state,tt),{pathname:j,search:z,searchStr:J,state:tt,hash:P??"",href:`${j}${J}${G}`,unmaskOnReload:f.unmaskOnReload}},u=(f={},d)=>{var h;const v=o(f);let m=d?o(d):void 0;if(!m){let S={};const E=(h=this.options.routeMasks)==null?void 0:h.find(_=>{const x=as(this.basepath,v.pathname,{to:_.from,caseSensitive:!1,fuzzy:!1});return x?(S=x,!0):!1});if(E){const{from:_,...x}=E;d={...hs(r,["from"]),...x,params:S},m=o(d)}}const g=this.getMatchedRoutes(v,f),y=o(f,g);if(m){const S=this.getMatchedRoutes(m,d),E=o(d,S);y.maskedLocation=E}return y};return r.mask?u(r,{...hs(r,["from"]),...r.mask}):u(r)},this.commitLocation=({viewTransition:r,ignoreBlocker:o,...u})=>{const f=()=>{u.state.key=this.latestLocation.state.key;const v=wr(u.state,this.latestLocation.state);return delete u.state.key,v},d=this.latestLocation.href===u.href,h=this.commitLocationPromise;if(this.commitLocationPromise=$i(()=>{h==null||h.resolve()}),d&&f())this.load();else{let{maskedLocation:v,hashScrollIntoView:m,...g}=u;v&&(g={...v,state:{...v.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[u.replace?"replace":"push"](g.href,g.state,{ignoreBlocker:o})}return this.resetNextScroll=u.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:o,hashScrollIntoView:u,viewTransition:f,ignoreBlocker:d,href:h,...v}={})=>{if(h){const g=this.history.location.state.__TSR_index,y=Rr(h,{__TSR_index:r?g:g+1});v.to=y.pathname,v.search=this.options.parseSearch(y.search),v.hash=y.hash.slice(1)}const m=this.buildLocation({...v,_includeValidateSearch:!0});return this.commitLocation({...m,viewTransition:f,replace:r,resetScroll:o,hashScrollIntoView:u,ignoreBlocker:d})},this.navigate=({to:r,reloadDocument:o,href:u,...f})=>{if(o){u||(u=this.buildLocation({to:r,...f}).href),f.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...f,href:u,to:r})},this.load=async r=>{this.latestLocation=this.parseLocation(this.latestLocation);let o,u,f;for(f=new Promise(d=>{this.startReactTransition(async()=>{var h;try{const v=this.latestLocation,m=this.state.resolvedLocation,g=m.href!==v.href,y=m.pathname!==v.pathname;this.cancelMatches();let S;lf(()=>{S=this.matchRoutes(v),this.__store.setState(E=>({...E,status:"pending",isLoading:!0,location:v,pendingMatches:S,cachedMatches:E.cachedMatches.filter(_=>!S.find(x=>x.id===_.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:m,toLocation:v,pathChanged:y,hrefChanged:g}),this.emit({type:"onBeforeLoad",fromLocation:m,toLocation:v,pathChanged:y,hrefChanged:g}),await this.loadMatches({sync:r==null?void 0:r.sync,matches:S,location:v,onReady:async()=>{this.startViewTransition(async()=>{let E,_,x;lf(()=>{this.__store.setState(C=>{const O=C.matches,j=C.pendingMatches||C.matches;return E=O.filter(B=>!j.find(H=>H.id===B.id)),_=j.filter(B=>!O.find(H=>H.id===B.id)),x=O.filter(B=>j.find(H=>H.id===B.id)),{...C,isLoading:!1,loadedAt:Date.now(),matches:j,pendingMatches:void 0,cachedMatches:[...C.cachedMatches,...E.filter(B=>B.status!=="error")]}}),this.clearExpiredCache()}),[[E,"onLeave"],[_,"onEnter"],[x,"onStay"]].forEach(([C,O])=>{C.forEach(j=>{var B,H;(H=(B=this.looseRoutesById[j.routeId].options)[O])==null||H.call(B,j)})})})}})}catch(v){of(v)?(o=v,this.isServer||this.navigate({...o,replace:!0,ignoreBlocker:!0})):tn(v)&&(u=v),this.__store.setState(m=>({...m,statusCode:o?o.statusCode:u?404:m.matches.some(g=>g.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===f&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=f,await f;this.latestLoadPromise&&f!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=r=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let u;typeof o=="object"&&this.isViewTransitionTypesSupported?u={update:r,types:o.types}:u=r,document.startViewTransition(u)}else r()},this.updateMatch=(r,o)=>{var u;let f;const d=(u=this.state.pendingMatches)==null?void 0:u.find(g=>g.id===r),h=this.state.matches.find(g=>g.id===r),v=this.state.cachedMatches.find(g=>g.id===r),m=d?"pendingMatches":h?"matches":v?"cachedMatches":"";return m&&this.__store.setState(g=>{var y;return{...g,[m]:(y=g[m])==null?void 0:y.map(S=>S.id===r?f=o(S):S)}}),f},this.getMatch=r=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(o=>o.id===r),this.loadMatches=async({location:r,matches:o,preload:u,onReady:f,updateMatch:d=this.updateMatch,sync:h})=>{let v,m=!1;const g=async()=>{m||(m=!0,await(f==null?void 0:f()))},y=E=>!!(u&&!this.state.matches.find(_=>_.id===E));!this.isServer&&!this.state.matches.length&&g();const S=(E,_)=>{var x,C,O;if(of(_)&&!_.reloadDocument)throw _;if(Wa(_)||tn(_)){if(d(E.id,j=>({...j,status:Wa(_)?"redirected":tn(_)?"notFound":"error",isFetching:!1,error:_,beforeLoadPromise:void 0,loaderPromise:void 0})),_.routeId||(_.routeId=E.routeId),(x=E.beforeLoadPromise)==null||x.resolve(),(C=E.loaderPromise)==null||C.resolve(),(O=E.loadPromise)==null||O.resolve(),Wa(_))throw m=!0,_=this.resolveRedirect({..._,_fromLocation:r}),_;if(tn(_))throw this._handleNotFound(o,_,{updateMatch:d}),_}};try{await new Promise((E,_)=>{(async()=>{var x,C,O;try{const j=(z,Q,J)=>{var P,G;const{id:tt,routeId:I}=o[z],W=this.looseRoutesById[I];if(Q instanceof Promise)throw Q;Q.routerCode=J,v=v??z,S(this.getMatch(tt),Q);try{(G=(P=W.options).onError)==null||G.call(P,Q)}catch(rt){Q=rt,S(this.getMatch(tt),Q)}d(tt,rt=>{var lt,ut;return(lt=rt.beforeLoadPromise)==null||lt.resolve(),(ut=rt.loadPromise)==null||ut.resolve(),{...rt,error:Q,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[z,{id:Q,routeId:J}]of o.entries()){const P=this.getMatch(Q),G=(x=o[z-1])==null?void 0:x.id,tt=this.looseRoutesById[J],I=tt.options.pendingMs??this.options.defaultPendingMs,W=!!(f&&!this.isServer&&!y(Q)&&(tt.options.loader||tt.options.beforeLoad)&&typeof I=="number"&&I!==1/0&&(tt.options.pendingComponent??this.options.defaultPendingComponent));let rt=!0;if((P.beforeLoadPromise||P.loaderPromise)&&(W&&setTimeout(()=>{try{g()}catch{}},I),await P.beforeLoadPromise,rt=this.getMatch(Q).status!=="success"),rt){try{d(Q,ot=>({...ot,loadPromise:$i(()=>{var Mt;(Mt=ot.loadPromise)==null||Mt.resolve()}),beforeLoadPromise:$i()}));const lt=new AbortController;let ut;W&&(ut=setTimeout(()=>{try{g()}catch{}},I));const{paramsError:q,searchError:at}=this.getMatch(Q);q&&j(z,q,"PARSE_PARAMS"),at&&j(z,at,"VALIDATE_SEARCH");const F=()=>G?this.getMatch(G).context:this.options.context??{};d(Q,ot=>({...ot,isFetching:"beforeLoad",fetchCount:ot.fetchCount+1,abortController:lt,pendingTimeout:ut,context:{...F(),...ot.__routeContext}}));const{search:$,params:A,context:V,cause:nt}=this.getMatch(Q),it=y(Q),et={search:$,abortController:lt,params:A,preload:it,context:V,location:r,navigate:ot=>this.navigate({...ot,_fromLocation:r}),buildLocation:this.buildLocation,cause:it?"preload":nt,matches:o};let ft=await((O=(C=tt.options).beforeLoad)==null?void 0:O.call(C,et))??{};this.serializeLoaderData&&(ft=this.serializeLoaderData("__beforeLoadContext",ft,{router:this,match:this.getMatch(Q)})),(Wa(ft)||tn(ft))&&j(z,ft,"BEFORE_LOAD"),d(Q,ot=>({...ot,__beforeLoadContext:ft,context:{...F(),...ot.__routeContext,...ft},abortController:lt}))}catch(lt){j(z,lt,"BEFORE_LOAD")}d(Q,lt=>{var ut;return(ut=lt.beforeLoadPromise)==null||ut.resolve(),{...lt,beforeLoadPromise:void 0,isFetching:!1}})}}const B=o.slice(0,v),H=[];B.forEach(({id:z,routeId:Q},J)=>{H.push((async()=>{const{loaderPromise:P}=this.getMatch(z);let G=!1,tt=!1;if(P){await P;const I=this.getMatch(z);I.error&&S(I,I.error)}else{const I=H[J-1],W=this.looseRoutesById[Q],rt=()=>{const{params:nt,loaderDeps:it,abortController:et,context:ft,cause:ot}=this.getMatch(z),Mt=y(z);return{params:nt,deps:it,preload:!!Mt,parentMatchPromise:I,abortController:et,context:ft,location:r,navigate:pt=>this.navigate({...pt,_fromLocation:r}),cause:Mt?"preload":ot,route:W}},lt=Date.now()-this.getMatch(z).updatedAt,ut=y(z),q=ut?W.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:W.options.staleTime??this.options.defaultStaleTime??0,at=W.options.shouldReload,F=typeof at=="function"?at(rt()):at;d(z,nt=>({...nt,loaderPromise:$i(),preload:!!ut&&!this.state.matches.find(it=>it.id===z)}));const $=async()=>{var nt,it,et,ft,ot,Mt,pt,Et;try{const wt=async()=>{const Dt=this.getMatch(z);Dt.minPendingPromise&&await Dt.minPendingPromise};try{this.loadRouteChunk(W),d(z,En=>({...En,isFetching:"loader"}));let Dt=await((it=(nt=W.options).loader)==null?void 0:it.call(nt,rt()));this.serializeLoaderData&&(Dt=this.serializeLoaderData("loaderData",Dt,{router:this,match:this.getMatch(z)})),S(this.getMatch(z),Dt),await W._lazyPromise,await wt();const Jt=(ft=(et=W.options).head)==null?void 0:ft.call(et,{matches:o,match:this.getMatch(z),params:this.getMatch(z).params,loaderData:Dt}),kt=Jt==null?void 0:Jt.meta,xn=Jt==null?void 0:Jt.links,Qn=Jt==null?void 0:Jt.scripts,on=(Mt=(ot=W.options).headers)==null?void 0:Mt.call(ot,{loaderData:Dt});d(z,En=>({...En,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:Dt,meta:kt,links:xn,scripts:Qn,headers:on}))}catch(Dt){let Jt=Dt;await wt(),S(this.getMatch(z),Dt);try{(Et=(pt=W.options).onError)==null||Et.call(pt,Dt)}catch(kt){Jt=kt,S(this.getMatch(z),kt)}d(z,kt=>({...kt,error:Jt,status:"error",isFetching:!1}))}await W._componentsPromise}catch(wt){d(z,Dt=>({...Dt,loaderPromise:void 0})),S(this.getMatch(z),wt)}},{status:A,invalid:V}=this.getMatch(z);G=A==="success"&&(V||(F??lt>q)),ut&&W.options.preload===!1||(G&&!h?(tt=!0,(async()=>{try{await $();const{loaderPromise:nt,loadPromise:it}=this.getMatch(z);nt==null||nt.resolve(),it==null||it.resolve(),d(z,et=>({...et,loaderPromise:void 0}))}catch(nt){of(nt)&&await this.navigate(nt)}})()):(A!=="success"||G&&h)&&await $())}if(!tt){const{loaderPromise:I,loadPromise:W}=this.getMatch(z);I==null||I.resolve(),W==null||W.resolve()}return d(z,I=>({...I,isFetching:tt?I.isFetching:!1,loaderPromise:tt?I.loaderPromise:void 0,invalid:!1})),this.getMatch(z)})())}),await Promise.all(H),E()}catch(j){_(j)}})()}),await g()}catch(E){if(Wa(E)||tn(E))throw tn(E)&&!u&&await g(),E}return o},this.invalidate=r=>{const o=u=>{var f;return((f=r==null?void 0:r.filter)==null?void 0:f.call(r,u))??!0?{...u,invalid:!0,...u.status==="error"?{status:"pending",error:void 0}:{}}:u};return this.__store.setState(u=>{var f;return{...u,matches:u.matches.map(o),cachedMatches:u.cachedMatches.map(o),pendingMatches:(f=u.pendingMatches)==null?void 0:f.map(o)}}),this.load({sync:r==null?void 0:r.sync})},this.resolveRedirect=r=>{const o=r;return o.href||(o.href=this.buildLocation(o).href),o},this.clearCache=r=>{const o=r==null?void 0:r.filter;o!==void 0?this.__store.setState(u=>({...u,cachedMatches:u.cachedMatches.filter(f=>!o(f))})):this.__store.setState(u=>({...u,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=o=>{const u=this.looseRoutesById[o.routeId];if(!u.options.loader)return!0;const f=(o.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(o.status!=="error"&&Date.now()-o.updatedAt(r._lazyPromise===void 0&&(r.lazyFn?r._lazyPromise=r.lazyFn().then(o=>{const{id:u,...f}=o.options;Object.assign(r.options,f)}):r._lazyPromise=Promise.resolve()),r._componentsPromise===void 0&&(r._componentsPromise=r._lazyPromise.then(()=>Promise.all(hy.map(async o=>{const u=r.options[o];u!=null&&u.preload&&await u.preload()})))),r._componentsPromise),this.preloadRoute=async r=>{const o=this.buildLocation(r);let u=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:r});const f=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(h=>h.id)),d=new Set([...f,...this.state.cachedMatches.map(h=>h.id)]);lf(()=>{u.forEach(h=>{d.has(h.id)||this.__store.setState(v=>({...v,cachedMatches:[...v.cachedMatches,h]}))})});try{return u=await this.loadMatches({matches:u,location:o,preload:!0,updateMatch:(h,v)=>{f.has(h)?u=u.map(m=>m.id===h?v(m):m):this.updateMatch(h,v)}}),u}catch(h){if(Wa(h))return h.reloadDocument?void 0:await this.preloadRoute({...h,_fromLocation:o});console.error(h);return}},this.matchRoute=(r,o)=>{const u={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},f=this.buildLocation(u);if(o!=null&&o.pending&&this.state.status!=="pending")return!1;const h=((o==null?void 0:o.pending)===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation,v=as(this.basepath,h.pathname,{...o,to:f.pathname});return!v||r.params&&!wr(v,r.params,{partial:!0})?!1:v&&((o==null?void 0:o.includeSearch)??!0)?wr(h.search,f.search,{partial:!0})?v:!1:v},this.dehydrate=()=>{var r;const o=((r=this.options.errorSerializer)==null?void 0:r.serialize)??k1;return{state:{dehydratedMatches:this.state.matches.map(u=>({...hs(u,["id","status","updatedAt"]),error:u.error?{data:o(u.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var r,o,u;let f;typeof document<"u"&&(f=this.options.transformer.parse((r=window.__TSR__)==null?void 0:r.dehydrated)),Te(f),this.dehydratedData=f.payload,(u=(o=this.options).hydrate)==null||u.call(o,f.payload);const d=f.router.state,h=this.matchRoutes(this.state.location).map(v=>{const m=d.dehydratedMatches.find(g=>g.id===v.id);return Te(m,`Could not find a client-side match for dehydrated match with id: ${v.id}!`),{...v,...m}});this.__store.setState(v=>({...v,matches:h})),this.manifest=f.router.manifest},this.injectedHtml=[],this.injectHtml=r=>{const o=()=>(this.injectedHtml=this.injectedHtml.filter(u=>u!==o),r);this.injectedHtml.push(o)},this.injectScript=(r,o)=>{this.injectHtml(` + `; +}; + +async function resolveSpec( + spec?: OpenAPIV3_1.Document | OpenAPIV3.Document | string, +): Promise { + if (!spec) { + return undefined; + } + if (typeof spec !== "string") { + return spec; + } + + try { + // Handle URLs + if (spec.startsWith("http://") || spec.startsWith("https://")) { + const response = await fetch(spec); + return await response.json() as OpenAPIV3_1.Document | OpenAPIV3.Document; + } + + throw new Error("Invalid spec path or URL"); + } catch (error) { + console.error("Error loading API spec:", error); + return undefined; + } +} diff --git a/playground/dist/index.css b/playground/dist/index.css index 8704dc1a3..54e824177 100644 --- a/playground/dist/index.css +++ b/playground/dist/index.css @@ -1 +1 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--flame-50: 9 100% 96%;--flame-100: 11 100% 92%;--flame-200: 11 100% 84%;--flame-300: 10 100% 77%;--flame-400: 11 100% 69%;--flame-500: 11 100% 60%;--flame-600: 10 78% 51%;--flame-700: 10 80% 37%;--flame-800: 10 81% 28%;--flame-900: 11 83% 19%;--flame-950: 10 84% 10%;--neutral-white: 0 0% 100%;--neutral-50: 0 11% 96%;--neutral-100: 30 4% 91%;--neutral-200: 45 6% 87%;--neutral-300: 40 6% 79%;--neutral-400: 48 3% 68%;--neutral-500: 45 2% 47%;--neutral-600: 40 2% 34%;--neutral-700: 40 3% 22%;--neutral-800: 40 4% 15%;--neutral-900: 40 6% 10%;--neutral-950: 40 11% 5%;--shell-50: 45 20% 96%;--shell-100: 44 20% 92%;--shell-200: 45 23% 86%;--shell-300: 45 25% 78%;--shell-400: 45 15% 67%;--shell-500: 45 15% 67%;--shell-600: 45 13% 50%;--shell-700: 45 14% 38%;--shell-800: 46 16% 31%;--shell-900: 44 17% 21%;--shell-950: 46 16% 14%;--info-50: 200 33% 95%;--info-100: 202 39% 90%;--info-200: 202 43% 84%;--info-300: 202 45% 76%;--info-400: 201 50% 68%;--info-500: 201 51% 57%;--info-600: 201 60% 46%;--info-700: 202 63% 38%;--info-800: 202 76% 29%;--info-900: 201 77% 23%;--info-950: 202 81% 13%;--success-50: 78 38% 95%;--success-100: 81 40% 90%;--success-200: 81 40% 83%;--success-300: 82 42% 72%;--success-400: 82 40% 61%;--success-500: 82 50% 42%;--success-600: 82 62% 35%;--success-700: 83 60% 22%;--success-800: 83 80% 20%;--success-900: 82 90% 16%;--success-950: 82 90% 12%;--danger-50: 0 100% 97%;--danger-100: 358 85% 92%;--danger-200: 359 83% 86%;--danger-300: 359 74% 78%;--danger-400: 358 60% 71%;--danger-500: 358 65% 65%;--danger-600: 358 72% 56%;--danger-700: 357 74% 44%;--danger-800: 358 87% 31%;--danger-900: 358 84% 22%;--danger-950: 358 91% 14%;--warning-50: 33 53% 97%;--warning-100: 38 67% 91%;--warning-200: 38 82% 83%;--warning-300: 37 80% 75%;--warning-400: 38 76% 68%;--warning-500: 38 72% 58%;--warning-600: 38 75% 45%;--warning-700: 38 92% 35%;--warning-800: 38 93% 26%;--warning-900: 38 100% 21%;--warning-950: 38 88% 16%;--mint-500: 160 48% 62%;--mint-600: 160 60% 55%;--purple-500: 273 77% 74%;--purple-600: 273 67% 68%;--pink-500: 335 77% 74%;--pink-600: 335 67% 67%;--fg-default: var(--neutral-950);--fg-muted: var(--neutral-900);--fg-subtle: var(--neutral-400);--fg-brand: var(--flame-600);--fg-info: var(--info-600);--fg-success: var(--success-600);--fg-danger: var(--danger-600);--fg-warning: var(--warning-600);--fg-on-primary: var(--neutral-white);--fg-accent-1: var(--mint-600);--fg-accent-2: var(--purple-600);--fg-accent-3: var(--pink-600);--bg-background: var(--shell-50);--bg-primary: var(--neutral-900);--bg-secondary: var(--shell-700);--bg-brand: var(--flame-500);--bg-emphasis: var(--shell-100);--bg-info: var(--info-500);--bg-success: var(--success-500);--bg-danger: var(--danger-500);--bg-warning: var(--warning-500);--bg-destructive: var(--danger-800);--bg-popover: var(--neutral-white);--bg-input: var(--neutral-white);--border-default: var(--neutral-200);--border-primary: var(--neutral-800);--border-secondary: var(--shell-700);--border-accent-on-primary: var(--flame-500);--border-brand: var(--flame-500);--fg-default-dark: var(--neutral-50);--fg-muted-dark: var(--neutral-300);--fg-subtle-dark: var(--neutral-500);--fg-brand-dark: var(--flame-500);--fg-info-dark: var(--info-500);--fg-success-dark: var(--success-500);--fg-danger-dark: var(--danger-500);--fg-warning-dark: var(--warning-500);--fg-on-primary-dark: var(--neutral-white);--fg-accent-1-dark: var(--mint-500);--fg-accent-2-dark: var(--purple-500);--fg-accent-3-dark: var(--pink-500);--bg-background-dark: var(--neutral-900);--bg-primary-dark: var(--flame-600);--bg-secondary-dark: var(--neutral-700);--bg-brand-dark: var(--flame-500);--bg-emphasis-dark: var(--neutral-600);--bg-destructive-dark: var(--danger-500);--bg-popover-dark: var(--neutral-950);--bg-input-dark: var(--neutral-800);--border-default-dark: var(--neutral-700);--border-primary-dark: var(--flame-600);--border-secondary-dark: var(--neutral-700);--border-accent-on-primary-dark: var(--flame-500);--border-brand-dark: var(--flame-500);--font-family-title: "Instrument Sans";--font-family-body: "Geist";--font-family-body-mono: "Geist Mono";--font-weight-light: "Light";--font-weight-regular: "Regular";--font-weight-medium: "Medium";--font-size-xs-desktop: 12px;--font-size-sm-desktop: 14px;--font-size-md-desktop: 16px;--font-size-lg-desktop: 20px;--font-size-xl-desktop: 24px;--font-size-2xl-desktop: 28px;--font-size-xs-mobile: 10px;--font-size-sm-mobile: 12px;--font-size-md-mobile: 14px;--font-size-lg-mobile: 16px;--font-size-xl-mobile: 20px;--font-size-2xl-mobile: 24px;--line-height-xs-desktop: 16px;--line-height-sm-desktop: 20px;--line-height-md-desktop: 24px;--line-height-lg-desktop: 28px;--line-height-xl-desktop: 32px;--line-height-2xl-desktop: 40px;--line-height-xs-mobile: 12px;--line-height-sm-mobile: 16px;--line-height-md-mobile: 20px;--line-height-lg-mobile: 24px;--line-height-xl-mobile: 28px;--line-height-2xl-mobile: 32px}:root{--background: var(--bg-background);--foreground: var(--fg-default);--card: var(--bg-popover);--card-foreground: var(--fg-default);--popover: var(--bg-popover);--popover-foreground: var(--fg-default);--primary: var(--bg-brand);--primary-foreground: var(--fg-on-primary);--secondary: var(--bg-secondary);--secondary-foreground: var(--fg-default);--muted: var(--bg-emphasis);--muted-foreground: var(--fg-subtle);--accent: var(--bg-brand);--accent-foreground: var(--fg-default);--destructive: var(--bg-destructive);--destructive-foreground: var(--fg-on-primary);--border: var(--border-default);--input: var(--bg-input);--ring: var(--fg-info);--radius: .5rem}.dark{--background: var(--bg-background-dark);--foreground: var(--fg-default-dark);--card: var(--bg-popover);--card-foreground: var(--fg-default-dark);--popover: var(--bg-popover-dark);--popover-foreground: var(--fg-default-dark);--primary: var(--bg-brand-dark);--primary-foreground: var(--fg-on-primary-dark);--secondary: var(--bg-secondary-dark);--secondary-foreground: var(--fg-default-dark);--muted: var(--bg-emphasis-dark);--muted-foreground: var(--fg-subtle-dark);--accent: var(--bg-brand-dark);--accent-foreground: var(--fg-default-dark);--destructive: var(--bg-destructive-dark);--destructive-foreground: var(--fg-on-primary-dark);--border: var(--border-default-dark);--input: var(--bg-input-dark);--ring: var(--fg-info-dark)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.left-2{left:.5rem}.right-3{right:.75rem}.top-2\.5{top:.625rem}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:.5rem}.mb-6{margin-bottom:1.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-2{width:.5rem}.w-24{width:6rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.flex-1{flex:1 1 0%}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-border{border-color:hsl(var(--border))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.p-1{padding:.25rem}.p-4{padding:1rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.text-left{text-align:left}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tracking-widest{letter-spacing:.1em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-100{opacity:1}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 768px){.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.lg\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0} +.cm-theme .cm-focused{outline:none}.cm-editor{overflow-x:auto;white-space:pre;width:100%;max-width:900px}.fpx-requestor-grid-rows{grid-template-rows:auto minmax(0,1fr)}@keyframes fpxpulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.08);opacity:.7}}.fpx-pulse{animation:fpxpulse .85s infinite}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--flame-50: 9 100% 96%;--flame-100: 11 100% 92%;--flame-200: 11 100% 84%;--flame-300: 10 100% 77%;--flame-400: 11 100% 69%;--flame-500: 11 100% 60%;--flame-600: 10 78% 51%;--flame-700: 10 80% 37%;--flame-800: 10 81% 28%;--flame-900: 11 83% 19%;--flame-950: 10 84% 10%;--neutral-white: 0 0% 100%;--neutral-50: 0 11% 96%;--neutral-100: 30 4% 91%;--neutral-200: 45 6% 87%;--neutral-300: 40 6% 79%;--neutral-400: 48 3% 68%;--neutral-500: 45 2% 47%;--neutral-600: 40 2% 34%;--neutral-700: 40 3% 22%;--neutral-800: 40 4% 15%;--neutral-900: 40 6% 10%;--neutral-950: 40 11% 5%;--shell-50: 45 20% 96%;--shell-100: 44 20% 92%;--shell-200: 45 23% 86%;--shell-300: 45 25% 78%;--shell-400: 45 15% 67%;--shell-500: 45 15% 67%;--shell-600: 45 13% 50%;--shell-700: 45 14% 38%;--shell-800: 46 16% 31%;--shell-900: 44 17% 21%;--shell-950: 46 16% 14%;--info-50: 200 33% 95%;--info-100: 202 39% 90%;--info-200: 202 43% 84%;--info-300: 202 45% 76%;--info-400: 201 50% 68%;--info-500: 201 51% 57%;--info-600: 201 60% 46%;--info-700: 202 63% 38%;--info-800: 202 76% 29%;--info-900: 201 77% 23%;--info-950: 202 81% 13%;--success-50: 78 38% 95%;--success-100: 81 40% 90%;--success-200: 81 40% 83%;--success-300: 82 42% 72%;--success-400: 82 40% 61%;--success-500: 82 50% 42%;--success-600: 82 62% 35%;--success-700: 83 60% 22%;--success-800: 83 80% 20%;--success-900: 82 90% 16%;--success-950: 82 90% 12%;--danger-50: 0 100% 97%;--danger-100: 358 85% 92%;--danger-200: 359 83% 86%;--danger-300: 359 74% 78%;--danger-400: 358 60% 71%;--danger-500: 358 65% 65%;--danger-600: 358 72% 56%;--danger-700: 357 74% 44%;--danger-800: 358 87% 31%;--danger-900: 358 84% 22%;--danger-950: 358 91% 14%;--warning-50: 33 53% 97%;--warning-100: 38 67% 91%;--warning-200: 38 82% 83%;--warning-300: 37 80% 75%;--warning-400: 38 76% 68%;--warning-500: 38 72% 58%;--warning-600: 38 75% 45%;--warning-700: 38 92% 35%;--warning-800: 38 93% 26%;--warning-900: 38 100% 21%;--warning-950: 38 88% 16%;--mint-500: 160 48% 62%;--mint-600: 160 60% 55%;--purple-500: 273 77% 74%;--purple-600: 273 67% 68%;--pink-500: 335 77% 74%;--pink-600: 335 67% 67%;--fg-default: var(--neutral-950);--fg-muted: var(--neutral-900);--fg-subtle: var(--neutral-400);--fg-brand: var(--flame-600);--fg-info: var(--info-600);--fg-success: var(--success-600);--fg-danger: var(--danger-600);--fg-warning: var(--warning-600);--fg-on-primary: var(--neutral-white);--fg-accent-1: var(--mint-600);--fg-accent-2: var(--purple-600);--fg-accent-3: var(--pink-600);--bg-background: var(--shell-50);--bg-primary: var(--neutral-900);--bg-secondary: var(--shell-700);--bg-brand: var(--flame-500);--bg-emphasis: var(--shell-100);--bg-info: var(--info-500);--bg-success: var(--success-500);--bg-danger: var(--danger-500);--bg-warning: var(--warning-500);--bg-destructive: var(--danger-800);--bg-popover: var(--neutral-white);--bg-input: var(--neutral-white);--border-default: var(--neutral-200);--border-primary: var(--neutral-800);--border-secondary: var(--shell-700);--border-accent-on-primary: var(--flame-500);--border-brand: var(--flame-500);--fg-default-dark: var(--neutral-50);--fg-muted-dark: var(--neutral-300);--fg-subtle-dark: var(--neutral-500);--fg-brand-dark: var(--flame-500);--fg-info-dark: var(--info-500);--fg-success-dark: var(--success-500);--fg-danger-dark: var(--danger-500);--fg-warning-dark: var(--warning-500);--fg-on-primary-dark: var(--neutral-white);--fg-accent-1-dark: var(--mint-500);--fg-accent-2-dark: var(--purple-500);--fg-accent-3-dark: var(--pink-500);--bg-background-dark: var(--neutral-900);--bg-primary-dark: var(--flame-600);--bg-secondary-dark: var(--neutral-700);--bg-brand-dark: var(--flame-500);--bg-emphasis-dark: var(--neutral-600);--bg-destructive-dark: var(--danger-500);--bg-popover-dark: var(--neutral-950);--bg-input-dark: var(--neutral-800);--border-default-dark: var(--neutral-700);--border-primary-dark: var(--flame-600);--border-secondary-dark: var(--neutral-700);--border-accent-on-primary-dark: var(--flame-500);--border-brand-dark: var(--flame-500);--font-family-title: "Instrument Sans";--font-family-body: "Geist";--font-family-body-mono: "Geist Mono";--font-weight-light: "Light";--font-weight-regular: "Regular";--font-weight-medium: "Medium";--font-size-xs-desktop: 12px;--font-size-sm-desktop: 14px;--font-size-md-desktop: 16px;--font-size-lg-desktop: 20px;--font-size-xl-desktop: 24px;--font-size-2xl-desktop: 28px;--font-size-xs-mobile: 10px;--font-size-sm-mobile: 12px;--font-size-md-mobile: 14px;--font-size-lg-mobile: 16px;--font-size-xl-mobile: 20px;--font-size-2xl-mobile: 24px;--line-height-xs-desktop: 16px;--line-height-sm-desktop: 20px;--line-height-md-desktop: 24px;--line-height-lg-desktop: 28px;--line-height-xl-desktop: 32px;--line-height-2xl-desktop: 40px;--line-height-xs-mobile: 12px;--line-height-sm-mobile: 16px;--line-height-md-mobile: 20px;--line-height-lg-mobile: 24px;--line-height-xl-mobile: 28px;--line-height-2xl-mobile: 32px}:root{--background: var(--bg-background);--foreground: var(--fg-default);--card: var(--bg-background);--card-foreground: var(--fg-default);--popover: var(--bg-popover);--popover-foreground: var(--fg-default);--primary: var(--bg-brand);--primary-foreground: var(--fg-on-primary);--secondary: var(--bg-emphasis);--secondary-foreground: var(--fg-default);--muted: var(--bg-emphasis);--muted-foreground: var(--fg-subtle);--accent: var(--bg-brand);--accent-foreground: var(--fg-default);--destructive: var(--bg-destructive);--destructive-foreground: var(--fg-on-primary);--border: var(--border-default);--input: var(--bg-input);--ring: var(--fg-info);--radius: .5rem;--fp-method-get: var(--fg-info);--fp-method-post: var(--fg-success);--fp-method-put: var(--fg-warning);--fp-method-delete: var(--fg-danger);--fp-method-patch: var(--fg-warning);--fp-method-head: var(--fg-info);--fp-method-options: var(--fg-info);--fp-method-trace: var(--fg-info);--fp-method-get-bg: var(--bg-info);--fp-method-post-bg: var(--bg-success);--fp-method-put-bg: var(--bg-warning);--fp-method-delete-bg: var(--bg-danger);--fp-method-patch-bg: var(--bg-warning);--fp-method-head-bg: var(--bg-info);--fp-method-options-bg: var(--bg-info);--fp-method-trace-bg: var(--bg-info)}.dark{--background: var(--bg-background-dark);--foreground: var(--fg-default-dark);--card: var(--bg-popover);--card-foreground: var(--fg-default-dark);--popover: var(--bg-popover-dark);--popover-foreground: var(--fg-default-dark);--primary: var(--bg-brand-dark);--primary-foreground: var(--fg-on-primary-dark);--secondary: var(--bg-emphasis-dark);--secondary-foreground: var(--fg-default-dark);--muted: var(--bg-emphasis-dark);--muted-foreground: var(--fg-subtle-dark);--accent: var(--bg-brand-dark);--accent-foreground: var(--fg-default-dark);--destructive: var(--bg-destructive-dark);--destructive-foreground: var(--fg-on-primary-dark);--border: var(--border-default-dark);--input: var(--bg-input-dark);--ring: var(--fg-info-dark);--fp-method-get: var(--fg-info-dark);--fp-method-post: var(--fg-success-dark);--fp-method-put: var(--fg-warning-dark);--fp-method-delete: var(--fg-danger-dark);--fp-method-patch: var(--fg-warning-dark);--fp-method-head: var(--fg-info-dark);--fp-method-options: var(--fg-info-dark);--fp-method-trace: var(--fg-info-dark);--fp-method-get-bg: var(--bg-info-dark);--fp-method-post-bg: var(--bg-success-dark);--fp-method-put-bg: var(--bg-warning-dark);--fp-method-delete-bg: var(--bg-danger-dark);--fp-method-patch-bg: var(--bg-warning-dark);--fp-method-head-bg: var(--bg-info-dark);--fp-method-options-bg: var(--bg-info-dark);--fp-method-trace-bg: var(--bg-info-dark)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[calc\(100\%-0\.6rem\)\]{height:calc(100% - .6rem)}.h-\[calc\(100vh-40px\)\]{height:calc(100vh - 40px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[120px\]{width:120px}.w-\[140px\]{width:140px}.w-\[200px\]{width:200px}.w-\[375px\]{width:375px}.w-\[calc\(100\%-140px\)\]{width:calc(100% - 140px)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-12{min-width:3rem}.min-w-4{min-width:1rem}.min-w-5{min-width:1.25rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[140px\]{min-width:140px}.min-w-\[200px\]{min-width:200px}.min-w-\[8rem\]{min-width:8rem}.max-w-\[500px\]{max-width:500px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-screen-sm{max-width:640px}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-gray-500\/50{border-color:#6b728080}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-green-800{--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-orange-800{--tw-border-opacity: 1;border-color:rgb(154 52 18 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-red-800{--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-black\/40{background-color:#0006}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity, 1))}.bg-input{background-color:hsl(var(--input))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground\/20{background-color:hsl(var(--muted-foreground) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-300{--tw-bg-opacity: 1;background-color:rgb(253 186 116 / var(--tw-bg-opacity, 1))}.bg-orange-500\/10{background-color:#f973161a}.bg-orange-800{--tw-bg-opacity: 1;background-color:rgb(154 52 18 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-red-500\/10{background-color:#ef44441a}.bg-red-800{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-30{--tw-bg-opacity: .3}.bg-none{background-image:none}.fill-current{fill:currentColor}.stroke-1{stroke-width:1}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-2{padding-left:.5rem}.pl-24{padding-left:6rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-6{padding-right:1.5rem}.pt-0\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-fp-method-delete{color:hsl(var(--fp-method-delete))}.text-fp-method-get{color:hsl(var(--fp-method-get))}.text-fp-method-head{color:hsl(var(--fp-method-head))}.text-fp-method-options{color:hsl(var(--fp-method-options))}.text-fp-method-patch{color:hsl(var(--fp-method-patch))}.text-fp-method-post{color:hsl(var(--fp-method-post))}.text-fp-method-put{color:hsl(var(--fp-method-put))}.text-fp-method-trace{color:hsl(var(--fp-method-trace))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-75{transition-duration:75ms}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.duration-75{animation-duration:75ms}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.focus-within\:overflow-visible:focus-within{overflow:visible}.focus-within\:text-clip:focus-within{text-overflow:clip}.focus-within\:whitespace-normal:focus-within{white-space:normal}.focus-within\:border-neutral-400\/50:focus-within{border-color:#a3a3a380}.focus-within\:border-primary:focus-within{border-color:hsl(var(--primary))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:pl-2:focus{padding-left:.5rem}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-opacity-25:focus{--tw-ring-opacity: .25}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:pointer-events-auto:disabled{pointer-events:auto}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:focus~.peer-focus\:hidden{display:none}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[state\=active\]\:h-full[data-state=active]{height:100%}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[state\=active\]\:rounded-none[data-state=active]{border-radius:0}.data-\[state\=active\]\:border-primary[data-state=active]{border-color:hsl(var(--primary))}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[selected\=true\]\:bg-secondary[data-selected=true]{background-color:hsl(var(--secondary))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=active\]\:bg-inherit[data-state=active]{background-color:inherit}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-transparent[data-state=open]{background-color:transparent}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:font-medium[data-state=active]{font-weight:500}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=active\]\:shadow-none[data-state=active]{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 640px){.sm\:static{position:static}.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:h-auto{height:auto}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:border{border-width:1px}.sm\:pb-20{padding-bottom:5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:inline{display:inline}.md\:hidden{display:none}.md\:max-w-\[1100px\]{max-width:1100px}.md\:max-w-\[420px\]{max-width:420px}.md\:gap-8{gap:2rem}.md\:overflow-y-auto{overflow-y:auto}.md\:px-2\.5{padding-left:.625rem;padding-right:.625rem}.md\:pb-32{padding-bottom:8rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:h-full{height:100%}.lg\:min-w-\[200px\]{min-width:200px}.lg\:max-w-\[1060px\]{max-width:1060px}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.lg\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>path\]\:text-muted>path{color:hsl(var(--muted))}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/playground/dist/index.js b/playground/dist/index.js index 99e0f6656..b5df64933 100644 --- a/playground/dist/index.js +++ b/playground/dist/index.js @@ -1,4 +1,4 @@ -var Kp=a=>{throw TypeError(a)};var Zc=(a,l,r)=>l.has(a)||Kp("Cannot "+r);var X=(a,l,r)=>(Zc(a,l,"read from private field"),r?r.call(a):l.get(a)),Ot=(a,l,r)=>l.has(a)?Kp("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(a):l.set(a,r),gt=(a,l,r,o)=>(Zc(a,l,"write to private field"),o?o.call(a,r):l.set(a,r),r),oe=(a,l,r)=>(Zc(a,l,"access private method"),r);var Jo=(a,l,r,o)=>({set _(u){gt(a,l,u,r)},get _(){return X(a,l,o)}});function BS(a,l){for(var r=0;ro[u]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(u){if(u.ep)return;u.ep=!0;const f=r(u);fetch(u.href,f)}})();function ey(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Fc={exports:{}},mr={};/** +var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in n?Vz(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ug=(n,e,t)=>Uz(n,typeof e!="symbol"?e+"":e,t),J1=(n,e,t)=>e.has(n)||hA("Cannot "+t);var j=(n,e,t)=>(J1(n,e,"read from private field"),t?t.call(n):e.get(n)),Te=(n,e,t)=>e.has(n)?hA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),be=(n,e,t,r)=>(J1(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ve=(n,e,t)=>(J1(n,e,"access private method"),t);var bd=(n,e,t,r)=>({set _(i){be(n,e,i,t)},get _(){return j(n,e,r)}});function Fz(n,e){for(var t=0;tr[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function B3(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ex={exports:{}},xd={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var Kp=a=>{throw TypeError(a)};var Zc=(a,l,r)=>l.has(a)||Kp("Cannot "+r);var X=( * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xp;function HS(){if(Xp)return mr;Xp=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(o,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var h in u)h!=="key"&&(f[h]=u[h])}else f=u;return u=f.ref,{$$typeof:a,type:o,key:d,ref:u!==void 0?u:null,props:f}}return mr.Fragment=l,mr.jsx=r,mr.jsxs=r,mr}var Zp;function GS(){return Zp||(Zp=1,Fc.exports=HS()),Fc.exports}var R=GS(),As=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(a){return this.listeners.add(a),this.onSubscribe(),()=>{this.listeners.delete(a),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ts=typeof window>"u"||"Deno"in globalThis;function We(){}function qS(a,l){return typeof a=="function"?a(l):a}function VS(a){return typeof a=="number"&&a>=0&&a!==1/0}function PS(a,l){return Math.max(a+(l||0)-Date.now(),0)}function Fp(a,l){return typeof a=="function"?a(l):a}function YS(a,l){return typeof a=="function"?a(l):a}function $p(a,l){const{type:r="all",exact:o,fetchStatus:u,predicate:f,queryKey:d,stale:h}=a;if(d){if(o){if(l.queryHash!==Hf(d,l.options))return!1}else if(!Mr(l.queryKey,d))return!1}if(r!=="all"){const v=l.isActive();if(r==="active"&&!v||r==="inactive"&&v)return!1}return!(typeof h=="boolean"&&l.isStale()!==h||u&&u!==l.state.fetchStatus||f&&!f(l))}function Jp(a,l){const{exact:r,status:o,predicate:u,mutationKey:f}=a;if(f){if(!l.options.mutationKey)return!1;if(r){if(_r(l.options.mutationKey)!==_r(f))return!1}else if(!Mr(l.options.mutationKey,f))return!1}return!(o&&l.state.status!==o||u&&!u(l))}function Hf(a,l){return((l==null?void 0:l.queryKeyHashFn)||_r)(a)}function _r(a){return JSON.stringify(a,(l,r)=>_f(r)?Object.keys(r).sort().reduce((o,u)=>(o[u]=r[u],o),{}):r)}function Mr(a,l){return a===l?!0:typeof a!=typeof l?!1:a&&l&&typeof a=="object"&&typeof l=="object"?!Object.keys(l).some(r=>!Mr(a[r],l[r])):!1}function ny(a,l){if(a===l)return a;const r=Wp(a)&&Wp(l);if(r||_f(a)&&_f(l)){const o=r?a:Object.keys(a),u=o.length,f=r?l:Object.keys(l),d=f.length,h=r?[]:{};let v=0;for(let m=0;m{setTimeout(l,a)})}function QS(a,l,r){return typeof r.structuralSharing=="function"?r.structuralSharing(a,l):r.structuralSharing!==!1?ny(a,l):l}function KS(a,l,r=0){const o=[...a,l];return r&&o.length>r?o.slice(1):o}function XS(a,l,r=0){const o=[l,...a];return r&&o.length>r?o.slice(0,-1):o}var Gf=Symbol();function ay(a,l){return!a.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!a.queryFn||a.queryFn===Gf?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}var ei,xa,nl,Xv,ZS=(Xv=class extends As{constructor(){super();Ot(this,ei);Ot(this,xa);Ot(this,nl);gt(this,nl,l=>{if(!Ts&&window.addEventListener){const r=()=>l();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){X(this,xa)||this.setEventListener(X(this,nl))}onUnsubscribe(){var l;this.hasListeners()||((l=X(this,xa))==null||l.call(this),gt(this,xa,void 0))}setEventListener(l){var r;gt(this,nl,l),(r=X(this,xa))==null||r.call(this),gt(this,xa,l(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(l){X(this,ei)!==l&&(gt(this,ei,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(r=>{r(l)})}isFocused(){var l;return typeof X(this,ei)=="boolean"?X(this,ei):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},ei=new WeakMap,xa=new WeakMap,nl=new WeakMap,Xv),iy=new ZS,al,Ea,il,Zv,FS=(Zv=class extends As{constructor(){super();Ot(this,al,!0);Ot(this,Ea);Ot(this,il);gt(this,il,l=>{if(!Ts&&window.addEventListener){const r=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){X(this,Ea)||this.setEventListener(X(this,il))}onUnsubscribe(){var l;this.hasListeners()||((l=X(this,Ea))==null||l.call(this),gt(this,Ea,void 0))}setEventListener(l){var r;gt(this,il,l),(r=X(this,Ea))==null||r.call(this),gt(this,Ea,l(this.setOnline.bind(this)))}setOnline(l){X(this,al)!==l&&(gt(this,al,l),this.listeners.forEach(o=>{o(l)}))}isOnline(){return X(this,al)}},al=new WeakMap,Ea=new WeakMap,il=new WeakMap,Zv),bs=new FS;function $S(){let a,l;const r=new Promise((u,f)=>{a=u,l=f});r.status="pending",r.catch(()=>{});function o(u){Object.assign(r,u),delete r.resolve,delete r.reject}return r.resolve=u=>{o({status:"fulfilled",value:u}),a(u)},r.reject=u=>{o({status:"rejected",reason:u}),l(u)},r}function JS(a){return Math.min(1e3*2**a,3e4)}function ly(a){return(a??"online")==="online"?bs.isOnline():!0}var ry=class extends Error{constructor(a){super("CancelledError"),this.revert=a==null?void 0:a.revert,this.silent=a==null?void 0:a.silent}};function $c(a){return a instanceof ry}function oy(a){let l=!1,r=0,o=!1,u;const f=$S(),d=x=>{var C;o||(S(new ry(x)),(C=a.abort)==null||C.call(a))},h=()=>{l=!0},v=()=>{l=!1},m=()=>iy.isFocused()&&(a.networkMode==="always"||bs.isOnline())&&a.canRun(),g=()=>ly(a.networkMode)&&a.canRun(),y=x=>{var C;o||(o=!0,(C=a.onSuccess)==null||C.call(a,x),u==null||u(),f.resolve(x))},S=x=>{var C;o||(o=!0,(C=a.onError)==null||C.call(a,x),u==null||u(),f.reject(x))},E=()=>new Promise(x=>{var C;u=O=>{(o||m())&&x(O)},(C=a.onPause)==null||C.call(a)}).then(()=>{var x;u=void 0,o||(x=a.onContinue)==null||x.call(a)}),_=()=>{if(o)return;let x;const C=r===0?a.initialPromise:void 0;try{x=C??a.fn()}catch(O){x=Promise.reject(O)}Promise.resolve(x).then(y).catch(O=>{var Q;if(o)return;const j=a.retry??(Ts?0:3),B=a.retryDelay??JS,H=typeof B=="function"?B(r,O):B,z=j===!0||typeof j=="number"&&rm()?void 0:E()).then(()=>{l?S(O):_()})})};return{promise:f,cancel:d,continue:()=>(u==null||u(),f),cancelRetry:h,continueRetry:v,canStart:g,start:()=>(g()?_():E().then(_),f)}}function WS(){let a=[],l=0,r=h=>{h()},o=h=>{h()},u=h=>setTimeout(h,0);const f=h=>{l?a.push(h):u(()=>{r(h)})},d=()=>{const h=a;a=[],h.length&&u(()=>{o(()=>{h.forEach(v=>{r(v)})})})};return{batch:h=>{let v;l++;try{v=h()}finally{l--,l||d()}return v},batchCalls:h=>(...v)=>{f(()=>{h(...v)})},schedule:f,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{u=h}}}var he=WS(),ni,Fv,sy=(Fv=class{constructor(){Ot(this,ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),VS(this.gcTime)&>(this,ni,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??(Ts?1/0:5*60*1e3))}clearGcTimeout(){X(this,ni)&&(clearTimeout(X(this,ni)),gt(this,ni,void 0))}},ni=new WeakMap,Fv),ll,rl,Qe,ue,Dr,ai,Ie,Vn,$v,IS=($v=class extends sy{constructor(l){super();Ot(this,Ie);Ot(this,ll);Ot(this,rl);Ot(this,Qe);Ot(this,ue);Ot(this,Dr);Ot(this,ai);gt(this,ai,!1),gt(this,Dr,l.defaultOptions),this.setOptions(l.options),this.observers=[],gt(this,Qe,l.cache),this.queryKey=l.queryKey,this.queryHash=l.queryHash,gt(this,ll,e1(this.options)),this.state=l.state??X(this,ll),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var l;return(l=X(this,ue))==null?void 0:l.promise}setOptions(l){this.options={...X(this,Dr),...l},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,Qe).remove(this)}setData(l,r){const o=QS(this.state.data,l,this.options);return oe(this,Ie,Vn).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(l,r){oe(this,Ie,Vn).call(this,{type:"setState",state:l,setStateOptions:r})}cancel(l){var o,u;const r=(o=X(this,ue))==null?void 0:o.promise;return(u=X(this,ue))==null||u.cancel(l),r?r.then(We).catch(We):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,ll))}isActive(){return this.observers.some(l=>YS(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(l=0){return this.state.isInvalidated||this.state.data===void 0||!PS(this.state.dataUpdatedAt,l)}onFocus(){var r;const l=this.observers.find(o=>o.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(r=X(this,ue))==null||r.continue()}onOnline(){var r;const l=this.observers.find(o=>o.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(r=X(this,ue))==null||r.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),X(this,Qe).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(r=>r!==l),this.observers.length||(X(this,ue)&&(X(this,ai)?X(this,ue).cancel({revert:!0}):X(this,ue).cancelRetry()),this.scheduleGc()),X(this,Qe).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||oe(this,Ie,Vn).call(this,{type:"invalidate"})}fetch(l,r){var v,m,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(X(this,ue))return X(this,ue).continueRetry(),X(this,ue).promise}if(l&&this.setOptions(l),!this.options.queryFn){const y=this.observers.find(S=>S.options.queryFn);y&&this.setOptions(y.options)}const o=new AbortController,u=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(gt(this,ai,!0),o.signal)})},f=()=>{const y=ay(this.options,r),S={queryKey:this.queryKey,meta:this.meta};return u(S),gt(this,ai,!1),this.options.persister?this.options.persister(y,S,this):y(S)},d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};u(d),(v=this.options.behavior)==null||v.onFetch(d,this),gt(this,rl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=d.fetchOptions)==null?void 0:m.meta))&&oe(this,Ie,Vn).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta});const h=y=>{var S,E,_,x;$c(y)&&y.silent||oe(this,Ie,Vn).call(this,{type:"error",error:y}),$c(y)||((E=(S=X(this,Qe).config).onError)==null||E.call(S,y,this),(x=(_=X(this,Qe).config).onSettled)==null||x.call(_,this.state.data,y,this)),this.scheduleGc()};return gt(this,ue,oy({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,abort:o.abort.bind(o),onSuccess:y=>{var S,E,_,x;if(y===void 0){h(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(y)}catch(C){h(C);return}(E=(S=X(this,Qe).config).onSuccess)==null||E.call(S,y,this),(x=(_=X(this,Qe).config).onSettled)==null||x.call(_,y,this.state.error,this),this.scheduleGc()},onError:h,onFail:(y,S)=>{oe(this,Ie,Vn).call(this,{type:"failed",failureCount:y,error:S})},onPause:()=>{oe(this,Ie,Vn).call(this,{type:"pause"})},onContinue:()=>{oe(this,Ie,Vn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0})),X(this,ue).start()}},ll=new WeakMap,rl=new WeakMap,Qe=new WeakMap,ue=new WeakMap,Dr=new WeakMap,ai=new WeakMap,Ie=new WeakSet,Vn=function(l){const r=o=>{switch(l.type){case"failed":return{...o,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...t1(o.data,this.options),fetchMeta:l.meta??null};case"success":return{...o,data:l.data,dataUpdateCount:o.dataUpdateCount+1,dataUpdatedAt:l.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const u=l.error;return $c(u)&&u.revert&&X(this,rl)?{...X(this,rl),fetchStatus:"idle"}:{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error"};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...l.state}}};this.state=r(this.state),he.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),X(this,Qe).notify({query:this,type:"updated",action:l})})},$v);function t1(a,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ly(l.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function e1(a){const l=typeof a.initialData=="function"?a.initialData():a.initialData,r=l!==void 0,o=r?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var mn,Jv,n1=(Jv=class extends As{constructor(l={}){super();Ot(this,mn);this.config=l,gt(this,mn,new Map)}build(l,r,o){const u=r.queryKey,f=r.queryHash??Hf(u,r);let d=this.get(f);return d||(d=new IS({cache:this,queryKey:u,queryHash:f,options:l.defaultQueryOptions(r),state:o,defaultOptions:l.getQueryDefaults(u)}),this.add(d)),d}add(l){X(this,mn).has(l.queryHash)||(X(this,mn).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const r=X(this,mn).get(l.queryHash);r&&(l.destroy(),r===l&&X(this,mn).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){he.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return X(this,mn).get(l)}getAll(){return[...X(this,mn).values()]}find(l){const r={exact:!0,...l};return this.getAll().find(o=>$p(r,o))}findAll(l={}){const r=this.getAll();return Object.keys(l).length>0?r.filter(o=>$p(l,o)):r}notify(l){he.batch(()=>{this.listeners.forEach(r=>{r(l)})})}onFocus(){he.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},mn=new WeakMap,Jv),pn,de,ii,vn,ga,Wv,a1=(Wv=class extends sy{constructor(l){super();Ot(this,vn);Ot(this,pn);Ot(this,de);Ot(this,ii);this.mutationId=l.mutationId,gt(this,de,l.mutationCache),gt(this,pn,[]),this.state=l.state||i1(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){X(this,pn).includes(l)||(X(this,pn).push(l),this.clearGcTimeout(),X(this,de).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){gt(this,pn,X(this,pn).filter(r=>r!==l)),this.scheduleGc(),X(this,de).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){X(this,pn).length||(this.state.status==="pending"?this.scheduleGc():X(this,de).remove(this))}continue(){var l;return((l=X(this,ii))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var u,f,d,h,v,m,g,y,S,E,_,x,C,O,j,B,H,z,Q,J;gt(this,ii,oy({fn:()=>this.options.mutationFn?this.options.mutationFn(l):Promise.reject(new Error("No mutationFn found")),onFail:(P,G)=>{oe(this,vn,ga).call(this,{type:"failed",failureCount:P,error:G})},onPause:()=>{oe(this,vn,ga).call(this,{type:"pause"})},onContinue:()=>{oe(this,vn,ga).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,de).canRun(this)}));const r=this.state.status==="pending",o=!X(this,ii).canStart();try{if(!r){oe(this,vn,ga).call(this,{type:"pending",variables:l,isPaused:o}),await((f=(u=X(this,de).config).onMutate)==null?void 0:f.call(u,l,this));const G=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,l));G!==this.state.context&&oe(this,vn,ga).call(this,{type:"pending",context:G,variables:l,isPaused:o})}const P=await X(this,ii).start();return await((m=(v=X(this,de).config).onSuccess)==null?void 0:m.call(v,P,l,this.state.context,this)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,P,l,this.state.context)),await((E=(S=X(this,de).config).onSettled)==null?void 0:E.call(S,P,null,this.state.variables,this.state.context,this)),await((x=(_=this.options).onSettled)==null?void 0:x.call(_,P,null,l,this.state.context)),oe(this,vn,ga).call(this,{type:"success",data:P}),P}catch(P){try{throw await((O=(C=X(this,de).config).onError)==null?void 0:O.call(C,P,l,this.state.context,this)),await((B=(j=this.options).onError)==null?void 0:B.call(j,P,l,this.state.context)),await((z=(H=X(this,de).config).onSettled)==null?void 0:z.call(H,void 0,P,this.state.variables,this.state.context,this)),await((J=(Q=this.options).onSettled)==null?void 0:J.call(Q,void 0,P,l,this.state.context)),P}finally{oe(this,vn,ga).call(this,{type:"error",error:P})}}finally{X(this,de).runNext(this)}}},pn=new WeakMap,de=new WeakMap,ii=new WeakMap,vn=new WeakSet,ga=function(l){const r=o=>{switch(l.type){case"failed":return{...o,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...o,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:l.error,failureCount:o.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=r(this.state),he.batch(()=>{X(this,pn).forEach(o=>{o.onMutationUpdate(l)}),X(this,de).notify({mutation:this,type:"updated",action:l})})},Wv);function i1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ce,Nr,Iv,l1=(Iv=class extends As{constructor(l={}){super();Ot(this,Ce);Ot(this,Nr);this.config=l,gt(this,Ce,new Map),gt(this,Nr,Date.now())}build(l,r,o){const u=new a1({mutationCache:this,mutationId:++Jo(this,Nr)._,options:l.defaultMutationOptions(r),state:o});return this.add(u),u}add(l){const r=Wo(l),o=X(this,Ce).get(r)??[];o.push(l),X(this,Ce).set(r,o),this.notify({type:"added",mutation:l})}remove(l){var o;const r=Wo(l);if(X(this,Ce).has(r)){const u=(o=X(this,Ce).get(r))==null?void 0:o.filter(f=>f!==l);u&&(u.length===0?X(this,Ce).delete(r):X(this,Ce).set(r,u))}this.notify({type:"removed",mutation:l})}canRun(l){var o;const r=(o=X(this,Ce).get(Wo(l)))==null?void 0:o.find(u=>u.state.status==="pending");return!r||r===l}runNext(l){var o;const r=(o=X(this,Ce).get(Wo(l)))==null?void 0:o.find(u=>u!==l&&u.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){he.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}getAll(){return[...X(this,Ce).values()].flat()}find(l){const r={exact:!0,...l};return this.getAll().find(o=>Jp(r,o))}findAll(l={}){return this.getAll().filter(r=>Jp(l,r))}notify(l){he.batch(()=>{this.listeners.forEach(r=>{r(l)})})}resumePausedMutations(){const l=this.getAll().filter(r=>r.state.isPaused);return he.batch(()=>Promise.all(l.map(r=>r.continue().catch(We))))}},Ce=new WeakMap,Nr=new WeakMap,Iv);function Wo(a){var l;return((l=a.options.scope)==null?void 0:l.id)??String(a.mutationId)}function tv(a){return{onFetch:(l,r)=>{var g,y,S,E,_;const o=l.options,u=(S=(y=(g=l.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:S.direction,f=((E=l.state.data)==null?void 0:E.pages)||[],d=((_=l.state.data)==null?void 0:_.pageParams)||[];let h={pages:[],pageParams:[]},v=0;const m=async()=>{let x=!1;const C=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(l.signal.aborted?x=!0:l.signal.addEventListener("abort",()=>{x=!0}),l.signal)})},O=ay(l.options,l.fetchOptions),j=async(B,H,z)=>{if(x)return Promise.reject();if(H==null&&B.pages.length)return Promise.resolve(B);const Q={queryKey:l.queryKey,pageParam:H,direction:z?"backward":"forward",meta:l.options.meta};C(Q);const J=await O(Q),{maxPages:P}=l.options,G=z?XS:KS;return{pages:G(B.pages,J,P),pageParams:G(B.pageParams,H,P)}};if(u&&f.length){const B=u==="backward",H=B?r1:ev,z={pages:f,pageParams:d},Q=H(o,z);h=await j(z,Q,B)}else{const B=a??f.length;do{const H=v===0?d[0]??o.initialPageParam:ev(o,h);if(v>0&&H==null)break;h=await j(h,H),v++}while(v{var x,C;return(C=(x=l.options).persister)==null?void 0:C.call(x,m,{queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},r)}:l.fetchFn=m}}}function ev(a,{pages:l,pageParams:r}){const o=l.length-1;return l.length>0?a.getNextPageParam(l[o],l,r[o],r):void 0}function r1(a,{pages:l,pageParams:r}){var o;return l.length>0?(o=a.getPreviousPageParam)==null?void 0:o.call(a,l[0],l,r[0],r):void 0}var Yt,wa,_a,ol,sl,Ma,ul,cl,ty,o1=(ty=class{constructor(a={}){Ot(this,Yt);Ot(this,wa);Ot(this,_a);Ot(this,ol);Ot(this,sl);Ot(this,Ma);Ot(this,ul);Ot(this,cl);gt(this,Yt,a.queryCache||new n1),gt(this,wa,a.mutationCache||new l1),gt(this,_a,a.defaultOptions||{}),gt(this,ol,new Map),gt(this,sl,new Map),gt(this,Ma,0)}mount(){Jo(this,Ma)._++,X(this,Ma)===1&&(gt(this,ul,iy.subscribe(async a=>{a&&(await this.resumePausedMutations(),X(this,Yt).onFocus())})),gt(this,cl,bs.subscribe(async a=>{a&&(await this.resumePausedMutations(),X(this,Yt).onOnline())})))}unmount(){var a,l;Jo(this,Ma)._--,X(this,Ma)===0&&((a=X(this,ul))==null||a.call(this),gt(this,ul,void 0),(l=X(this,cl))==null||l.call(this),gt(this,cl,void 0))}isFetching(a){return X(this,Yt).findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return X(this,wa).findAll({...a,status:"pending"}).length}getQueryData(a){var r;const l=this.defaultQueryOptions({queryKey:a});return(r=X(this,Yt).get(l.queryHash))==null?void 0:r.state.data}ensureQueryData(a){const l=this.getQueryData(a.queryKey);if(l===void 0)return this.fetchQuery(a);{const r=this.defaultQueryOptions(a),o=X(this,Yt).build(this,r);return a.revalidateIfStale&&o.isStaleByTime(Fp(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(l)}}getQueriesData(a){return X(this,Yt).findAll(a).map(({queryKey:l,state:r})=>{const o=r.data;return[l,o]})}setQueryData(a,l,r){const o=this.defaultQueryOptions({queryKey:a}),u=X(this,Yt).get(o.queryHash),f=u==null?void 0:u.state.data,d=qS(l,f);if(d!==void 0)return X(this,Yt).build(this,o).setData(d,{...r,manual:!0})}setQueriesData(a,l,r){return he.batch(()=>X(this,Yt).findAll(a).map(({queryKey:o})=>[o,this.setQueryData(o,l,r)]))}getQueryState(a){var r;const l=this.defaultQueryOptions({queryKey:a});return(r=X(this,Yt).get(l.queryHash))==null?void 0:r.state}removeQueries(a){const l=X(this,Yt);he.batch(()=>{l.findAll(a).forEach(r=>{l.remove(r)})})}resetQueries(a,l){const r=X(this,Yt),o={type:"active",...a};return he.batch(()=>(r.findAll(a).forEach(u=>{u.reset()}),this.refetchQueries(o,l)))}cancelQueries(a={},l={}){const r={revert:!0,...l},o=he.batch(()=>X(this,Yt).findAll(a).map(u=>u.cancel(r)));return Promise.all(o).then(We).catch(We)}invalidateQueries(a={},l={}){return he.batch(()=>{if(X(this,Yt).findAll(a).forEach(o=>{o.invalidate()}),a.refetchType==="none")return Promise.resolve();const r={...a,type:a.refetchType??a.type??"active"};return this.refetchQueries(r,l)})}refetchQueries(a={},l){const r={...l,cancelRefetch:(l==null?void 0:l.cancelRefetch)??!0},o=he.batch(()=>X(this,Yt).findAll(a).filter(u=>!u.isDisabled()).map(u=>{let f=u.fetch(void 0,r);return r.throwOnError||(f=f.catch(We)),u.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(o).then(We)}fetchQuery(a){const l=this.defaultQueryOptions(a);l.retry===void 0&&(l.retry=!1);const r=X(this,Yt).build(this,l);return r.isStaleByTime(Fp(l.staleTime,r))?r.fetch(l):Promise.resolve(r.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(We).catch(We)}fetchInfiniteQuery(a){return a.behavior=tv(a.pages),this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(We).catch(We)}ensureInfiniteQueryData(a){return a.behavior=tv(a.pages),this.ensureQueryData(a)}resumePausedMutations(){return bs.isOnline()?X(this,wa).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,Yt)}getMutationCache(){return X(this,wa)}getDefaultOptions(){return X(this,_a)}setDefaultOptions(a){gt(this,_a,a)}setQueryDefaults(a,l){X(this,ol).set(_r(a),{queryKey:a,defaultOptions:l})}getQueryDefaults(a){const l=[...X(this,ol).values()];let r={};return l.forEach(o=>{Mr(a,o.queryKey)&&(r={...r,...o.defaultOptions})}),r}setMutationDefaults(a,l){X(this,sl).set(_r(a),{mutationKey:a,defaultOptions:l})}getMutationDefaults(a){const l=[...X(this,sl).values()];let r={};return l.forEach(o=>{Mr(a,o.mutationKey)&&(r={...r,...o.defaultOptions})}),r}defaultQueryOptions(a){if(a._defaulted)return a;const l={...X(this,_a).queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return l.queryHash||(l.queryHash=Hf(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.enabled!==!0&&l.queryFn===Gf&&(l.enabled=!1),l}defaultMutationOptions(a){return a!=null&&a._defaulted?a:{...X(this,_a).mutations,...(a==null?void 0:a.mutationKey)&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){X(this,Yt).clear(),X(this,wa).clear()}},Yt=new WeakMap,wa=new WeakMap,_a=new WeakMap,ol=new WeakMap,sl=new WeakMap,Ma=new WeakMap,ul=new WeakMap,cl=new WeakMap,ty),Jc={exports:{}},vt={};/** + */var pA;function qz(){if(pA)return xd;pA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:n,type:r,key:o,ref:i!==void 0?i:null,props:s}}return xd.Fragment=e,xd.jsx=t,xd.jsxs=t,xd}var mA;function Zz(){return mA||(mA=1,ex.exports=qz()),ex.exports}var b=Zz(),tx={exports:{}},Qe={};/** * @license React * react.production.js * @@ -14,31 +14,31 @@ var Kp=a=>{throw TypeError(a)};var Zc=(a,l,r)=>l.has(a)||Kp("Cannot "+r);var X=( * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var nv;function s1(){if(nv)return vt;nv=1;var a=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function S(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function C(A,V,nt){this.props=A,this.context=V,this.refs=x,this.updater=nt||E}C.prototype.isReactComponent={},C.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,V,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=C.prototype;function j(A,V,nt){this.props=A,this.context=V,this.refs=x,this.updater=nt||E}var B=j.prototype=new O;B.constructor=j,_(B,C.prototype),B.isPureReactComponent=!0;var H=Array.isArray,z={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function J(A,V,nt,it,et,ft){return nt=ft.ref,{$$typeof:a,type:A,key:V,ref:nt!==void 0?nt:null,props:ft}}function P(A,V){return J(A.type,V,void 0,void 0,void 0,A.props)}function G(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function tt(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(nt){return V[nt]})}var I=/\/+/g;function W(A,V){return typeof A=="object"&&A!==null&&A.key!=null?tt(""+A.key):V.toString(36)}function rt(){}function lt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(rt,rt):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function ut(A,V,nt,it,et){var ft=typeof A;(ft==="undefined"||ft==="boolean")&&(A=null);var ot=!1;if(A===null)ot=!0;else switch(ft){case"bigint":case"string":case"number":ot=!0;break;case"object":switch(A.$$typeof){case a:case l:ot=!0;break;case g:return ot=A._init,ut(ot(A._payload),V,nt,it,et)}}if(ot)return et=et(A),ot=it===""?"."+W(A,0):it,H(et)?(nt="",ot!=null&&(nt=ot.replace(I,"$&/")+"/"),ut(et,V,nt,"",function(Et){return Et})):et!=null&&(G(et)&&(et=P(et,nt+(et.key==null||A&&A.key===et.key?"":(""+et.key).replace(I,"$&/")+"/")+ot)),V.push(et)),1;ot=0;var Mt=it===""?".":it+":";if(H(A))for(var pt=0;pt(w.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),R.jsx(c1.Provider,{value:a,children:l}));const li="__TSR_index",iv="popstate",lv="beforeunload";function uy(a){let l=a.getLocation();const r=new Set,o=d=>{l=a.getLocation(),r.forEach(h=>h({location:l,action:d}))},u=d=>{a.notifyOnIndexChange??!0?o(d):l=a.getLocation()},f=async({task:d,navigateOpts:h,...v})=>{var m,g;if((h==null?void 0:h.ignoreBlocker)??!1){d();return}const S=((m=a.getBlockers)==null?void 0:m.call(a))??[],E=v.type==="PUSH"||v.type==="REPLACE";if(typeof document<"u"&&S.length&&E)for(const _ of S){const x=Rr(v.path,v.state);if(await _.blockerFn({currentLocation:l,nextLocation:x,action:v.type})){(g=a.onBlocked)==null||g.call(a);return}}d()};return{get location(){return l},get length(){return a.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,h,v)=>{const m=l.state[li];h=Mf(m+1,h),f({task:()=>{a.pushState(d,h),o({type:"PUSH"})},navigateOpts:v,type:"PUSH",path:d,state:h})},replace:(d,h,v)=>{const m=l.state[li];h=Mf(m,h),f({task:()=>{a.replaceState(d,h),o({type:"REPLACE"})},navigateOpts:v,type:"REPLACE",path:d,state:h})},go:(d,h)=>{f({task:()=>{a.go(d),u({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{f({task:()=>{a.back((d==null?void 0:d.ignoreBlocker)??!1),u({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{f({task:()=>{a.forward((d==null?void 0:d.ignoreBlocker)??!1),u({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>l.state[li]!==0,createHref:d=>a.createHref(d),block:d=>{var h;if(!a.setBlockers)return()=>{};const v=((h=a.getBlockers)==null?void 0:h.call(a))??[];return a.setBlockers([...v,d]),()=>{var m,g;const y=((m=a.getBlockers)==null?void 0:m.call(a))??[];(g=a.setBlockers)==null||g.call(a,y.filter(S=>S!==d))}},flush:()=>{var d;return(d=a.flush)==null?void 0:d.call(a)},destroy:()=>{var d;return(d=a.destroy)==null?void 0:d.call(a)},notify:o}}function Mf(a,l){return l||(l={}),{...l,key:m1(),[li]:a}}function d1(a){const l=typeof document<"u"?window:void 0,r=l.history.pushState,o=l.history.replaceState;let u=[];const f=()=>u,d=P=>u=P,h=P=>P,v=()=>Rr(`${l.location.pathname}${l.location.search}${l.location.hash}`,l.history.state);let m=v(),g,y=!1,S=!1,E=!1,_=!1;const x=()=>m;let C,O;const j=()=>{C&&(J._ignoreSubscribers=!0,(C.isPush?l.history.pushState:l.history.replaceState)(C.state,"",C.href),J._ignoreSubscribers=!1,C=void 0,O=void 0,g=void 0)},B=(P,G,tt)=>{const I=h(G);O||(g=m),m=Rr(G,tt),C={href:I,state:tt,isPush:(C==null?void 0:C.isPush)||P==="push"},O||(O=Promise.resolve().then(()=>j()))},H=P=>{m=v(),J.notify({type:P})},z=async()=>{if(S){S=!1;return}const P=v(),G=P.state[li]-m.state[li],tt=G===1,I=G===-1,W=!tt&&!I||y;y=!1;const rt=W?"GO":I?"BACK":"FORWARD",lt=W?{type:"GO",index:G}:{type:I?"BACK":"FORWARD"};if(E)E=!1;else{const ut=f();if(typeof document<"u"&&ut.length){for(const q of ut)if(await q.blockerFn({currentLocation:m,nextLocation:P,action:rt})){S=!0,l.history.go(1),J.notify(lt);return}}}m=v(),J.notify(lt)},Q=P=>{if(_){_=!1;return}let G=!1;const tt=f();if(typeof document<"u"&&tt.length)for(const I of tt){const W=I.enableBeforeUnload??!0;if(W===!0){G=!0;break}if(typeof W=="function"&&W()===!0){G=!0;break}}if(G)return P.preventDefault(),P.returnValue=""},J=uy({getLocation:x,getLength:()=>l.history.length,pushState:(P,G)=>B("push",P,G),replaceState:(P,G)=>B("replace",P,G),back:P=>(P&&(E=!0),_=!0,l.history.back()),forward:P=>{P&&(E=!0),_=!0,l.history.forward()},go:P=>{y=!0,l.history.go(P)},createHref:P=>h(P),flush:j,destroy:()=>{l.history.pushState=r,l.history.replaceState=o,l.removeEventListener(lv,Q,{capture:!0}),l.removeEventListener(iv,z)},onBlocked:()=>{g&&m!==g&&(m=g)},getBlockers:f,setBlockers:d,notifyOnIndexChange:!1});return l.addEventListener(lv,Q,{capture:!0}),l.addEventListener(iv,z),l.history.pushState=function(...P){const G=r.apply(l.history,P);return J._ignoreSubscribers||H("PUSH"),G},l.history.replaceState=function(...P){const G=o.apply(l.history,P);return J._ignoreSubscribers||H("REPLACE"),G},J}function h1(a={initialEntries:["/"]}){const l=a.initialEntries;let r=a.initialIndex?Math.min(Math.max(a.initialIndex,0),l.length-1):l.length-1;const o=l.map((f,d)=>Mf(d,void 0));return uy({getLocation:()=>Rr(l[r],o[r]),getLength:()=>l.length,pushState:(f,d)=>{r{o[r]=d,l[r]=f},back:()=>{r=Math.max(r-1,0)},forward:()=>{r=Math.min(r+1,l.length-1)},go:f=>{r=Math.min(Math.max(r+f,0),l.length-1)},createHref:f=>f})}function Rr(a,l){const r=a.indexOf("#"),o=a.indexOf("?");return{href:a,pathname:a.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:a.length),hash:r>-1?a.substring(r):"",search:o>-1?a.slice(o,r===-1?void 0:r):"",state:l||{[li]:0}}}function m1(){return(Math.random()+1).toString(36).substring(7)}var p1="Invariant failed";function Te(a,l){if(!a)throw new Error(p1)}const Wc=w.createContext(null);function cy(){return typeof document>"u"?Wc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Wc,Wc)}function si(a){const l=w.useContext(cy());return a==null||a.warn,l}var Ic={exports:{}},tf={},ef={exports:{}},nf={};/** + */var gA;function Gz(){if(gA)return Qe;gA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}k.prototype.isReactComponent={},k.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,te,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=k.prototype;function _(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}var T=_.prototype=new E;T.constructor=_,S(T,k.prototype),T.isPureReactComponent=!0;var N=Array.isArray,A={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function D(L,te,F,H,Q,X){return F=X.ref,{$$typeof:n,type:L,key:te,ref:F!==void 0?F:null,props:X}}function B(L,te){return D(L.type,te,void 0,void 0,void 0,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function Z(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(F){return te[F]})}var U=/\/+/g;function $(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Z(""+L.key):te.toString(36)}function de(){}function se(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(de,de):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function ce(L,te,F,H,Q){var X=typeof L;(X==="undefined"||X==="boolean")&&(L=null);var ne=!1;if(L===null)ne=!0;else switch(X){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(L.$$typeof){case n:case e:ne=!0;break;case h:return ne=L._init,ce(ne(L._payload),te,F,H,Q)}}if(ne)return Q=Q(L),ne=H===""?"."+$(L,0):H,N(Q)?(F="",ne!=null&&(F=ne.replace(U,"$&/")+"/"),ce(Q,te,F,"",function(_e){return _e})):Q!=null&&(P(Q)&&(Q=B(Q,F+(Q.key==null||L&&L.key===Q.key?"":(""+Q.key).replace(U,"$&/")+"/")+ne)),te.push(Q)),1;ne=0;var me=H===""?".":H+":";if(N(L))for(var ye=0;yen.forEach(t=>Wz(t,e))}function Pt(...n){return x.useCallback(XC(...n),n)}function Kz(n,e){const t=x.createContext(e),r=s=>{const{children:o,...l}=s,u=x.useMemo(()=>l,Object.values(l));return b.jsx(t.Provider,{value:u,children:o})};r.displayName=n+"Provider";function i(s){const o=x.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function us(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];const f=m=>{var E;const{scope:g,children:y,...S}=m,C=((E=g==null?void 0:g[n])==null?void 0:E[u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})};f.displayName=s+"Provider";function h(m,g){var C;const y=((C=g==null?void 0:g[n])==null?void 0:C[u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,Qz(i,...e)]}function Qz(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var nx={exports:{}},Cn={};/** * @license React - * use-sync-external-store-shim.production.js + * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var rv;function v1(){if(rv)return nf;rv=1;var a=zr();function l(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var r=typeof Object.is=="function"?Object.is:l,o=a.useState,u=a.useEffect,f=a.useLayoutEffect,d=a.useDebugValue;function h(y,S){var E=S(),_=o({inst:{value:E,getSnapshot:S}}),x=_[0].inst,C=_[1];return f(function(){x.value=E,x.getSnapshot=S,v(x)&&C({inst:x})},[y,E,S]),u(function(){return v(x)&&C({inst:x}),y(function(){v(x)&&C({inst:x})})},[y]),d(E),E}function v(y){var S=y.getSnapshot;y=y.value;try{var E=S();return!r(y,E)}catch{return!0}}function m(y,S){return S()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return nf.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:g,nf}var ov;function y1(){return ov||(ov=1,ef.exports=v1()),ef.exports}/** + */var yA;function Yz(){if(yA)return Cn;yA=1;var n=Tp();function e(u){var f="https://react.dev/errors/"+u;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),nx.exports=Yz(),nx.exports}var Ap=I3();const z3=B3(Ap);var ia=x.forwardRef((n,e)=>{const{children:t,...r}=n,i=x.Children.toArray(t),s=i.find(Xz);if(s){const o=s.props.children,l=i.map(u=>u===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return b.jsx(Rw,{...r,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,l):null})}return b.jsx(Rw,{...r,ref:e,children:t})});ia.displayName="Slot";var Rw=x.forwardRef((n,e)=>{const{children:t,...r}=n;if(x.isValidElement(t)){const i=e$(t);return x.cloneElement(t,{...Jz(r,t.props),ref:e?XC(e,i):i})}return x.Children.count(t)>1?x.Children.only(null):null});Rw.displayName="SlotClone";var $3=({children:n})=>b.jsx(b.Fragment,{children:n});function Xz(n){return x.isValidElement(n)&&n.type===$3}function Jz(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...l)=>{s(...l),i(...l)}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function e$(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var t$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],lt=t$.reduce((n,e)=>{const t=x.forwardRef((r,i)=>{const{asChild:s,...o}=r,l=s?ia:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...o,ref:i})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function H3(n,e){n&&Ap.flushSync(()=>n.dispatchEvent(e))}function un(n){const e=x.useRef(n);return x.useEffect(()=>{e.current=n}),x.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function n$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var r$="DismissableLayer",_w="dismissableLayer.update",i$="dismissableLayer.pointerDownOutside",s$="dismissableLayer.focusOutside",xA,V3=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mp=x.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...u}=n,f=x.useContext(V3),[h,m]=x.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=x.useState({}),S=Pt(e,D=>m(D)),C=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(k),_=h?C.indexOf(h):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,N=_>=E,A=l$(D=>{const B=D.target,P=[...f.branches].some(Z=>Z.contains(B));!N||P||(i==null||i(D),o==null||o(D),D.defaultPrevented||l==null||l())},g),O=c$(D=>{const B=D.target;[...f.branches].some(Z=>Z.contains(B))||(s==null||s(D),o==null||o(D),D.defaultPrevented||l==null||l())},g);return n$(D=>{_===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),x.useEffect(()=>{if(h)return t&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(xA=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),wA(),()=>{t&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=xA)}},[h,g,t,f]),x.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),wA())},[h,f]),x.useEffect(()=>{const D=()=>y({});return document.addEventListener(_w,D),()=>document.removeEventListener(_w,D)},[]),b.jsx(lt.div,{...u,ref:S,style:{pointerEvents:T?N?"auto":"none":void 0,...n.style},onFocusCapture:Oe(n.onFocusCapture,O.onFocusCapture),onBlurCapture:Oe(n.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Oe(n.onPointerDownCapture,A.onPointerDownCapture)})});Mp.displayName=r$;var o$="DismissableLayerBranch",a$=x.forwardRef((n,e)=>{const t=x.useContext(V3),r=x.useRef(null),i=Pt(e,r);return x.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),b.jsx(lt.div,{...n,ref:i})});a$.displayName=o$;function l$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let u=function(){U3(i$,t,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=u,e.addEventListener("click",i.current,{once:!0})):u()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function c$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&U3(s$,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wA(){const n=new CustomEvent(_w);document.dispatchEvent(n)}function U3(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?H3(i,s):i.dispatchEvent(s)}var _i=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},u$=Uv.useId||(()=>{}),f$=0;function Si(n){const[e,t]=x.useState(u$());return _i(()=>{n||t(r=>r??String(f$++))},[n]),n||(e?`radix-${e}`:"")}const d$=["top","right","bottom","left"],sa=Math.min,kr=Math.max,R0=Math.round,fg=Math.floor,ts=n=>({x:n,y:n}),h$={left:"right",right:"left",bottom:"top",top:"bottom"},p$={start:"end",end:"start"};function Tw(n,e,t){return kr(n,sa(e,t))}function Gs(n,e){return typeof n=="function"?n(e):n}function Ws(n){return n.split("-")[0]}function cf(n){return n.split("-")[1]}function JC(n){return n==="x"?"y":"x"}function e2(n){return n==="y"?"height":"width"}function oa(n){return["top","bottom"].includes(Ws(n))?"y":"x"}function t2(n){return JC(oa(n))}function m$(n,e,t){t===void 0&&(t=!1);const r=cf(n),i=t2(n),s=e2(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=_0(o)),[o,_0(o)]}function g$(n){const e=_0(n);return[Aw(n),e,Aw(e)]}function Aw(n){return n.replace(/start|end/g,e=>p$[e])}function v$(n,e,t){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function y$(n,e,t,r){const i=cf(n);let s=v$(Ws(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Aw)))),s}function _0(n){return n.replace(/left|right|bottom|top/g,e=>h$[e])}function b$(n){return{top:0,right:0,bottom:0,left:0,...n}}function F3(n){return typeof n!="number"?b$(n):{top:n,right:n,bottom:n,left:n}}function T0(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function SA(n,e,t){let{reference:r,floating:i}=n;const s=oa(e),o=t2(e),l=e2(o),u=Ws(e),f=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,g=r[l]/2-i[l]/2;let y;switch(u){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-i.width,y:m};break;default:y={x:r.x,y:r.y}}switch(cf(e)){case"start":y[o]-=g*(t&&f?-1:1);break;case"end":y[o]+=g*(t&&f?-1:1);break}return y}const x$=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,l=s.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:h,y:m}=SA(f,r,u),g=r,y={},S=0;for(let C=0;C({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:u}=e,{element:f,padding:h=0}=Gs(n,e)||{};if(f==null)return{};const m=F3(h),g={x:t,y:r},y=t2(i),S=e2(y),C=await o.getDimensions(f),k=y==="y",E=k?"top":"left",_=k?"bottom":"right",T=k?"clientHeight":"clientWidth",N=s.reference[S]+s.reference[y]-g[y]-s.floating[S],A=g[y]-s.reference[y],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let D=O?O[T]:0;(!D||!await(o.isElement==null?void 0:o.isElement(O)))&&(D=l.floating[T]||s.floating[S]);const B=N/2-A/2,P=D/2-C[S]/2-1,Z=sa(m[E],P),U=sa(m[_],P),$=Z,de=D-C[S]-U,se=D/2-C[S]/2+B,ce=Tw($,se,de),G=!u.arrow&&cf(i)!=null&&se!==ce&&s.reference[S]/2-(se<$?Z:U)-C[S]/2<0,ue=G?se<$?se-$:se-de:0;return{[y]:g[y]+ue,data:{[y]:ce,centerOffset:se-ce-ue,...G&&{alignmentOffset:ue}},reset:G}}}),S$=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:u,elements:f}=e,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=Gs(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const E=Ws(i),_=oa(l),T=Ws(l)===l,N=await(u.isRTL==null?void 0:u.isRTL(f.floating)),A=g||(T||!C?[_0(l)]:g$(l)),O=S!=="none";!g&&O&&A.push(...y$(l,C,S,N));const D=[l,...A],B=await ph(e,k),P=[];let Z=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(B[E]),m){const se=m$(i,o,N);P.push(B[se[0]],B[se[1]])}if(Z=[...Z,{placement:i,overflows:P}],!P.every(se=>se<=0)){var U,$;const se=(((U=s.flip)==null?void 0:U.index)||0)+1,ce=D[se];if(ce)return{data:{index:se,overflows:Z},reset:{placement:ce}};let G=($=Z.filter(ue=>ue.overflows[0]<=0).sort((ue,ie)=>ue.overflows[1]-ie.overflows[1])[0])==null?void 0:$.placement;if(!G)switch(y){case"bestFit":{var de;const ue=(de=Z.filter(ie=>{if(O){const re=oa(ie.placement);return re===_||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,L)=>re+L,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:de[0];ue&&(G=ue);break}case"initialPlacement":G=l;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function CA(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function kA(n){return d$.some(e=>n[e]>=0)}const C$=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=Gs(n,e);switch(r){case"referenceHidden":{const s=await ph(e,{...i,elementContext:"reference"}),o=CA(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:kA(o)}}}case"escaped":{const s=await ph(e,{...i,altBoundary:!0}),o=CA(s,t.floating);return{data:{escapedOffsets:o,escaped:kA(o)}}}default:return{}}}}};async function k$(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ws(t),l=cf(t),u=oa(t)==="y",f=["left","top"].includes(o)?-1:1,h=s&&u?-1:1,m=Gs(e,n);let{mainAxis:g,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof S=="number"&&(y=l==="end"?S*-1:S),u?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const E$=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:l}=e,u=await k$(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:o}}}}},R$=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:k=>{let{x:E,y:_}=k;return{x:E,y:_}}},...u}=Gs(n,e),f={x:t,y:r},h=await ph(e,u),m=oa(Ws(i)),g=JC(m);let y=f[g],S=f[m];if(s){const k=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=y+h[k],T=y-h[E];y=Tw(_,y,T)}if(o){const k=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[k],T=S-h[E];S=Tw(_,S,T)}const C=l.fn({...e,[g]:y,[m]:S});return{...C,data:{x:C.x-t,y:C.y-r,enabled:{[g]:s,[m]:o}}}}}},_$=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Gs(n,e),h={x:t,y:r},m=oa(i),g=JC(m);let y=h[g],S=h[m];const C=Gs(l,e),k=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(u){const T=g==="y"?"height":"width",N=s.reference[g]-s.floating[T]+k.mainAxis,A=s.reference[g]+s.reference[T]-k.mainAxis;yA&&(y=A)}if(f){var E,_;const T=g==="y"?"width":"height",N=["top","left"].includes(Ws(i)),A=s.reference[m]-s.floating[T]+(N&&((E=o.offset)==null?void 0:E[m])||0)+(N?0:k.crossAxis),O=s.reference[m]+s.reference[T]+(N?0:((_=o.offset)==null?void 0:_[m])||0)-(N?k.crossAxis:0);SO&&(S=O)}return{[g]:y,[m]:S}}}},T$=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...f}=Gs(n,e),h=await ph(e,f),m=Ws(i),g=cf(i),y=oa(i)==="y",{width:S,height:C}=s.floating;let k,E;m==="top"||m==="bottom"?(k=m,E=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=m,k=g==="end"?"top":"bottom");const _=C-h.top-h.bottom,T=S-h.left-h.right,N=sa(C-h[k],_),A=sa(S-h[E],T),O=!e.middlewareData.shift;let D=N,B=A;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(B=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(D=_),O&&!g){const Z=kr(h.left,0),U=kr(h.right,0),$=kr(h.top,0),de=kr(h.bottom,0);y?B=S-2*(Z!==0||U!==0?Z+U:kr(h.left,h.right)):D=C-2*($!==0||de!==0?$+de:kr(h.top,h.bottom))}await u({...e,availableWidth:B,availableHeight:D});const P=await o.getDimensions(l.floating);return S!==P.width||C!==P.height?{reset:{rects:!0}}:{}}}};function Fv(){return typeof window<"u"}function uf(n){return q3(n)?(n.nodeName||"").toLowerCase():"#document"}function _r(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function fs(n){var e;return(e=(q3(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function q3(n){return Fv()?n instanceof Node||n instanceof _r(n).Node:!1}function Ti(n){return Fv()?n instanceof Element||n instanceof _r(n).Element:!1}function ss(n){return Fv()?n instanceof HTMLElement||n instanceof _r(n).HTMLElement:!1}function EA(n){return!Fv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof _r(n).ShadowRoot}function Op(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=Ai(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function A$(n){return["table","td","th"].includes(uf(n))}function qv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function n2(n){const e=r2(),t=Ti(n)?Ai(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function M$(n){let e=aa(n);for(;ss(e)&&!Pu(e);){if(n2(e))return e;if(qv(e))return null;e=aa(e)}return null}function r2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Pu(n){return["html","body","#document"].includes(uf(n))}function Ai(n){return _r(n).getComputedStyle(n)}function Zv(n){return Ti(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function aa(n){if(uf(n)==="html")return n;const e=n.assignedSlot||n.parentNode||EA(n)&&n.host||fs(n);return EA(e)?e.host:e}function Z3(n){const e=aa(n);return Pu(e)?n.ownerDocument?n.ownerDocument.body:n.body:ss(e)&&Op(e)?e:Z3(e)}function mh(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=Z3(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=_r(i);if(s){const l=Mw(o);return e.concat(o,o.visualViewport||[],Op(i)?i:[],l&&t?mh(l):[])}return e.concat(i,mh(i,[],t))}function Mw(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function G3(n){const e=Ai(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ss(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,l=R0(t)!==s||R0(r)!==o;return l&&(t=s,r=o),{width:t,height:r,$:l}}function i2(n){return Ti(n)?n:n.contextElement}function nu(n){const e=i2(n);if(!ss(e))return ts(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=G3(e);let o=(s?R0(t.width):t.width)/r,l=(s?R0(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const O$=ts(0);function W3(n){const e=_r(n);return!r2()||!e.visualViewport?O$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function N$(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==_r(n)?!1:e}function Sl(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=i2(n);let o=ts(1);e&&(r?Ti(r)&&(o=nu(r)):o=nu(n));const l=N$(s,t,r)?W3(s):ts(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,m=i.height/o.y;if(s){const g=_r(s),y=r&&Ti(r)?_r(r):r;let S=g,C=Mw(S);for(;C&&r&&y!==S;){const k=nu(C),E=C.getBoundingClientRect(),_=Ai(C),T=E.left+(C.clientLeft+parseFloat(_.paddingLeft))*k.x,N=E.top+(C.clientTop+parseFloat(_.paddingTop))*k.y;u*=k.x,f*=k.y,h*=k.x,m*=k.y,u+=T,f+=N,S=_r(C),C=Mw(S)}}return T0({width:h,height:m,x:u,y:f})}function s2(n,e){const t=Zv(n).scrollLeft;return e?e.left+t:Sl(fs(n)).left+t}function K3(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:s2(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function D$(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=fs(r),l=e?qv(e.floating):!1;if(r===o||l&&s)return t;let u={scrollLeft:0,scrollTop:0},f=ts(1);const h=ts(0),m=ss(r);if((m||!m&&!s)&&((uf(r)!=="body"||Op(o))&&(u=Zv(r)),ss(r))){const y=Sl(r);f=nu(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=o&&!m&&!s?K3(o,u,!0):ts(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:t.y*f.y-u.scrollTop*f.y+h.y+g.y}}function P$(n){return Array.from(n.getClientRects())}function j$(n){const e=fs(n),t=Zv(n),r=n.ownerDocument.body,i=kr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=kr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+s2(n);const l=-t.scrollTop;return Ai(r).direction==="rtl"&&(o+=kr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}function L$(n,e){const t=_r(n),r=fs(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;const f=r2();(!f||f&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:o,x:l,y:u}}function B$(n,e){const t=Sl(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=ss(n)?nu(n):ts(1),o=n.clientWidth*s.x,l=n.clientHeight*s.y,u=i*s.x,f=r*s.y;return{width:o,height:l,x:u,y:f}}function RA(n,e,t){let r;if(e==="viewport")r=L$(n,t);else if(e==="document")r=j$(fs(n));else if(Ti(e))r=B$(e,t);else{const i=W3(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return T0(r)}function Q3(n,e){const t=aa(n);return t===e||!Ti(t)||Pu(t)?!1:Ai(t).position==="fixed"||Q3(t,e)}function I$(n,e){const t=e.get(n);if(t)return t;let r=mh(n,[],!1).filter(l=>Ti(l)&&uf(l)!=="body"),i=null;const s=Ai(n).position==="fixed";let o=s?aa(n):n;for(;Ti(o)&&!Pu(o);){const l=Ai(o),u=n2(o);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Op(o)&&!u&&Q3(n,o))?r=r.filter(h=>h!==o):i=l,o=aa(o)}return e.set(n,r),r}function z$(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?qv(e)?[]:I$(e,this._c):[].concat(t),r],l=o[0],u=o.reduce((f,h)=>{const m=RA(e,h,i);return f.top=kr(m.top,f.top),f.right=sa(m.right,f.right),f.bottom=sa(m.bottom,f.bottom),f.left=kr(m.left,f.left),f},RA(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function $$(n){const{width:e,height:t}=G3(n);return{width:e,height:t}}function H$(n,e,t){const r=ss(e),i=fs(e),s=t==="fixed",o=Sl(n,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=ts(0);if(r||!r&&!s)if((uf(e)!=="body"||Op(i))&&(l=Zv(e)),r){const g=Sl(e,!0,s,e);u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}else i&&(u.x=s2(i));const f=i&&!r&&!s?K3(i,l):ts(0),h=o.left+l.scrollLeft-u.x-f.x,m=o.top+l.scrollTop-u.y-f.y;return{x:h,y:m,width:o.width,height:o.height}}function rx(n){return Ai(n).position==="static"}function _A(n,e){if(!ss(n)||Ai(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return fs(n)===t&&(t=t.ownerDocument.body),t}function Y3(n,e){const t=_r(n);if(qv(n))return t;if(!ss(n)){let i=aa(n);for(;i&&!Pu(i);){if(Ti(i)&&!rx(i))return i;i=aa(i)}return t}let r=_A(n,e);for(;r&&A$(r)&&rx(r);)r=_A(r,e);return r&&Pu(r)&&rx(r)&&!n2(r)?t:r||M$(n)||t}const V$=async function(n){const e=this.getOffsetParent||Y3,t=this.getDimensions,r=await t(n.floating);return{reference:H$(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function U$(n){return Ai(n).direction==="rtl"}const F$={convertOffsetParentRelativeRectToViewportRelativeRect:D$,getDocumentElement:fs,getClippingRect:z$,getOffsetParent:Y3,getElementRects:V$,getClientRects:P$,getDimensions:$$,getScale:nu,isElement:Ti,isRTL:U$};function q$(n,e){let t=null,r;const i=fs(n);function s(){var l;clearTimeout(r),(l=t)==null||l.disconnect(),t=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const{left:f,top:h,width:m,height:g}=n.getBoundingClientRect();if(l||e(),!m||!g)return;const y=fg(h),S=fg(i.clientWidth-(f+m)),C=fg(i.clientHeight-(h+g)),k=fg(f),_={rootMargin:-y+"px "+-S+"px "+-C+"px "+-k+"px",threshold:kr(0,sa(1,u))||1};let T=!0;function N(A){const O=A[0].intersectionRatio;if(O!==u){if(!T)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}T=!1}try{t=new IntersectionObserver(N,{..._,root:i.ownerDocument})}catch{t=new IntersectionObserver(N,_)}t.observe(n)}return o(!0),s}function Z$(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=i2(n),h=i||s?[...f?mh(f):[],...mh(e)]:[];h.forEach(E=>{i&&E.addEventListener("scroll",t,{passive:!0}),s&&E.addEventListener("resize",t)});const m=f&&l?q$(f,t):null;let g=-1,y=null;o&&(y=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(e)})),t()}),f&&!u&&y.observe(f),y.observe(e));let S,C=u?Sl(n):null;u&&k();function k(){const E=Sl(n);C&&(E.x!==C.x||E.y!==C.y||E.width!==C.width||E.height!==C.height)&&t(),C=E,S=requestAnimationFrame(k)}return t(),()=>{var E;h.forEach(_=>{i&&_.removeEventListener("scroll",t),s&&_.removeEventListener("resize",t)}),m==null||m(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(S)}}const G$=E$,W$=R$,K$=S$,Q$=T$,Y$=C$,TA=w$,X$=_$,J$=(n,e,t)=>{const r=new Map,i={platform:F$,...t},s={...i.platform,_c:r};return x$(n,e,{...i,platform:s})};var r0=typeof document<"u"?x.useLayoutEffect:x.useEffect;function A0(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!A0(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!A0(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function X3(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function AA(n,e){const t=X3(n);return Math.round(e*t)/t}function ix(n){const e=x.useRef(n);return r0(()=>{e.current=n}),e}function eH(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=n,[h,m]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);A0(g,r)||y(r);const[S,C]=x.useState(null),[k,E]=x.useState(null),_=x.useCallback(ie=>{ie!==O.current&&(O.current=ie,C(ie))},[]),T=x.useCallback(ie=>{ie!==D.current&&(D.current=ie,E(ie))},[]),N=s||S,A=o||k,O=x.useRef(null),D=x.useRef(null),B=x.useRef(h),P=u!=null,Z=ix(u),U=ix(i),$=ix(f),de=x.useCallback(()=>{if(!O.current||!D.current)return;const ie={placement:e,strategy:t,middleware:g};U.current&&(ie.platform=U.current),J$(O.current,D.current,ie).then(re=>{const L={...re,isPositioned:$.current!==!1};se.current&&!A0(B.current,L)&&(B.current=L,Ap.flushSync(()=>{m(L)}))})},[g,e,t,U,$]);r0(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,m(ie=>({...ie,isPositioned:!1})))},[f]);const se=x.useRef(!1);r0(()=>(se.current=!0,()=>{se.current=!1}),[]),r0(()=>{if(N&&(O.current=N),A&&(D.current=A),N&&A){if(Z.current)return Z.current(N,A,de);de()}},[N,A,de,Z,P]);const ce=x.useMemo(()=>({reference:O,floating:D,setReference:_,setFloating:T}),[_,T]),G=x.useMemo(()=>({reference:N,floating:A}),[N,A]),ue=x.useMemo(()=>{const ie={position:t,left:0,top:0};if(!G.floating)return ie;const re=AA(G.floating,h.x),L=AA(G.floating,h.y);return l?{...ie,transform:"translate("+re+"px, "+L+"px)",...X3(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:re,top:L}},[t,l,G.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:de,refs:ce,elements:G,floatingStyles:ue}),[h,de,ce,G,ue])}const tH=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?TA({element:r.current,padding:i}).fn(t):{}:r?TA({element:r,padding:i}).fn(t):{}}}},nH=(n,e)=>({...G$(n),options:[n,e]}),rH=(n,e)=>({...W$(n),options:[n,e]}),iH=(n,e)=>({...X$(n),options:[n,e]}),sH=(n,e)=>({...K$(n),options:[n,e]}),oH=(n,e)=>({...Q$(n),options:[n,e]}),aH=(n,e)=>({...Y$(n),options:[n,e]}),lH=(n,e)=>({...tH(n),options:[n,e]});var cH="Arrow",J3=x.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return b.jsx(lt.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});J3.displayName=cH;var uH=J3;function o2(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];function f(m){const{scope:g,children:y,...S}=m,C=(g==null?void 0:g[n][u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})}function h(m,g){const y=(g==null?void 0:g[n][u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,fH(i,...e)]}function fH(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function a2(n){const[e,t]=x.useState(void 0);return _i(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,l;if("borderBoxSize"in s){const u=s.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=n.offsetWidth,l=n.offsetHeight;t({width:o,height:l})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var l2="Popper",[e4,ff]=o2(l2),[dH,t4]=e4(l2),n4=n=>{const{__scopePopper:e,children:t}=n,[r,i]=x.useState(null);return b.jsx(dH,{scope:e,anchor:r,onAnchorChange:i,children:t})};n4.displayName=l2;var r4="PopperAnchor",i4=x.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=t4(r4,t),o=x.useRef(null),l=Pt(e,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(lt.div,{...i,ref:l})});i4.displayName=r4;var c2="PopperContent",[hH,pH]=e4(c2),s4=x.forwardRef((n,e)=>{var me,ye,_e,Ne,Xe,xt;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:S,...C}=n,k=t4(c2,t),[E,_]=x.useState(null),T=Pt(e,qe=>_(qe)),[N,A]=x.useState(null),O=a2(N),D=(O==null?void 0:O.width)??0,B=(O==null?void 0:O.height)??0,P=r+(s!=="center"?"-"+s:""),Z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},U=Array.isArray(f)?f:[f],$=U.length>0,de={padding:Z,boundary:U.filter(gH),altBoundary:$},{refs:se,floatingStyles:ce,placement:G,isPositioned:ue,middlewareData:ie}=eH({strategy:"fixed",placement:P,whileElementsMounted:(...qe)=>Z$(...qe,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[nH({mainAxis:i+B,alignmentAxis:o}),u&&rH({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?iH():void 0,...de}),u&&sH({...de}),oH({...de,apply:({elements:qe,rects:Ut,availableWidth:qn,availableHeight:Nn})=>{const{width:ur,height:Ft}=Ut.reference,ci=qe.floating.style;ci.setProperty("--radix-popper-available-width",`${qn}px`),ci.setProperty("--radix-popper-available-height",`${Nn}px`),ci.setProperty("--radix-popper-anchor-width",`${ur}px`),ci.setProperty("--radix-popper-anchor-height",`${Ft}px`)}}),N&&lH({element:N,padding:l}),vH({arrowWidth:D,arrowHeight:B}),g&&aH({strategy:"referenceHidden",...de})]}),[re,L]=l4(G),te=un(S);_i(()=>{ue&&(te==null||te())},[ue,te]);const F=(me=ie.arrow)==null?void 0:me.x,H=(ye=ie.arrow)==null?void 0:ye.y,Q=((_e=ie.arrow)==null?void 0:_e.centerOffset)!==0,[X,ne]=x.useState();return _i(()=>{E&&ne(window.getComputedStyle(E).zIndex)},[E]),b.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ue?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(Ne=ie.transformOrigin)==null?void 0:Ne.x,(Xe=ie.transformOrigin)==null?void 0:Xe.y].join(" "),...((xt=ie.hide)==null?void 0:xt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:b.jsx(hH,{scope:t,placedSide:re,onArrowChange:A,arrowX:F,arrowY:H,shouldHideArrow:Q,children:b.jsx(lt.div,{"data-side":re,"data-align":L,...C,ref:T,style:{...C.style,animation:ue?void 0:"none"}})})})});s4.displayName=c2;var o4="PopperArrow",mH={top:"bottom",right:"left",bottom:"top",left:"right"},a4=x.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=pH(o4,r),o=mH[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(uH,{...i,ref:t,style:{...i.style,display:"block"}})})});a4.displayName=o4;function gH(n){return n!==null}var vH=n=>({name:"transformOrigin",options:n,fn(e){var k,E,_;const{placement:t,rects:r,middlewareData:i}=e,o=((k=i.arrow)==null?void 0:k.centerOffset)!==0,l=o?0:n.arrowWidth,u=o?0:n.arrowHeight,[f,h]=l4(t),m={start:"0%",center:"50%",end:"100%"}[h],g=(((E=i.arrow)==null?void 0:E.x)??0)+l/2,y=(((_=i.arrow)==null?void 0:_.y)??0)+u/2;let S="",C="";return f==="bottom"?(S=o?m:`${g}px`,C=`${-u}px`):f==="top"?(S=o?m:`${g}px`,C=`${r.floating.height+u}px`):f==="right"?(S=`${-u}px`,C=o?m:`${y}px`):f==="left"&&(S=`${r.floating.width+u}px`,C=o?m:`${y}px`),{data:{x:S,y:C}}}});function l4(n){const[e,t="center"]=n.split("-");return[e,t]}var u2=n4,Gv=i4,f2=s4,d2=a4,yH="Portal",Wv=x.forwardRef((n,e)=>{var l;const{container:t,...r}=n,[i,s]=x.useState(!1);_i(()=>s(!0),[]);const o=t||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?z3.createPortal(b.jsx(lt.div,{...r,ref:e}),o):null});Wv.displayName=yH;function bH(n,e){return x.useReducer((t,r)=>e[t][r]??t,n)}var or=n=>{const{present:e,children:t}=n,r=xH(e),i=typeof t=="function"?t({present:r.isPresent}):x.Children.only(t),s=Pt(r.ref,wH(i));return typeof t=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};or.displayName="Presence";function xH(n){const[e,t]=x.useState(),r=x.useRef({}),i=x.useRef(n),s=x.useRef("none"),o=n?"mounted":"unmounted",[l,u]=bH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=dg(r.current);s.current=l==="mounted"?f:"none"},[l]),_i(()=>{const f=r.current,h=i.current;if(h!==n){const g=s.current,y=dg(f);n?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,u]),_i(()=>{if(e){let f;const h=e.ownerDocument.defaultView??window,m=y=>{const C=dg(r.current).includes(y.animationName);if(y.target===e&&C&&(u("ANIMATION_END"),!i.current)){const k=e.style.animationFillMode;e.style.animationFillMode="forwards",f=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=k)})}},g=y=>{y.target===e&&(s.current=dg(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{h.clearTimeout(f),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(f=>{f&&(r.current=getComputedStyle(f)),t(f)},[])}}function dg(n){return(n==null?void 0:n.animationName)||"none"}function wH(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function Js({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=SH({defaultProp:e,onChange:t}),s=n!==void 0,o=s?n:r,l=un(t),u=x.useCallback(f=>{if(s){const m=typeof f=="function"?f(n):f;m!==n&&l(m)}else i(f)},[s,n,i,l]);return[o,u]}function SH({defaultProp:n,onChange:e}){const t=x.useState(n),[r]=t,i=x.useRef(r),s=un(e);return x.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),t}var CH="VisuallyHidden",c4=x.forwardRef((n,e)=>b.jsx(lt.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));c4.displayName=CH;var kH=c4,[Kv,Zfe]=us("Tooltip",[ff]),Qv=ff(),u4="TooltipProvider",EH=700,Ow="tooltip.open",[RH,h2]=Kv(u4),f4=n=>{const{__scopeTooltip:e,delayDuration:t=EH,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,[o,l]=x.useState(!0),u=x.useRef(!1),f=x.useRef(0);return x.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),b.jsx(RH,{scope:e,isOpenDelayed:o,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(f.current),l(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:x.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:s})};f4.displayName=u4;var Yv="Tooltip",[_H,Np]=Kv(Yv),d4=n=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=n,u=h2(Yv,n.__scopeTooltip),f=Qv(e),[h,m]=x.useState(null),g=Si(),y=x.useRef(0),S=o??u.disableHoverableContent,C=l??u.delayDuration,k=x.useRef(!1),[E=!1,_]=Js({prop:r,defaultProp:i,onChange:D=>{D?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ow))):u.onClose(),s==null||s(D)}}),T=x.useMemo(()=>E?k.current?"delayed-open":"instant-open":"closed",[E]),N=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,_(!0)},[_]),A=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),O=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,_(!0),y.current=0},C)},[C,_]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),b.jsx(u2,{...f,children:b.jsx(_H,{scope:e,contentId:g,open:E,stateAttribute:T,trigger:h,onTriggerChange:m,onTriggerEnter:x.useCallback(()=>{u.isOpenDelayed?O():N()},[u.isOpenDelayed,O,N]),onTriggerLeave:x.useCallback(()=>{S?A():(window.clearTimeout(y.current),y.current=0)},[A,S]),onOpen:N,onClose:A,disableHoverableContent:S,children:t})})};d4.displayName=Yv;var Nw="TooltipTrigger",h4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Np(Nw,t),s=h2(Nw,t),o=Qv(t),l=x.useRef(null),u=Pt(e,l,i.onTriggerChange),f=x.useRef(!1),h=x.useRef(!1),m=x.useCallback(()=>f.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),b.jsx(Gv,{asChild:!0,...o,children:b.jsx(lt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Oe(n.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Oe(n.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Oe(n.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Oe(n.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(n.onBlur,i.onClose),onClick:Oe(n.onClick,i.onClose)})})});h4.displayName=Nw;var p2="TooltipPortal",[TH,AH]=Kv(p2,{forceMount:void 0}),p4=n=>{const{__scopeTooltip:e,forceMount:t,children:r,container:i}=n,s=Np(p2,e);return b.jsx(TH,{scope:e,forceMount:t,children:b.jsx(or,{present:t||s.open,children:b.jsx(Wv,{asChild:!0,container:i,children:r})})})};p4.displayName=p2;var ju="TooltipContent",m4=x.forwardRef((n,e)=>{const t=AH(ju,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=Np(ju,n.__scopeTooltip);return b.jsx(or,{present:r||o.open,children:o.disableHoverableContent?b.jsx(g4,{side:i,...s,ref:e}):b.jsx(MH,{side:i,...s,ref:e})})}),MH=x.forwardRef((n,e)=>{const t=Np(ju,n.__scopeTooltip),r=h2(ju,n.__scopeTooltip),i=x.useRef(null),s=Pt(e,i),[o,l]=x.useState(null),{trigger:u,onClose:f}=t,h=i.current,{onPointerInTransitChange:m}=r,g=x.useCallback(()=>{l(null),m(!1)},[m]),y=x.useCallback((S,C)=>{const k=S.currentTarget,E={x:S.clientX,y:S.clientY},_=PH(E,k.getBoundingClientRect()),T=jH(E,_),N=LH(C.getBoundingClientRect()),A=IH([...T,...N]);l(A),m(!0)},[m]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(u&&h){const S=k=>y(k,h),C=k=>y(k,u);return u.addEventListener("pointerleave",S),h.addEventListener("pointerleave",C),()=>{u.removeEventListener("pointerleave",S),h.removeEventListener("pointerleave",C)}}},[u,h,y,g]),x.useEffect(()=>{if(o){const S=C=>{const k=C.target,E={x:C.clientX,y:C.clientY},_=(u==null?void 0:u.contains(k))||(h==null?void 0:h.contains(k)),T=!BH(E,o);_?g():T&&(g(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[u,h,o,f,g]),b.jsx(g4,{...n,ref:s})}),[OH,NH]=Kv(Yv,{isInside:!1}),g4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=n,u=Np(ju,t),f=Qv(t),{onClose:h}=u;return x.useEffect(()=>(document.addEventListener(Ow,h),()=>document.removeEventListener(Ow,h)),[h]),x.useEffect(()=>{if(u.trigger){const m=g=>{const y=g.target;y!=null&&y.contains(u.trigger)&&h()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,h]),b.jsx(Mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:m=>m.preventDefault(),onDismiss:h,children:b.jsxs(f2,{"data-state":u.stateAttribute,...f,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx($3,{children:r}),b.jsx(OH,{scope:t,isInside:!0,children:b.jsx(kH,{id:u.contentId,role:"tooltip",children:i||r})})]})})});m4.displayName=ju;var v4="TooltipArrow",DH=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Qv(t);return NH(v4,t).isInside?null:b.jsx(d2,{...i,...r,ref:e})});DH.displayName=v4;function PH(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function jH(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function LH(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function BH(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;sr!=h>r&&t<(f-l)*(r-u)/(h-u)+l&&(i=!i)}return i}function IH(n){const e=n.slice();return e.sort((t,r)=>t.xr.x?1:t.yr.y?1:0),zH(e)}function zH(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var $H=f4,HH=d4,VH=h4,UH=p4,y4=m4;function b4(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e{const e=ZH(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const l=o.split(g2);return l[0]===""&&l.length!==1&&l.shift(),x4(l,e)||qH(o)},getConflictingClassGroupIds:(o,l)=>{const u=t[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},x4=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?x4(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(g2);return(o=e.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},MA=/^\[(.+)\]$/,qH=n=>{if(MA.test(n)){const e=MA.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},ZH=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return WH(Object.entries(n.classGroups),t).forEach(([s,o])=>{Dw(o,r,s,e)}),r},Dw=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:OA(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(GH(i)){Dw(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{Dw(o,OA(e,s),t,r)})})},OA=(n,e)=>{let t=n;return e.split(g2).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},GH=n=>n.isThemeGetter,WH=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,l])=>[e+o,l])):s);return[t,i]}):n,KH=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},w4="!",QH=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=l=>{const u=[];let f=0,h=0,m;for(let k=0;kh?m-h:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:C}};return t?l=>t({className:l,parseClassName:o}):o},YH=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},XH=n=>({cache:KH(n.cacheSize),parseClassName:QH(n),...FH(n)}),JH=/\s+/,eV=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(JH);let l="";for(let u=o.length-1;u>=0;u-=1){const f=o[u],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=t(f);let S=!!y,C=r(S?g.substring(0,y):g);if(!C){if(!S){l=f+(l.length>0?" "+l:l);continue}if(C=r(g),!C){l=f+(l.length>0?" "+l:l);continue}S=!1}const k=YH(h).join(":"),E=m?k+w4:k,_=E+C;if(s.includes(_))continue;s.push(_);const T=i(C,S);for(let N=0;N0?" "+l:l)}return l};function tV(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rm(h),n());return t=XH(f),r=t.cache.get,i=t.cache.set,s=l,l(u)}function l(u){const f=r(u);if(f)return f;const h=eV(u,t);return i(u,h),h}return function(){return s(tV.apply(null,arguments))}}const Ot=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},C4=/^\[(?:([a-z-]+):)?(.+)\]$/i,rV=/^\d+\/\d+$/,iV=new Set(["px","full","screen"]),sV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,aV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ps=n=>ru(n)||iV.has(n)||rV.test(n),Eo=n=>df(n,"length",vV),ru=n=>!!n&&!Number.isNaN(Number(n)),sx=n=>df(n,"number",ru),wd=n=>!!n&&Number.isInteger(Number(n)),uV=n=>n.endsWith("%")&&ru(n.slice(0,-1)),Ye=n=>C4.test(n),Ro=n=>sV.test(n),fV=new Set(["length","size","percentage"]),dV=n=>df(n,fV,k4),hV=n=>df(n,"position",k4),pV=new Set(["image","url"]),mV=n=>df(n,pV,bV),gV=n=>df(n,"",yV),Sd=()=>!0,df=(n,e,t)=>{const r=C4.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},vV=n=>oV.test(n)&&!aV.test(n),k4=()=>!1,yV=n=>lV.test(n),bV=n=>cV.test(n),xV=()=>{const n=Ot("colors"),e=Ot("spacing"),t=Ot("blur"),r=Ot("brightness"),i=Ot("borderColor"),s=Ot("borderRadius"),o=Ot("borderSpacing"),l=Ot("borderWidth"),u=Ot("contrast"),f=Ot("grayscale"),h=Ot("hueRotate"),m=Ot("invert"),g=Ot("gap"),y=Ot("gradientColorStops"),S=Ot("gradientColorStopPositions"),C=Ot("inset"),k=Ot("margin"),E=Ot("opacity"),_=Ot("padding"),T=Ot("saturate"),N=Ot("scale"),A=Ot("sepia"),O=Ot("skew"),D=Ot("space"),B=Ot("translate"),P=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ye,e],$=()=>[Ye,e],de=()=>["",Ps,Eo],se=()=>["auto",ru,Ye],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Ye],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[ru,Ye];return{cacheSize:500,separator:":",theme:{colors:[Sd],spacing:[Ps,Eo],blur:["none","",Ro,Ye],brightness:te(),borderColor:[n],borderRadius:["none","","full",Ro,Ye],borderSpacing:$(),borderWidth:de(),contrast:te(),grayscale:re(),hueRotate:te(),invert:re(),gap:$(),gradientColorStops:[n],gradientColorStopPositions:[uV,Eo],inset:U(),margin:U(),opacity:te(),padding:$(),saturate:te(),scale:te(),sepia:re(),skew:te(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[Ro]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Ye]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wd,Ye]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",wd,Ye]}],"grid-cols":[{"grid-cols":[Sd]}],"col-start-end":[{col:["auto",{span:["full",wd,Ye]},Ye]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Sd]}],"row-start-end":[{row:["auto",{span:[wd,Ye]},Ye]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,e]}],"min-w":[{"min-w":[Ye,e,"min","max","fit"]}],"max-w":[{"max-w":[Ye,e,"none","full","min","max","fit","prose",{screen:[Ro]},Ro]}],h:[{h:[Ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ro,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sx]}],"font-family":[{font:[Sd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",ru,sx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ps,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ps,Eo]}],"underline-offset":[{"underline-offset":["auto",Ps,Ye]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),hV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mV]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[Ps,Ye]}],"outline-w":[{outline:[Ps,Eo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ps,Eo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Ro,gV]}],"shadow-color":[{shadow:[Sd]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ro,Ye]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[T]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[wd,Ye]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Ps,Eo,sx]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},E4=nV(xV);function nt(...n){return E4(m2(n))}const wV=$H,Dp=HH,Pp=VH,hf=x.forwardRef(({className:n,sideOffset:e=4,...t},r)=>b.jsx(UH,{children:b.jsx(y4,{ref:r,sideOffset:e,className:nt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",n),...t})}));hf.displayName=y4.displayName;var pf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cl=typeof window>"u"||"Deno"in globalThis;function Zr(){}function SV(n,e){return typeof n=="function"?n(e):n}function Pw(n){return typeof n=="number"&&n>=0&&n!==1/0}function R4(n,e){return Math.max(n+(e||0)-Date.now(),0)}function iu(n,e){return typeof n=="function"?n(e):n}function yi(n,e){return typeof n=="function"?n(e):n}function NA(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=n;if(o){if(r){if(e.queryHash!==v2(o,e.options))return!1}else if(!gh(e.queryKey,o))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function DA(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(kl(e.options.mutationKey)!==kl(s))return!1}else if(!gh(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function v2(n,e){return((e==null?void 0:e.queryKeyHashFn)||kl)(n)}function kl(n){return JSON.stringify(n,(e,t)=>jw(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function gh(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!gh(n[t],e[t])):!1}function _4(n,e){if(n===e)return n;const t=PA(n)&&PA(e);if(t||jw(n)&&jw(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,l=t?[]:{};let u=0;for(let f=0;f{setTimeout(e,n)})}function Lw(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?_4(n,e):e}function kV(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function EV(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var y2=Symbol();function T4(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===y2?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var rl,Lo,xu,w3,RV=(w3=class extends pf{constructor(){super();Te(this,rl);Te(this,Lo);Te(this,xu);be(this,xu,e=>{if(!Cl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){j(this,Lo)||this.setEventListener(j(this,xu))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Lo))==null||e.call(this),be(this,Lo,void 0))}setEventListener(e){var t;be(this,xu,e),(t=j(this,Lo))==null||t.call(this),be(this,Lo,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,rl)!==e&&(be(this,rl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof j(this,rl)=="boolean"?j(this,rl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},rl=new WeakMap,Lo=new WeakMap,xu=new WeakMap,w3),b2=new RV,wu,Bo,Su,S3,_V=(S3=class extends pf{constructor(){super();Te(this,wu,!0);Te(this,Bo);Te(this,Su);be(this,Su,e=>{if(!Cl&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,Bo)||this.setEventListener(j(this,Su))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Bo))==null||e.call(this),be(this,Bo,void 0))}setEventListener(e){var t;be(this,Su,e),(t=j(this,Bo))==null||t.call(this),be(this,Bo,e(this.setOnline.bind(this)))}setOnline(e){j(this,wu)!==e&&(be(this,wu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return j(this,wu)}},wu=new WeakMap,Bo=new WeakMap,Su=new WeakMap,S3),O0=new _V;function Bw(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function TV(n){return Math.min(1e3*2**n,3e4)}function A4(n){return(n??"online")==="online"?O0.isOnline():!0}var M4=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ox(n){return n instanceof M4}function O4(n){let e=!1,t=0,r=!1,i;const s=Bw(),o=C=>{var k;r||(g(new M4(C)),(k=n.abort)==null||k.call(n))},l=()=>{e=!0},u=()=>{e=!1},f=()=>b2.isFocused()&&(n.networkMode==="always"||O0.isOnline())&&n.canRun(),h=()=>A4(n.networkMode)&&n.canRun(),m=C=>{var k;r||(r=!0,(k=n.onSuccess)==null||k.call(n,C),i==null||i(),s.resolve(C))},g=C=>{var k;r||(r=!0,(k=n.onError)==null||k.call(n,C),i==null||i(),s.reject(C))},y=()=>new Promise(C=>{var k;i=E=>{(r||f())&&C(E)},(k=n.onPause)==null||k.call(n)}).then(()=>{var C;i=void 0,r||(C=n.onContinue)==null||C.call(n)}),S=()=>{if(r)return;let C;const k=t===0?n.initialPromise:void 0;try{C=k??n.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(m).catch(E=>{var O;if(r)return;const _=n.retry??(Cl?0:3),T=n.retryDelay??TV,N=typeof T=="function"?T(t,E):T,A=_===!0||typeof _=="number"&&t<_||typeof _=="function"&&_(t,E);if(e||!A){g(E);return}t++,(O=n.onFail)==null||O.call(n,t,E),CV(N).then(()=>f()?void 0:y()).then(()=>{e?g(E):S()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?S():y().then(S),s)}}function AV(){let n=[],e=0,t=l=>{l()},r=l=>{l()},i=l=>setTimeout(l,0);const s=l=>{e?n.push(l):i(()=>{t(l)})},o=()=>{const l=n;n=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{t(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{t=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var nn=AV(),il,C3,N4=(C3=class{constructor(){Te(this,il)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pw(this.gcTime)&&be(this,il,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Cl?1/0:5*60*1e3))}clearGcTimeout(){j(this,il)&&(clearTimeout(j(this,il)),be(this,il,void 0))}},il=new WeakMap,C3),Cu,ku,qr,kn,Cp,sl,mi,js,k3,MV=(k3=class extends N4{constructor(e){super();Te(this,mi);Te(this,Cu);Te(this,ku);Te(this,qr);Te(this,kn);Te(this,Cp);Te(this,sl);be(this,sl,!1),be(this,Cp,e.defaultOptions),this.setOptions(e.options),this.observers=[],be(this,qr,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,be(this,Cu,OV(this.options)),this.state=e.state??j(this,Cu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,kn))==null?void 0:e.promise}setOptions(e){this.options={...j(this,Cp),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,qr).remove(this)}setData(e,t){const r=Lw(this.state.data,e,this.options);return Ve(this,mi,js).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){Ve(this,mi,js).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=j(this,kn))==null?void 0:r.promise;return(i=j(this,kn))==null||i.cancel(e),t?t.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Cu))}isActive(){return this.observers.some(e=>yi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!R4(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,qr).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(j(this,kn)&&(j(this,sl)?j(this,kn).cancel({revert:!0}):j(this,kn).cancelRetry()),this.scheduleGc()),j(this,qr).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,mi,js).call(this,{type:"invalidate"})}fetch(e,t){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(j(this,kn))return j(this,kn).continueRetry(),j(this,kn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(be(this,sl,!0),r.signal)})},s=()=>{const m=T4(this.options,t),g={queryKey:this.queryKey,meta:this.meta};return i(g),be(this,sl,!1),this.options.persister?this.options.persister(m,g,this):m(g)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(u=this.options.behavior)==null||u.onFetch(o,this),be(this,ku,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ve(this,mi,js).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta});const l=m=>{var g,y,S,C;ox(m)&&m.silent||Ve(this,mi,js).call(this,{type:"error",error:m}),ox(m)||((y=(g=j(this,qr).config).onError)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,this.state.data,m,this)),this.scheduleGc()};return be(this,kn,O4({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,y,S,C;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(k){l(k);return}(y=(g=j(this,qr).config).onSuccess)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{Ve(this,mi,js).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{Ve(this,mi,js).call(this,{type:"pause"})},onContinue:()=>{Ve(this,mi,js).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,kn).start()}},Cu=new WeakMap,ku=new WeakMap,qr=new WeakMap,kn=new WeakMap,Cp=new WeakMap,sl=new WeakMap,mi=new WeakSet,js=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...D4(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return ox(i)&&i.revert&&j(this,ku)?{...j(this,ku),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,qr).notify({query:this,type:"updated",action:e})})},k3);function D4(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A4(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function OV(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Gi,E3,NV=(E3=class extends pf{constructor(e={}){super();Te(this,Gi);this.config=e,be(this,Gi,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??v2(i,t);let o=this.get(s);return o||(o=new MV({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){j(this,Gi).has(e.queryHash)||(j(this,Gi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=j(this,Gi).get(e.queryHash);t&&(e.destroy(),t===e&&j(this,Gi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,Gi).get(e)}getAll(){return[...j(this,Gi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>NA(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>NA(e,r)):t}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gi=new WeakMap,E3),Wi,jn,ol,Ki,_o,R3,DV=(R3=class extends N4{constructor(e){super();Te(this,Ki);Te(this,Wi);Te(this,jn);Te(this,ol);this.mutationId=e.mutationId,be(this,jn,e.mutationCache),be(this,Wi,[]),this.state=e.state||P4(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,Wi).includes(e)||(j(this,Wi).push(e),this.clearGcTimeout(),j(this,jn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){be(this,Wi,j(this,Wi).filter(t=>t!==e)),this.scheduleGc(),j(this,jn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():j(this,jn).remove(this))}continue(){var e;return((e=j(this,ol))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,l,u,f,h,m,g,y,S,C,k,E,_,T,N,A,O,D;be(this,ol,O4({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(B,P)=>{Ve(this,Ki,_o).call(this,{type:"failed",failureCount:B,error:P})},onPause:()=>{Ve(this,Ki,_o).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Ki,_o).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,jn).canRun(this)}));const t=this.state.status==="pending",r=!j(this,ol).canStart();try{if(!t){Ve(this,Ki,_o).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=j(this,jn).config).onMutate)==null?void 0:s.call(i,e,this));const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e));P!==this.state.context&&Ve(this,Ki,_o).call(this,{type:"pending",context:P,variables:e,isPaused:r})}const B=await j(this,ol).start();return await((f=(u=j(this,jn).config).onSuccess)==null?void 0:f.call(u,B,e,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,B,e,this.state.context)),await((y=(g=j(this,jn).config).onSettled)==null?void 0:y.call(g,B,null,this.state.variables,this.state.context,this)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,B,null,e,this.state.context)),Ve(this,Ki,_o).call(this,{type:"success",data:B}),B}catch(B){try{throw await((E=(k=j(this,jn).config).onError)==null?void 0:E.call(k,B,e,this.state.context,this)),await((T=(_=this.options).onError)==null?void 0:T.call(_,B,e,this.state.context)),await((A=(N=j(this,jn).config).onSettled)==null?void 0:A.call(N,void 0,B,this.state.variables,this.state.context,this)),await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,e,this.state.context)),B}finally{Ve(this,Ki,_o).call(this,{type:"error",error:B})}}finally{j(this,jn).runNext(this)}}},Wi=new WeakMap,jn=new WeakMap,ol=new WeakMap,Ki=new WeakSet,_o=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),nn.batch(()=>{j(this,Wi).forEach(r=>{r.onMutationUpdate(e)}),j(this,jn).notify({mutation:this,type:"updated",action:e})})},R3);function P4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,kp,_3,PV=(_3=class extends pf{constructor(e={}){super();Te(this,xr);Te(this,kp);this.config=e,be(this,xr,new Map),be(this,kp,Date.now())}build(e,t,r){const i=new DV({mutationCache:this,mutationId:++bd(this,kp)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){const t=hg(e),r=j(this,xr).get(t)??[];r.push(e),j(this,xr).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var r;const t=hg(e);if(j(this,xr).has(t)){const i=(r=j(this,xr).get(t))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?j(this,xr).delete(t):j(this,xr).set(t,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!t||t===e}runNext(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...j(this,xr).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(r=>DA(t,r))}findAll(e={}){return this.getAll().filter(t=>DA(e,t))}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return nn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zr))))}},xr=new WeakMap,kp=new WeakMap,_3);function hg(n){var e;return((e=n.options.scope)==null?void 0:e.id)??String(n.mutationId)}function LA(n){return{onFetch:(e,t)=>{var h,m,g,y,S;const r=e.options,i=(g=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,s=((y=e.state.data)==null?void 0:y.pages)||[],o=((S=e.state.data)==null?void 0:S.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let C=!1;const k=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(e.signal.aborted?C=!0:e.signal.addEventListener("abort",()=>{C=!0}),e.signal)})},E=T4(e.options,e.fetchOptions),_=async(T,N,A)=>{if(C)return Promise.reject();if(N==null&&T.pages.length)return Promise.resolve(T);const O={queryKey:e.queryKey,pageParam:N,direction:A?"backward":"forward",meta:e.options.meta};k(O);const D=await E(O),{maxPages:B}=e.options,P=A?EV:kV;return{pages:P(T.pages,D,B),pageParams:P(T.pageParams,N,B)}};if(i&&s.length){const T=i==="backward",N=T?jV:BA,A={pages:s,pageParams:o},O=N(r,A);l=await _(A,O,T)}else{const T=n??s.length;do{const N=u===0?o[0]??r.initialPageParam:BA(r,l);if(u>0&&N==null)break;l=await _(l,N),u++}while(u{var C,k;return(k=(C=e.options).persister)==null?void 0:k.call(C,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=f}}}function BA(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function jV(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Vt,Io,zo,Eu,Ru,$o,_u,Tu,T3,LV=(T3=class{constructor(n={}){Te(this,Vt);Te(this,Io);Te(this,zo);Te(this,Eu);Te(this,Ru);Te(this,$o);Te(this,_u);Te(this,Tu);be(this,Vt,n.queryCache||new NV),be(this,Io,n.mutationCache||new PV),be(this,zo,n.defaultOptions||{}),be(this,Eu,new Map),be(this,Ru,new Map),be(this,$o,0)}mount(){bd(this,$o)._++,j(this,$o)===1&&(be(this,_u,b2.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onFocus())})),be(this,Tu,O0.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onOnline())})))}unmount(){var n,e;bd(this,$o)._--,j(this,$o)===0&&((n=j(this,_u))==null||n.call(this),be(this,_u,void 0),(e=j(this,Tu))==null||e.call(this),be(this,Tu,void 0))}isFetching(n){return j(this,Vt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,Io).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.getQueryData(n.queryKey);if(e===void 0)return this.fetchQuery(n);{const t=this.defaultQueryOptions(n),r=j(this,Vt).build(this,t);return n.revalidateIfStale&&r.isStaleByTime(iu(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(n){return j(this,Vt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=j(this,Vt).get(r.queryHash),s=i==null?void 0:i.state.data,o=SV(e,s);if(o!==void 0)return j(this,Vt).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return nn.batch(()=>j(this,Vt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=j(this,Vt);nn.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=j(this,Vt),r={type:"active",...n};return nn.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(n={},e={}){const t={revert:!0,...e},r=nn.batch(()=>j(this,Vt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Zr).catch(Zr)}invalidateQueries(n={},e={}){return nn.batch(()=>{if(j(this,Vt).findAll(n).forEach(r=>{r.invalidate()}),n.refetchType==="none")return Promise.resolve();const t={...n,type:n.refetchType??n.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(n={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=nn.batch(()=>j(this,Vt).findAll(n).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Zr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zr)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=j(this,Vt).build(this,e);return t.isStaleByTime(iu(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Zr).catch(Zr)}fetchInfiniteQuery(n){return n.behavior=LA(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Zr).catch(Zr)}ensureInfiniteQueryData(n){return n.behavior=LA(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return O0.isOnline()?j(this,Io).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Vt)}getMutationCache(){return j(this,Io)}getDefaultOptions(){return j(this,zo)}setDefaultOptions(n){be(this,zo,n)}setQueryDefaults(n,e){j(this,Eu).set(kl(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...j(this,Eu).values()];let t={};return e.forEach(r=>{gh(n,r.queryKey)&&(t={...t,...r.defaultOptions})}),t}setMutationDefaults(n,e){j(this,Ru).set(kl(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...j(this,Ru).values()];let t={};return e.forEach(r=>{gh(n,r.mutationKey)&&(t={...t,...r.defaultOptions})}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...j(this,zo).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=v2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===y2&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,zo).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,Vt).clear(),j(this,Io).clear()}},Vt=new WeakMap,Io=new WeakMap,zo=new WeakMap,Eu=new WeakMap,Ru=new WeakMap,$o=new WeakMap,_u=new WeakMap,Tu=new WeakMap,T3),Qn,ut,Ep,Ln,al,Au,Ho,Qi,Rp,Mu,Ou,ll,cl,Vo,Nu,bt,Pd,Iw,zw,$w,Hw,Vw,Uw,Fw,j4,A3,BV=(A3=class extends pf{constructor(e,t){super();Te(this,bt);Te(this,Qn);Te(this,ut);Te(this,Ep);Te(this,Ln);Te(this,al);Te(this,Au);Te(this,Ho);Te(this,Qi);Te(this,Rp);Te(this,Mu);Te(this,Ou);Te(this,ll);Te(this,cl);Te(this,Vo);Te(this,Nu,new Set);this.options=t,be(this,Qn,e),be(this,Qi,null),be(this,Ho,Bw()),this.options.experimental_prefetchInRender||j(this,Ho).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ut).addObserver(this),IA(j(this,ut),this.options)?Ve(this,bt,Pd).call(this):this.updateResult(),Ve(this,bt,Hw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qw(j(this,ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qw(j(this,ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ve(this,bt,Vw).call(this),Ve(this,bt,Uw).call(this),j(this,ut).removeObserver(this)}setOptions(e,t){const r=this.options,i=j(this,ut);if(this.options=j(this,Qn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,j(this,ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ve(this,bt,Fw).call(this),j(this,ut).setOptions(this.options),r._defaulted&&!M0(this.options,r)&&j(this,Qn).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ut),observer:this});const s=this.hasListeners();s&&zA(j(this,ut),i,this.options,r)&&Ve(this,bt,Pd).call(this),this.updateResult(t),s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||iu(this.options.staleTime,j(this,ut))!==iu(r.staleTime,j(this,ut)))&&Ve(this,bt,Iw).call(this);const o=Ve(this,bt,zw).call(this);s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||o!==j(this,Vo))&&Ve(this,bt,$w).call(this,o)}getOptimisticResult(e){const t=j(this,Qn).getQueryCache().build(j(this,Qn),e),r=this.createResult(t,e);return zV(this,r)&&(be(this,Ln,r),be(this,Au,this.options),be(this,al,j(this,ut).state)),r}getCurrentResult(){return j(this,Ln)}trackResult(e,t){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t==null||t(i),e[i])})}),r}trackProp(e){j(this,Nu).add(e)}getCurrentQuery(){return j(this,ut)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=j(this,Qn).defaultQueryOptions(e),r=j(this,Qn).getQueryCache().build(j(this,Qn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return Ve(this,bt,Pd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Ln)))}createResult(e,t){var B;const r=j(this,ut),i=this.options,s=j(this,Ln),o=j(this,al),l=j(this,Au),f=e!==r?e.state:j(this,Ep),{state:h}=e;let m={...h},g=!1,y;if(t._optimisticResults){const P=this.hasListeners(),Z=!P&&IA(e,t),U=P&&zA(e,r,t,i);(Z||U)&&(m={...m,...D4(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:C,status:k}=m;if(t.select&&m.data!==void 0)if(s&&m.data===(o==null?void 0:o.data)&&t.select===j(this,Rp))y=j(this,Mu);else try{be(this,Rp,t.select),y=t.select(m.data),y=Lw(s==null?void 0:s.data,y,t),be(this,Mu,y),be(this,Qi,null)}catch(P){be(this,Qi,P)}else y=m.data;if(t.placeholderData!==void 0&&y===void 0&&k==="pending"){let P;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(l==null?void 0:l.placeholderData))P=s.data;else if(P=typeof t.placeholderData=="function"?t.placeholderData((B=j(this,Ou))==null?void 0:B.state.data,j(this,Ou)):t.placeholderData,t.select&&P!==void 0)try{P=t.select(P),be(this,Qi,null)}catch(Z){be(this,Qi,Z)}P!==void 0&&(k="success",y=Lw(s==null?void 0:s.data,P,t),g=!0)}j(this,Qi)&&(S=j(this,Qi),y=j(this,Mu),C=Date.now(),k="error");const E=m.fetchStatus==="fetching",_=k==="pending",T=k==="error",N=_&&E,A=y!==void 0,D={status:k,fetchStatus:m.fetchStatus,isPending:_,isSuccess:k==="success",isError:T,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:C,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:T&&!A,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&A,isStale:x2(e,t),refetch:this.refetch,promise:j(this,Ho)};if(this.options.experimental_prefetchInRender){const P=$=>{D.status==="error"?$.reject(D.error):D.data!==void 0&&$.resolve(D.data)},Z=()=>{const $=be(this,Ho,D.promise=Bw());P($)},U=j(this,Ho);switch(U.status){case"pending":e.queryHash===r.queryHash&&P(U);break;case"fulfilled":(D.status==="error"||D.data!==U.value)&&Z();break;case"rejected":(D.status!=="error"||D.error!==U.reason)&&Z();break}}return D}updateResult(e){const t=j(this,Ln),r=this.createResult(j(this,ut),this.options);if(be(this,al,j(this,ut).state),be(this,Au,this.options),j(this,al).data!==void 0&&be(this,Ou,j(this,ut)),M0(r,t))return;be(this,Ln,r);const i={},s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!j(this,Nu).size)return!0;const u=new Set(l??j(this,Nu));return this.options.throwOnError&&u.add("error"),Object.keys(j(this,Ln)).some(f=>{const h=f;return j(this,Ln)[h]!==t[h]&&u.has(h)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Ve(this,bt,j4).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ve(this,bt,Hw).call(this)}},Qn=new WeakMap,ut=new WeakMap,Ep=new WeakMap,Ln=new WeakMap,al=new WeakMap,Au=new WeakMap,Ho=new WeakMap,Qi=new WeakMap,Rp=new WeakMap,Mu=new WeakMap,Ou=new WeakMap,ll=new WeakMap,cl=new WeakMap,Vo=new WeakMap,Nu=new WeakMap,bt=new WeakSet,Pd=function(e){Ve(this,bt,Fw).call(this);let t=j(this,ut).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Zr)),t},Iw=function(){Ve(this,bt,Vw).call(this);const e=iu(this.options.staleTime,j(this,ut));if(Cl||j(this,Ln).isStale||!Pw(e))return;const r=R4(j(this,Ln).dataUpdatedAt,e)+1;be(this,ll,setTimeout(()=>{j(this,Ln).isStale||this.updateResult()},r))},zw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ut)):this.options.refetchInterval)??!1},$w=function(e){Ve(this,bt,Uw).call(this),be(this,Vo,e),!(Cl||yi(this.options.enabled,j(this,ut))===!1||!Pw(j(this,Vo))||j(this,Vo)===0)&&be(this,cl,setInterval(()=>{(this.options.refetchIntervalInBackground||b2.isFocused())&&Ve(this,bt,Pd).call(this)},j(this,Vo)))},Hw=function(){Ve(this,bt,Iw).call(this),Ve(this,bt,$w).call(this,Ve(this,bt,zw).call(this))},Vw=function(){j(this,ll)&&(clearTimeout(j(this,ll)),be(this,ll,void 0))},Uw=function(){j(this,cl)&&(clearInterval(j(this,cl)),be(this,cl,void 0))},Fw=function(){const e=j(this,Qn).getQueryCache().build(j(this,Qn),this.options);if(e===j(this,ut))return;const t=j(this,ut);be(this,ut,e),be(this,Ep,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},j4=function(e){nn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(j(this,Ln))}),j(this,Qn).getQueryCache().notify({query:j(this,ut),type:"observerResultsUpdated"})})},A3);function IV(n,e){return yi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function IA(n,e){return IV(n,e)||n.state.data!==void 0&&qw(n,e,e.refetchOnMount)}function qw(n,e,t){if(yi(e.enabled,n)!==!1){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&x2(n,e)}return!1}function zA(n,e,t,r){return(n!==e||yi(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&x2(n,t)}function x2(n,e){return yi(e.enabled,n)!==!1&&n.isStaleByTime(iu(e.staleTime,n))}function zV(n,e){return!M0(n.getCurrentResult(),e)}var Uo,Fo,Yn,$s,Zs,i0,Zw,M3,$V=(M3=class extends pf{constructor(t,r){super();Te(this,Zs);Te(this,Uo);Te(this,Fo);Te(this,Yn);Te(this,$s);be(this,Uo,t),this.setOptions(r),this.bindMethods(),Ve(this,Zs,i0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=j(this,Uo).defaultMutationOptions(t),M0(this.options,r)||j(this,Uo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,Yn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kl(r.mutationKey)!==kl(this.options.mutationKey)?this.reset():((i=j(this,Yn))==null?void 0:i.state.status)==="pending"&&j(this,Yn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=j(this,Yn))==null||t.removeObserver(this)}onMutationUpdate(t){Ve(this,Zs,i0).call(this),Ve(this,Zs,Zw).call(this,t)}getCurrentResult(){return j(this,Fo)}reset(){var t;(t=j(this,Yn))==null||t.removeObserver(this),be(this,Yn,void 0),Ve(this,Zs,i0).call(this),Ve(this,Zs,Zw).call(this)}mutate(t,r){var i;return be(this,$s,r),(i=j(this,Yn))==null||i.removeObserver(this),be(this,Yn,j(this,Uo).getMutationCache().build(j(this,Uo),this.options)),j(this,Yn).addObserver(this),j(this,Yn).execute(t)}},Uo=new WeakMap,Fo=new WeakMap,Yn=new WeakMap,$s=new WeakMap,Zs=new WeakSet,i0=function(){var r;const t=((r=j(this,Yn))==null?void 0:r.state)??P4();be(this,Fo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Zw=function(t){nn.batch(()=>{var r,i,s,o,l,u,f,h;if(j(this,$s)&&this.hasListeners()){const m=j(this,Fo).variables,g=j(this,Fo).context;(t==null?void 0:t.type)==="success"?((i=(r=j(this,$s)).onSuccess)==null||i.call(r,t.data,m,g),(o=(s=j(this,$s)).onSettled)==null||o.call(s,t.data,null,m,g)):(t==null?void 0:t.type)==="error"&&((u=(l=j(this,$s)).onError)==null||u.call(l,t.error,m,g),(h=(f=j(this,$s)).onSettled)==null||h.call(f,void 0,t.error,m,g))}this.listeners.forEach(m=>{m(j(this,Fo))})})},M3),L4=x.createContext(void 0),w2=n=>{const e=x.useContext(L4);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},HV=({client:n,children:e})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),b.jsx(L4.Provider,{value:n,children:e})),B4=x.createContext(!1),VV=()=>x.useContext(B4);B4.Provider;function UV(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var FV=x.createContext(UV()),qV=()=>x.useContext(FV);function I4(n,e){return typeof n=="function"?n(...e):!!n}function Gw(){}var ZV=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},GV=n=>{x.useEffect(()=>{n.clearReset()},[n])},WV=({result:n,errorResetBoundary:e,throwOnError:t,query:r})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&I4(t,[n.error,r]),KV=n=>{n.suspense&&(n.staleTime===void 0&&(n.staleTime=1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},QV=(n,e)=>n.isLoading&&n.isFetching&&!e,YV=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,$A=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function XV(n,e,t){var h,m,g,y,S;const r=w2(),i=VV(),s=qV(),o=r.defaultQueryOptions(n);(m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,o),o._optimisticResults=i?"isRestoring":"optimistic",KV(o),ZV(o,s),GV(s);const l=!r.getQueryCache().get(o.queryHash),[u]=x.useState(()=>new e(r,o)),f=u.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(C=>{const k=i?Gw:u.subscribe(nn.batchCalls(C));return u.updateResult(),k},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),YV(o,f))throw $A(o,u,s);if(WV({result:f,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw f.error;if((y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||y.call(g,o,f),o.experimental_prefetchInRender&&!Cl&&QV(f,i)){const C=l?$A(o,u,s):(S=r.getQueryCache().get(o.queryHash))==null?void 0:S.promise;C==null||C.catch(Gw).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?f:u.trackResult(f)}function JV(n,e){return XV(n,BV)}function eU(n,e){const t=w2(),[r]=x.useState(()=>new $V(t,n));x.useEffect(()=>{r.setOptions(n)},[r,n]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(nn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=x.useCallback((o,l)=>{r.mutate(o,l).catch(Gw)},[r]);if(i.error&&I4(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const pl="__TSR_index",HA="popstate",VA="beforeunload";function z4(n){let e=n.getLocation();const t=new Set,r=o=>{e=n.getLocation(),t.forEach(l=>l({location:e,action:o}))},i=o=>{n.notifyOnIndexChange??!0?r(o):e=n.getLocation()},s=async({task:o,navigateOpts:l,...u})=>{var f,h;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const g=((f=n.getBlockers)==null?void 0:f.call(n))??[],y=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const S of g){const C=vh(u.path,u.state);if(await S.blockerFn({currentLocation:e,nextLocation:C,action:u.type})){(h=n.onBlocked)==null||h.call(n);return}}o()};return{get location(){return e},get length(){return n.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,l,u)=>{const f=e.state[pl];l=Ww(f+1,l),s({task:()=>{n.pushState(o,l),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:l})},replace:(o,l,u)=>{const f=e.state[pl];l=Ww(f,l),s({task:()=>{n.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:l})},go:(o,l)=>{s({task:()=>{n.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{s({task:()=>{n.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{n.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[pl]!==0,createHref:o=>n.createHref(o),block:o=>{var l;if(!n.setBlockers)return()=>{};const u=((l=n.getBlockers)==null?void 0:l.call(n))??[];return n.setBlockers([...u,o]),()=>{var f,h;const m=((f=n.getBlockers)==null?void 0:f.call(n))??[];(h=n.setBlockers)==null||h.call(n,m.filter(g=>g!==o))}},flush:()=>{var o;return(o=n.flush)==null?void 0:o.call(n)},destroy:()=>{var o;return(o=n.destroy)==null?void 0:o.call(n)},notify:r}}function Ww(n,e){return e||(e={}),{...e,key:rU(),[pl]:n}}function tU(n){const e=typeof document<"u"?window:void 0,t=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,o=B=>i=B,l=B=>B,u=()=>vh(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state);let f=u(),h,m=!1,g=!1,y=!1,S=!1;const C=()=>f;let k,E;const _=()=>{k&&(D._ignoreSubscribers=!0,(k.isPush?e.history.pushState:e.history.replaceState)(k.state,"",k.href),D._ignoreSubscribers=!1,k=void 0,E=void 0,h=void 0)},T=(B,P,Z)=>{const U=l(P);E||(h=f),f=vh(P,Z),k={href:U,state:Z,isPush:(k==null?void 0:k.isPush)||B==="push"},E||(E=Promise.resolve().then(()=>_()))},N=B=>{f=u(),D.notify({type:B})},A=async()=>{if(g){g=!1;return}const B=u(),P=B.state[pl]-f.state[pl],Z=P===1,U=P===-1,$=!Z&&!U||m;m=!1;const de=$?"GO":U?"BACK":"FORWARD",se=$?{type:"GO",index:P}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const ce=s();if(typeof document<"u"&&ce.length){for(const G of ce)if(await G.blockerFn({currentLocation:f,nextLocation:B,action:de})){g=!0,e.history.go(1),D.notify(se);return}}}f=u(),D.notify(se)},O=B=>{if(S){S=!1;return}let P=!1;const Z=s();if(typeof document<"u"&&Z.length)for(const U of Z){const $=U.enableBeforeUnload??!0;if($===!0){P=!0;break}if(typeof $=="function"&&$()===!0){P=!0;break}}if(P)return B.preventDefault(),B.returnValue=""},D=z4({getLocation:C,getLength:()=>e.history.length,pushState:(B,P)=>T("push",B,P),replaceState:(B,P)=>T("replace",B,P),back:B=>(B&&(y=!0),S=!0,e.history.back()),forward:B=>{B&&(y=!0),S=!0,e.history.forward()},go:B=>{m=!0,e.history.go(B)},createHref:B=>l(B),flush:_,destroy:()=>{e.history.pushState=t,e.history.replaceState=r,e.removeEventListener(VA,O,{capture:!0}),e.removeEventListener(HA,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(VA,O,{capture:!0}),e.addEventListener(HA,A),e.history.pushState=function(...B){const P=t.apply(e.history,B);return D._ignoreSubscribers||N("PUSH"),P},e.history.replaceState=function(...B){const P=r.apply(e.history,B);return D._ignoreSubscribers||N("REPLACE"),P},D}function nU(n={initialEntries:["/"]}){const e=n.initialEntries;let t=n.initialIndex?Math.min(Math.max(n.initialIndex,0),e.length-1):e.length-1;const r=e.map((s,o)=>Ww(o,void 0));return z4({getLocation:()=>vh(e[t],r[t]),getLength:()=>e.length,pushState:(s,o)=>{t{r[t]=o,e[t]=s},back:()=>{t=Math.max(t-1,0)},forward:()=>{t=Math.min(t+1,e.length-1)},go:s=>{t=Math.min(Math.max(t+s,0),e.length-1)},createHref:s=>s})}function vh(n,e){const t=n.indexOf("#"),r=n.indexOf("?");return{href:n,pathname:n.substring(0,t>0?r>0?Math.min(t,r):t:r>0?r:n.length),hash:t>-1?n.substring(t):"",search:r>-1?n.slice(r,t===-1?void 0:t):"",state:e||{[pl]:0}}}function rU(){return(Math.random()+1).toString(36).substring(7)}var iU="Invariant failed";function Er(n,e){if(!n)throw new Error(iU)}const ax=x.createContext(null);function $4(){return typeof document>"u"?ax:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ax,ax)}function Vl(n){const e=x.useContext($4());return n==null||n.warn,e}var lx={exports:{}},cx={},ux={exports:{}},fx={};/** * @license React - * use-sync-external-store-shim/with-selector.production.js + * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sv;function g1(){if(sv)return tf;sv=1;var a=zr(),l=y1();function r(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var o=typeof Object.is=="function"?Object.is:r,u=l.useSyncExternalStore,f=a.useRef,d=a.useEffect,h=a.useMemo,v=a.useDebugValue;return tf.useSyncExternalStoreWithSelector=function(m,g,y,S,E){var _=f(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=h(function(){function O(Q){if(!j){if(j=!0,B=Q,Q=S(Q),E!==void 0&&x.hasValue){var J=x.value;if(E(J,Q))return H=J}return H=Q}if(J=H,o(B,Q))return J;var P=S(Q);return E!==void 0&&E(J,P)?(B=Q,J):(B=Q,H=P)}var j=!1,B,H,z=y===void 0?null:y;return[function(){return O(g())},z===null?void 0:function(){return O(z())}]},[g,y,S,E]);var C=u(m,_[0],_[1]);return d(function(){x.hasValue=!0,x.value=C},[C]),v(C),C},tf}var uv;function b1(){return uv||(uv=1,Ic.exports=g1()),Ic.exports}var S1=b1();const Ji=new WeakMap,ds=new WeakMap,Ss={current:[]};let af=!1,xr=0;const gr=new Set,Io=new Map;function fy(a){const l=Array.from(a).sort((r,o)=>r instanceof Wi&&r.options.deps.includes(o)?1:o instanceof Wi&&o.options.deps.includes(r)?-1:0);for(const r of l){if(Ss.current.includes(r))continue;Ss.current.push(r),r.recompute();const o=ds.get(r);if(o)for(const u of o){const f=Ji.get(u);f&&fy(f)}}}function x1(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function E1(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function dy(a){if(xr>0&&!Io.has(a)&&Io.set(a,a.prevState),gr.add(a),!(xr>0)&&!af)try{for(af=!0;gr.size>0;){const l=Array.from(gr);gr.clear();for(const r of l){const o=Io.get(r)??r.prevState;r.prevState=o,x1(r)}for(const r of l){const o=Ji.get(r);o&&(Ss.current.push(r),fy(o))}for(const r of l){const o=Ji.get(r);if(o)for(const u of o)E1(u)}}}finally{af=!1,Ss.current=[],Io.clear()}}function lf(a){xr++;try{a()}finally{if(xr--,xr===0){const l=Array.from(gr)[0];l&&dy(l)}}}class Rf{constructor(l,r){this.listeners=new Set,this.subscribe=o=>{var u,f;this.listeners.add(o);const d=(f=(u=this.options)==null?void 0:u.onSubscribe)==null?void 0:f.call(u,o,this);return()=>{this.listeners.delete(o),d==null||d()}},this.setState=o=>{var u,f,d;this.prevState=this.state,this.state=(u=this.options)!=null&&u.updateFn?this.options.updateFn(this.prevState)(o):o(this.prevState),(d=(f=this.options)==null?void 0:f.onUpdate)==null||d.call(f),dy(this)},this.prevState=l,this.state=l,this.options=r}}class Wi{constructor(l){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=[],o=[];for(const u of this.options.deps)r.push(u.prevState),o.push(u.state);return this.lastSeenDepValues=o,{prevDepVals:r,currDepVals:o,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,o;this.prevState=this.state;const{prevDepVals:u,currDepVals:f,prevVal:d}=this.getDepVals();this.state=this.options.fn({prevDepVals:u,currDepVals:f,prevVal:d}),(o=(r=this.options).onUpdate)==null||o.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const f of this.options.deps)f instanceof Wi&&f.checkIfRecalculationNeededDeeply();let r=!1;const o=this.lastSeenDepValues,{currDepVals:u}=this.getDepVals();for(let f=0;f(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var o,u;this.listeners.add(r);const f=(u=(o=this.options).onSubscribe)==null?void 0:u.call(o,r,this);return()=>{this.listeners.delete(r),f==null||f()}},this.options=l,this.state=l.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(l=this.options.deps){for(const r of l)if(r instanceof Wi)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Rf){let o=Ji.get(r);o||(o=new Set,Ji.set(r,o)),o.add(this);let u=ds.get(this);u||(u=new Set,ds.set(this,u)),u.add(r)}}unregisterFromGraph(l=this.options.deps){for(const r of l)if(r instanceof Wi)this.unregisterFromGraph(r.options.deps);else if(r instanceof Rf){const o=Ji.get(r);o&&o.delete(this);const u=ds.get(this);u&&u.delete(r)}}}function w1(a,l=r=>r){return S1.useSyncExternalStoreWithSelector(a.subscribe,()=>a.state,()=>a.state,l,_1)}function _1(a,l){if(Object.is(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;if(a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;for(const[o,u]of a)if(!l.has(o)||!Object.is(u,l.get(o)))return!1;return!0}if(a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(const o of a)if(!l.has(o))return!1;return!0}const r=Object.keys(a);if(r.length!==Object.keys(l).length)return!1;for(let o=0;o{l.substring(0,1)==="?"&&(l=l.substring(1));const r=R1(l);for(const o in r){const u=r[o];if(typeof u=="string")try{r[o]=a(u)}catch{}}return r}}function O1(a,l){function r(o){if(typeof o=="object"&&o!==null)try{return a(o)}catch{}else if(typeof o=="string"&&typeof l=="function")try{return l(o),a(o)}catch{}return o}return o=>{o={...o},Object.keys(o).forEach(f=>{const d=o[f];typeof d>"u"||d===void 0?delete o[f]:o[f]=r(d)});const u=M1(o).toString();return u?`?${u}`:""}}function Er(a){return a[a.length-1]}function D1(a){return typeof a=="function"}function ts(a,l){return D1(a)?a(l):a}function hs(a,l){return l.reduce((r,o)=>(r[o]=a[o],r),{})}function ke(a,l){if(a===l)return a;const r=l,o=dv(a)&&dv(r);if(o||Ra(a)&&Ra(r)){const u=o?a:Object.keys(a),f=u.length,d=o?r:Object.keys(r),h=d.length,v=o?[]:{};let m=0;for(let g=0;g"u")return!0;const r=l.prototype;return!(!fv(r)||!r.hasOwnProperty("isPrototypeOf"))}function fv(a){return Object.prototype.toString.call(a)==="[object Object]"}function dv(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function hv(a,l){let r=Object.keys(a);return l&&(r=r.filter(o=>a[o]!==void 0)),r}function wr(a,l,r){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(Ra(a)&&Ra(l)){const o=(r==null?void 0:r.ignoreUndefined)??!0,u=hv(a,o),f=hv(l,o);return!(r!=null&&r.partial)&&u.length!==f.length?!1:f.every(d=>wr(a[d],l[d],r))}return Array.isArray(a)&&Array.isArray(l)?a.length!==l.length?!1:!a.some((o,u)=>!wr(o,l[u],r)):!1}const es=typeof window<"u"?w.useLayoutEffect:w.useEffect;function $i(a){let l,r;const o=new Promise((u,f)=>{l=u,r=f});return o.status="pending",o.resolve=u=>{o.status="resolved",o.value=u,l(u),a==null||a(u)},o.reject=u=>{o.status="rejected",r(u)},o}function rf(a){const l=w.useRef({value:a,prev:null}),r=l.current.value;return a!==r&&(l.current={value:a,prev:r}),l.current.prev}function Pn(a){return Os(a.filter(l=>l!==void 0).join("/"))}function Os(a){return a.replace(/\/{2,}/g,"/")}function qf(a){return a==="/"?a:a.replace(/^\/{1,}/,"")}function ti(a){return a==="/"?a:a.replace(/\/{1,}$/,"")}function N1(a){return ti(qf(a))}function z1({basepath:a,base:l,to:r,trailingSlash:o="never",caseSensitive:u}){var f,d;l=xs(a,l,u),r=xs(a,r,u);let h=fl(l);const v=fl(r);h.length>1&&((f=Er(h))==null?void 0:f.value)==="/"&&h.pop(),v.forEach((g,y)=>{g.value==="/"?y?y===v.length-1&&h.push(g):h=[g]:g.value===".."?h.pop():g.value==="."||h.push(g)}),h.length>1&&(((d=Er(h))==null?void 0:d.value)==="/"?o==="never"&&h.pop():o==="always"&&h.push({type:"pathname",value:"/"}));const m=Pn([a,...h.map(g=>g.value)]);return Os(m)}function fl(a){if(!a)return[];a=Os(a);const l=[];if(a.slice(0,1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),!a)return l;const r=a.split("/").filter(Boolean);return l.push(...r.map(o=>o==="$"||o==="*"?{type:"wildcard",value:o}:o.charAt(0)==="$"?{type:"param",value:o}:{type:"pathname",value:decodeURI(o)})),a.slice(-1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),l}function ns({path:a,params:l,leaveWildcards:r,leaveParams:o,decodeCharMap:u}){const f=fl(a),d={};for(const[h,v]of Object.entries(l)){const m=typeof v=="string";["*","_splat"].includes(h)?d[h]=m?encodeURI(v):v:d[h]=m?j1(v,u):v}return Pn(f.map(h=>{if(h.type==="wildcard"){const v=d._splat;return r?`${h.value}${v??""}`:v}if(h.type==="param"){if(o){const v=d[h.value];return`${h.value}${v??""}`}return d[h.value.substring(1)]??"undefined"}return h.value}))}function j1(a,l){let r=encodeURIComponent(a);if(l)for(const[o,u]of l)r=r.replaceAll(o,u);return r}function as(a,l,r){const o=L1(a,l,r);if(!(r.to&&!o))return o??{}}function xs(a,l,r=!1){const o=r?a:a.toLowerCase(),u=r?l:l.toLowerCase();switch(!0){case o==="/":return l;case u===o:return"";case l.length{for(let v=0;v=u.length-1,S=v>=f.length-1;if(g){if(g.type==="wildcard"){const E=decodeURI(Pn(u.slice(v).map(_=>_.value)));return d["*"]=E,d._splat=E,!0}if(g.type==="pathname"){if(g.value==="/"&&!(m!=null&&m.value))return!0;if(m){if(r.caseSensitive){if(g.value!==m.value)return!1}else if(g.value.toLowerCase()!==m.value.toLowerCase())return!1}}if(!m)return!1;if(g.type==="param"){if(m.value==="/")return!1;m.value.charAt(0)!=="$"&&(d[g.value.substring(1)]=decodeURIComponent(m.value))}}if(!y&&S)return d["**"]=Pn(u.slice(v+1).map(E=>E.value)),!!r.fuzzy&&(g==null?void 0:g.value)!=="/"}return!0})()?d:void 0}function Wa(a){return!!(a!=null&&a.isRedirect)}function of(a){return!!(a!=null&&a.isRedirect)&&a.href}function Vf(a){const l=a.errorComponent??Ds;return R.jsx(U1,{getResetKey:a.getResetKey,onCatch:a.onCatch,children:({error:r,reset:o})=>r?w.createElement(l,{error:r,reset:o}):a.children})}class U1 extends w.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(l){return{resetKey:l.getResetKey()}}static getDerivedStateFromError(l){return{error:l}}reset(){this.setState({error:null})}componentDidUpdate(l,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(l,r){this.props.onCatch&&this.props.onCatch(l,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ds({error:a}){const[l,r]=w.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(o=>!o),children:l?"Hide Error":"Show Error"})]}),R.jsx("div",{style:{height:".25rem"}}),l?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a.message?R.jsx("code",{children:a.message}):null})}):null]})}function Ke(a){const l=si({warn:(a==null?void 0:a.router)===void 0}),r=(a==null?void 0:a.router)||l,o=w.useRef();return w1(r.__store,u=>{if(a!=null&&a.select){if(a.structuralSharing??r.options.defaultStructuralSharing){const f=ke(o.current,a.select(u));return o.current=f,f}return a.select(u)}return u})}function tn(a){return!!(a!=null&&a.isNotFound)}function B1(a){const l=Ke({select:r=>`not-found-${r.location.pathname}-${r.status}`});return R.jsx(Vf,{getResetKey:()=>l,onCatch:(r,o)=>{var u;if(tn(r))(u=a.onCatch)==null||u.call(a,r,o);else throw r},errorComponent:({error:r})=>{var o;if(tn(r))return(o=a.fallback)==null?void 0:o.call(a,r);throw r},children:a.children})}function H1(){return R.jsx("p",{children:"Not Found"})}const br={stringify:a=>JSON.stringify(a,function(r,o){const u=this[r],f=ls.find(d=>d.stringifyCondition(u));return f?f.stringify(u):o}),parse:a=>JSON.parse(a,function(r,o){const u=this[r];if(Ra(u)){const f=ls.find(d=>d.parseCondition(u));if(f)return f.parse(u)}return o}),encode:a=>{if(Array.isArray(a))return a.map(r=>br.encode(r));if(Ra(a))return Object.fromEntries(Object.entries(a).map(([r,o])=>[r,br.encode(o)]));const l=ls.find(r=>r.stringifyCondition(a));return l?l.stringify(a):a},decode:a=>{if(Ra(a)){const l=ls.find(r=>r.parseCondition(a));if(l)return l.parse(a)}return Array.isArray(a)?a.map(l=>br.decode(l)):Ra(a)?Object.fromEntries(Object.entries(a).map(([l,r])=>[l,br.decode(r)])):a}},is=(a,l,r,o)=>({key:a,stringifyCondition:l,stringify:u=>({[`$${a}`]:r(u)}),parseCondition:u=>Object.hasOwn(u,`$${a}`),parse:u=>o(u[`$${a}`])}),ls=[is("undefined",a=>a===void 0,()=>0,()=>{}),is("date",a=>a instanceof Date,a=>a.toISOString(),a=>new Date(a)),is("error",a=>a instanceof Error,a=>({...a,message:a.message,stack:a.stack,cause:a.cause}),a=>Object.assign(new Error(a.message),a)),is("formData",a=>a instanceof FormData,a=>{const l={};return a.forEach((r,o)=>{const u=l[o];u!==void 0?Array.isArray(u)?u.push(r):l[o]=[u,r]:l[o]=r}),l},a=>{const l=new FormData;return Object.entries(a).forEach(([r,o])=>{Array.isArray(o)?o.forEach(u=>l.append(r,u)):l.append(r,o)}),l})],hy=["component","errorComponent","pendingComponent","notFoundComponent"];function G1(a){var l;for(const r of hy)if((l=a.options[r])!=null&&l.preload)return!0;return!1}function sf(a,l){if(a==null)return{};if("~standard"in a){const r=a["~standard"].validate(l);if(r instanceof Promise)throw new Cf("Async validation not supported");if(r.issues)throw new Cf(JSON.stringify(r.issues,void 0,2));return r.value}return"parse"in a?a.parse(l):typeof a=="function"?a(l):{}}function q1(a){return new V1(a)}class V1{constructor(l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=r=>r(),this.update=r=>{var o;r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const u=this.options;this.options={...this.options,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(f=>[encodeURIComponent(f),f])):void 0,(!this.basepath||r.basepath&&r.basepath!==u.basepath)&&(r.basepath===void 0||r.basepath===""||r.basepath==="/"?this.basepath="/":this.basepath=`/${N1(r.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?h1({initialEntries:[this.basepath||"/"]}):d1()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Rf(Y1(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(f=>!["redirected"].includes(f.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((o=window.CSS)==null?void 0:o.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[r.id]=r);const o=d=>{d.forEach((h,v)=>{h.init({originalIndex:v,defaultSsr:this.options.defaultSsr});const m=this.routesById[h.id];if(Te(!m,`Duplicate routes found with id: ${String(h.id)}`),this.routesById[h.id]=h,!h.isRoot&&h.path){const y=ti(h.fullPath);(!this.routesByPath[y]||h.fullPath.endsWith("/"))&&(this.routesByPath[y]=h)}const g=h.children;g!=null&&g.length&&o(g)})};o([this.routeTree]);const u=[];Object.values(this.routesById).forEach((d,h)=>{var v;if(d.isRoot||!d.path)return;const m=qf(d.fullPath),g=fl(m);for(;g.length>1&&((v=g[0])==null?void 0:v.value)==="/";)g.shift();const y=g.map(S=>S.value==="/"?.75:S.type==="param"?.5:S.type==="wildcard"?.25:1);u.push({child:d,trimmed:m,parsed:g,index:h,scores:y})}),this.flatRoutes=u.sort((d,h)=>{const v=Math.min(d.scores.length,h.scores.length);for(let m=0;mh.parsed[m].value?1:-1;return d.index-h.index}).map((d,h)=>(d.child.rank=h,d.child))},this.subscribe=(r,o)=>{const u={eventType:r,fn:o};return this.subscribers.add(u),()=>{this.subscribers.delete(u)}},this.emit=r=>{this.subscribers.forEach(o=>{o.eventType===r.type&&o.fn(r)})},this.parseLocation=(r,o)=>{const u=({pathname:v,search:m,hash:g,state:y})=>{const S=this.options.parseSearch(m),E=this.options.stringifySearch(S);return{pathname:v,searchStr:E,search:ke(r==null?void 0:r.search,S),hash:g.split("#").reverse()[0]??"",href:`${v}${E}${g}`,state:ke(r==null?void 0:r.state,y)}},f=u(o??this.history.location),{__tempLocation:d,__tempKey:h}=f.state;if(d&&(!h||h===this.tempLocationKey)){const v=u(d);return v.state.key=f.state.key,delete v.state.__tempLocation,{...v,maskedLocation:f}}return f},this.resolvePathWithBase=(r,o)=>z1({basepath:this.basepath,base:r,to:Os(o),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(r,o)=>{let u={};const f=ti(r.pathname),d=g=>as(this.basepath,f,{to:g.fullPath,caseSensitive:g.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let h=(o==null?void 0:o.to)!==void 0?this.routesByPath[o.to]:void 0;h?u=d(h):h=this.flatRoutes.find(g=>{const y=d(g);return y?(u=y,!0):!1});let v=h||this.routesById[Ae];const m=[v];for(;v.parentRoute;)v=v.parentRoute,m.unshift(v);return{matchedRoutes:m,routeParams:u,foundRoute:h}},this.cancelMatch=r=>{const o=this.getMatch(r);o&&(o.abortController.abort(),clearTimeout(o.pendingTimeout))},this.cancelMatches=()=>{var r;(r=this.state.pendingMatches)==null||r.forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=r=>{const o=(f={},d)=>{var h,v,m,g,y,S;const E=f._fromLocation?this.matchRoutes(f._fromLocation,{_buildLocation:!0}):this.state.matches,_=f.from!=null?E.find(I=>as(this.basepath,ti(I.pathname),{to:f.from,caseSensitive:!1,fuzzy:!1})):void 0,x=(_==null?void 0:_.pathname)||this.latestLocation.pathname;Te(f.from==null||_!=null,"Could not find match for from: "+f.from);const C=(h=this.state.pendingMatches)!=null&&h.length?(v=Er(this.state.pendingMatches))==null?void 0:v.search:((m=Er(E))==null?void 0:m.search)||this.latestLocation.search,O=d==null?void 0:d.matchedRoutes.filter(I=>E.find(W=>W.routeId===I.id));let j;if(f.to)j=this.resolvePathWithBase(x,`${f.to}`);else{const I=this.routesById[(g=O==null?void 0:O.find(W=>{const rt=ns({path:W.fullPath,params:(d==null?void 0:d.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Pn([this.basepath,rt])===x}))==null?void 0:g.id];j=this.resolvePathWithBase(x,(I==null?void 0:I.to)??x)}const B={...(y=Er(E))==null?void 0:y.params};let H=(f.params??!0)===!0?B:{...B,...ts(f.params,B)};Object.keys(H).length>0&&(d==null||d.matchedRoutes.map(I=>{var W;return((W=I.options.params)==null?void 0:W.stringify)??I.options.stringifyParams}).filter(Boolean).forEach(I=>{H={...H,...I(H)}})),j=ns({path:j,params:H??{},leaveWildcards:!1,leaveParams:r.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let z=C;if(r._includeValidateSearch&&((S=this.options.search)!=null&&S.strict)){let I={};d==null||d.matchedRoutes.forEach(W=>{try{W.options.validateSearch&&(I={...I,...sf(W.options.validateSearch,{...I,...z})??{}})}catch{}}),z=I}z=(I=>{const W=(d==null?void 0:d.matchedRoutes.reduce((ut,q)=>{var at;const F=[];if("search"in q.options)(at=q.options.search)!=null&&at.middlewares&&F.push(...q.options.search.middlewares);else if(q.options.preSearchFilters||q.options.postSearchFilters){const $=({search:A,next:V})=>{let nt=A;"preSearchFilters"in q.options&&q.options.preSearchFilters&&(nt=q.options.preSearchFilters.reduce((et,ft)=>ft(et),A));const it=V(nt);return"postSearchFilters"in q.options&&q.options.postSearchFilters?q.options.postSearchFilters.reduce((et,ft)=>ft(et),it):it};F.push($)}if(r._includeValidateSearch&&q.options.validateSearch){const $=({search:A,next:V})=>{try{const nt=V(A);return{...nt,...sf(q.options.validateSearch,nt)??{}}}catch{}};F.push($)}return ut.concat(F)},[]))??[],rt=({search:ut})=>f.search?f.search===!0?ut:ts(f.search,ut):{};W.push(rt);const lt=(ut,q)=>{if(ut>=W.length)return q;const at=W[ut];return at({search:q,next:$=>lt(ut+1,$)})};return lt(0,I)})(z),z=ke(C,z);const J=this.options.stringifySearch(z),P=f.hash===!0?this.latestLocation.hash:f.hash?ts(f.hash,this.latestLocation.hash):void 0,G=P?`#${P}`:"";let tt=f.state===!0?this.latestLocation.state:f.state?ts(f.state,this.latestLocation.state):{};return tt=ke(this.latestLocation.state,tt),{pathname:j,search:z,searchStr:J,state:tt,hash:P??"",href:`${j}${J}${G}`,unmaskOnReload:f.unmaskOnReload}},u=(f={},d)=>{var h;const v=o(f);let m=d?o(d):void 0;if(!m){let S={};const E=(h=this.options.routeMasks)==null?void 0:h.find(_=>{const x=as(this.basepath,v.pathname,{to:_.from,caseSensitive:!1,fuzzy:!1});return x?(S=x,!0):!1});if(E){const{from:_,...x}=E;d={...hs(r,["from"]),...x,params:S},m=o(d)}}const g=this.getMatchedRoutes(v,f),y=o(f,g);if(m){const S=this.getMatchedRoutes(m,d),E=o(d,S);y.maskedLocation=E}return y};return r.mask?u(r,{...hs(r,["from"]),...r.mask}):u(r)},this.commitLocation=({viewTransition:r,ignoreBlocker:o,...u})=>{const f=()=>{u.state.key=this.latestLocation.state.key;const v=wr(u.state,this.latestLocation.state);return delete u.state.key,v},d=this.latestLocation.href===u.href,h=this.commitLocationPromise;if(this.commitLocationPromise=$i(()=>{h==null||h.resolve()}),d&&f())this.load();else{let{maskedLocation:v,hashScrollIntoView:m,...g}=u;v&&(g={...v,state:{...v.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[u.replace?"replace":"push"](g.href,g.state,{ignoreBlocker:o})}return this.resetNextScroll=u.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:o,hashScrollIntoView:u,viewTransition:f,ignoreBlocker:d,href:h,...v}={})=>{if(h){const g=this.history.location.state.__TSR_index,y=Rr(h,{__TSR_index:r?g:g+1});v.to=y.pathname,v.search=this.options.parseSearch(y.search),v.hash=y.hash.slice(1)}const m=this.buildLocation({...v,_includeValidateSearch:!0});return this.commitLocation({...m,viewTransition:f,replace:r,resetScroll:o,hashScrollIntoView:u,ignoreBlocker:d})},this.navigate=({to:r,reloadDocument:o,href:u,...f})=>{if(o){u||(u=this.buildLocation({to:r,...f}).href),f.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...f,href:u,to:r})},this.load=async r=>{this.latestLocation=this.parseLocation(this.latestLocation);let o,u,f;for(f=new Promise(d=>{this.startReactTransition(async()=>{var h;try{const v=this.latestLocation,m=this.state.resolvedLocation,g=m.href!==v.href,y=m.pathname!==v.pathname;this.cancelMatches();let S;lf(()=>{S=this.matchRoutes(v),this.__store.setState(E=>({...E,status:"pending",isLoading:!0,location:v,pendingMatches:S,cachedMatches:E.cachedMatches.filter(_=>!S.find(x=>x.id===_.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:m,toLocation:v,pathChanged:y,hrefChanged:g}),this.emit({type:"onBeforeLoad",fromLocation:m,toLocation:v,pathChanged:y,hrefChanged:g}),await this.loadMatches({sync:r==null?void 0:r.sync,matches:S,location:v,onReady:async()=>{this.startViewTransition(async()=>{let E,_,x;lf(()=>{this.__store.setState(C=>{const O=C.matches,j=C.pendingMatches||C.matches;return E=O.filter(B=>!j.find(H=>H.id===B.id)),_=j.filter(B=>!O.find(H=>H.id===B.id)),x=O.filter(B=>j.find(H=>H.id===B.id)),{...C,isLoading:!1,loadedAt:Date.now(),matches:j,pendingMatches:void 0,cachedMatches:[...C.cachedMatches,...E.filter(B=>B.status!=="error")]}}),this.clearExpiredCache()}),[[E,"onLeave"],[_,"onEnter"],[x,"onStay"]].forEach(([C,O])=>{C.forEach(j=>{var B,H;(H=(B=this.looseRoutesById[j.routeId].options)[O])==null||H.call(B,j)})})})}})}catch(v){of(v)?(o=v,this.isServer||this.navigate({...o,replace:!0,ignoreBlocker:!0})):tn(v)&&(u=v),this.__store.setState(m=>({...m,statusCode:o?o.statusCode:u?404:m.matches.some(g=>g.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===f&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=f,await f;this.latestLoadPromise&&f!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=r=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let u;typeof o=="object"&&this.isViewTransitionTypesSupported?u={update:r,types:o.types}:u=r,document.startViewTransition(u)}else r()},this.updateMatch=(r,o)=>{var u;let f;const d=(u=this.state.pendingMatches)==null?void 0:u.find(g=>g.id===r),h=this.state.matches.find(g=>g.id===r),v=this.state.cachedMatches.find(g=>g.id===r),m=d?"pendingMatches":h?"matches":v?"cachedMatches":"";return m&&this.__store.setState(g=>{var y;return{...g,[m]:(y=g[m])==null?void 0:y.map(S=>S.id===r?f=o(S):S)}}),f},this.getMatch=r=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(o=>o.id===r),this.loadMatches=async({location:r,matches:o,preload:u,onReady:f,updateMatch:d=this.updateMatch,sync:h})=>{let v,m=!1;const g=async()=>{m||(m=!0,await(f==null?void 0:f()))},y=E=>!!(u&&!this.state.matches.find(_=>_.id===E));!this.isServer&&!this.state.matches.length&&g();const S=(E,_)=>{var x,C,O;if(of(_)&&!_.reloadDocument)throw _;if(Wa(_)||tn(_)){if(d(E.id,j=>({...j,status:Wa(_)?"redirected":tn(_)?"notFound":"error",isFetching:!1,error:_,beforeLoadPromise:void 0,loaderPromise:void 0})),_.routeId||(_.routeId=E.routeId),(x=E.beforeLoadPromise)==null||x.resolve(),(C=E.loaderPromise)==null||C.resolve(),(O=E.loadPromise)==null||O.resolve(),Wa(_))throw m=!0,_=this.resolveRedirect({..._,_fromLocation:r}),_;if(tn(_))throw this._handleNotFound(o,_,{updateMatch:d}),_}};try{await new Promise((E,_)=>{(async()=>{var x,C,O;try{const j=(z,Q,J)=>{var P,G;const{id:tt,routeId:I}=o[z],W=this.looseRoutesById[I];if(Q instanceof Promise)throw Q;Q.routerCode=J,v=v??z,S(this.getMatch(tt),Q);try{(G=(P=W.options).onError)==null||G.call(P,Q)}catch(rt){Q=rt,S(this.getMatch(tt),Q)}d(tt,rt=>{var lt,ut;return(lt=rt.beforeLoadPromise)==null||lt.resolve(),(ut=rt.loadPromise)==null||ut.resolve(),{...rt,error:Q,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[z,{id:Q,routeId:J}]of o.entries()){const P=this.getMatch(Q),G=(x=o[z-1])==null?void 0:x.id,tt=this.looseRoutesById[J],I=tt.options.pendingMs??this.options.defaultPendingMs,W=!!(f&&!this.isServer&&!y(Q)&&(tt.options.loader||tt.options.beforeLoad)&&typeof I=="number"&&I!==1/0&&(tt.options.pendingComponent??this.options.defaultPendingComponent));let rt=!0;if((P.beforeLoadPromise||P.loaderPromise)&&(W&&setTimeout(()=>{try{g()}catch{}},I),await P.beforeLoadPromise,rt=this.getMatch(Q).status!=="success"),rt){try{d(Q,ot=>({...ot,loadPromise:$i(()=>{var Mt;(Mt=ot.loadPromise)==null||Mt.resolve()}),beforeLoadPromise:$i()}));const lt=new AbortController;let ut;W&&(ut=setTimeout(()=>{try{g()}catch{}},I));const{paramsError:q,searchError:at}=this.getMatch(Q);q&&j(z,q,"PARSE_PARAMS"),at&&j(z,at,"VALIDATE_SEARCH");const F=()=>G?this.getMatch(G).context:this.options.context??{};d(Q,ot=>({...ot,isFetching:"beforeLoad",fetchCount:ot.fetchCount+1,abortController:lt,pendingTimeout:ut,context:{...F(),...ot.__routeContext}}));const{search:$,params:A,context:V,cause:nt}=this.getMatch(Q),it=y(Q),et={search:$,abortController:lt,params:A,preload:it,context:V,location:r,navigate:ot=>this.navigate({...ot,_fromLocation:r}),buildLocation:this.buildLocation,cause:it?"preload":nt,matches:o};let ft=await((O=(C=tt.options).beforeLoad)==null?void 0:O.call(C,et))??{};this.serializeLoaderData&&(ft=this.serializeLoaderData("__beforeLoadContext",ft,{router:this,match:this.getMatch(Q)})),(Wa(ft)||tn(ft))&&j(z,ft,"BEFORE_LOAD"),d(Q,ot=>({...ot,__beforeLoadContext:ft,context:{...F(),...ot.__routeContext,...ft},abortController:lt}))}catch(lt){j(z,lt,"BEFORE_LOAD")}d(Q,lt=>{var ut;return(ut=lt.beforeLoadPromise)==null||ut.resolve(),{...lt,beforeLoadPromise:void 0,isFetching:!1}})}}const B=o.slice(0,v),H=[];B.forEach(({id:z,routeId:Q},J)=>{H.push((async()=>{const{loaderPromise:P}=this.getMatch(z);let G=!1,tt=!1;if(P){await P;const I=this.getMatch(z);I.error&&S(I,I.error)}else{const I=H[J-1],W=this.looseRoutesById[Q],rt=()=>{const{params:nt,loaderDeps:it,abortController:et,context:ft,cause:ot}=this.getMatch(z),Mt=y(z);return{params:nt,deps:it,preload:!!Mt,parentMatchPromise:I,abortController:et,context:ft,location:r,navigate:pt=>this.navigate({...pt,_fromLocation:r}),cause:Mt?"preload":ot,route:W}},lt=Date.now()-this.getMatch(z).updatedAt,ut=y(z),q=ut?W.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:W.options.staleTime??this.options.defaultStaleTime??0,at=W.options.shouldReload,F=typeof at=="function"?at(rt()):at;d(z,nt=>({...nt,loaderPromise:$i(),preload:!!ut&&!this.state.matches.find(it=>it.id===z)}));const $=async()=>{var nt,it,et,ft,ot,Mt,pt,Et;try{const wt=async()=>{const Dt=this.getMatch(z);Dt.minPendingPromise&&await Dt.minPendingPromise};try{this.loadRouteChunk(W),d(z,En=>({...En,isFetching:"loader"}));let Dt=await((it=(nt=W.options).loader)==null?void 0:it.call(nt,rt()));this.serializeLoaderData&&(Dt=this.serializeLoaderData("loaderData",Dt,{router:this,match:this.getMatch(z)})),S(this.getMatch(z),Dt),await W._lazyPromise,await wt();const Jt=(ft=(et=W.options).head)==null?void 0:ft.call(et,{matches:o,match:this.getMatch(z),params:this.getMatch(z).params,loaderData:Dt}),kt=Jt==null?void 0:Jt.meta,xn=Jt==null?void 0:Jt.links,Qn=Jt==null?void 0:Jt.scripts,on=(Mt=(ot=W.options).headers)==null?void 0:Mt.call(ot,{loaderData:Dt});d(z,En=>({...En,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:Dt,meta:kt,links:xn,scripts:Qn,headers:on}))}catch(Dt){let Jt=Dt;await wt(),S(this.getMatch(z),Dt);try{(Et=(pt=W.options).onError)==null||Et.call(pt,Dt)}catch(kt){Jt=kt,S(this.getMatch(z),kt)}d(z,kt=>({...kt,error:Jt,status:"error",isFetching:!1}))}await W._componentsPromise}catch(wt){d(z,Dt=>({...Dt,loaderPromise:void 0})),S(this.getMatch(z),wt)}},{status:A,invalid:V}=this.getMatch(z);G=A==="success"&&(V||(F??lt>q)),ut&&W.options.preload===!1||(G&&!h?(tt=!0,(async()=>{try{await $();const{loaderPromise:nt,loadPromise:it}=this.getMatch(z);nt==null||nt.resolve(),it==null||it.resolve(),d(z,et=>({...et,loaderPromise:void 0}))}catch(nt){of(nt)&&await this.navigate(nt)}})()):(A!=="success"||G&&h)&&await $())}if(!tt){const{loaderPromise:I,loadPromise:W}=this.getMatch(z);I==null||I.resolve(),W==null||W.resolve()}return d(z,I=>({...I,isFetching:tt?I.isFetching:!1,loaderPromise:tt?I.loaderPromise:void 0,invalid:!1})),this.getMatch(z)})())}),await Promise.all(H),E()}catch(j){_(j)}})()}),await g()}catch(E){if(Wa(E)||tn(E))throw tn(E)&&!u&&await g(),E}return o},this.invalidate=r=>{const o=u=>{var f;return((f=r==null?void 0:r.filter)==null?void 0:f.call(r,u))??!0?{...u,invalid:!0,...u.status==="error"?{status:"pending",error:void 0}:{}}:u};return this.__store.setState(u=>{var f;return{...u,matches:u.matches.map(o),cachedMatches:u.cachedMatches.map(o),pendingMatches:(f=u.pendingMatches)==null?void 0:f.map(o)}}),this.load({sync:r==null?void 0:r.sync})},this.resolveRedirect=r=>{const o=r;return o.href||(o.href=this.buildLocation(o).href),o},this.clearCache=r=>{const o=r==null?void 0:r.filter;o!==void 0?this.__store.setState(u=>({...u,cachedMatches:u.cachedMatches.filter(f=>!o(f))})):this.__store.setState(u=>({...u,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=o=>{const u=this.looseRoutesById[o.routeId];if(!u.options.loader)return!0;const f=(o.preload?u.options.preloadGcTime??this.options.defaultPreloadGcTime:u.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(o.status!=="error"&&Date.now()-o.updatedAt(r._lazyPromise===void 0&&(r.lazyFn?r._lazyPromise=r.lazyFn().then(o=>{const{id:u,...f}=o.options;Object.assign(r.options,f)}):r._lazyPromise=Promise.resolve()),r._componentsPromise===void 0&&(r._componentsPromise=r._lazyPromise.then(()=>Promise.all(hy.map(async o=>{const u=r.options[o];u!=null&&u.preload&&await u.preload()})))),r._componentsPromise),this.preloadRoute=async r=>{const o=this.buildLocation(r);let u=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:r});const f=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(h=>h.id)),d=new Set([...f,...this.state.cachedMatches.map(h=>h.id)]);lf(()=>{u.forEach(h=>{d.has(h.id)||this.__store.setState(v=>({...v,cachedMatches:[...v.cachedMatches,h]}))})});try{return u=await this.loadMatches({matches:u,location:o,preload:!0,updateMatch:(h,v)=>{f.has(h)?u=u.map(m=>m.id===h?v(m):m):this.updateMatch(h,v)}}),u}catch(h){if(Wa(h))return h.reloadDocument?void 0:await this.preloadRoute({...h,_fromLocation:o});console.error(h);return}},this.matchRoute=(r,o)=>{const u={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},f=this.buildLocation(u);if(o!=null&&o.pending&&this.state.status!=="pending")return!1;const h=((o==null?void 0:o.pending)===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation,v=as(this.basepath,h.pathname,{...o,to:f.pathname});return!v||r.params&&!wr(v,r.params,{partial:!0})?!1:v&&((o==null?void 0:o.includeSearch)??!0)?wr(h.search,f.search,{partial:!0})?v:!1:v},this.dehydrate=()=>{var r;const o=((r=this.options.errorSerializer)==null?void 0:r.serialize)??k1;return{state:{dehydratedMatches:this.state.matches.map(u=>({...hs(u,["id","status","updatedAt"]),error:u.error?{data:o(u.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var r,o,u;let f;typeof document<"u"&&(f=this.options.transformer.parse((r=window.__TSR__)==null?void 0:r.dehydrated)),Te(f),this.dehydratedData=f.payload,(u=(o=this.options).hydrate)==null||u.call(o,f.payload);const d=f.router.state,h=this.matchRoutes(this.state.location).map(v=>{const m=d.dehydratedMatches.find(g=>g.id===v.id);return Te(m,`Could not find a client-side match for dehydrated match with id: ${v.id}!`),{...v,...m}});this.__store.setState(v=>({...v,matches:h})),this.manifest=f.router.manifest},this.injectedHtml=[],this.injectHtml=r=>{const o=()=>(this.injectedHtml=this.injectedHtml.filter(u=>u!==o),r);this.injectedHtml.push(o)},this.injectScript=(r,o)=>{this.injectHtml(` diff --git a/playground/dist/index.js b/playground/dist/index.js index b5df64933..6ce0735d0 100644 --- a/playground/dist/index.js +++ b/playground/dist/index.js @@ -1,4 +1,4 @@ -var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in n?Vz(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ug=(n,e,t)=>Uz(n,typeof e!="symbol"?e+"":e,t),J1=(n,e,t)=>e.has(n)||hA("Cannot "+t);var j=(n,e,t)=>(J1(n,e,"read from private field"),t?t.call(n):e.get(n)),Te=(n,e,t)=>e.has(n)?hA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),be=(n,e,t,r)=>(J1(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ve=(n,e,t)=>(J1(n,e,"access private method"),t);var bd=(n,e,t,r)=>({set _(i){be(n,e,i,t)},get _(){return j(n,e,r)}});function Fz(n,e){for(var t=0;tr[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function B3(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ex={exports:{}},xd={};/** +var qz=Object.defineProperty;var pA=n=>{throw TypeError(n)};var Zz=(n,e,t)=>e in n?qz(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ug=(n,e,t)=>Zz(n,typeof e!="symbol"?e+"":e,t),J1=(n,e,t)=>e.has(n)||pA("Cannot "+t);var j=(n,e,t)=>(J1(n,e,"read from private field"),t?t.call(n):e.get(n)),Te=(n,e,t)=>e.has(n)?pA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),be=(n,e,t,r)=>(J1(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ve=(n,e,t)=>(J1(n,e,"access private method"),t);var bd=(n,e,t,r)=>({set _(i){be(n,e,i,t)},get _(){return j(n,e,r)}});function Gz(n,e){for(var t=0;tr[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function z3(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ex={exports:{}},xd={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var pA;function qz(){if(pA)return xd;pA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:n,type:r,key:o,ref:i!==void 0?i:null,props:s}}return xd.Fragment=e,xd.jsx=t,xd.jsxs=t,xd}var mA;function Zz(){return mA||(mA=1,ex.exports=qz()),ex.exports}var b=Zz(),tx={exports:{}},Qe={};/** + */var mA;function Wz(){if(mA)return xd;mA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var l in i)l!=="key"&&(s[l]=i[l])}else s=i;return i=s.ref,{$$typeof:n,type:r,key:o,ref:i!==void 0?i:null,props:s}}return xd.Fragment=e,xd.jsx=t,xd.jsxs=t,xd}var gA;function Kz(){return gA||(gA=1,ex.exports=Wz()),ex.exports}var b=Kz(),tx={exports:{}},Qe={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gA;function Gz(){if(gA)return Qe;gA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}k.prototype.isReactComponent={},k.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,te,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=k.prototype;function _(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}var T=_.prototype=new E;T.constructor=_,S(T,k.prototype),T.isPureReactComponent=!0;var N=Array.isArray,A={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function D(L,te,F,H,Q,X){return F=X.ref,{$$typeof:n,type:L,key:te,ref:F!==void 0?F:null,props:X}}function B(L,te){return D(L.type,te,void 0,void 0,void 0,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function Z(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(F){return te[F]})}var U=/\/+/g;function $(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Z(""+L.key):te.toString(36)}function de(){}function se(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(de,de):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function ce(L,te,F,H,Q){var X=typeof L;(X==="undefined"||X==="boolean")&&(L=null);var ne=!1;if(L===null)ne=!0;else switch(X){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(L.$$typeof){case n:case e:ne=!0;break;case h:return ne=L._init,ce(ne(L._payload),te,F,H,Q)}}if(ne)return Q=Q(L),ne=H===""?"."+$(L,0):H,N(Q)?(F="",ne!=null&&(F=ne.replace(U,"$&/")+"/"),ce(Q,te,F,"",function(_e){return _e})):Q!=null&&(P(Q)&&(Q=B(Q,F+(Q.key==null||L&&L.key===Q.key?"":(""+Q.key).replace(U,"$&/")+"/")+ne)),te.push(Q)),1;ne=0;var me=H===""?".":H+":";if(N(L))for(var ye=0;yen.forEach(t=>Wz(t,e))}function Pt(...n){return x.useCallback(XC(...n),n)}function Kz(n,e){const t=x.createContext(e),r=s=>{const{children:o,...l}=s,u=x.useMemo(()=>l,Object.values(l));return b.jsx(t.Provider,{value:u,children:o})};r.displayName=n+"Provider";function i(s){const o=x.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function us(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];const f=m=>{var E;const{scope:g,children:y,...S}=m,C=((E=g==null?void 0:g[n])==null?void 0:E[u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})};f.displayName=s+"Provider";function h(m,g){var C;const y=((C=g==null?void 0:g[n])==null?void 0:C[u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,Qz(i,...e)]}function Qz(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var nx={exports:{}},Cn={};/** + */var vA;function Qz(){if(vA)return Qe;vA=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}k.prototype.isReactComponent={},k.prototype.setState=function(L,te){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,te,"setState")},k.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=k.prototype;function _(L,te,F){this.props=L,this.context=te,this.refs=C,this.updater=F||y}var T=_.prototype=new E;T.constructor=_,S(T,k.prototype),T.isPureReactComponent=!0;var N=Array.isArray,A={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function D(L,te,F,H,Q,X){return F=X.ref,{$$typeof:n,type:L,key:te,ref:F!==void 0?F:null,props:X}}function B(L,te){return D(L.type,te,void 0,void 0,void 0,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function Z(L){var te={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(F){return te[F]})}var U=/\/+/g;function $(L,te){return typeof L=="object"&&L!==null&&L.key!=null?Z(""+L.key):te.toString(36)}function de(){}function se(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(de,de):(L.status="pending",L.then(function(te){L.status==="pending"&&(L.status="fulfilled",L.value=te)},function(te){L.status==="pending"&&(L.status="rejected",L.reason=te)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function ce(L,te,F,H,Q){var X=typeof L;(X==="undefined"||X==="boolean")&&(L=null);var ne=!1;if(L===null)ne=!0;else switch(X){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(L.$$typeof){case n:case e:ne=!0;break;case h:return ne=L._init,ce(ne(L._payload),te,F,H,Q)}}if(ne)return Q=Q(L),ne=H===""?"."+$(L,0):H,N(Q)?(F="",ne!=null&&(F=ne.replace(U,"$&/")+"/"),ce(Q,te,F,"",function(_e){return _e})):Q!=null&&(P(Q)&&(Q=B(Q,F+(Q.key==null||L&&L.key===Q.key?"":(""+Q.key).replace(U,"$&/")+"/")+ne)),te.push(Q)),1;ne=0;var me=H===""?".":H+":";if(N(L))for(var ye=0;yen.forEach(t=>Yz(t,e))}function Pt(...n){return x.useCallback(JC(...n),n)}function Xz(n,e){const t=x.createContext(e),r=s=>{const{children:o,...l}=s,u=x.useMemo(()=>l,Object.values(l));return b.jsx(t.Provider,{value:u,children:o})};r.displayName=n+"Provider";function i(s){const o=x.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function us(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];const f=m=>{var E;const{scope:g,children:y,...S}=m,C=((E=g==null?void 0:g[n])==null?void 0:E[u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})};f.displayName=s+"Provider";function h(m,g){var C;const y=((C=g==null?void 0:g[n])==null?void 0:C[u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,Jz(i,...e)]}function Jz(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var nx={exports:{}},Cn={};/** * @license React * react-dom.production.js * @@ -22,7 +22,7 @@ var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yA;function Yz(){if(yA)return Cn;yA=1;var n=Tp();function e(u){var f="https://react.dev/errors/"+u;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),nx.exports=Yz(),nx.exports}var Ap=I3();const z3=B3(Ap);var ia=x.forwardRef((n,e)=>{const{children:t,...r}=n,i=x.Children.toArray(t),s=i.find(Xz);if(s){const o=s.props.children,l=i.map(u=>u===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return b.jsx(Rw,{...r,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,l):null})}return b.jsx(Rw,{...r,ref:e,children:t})});ia.displayName="Slot";var Rw=x.forwardRef((n,e)=>{const{children:t,...r}=n;if(x.isValidElement(t)){const i=e$(t);return x.cloneElement(t,{...Jz(r,t.props),ref:e?XC(e,i):i})}return x.Children.count(t)>1?x.Children.only(null):null});Rw.displayName="SlotClone";var $3=({children:n})=>b.jsx(b.Fragment,{children:n});function Xz(n){return x.isValidElement(n)&&n.type===$3}function Jz(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...l)=>{s(...l),i(...l)}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function e$(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var t$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],lt=t$.reduce((n,e)=>{const t=x.forwardRef((r,i)=>{const{asChild:s,...o}=r,l=s?ia:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...o,ref:i})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function H3(n,e){n&&Ap.flushSync(()=>n.dispatchEvent(e))}function un(n){const e=x.useRef(n);return x.useEffect(()=>{e.current=n}),x.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function n$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var r$="DismissableLayer",_w="dismissableLayer.update",i$="dismissableLayer.pointerDownOutside",s$="dismissableLayer.focusOutside",xA,V3=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mp=x.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...u}=n,f=x.useContext(V3),[h,m]=x.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=x.useState({}),S=Pt(e,D=>m(D)),C=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(k),_=h?C.indexOf(h):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,N=_>=E,A=l$(D=>{const B=D.target,P=[...f.branches].some(Z=>Z.contains(B));!N||P||(i==null||i(D),o==null||o(D),D.defaultPrevented||l==null||l())},g),O=c$(D=>{const B=D.target;[...f.branches].some(Z=>Z.contains(B))||(s==null||s(D),o==null||o(D),D.defaultPrevented||l==null||l())},g);return n$(D=>{_===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),x.useEffect(()=>{if(h)return t&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(xA=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),wA(),()=>{t&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=xA)}},[h,g,t,f]),x.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),wA())},[h,f]),x.useEffect(()=>{const D=()=>y({});return document.addEventListener(_w,D),()=>document.removeEventListener(_w,D)},[]),b.jsx(lt.div,{...u,ref:S,style:{pointerEvents:T?N?"auto":"none":void 0,...n.style},onFocusCapture:Oe(n.onFocusCapture,O.onFocusCapture),onBlurCapture:Oe(n.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Oe(n.onPointerDownCapture,A.onPointerDownCapture)})});Mp.displayName=r$;var o$="DismissableLayerBranch",a$=x.forwardRef((n,e)=>{const t=x.useContext(V3),r=x.useRef(null),i=Pt(e,r);return x.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),b.jsx(lt.div,{...n,ref:i})});a$.displayName=o$;function l$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let u=function(){U3(i$,t,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=u,e.addEventListener("click",i.current,{once:!0})):u()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function c$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&U3(s$,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function wA(){const n=new CustomEvent(_w);document.dispatchEvent(n)}function U3(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?H3(i,s):i.dispatchEvent(s)}var _i=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},u$=Uv.useId||(()=>{}),f$=0;function Si(n){const[e,t]=x.useState(u$());return _i(()=>{n||t(r=>r??String(f$++))},[n]),n||(e?`radix-${e}`:"")}const d$=["top","right","bottom","left"],sa=Math.min,kr=Math.max,R0=Math.round,fg=Math.floor,ts=n=>({x:n,y:n}),h$={left:"right",right:"left",bottom:"top",top:"bottom"},p$={start:"end",end:"start"};function Tw(n,e,t){return kr(n,sa(e,t))}function Gs(n,e){return typeof n=="function"?n(e):n}function Ws(n){return n.split("-")[0]}function cf(n){return n.split("-")[1]}function JC(n){return n==="x"?"y":"x"}function e2(n){return n==="y"?"height":"width"}function oa(n){return["top","bottom"].includes(Ws(n))?"y":"x"}function t2(n){return JC(oa(n))}function m$(n,e,t){t===void 0&&(t=!1);const r=cf(n),i=t2(n),s=e2(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=_0(o)),[o,_0(o)]}function g$(n){const e=_0(n);return[Aw(n),e,Aw(e)]}function Aw(n){return n.replace(/start|end/g,e=>p$[e])}function v$(n,e,t){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function y$(n,e,t,r){const i=cf(n);let s=v$(Ws(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Aw)))),s}function _0(n){return n.replace(/left|right|bottom|top/g,e=>h$[e])}function b$(n){return{top:0,right:0,bottom:0,left:0,...n}}function F3(n){return typeof n!="number"?b$(n):{top:n,right:n,bottom:n,left:n}}function T0(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function SA(n,e,t){let{reference:r,floating:i}=n;const s=oa(e),o=t2(e),l=e2(o),u=Ws(e),f=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,g=r[l]/2-i[l]/2;let y;switch(u){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-i.width,y:m};break;default:y={x:r.x,y:r.y}}switch(cf(e)){case"start":y[o]-=g*(t&&f?-1:1);break;case"end":y[o]+=g*(t&&f?-1:1);break}return y}const x$=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,l=s.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:h,y:m}=SA(f,r,u),g=r,y={},S=0;for(let C=0;C({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:u}=e,{element:f,padding:h=0}=Gs(n,e)||{};if(f==null)return{};const m=F3(h),g={x:t,y:r},y=t2(i),S=e2(y),C=await o.getDimensions(f),k=y==="y",E=k?"top":"left",_=k?"bottom":"right",T=k?"clientHeight":"clientWidth",N=s.reference[S]+s.reference[y]-g[y]-s.floating[S],A=g[y]-s.reference[y],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let D=O?O[T]:0;(!D||!await(o.isElement==null?void 0:o.isElement(O)))&&(D=l.floating[T]||s.floating[S]);const B=N/2-A/2,P=D/2-C[S]/2-1,Z=sa(m[E],P),U=sa(m[_],P),$=Z,de=D-C[S]-U,se=D/2-C[S]/2+B,ce=Tw($,se,de),G=!u.arrow&&cf(i)!=null&&se!==ce&&s.reference[S]/2-(se<$?Z:U)-C[S]/2<0,ue=G?se<$?se-$:se-de:0;return{[y]:g[y]+ue,data:{[y]:ce,centerOffset:se-ce-ue,...G&&{alignmentOffset:ue}},reset:G}}}),S$=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:u,elements:f}=e,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=Gs(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const E=Ws(i),_=oa(l),T=Ws(l)===l,N=await(u.isRTL==null?void 0:u.isRTL(f.floating)),A=g||(T||!C?[_0(l)]:g$(l)),O=S!=="none";!g&&O&&A.push(...y$(l,C,S,N));const D=[l,...A],B=await ph(e,k),P=[];let Z=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(B[E]),m){const se=m$(i,o,N);P.push(B[se[0]],B[se[1]])}if(Z=[...Z,{placement:i,overflows:P}],!P.every(se=>se<=0)){var U,$;const se=(((U=s.flip)==null?void 0:U.index)||0)+1,ce=D[se];if(ce)return{data:{index:se,overflows:Z},reset:{placement:ce}};let G=($=Z.filter(ue=>ue.overflows[0]<=0).sort((ue,ie)=>ue.overflows[1]-ie.overflows[1])[0])==null?void 0:$.placement;if(!G)switch(y){case"bestFit":{var de;const ue=(de=Z.filter(ie=>{if(O){const re=oa(ie.placement);return re===_||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,L)=>re+L,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:de[0];ue&&(G=ue);break}case"initialPlacement":G=l;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function CA(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function kA(n){return d$.some(e=>n[e]>=0)}const C$=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=Gs(n,e);switch(r){case"referenceHidden":{const s=await ph(e,{...i,elementContext:"reference"}),o=CA(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:kA(o)}}}case"escaped":{const s=await ph(e,{...i,altBoundary:!0}),o=CA(s,t.floating);return{data:{escapedOffsets:o,escaped:kA(o)}}}default:return{}}}}};async function k$(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ws(t),l=cf(t),u=oa(t)==="y",f=["left","top"].includes(o)?-1:1,h=s&&u?-1:1,m=Gs(e,n);let{mainAxis:g,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof S=="number"&&(y=l==="end"?S*-1:S),u?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const E$=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:l}=e,u=await k$(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:o}}}}},R$=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:k=>{let{x:E,y:_}=k;return{x:E,y:_}}},...u}=Gs(n,e),f={x:t,y:r},h=await ph(e,u),m=oa(Ws(i)),g=JC(m);let y=f[g],S=f[m];if(s){const k=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=y+h[k],T=y-h[E];y=Tw(_,y,T)}if(o){const k=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[k],T=S-h[E];S=Tw(_,S,T)}const C=l.fn({...e,[g]:y,[m]:S});return{...C,data:{x:C.x-t,y:C.y-r,enabled:{[g]:s,[m]:o}}}}}},_$=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Gs(n,e),h={x:t,y:r},m=oa(i),g=JC(m);let y=h[g],S=h[m];const C=Gs(l,e),k=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(u){const T=g==="y"?"height":"width",N=s.reference[g]-s.floating[T]+k.mainAxis,A=s.reference[g]+s.reference[T]-k.mainAxis;yA&&(y=A)}if(f){var E,_;const T=g==="y"?"width":"height",N=["top","left"].includes(Ws(i)),A=s.reference[m]-s.floating[T]+(N&&((E=o.offset)==null?void 0:E[m])||0)+(N?0:k.crossAxis),O=s.reference[m]+s.reference[T]+(N?0:((_=o.offset)==null?void 0:_[m])||0)-(N?k.crossAxis:0);SO&&(S=O)}return{[g]:y,[m]:S}}}},T$=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...f}=Gs(n,e),h=await ph(e,f),m=Ws(i),g=cf(i),y=oa(i)==="y",{width:S,height:C}=s.floating;let k,E;m==="top"||m==="bottom"?(k=m,E=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=m,k=g==="end"?"top":"bottom");const _=C-h.top-h.bottom,T=S-h.left-h.right,N=sa(C-h[k],_),A=sa(S-h[E],T),O=!e.middlewareData.shift;let D=N,B=A;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(B=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(D=_),O&&!g){const Z=kr(h.left,0),U=kr(h.right,0),$=kr(h.top,0),de=kr(h.bottom,0);y?B=S-2*(Z!==0||U!==0?Z+U:kr(h.left,h.right)):D=C-2*($!==0||de!==0?$+de:kr(h.top,h.bottom))}await u({...e,availableWidth:B,availableHeight:D});const P=await o.getDimensions(l.floating);return S!==P.width||C!==P.height?{reset:{rects:!0}}:{}}}};function Fv(){return typeof window<"u"}function uf(n){return q3(n)?(n.nodeName||"").toLowerCase():"#document"}function _r(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function fs(n){var e;return(e=(q3(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function q3(n){return Fv()?n instanceof Node||n instanceof _r(n).Node:!1}function Ti(n){return Fv()?n instanceof Element||n instanceof _r(n).Element:!1}function ss(n){return Fv()?n instanceof HTMLElement||n instanceof _r(n).HTMLElement:!1}function EA(n){return!Fv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof _r(n).ShadowRoot}function Op(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=Ai(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function A$(n){return["table","td","th"].includes(uf(n))}function qv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function n2(n){const e=r2(),t=Ti(n)?Ai(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function M$(n){let e=aa(n);for(;ss(e)&&!Pu(e);){if(n2(e))return e;if(qv(e))return null;e=aa(e)}return null}function r2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Pu(n){return["html","body","#document"].includes(uf(n))}function Ai(n){return _r(n).getComputedStyle(n)}function Zv(n){return Ti(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function aa(n){if(uf(n)==="html")return n;const e=n.assignedSlot||n.parentNode||EA(n)&&n.host||fs(n);return EA(e)?e.host:e}function Z3(n){const e=aa(n);return Pu(e)?n.ownerDocument?n.ownerDocument.body:n.body:ss(e)&&Op(e)?e:Z3(e)}function mh(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=Z3(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=_r(i);if(s){const l=Mw(o);return e.concat(o,o.visualViewport||[],Op(i)?i:[],l&&t?mh(l):[])}return e.concat(i,mh(i,[],t))}function Mw(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function G3(n){const e=Ai(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ss(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,l=R0(t)!==s||R0(r)!==o;return l&&(t=s,r=o),{width:t,height:r,$:l}}function i2(n){return Ti(n)?n:n.contextElement}function nu(n){const e=i2(n);if(!ss(e))return ts(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=G3(e);let o=(s?R0(t.width):t.width)/r,l=(s?R0(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const O$=ts(0);function W3(n){const e=_r(n);return!r2()||!e.visualViewport?O$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function N$(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==_r(n)?!1:e}function Sl(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=i2(n);let o=ts(1);e&&(r?Ti(r)&&(o=nu(r)):o=nu(n));const l=N$(s,t,r)?W3(s):ts(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,m=i.height/o.y;if(s){const g=_r(s),y=r&&Ti(r)?_r(r):r;let S=g,C=Mw(S);for(;C&&r&&y!==S;){const k=nu(C),E=C.getBoundingClientRect(),_=Ai(C),T=E.left+(C.clientLeft+parseFloat(_.paddingLeft))*k.x,N=E.top+(C.clientTop+parseFloat(_.paddingTop))*k.y;u*=k.x,f*=k.y,h*=k.x,m*=k.y,u+=T,f+=N,S=_r(C),C=Mw(S)}}return T0({width:h,height:m,x:u,y:f})}function s2(n,e){const t=Zv(n).scrollLeft;return e?e.left+t:Sl(fs(n)).left+t}function K3(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:s2(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function D$(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=fs(r),l=e?qv(e.floating):!1;if(r===o||l&&s)return t;let u={scrollLeft:0,scrollTop:0},f=ts(1);const h=ts(0),m=ss(r);if((m||!m&&!s)&&((uf(r)!=="body"||Op(o))&&(u=Zv(r)),ss(r))){const y=Sl(r);f=nu(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=o&&!m&&!s?K3(o,u,!0):ts(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:t.y*f.y-u.scrollTop*f.y+h.y+g.y}}function P$(n){return Array.from(n.getClientRects())}function j$(n){const e=fs(n),t=Zv(n),r=n.ownerDocument.body,i=kr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=kr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+s2(n);const l=-t.scrollTop;return Ai(r).direction==="rtl"&&(o+=kr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}function L$(n,e){const t=_r(n),r=fs(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;const f=r2();(!f||f&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:o,x:l,y:u}}function B$(n,e){const t=Sl(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=ss(n)?nu(n):ts(1),o=n.clientWidth*s.x,l=n.clientHeight*s.y,u=i*s.x,f=r*s.y;return{width:o,height:l,x:u,y:f}}function RA(n,e,t){let r;if(e==="viewport")r=L$(n,t);else if(e==="document")r=j$(fs(n));else if(Ti(e))r=B$(e,t);else{const i=W3(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return T0(r)}function Q3(n,e){const t=aa(n);return t===e||!Ti(t)||Pu(t)?!1:Ai(t).position==="fixed"||Q3(t,e)}function I$(n,e){const t=e.get(n);if(t)return t;let r=mh(n,[],!1).filter(l=>Ti(l)&&uf(l)!=="body"),i=null;const s=Ai(n).position==="fixed";let o=s?aa(n):n;for(;Ti(o)&&!Pu(o);){const l=Ai(o),u=n2(o);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Op(o)&&!u&&Q3(n,o))?r=r.filter(h=>h!==o):i=l,o=aa(o)}return e.set(n,r),r}function z$(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?qv(e)?[]:I$(e,this._c):[].concat(t),r],l=o[0],u=o.reduce((f,h)=>{const m=RA(e,h,i);return f.top=kr(m.top,f.top),f.right=sa(m.right,f.right),f.bottom=sa(m.bottom,f.bottom),f.left=kr(m.left,f.left),f},RA(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function $$(n){const{width:e,height:t}=G3(n);return{width:e,height:t}}function H$(n,e,t){const r=ss(e),i=fs(e),s=t==="fixed",o=Sl(n,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=ts(0);if(r||!r&&!s)if((uf(e)!=="body"||Op(i))&&(l=Zv(e)),r){const g=Sl(e,!0,s,e);u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}else i&&(u.x=s2(i));const f=i&&!r&&!s?K3(i,l):ts(0),h=o.left+l.scrollLeft-u.x-f.x,m=o.top+l.scrollTop-u.y-f.y;return{x:h,y:m,width:o.width,height:o.height}}function rx(n){return Ai(n).position==="static"}function _A(n,e){if(!ss(n)||Ai(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return fs(n)===t&&(t=t.ownerDocument.body),t}function Y3(n,e){const t=_r(n);if(qv(n))return t;if(!ss(n)){let i=aa(n);for(;i&&!Pu(i);){if(Ti(i)&&!rx(i))return i;i=aa(i)}return t}let r=_A(n,e);for(;r&&A$(r)&&rx(r);)r=_A(r,e);return r&&Pu(r)&&rx(r)&&!n2(r)?t:r||M$(n)||t}const V$=async function(n){const e=this.getOffsetParent||Y3,t=this.getDimensions,r=await t(n.floating);return{reference:H$(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function U$(n){return Ai(n).direction==="rtl"}const F$={convertOffsetParentRelativeRectToViewportRelativeRect:D$,getDocumentElement:fs,getClippingRect:z$,getOffsetParent:Y3,getElementRects:V$,getClientRects:P$,getDimensions:$$,getScale:nu,isElement:Ti,isRTL:U$};function q$(n,e){let t=null,r;const i=fs(n);function s(){var l;clearTimeout(r),(l=t)==null||l.disconnect(),t=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const{left:f,top:h,width:m,height:g}=n.getBoundingClientRect();if(l||e(),!m||!g)return;const y=fg(h),S=fg(i.clientWidth-(f+m)),C=fg(i.clientHeight-(h+g)),k=fg(f),_={rootMargin:-y+"px "+-S+"px "+-C+"px "+-k+"px",threshold:kr(0,sa(1,u))||1};let T=!0;function N(A){const O=A[0].intersectionRatio;if(O!==u){if(!T)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}T=!1}try{t=new IntersectionObserver(N,{..._,root:i.ownerDocument})}catch{t=new IntersectionObserver(N,_)}t.observe(n)}return o(!0),s}function Z$(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=i2(n),h=i||s?[...f?mh(f):[],...mh(e)]:[];h.forEach(E=>{i&&E.addEventListener("scroll",t,{passive:!0}),s&&E.addEventListener("resize",t)});const m=f&&l?q$(f,t):null;let g=-1,y=null;o&&(y=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(e)})),t()}),f&&!u&&y.observe(f),y.observe(e));let S,C=u?Sl(n):null;u&&k();function k(){const E=Sl(n);C&&(E.x!==C.x||E.y!==C.y||E.width!==C.width||E.height!==C.height)&&t(),C=E,S=requestAnimationFrame(k)}return t(),()=>{var E;h.forEach(_=>{i&&_.removeEventListener("scroll",t),s&&_.removeEventListener("resize",t)}),m==null||m(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(S)}}const G$=E$,W$=R$,K$=S$,Q$=T$,Y$=C$,TA=w$,X$=_$,J$=(n,e,t)=>{const r=new Map,i={platform:F$,...t},s={...i.platform,_c:r};return x$(n,e,{...i,platform:s})};var r0=typeof document<"u"?x.useLayoutEffect:x.useEffect;function A0(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!A0(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!A0(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function X3(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function AA(n,e){const t=X3(n);return Math.round(e*t)/t}function ix(n){const e=x.useRef(n);return r0(()=>{e.current=n}),e}function eH(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=n,[h,m]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);A0(g,r)||y(r);const[S,C]=x.useState(null),[k,E]=x.useState(null),_=x.useCallback(ie=>{ie!==O.current&&(O.current=ie,C(ie))},[]),T=x.useCallback(ie=>{ie!==D.current&&(D.current=ie,E(ie))},[]),N=s||S,A=o||k,O=x.useRef(null),D=x.useRef(null),B=x.useRef(h),P=u!=null,Z=ix(u),U=ix(i),$=ix(f),de=x.useCallback(()=>{if(!O.current||!D.current)return;const ie={placement:e,strategy:t,middleware:g};U.current&&(ie.platform=U.current),J$(O.current,D.current,ie).then(re=>{const L={...re,isPositioned:$.current!==!1};se.current&&!A0(B.current,L)&&(B.current=L,Ap.flushSync(()=>{m(L)}))})},[g,e,t,U,$]);r0(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,m(ie=>({...ie,isPositioned:!1})))},[f]);const se=x.useRef(!1);r0(()=>(se.current=!0,()=>{se.current=!1}),[]),r0(()=>{if(N&&(O.current=N),A&&(D.current=A),N&&A){if(Z.current)return Z.current(N,A,de);de()}},[N,A,de,Z,P]);const ce=x.useMemo(()=>({reference:O,floating:D,setReference:_,setFloating:T}),[_,T]),G=x.useMemo(()=>({reference:N,floating:A}),[N,A]),ue=x.useMemo(()=>{const ie={position:t,left:0,top:0};if(!G.floating)return ie;const re=AA(G.floating,h.x),L=AA(G.floating,h.y);return l?{...ie,transform:"translate("+re+"px, "+L+"px)",...X3(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:re,top:L}},[t,l,G.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:de,refs:ce,elements:G,floatingStyles:ue}),[h,de,ce,G,ue])}const tH=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?TA({element:r.current,padding:i}).fn(t):{}:r?TA({element:r,padding:i}).fn(t):{}}}},nH=(n,e)=>({...G$(n),options:[n,e]}),rH=(n,e)=>({...W$(n),options:[n,e]}),iH=(n,e)=>({...X$(n),options:[n,e]}),sH=(n,e)=>({...K$(n),options:[n,e]}),oH=(n,e)=>({...Q$(n),options:[n,e]}),aH=(n,e)=>({...Y$(n),options:[n,e]}),lH=(n,e)=>({...tH(n),options:[n,e]});var cH="Arrow",J3=x.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return b.jsx(lt.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});J3.displayName=cH;var uH=J3;function o2(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];function f(m){const{scope:g,children:y,...S}=m,C=(g==null?void 0:g[n][u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})}function h(m,g){const y=(g==null?void 0:g[n][u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,fH(i,...e)]}function fH(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function a2(n){const[e,t]=x.useState(void 0);return _i(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,l;if("borderBoxSize"in s){const u=s.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=n.offsetWidth,l=n.offsetHeight;t({width:o,height:l})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var l2="Popper",[e4,ff]=o2(l2),[dH,t4]=e4(l2),n4=n=>{const{__scopePopper:e,children:t}=n,[r,i]=x.useState(null);return b.jsx(dH,{scope:e,anchor:r,onAnchorChange:i,children:t})};n4.displayName=l2;var r4="PopperAnchor",i4=x.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=t4(r4,t),o=x.useRef(null),l=Pt(e,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(lt.div,{...i,ref:l})});i4.displayName=r4;var c2="PopperContent",[hH,pH]=e4(c2),s4=x.forwardRef((n,e)=>{var me,ye,_e,Ne,Xe,xt;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:S,...C}=n,k=t4(c2,t),[E,_]=x.useState(null),T=Pt(e,qe=>_(qe)),[N,A]=x.useState(null),O=a2(N),D=(O==null?void 0:O.width)??0,B=(O==null?void 0:O.height)??0,P=r+(s!=="center"?"-"+s:""),Z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},U=Array.isArray(f)?f:[f],$=U.length>0,de={padding:Z,boundary:U.filter(gH),altBoundary:$},{refs:se,floatingStyles:ce,placement:G,isPositioned:ue,middlewareData:ie}=eH({strategy:"fixed",placement:P,whileElementsMounted:(...qe)=>Z$(...qe,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[nH({mainAxis:i+B,alignmentAxis:o}),u&&rH({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?iH():void 0,...de}),u&&sH({...de}),oH({...de,apply:({elements:qe,rects:Ut,availableWidth:qn,availableHeight:Nn})=>{const{width:ur,height:Ft}=Ut.reference,ci=qe.floating.style;ci.setProperty("--radix-popper-available-width",`${qn}px`),ci.setProperty("--radix-popper-available-height",`${Nn}px`),ci.setProperty("--radix-popper-anchor-width",`${ur}px`),ci.setProperty("--radix-popper-anchor-height",`${Ft}px`)}}),N&&lH({element:N,padding:l}),vH({arrowWidth:D,arrowHeight:B}),g&&aH({strategy:"referenceHidden",...de})]}),[re,L]=l4(G),te=un(S);_i(()=>{ue&&(te==null||te())},[ue,te]);const F=(me=ie.arrow)==null?void 0:me.x,H=(ye=ie.arrow)==null?void 0:ye.y,Q=((_e=ie.arrow)==null?void 0:_e.centerOffset)!==0,[X,ne]=x.useState();return _i(()=>{E&&ne(window.getComputedStyle(E).zIndex)},[E]),b.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ue?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(Ne=ie.transformOrigin)==null?void 0:Ne.x,(Xe=ie.transformOrigin)==null?void 0:Xe.y].join(" "),...((xt=ie.hide)==null?void 0:xt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:b.jsx(hH,{scope:t,placedSide:re,onArrowChange:A,arrowX:F,arrowY:H,shouldHideArrow:Q,children:b.jsx(lt.div,{"data-side":re,"data-align":L,...C,ref:T,style:{...C.style,animation:ue?void 0:"none"}})})})});s4.displayName=c2;var o4="PopperArrow",mH={top:"bottom",right:"left",bottom:"top",left:"right"},a4=x.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=pH(o4,r),o=mH[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(uH,{...i,ref:t,style:{...i.style,display:"block"}})})});a4.displayName=o4;function gH(n){return n!==null}var vH=n=>({name:"transformOrigin",options:n,fn(e){var k,E,_;const{placement:t,rects:r,middlewareData:i}=e,o=((k=i.arrow)==null?void 0:k.centerOffset)!==0,l=o?0:n.arrowWidth,u=o?0:n.arrowHeight,[f,h]=l4(t),m={start:"0%",center:"50%",end:"100%"}[h],g=(((E=i.arrow)==null?void 0:E.x)??0)+l/2,y=(((_=i.arrow)==null?void 0:_.y)??0)+u/2;let S="",C="";return f==="bottom"?(S=o?m:`${g}px`,C=`${-u}px`):f==="top"?(S=o?m:`${g}px`,C=`${r.floating.height+u}px`):f==="right"?(S=`${-u}px`,C=o?m:`${y}px`):f==="left"&&(S=`${r.floating.width+u}px`,C=o?m:`${y}px`),{data:{x:S,y:C}}}});function l4(n){const[e,t="center"]=n.split("-");return[e,t]}var u2=n4,Gv=i4,f2=s4,d2=a4,yH="Portal",Wv=x.forwardRef((n,e)=>{var l;const{container:t,...r}=n,[i,s]=x.useState(!1);_i(()=>s(!0),[]);const o=t||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?z3.createPortal(b.jsx(lt.div,{...r,ref:e}),o):null});Wv.displayName=yH;function bH(n,e){return x.useReducer((t,r)=>e[t][r]??t,n)}var or=n=>{const{present:e,children:t}=n,r=xH(e),i=typeof t=="function"?t({present:r.isPresent}):x.Children.only(t),s=Pt(r.ref,wH(i));return typeof t=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};or.displayName="Presence";function xH(n){const[e,t]=x.useState(),r=x.useRef({}),i=x.useRef(n),s=x.useRef("none"),o=n?"mounted":"unmounted",[l,u]=bH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=dg(r.current);s.current=l==="mounted"?f:"none"},[l]),_i(()=>{const f=r.current,h=i.current;if(h!==n){const g=s.current,y=dg(f);n?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,u]),_i(()=>{if(e){let f;const h=e.ownerDocument.defaultView??window,m=y=>{const C=dg(r.current).includes(y.animationName);if(y.target===e&&C&&(u("ANIMATION_END"),!i.current)){const k=e.style.animationFillMode;e.style.animationFillMode="forwards",f=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=k)})}},g=y=>{y.target===e&&(s.current=dg(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{h.clearTimeout(f),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(f=>{f&&(r.current=getComputedStyle(f)),t(f)},[])}}function dg(n){return(n==null?void 0:n.animationName)||"none"}function wH(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function Js({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=SH({defaultProp:e,onChange:t}),s=n!==void 0,o=s?n:r,l=un(t),u=x.useCallback(f=>{if(s){const m=typeof f=="function"?f(n):f;m!==n&&l(m)}else i(f)},[s,n,i,l]);return[o,u]}function SH({defaultProp:n,onChange:e}){const t=x.useState(n),[r]=t,i=x.useRef(r),s=un(e);return x.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),t}var CH="VisuallyHidden",c4=x.forwardRef((n,e)=>b.jsx(lt.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));c4.displayName=CH;var kH=c4,[Kv,Zfe]=us("Tooltip",[ff]),Qv=ff(),u4="TooltipProvider",EH=700,Ow="tooltip.open",[RH,h2]=Kv(u4),f4=n=>{const{__scopeTooltip:e,delayDuration:t=EH,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,[o,l]=x.useState(!0),u=x.useRef(!1),f=x.useRef(0);return x.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),b.jsx(RH,{scope:e,isOpenDelayed:o,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(f.current),l(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:x.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:s})};f4.displayName=u4;var Yv="Tooltip",[_H,Np]=Kv(Yv),d4=n=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=n,u=h2(Yv,n.__scopeTooltip),f=Qv(e),[h,m]=x.useState(null),g=Si(),y=x.useRef(0),S=o??u.disableHoverableContent,C=l??u.delayDuration,k=x.useRef(!1),[E=!1,_]=Js({prop:r,defaultProp:i,onChange:D=>{D?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ow))):u.onClose(),s==null||s(D)}}),T=x.useMemo(()=>E?k.current?"delayed-open":"instant-open":"closed",[E]),N=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,_(!0)},[_]),A=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),O=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,_(!0),y.current=0},C)},[C,_]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),b.jsx(u2,{...f,children:b.jsx(_H,{scope:e,contentId:g,open:E,stateAttribute:T,trigger:h,onTriggerChange:m,onTriggerEnter:x.useCallback(()=>{u.isOpenDelayed?O():N()},[u.isOpenDelayed,O,N]),onTriggerLeave:x.useCallback(()=>{S?A():(window.clearTimeout(y.current),y.current=0)},[A,S]),onOpen:N,onClose:A,disableHoverableContent:S,children:t})})};d4.displayName=Yv;var Nw="TooltipTrigger",h4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Np(Nw,t),s=h2(Nw,t),o=Qv(t),l=x.useRef(null),u=Pt(e,l,i.onTriggerChange),f=x.useRef(!1),h=x.useRef(!1),m=x.useCallback(()=>f.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),b.jsx(Gv,{asChild:!0,...o,children:b.jsx(lt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Oe(n.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Oe(n.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Oe(n.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Oe(n.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(n.onBlur,i.onClose),onClick:Oe(n.onClick,i.onClose)})})});h4.displayName=Nw;var p2="TooltipPortal",[TH,AH]=Kv(p2,{forceMount:void 0}),p4=n=>{const{__scopeTooltip:e,forceMount:t,children:r,container:i}=n,s=Np(p2,e);return b.jsx(TH,{scope:e,forceMount:t,children:b.jsx(or,{present:t||s.open,children:b.jsx(Wv,{asChild:!0,container:i,children:r})})})};p4.displayName=p2;var ju="TooltipContent",m4=x.forwardRef((n,e)=>{const t=AH(ju,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=Np(ju,n.__scopeTooltip);return b.jsx(or,{present:r||o.open,children:o.disableHoverableContent?b.jsx(g4,{side:i,...s,ref:e}):b.jsx(MH,{side:i,...s,ref:e})})}),MH=x.forwardRef((n,e)=>{const t=Np(ju,n.__scopeTooltip),r=h2(ju,n.__scopeTooltip),i=x.useRef(null),s=Pt(e,i),[o,l]=x.useState(null),{trigger:u,onClose:f}=t,h=i.current,{onPointerInTransitChange:m}=r,g=x.useCallback(()=>{l(null),m(!1)},[m]),y=x.useCallback((S,C)=>{const k=S.currentTarget,E={x:S.clientX,y:S.clientY},_=PH(E,k.getBoundingClientRect()),T=jH(E,_),N=LH(C.getBoundingClientRect()),A=IH([...T,...N]);l(A),m(!0)},[m]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(u&&h){const S=k=>y(k,h),C=k=>y(k,u);return u.addEventListener("pointerleave",S),h.addEventListener("pointerleave",C),()=>{u.removeEventListener("pointerleave",S),h.removeEventListener("pointerleave",C)}}},[u,h,y,g]),x.useEffect(()=>{if(o){const S=C=>{const k=C.target,E={x:C.clientX,y:C.clientY},_=(u==null?void 0:u.contains(k))||(h==null?void 0:h.contains(k)),T=!BH(E,o);_?g():T&&(g(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[u,h,o,f,g]),b.jsx(g4,{...n,ref:s})}),[OH,NH]=Kv(Yv,{isInside:!1}),g4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=n,u=Np(ju,t),f=Qv(t),{onClose:h}=u;return x.useEffect(()=>(document.addEventListener(Ow,h),()=>document.removeEventListener(Ow,h)),[h]),x.useEffect(()=>{if(u.trigger){const m=g=>{const y=g.target;y!=null&&y.contains(u.trigger)&&h()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,h]),b.jsx(Mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:m=>m.preventDefault(),onDismiss:h,children:b.jsxs(f2,{"data-state":u.stateAttribute,...f,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx($3,{children:r}),b.jsx(OH,{scope:t,isInside:!0,children:b.jsx(kH,{id:u.contentId,role:"tooltip",children:i||r})})]})})});m4.displayName=ju;var v4="TooltipArrow",DH=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Qv(t);return NH(v4,t).isInside?null:b.jsx(d2,{...i,...r,ref:e})});DH.displayName=v4;function PH(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function jH(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function LH(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function BH(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;sr!=h>r&&t<(f-l)*(r-u)/(h-u)+l&&(i=!i)}return i}function IH(n){const e=n.slice();return e.sort((t,r)=>t.xr.x?1:t.yr.y?1:0),zH(e)}function zH(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var $H=f4,HH=d4,VH=h4,UH=p4,y4=m4;function b4(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e{const e=ZH(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const l=o.split(g2);return l[0]===""&&l.length!==1&&l.shift(),x4(l,e)||qH(o)},getConflictingClassGroupIds:(o,l)=>{const u=t[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},x4=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?x4(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(g2);return(o=e.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},MA=/^\[(.+)\]$/,qH=n=>{if(MA.test(n)){const e=MA.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},ZH=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return WH(Object.entries(n.classGroups),t).forEach(([s,o])=>{Dw(o,r,s,e)}),r},Dw=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:OA(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(GH(i)){Dw(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{Dw(o,OA(e,s),t,r)})})},OA=(n,e)=>{let t=n;return e.split(g2).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},GH=n=>n.isThemeGetter,WH=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,l])=>[e+o,l])):s);return[t,i]}):n,KH=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},w4="!",QH=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=l=>{const u=[];let f=0,h=0,m;for(let k=0;kh?m-h:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:C}};return t?l=>t({className:l,parseClassName:o}):o},YH=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},XH=n=>({cache:KH(n.cacheSize),parseClassName:QH(n),...FH(n)}),JH=/\s+/,eV=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(JH);let l="";for(let u=o.length-1;u>=0;u-=1){const f=o[u],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=t(f);let S=!!y,C=r(S?g.substring(0,y):g);if(!C){if(!S){l=f+(l.length>0?" "+l:l);continue}if(C=r(g),!C){l=f+(l.length>0?" "+l:l);continue}S=!1}const k=YH(h).join(":"),E=m?k+w4:k,_=E+C;if(s.includes(_))continue;s.push(_);const T=i(C,S);for(let N=0;N0?" "+l:l)}return l};function tV(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rm(h),n());return t=XH(f),r=t.cache.get,i=t.cache.set,s=l,l(u)}function l(u){const f=r(u);if(f)return f;const h=eV(u,t);return i(u,h),h}return function(){return s(tV.apply(null,arguments))}}const Ot=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},C4=/^\[(?:([a-z-]+):)?(.+)\]$/i,rV=/^\d+\/\d+$/,iV=new Set(["px","full","screen"]),sV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,aV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ps=n=>ru(n)||iV.has(n)||rV.test(n),Eo=n=>df(n,"length",vV),ru=n=>!!n&&!Number.isNaN(Number(n)),sx=n=>df(n,"number",ru),wd=n=>!!n&&Number.isInteger(Number(n)),uV=n=>n.endsWith("%")&&ru(n.slice(0,-1)),Ye=n=>C4.test(n),Ro=n=>sV.test(n),fV=new Set(["length","size","percentage"]),dV=n=>df(n,fV,k4),hV=n=>df(n,"position",k4),pV=new Set(["image","url"]),mV=n=>df(n,pV,bV),gV=n=>df(n,"",yV),Sd=()=>!0,df=(n,e,t)=>{const r=C4.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},vV=n=>oV.test(n)&&!aV.test(n),k4=()=>!1,yV=n=>lV.test(n),bV=n=>cV.test(n),xV=()=>{const n=Ot("colors"),e=Ot("spacing"),t=Ot("blur"),r=Ot("brightness"),i=Ot("borderColor"),s=Ot("borderRadius"),o=Ot("borderSpacing"),l=Ot("borderWidth"),u=Ot("contrast"),f=Ot("grayscale"),h=Ot("hueRotate"),m=Ot("invert"),g=Ot("gap"),y=Ot("gradientColorStops"),S=Ot("gradientColorStopPositions"),C=Ot("inset"),k=Ot("margin"),E=Ot("opacity"),_=Ot("padding"),T=Ot("saturate"),N=Ot("scale"),A=Ot("sepia"),O=Ot("skew"),D=Ot("space"),B=Ot("translate"),P=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ye,e],$=()=>[Ye,e],de=()=>["",Ps,Eo],se=()=>["auto",ru,Ye],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Ye],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[ru,Ye];return{cacheSize:500,separator:":",theme:{colors:[Sd],spacing:[Ps,Eo],blur:["none","",Ro,Ye],brightness:te(),borderColor:[n],borderRadius:["none","","full",Ro,Ye],borderSpacing:$(),borderWidth:de(),contrast:te(),grayscale:re(),hueRotate:te(),invert:re(),gap:$(),gradientColorStops:[n],gradientColorStopPositions:[uV,Eo],inset:U(),margin:U(),opacity:te(),padding:$(),saturate:te(),scale:te(),sepia:re(),skew:te(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[Ro]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Ye]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wd,Ye]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",wd,Ye]}],"grid-cols":[{"grid-cols":[Sd]}],"col-start-end":[{col:["auto",{span:["full",wd,Ye]},Ye]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Sd]}],"row-start-end":[{row:["auto",{span:[wd,Ye]},Ye]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,e]}],"min-w":[{"min-w":[Ye,e,"min","max","fit"]}],"max-w":[{"max-w":[Ye,e,"none","full","min","max","fit","prose",{screen:[Ro]},Ro]}],h:[{h:[Ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ro,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sx]}],"font-family":[{font:[Sd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",ru,sx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ps,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ps,Eo]}],"underline-offset":[{"underline-offset":["auto",Ps,Ye]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),hV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},mV]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[Ps,Ye]}],"outline-w":[{outline:[Ps,Eo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ps,Eo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Ro,gV]}],"shadow-color":[{shadow:[Sd]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ro,Ye]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[T]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[wd,Ye]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Ps,Eo,sx]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},E4=nV(xV);function nt(...n){return E4(m2(n))}const wV=$H,Dp=HH,Pp=VH,hf=x.forwardRef(({className:n,sideOffset:e=4,...t},r)=>b.jsx(UH,{children:b.jsx(y4,{ref:r,sideOffset:e,className:nt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",n),...t})}));hf.displayName=y4.displayName;var pf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cl=typeof window>"u"||"Deno"in globalThis;function Zr(){}function SV(n,e){return typeof n=="function"?n(e):n}function Pw(n){return typeof n=="number"&&n>=0&&n!==1/0}function R4(n,e){return Math.max(n+(e||0)-Date.now(),0)}function iu(n,e){return typeof n=="function"?n(e):n}function yi(n,e){return typeof n=="function"?n(e):n}function NA(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=n;if(o){if(r){if(e.queryHash!==v2(o,e.options))return!1}else if(!gh(e.queryKey,o))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function DA(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(kl(e.options.mutationKey)!==kl(s))return!1}else if(!gh(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function v2(n,e){return((e==null?void 0:e.queryKeyHashFn)||kl)(n)}function kl(n){return JSON.stringify(n,(e,t)=>jw(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function gh(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!gh(n[t],e[t])):!1}function _4(n,e){if(n===e)return n;const t=PA(n)&&PA(e);if(t||jw(n)&&jw(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,l=t?[]:{};let u=0;for(let f=0;f{setTimeout(e,n)})}function Lw(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?_4(n,e):e}function kV(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function EV(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var y2=Symbol();function T4(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===y2?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var rl,Lo,xu,w3,RV=(w3=class extends pf{constructor(){super();Te(this,rl);Te(this,Lo);Te(this,xu);be(this,xu,e=>{if(!Cl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){j(this,Lo)||this.setEventListener(j(this,xu))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Lo))==null||e.call(this),be(this,Lo,void 0))}setEventListener(e){var t;be(this,xu,e),(t=j(this,Lo))==null||t.call(this),be(this,Lo,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,rl)!==e&&(be(this,rl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof j(this,rl)=="boolean"?j(this,rl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},rl=new WeakMap,Lo=new WeakMap,xu=new WeakMap,w3),b2=new RV,wu,Bo,Su,S3,_V=(S3=class extends pf{constructor(){super();Te(this,wu,!0);Te(this,Bo);Te(this,Su);be(this,Su,e=>{if(!Cl&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,Bo)||this.setEventListener(j(this,Su))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Bo))==null||e.call(this),be(this,Bo,void 0))}setEventListener(e){var t;be(this,Su,e),(t=j(this,Bo))==null||t.call(this),be(this,Bo,e(this.setOnline.bind(this)))}setOnline(e){j(this,wu)!==e&&(be(this,wu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return j(this,wu)}},wu=new WeakMap,Bo=new WeakMap,Su=new WeakMap,S3),O0=new _V;function Bw(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function TV(n){return Math.min(1e3*2**n,3e4)}function A4(n){return(n??"online")==="online"?O0.isOnline():!0}var M4=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ox(n){return n instanceof M4}function O4(n){let e=!1,t=0,r=!1,i;const s=Bw(),o=C=>{var k;r||(g(new M4(C)),(k=n.abort)==null||k.call(n))},l=()=>{e=!0},u=()=>{e=!1},f=()=>b2.isFocused()&&(n.networkMode==="always"||O0.isOnline())&&n.canRun(),h=()=>A4(n.networkMode)&&n.canRun(),m=C=>{var k;r||(r=!0,(k=n.onSuccess)==null||k.call(n,C),i==null||i(),s.resolve(C))},g=C=>{var k;r||(r=!0,(k=n.onError)==null||k.call(n,C),i==null||i(),s.reject(C))},y=()=>new Promise(C=>{var k;i=E=>{(r||f())&&C(E)},(k=n.onPause)==null||k.call(n)}).then(()=>{var C;i=void 0,r||(C=n.onContinue)==null||C.call(n)}),S=()=>{if(r)return;let C;const k=t===0?n.initialPromise:void 0;try{C=k??n.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(m).catch(E=>{var O;if(r)return;const _=n.retry??(Cl?0:3),T=n.retryDelay??TV,N=typeof T=="function"?T(t,E):T,A=_===!0||typeof _=="number"&&t<_||typeof _=="function"&&_(t,E);if(e||!A){g(E);return}t++,(O=n.onFail)==null||O.call(n,t,E),CV(N).then(()=>f()?void 0:y()).then(()=>{e?g(E):S()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?S():y().then(S),s)}}function AV(){let n=[],e=0,t=l=>{l()},r=l=>{l()},i=l=>setTimeout(l,0);const s=l=>{e?n.push(l):i(()=>{t(l)})},o=()=>{const l=n;n=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{t(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{t=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var nn=AV(),il,C3,N4=(C3=class{constructor(){Te(this,il)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pw(this.gcTime)&&be(this,il,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Cl?1/0:5*60*1e3))}clearGcTimeout(){j(this,il)&&(clearTimeout(j(this,il)),be(this,il,void 0))}},il=new WeakMap,C3),Cu,ku,qr,kn,Cp,sl,mi,js,k3,MV=(k3=class extends N4{constructor(e){super();Te(this,mi);Te(this,Cu);Te(this,ku);Te(this,qr);Te(this,kn);Te(this,Cp);Te(this,sl);be(this,sl,!1),be(this,Cp,e.defaultOptions),this.setOptions(e.options),this.observers=[],be(this,qr,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,be(this,Cu,OV(this.options)),this.state=e.state??j(this,Cu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,kn))==null?void 0:e.promise}setOptions(e){this.options={...j(this,Cp),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,qr).remove(this)}setData(e,t){const r=Lw(this.state.data,e,this.options);return Ve(this,mi,js).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){Ve(this,mi,js).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=j(this,kn))==null?void 0:r.promise;return(i=j(this,kn))==null||i.cancel(e),t?t.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Cu))}isActive(){return this.observers.some(e=>yi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!R4(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,qr).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(j(this,kn)&&(j(this,sl)?j(this,kn).cancel({revert:!0}):j(this,kn).cancelRetry()),this.scheduleGc()),j(this,qr).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,mi,js).call(this,{type:"invalidate"})}fetch(e,t){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(j(this,kn))return j(this,kn).continueRetry(),j(this,kn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(be(this,sl,!0),r.signal)})},s=()=>{const m=T4(this.options,t),g={queryKey:this.queryKey,meta:this.meta};return i(g),be(this,sl,!1),this.options.persister?this.options.persister(m,g,this):m(g)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(u=this.options.behavior)==null||u.onFetch(o,this),be(this,ku,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ve(this,mi,js).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta});const l=m=>{var g,y,S,C;ox(m)&&m.silent||Ve(this,mi,js).call(this,{type:"error",error:m}),ox(m)||((y=(g=j(this,qr).config).onError)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,this.state.data,m,this)),this.scheduleGc()};return be(this,kn,O4({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,y,S,C;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(k){l(k);return}(y=(g=j(this,qr).config).onSuccess)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{Ve(this,mi,js).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{Ve(this,mi,js).call(this,{type:"pause"})},onContinue:()=>{Ve(this,mi,js).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,kn).start()}},Cu=new WeakMap,ku=new WeakMap,qr=new WeakMap,kn=new WeakMap,Cp=new WeakMap,sl=new WeakMap,mi=new WeakSet,js=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...D4(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return ox(i)&&i.revert&&j(this,ku)?{...j(this,ku),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,qr).notify({query:this,type:"updated",action:e})})},k3);function D4(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A4(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function OV(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Gi,E3,NV=(E3=class extends pf{constructor(e={}){super();Te(this,Gi);this.config=e,be(this,Gi,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??v2(i,t);let o=this.get(s);return o||(o=new MV({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){j(this,Gi).has(e.queryHash)||(j(this,Gi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=j(this,Gi).get(e.queryHash);t&&(e.destroy(),t===e&&j(this,Gi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,Gi).get(e)}getAll(){return[...j(this,Gi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>NA(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>NA(e,r)):t}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gi=new WeakMap,E3),Wi,jn,ol,Ki,_o,R3,DV=(R3=class extends N4{constructor(e){super();Te(this,Ki);Te(this,Wi);Te(this,jn);Te(this,ol);this.mutationId=e.mutationId,be(this,jn,e.mutationCache),be(this,Wi,[]),this.state=e.state||P4(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,Wi).includes(e)||(j(this,Wi).push(e),this.clearGcTimeout(),j(this,jn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){be(this,Wi,j(this,Wi).filter(t=>t!==e)),this.scheduleGc(),j(this,jn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():j(this,jn).remove(this))}continue(){var e;return((e=j(this,ol))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,l,u,f,h,m,g,y,S,C,k,E,_,T,N,A,O,D;be(this,ol,O4({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(B,P)=>{Ve(this,Ki,_o).call(this,{type:"failed",failureCount:B,error:P})},onPause:()=>{Ve(this,Ki,_o).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Ki,_o).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,jn).canRun(this)}));const t=this.state.status==="pending",r=!j(this,ol).canStart();try{if(!t){Ve(this,Ki,_o).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=j(this,jn).config).onMutate)==null?void 0:s.call(i,e,this));const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e));P!==this.state.context&&Ve(this,Ki,_o).call(this,{type:"pending",context:P,variables:e,isPaused:r})}const B=await j(this,ol).start();return await((f=(u=j(this,jn).config).onSuccess)==null?void 0:f.call(u,B,e,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,B,e,this.state.context)),await((y=(g=j(this,jn).config).onSettled)==null?void 0:y.call(g,B,null,this.state.variables,this.state.context,this)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,B,null,e,this.state.context)),Ve(this,Ki,_o).call(this,{type:"success",data:B}),B}catch(B){try{throw await((E=(k=j(this,jn).config).onError)==null?void 0:E.call(k,B,e,this.state.context,this)),await((T=(_=this.options).onError)==null?void 0:T.call(_,B,e,this.state.context)),await((A=(N=j(this,jn).config).onSettled)==null?void 0:A.call(N,void 0,B,this.state.variables,this.state.context,this)),await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,e,this.state.context)),B}finally{Ve(this,Ki,_o).call(this,{type:"error",error:B})}}finally{j(this,jn).runNext(this)}}},Wi=new WeakMap,jn=new WeakMap,ol=new WeakMap,Ki=new WeakSet,_o=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),nn.batch(()=>{j(this,Wi).forEach(r=>{r.onMutationUpdate(e)}),j(this,jn).notify({mutation:this,type:"updated",action:e})})},R3);function P4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,kp,_3,PV=(_3=class extends pf{constructor(e={}){super();Te(this,xr);Te(this,kp);this.config=e,be(this,xr,new Map),be(this,kp,Date.now())}build(e,t,r){const i=new DV({mutationCache:this,mutationId:++bd(this,kp)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){const t=hg(e),r=j(this,xr).get(t)??[];r.push(e),j(this,xr).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var r;const t=hg(e);if(j(this,xr).has(t)){const i=(r=j(this,xr).get(t))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?j(this,xr).delete(t):j(this,xr).set(t,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!t||t===e}runNext(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...j(this,xr).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(r=>DA(t,r))}findAll(e={}){return this.getAll().filter(t=>DA(e,t))}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return nn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zr))))}},xr=new WeakMap,kp=new WeakMap,_3);function hg(n){var e;return((e=n.options.scope)==null?void 0:e.id)??String(n.mutationId)}function LA(n){return{onFetch:(e,t)=>{var h,m,g,y,S;const r=e.options,i=(g=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,s=((y=e.state.data)==null?void 0:y.pages)||[],o=((S=e.state.data)==null?void 0:S.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let C=!1;const k=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(e.signal.aborted?C=!0:e.signal.addEventListener("abort",()=>{C=!0}),e.signal)})},E=T4(e.options,e.fetchOptions),_=async(T,N,A)=>{if(C)return Promise.reject();if(N==null&&T.pages.length)return Promise.resolve(T);const O={queryKey:e.queryKey,pageParam:N,direction:A?"backward":"forward",meta:e.options.meta};k(O);const D=await E(O),{maxPages:B}=e.options,P=A?EV:kV;return{pages:P(T.pages,D,B),pageParams:P(T.pageParams,N,B)}};if(i&&s.length){const T=i==="backward",N=T?jV:BA,A={pages:s,pageParams:o},O=N(r,A);l=await _(A,O,T)}else{const T=n??s.length;do{const N=u===0?o[0]??r.initialPageParam:BA(r,l);if(u>0&&N==null)break;l=await _(l,N),u++}while(u{var C,k;return(k=(C=e.options).persister)==null?void 0:k.call(C,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=f}}}function BA(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function jV(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Vt,Io,zo,Eu,Ru,$o,_u,Tu,T3,LV=(T3=class{constructor(n={}){Te(this,Vt);Te(this,Io);Te(this,zo);Te(this,Eu);Te(this,Ru);Te(this,$o);Te(this,_u);Te(this,Tu);be(this,Vt,n.queryCache||new NV),be(this,Io,n.mutationCache||new PV),be(this,zo,n.defaultOptions||{}),be(this,Eu,new Map),be(this,Ru,new Map),be(this,$o,0)}mount(){bd(this,$o)._++,j(this,$o)===1&&(be(this,_u,b2.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onFocus())})),be(this,Tu,O0.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onOnline())})))}unmount(){var n,e;bd(this,$o)._--,j(this,$o)===0&&((n=j(this,_u))==null||n.call(this),be(this,_u,void 0),(e=j(this,Tu))==null||e.call(this),be(this,Tu,void 0))}isFetching(n){return j(this,Vt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,Io).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.getQueryData(n.queryKey);if(e===void 0)return this.fetchQuery(n);{const t=this.defaultQueryOptions(n),r=j(this,Vt).build(this,t);return n.revalidateIfStale&&r.isStaleByTime(iu(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(n){return j(this,Vt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=j(this,Vt).get(r.queryHash),s=i==null?void 0:i.state.data,o=SV(e,s);if(o!==void 0)return j(this,Vt).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return nn.batch(()=>j(this,Vt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=j(this,Vt);nn.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=j(this,Vt),r={type:"active",...n};return nn.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(n={},e={}){const t={revert:!0,...e},r=nn.batch(()=>j(this,Vt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Zr).catch(Zr)}invalidateQueries(n={},e={}){return nn.batch(()=>{if(j(this,Vt).findAll(n).forEach(r=>{r.invalidate()}),n.refetchType==="none")return Promise.resolve();const t={...n,type:n.refetchType??n.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(n={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=nn.batch(()=>j(this,Vt).findAll(n).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Zr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zr)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=j(this,Vt).build(this,e);return t.isStaleByTime(iu(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Zr).catch(Zr)}fetchInfiniteQuery(n){return n.behavior=LA(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Zr).catch(Zr)}ensureInfiniteQueryData(n){return n.behavior=LA(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return O0.isOnline()?j(this,Io).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Vt)}getMutationCache(){return j(this,Io)}getDefaultOptions(){return j(this,zo)}setDefaultOptions(n){be(this,zo,n)}setQueryDefaults(n,e){j(this,Eu).set(kl(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...j(this,Eu).values()];let t={};return e.forEach(r=>{gh(n,r.queryKey)&&(t={...t,...r.defaultOptions})}),t}setMutationDefaults(n,e){j(this,Ru).set(kl(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...j(this,Ru).values()];let t={};return e.forEach(r=>{gh(n,r.mutationKey)&&(t={...t,...r.defaultOptions})}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...j(this,zo).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=v2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===y2&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,zo).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,Vt).clear(),j(this,Io).clear()}},Vt=new WeakMap,Io=new WeakMap,zo=new WeakMap,Eu=new WeakMap,Ru=new WeakMap,$o=new WeakMap,_u=new WeakMap,Tu=new WeakMap,T3),Qn,ut,Ep,Ln,al,Au,Ho,Qi,Rp,Mu,Ou,ll,cl,Vo,Nu,bt,Pd,Iw,zw,$w,Hw,Vw,Uw,Fw,j4,A3,BV=(A3=class extends pf{constructor(e,t){super();Te(this,bt);Te(this,Qn);Te(this,ut);Te(this,Ep);Te(this,Ln);Te(this,al);Te(this,Au);Te(this,Ho);Te(this,Qi);Te(this,Rp);Te(this,Mu);Te(this,Ou);Te(this,ll);Te(this,cl);Te(this,Vo);Te(this,Nu,new Set);this.options=t,be(this,Qn,e),be(this,Qi,null),be(this,Ho,Bw()),this.options.experimental_prefetchInRender||j(this,Ho).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ut).addObserver(this),IA(j(this,ut),this.options)?Ve(this,bt,Pd).call(this):this.updateResult(),Ve(this,bt,Hw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qw(j(this,ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qw(j(this,ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ve(this,bt,Vw).call(this),Ve(this,bt,Uw).call(this),j(this,ut).removeObserver(this)}setOptions(e,t){const r=this.options,i=j(this,ut);if(this.options=j(this,Qn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,j(this,ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ve(this,bt,Fw).call(this),j(this,ut).setOptions(this.options),r._defaulted&&!M0(this.options,r)&&j(this,Qn).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ut),observer:this});const s=this.hasListeners();s&&zA(j(this,ut),i,this.options,r)&&Ve(this,bt,Pd).call(this),this.updateResult(t),s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||iu(this.options.staleTime,j(this,ut))!==iu(r.staleTime,j(this,ut)))&&Ve(this,bt,Iw).call(this);const o=Ve(this,bt,zw).call(this);s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||o!==j(this,Vo))&&Ve(this,bt,$w).call(this,o)}getOptimisticResult(e){const t=j(this,Qn).getQueryCache().build(j(this,Qn),e),r=this.createResult(t,e);return zV(this,r)&&(be(this,Ln,r),be(this,Au,this.options),be(this,al,j(this,ut).state)),r}getCurrentResult(){return j(this,Ln)}trackResult(e,t){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t==null||t(i),e[i])})}),r}trackProp(e){j(this,Nu).add(e)}getCurrentQuery(){return j(this,ut)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=j(this,Qn).defaultQueryOptions(e),r=j(this,Qn).getQueryCache().build(j(this,Qn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return Ve(this,bt,Pd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Ln)))}createResult(e,t){var B;const r=j(this,ut),i=this.options,s=j(this,Ln),o=j(this,al),l=j(this,Au),f=e!==r?e.state:j(this,Ep),{state:h}=e;let m={...h},g=!1,y;if(t._optimisticResults){const P=this.hasListeners(),Z=!P&&IA(e,t),U=P&&zA(e,r,t,i);(Z||U)&&(m={...m,...D4(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:C,status:k}=m;if(t.select&&m.data!==void 0)if(s&&m.data===(o==null?void 0:o.data)&&t.select===j(this,Rp))y=j(this,Mu);else try{be(this,Rp,t.select),y=t.select(m.data),y=Lw(s==null?void 0:s.data,y,t),be(this,Mu,y),be(this,Qi,null)}catch(P){be(this,Qi,P)}else y=m.data;if(t.placeholderData!==void 0&&y===void 0&&k==="pending"){let P;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(l==null?void 0:l.placeholderData))P=s.data;else if(P=typeof t.placeholderData=="function"?t.placeholderData((B=j(this,Ou))==null?void 0:B.state.data,j(this,Ou)):t.placeholderData,t.select&&P!==void 0)try{P=t.select(P),be(this,Qi,null)}catch(Z){be(this,Qi,Z)}P!==void 0&&(k="success",y=Lw(s==null?void 0:s.data,P,t),g=!0)}j(this,Qi)&&(S=j(this,Qi),y=j(this,Mu),C=Date.now(),k="error");const E=m.fetchStatus==="fetching",_=k==="pending",T=k==="error",N=_&&E,A=y!==void 0,D={status:k,fetchStatus:m.fetchStatus,isPending:_,isSuccess:k==="success",isError:T,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:C,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:T&&!A,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&A,isStale:x2(e,t),refetch:this.refetch,promise:j(this,Ho)};if(this.options.experimental_prefetchInRender){const P=$=>{D.status==="error"?$.reject(D.error):D.data!==void 0&&$.resolve(D.data)},Z=()=>{const $=be(this,Ho,D.promise=Bw());P($)},U=j(this,Ho);switch(U.status){case"pending":e.queryHash===r.queryHash&&P(U);break;case"fulfilled":(D.status==="error"||D.data!==U.value)&&Z();break;case"rejected":(D.status!=="error"||D.error!==U.reason)&&Z();break}}return D}updateResult(e){const t=j(this,Ln),r=this.createResult(j(this,ut),this.options);if(be(this,al,j(this,ut).state),be(this,Au,this.options),j(this,al).data!==void 0&&be(this,Ou,j(this,ut)),M0(r,t))return;be(this,Ln,r);const i={},s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!j(this,Nu).size)return!0;const u=new Set(l??j(this,Nu));return this.options.throwOnError&&u.add("error"),Object.keys(j(this,Ln)).some(f=>{const h=f;return j(this,Ln)[h]!==t[h]&&u.has(h)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Ve(this,bt,j4).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ve(this,bt,Hw).call(this)}},Qn=new WeakMap,ut=new WeakMap,Ep=new WeakMap,Ln=new WeakMap,al=new WeakMap,Au=new WeakMap,Ho=new WeakMap,Qi=new WeakMap,Rp=new WeakMap,Mu=new WeakMap,Ou=new WeakMap,ll=new WeakMap,cl=new WeakMap,Vo=new WeakMap,Nu=new WeakMap,bt=new WeakSet,Pd=function(e){Ve(this,bt,Fw).call(this);let t=j(this,ut).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Zr)),t},Iw=function(){Ve(this,bt,Vw).call(this);const e=iu(this.options.staleTime,j(this,ut));if(Cl||j(this,Ln).isStale||!Pw(e))return;const r=R4(j(this,Ln).dataUpdatedAt,e)+1;be(this,ll,setTimeout(()=>{j(this,Ln).isStale||this.updateResult()},r))},zw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ut)):this.options.refetchInterval)??!1},$w=function(e){Ve(this,bt,Uw).call(this),be(this,Vo,e),!(Cl||yi(this.options.enabled,j(this,ut))===!1||!Pw(j(this,Vo))||j(this,Vo)===0)&&be(this,cl,setInterval(()=>{(this.options.refetchIntervalInBackground||b2.isFocused())&&Ve(this,bt,Pd).call(this)},j(this,Vo)))},Hw=function(){Ve(this,bt,Iw).call(this),Ve(this,bt,$w).call(this,Ve(this,bt,zw).call(this))},Vw=function(){j(this,ll)&&(clearTimeout(j(this,ll)),be(this,ll,void 0))},Uw=function(){j(this,cl)&&(clearInterval(j(this,cl)),be(this,cl,void 0))},Fw=function(){const e=j(this,Qn).getQueryCache().build(j(this,Qn),this.options);if(e===j(this,ut))return;const t=j(this,ut);be(this,ut,e),be(this,Ep,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},j4=function(e){nn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(j(this,Ln))}),j(this,Qn).getQueryCache().notify({query:j(this,ut),type:"observerResultsUpdated"})})},A3);function IV(n,e){return yi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function IA(n,e){return IV(n,e)||n.state.data!==void 0&&qw(n,e,e.refetchOnMount)}function qw(n,e,t){if(yi(e.enabled,n)!==!1){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&x2(n,e)}return!1}function zA(n,e,t,r){return(n!==e||yi(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&x2(n,t)}function x2(n,e){return yi(e.enabled,n)!==!1&&n.isStaleByTime(iu(e.staleTime,n))}function zV(n,e){return!M0(n.getCurrentResult(),e)}var Uo,Fo,Yn,$s,Zs,i0,Zw,M3,$V=(M3=class extends pf{constructor(t,r){super();Te(this,Zs);Te(this,Uo);Te(this,Fo);Te(this,Yn);Te(this,$s);be(this,Uo,t),this.setOptions(r),this.bindMethods(),Ve(this,Zs,i0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=j(this,Uo).defaultMutationOptions(t),M0(this.options,r)||j(this,Uo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,Yn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kl(r.mutationKey)!==kl(this.options.mutationKey)?this.reset():((i=j(this,Yn))==null?void 0:i.state.status)==="pending"&&j(this,Yn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=j(this,Yn))==null||t.removeObserver(this)}onMutationUpdate(t){Ve(this,Zs,i0).call(this),Ve(this,Zs,Zw).call(this,t)}getCurrentResult(){return j(this,Fo)}reset(){var t;(t=j(this,Yn))==null||t.removeObserver(this),be(this,Yn,void 0),Ve(this,Zs,i0).call(this),Ve(this,Zs,Zw).call(this)}mutate(t,r){var i;return be(this,$s,r),(i=j(this,Yn))==null||i.removeObserver(this),be(this,Yn,j(this,Uo).getMutationCache().build(j(this,Uo),this.options)),j(this,Yn).addObserver(this),j(this,Yn).execute(t)}},Uo=new WeakMap,Fo=new WeakMap,Yn=new WeakMap,$s=new WeakMap,Zs=new WeakSet,i0=function(){var r;const t=((r=j(this,Yn))==null?void 0:r.state)??P4();be(this,Fo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Zw=function(t){nn.batch(()=>{var r,i,s,o,l,u,f,h;if(j(this,$s)&&this.hasListeners()){const m=j(this,Fo).variables,g=j(this,Fo).context;(t==null?void 0:t.type)==="success"?((i=(r=j(this,$s)).onSuccess)==null||i.call(r,t.data,m,g),(o=(s=j(this,$s)).onSettled)==null||o.call(s,t.data,null,m,g)):(t==null?void 0:t.type)==="error"&&((u=(l=j(this,$s)).onError)==null||u.call(l,t.error,m,g),(h=(f=j(this,$s)).onSettled)==null||h.call(f,void 0,t.error,m,g))}this.listeners.forEach(m=>{m(j(this,Fo))})})},M3),L4=x.createContext(void 0),w2=n=>{const e=x.useContext(L4);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},HV=({client:n,children:e})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),b.jsx(L4.Provider,{value:n,children:e})),B4=x.createContext(!1),VV=()=>x.useContext(B4);B4.Provider;function UV(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var FV=x.createContext(UV()),qV=()=>x.useContext(FV);function I4(n,e){return typeof n=="function"?n(...e):!!n}function Gw(){}var ZV=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},GV=n=>{x.useEffect(()=>{n.clearReset()},[n])},WV=({result:n,errorResetBoundary:e,throwOnError:t,query:r})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&I4(t,[n.error,r]),KV=n=>{n.suspense&&(n.staleTime===void 0&&(n.staleTime=1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},QV=(n,e)=>n.isLoading&&n.isFetching&&!e,YV=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,$A=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function XV(n,e,t){var h,m,g,y,S;const r=w2(),i=VV(),s=qV(),o=r.defaultQueryOptions(n);(m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,o),o._optimisticResults=i?"isRestoring":"optimistic",KV(o),ZV(o,s),GV(s);const l=!r.getQueryCache().get(o.queryHash),[u]=x.useState(()=>new e(r,o)),f=u.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(C=>{const k=i?Gw:u.subscribe(nn.batchCalls(C));return u.updateResult(),k},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),YV(o,f))throw $A(o,u,s);if(WV({result:f,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw f.error;if((y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||y.call(g,o,f),o.experimental_prefetchInRender&&!Cl&&QV(f,i)){const C=l?$A(o,u,s):(S=r.getQueryCache().get(o.queryHash))==null?void 0:S.promise;C==null||C.catch(Gw).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?f:u.trackResult(f)}function JV(n,e){return XV(n,BV)}function eU(n,e){const t=w2(),[r]=x.useState(()=>new $V(t,n));x.useEffect(()=>{r.setOptions(n)},[r,n]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(nn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=x.useCallback((o,l)=>{r.mutate(o,l).catch(Gw)},[r]);if(i.error&&I4(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const pl="__TSR_index",HA="popstate",VA="beforeunload";function z4(n){let e=n.getLocation();const t=new Set,r=o=>{e=n.getLocation(),t.forEach(l=>l({location:e,action:o}))},i=o=>{n.notifyOnIndexChange??!0?r(o):e=n.getLocation()},s=async({task:o,navigateOpts:l,...u})=>{var f,h;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const g=((f=n.getBlockers)==null?void 0:f.call(n))??[],y=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const S of g){const C=vh(u.path,u.state);if(await S.blockerFn({currentLocation:e,nextLocation:C,action:u.type})){(h=n.onBlocked)==null||h.call(n);return}}o()};return{get location(){return e},get length(){return n.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,l,u)=>{const f=e.state[pl];l=Ww(f+1,l),s({task:()=>{n.pushState(o,l),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:l})},replace:(o,l,u)=>{const f=e.state[pl];l=Ww(f,l),s({task:()=>{n.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:l})},go:(o,l)=>{s({task:()=>{n.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{s({task:()=>{n.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{n.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[pl]!==0,createHref:o=>n.createHref(o),block:o=>{var l;if(!n.setBlockers)return()=>{};const u=((l=n.getBlockers)==null?void 0:l.call(n))??[];return n.setBlockers([...u,o]),()=>{var f,h;const m=((f=n.getBlockers)==null?void 0:f.call(n))??[];(h=n.setBlockers)==null||h.call(n,m.filter(g=>g!==o))}},flush:()=>{var o;return(o=n.flush)==null?void 0:o.call(n)},destroy:()=>{var o;return(o=n.destroy)==null?void 0:o.call(n)},notify:r}}function Ww(n,e){return e||(e={}),{...e,key:rU(),[pl]:n}}function tU(n){const e=typeof document<"u"?window:void 0,t=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,o=B=>i=B,l=B=>B,u=()=>vh(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state);let f=u(),h,m=!1,g=!1,y=!1,S=!1;const C=()=>f;let k,E;const _=()=>{k&&(D._ignoreSubscribers=!0,(k.isPush?e.history.pushState:e.history.replaceState)(k.state,"",k.href),D._ignoreSubscribers=!1,k=void 0,E=void 0,h=void 0)},T=(B,P,Z)=>{const U=l(P);E||(h=f),f=vh(P,Z),k={href:U,state:Z,isPush:(k==null?void 0:k.isPush)||B==="push"},E||(E=Promise.resolve().then(()=>_()))},N=B=>{f=u(),D.notify({type:B})},A=async()=>{if(g){g=!1;return}const B=u(),P=B.state[pl]-f.state[pl],Z=P===1,U=P===-1,$=!Z&&!U||m;m=!1;const de=$?"GO":U?"BACK":"FORWARD",se=$?{type:"GO",index:P}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const ce=s();if(typeof document<"u"&&ce.length){for(const G of ce)if(await G.blockerFn({currentLocation:f,nextLocation:B,action:de})){g=!0,e.history.go(1),D.notify(se);return}}}f=u(),D.notify(se)},O=B=>{if(S){S=!1;return}let P=!1;const Z=s();if(typeof document<"u"&&Z.length)for(const U of Z){const $=U.enableBeforeUnload??!0;if($===!0){P=!0;break}if(typeof $=="function"&&$()===!0){P=!0;break}}if(P)return B.preventDefault(),B.returnValue=""},D=z4({getLocation:C,getLength:()=>e.history.length,pushState:(B,P)=>T("push",B,P),replaceState:(B,P)=>T("replace",B,P),back:B=>(B&&(y=!0),S=!0,e.history.back()),forward:B=>{B&&(y=!0),S=!0,e.history.forward()},go:B=>{m=!0,e.history.go(B)},createHref:B=>l(B),flush:_,destroy:()=>{e.history.pushState=t,e.history.replaceState=r,e.removeEventListener(VA,O,{capture:!0}),e.removeEventListener(HA,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(VA,O,{capture:!0}),e.addEventListener(HA,A),e.history.pushState=function(...B){const P=t.apply(e.history,B);return D._ignoreSubscribers||N("PUSH"),P},e.history.replaceState=function(...B){const P=r.apply(e.history,B);return D._ignoreSubscribers||N("REPLACE"),P},D}function nU(n={initialEntries:["/"]}){const e=n.initialEntries;let t=n.initialIndex?Math.min(Math.max(n.initialIndex,0),e.length-1):e.length-1;const r=e.map((s,o)=>Ww(o,void 0));return z4({getLocation:()=>vh(e[t],r[t]),getLength:()=>e.length,pushState:(s,o)=>{t{r[t]=o,e[t]=s},back:()=>{t=Math.max(t-1,0)},forward:()=>{t=Math.min(t+1,e.length-1)},go:s=>{t=Math.min(Math.max(t+s,0),e.length-1)},createHref:s=>s})}function vh(n,e){const t=n.indexOf("#"),r=n.indexOf("?");return{href:n,pathname:n.substring(0,t>0?r>0?Math.min(t,r):t:r>0?r:n.length),hash:t>-1?n.substring(t):"",search:r>-1?n.slice(r,t===-1?void 0:t):"",state:e||{[pl]:0}}}function rU(){return(Math.random()+1).toString(36).substring(7)}var iU="Invariant failed";function Er(n,e){if(!n)throw new Error(iU)}const ax=x.createContext(null);function $4(){return typeof document>"u"?ax:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ax,ax)}function Vl(n){const e=x.useContext($4());return n==null||n.warn,e}var lx={exports:{}},cx={},ux={exports:{}},fx={};/** + */var bA;function e$(){if(bA)return Cn;bA=1;var n=Tp();function e(u){var f="https://react.dev/errors/"+u;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),nx.exports=e$(),nx.exports}var Ap=$3();const H3=z3(Ap);var ia=x.forwardRef((n,e)=>{const{children:t,...r}=n,i=x.Children.toArray(t),s=i.find(t$);if(s){const o=s.props.children,l=i.map(u=>u===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:u);return b.jsx(Rw,{...r,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,l):null})}return b.jsx(Rw,{...r,ref:e,children:t})});ia.displayName="Slot";var Rw=x.forwardRef((n,e)=>{const{children:t,...r}=n;if(x.isValidElement(t)){const i=r$(t);return x.cloneElement(t,{...n$(r,t.props),ref:e?JC(e,i):i})}return x.Children.count(t)>1?x.Children.only(null):null});Rw.displayName="SlotClone";var V3=({children:n})=>b.jsx(b.Fragment,{children:n});function t$(n){return x.isValidElement(n)&&n.type===V3}function n$(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...l)=>{s(...l),i(...l)}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function r$(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var i$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],lt=i$.reduce((n,e)=>{const t=x.forwardRef((r,i)=>{const{asChild:s,...o}=r,l=s?ia:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...o,ref:i})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function U3(n,e){n&&Ap.flushSync(()=>n.dispatchEvent(e))}function un(n){const e=x.useRef(n);return x.useEffect(()=>{e.current=n}),x.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function s$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var o$="DismissableLayer",_w="dismissableLayer.update",a$="dismissableLayer.pointerDownOutside",l$="dismissableLayer.focusOutside",wA,F3=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mp=x.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...u}=n,f=x.useContext(F3),[h,m]=x.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=x.useState({}),S=Pt(e,D=>m(D)),C=Array.from(f.layers),[k]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(k),_=h?C.indexOf(h):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,N=_>=E,A=f$(D=>{const B=D.target,P=[...f.branches].some(Z=>Z.contains(B));!N||P||(i==null||i(D),o==null||o(D),D.defaultPrevented||l==null||l())},g),O=d$(D=>{const B=D.target;[...f.branches].some(Z=>Z.contains(B))||(s==null||s(D),o==null||o(D),D.defaultPrevented||l==null||l())},g);return s$(D=>{_===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&l&&(D.preventDefault(),l()))},g),x.useEffect(()=>{if(h)return t&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(wA=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),SA(),()=>{t&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=wA)}},[h,g,t,f]),x.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),SA())},[h,f]),x.useEffect(()=>{const D=()=>y({});return document.addEventListener(_w,D),()=>document.removeEventListener(_w,D)},[]),b.jsx(lt.div,{...u,ref:S,style:{pointerEvents:T?N?"auto":"none":void 0,...n.style},onFocusCapture:Oe(n.onFocusCapture,O.onFocusCapture),onBlurCapture:Oe(n.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Oe(n.onPointerDownCapture,A.onPointerDownCapture)})});Mp.displayName=o$;var c$="DismissableLayerBranch",u$=x.forwardRef((n,e)=>{const t=x.useContext(F3),r=x.useRef(null),i=Pt(e,r);return x.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),b.jsx(lt.div,{...n,ref:i})});u$.displayName=c$;function f$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let u=function(){q3(a$,t,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=u,e.addEventListener("click",i.current,{once:!0})):u()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function d$(n,e=globalThis==null?void 0:globalThis.document){const t=un(n),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&q3(l$,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SA(){const n=new CustomEvent(_w);document.dispatchEvent(n)}function q3(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?U3(i,s):i.dispatchEvent(s)}var _i=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},h$=U0.useId||(()=>{}),p$=0;function Si(n){const[e,t]=x.useState(h$());return _i(()=>{n||t(r=>r??String(p$++))},[n]),n||(e?`radix-${e}`:"")}const m$=["top","right","bottom","left"],sa=Math.min,kr=Math.max,Rv=Math.round,fg=Math.floor,ts=n=>({x:n,y:n}),g$={left:"right",right:"left",bottom:"top",top:"bottom"},v$={start:"end",end:"start"};function Tw(n,e,t){return kr(n,sa(e,t))}function Gs(n,e){return typeof n=="function"?n(e):n}function Ws(n){return n.split("-")[0]}function cf(n){return n.split("-")[1]}function e2(n){return n==="x"?"y":"x"}function t2(n){return n==="y"?"height":"width"}function oa(n){return["top","bottom"].includes(Ws(n))?"y":"x"}function n2(n){return e2(oa(n))}function y$(n,e,t){t===void 0&&(t=!1);const r=cf(n),i=n2(n),s=t2(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=_v(o)),[o,_v(o)]}function b$(n){const e=_v(n);return[Aw(n),e,Aw(e)]}function Aw(n){return n.replace(/start|end/g,e=>v$[e])}function x$(n,e,t){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function w$(n,e,t,r){const i=cf(n);let s=x$(Ws(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Aw)))),s}function _v(n){return n.replace(/left|right|bottom|top/g,e=>g$[e])}function S$(n){return{top:0,right:0,bottom:0,left:0,...n}}function Z3(n){return typeof n!="number"?S$(n):{top:n,right:n,bottom:n,left:n}}function Tv(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function CA(n,e,t){let{reference:r,floating:i}=n;const s=oa(e),o=n2(e),l=t2(o),u=Ws(e),f=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,g=r[l]/2-i[l]/2;let y;switch(u){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-i.width,y:m};break;default:y={x:r.x,y:r.y}}switch(cf(e)){case"start":y[o]-=g*(t&&f?-1:1);break;case"end":y[o]+=g*(t&&f?-1:1);break}return y}const C$=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,l=s.filter(Boolean),u=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:h,y:m}=CA(f,r,u),g=r,y={},S=0;for(let C=0;C({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:u}=e,{element:f,padding:h=0}=Gs(n,e)||{};if(f==null)return{};const m=Z3(h),g={x:t,y:r},y=n2(i),S=t2(y),C=await o.getDimensions(f),k=y==="y",E=k?"top":"left",_=k?"bottom":"right",T=k?"clientHeight":"clientWidth",N=s.reference[S]+s.reference[y]-g[y]-s.floating[S],A=g[y]-s.reference[y],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let D=O?O[T]:0;(!D||!await(o.isElement==null?void 0:o.isElement(O)))&&(D=l.floating[T]||s.floating[S]);const B=N/2-A/2,P=D/2-C[S]/2-1,Z=sa(m[E],P),U=sa(m[_],P),$=Z,de=D-C[S]-U,se=D/2-C[S]/2+B,ce=Tw($,se,de),G=!u.arrow&&cf(i)!=null&&se!==ce&&s.reference[S]/2-(se<$?Z:U)-C[S]/2<0,ue=G?se<$?se-$:se-de:0;return{[y]:g[y]+ue,data:{[y]:ce,centerOffset:se-ce-ue,...G&&{alignmentOffset:ue}},reset:G}}}),E$=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:u,elements:f}=e,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=Gs(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const E=Ws(i),_=oa(l),T=Ws(l)===l,N=await(u.isRTL==null?void 0:u.isRTL(f.floating)),A=g||(T||!C?[_v(l)]:b$(l)),O=S!=="none";!g&&O&&A.push(...w$(l,C,S,N));const D=[l,...A],B=await ph(e,k),P=[];let Z=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&P.push(B[E]),m){const se=y$(i,o,N);P.push(B[se[0]],B[se[1]])}if(Z=[...Z,{placement:i,overflows:P}],!P.every(se=>se<=0)){var U,$;const se=(((U=s.flip)==null?void 0:U.index)||0)+1,ce=D[se];if(ce)return{data:{index:se,overflows:Z},reset:{placement:ce}};let G=($=Z.filter(ue=>ue.overflows[0]<=0).sort((ue,ie)=>ue.overflows[1]-ie.overflows[1])[0])==null?void 0:$.placement;if(!G)switch(y){case"bestFit":{var de;const ue=(de=Z.filter(ie=>{if(O){const re=oa(ie.placement);return re===_||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,L)=>re+L,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:de[0];ue&&(G=ue);break}case"initialPlacement":G=l;break}if(i!==G)return{reset:{placement:G}}}return{}}}};function kA(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function EA(n){return m$.some(e=>n[e]>=0)}const R$=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=Gs(n,e);switch(r){case"referenceHidden":{const s=await ph(e,{...i,elementContext:"reference"}),o=kA(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:EA(o)}}}case"escaped":{const s=await ph(e,{...i,altBoundary:!0}),o=kA(s,t.floating);return{data:{escapedOffsets:o,escaped:EA(o)}}}default:return{}}}}};async function _$(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ws(t),l=cf(t),u=oa(t)==="y",f=["left","top"].includes(o)?-1:1,h=s&&u?-1:1,m=Gs(e,n);let{mainAxis:g,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof S=="number"&&(y=l==="end"?S*-1:S),u?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const T$=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:l}=e,u=await _$(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:o}}}}},A$=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:k=>{let{x:E,y:_}=k;return{x:E,y:_}}},...u}=Gs(n,e),f={x:t,y:r},h=await ph(e,u),m=oa(Ws(i)),g=e2(m);let y=f[g],S=f[m];if(s){const k=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=y+h[k],T=y-h[E];y=Tw(_,y,T)}if(o){const k=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=S+h[k],T=S-h[E];S=Tw(_,S,T)}const C=l.fn({...e,[g]:y,[m]:S});return{...C,data:{x:C.x-t,y:C.y-r,enabled:{[g]:s,[m]:o}}}}}},M$=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=Gs(n,e),h={x:t,y:r},m=oa(i),g=e2(m);let y=h[g],S=h[m];const C=Gs(l,e),k=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(u){const T=g==="y"?"height":"width",N=s.reference[g]-s.floating[T]+k.mainAxis,A=s.reference[g]+s.reference[T]-k.mainAxis;yA&&(y=A)}if(f){var E,_;const T=g==="y"?"width":"height",N=["top","left"].includes(Ws(i)),A=s.reference[m]-s.floating[T]+(N&&((E=o.offset)==null?void 0:E[m])||0)+(N?0:k.crossAxis),O=s.reference[m]+s.reference[T]+(N?0:((_=o.offset)==null?void 0:_[m])||0)-(N?k.crossAxis:0);SO&&(S=O)}return{[g]:y,[m]:S}}}},O$=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:l}=e,{apply:u=()=>{},...f}=Gs(n,e),h=await ph(e,f),m=Ws(i),g=cf(i),y=oa(i)==="y",{width:S,height:C}=s.floating;let k,E;m==="top"||m==="bottom"?(k=m,E=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=m,k=g==="end"?"top":"bottom");const _=C-h.top-h.bottom,T=S-h.left-h.right,N=sa(C-h[k],_),A=sa(S-h[E],T),O=!e.middlewareData.shift;let D=N,B=A;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(B=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(D=_),O&&!g){const Z=kr(h.left,0),U=kr(h.right,0),$=kr(h.top,0),de=kr(h.bottom,0);y?B=S-2*(Z!==0||U!==0?Z+U:kr(h.left,h.right)):D=C-2*($!==0||de!==0?$+de:kr(h.top,h.bottom))}await u({...e,availableWidth:B,availableHeight:D});const P=await o.getDimensions(l.floating);return S!==P.width||C!==P.height?{reset:{rects:!0}}:{}}}};function F0(){return typeof window<"u"}function uf(n){return G3(n)?(n.nodeName||"").toLowerCase():"#document"}function _r(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function fs(n){var e;return(e=(G3(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function G3(n){return F0()?n instanceof Node||n instanceof _r(n).Node:!1}function Ti(n){return F0()?n instanceof Element||n instanceof _r(n).Element:!1}function ss(n){return F0()?n instanceof HTMLElement||n instanceof _r(n).HTMLElement:!1}function RA(n){return!F0()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof _r(n).ShadowRoot}function Op(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=Ai(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function N$(n){return["table","td","th"].includes(uf(n))}function q0(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function r2(n){const e=i2(),t=Ti(n)?Ai(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function D$(n){let e=aa(n);for(;ss(e)&&!Pu(e);){if(r2(e))return e;if(q0(e))return null;e=aa(e)}return null}function i2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Pu(n){return["html","body","#document"].includes(uf(n))}function Ai(n){return _r(n).getComputedStyle(n)}function Z0(n){return Ti(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function aa(n){if(uf(n)==="html")return n;const e=n.assignedSlot||n.parentNode||RA(n)&&n.host||fs(n);return RA(e)?e.host:e}function W3(n){const e=aa(n);return Pu(e)?n.ownerDocument?n.ownerDocument.body:n.body:ss(e)&&Op(e)?e:W3(e)}function mh(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=W3(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=_r(i);if(s){const l=Mw(o);return e.concat(o,o.visualViewport||[],Op(i)?i:[],l&&t?mh(l):[])}return e.concat(i,mh(i,[],t))}function Mw(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function K3(n){const e=Ai(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ss(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,l=Rv(t)!==s||Rv(r)!==o;return l&&(t=s,r=o),{width:t,height:r,$:l}}function s2(n){return Ti(n)?n:n.contextElement}function nu(n){const e=s2(n);if(!ss(e))return ts(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=K3(e);let o=(s?Rv(t.width):t.width)/r,l=(s?Rv(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const P$=ts(0);function Q3(n){const e=_r(n);return!i2()||!e.visualViewport?P$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function j$(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==_r(n)?!1:e}function Sl(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=s2(n);let o=ts(1);e&&(r?Ti(r)&&(o=nu(r)):o=nu(n));const l=j$(s,t,r)?Q3(s):ts(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,m=i.height/o.y;if(s){const g=_r(s),y=r&&Ti(r)?_r(r):r;let S=g,C=Mw(S);for(;C&&r&&y!==S;){const k=nu(C),E=C.getBoundingClientRect(),_=Ai(C),T=E.left+(C.clientLeft+parseFloat(_.paddingLeft))*k.x,N=E.top+(C.clientTop+parseFloat(_.paddingTop))*k.y;u*=k.x,f*=k.y,h*=k.x,m*=k.y,u+=T,f+=N,S=_r(C),C=Mw(S)}}return Tv({width:h,height:m,x:u,y:f})}function o2(n,e){const t=Z0(n).scrollLeft;return e?e.left+t:Sl(fs(n)).left+t}function Y3(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:o2(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function L$(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=fs(r),l=e?q0(e.floating):!1;if(r===o||l&&s)return t;let u={scrollLeft:0,scrollTop:0},f=ts(1);const h=ts(0),m=ss(r);if((m||!m&&!s)&&((uf(r)!=="body"||Op(o))&&(u=Z0(r)),ss(r))){const y=Sl(r);f=nu(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const g=o&&!m&&!s?Y3(o,u,!0):ts(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-u.scrollLeft*f.x+h.x+g.x,y:t.y*f.y-u.scrollTop*f.y+h.y+g.y}}function B$(n){return Array.from(n.getClientRects())}function I$(n){const e=fs(n),t=Z0(n),r=n.ownerDocument.body,i=kr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=kr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+o2(n);const l=-t.scrollTop;return Ai(r).direction==="rtl"&&(o+=kr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}function z$(n,e){const t=_r(n),r=fs(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){s=i.width,o=i.height;const f=i2();(!f||f&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:o,x:l,y:u}}function $$(n,e){const t=Sl(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=ss(n)?nu(n):ts(1),o=n.clientWidth*s.x,l=n.clientHeight*s.y,u=i*s.x,f=r*s.y;return{width:o,height:l,x:u,y:f}}function _A(n,e,t){let r;if(e==="viewport")r=z$(n,t);else if(e==="document")r=I$(fs(n));else if(Ti(e))r=$$(e,t);else{const i=Q3(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Tv(r)}function X3(n,e){const t=aa(n);return t===e||!Ti(t)||Pu(t)?!1:Ai(t).position==="fixed"||X3(t,e)}function H$(n,e){const t=e.get(n);if(t)return t;let r=mh(n,[],!1).filter(l=>Ti(l)&&uf(l)!=="body"),i=null;const s=Ai(n).position==="fixed";let o=s?aa(n):n;for(;Ti(o)&&!Pu(o);){const l=Ai(o),u=r2(o);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Op(o)&&!u&&X3(n,o))?r=r.filter(h=>h!==o):i=l,o=aa(o)}return e.set(n,r),r}function V$(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?q0(e)?[]:H$(e,this._c):[].concat(t),r],l=o[0],u=o.reduce((f,h)=>{const m=_A(e,h,i);return f.top=kr(m.top,f.top),f.right=sa(m.right,f.right),f.bottom=sa(m.bottom,f.bottom),f.left=kr(m.left,f.left),f},_A(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function U$(n){const{width:e,height:t}=K3(n);return{width:e,height:t}}function F$(n,e,t){const r=ss(e),i=fs(e),s=t==="fixed",o=Sl(n,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=ts(0);if(r||!r&&!s)if((uf(e)!=="body"||Op(i))&&(l=Z0(e)),r){const g=Sl(e,!0,s,e);u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}else i&&(u.x=o2(i));const f=i&&!r&&!s?Y3(i,l):ts(0),h=o.left+l.scrollLeft-u.x-f.x,m=o.top+l.scrollTop-u.y-f.y;return{x:h,y:m,width:o.width,height:o.height}}function rx(n){return Ai(n).position==="static"}function TA(n,e){if(!ss(n)||Ai(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return fs(n)===t&&(t=t.ownerDocument.body),t}function J3(n,e){const t=_r(n);if(q0(n))return t;if(!ss(n)){let i=aa(n);for(;i&&!Pu(i);){if(Ti(i)&&!rx(i))return i;i=aa(i)}return t}let r=TA(n,e);for(;r&&N$(r)&&rx(r);)r=TA(r,e);return r&&Pu(r)&&rx(r)&&!r2(r)?t:r||D$(n)||t}const q$=async function(n){const e=this.getOffsetParent||J3,t=this.getDimensions,r=await t(n.floating);return{reference:F$(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Z$(n){return Ai(n).direction==="rtl"}const G$={convertOffsetParentRelativeRectToViewportRelativeRect:L$,getDocumentElement:fs,getClippingRect:V$,getOffsetParent:J3,getElementRects:q$,getClientRects:B$,getDimensions:U$,getScale:nu,isElement:Ti,isRTL:Z$};function W$(n,e){let t=null,r;const i=fs(n);function s(){var l;clearTimeout(r),(l=t)==null||l.disconnect(),t=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const{left:f,top:h,width:m,height:g}=n.getBoundingClientRect();if(l||e(),!m||!g)return;const y=fg(h),S=fg(i.clientWidth-(f+m)),C=fg(i.clientHeight-(h+g)),k=fg(f),_={rootMargin:-y+"px "+-S+"px "+-C+"px "+-k+"px",threshold:kr(0,sa(1,u))||1};let T=!0;function N(A){const O=A[0].intersectionRatio;if(O!==u){if(!T)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}T=!1}try{t=new IntersectionObserver(N,{..._,root:i.ownerDocument})}catch{t=new IntersectionObserver(N,_)}t.observe(n)}return o(!0),s}function K$(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=s2(n),h=i||s?[...f?mh(f):[],...mh(e)]:[];h.forEach(E=>{i&&E.addEventListener("scroll",t,{passive:!0}),s&&E.addEventListener("resize",t)});const m=f&&l?W$(f,t):null;let g=-1,y=null;o&&(y=new ResizeObserver(E=>{let[_]=E;_&&_.target===f&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(e)})),t()}),f&&!u&&y.observe(f),y.observe(e));let S,C=u?Sl(n):null;u&&k();function k(){const E=Sl(n);C&&(E.x!==C.x||E.y!==C.y||E.width!==C.width||E.height!==C.height)&&t(),C=E,S=requestAnimationFrame(k)}return t(),()=>{var E;h.forEach(_=>{i&&_.removeEventListener("scroll",t),s&&_.removeEventListener("resize",t)}),m==null||m(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(S)}}const Q$=T$,Y$=A$,X$=E$,J$=O$,eH=R$,AA=k$,tH=M$,nH=(n,e,t)=>{const r=new Map,i={platform:G$,...t},s={...i.platform,_c:r};return C$(n,e,{...i,platform:s})};var rv=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Av(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!Av(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!Av(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function e4(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function MA(n,e){const t=e4(n);return Math.round(e*t)/t}function ix(n){const e=x.useRef(n);return rv(()=>{e.current=n}),e}function rH(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=n,[h,m]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[g,y]=x.useState(r);Av(g,r)||y(r);const[S,C]=x.useState(null),[k,E]=x.useState(null),_=x.useCallback(ie=>{ie!==O.current&&(O.current=ie,C(ie))},[]),T=x.useCallback(ie=>{ie!==D.current&&(D.current=ie,E(ie))},[]),N=s||S,A=o||k,O=x.useRef(null),D=x.useRef(null),B=x.useRef(h),P=u!=null,Z=ix(u),U=ix(i),$=ix(f),de=x.useCallback(()=>{if(!O.current||!D.current)return;const ie={placement:e,strategy:t,middleware:g};U.current&&(ie.platform=U.current),nH(O.current,D.current,ie).then(re=>{const L={...re,isPositioned:$.current!==!1};se.current&&!Av(B.current,L)&&(B.current=L,Ap.flushSync(()=>{m(L)}))})},[g,e,t,U,$]);rv(()=>{f===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,m(ie=>({...ie,isPositioned:!1})))},[f]);const se=x.useRef(!1);rv(()=>(se.current=!0,()=>{se.current=!1}),[]),rv(()=>{if(N&&(O.current=N),A&&(D.current=A),N&&A){if(Z.current)return Z.current(N,A,de);de()}},[N,A,de,Z,P]);const ce=x.useMemo(()=>({reference:O,floating:D,setReference:_,setFloating:T}),[_,T]),G=x.useMemo(()=>({reference:N,floating:A}),[N,A]),ue=x.useMemo(()=>{const ie={position:t,left:0,top:0};if(!G.floating)return ie;const re=MA(G.floating,h.x),L=MA(G.floating,h.y);return l?{...ie,transform:"translate("+re+"px, "+L+"px)",...e4(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:re,top:L}},[t,l,G.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:de,refs:ce,elements:G,floatingStyles:ue}),[h,de,ce,G,ue])}const iH=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?AA({element:r.current,padding:i}).fn(t):{}:r?AA({element:r,padding:i}).fn(t):{}}}},sH=(n,e)=>({...Q$(n),options:[n,e]}),oH=(n,e)=>({...Y$(n),options:[n,e]}),aH=(n,e)=>({...tH(n),options:[n,e]}),lH=(n,e)=>({...X$(n),options:[n,e]}),cH=(n,e)=>({...J$(n),options:[n,e]}),uH=(n,e)=>({...eH(n),options:[n,e]}),fH=(n,e)=>({...iH(n),options:[n,e]});var dH="Arrow",t4=x.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return b.jsx(lt.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});t4.displayName=dH;var hH=t4;function a2(n,e=[]){let t=[];function r(s,o){const l=x.createContext(o),u=t.length;t=[...t,o];function f(m){const{scope:g,children:y,...S}=m,C=(g==null?void 0:g[n][u])||l,k=x.useMemo(()=>S,Object.values(S));return b.jsx(C.Provider,{value:k,children:y})}function h(m,g){const y=(g==null?void 0:g[n][u])||l,S=x.useContext(y);if(S)return S;if(o!==void 0)return o;throw new Error(`\`${m}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,h]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(l){const u=(l==null?void 0:l[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...l,[n]:u}}),[l,u])}};return i.scopeName=n,[r,pH(i,...e)]}function pH(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const m=u(s)[`__scope${f}`];return{...l,...m}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function l2(n){const[e,t]=x.useState(void 0);return _i(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,l;if("borderBoxSize"in s){const u=s.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=n.offsetWidth,l=n.offsetHeight;t({width:o,height:l})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var c2="Popper",[n4,ff]=a2(c2),[mH,r4]=n4(c2),i4=n=>{const{__scopePopper:e,children:t}=n,[r,i]=x.useState(null);return b.jsx(mH,{scope:e,anchor:r,onAnchorChange:i,children:t})};i4.displayName=c2;var s4="PopperAnchor",o4=x.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=r4(s4,t),o=x.useRef(null),l=Pt(e,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(lt.div,{...i,ref:l})});o4.displayName=s4;var u2="PopperContent",[gH,vH]=n4(u2),a4=x.forwardRef((n,e)=>{var me,ye,_e,Ne,Xe,xt;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:S,...C}=n,k=r4(u2,t),[E,_]=x.useState(null),T=Pt(e,qe=>_(qe)),[N,A]=x.useState(null),O=l2(N),D=(O==null?void 0:O.width)??0,B=(O==null?void 0:O.height)??0,P=r+(s!=="center"?"-"+s:""),Z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},U=Array.isArray(f)?f:[f],$=U.length>0,de={padding:Z,boundary:U.filter(bH),altBoundary:$},{refs:se,floatingStyles:ce,placement:G,isPositioned:ue,middlewareData:ie}=rH({strategy:"fixed",placement:P,whileElementsMounted:(...qe)=>K$(...qe,{animationFrame:y==="always"}),elements:{reference:k.anchor},middleware:[sH({mainAxis:i+B,alignmentAxis:o}),u&&oH({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?aH():void 0,...de}),u&&lH({...de}),cH({...de,apply:({elements:qe,rects:Ut,availableWidth:qn,availableHeight:Nn})=>{const{width:ur,height:Ft}=Ut.reference,ci=qe.floating.style;ci.setProperty("--radix-popper-available-width",`${qn}px`),ci.setProperty("--radix-popper-available-height",`${Nn}px`),ci.setProperty("--radix-popper-anchor-width",`${ur}px`),ci.setProperty("--radix-popper-anchor-height",`${Ft}px`)}}),N&&fH({element:N,padding:l}),xH({arrowWidth:D,arrowHeight:B}),g&&uH({strategy:"referenceHidden",...de})]}),[re,L]=u4(G),te=un(S);_i(()=>{ue&&(te==null||te())},[ue,te]);const F=(me=ie.arrow)==null?void 0:me.x,H=(ye=ie.arrow)==null?void 0:ye.y,Q=((_e=ie.arrow)==null?void 0:_e.centerOffset)!==0,[X,ne]=x.useState();return _i(()=>{E&&ne(window.getComputedStyle(E).zIndex)},[E]),b.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:ue?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(Ne=ie.transformOrigin)==null?void 0:Ne.x,(Xe=ie.transformOrigin)==null?void 0:Xe.y].join(" "),...((xt=ie.hide)==null?void 0:xt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:b.jsx(gH,{scope:t,placedSide:re,onArrowChange:A,arrowX:F,arrowY:H,shouldHideArrow:Q,children:b.jsx(lt.div,{"data-side":re,"data-align":L,...C,ref:T,style:{...C.style,animation:ue?void 0:"none"}})})})});a4.displayName=u2;var l4="PopperArrow",yH={top:"bottom",right:"left",bottom:"top",left:"right"},c4=x.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=vH(l4,r),o=yH[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(hH,{...i,ref:t,style:{...i.style,display:"block"}})})});c4.displayName=l4;function bH(n){return n!==null}var xH=n=>({name:"transformOrigin",options:n,fn(e){var k,E,_;const{placement:t,rects:r,middlewareData:i}=e,o=((k=i.arrow)==null?void 0:k.centerOffset)!==0,l=o?0:n.arrowWidth,u=o?0:n.arrowHeight,[f,h]=u4(t),m={start:"0%",center:"50%",end:"100%"}[h],g=(((E=i.arrow)==null?void 0:E.x)??0)+l/2,y=(((_=i.arrow)==null?void 0:_.y)??0)+u/2;let S="",C="";return f==="bottom"?(S=o?m:`${g}px`,C=`${-u}px`):f==="top"?(S=o?m:`${g}px`,C=`${r.floating.height+u}px`):f==="right"?(S=`${-u}px`,C=o?m:`${y}px`):f==="left"&&(S=`${r.floating.width+u}px`,C=o?m:`${y}px`),{data:{x:S,y:C}}}});function u4(n){const[e,t="center"]=n.split("-");return[e,t]}var f2=i4,G0=o4,d2=a4,h2=c4,wH="Portal",W0=x.forwardRef((n,e)=>{var l;const{container:t,...r}=n,[i,s]=x.useState(!1);_i(()=>s(!0),[]);const o=t||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?H3.createPortal(b.jsx(lt.div,{...r,ref:e}),o):null});W0.displayName=wH;function SH(n,e){return x.useReducer((t,r)=>e[t][r]??t,n)}var or=n=>{const{present:e,children:t}=n,r=CH(e),i=typeof t=="function"?t({present:r.isPresent}):x.Children.only(t),s=Pt(r.ref,kH(i));return typeof t=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};or.displayName="Presence";function CH(n){const[e,t]=x.useState(),r=x.useRef({}),i=x.useRef(n),s=x.useRef("none"),o=n?"mounted":"unmounted",[l,u]=SH(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=dg(r.current);s.current=l==="mounted"?f:"none"},[l]),_i(()=>{const f=r.current,h=i.current;if(h!==n){const g=s.current,y=dg(f);n?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,u]),_i(()=>{if(e){let f;const h=e.ownerDocument.defaultView??window,m=y=>{const C=dg(r.current).includes(y.animationName);if(y.target===e&&C&&(u("ANIMATION_END"),!i.current)){const k=e.style.animationFillMode;e.style.animationFillMode="forwards",f=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=k)})}},g=y=>{y.target===e&&(s.current=dg(r.current))};return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{h.clearTimeout(f),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(f=>{f&&(r.current=getComputedStyle(f)),t(f)},[])}}function dg(n){return(n==null?void 0:n.animationName)||"none"}function kH(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function Js({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=EH({defaultProp:e,onChange:t}),s=n!==void 0,o=s?n:r,l=un(t),u=x.useCallback(f=>{if(s){const m=typeof f=="function"?f(n):f;m!==n&&l(m)}else i(f)},[s,n,i,l]);return[o,u]}function EH({defaultProp:n,onChange:e}){const t=x.useState(n),[r]=t,i=x.useRef(r),s=un(e);return x.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),t}var RH="VisuallyHidden",f4=x.forwardRef((n,e)=>b.jsx(lt.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));f4.displayName=RH;var _H=f4,[K0,Qfe]=us("Tooltip",[ff]),Q0=ff(),d4="TooltipProvider",TH=700,Ow="tooltip.open",[AH,p2]=K0(d4),h4=n=>{const{__scopeTooltip:e,delayDuration:t=TH,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,[o,l]=x.useState(!0),u=x.useRef(!1),f=x.useRef(0);return x.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),b.jsx(AH,{scope:e,isOpenDelayed:o,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(f.current),l(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:x.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:s})};h4.displayName=d4;var Y0="Tooltip",[MH,Np]=K0(Y0),p4=n=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:l}=n,u=p2(Y0,n.__scopeTooltip),f=Q0(e),[h,m]=x.useState(null),g=Si(),y=x.useRef(0),S=o??u.disableHoverableContent,C=l??u.delayDuration,k=x.useRef(!1),[E=!1,_]=Js({prop:r,defaultProp:i,onChange:D=>{D?(u.onOpen(),document.dispatchEvent(new CustomEvent(Ow))):u.onClose(),s==null||s(D)}}),T=x.useMemo(()=>E?k.current?"delayed-open":"instant-open":"closed",[E]),N=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k.current=!1,_(!0)},[_]),A=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,_(!1)},[_]),O=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{k.current=!0,_(!0),y.current=0},C)},[C,_]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),b.jsx(f2,{...f,children:b.jsx(MH,{scope:e,contentId:g,open:E,stateAttribute:T,trigger:h,onTriggerChange:m,onTriggerEnter:x.useCallback(()=>{u.isOpenDelayed?O():N()},[u.isOpenDelayed,O,N]),onTriggerLeave:x.useCallback(()=>{S?A():(window.clearTimeout(y.current),y.current=0)},[A,S]),onOpen:N,onClose:A,disableHoverableContent:S,children:t})})};p4.displayName=Y0;var Nw="TooltipTrigger",m4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Np(Nw,t),s=p2(Nw,t),o=Q0(t),l=x.useRef(null),u=Pt(e,l,i.onTriggerChange),f=x.useRef(!1),h=x.useRef(!1),m=x.useCallback(()=>f.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),b.jsx(G0,{asChild:!0,...o,children:b.jsx(lt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Oe(n.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Oe(n.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Oe(n.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Oe(n.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(n.onBlur,i.onClose),onClick:Oe(n.onClick,i.onClose)})})});m4.displayName=Nw;var m2="TooltipPortal",[OH,NH]=K0(m2,{forceMount:void 0}),g4=n=>{const{__scopeTooltip:e,forceMount:t,children:r,container:i}=n,s=Np(m2,e);return b.jsx(OH,{scope:e,forceMount:t,children:b.jsx(or,{present:t||s.open,children:b.jsx(W0,{asChild:!0,container:i,children:r})})})};g4.displayName=m2;var ju="TooltipContent",v4=x.forwardRef((n,e)=>{const t=NH(ju,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=Np(ju,n.__scopeTooltip);return b.jsx(or,{present:r||o.open,children:o.disableHoverableContent?b.jsx(y4,{side:i,...s,ref:e}):b.jsx(DH,{side:i,...s,ref:e})})}),DH=x.forwardRef((n,e)=>{const t=Np(ju,n.__scopeTooltip),r=p2(ju,n.__scopeTooltip),i=x.useRef(null),s=Pt(e,i),[o,l]=x.useState(null),{trigger:u,onClose:f}=t,h=i.current,{onPointerInTransitChange:m}=r,g=x.useCallback(()=>{l(null),m(!1)},[m]),y=x.useCallback((S,C)=>{const k=S.currentTarget,E={x:S.clientX,y:S.clientY},_=BH(E,k.getBoundingClientRect()),T=IH(E,_),N=zH(C.getBoundingClientRect()),A=HH([...T,...N]);l(A),m(!0)},[m]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(u&&h){const S=k=>y(k,h),C=k=>y(k,u);return u.addEventListener("pointerleave",S),h.addEventListener("pointerleave",C),()=>{u.removeEventListener("pointerleave",S),h.removeEventListener("pointerleave",C)}}},[u,h,y,g]),x.useEffect(()=>{if(o){const S=C=>{const k=C.target,E={x:C.clientX,y:C.clientY},_=(u==null?void 0:u.contains(k))||(h==null?void 0:h.contains(k)),T=!$H(E,o);_?g():T&&(g(),f())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[u,h,o,f,g]),b.jsx(y4,{...n,ref:s})}),[PH,jH]=K0(Y0,{isInside:!1}),y4=x.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...l}=n,u=Np(ju,t),f=Q0(t),{onClose:h}=u;return x.useEffect(()=>(document.addEventListener(Ow,h),()=>document.removeEventListener(Ow,h)),[h]),x.useEffect(()=>{if(u.trigger){const m=g=>{const y=g.target;y!=null&&y.contains(u.trigger)&&h()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,h]),b.jsx(Mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:m=>m.preventDefault(),onDismiss:h,children:b.jsxs(d2,{"data-state":u.stateAttribute,...f,...l,ref:e,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[b.jsx(V3,{children:r}),b.jsx(PH,{scope:t,isInside:!0,children:b.jsx(_H,{id:u.contentId,role:"tooltip",children:i||r})})]})})});v4.displayName=ju;var b4="TooltipArrow",LH=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Q0(t);return jH(b4,t).isInside?null:b.jsx(h2,{...i,...r,ref:e})});LH.displayName=b4;function BH(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function IH(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function zH(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function $H(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;sr!=h>r&&t<(f-l)*(r-u)/(h-u)+l&&(i=!i)}return i}function HH(n){const e=n.slice();return e.sort((t,r)=>t.xr.x?1:t.yr.y?1:0),VH(e)}function VH(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var UH=h4,FH=p4,qH=m4,ZH=g4,x4=v4;function w4(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e{const e=KH(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const l=o.split(v2);return l[0]===""&&l.length!==1&&l.shift(),S4(l,e)||WH(o)},getConflictingClassGroupIds:(o,l)=>{const u=t[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},S4=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?S4(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(v2);return(o=e.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},OA=/^\[(.+)\]$/,WH=n=>{if(OA.test(n)){const e=OA.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},KH=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return YH(Object.entries(n.classGroups),t).forEach(([s,o])=>{Dw(o,r,s,e)}),r},Dw=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:NA(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(QH(i)){Dw(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{Dw(o,NA(e,s),t,r)})})},NA=(n,e)=>{let t=n;return e.split(v2).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},QH=n=>n.isThemeGetter,YH=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,l])=>[e+o,l])):s);return[t,i]}):n,XH=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},C4="!",JH=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=l=>{const u=[];let f=0,h=0,m;for(let k=0;kh?m-h:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:C}};return t?l=>t({className:l,parseClassName:o}):o},eV=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},tV=n=>({cache:XH(n.cacheSize),parseClassName:JH(n),...GH(n)}),nV=/\s+/,rV=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(nV);let l="";for(let u=o.length-1;u>=0;u-=1){const f=o[u],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=t(f);let S=!!y,C=r(S?g.substring(0,y):g);if(!C){if(!S){l=f+(l.length>0?" "+l:l);continue}if(C=r(g),!C){l=f+(l.length>0?" "+l:l);continue}S=!1}const k=eV(h).join(":"),E=m?k+C4:k,_=E+C;if(s.includes(_))continue;s.push(_);const T=i(C,S);for(let N=0;N0?" "+l:l)}return l};function iV(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rm(h),n());return t=tV(f),r=t.cache.get,i=t.cache.set,s=l,l(u)}function l(u){const f=r(u);if(f)return f;const h=rV(u,t);return i(u,h),h}return function(){return s(iV.apply(null,arguments))}}const Ot=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},E4=/^\[(?:([a-z-]+):)?(.+)\]$/i,oV=/^\d+\/\d+$/,aV=new Set(["px","full","screen"]),lV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ps=n=>ru(n)||aV.has(n)||oV.test(n),Eo=n=>df(n,"length",xV),ru=n=>!!n&&!Number.isNaN(Number(n)),sx=n=>df(n,"number",ru),wd=n=>!!n&&Number.isInteger(Number(n)),hV=n=>n.endsWith("%")&&ru(n.slice(0,-1)),Ye=n=>E4.test(n),Ro=n=>lV.test(n),pV=new Set(["length","size","percentage"]),mV=n=>df(n,pV,R4),gV=n=>df(n,"position",R4),vV=new Set(["image","url"]),yV=n=>df(n,vV,SV),bV=n=>df(n,"",wV),Sd=()=>!0,df=(n,e,t)=>{const r=E4.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},xV=n=>cV.test(n)&&!uV.test(n),R4=()=>!1,wV=n=>fV.test(n),SV=n=>dV.test(n),CV=()=>{const n=Ot("colors"),e=Ot("spacing"),t=Ot("blur"),r=Ot("brightness"),i=Ot("borderColor"),s=Ot("borderRadius"),o=Ot("borderSpacing"),l=Ot("borderWidth"),u=Ot("contrast"),f=Ot("grayscale"),h=Ot("hueRotate"),m=Ot("invert"),g=Ot("gap"),y=Ot("gradientColorStops"),S=Ot("gradientColorStopPositions"),C=Ot("inset"),k=Ot("margin"),E=Ot("opacity"),_=Ot("padding"),T=Ot("saturate"),N=Ot("scale"),A=Ot("sepia"),O=Ot("skew"),D=Ot("space"),B=Ot("translate"),P=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ye,e],$=()=>[Ye,e],de=()=>["",Ps,Eo],se=()=>["auto",ru,Ye],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Ye],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[ru,Ye];return{cacheSize:500,separator:":",theme:{colors:[Sd],spacing:[Ps,Eo],blur:["none","",Ro,Ye],brightness:te(),borderColor:[n],borderRadius:["none","","full",Ro,Ye],borderSpacing:$(),borderWidth:de(),contrast:te(),grayscale:re(),hueRotate:te(),invert:re(),gap:$(),gradientColorStops:[n],gradientColorStopPositions:[hV,Eo],inset:U(),margin:U(),opacity:te(),padding:$(),saturate:te(),scale:te(),sepia:re(),skew:te(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[Ro]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Ye]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wd,Ye]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",wd,Ye]}],"grid-cols":[{"grid-cols":[Sd]}],"col-start-end":[{col:["auto",{span:["full",wd,Ye]},Ye]}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":[Sd]}],"row-start-end":[{row:["auto",{span:[wd,Ye]},Ye]}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,e]}],"min-w":[{"min-w":[Ye,e,"min","max","fit"]}],"max-w":[{"max-w":[Ye,e,"none","full","min","max","fit","prose",{screen:[Ro]},Ro]}],h:[{h:[Ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ro,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sx]}],"font-family":[{font:[Sd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",ru,sx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ps,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ps,Eo]}],"underline-offset":[{"underline-offset":["auto",Ps,Ye]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),gV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},yV]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[Ps,Ye]}],"outline-w":[{outline:[Ps,Eo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Ps,Eo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Ro,bV]}],"shadow-color":[{shadow:[Sd]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ro,Ye]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[T]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[wd,Ye]}],"translate-x":[{"translate-x":[B]}],"translate-y":[{"translate-y":[B]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Ps,Eo,sx]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},_4=sV(CV);function nt(...n){return _4(g2(n))}const kV=UH,Dp=FH,Pp=qH,hf=x.forwardRef(({className:n,sideOffset:e=4,...t},r)=>b.jsx(ZH,{children:b.jsx(x4,{ref:r,sideOffset:e,className:nt("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",n),...t})}));hf.displayName=x4.displayName;var pf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cl=typeof window>"u"||"Deno"in globalThis;function Zr(){}function EV(n,e){return typeof n=="function"?n(e):n}function Pw(n){return typeof n=="number"&&n>=0&&n!==1/0}function T4(n,e){return Math.max(n+(e||0)-Date.now(),0)}function iu(n,e){return typeof n=="function"?n(e):n}function yi(n,e){return typeof n=="function"?n(e):n}function DA(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=n;if(o){if(r){if(e.queryHash!==y2(o,e.options))return!1}else if(!gh(e.queryKey,o))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function PA(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(kl(e.options.mutationKey)!==kl(s))return!1}else if(!gh(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function y2(n,e){return((e==null?void 0:e.queryKeyHashFn)||kl)(n)}function kl(n){return JSON.stringify(n,(e,t)=>jw(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function gh(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!gh(n[t],e[t])):!1}function A4(n,e){if(n===e)return n;const t=jA(n)&&jA(e);if(t||jw(n)&&jw(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,l=t?[]:{};let u=0;for(let f=0;f{setTimeout(e,n)})}function Lw(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?A4(n,e):e}function _V(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function TV(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var b2=Symbol();function M4(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===b2?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var rl,Lo,xu,C3,AV=(C3=class extends pf{constructor(){super();Te(this,rl);Te(this,Lo);Te(this,xu);be(this,xu,e=>{if(!Cl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){j(this,Lo)||this.setEventListener(j(this,xu))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Lo))==null||e.call(this),be(this,Lo,void 0))}setEventListener(e){var t;be(this,xu,e),(t=j(this,Lo))==null||t.call(this),be(this,Lo,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,rl)!==e&&(be(this,rl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof j(this,rl)=="boolean"?j(this,rl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},rl=new WeakMap,Lo=new WeakMap,xu=new WeakMap,C3),x2=new AV,wu,Bo,Su,k3,MV=(k3=class extends pf{constructor(){super();Te(this,wu,!0);Te(this,Bo);Te(this,Su);be(this,Su,e=>{if(!Cl&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,Bo)||this.setEventListener(j(this,Su))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,Bo))==null||e.call(this),be(this,Bo,void 0))}setEventListener(e){var t;be(this,Su,e),(t=j(this,Bo))==null||t.call(this),be(this,Bo,e(this.setOnline.bind(this)))}setOnline(e){j(this,wu)!==e&&(be(this,wu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return j(this,wu)}},wu=new WeakMap,Bo=new WeakMap,Su=new WeakMap,k3),Ov=new MV;function Bw(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function OV(n){return Math.min(1e3*2**n,3e4)}function O4(n){return(n??"online")==="online"?Ov.isOnline():!0}var N4=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ox(n){return n instanceof N4}function D4(n){let e=!1,t=0,r=!1,i;const s=Bw(),o=C=>{var k;r||(g(new N4(C)),(k=n.abort)==null||k.call(n))},l=()=>{e=!0},u=()=>{e=!1},f=()=>x2.isFocused()&&(n.networkMode==="always"||Ov.isOnline())&&n.canRun(),h=()=>O4(n.networkMode)&&n.canRun(),m=C=>{var k;r||(r=!0,(k=n.onSuccess)==null||k.call(n,C),i==null||i(),s.resolve(C))},g=C=>{var k;r||(r=!0,(k=n.onError)==null||k.call(n,C),i==null||i(),s.reject(C))},y=()=>new Promise(C=>{var k;i=E=>{(r||f())&&C(E)},(k=n.onPause)==null||k.call(n)}).then(()=>{var C;i=void 0,r||(C=n.onContinue)==null||C.call(n)}),S=()=>{if(r)return;let C;const k=t===0?n.initialPromise:void 0;try{C=k??n.fn()}catch(E){C=Promise.reject(E)}Promise.resolve(C).then(m).catch(E=>{var O;if(r)return;const _=n.retry??(Cl?0:3),T=n.retryDelay??OV,N=typeof T=="function"?T(t,E):T,A=_===!0||typeof _=="number"&&t<_||typeof _=="function"&&_(t,E);if(e||!A){g(E);return}t++,(O=n.onFail)==null||O.call(n,t,E),RV(N).then(()=>f()?void 0:y()).then(()=>{e?g(E):S()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?S():y().then(S),s)}}function NV(){let n=[],e=0,t=l=>{l()},r=l=>{l()},i=l=>setTimeout(l,0);const s=l=>{e?n.push(l):i(()=>{t(l)})},o=()=>{const l=n;n=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{t(u)})})})};return{batch:l=>{let u;e++;try{u=l()}finally{e--,e||o()}return u},batchCalls:l=>(...u)=>{s(()=>{l(...u)})},schedule:s,setNotifyFunction:l=>{t=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var nn=NV(),il,E3,P4=(E3=class{constructor(){Te(this,il)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pw(this.gcTime)&&be(this,il,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Cl?1/0:5*60*1e3))}clearGcTimeout(){j(this,il)&&(clearTimeout(j(this,il)),be(this,il,void 0))}},il=new WeakMap,E3),Cu,ku,qr,kn,Cp,sl,mi,js,R3,DV=(R3=class extends P4{constructor(e){super();Te(this,mi);Te(this,Cu);Te(this,ku);Te(this,qr);Te(this,kn);Te(this,Cp);Te(this,sl);be(this,sl,!1),be(this,Cp,e.defaultOptions),this.setOptions(e.options),this.observers=[],be(this,qr,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,be(this,Cu,PV(this.options)),this.state=e.state??j(this,Cu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,kn))==null?void 0:e.promise}setOptions(e){this.options={...j(this,Cp),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,qr).remove(this)}setData(e,t){const r=Lw(this.state.data,e,this.options);return Ve(this,mi,js).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){Ve(this,mi,js).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=j(this,kn))==null?void 0:r.promise;return(i=j(this,kn))==null||i.cancel(e),t?t.then(Zr).catch(Zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Cu))}isActive(){return this.observers.some(e=>yi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===b2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!T4(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,kn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,qr).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(j(this,kn)&&(j(this,sl)?j(this,kn).cancel({revert:!0}):j(this,kn).cancelRetry()),this.scheduleGc()),j(this,qr).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ve(this,mi,js).call(this,{type:"invalidate"})}fetch(e,t){var u,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(j(this,kn))return j(this,kn).continueRetry(),j(this,kn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(be(this,sl,!0),r.signal)})},s=()=>{const m=M4(this.options,t),g={queryKey:this.queryKey,meta:this.meta};return i(g),be(this,sl,!1),this.options.persister?this.options.persister(m,g,this):m(g)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(u=this.options.behavior)==null||u.onFetch(o,this),be(this,ku,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ve(this,mi,js).call(this,{type:"fetch",meta:(h=o.fetchOptions)==null?void 0:h.meta});const l=m=>{var g,y,S,C;ox(m)&&m.silent||Ve(this,mi,js).call(this,{type:"error",error:m}),ox(m)||((y=(g=j(this,qr).config).onError)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,this.state.data,m,this)),this.scheduleGc()};return be(this,kn,D4({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var g,y,S,C;if(m===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(k){l(k);return}(y=(g=j(this,qr).config).onSuccess)==null||y.call(g,m,this),(C=(S=j(this,qr).config).onSettled)==null||C.call(S,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,g)=>{Ve(this,mi,js).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{Ve(this,mi,js).call(this,{type:"pause"})},onContinue:()=>{Ve(this,mi,js).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,kn).start()}},Cu=new WeakMap,ku=new WeakMap,qr=new WeakMap,kn=new WeakMap,Cp=new WeakMap,sl=new WeakMap,mi=new WeakSet,js=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...j4(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return ox(i)&&i.revert&&j(this,ku)?{...j(this,ku),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,qr).notify({query:this,type:"updated",action:e})})},R3);function j4(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:O4(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function PV(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Gi,_3,jV=(_3=class extends pf{constructor(e={}){super();Te(this,Gi);this.config=e,be(this,Gi,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??y2(i,t);let o=this.get(s);return o||(o=new DV({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){j(this,Gi).has(e.queryHash)||(j(this,Gi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=j(this,Gi).get(e.queryHash);t&&(e.destroy(),t===e&&j(this,Gi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,Gi).get(e)}getAll(){return[...j(this,Gi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>DA(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>DA(e,r)):t}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gi=new WeakMap,_3),Wi,jn,ol,Ki,_o,T3,LV=(T3=class extends P4{constructor(e){super();Te(this,Ki);Te(this,Wi);Te(this,jn);Te(this,ol);this.mutationId=e.mutationId,be(this,jn,e.mutationCache),be(this,Wi,[]),this.state=e.state||L4(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,Wi).includes(e)||(j(this,Wi).push(e),this.clearGcTimeout(),j(this,jn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){be(this,Wi,j(this,Wi).filter(t=>t!==e)),this.scheduleGc(),j(this,jn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():j(this,jn).remove(this))}continue(){var e;return((e=j(this,ol))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,l,u,f,h,m,g,y,S,C,k,E,_,T,N,A,O,D;be(this,ol,D4({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(B,P)=>{Ve(this,Ki,_o).call(this,{type:"failed",failureCount:B,error:P})},onPause:()=>{Ve(this,Ki,_o).call(this,{type:"pause"})},onContinue:()=>{Ve(this,Ki,_o).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,jn).canRun(this)}));const t=this.state.status==="pending",r=!j(this,ol).canStart();try{if(!t){Ve(this,Ki,_o).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=j(this,jn).config).onMutate)==null?void 0:s.call(i,e,this));const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e));P!==this.state.context&&Ve(this,Ki,_o).call(this,{type:"pending",context:P,variables:e,isPaused:r})}const B=await j(this,ol).start();return await((f=(u=j(this,jn).config).onSuccess)==null?void 0:f.call(u,B,e,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,B,e,this.state.context)),await((y=(g=j(this,jn).config).onSettled)==null?void 0:y.call(g,B,null,this.state.variables,this.state.context,this)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,B,null,e,this.state.context)),Ve(this,Ki,_o).call(this,{type:"success",data:B}),B}catch(B){try{throw await((E=(k=j(this,jn).config).onError)==null?void 0:E.call(k,B,e,this.state.context,this)),await((T=(_=this.options).onError)==null?void 0:T.call(_,B,e,this.state.context)),await((A=(N=j(this,jn).config).onSettled)==null?void 0:A.call(N,void 0,B,this.state.variables,this.state.context,this)),await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,B,e,this.state.context)),B}finally{Ve(this,Ki,_o).call(this,{type:"error",error:B})}}finally{j(this,jn).runNext(this)}}},Wi=new WeakMap,jn=new WeakMap,ol=new WeakMap,Ki=new WeakSet,_o=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),nn.batch(()=>{j(this,Wi).forEach(r=>{r.onMutationUpdate(e)}),j(this,jn).notify({mutation:this,type:"updated",action:e})})},T3);function L4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,kp,A3,BV=(A3=class extends pf{constructor(e={}){super();Te(this,xr);Te(this,kp);this.config=e,be(this,xr,new Map),be(this,kp,Date.now())}build(e,t,r){const i=new LV({mutationCache:this,mutationId:++bd(this,kp)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){const t=hg(e),r=j(this,xr).get(t)??[];r.push(e),j(this,xr).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var r;const t=hg(e);if(j(this,xr).has(t)){const i=(r=j(this,xr).get(t))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?j(this,xr).delete(t):j(this,xr).set(t,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!t||t===e}runNext(e){var r;const t=(r=j(this,xr).get(hg(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){nn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...j(this,xr).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(r=>PA(t,r))}findAll(e={}){return this.getAll().filter(t=>PA(e,t))}notify(e){nn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return nn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zr))))}},xr=new WeakMap,kp=new WeakMap,A3);function hg(n){var e;return((e=n.options.scope)==null?void 0:e.id)??String(n.mutationId)}function BA(n){return{onFetch:(e,t)=>{var h,m,g,y,S;const r=e.options,i=(g=(m=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,s=((y=e.state.data)==null?void 0:y.pages)||[],o=((S=e.state.data)==null?void 0:S.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let C=!1;const k=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(e.signal.aborted?C=!0:e.signal.addEventListener("abort",()=>{C=!0}),e.signal)})},E=M4(e.options,e.fetchOptions),_=async(T,N,A)=>{if(C)return Promise.reject();if(N==null&&T.pages.length)return Promise.resolve(T);const O={queryKey:e.queryKey,pageParam:N,direction:A?"backward":"forward",meta:e.options.meta};k(O);const D=await E(O),{maxPages:B}=e.options,P=A?TV:_V;return{pages:P(T.pages,D,B),pageParams:P(T.pageParams,N,B)}};if(i&&s.length){const T=i==="backward",N=T?IV:IA,A={pages:s,pageParams:o},O=N(r,A);l=await _(A,O,T)}else{const T=n??s.length;do{const N=u===0?o[0]??r.initialPageParam:IA(r,l);if(u>0&&N==null)break;l=await _(l,N),u++}while(u{var C,k;return(k=(C=e.options).persister)==null?void 0:k.call(C,f,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=f}}}function IA(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function IV(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Vt,Io,zo,Eu,Ru,$o,_u,Tu,M3,zV=(M3=class{constructor(n={}){Te(this,Vt);Te(this,Io);Te(this,zo);Te(this,Eu);Te(this,Ru);Te(this,$o);Te(this,_u);Te(this,Tu);be(this,Vt,n.queryCache||new jV),be(this,Io,n.mutationCache||new BV),be(this,zo,n.defaultOptions||{}),be(this,Eu,new Map),be(this,Ru,new Map),be(this,$o,0)}mount(){bd(this,$o)._++,j(this,$o)===1&&(be(this,_u,x2.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onFocus())})),be(this,Tu,Ov.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Vt).onOnline())})))}unmount(){var n,e;bd(this,$o)._--,j(this,$o)===0&&((n=j(this,_u))==null||n.call(this),be(this,_u,void 0),(e=j(this,Tu))==null||e.call(this),be(this,Tu,void 0))}isFetching(n){return j(this,Vt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,Io).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.getQueryData(n.queryKey);if(e===void 0)return this.fetchQuery(n);{const t=this.defaultQueryOptions(n),r=j(this,Vt).build(this,t);return n.revalidateIfStale&&r.isStaleByTime(iu(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(n){return j(this,Vt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=j(this,Vt).get(r.queryHash),s=i==null?void 0:i.state.data,o=EV(e,s);if(o!==void 0)return j(this,Vt).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return nn.batch(()=>j(this,Vt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Vt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=j(this,Vt);nn.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=j(this,Vt),r={type:"active",...n};return nn.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(n={},e={}){const t={revert:!0,...e},r=nn.batch(()=>j(this,Vt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Zr).catch(Zr)}invalidateQueries(n={},e={}){return nn.batch(()=>{if(j(this,Vt).findAll(n).forEach(r=>{r.invalidate()}),n.refetchType==="none")return Promise.resolve();const t={...n,type:n.refetchType??n.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(n={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=nn.batch(()=>j(this,Vt).findAll(n).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Zr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zr)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=j(this,Vt).build(this,e);return t.isStaleByTime(iu(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Zr).catch(Zr)}fetchInfiniteQuery(n){return n.behavior=BA(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Zr).catch(Zr)}ensureInfiniteQueryData(n){return n.behavior=BA(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ov.isOnline()?j(this,Io).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Vt)}getMutationCache(){return j(this,Io)}getDefaultOptions(){return j(this,zo)}setDefaultOptions(n){be(this,zo,n)}setQueryDefaults(n,e){j(this,Eu).set(kl(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...j(this,Eu).values()];let t={};return e.forEach(r=>{gh(n,r.queryKey)&&(t={...t,...r.defaultOptions})}),t}setMutationDefaults(n,e){j(this,Ru).set(kl(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...j(this,Ru).values()];let t={};return e.forEach(r=>{gh(n,r.mutationKey)&&(t={...t,...r.defaultOptions})}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...j(this,zo).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=y2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===b2&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,zo).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,Vt).clear(),j(this,Io).clear()}},Vt=new WeakMap,Io=new WeakMap,zo=new WeakMap,Eu=new WeakMap,Ru=new WeakMap,$o=new WeakMap,_u=new WeakMap,Tu=new WeakMap,M3),Qn,ut,Ep,Ln,al,Au,Ho,Qi,Rp,Mu,Ou,ll,cl,Vo,Nu,bt,Pd,Iw,zw,$w,Hw,Vw,Uw,Fw,B4,O3,$V=(O3=class extends pf{constructor(e,t){super();Te(this,bt);Te(this,Qn);Te(this,ut);Te(this,Ep);Te(this,Ln);Te(this,al);Te(this,Au);Te(this,Ho);Te(this,Qi);Te(this,Rp);Te(this,Mu);Te(this,Ou);Te(this,ll);Te(this,cl);Te(this,Vo);Te(this,Nu,new Set);this.options=t,be(this,Qn,e),be(this,Qi,null),be(this,Ho,Bw()),this.options.experimental_prefetchInRender||j(this,Ho).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ut).addObserver(this),zA(j(this,ut),this.options)?Ve(this,bt,Pd).call(this):this.updateResult(),Ve(this,bt,Hw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qw(j(this,ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qw(j(this,ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ve(this,bt,Vw).call(this),Ve(this,bt,Uw).call(this),j(this,ut).removeObserver(this)}setOptions(e,t){const r=this.options,i=j(this,ut);if(this.options=j(this,Qn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,j(this,ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ve(this,bt,Fw).call(this),j(this,ut).setOptions(this.options),r._defaulted&&!Mv(this.options,r)&&j(this,Qn).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ut),observer:this});const s=this.hasListeners();s&&$A(j(this,ut),i,this.options,r)&&Ve(this,bt,Pd).call(this),this.updateResult(t),s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||iu(this.options.staleTime,j(this,ut))!==iu(r.staleTime,j(this,ut)))&&Ve(this,bt,Iw).call(this);const o=Ve(this,bt,zw).call(this);s&&(j(this,ut)!==i||yi(this.options.enabled,j(this,ut))!==yi(r.enabled,j(this,ut))||o!==j(this,Vo))&&Ve(this,bt,$w).call(this,o)}getOptimisticResult(e){const t=j(this,Qn).getQueryCache().build(j(this,Qn),e),r=this.createResult(t,e);return VV(this,r)&&(be(this,Ln,r),be(this,Au,this.options),be(this,al,j(this,ut).state)),r}getCurrentResult(){return j(this,Ln)}trackResult(e,t){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t==null||t(i),e[i])})}),r}trackProp(e){j(this,Nu).add(e)}getCurrentQuery(){return j(this,ut)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=j(this,Qn).defaultQueryOptions(e),r=j(this,Qn).getQueryCache().build(j(this,Qn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return Ve(this,bt,Pd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,Ln)))}createResult(e,t){var B;const r=j(this,ut),i=this.options,s=j(this,Ln),o=j(this,al),l=j(this,Au),f=e!==r?e.state:j(this,Ep),{state:h}=e;let m={...h},g=!1,y;if(t._optimisticResults){const P=this.hasListeners(),Z=!P&&zA(e,t),U=P&&$A(e,r,t,i);(Z||U)&&(m={...m,...j4(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:C,status:k}=m;if(t.select&&m.data!==void 0)if(s&&m.data===(o==null?void 0:o.data)&&t.select===j(this,Rp))y=j(this,Mu);else try{be(this,Rp,t.select),y=t.select(m.data),y=Lw(s==null?void 0:s.data,y,t),be(this,Mu,y),be(this,Qi,null)}catch(P){be(this,Qi,P)}else y=m.data;if(t.placeholderData!==void 0&&y===void 0&&k==="pending"){let P;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(l==null?void 0:l.placeholderData))P=s.data;else if(P=typeof t.placeholderData=="function"?t.placeholderData((B=j(this,Ou))==null?void 0:B.state.data,j(this,Ou)):t.placeholderData,t.select&&P!==void 0)try{P=t.select(P),be(this,Qi,null)}catch(Z){be(this,Qi,Z)}P!==void 0&&(k="success",y=Lw(s==null?void 0:s.data,P,t),g=!0)}j(this,Qi)&&(S=j(this,Qi),y=j(this,Mu),C=Date.now(),k="error");const E=m.fetchStatus==="fetching",_=k==="pending",T=k==="error",N=_&&E,A=y!==void 0,D={status:k,fetchStatus:m.fetchStatus,isPending:_,isSuccess:k==="success",isError:T,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:C,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>f.dataUpdateCount||m.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:T&&!A,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&A,isStale:w2(e,t),refetch:this.refetch,promise:j(this,Ho)};if(this.options.experimental_prefetchInRender){const P=$=>{D.status==="error"?$.reject(D.error):D.data!==void 0&&$.resolve(D.data)},Z=()=>{const $=be(this,Ho,D.promise=Bw());P($)},U=j(this,Ho);switch(U.status){case"pending":e.queryHash===r.queryHash&&P(U);break;case"fulfilled":(D.status==="error"||D.data!==U.value)&&Z();break;case"rejected":(D.status!=="error"||D.error!==U.reason)&&Z();break}}return D}updateResult(e){const t=j(this,Ln),r=this.createResult(j(this,ut),this.options);if(be(this,al,j(this,ut).state),be(this,Au,this.options),j(this,al).data!==void 0&&be(this,Ou,j(this,ut)),Mv(r,t))return;be(this,Ln,r);const i={},s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!j(this,Nu).size)return!0;const u=new Set(l??j(this,Nu));return this.options.throwOnError&&u.add("error"),Object.keys(j(this,Ln)).some(f=>{const h=f;return j(this,Ln)[h]!==t[h]&&u.has(h)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),Ve(this,bt,B4).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ve(this,bt,Hw).call(this)}},Qn=new WeakMap,ut=new WeakMap,Ep=new WeakMap,Ln=new WeakMap,al=new WeakMap,Au=new WeakMap,Ho=new WeakMap,Qi=new WeakMap,Rp=new WeakMap,Mu=new WeakMap,Ou=new WeakMap,ll=new WeakMap,cl=new WeakMap,Vo=new WeakMap,Nu=new WeakMap,bt=new WeakSet,Pd=function(e){Ve(this,bt,Fw).call(this);let t=j(this,ut).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Zr)),t},Iw=function(){Ve(this,bt,Vw).call(this);const e=iu(this.options.staleTime,j(this,ut));if(Cl||j(this,Ln).isStale||!Pw(e))return;const r=T4(j(this,Ln).dataUpdatedAt,e)+1;be(this,ll,setTimeout(()=>{j(this,Ln).isStale||this.updateResult()},r))},zw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ut)):this.options.refetchInterval)??!1},$w=function(e){Ve(this,bt,Uw).call(this),be(this,Vo,e),!(Cl||yi(this.options.enabled,j(this,ut))===!1||!Pw(j(this,Vo))||j(this,Vo)===0)&&be(this,cl,setInterval(()=>{(this.options.refetchIntervalInBackground||x2.isFocused())&&Ve(this,bt,Pd).call(this)},j(this,Vo)))},Hw=function(){Ve(this,bt,Iw).call(this),Ve(this,bt,$w).call(this,Ve(this,bt,zw).call(this))},Vw=function(){j(this,ll)&&(clearTimeout(j(this,ll)),be(this,ll,void 0))},Uw=function(){j(this,cl)&&(clearInterval(j(this,cl)),be(this,cl,void 0))},Fw=function(){const e=j(this,Qn).getQueryCache().build(j(this,Qn),this.options);if(e===j(this,ut))return;const t=j(this,ut);be(this,ut,e),be(this,Ep,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},B4=function(e){nn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(j(this,Ln))}),j(this,Qn).getQueryCache().notify({query:j(this,ut),type:"observerResultsUpdated"})})},O3);function HV(n,e){return yi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function zA(n,e){return HV(n,e)||n.state.data!==void 0&&qw(n,e,e.refetchOnMount)}function qw(n,e,t){if(yi(e.enabled,n)!==!1){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&w2(n,e)}return!1}function $A(n,e,t,r){return(n!==e||yi(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&w2(n,t)}function w2(n,e){return yi(e.enabled,n)!==!1&&n.isStaleByTime(iu(e.staleTime,n))}function VV(n,e){return!Mv(n.getCurrentResult(),e)}var Uo,Fo,Yn,$s,Zs,iv,Zw,N3,UV=(N3=class extends pf{constructor(t,r){super();Te(this,Zs);Te(this,Uo);Te(this,Fo);Te(this,Yn);Te(this,$s);be(this,Uo,t),this.setOptions(r),this.bindMethods(),Ve(this,Zs,iv).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=j(this,Uo).defaultMutationOptions(t),Mv(this.options,r)||j(this,Uo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,Yn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&kl(r.mutationKey)!==kl(this.options.mutationKey)?this.reset():((i=j(this,Yn))==null?void 0:i.state.status)==="pending"&&j(this,Yn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=j(this,Yn))==null||t.removeObserver(this)}onMutationUpdate(t){Ve(this,Zs,iv).call(this),Ve(this,Zs,Zw).call(this,t)}getCurrentResult(){return j(this,Fo)}reset(){var t;(t=j(this,Yn))==null||t.removeObserver(this),be(this,Yn,void 0),Ve(this,Zs,iv).call(this),Ve(this,Zs,Zw).call(this)}mutate(t,r){var i;return be(this,$s,r),(i=j(this,Yn))==null||i.removeObserver(this),be(this,Yn,j(this,Uo).getMutationCache().build(j(this,Uo),this.options)),j(this,Yn).addObserver(this),j(this,Yn).execute(t)}},Uo=new WeakMap,Fo=new WeakMap,Yn=new WeakMap,$s=new WeakMap,Zs=new WeakSet,iv=function(){var r;const t=((r=j(this,Yn))==null?void 0:r.state)??L4();be(this,Fo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Zw=function(t){nn.batch(()=>{var r,i,s,o,l,u,f,h;if(j(this,$s)&&this.hasListeners()){const m=j(this,Fo).variables,g=j(this,Fo).context;(t==null?void 0:t.type)==="success"?((i=(r=j(this,$s)).onSuccess)==null||i.call(r,t.data,m,g),(o=(s=j(this,$s)).onSettled)==null||o.call(s,t.data,null,m,g)):(t==null?void 0:t.type)==="error"&&((u=(l=j(this,$s)).onError)==null||u.call(l,t.error,m,g),(h=(f=j(this,$s)).onSettled)==null||h.call(f,void 0,t.error,m,g))}this.listeners.forEach(m=>{m(j(this,Fo))})})},N3),I4=x.createContext(void 0),S2=n=>{const e=x.useContext(I4);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},FV=({client:n,children:e})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),b.jsx(I4.Provider,{value:n,children:e})),z4=x.createContext(!1),qV=()=>x.useContext(z4);z4.Provider;function ZV(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var GV=x.createContext(ZV()),WV=()=>x.useContext(GV);function $4(n,e){return typeof n=="function"?n(...e):!!n}function Gw(){}var KV=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},QV=n=>{x.useEffect(()=>{n.clearReset()},[n])},YV=({result:n,errorResetBoundary:e,throwOnError:t,query:r})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&$4(t,[n.error,r]),XV=n=>{n.suspense&&(n.staleTime===void 0&&(n.staleTime=1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},JV=(n,e)=>n.isLoading&&n.isFetching&&!e,eU=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,HA=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function tU(n,e,t){var h,m,g,y,S;const r=S2(),i=qV(),s=WV(),o=r.defaultQueryOptions(n);(m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,o),o._optimisticResults=i?"isRestoring":"optimistic",XV(o),KV(o,s),QV(s);const l=!r.getQueryCache().get(o.queryHash),[u]=x.useState(()=>new e(r,o)),f=u.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(C=>{const k=i?Gw:u.subscribe(nn.batchCalls(C));return u.updateResult(),k},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),eU(o,f))throw HA(o,u,s);if(YV({result:f,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw f.error;if((y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||y.call(g,o,f),o.experimental_prefetchInRender&&!Cl&&JV(f,i)){const C=l?HA(o,u,s):(S=r.getQueryCache().get(o.queryHash))==null?void 0:S.promise;C==null||C.catch(Gw).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?f:u.trackResult(f)}function nU(n,e){return tU(n,$V)}function rU(n,e){const t=S2(),[r]=x.useState(()=>new UV(t,n));x.useEffect(()=>{r.setOptions(n)},[r,n]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(nn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=x.useCallback((o,l)=>{r.mutate(o,l).catch(Gw)},[r]);if(i.error&&$4(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const pl="__TSR_index",VA="popstate",UA="beforeunload";function H4(n){let e=n.getLocation();const t=new Set,r=o=>{e=n.getLocation(),t.forEach(l=>l({location:e,action:o}))},i=o=>{n.notifyOnIndexChange??!0?r(o):e=n.getLocation()},s=async({task:o,navigateOpts:l,...u})=>{var f,h;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const g=((f=n.getBlockers)==null?void 0:f.call(n))??[],y=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&g.length&&y)for(const S of g){const C=vh(u.path,u.state);if(await S.blockerFn({currentLocation:e,nextLocation:C,action:u.type})){(h=n.onBlocked)==null||h.call(n);return}}o()};return{get location(){return e},get length(){return n.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,l,u)=>{const f=e.state[pl];l=Ww(f+1,l),s({task:()=>{n.pushState(o,l),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:l})},replace:(o,l,u)=>{const f=e.state[pl];l=Ww(f,l),s({task:()=>{n.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:l})},go:(o,l)=>{s({task:()=>{n.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{s({task:()=>{n.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{n.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[pl]!==0,createHref:o=>n.createHref(o),block:o=>{var l;if(!n.setBlockers)return()=>{};const u=((l=n.getBlockers)==null?void 0:l.call(n))??[];return n.setBlockers([...u,o]),()=>{var f,h;const m=((f=n.getBlockers)==null?void 0:f.call(n))??[];(h=n.setBlockers)==null||h.call(n,m.filter(g=>g!==o))}},flush:()=>{var o;return(o=n.flush)==null?void 0:o.call(n)},destroy:()=>{var o;return(o=n.destroy)==null?void 0:o.call(n)},notify:r}}function Ww(n,e){return e||(e={}),{...e,key:oU(),[pl]:n}}function iU(n){const e=typeof document<"u"?window:void 0,t=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,o=B=>i=B,l=B=>B,u=()=>vh(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state);let f=u(),h,m=!1,g=!1,y=!1,S=!1;const C=()=>f;let k,E;const _=()=>{k&&(D._ignoreSubscribers=!0,(k.isPush?e.history.pushState:e.history.replaceState)(k.state,"",k.href),D._ignoreSubscribers=!1,k=void 0,E=void 0,h=void 0)},T=(B,P,Z)=>{const U=l(P);E||(h=f),f=vh(P,Z),k={href:U,state:Z,isPush:(k==null?void 0:k.isPush)||B==="push"},E||(E=Promise.resolve().then(()=>_()))},N=B=>{f=u(),D.notify({type:B})},A=async()=>{if(g){g=!1;return}const B=u(),P=B.state[pl]-f.state[pl],Z=P===1,U=P===-1,$=!Z&&!U||m;m=!1;const de=$?"GO":U?"BACK":"FORWARD",se=$?{type:"GO",index:P}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const ce=s();if(typeof document<"u"&&ce.length){for(const G of ce)if(await G.blockerFn({currentLocation:f,nextLocation:B,action:de})){g=!0,e.history.go(1),D.notify(se);return}}}f=u(),D.notify(se)},O=B=>{if(S){S=!1;return}let P=!1;const Z=s();if(typeof document<"u"&&Z.length)for(const U of Z){const $=U.enableBeforeUnload??!0;if($===!0){P=!0;break}if(typeof $=="function"&&$()===!0){P=!0;break}}if(P)return B.preventDefault(),B.returnValue=""},D=H4({getLocation:C,getLength:()=>e.history.length,pushState:(B,P)=>T("push",B,P),replaceState:(B,P)=>T("replace",B,P),back:B=>(B&&(y=!0),S=!0,e.history.back()),forward:B=>{B&&(y=!0),S=!0,e.history.forward()},go:B=>{m=!0,e.history.go(B)},createHref:B=>l(B),flush:_,destroy:()=>{e.history.pushState=t,e.history.replaceState=r,e.removeEventListener(UA,O,{capture:!0}),e.removeEventListener(VA,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(UA,O,{capture:!0}),e.addEventListener(VA,A),e.history.pushState=function(...B){const P=t.apply(e.history,B);return D._ignoreSubscribers||N("PUSH"),P},e.history.replaceState=function(...B){const P=r.apply(e.history,B);return D._ignoreSubscribers||N("REPLACE"),P},D}function sU(n={initialEntries:["/"]}){const e=n.initialEntries;let t=n.initialIndex?Math.min(Math.max(n.initialIndex,0),e.length-1):e.length-1;const r=e.map((s,o)=>Ww(o,void 0));return H4({getLocation:()=>vh(e[t],r[t]),getLength:()=>e.length,pushState:(s,o)=>{t{r[t]=o,e[t]=s},back:()=>{t=Math.max(t-1,0)},forward:()=>{t=Math.min(t+1,e.length-1)},go:s=>{t=Math.min(Math.max(t+s,0),e.length-1)},createHref:s=>s})}function vh(n,e){const t=n.indexOf("#"),r=n.indexOf("?");return{href:n,pathname:n.substring(0,t>0?r>0?Math.min(t,r):t:r>0?r:n.length),hash:t>-1?n.substring(t):"",search:r>-1?n.slice(r,t===-1?void 0:t):"",state:e||{[pl]:0}}}function oU(){return(Math.random()+1).toString(36).substring(7)}var aU="Invariant failed";function Er(n,e){if(!n)throw new Error(aU)}const ax=x.createContext(null);function V4(){return typeof document>"u"?ax:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ax,ax)}function Vl(n){const e=x.useContext(V4());return n==null||n.warn,e}var lx={exports:{}},cx={},ux={exports:{}},fx={};/** * @license React * use-sync-external-store-shim.production.js * @@ -30,7 +30,7 @@ var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var UA;function sU(){if(UA)return fx;UA=1;var n=Tp();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,i=n.useEffect,s=n.useLayoutEffect,o=n.useDebugValue;function l(m,g){var y=g(),S=r({inst:{value:y,getSnapshot:g}}),C=S[0].inst,k=S[1];return s(function(){C.value=y,C.getSnapshot=g,u(C)&&k({inst:C})},[m,y,g]),i(function(){return u(C)&&k({inst:C}),m(function(){u(C)&&k({inst:C})})},[m]),o(y),y}function u(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!t(m,y)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return fx.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:h,fx}var FA;function oU(){return FA||(FA=1,ux.exports=sU()),ux.exports}/** + */var FA;function lU(){if(FA)return fx;FA=1;var n=Tp();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,i=n.useEffect,s=n.useLayoutEffect,o=n.useDebugValue;function l(m,g){var y=g(),S=r({inst:{value:y,getSnapshot:g}}),C=S[0].inst,k=S[1];return s(function(){C.value=y,C.getSnapshot=g,u(C)&&k({inst:C})},[m,y,g]),i(function(){return u(C)&&k({inst:C}),m(function(){u(C)&&k({inst:C})})},[m]),o(y),y}function u(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!t(m,y)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return fx.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:h,fx}var qA;function cU(){return qA||(qA=1,ux.exports=lU()),ux.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -38,7 +38,7 @@ var Vz=Object.defineProperty;var hA=n=>{throw TypeError(n)};var Uz=(n,e,t)=>e in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var qA;function aU(){if(qA)return cx;qA=1;var n=Tp(),e=oU();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,s=n.useRef,o=n.useEffect,l=n.useMemo,u=n.useDebugValue;return cx.useSyncExternalStoreWithSelector=function(f,h,m,g,y){var S=s(null);if(S.current===null){var C={hasValue:!1,value:null};S.current=C}else C=S.current;S=l(function(){function E(O){if(!_){if(_=!0,T=O,O=g(O),y!==void 0&&C.hasValue){var D=C.value;if(y(D,O))return N=D}return N=O}if(D=N,r(T,O))return D;var B=g(O);return y!==void 0&&y(D,B)?(T=O,D):(T=O,N=B)}var _=!1,T,N,A=m===void 0?null:m;return[function(){return E(h())},A===null?void 0:function(){return E(A())}]},[h,m,g,y]);var k=i(f,S[0],S[1]);return o(function(){C.hasValue=!0,C.value=k},[k]),u(k),k},cx}var ZA;function lU(){return ZA||(ZA=1,lx.exports=aU()),lx.exports}var cU=lU();const su=new WeakMap,s0=new WeakMap,N0={current:[]};let dx=!1,Yd=0;const jd=new Set,pg=new Map;function H4(n){const e=Array.from(n).sort((t,r)=>t instanceof ou&&t.options.deps.includes(r)?1:r instanceof ou&&r.options.deps.includes(t)?-1:0);for(const t of e){if(N0.current.includes(t))continue;N0.current.push(t),t.recompute();const r=s0.get(t);if(r)for(const i of r){const s=su.get(i);s&&H4(s)}}}function uU(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function fU(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function V4(n){if(Yd>0&&!pg.has(n)&&pg.set(n,n.prevState),jd.add(n),!(Yd>0)&&!dx)try{for(dx=!0;jd.size>0;){const e=Array.from(jd);jd.clear();for(const t of e){const r=pg.get(t)??t.prevState;t.prevState=r,uU(t)}for(const t of e){const r=su.get(t);r&&(N0.current.push(t),H4(r))}for(const t of e){const r=su.get(t);if(r)for(const i of r)fU(i)}}}finally{dx=!1,N0.current=[],pg.clear()}}function hx(n){Yd++;try{n()}finally{if(Yd--,Yd===0){const e=Array.from(jd)[0];e&&V4(e)}}}class Kw{constructor(e,t){this.listeners=new Set,this.subscribe=r=>{var i,s;this.listeners.add(r);const o=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=>{this.listeners.delete(r),o==null||o()}},this.setState=r=>{var i,s,o;this.prevState=this.state,this.state=(i=this.options)!=null&&i.updateFn?this.options.updateFn(this.prevState)(r):r(this.prevState),(o=(s=this.options)==null?void 0:s.onUpdate)==null||o.call(s),V4(this)},this.prevState=e,this.state=e,this.options=t}}class ou{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const t=[],r=[];for(const i of this.options.deps)t.push(i.prevState),r.push(i.state);return this.lastSeenDepValues=r,{prevDepVals:t,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var t,r;this.prevState=this.state;const{prevDepVals:i,currDepVals:s,prevVal:o}=this.getDepVals();this.state=this.options.fn({prevDepVals:i,currDepVals:s,prevVal:o}),(r=(t=this.options).onUpdate)==null||r.call(t)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof ou&&s.checkIfRecalculationNeededDeeply();let t=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const t of this._subscriptions)t()}),this.subscribe=t=>{var r,i;this.listeners.add(t);const s=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,t,this);return()=>{this.listeners.delete(t),s==null||s()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const t of e)if(t instanceof ou)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof Kw){let r=su.get(t);r||(r=new Set,su.set(t,r)),r.add(this);let i=s0.get(this);i||(i=new Set,s0.set(this,i)),i.add(t)}}unregisterFromGraph(e=this.options.deps){for(const t of e)if(t instanceof ou)this.unregisterFromGraph(t.options.deps);else if(t instanceof Kw){const r=su.get(t);r&&r.delete(this);const i=s0.get(this);i&&i.delete(t)}}}function dU(n,e=t=>t){return cU.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,e,hU)}function hU(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;if(n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(const[r,i]of n)if(!e.has(r)||!Object.is(i,e.get(r)))return!1;return!0}if(n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(const r of n)if(!e.has(r))return!1;return!0}const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let r=0;r{e.substring(0,1)==="?"&&(e=e.substring(1));const t=mU(e);for(const r in t){const i=t[r];if(typeof i=="string")try{t[r]=n(i)}catch{}}return t}}function bU(n,e){function t(r){if(typeof r=="object"&&r!==null)try{return n(r)}catch{}else if(typeof r=="string"&&typeof e=="function")try{return e(r),n(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(s=>{const o=r[s];typeof o>"u"||o===void 0?delete r[s]:r[s]=t(o)});const i=pU(r).toString();return i?`?${i}`:""}}function Xd(n){return n[n.length-1]}function xU(n){return typeof n=="function"}function mg(n,e){return xU(n)?n(e):n}function o0(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function Fr(n,e){if(n===e)return n;const t=e,r=KA(n)&&KA(t);if(r||Ko(n)&&Ko(t)){const i=r?n:Object.keys(n),s=i.length,o=r?t:Object.keys(t),l=o.length,u=r?[]:{};let f=0;for(let h=0;h"u")return!0;const t=e.prototype;return!(!WA(t)||!t.hasOwnProperty("isPrototypeOf"))}function WA(n){return Object.prototype.toString.call(n)==="[object Object]"}function KA(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function QA(n,e){let t=Object.keys(n);return e&&(t=t.filter(r=>n[r]!==void 0)),t}function Jd(n,e,t){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(Ko(n)&&Ko(e)){const r=(t==null?void 0:t.ignoreUndefined)??!0,i=QA(n,r),s=QA(e,r);return!(t!=null&&t.partial)&&i.length!==s.length?!1:s.every(o=>Jd(n[o],e[o],t))}return Array.isArray(n)&&Array.isArray(e)?n.length!==e.length?!1:!n.some((r,i)=>!Jd(r,e[i],t)):!1}const gg=typeof window<"u"?x.useLayoutEffect:x.useEffect;function zc(n){let e,t;const r=new Promise((i,s)=>{e=i,t=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,e(i),n==null||n(i)},r.reject=i=>{r.status="rejected",t(i)},r}function px(n){const e=x.useRef({value:n,prev:null}),t=e.current.value;return n!==t&&(e.current={value:n,prev:t}),e.current.prev}function Fs(n){return Xv(n.filter(e=>e!==void 0).join("/"))}function Xv(n){return n.replace(/\/{2,}/g,"/")}function S2(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Ja(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function wU(n){return Ja(S2(n))}function SU({basepath:n,base:e,to:t,trailingSlash:r="never",caseSensitive:i}){var s,o;e=D0(n,e,i),t=D0(n,t,i);let l=Lu(e);const u=Lu(t);l.length>1&&((s=Xd(l))==null?void 0:s.value)==="/"&&l.pop(),u.forEach((h,m)=>{h.value==="/"?m?m===u.length-1&&l.push(h):l=[h]:h.value===".."?l.pop():h.value==="."||l.push(h)}),l.length>1&&(((o=Xd(l))==null?void 0:o.value)==="/"?r==="never"&&l.pop():r==="always"&&l.push({type:"pathname",value:"/"}));const f=Fs([n,...l.map(h=>h.value)]);return Xv(f)}function Lu(n){if(!n)return[];n=Xv(n);const e=[];if(n.slice(0,1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),!n)return e;const t=n.split("/").filter(Boolean);return e.push(...t.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURI(r)})),n.slice(-1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),e}function vg({path:n,params:e,leaveWildcards:t,leaveParams:r,decodeCharMap:i}){const s=Lu(n),o={};for(const[l,u]of Object.entries(e)){const f=typeof u=="string";["*","_splat"].includes(l)?o[l]=f?encodeURI(u):u:o[l]=f?CU(u,i):u}return Fs(s.map(l=>{if(l.type==="wildcard"){const u=o._splat;return t?`${l.value}${u??""}`:u}if(l.type==="param"){if(r){const u=o[l.value];return`${l.value}${u??""}`}return o[l.value.substring(1)]??"undefined"}return l.value}))}function CU(n,e){let t=encodeURIComponent(n);if(e)for(const[r,i]of e)t=t.replaceAll(r,i);return t}function yg(n,e,t){const r=kU(n,e,t);if(!(t.to&&!r))return r??{}}function D0(n,e,t=!1){const r=t?n:n.toLowerCase(),i=t?e:e.toLowerCase();switch(!0){case r==="/":return e;case i===r:return"";case e.length{for(let u=0;u=i.length-1,g=u>=s.length-1;if(h){if(h.type==="wildcard"){const y=decodeURI(Fs(i.slice(u).map(S=>S.value)));return o["*"]=y,o._splat=y,!0}if(h.type==="pathname"){if(h.value==="/"&&!(f!=null&&f.value))return!0;if(f){if(t.caseSensitive){if(h.value!==f.value)return!1}else if(h.value.toLowerCase()!==f.value.toLowerCase())return!1}}if(!f)return!1;if(h.type==="param"){if(f.value==="/")return!1;f.value.charAt(0)!=="$"&&(o[h.value.substring(1)]=decodeURIComponent(f.value))}}if(!m&&g)return o["**"]=Fs(i.slice(u+1).map(y=>y.value)),!!t.fuzzy&&(h==null?void 0:h.value)!=="/"}return!0})()?o:void 0}function Ga(n){return!!(n!=null&&n.isRedirect)}function mx(n){return!!(n!=null&&n.isRedirect)&&n.href}function C2(n){const e=n.errorComponent??Jv;return b.jsx(EU,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:t,reset:r})=>t?x.createElement(e,{error:t,reset:r}):n.children})}class EU extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Jv({error:n}){const[e,t]=x.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:e?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),e?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?b.jsx("code",{children:n.message}):null})}):null]})}function Jr(n){const e=Vl({warn:(n==null?void 0:n.router)===void 0}),t=(n==null?void 0:n.router)||e,r=x.useRef();return dU(t.__store,i=>{if(n!=null&&n.select){if(n.structuralSharing??t.options.defaultStructuralSharing){const s=Fr(r.current,n.select(i));return r.current=s,s}return n.select(i)}return i})}function vi(n){return!!(n!=null&&n.isNotFound)}function RU(n){const e=Jr({select:t=>`not-found-${t.location.pathname}-${t.status}`});return b.jsx(C2,{getResetKey:()=>e,onCatch:(t,r)=>{var i;if(vi(t))(i=n.onCatch)==null||i.call(n,t,r);else throw t},errorComponent:({error:t})=>{var r;if(vi(t))return(r=n.fallback)==null?void 0:r.call(n,t);throw t},children:n.children})}function _U(){return b.jsx("p",{children:"Not Found"})}const Ld={stringify:n=>JSON.stringify(n,function(t,r){const i=this[t],s=xg.find(o=>o.stringifyCondition(i));return s?s.stringify(i):r}),parse:n=>JSON.parse(n,function(t,r){const i=this[t];if(Ko(i)){const s=xg.find(o=>o.parseCondition(i));if(s)return s.parse(i)}return r}),encode:n=>{if(Array.isArray(n))return n.map(t=>Ld.encode(t));if(Ko(n))return Object.fromEntries(Object.entries(n).map(([t,r])=>[t,Ld.encode(r)]));const e=xg.find(t=>t.stringifyCondition(n));return e?e.stringify(n):n},decode:n=>{if(Ko(n)){const e=xg.find(t=>t.parseCondition(n));if(e)return e.parse(n)}return Array.isArray(n)?n.map(e=>Ld.decode(e)):Ko(n)?Object.fromEntries(Object.entries(n).map(([e,t])=>[e,Ld.decode(t)])):n}},bg=(n,e,t,r)=>({key:n,stringifyCondition:e,stringify:i=>({[`$${n}`]:t(i)}),parseCondition:i=>Object.hasOwn(i,`$${n}`),parse:i=>r(i[`$${n}`])}),xg=[bg("undefined",n=>n===void 0,()=>0,()=>{}),bg("date",n=>n instanceof Date,n=>n.toISOString(),n=>new Date(n)),bg("error",n=>n instanceof Error,n=>({...n,message:n.message,stack:n.stack,cause:n.cause}),n=>Object.assign(new Error(n.message),n)),bg("formData",n=>n instanceof FormData,n=>{const e={};return n.forEach((t,r)=>{const i=e[r];i!==void 0?Array.isArray(i)?i.push(t):e[r]=[i,t]:e[r]=t}),e},n=>{const e=new FormData;return Object.entries(n).forEach(([t,r])=>{Array.isArray(r)?r.forEach(i=>e.append(t,i)):e.append(t,r)}),e})],U4=["component","errorComponent","pendingComponent","notFoundComponent"];function TU(n){var e;for(const t of U4)if((e=n.options[t])!=null&&e.preload)return!0;return!1}function gx(n,e){if(n==null)return{};if("~standard"in n){const t=n["~standard"].validate(e);if(t instanceof Promise)throw new Qw("Async validation not supported");if(t.issues)throw new Qw(JSON.stringify(t.issues,void 0,2));return t.value}return"parse"in n?n.parse(e):typeof n=="function"?n(e):{}}function AU(n){return new MU(n)}class MU{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=t=>t(),this.update=t=>{var r;t.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options;this.options={...this.options,...t},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(s=>[encodeURIComponent(s),s])):void 0,(!this.basepath||t.basepath&&t.basepath!==i.basepath)&&(t.basepath===void 0||t.basepath===""||t.basepath==="/"?this.basepath="/":this.basepath=`/${wU(t.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?nU({initialEntries:[this.basepath||"/"]}):tU()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Kw(NU(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(s=>!["redirected"].includes(s.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((r=window.CSS)==null?void 0:r.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const t=this.options.notFoundRoute;t&&(t.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[t.id]=t);const r=o=>{o.forEach((l,u)=>{l.init({originalIndex:u,defaultSsr:this.options.defaultSsr});const f=this.routesById[l.id];if(Er(!f,`Duplicate routes found with id: ${String(l.id)}`),this.routesById[l.id]=l,!l.isRoot&&l.path){const m=Ja(l.fullPath);(!this.routesByPath[m]||l.fullPath.endsWith("/"))&&(this.routesByPath[m]=l)}const h=l.children;h!=null&&h.length&&r(h)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((o,l)=>{var u;if(o.isRoot||!o.path)return;const f=S2(o.fullPath),h=Lu(f);for(;h.length>1&&((u=h[0])==null?void 0:u.value)==="/";)h.shift();const m=h.map(g=>g.value==="/"?.75:g.type==="param"?.5:g.type==="wildcard"?.25:1);i.push({child:o,trimmed:f,parsed:h,index:l,scores:m})}),this.flatRoutes=i.sort((o,l)=>{const u=Math.min(o.scores.length,l.scores.length);for(let f=0;fl.parsed[f].value?1:-1;return o.index-l.index}).map((o,l)=>(o.child.rank=l,o.child))},this.subscribe=(t,r)=>{const i={eventType:t,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=t=>{this.subscribers.forEach(r=>{r.eventType===t.type&&r.fn(t)})},this.parseLocation=(t,r)=>{const i=({pathname:u,search:f,hash:h,state:m})=>{const g=this.options.parseSearch(f),y=this.options.stringifySearch(g);return{pathname:u,searchStr:y,search:Fr(t==null?void 0:t.search,g),hash:h.split("#").reverse()[0]??"",href:`${u}${y}${h}`,state:Fr(t==null?void 0:t.state,m)}},s=i(r??this.history.location),{__tempLocation:o,__tempKey:l}=s.state;if(o&&(!l||l===this.tempLocationKey)){const u=i(o);return u.state.key=s.state.key,delete u.state.__tempLocation,{...u,maskedLocation:s}}return s},this.resolvePathWithBase=(t,r)=>SU({basepath:this.basepath,base:t,to:Xv(r),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(t,r)=>{let i={};const s=Ja(t.pathname),o=h=>yg(this.basepath,s,{to:h.fullPath,caseSensitive:h.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let l=(r==null?void 0:r.to)!==void 0?this.routesByPath[r.to]:void 0;l?i=o(l):l=this.flatRoutes.find(h=>{const m=o(h);return m?(i=m,!0):!1});let u=l||this.routesById[Cr];const f=[u];for(;u.parentRoute;)u=u.parentRoute,f.unshift(u);return{matchedRoutes:f,routeParams:i,foundRoute:l}},this.cancelMatch=t=>{const r=this.getMatch(t);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var t;(t=this.state.pendingMatches)==null||t.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=t=>{const r=(s={},o)=>{var l,u,f,h,m,g;const y=s._fromLocation?this.matchRoutes(s._fromLocation,{_buildLocation:!0}):this.state.matches,S=s.from!=null?y.find(U=>yg(this.basepath,Ja(U.pathname),{to:s.from,caseSensitive:!1,fuzzy:!1})):void 0,C=(S==null?void 0:S.pathname)||this.latestLocation.pathname;Er(s.from==null||S!=null,"Could not find match for from: "+s.from);const k=(l=this.state.pendingMatches)!=null&&l.length?(u=Xd(this.state.pendingMatches))==null?void 0:u.search:((f=Xd(y))==null?void 0:f.search)||this.latestLocation.search,E=o==null?void 0:o.matchedRoutes.filter(U=>y.find($=>$.routeId===U.id));let _;if(s.to)_=this.resolvePathWithBase(C,`${s.to}`);else{const U=this.routesById[(h=E==null?void 0:E.find($=>{const de=vg({path:$.fullPath,params:(o==null?void 0:o.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Fs([this.basepath,de])===C}))==null?void 0:h.id];_=this.resolvePathWithBase(C,(U==null?void 0:U.to)??C)}const T={...(m=Xd(y))==null?void 0:m.params};let N=(s.params??!0)===!0?T:{...T,...mg(s.params,T)};Object.keys(N).length>0&&(o==null||o.matchedRoutes.map(U=>{var $;return(($=U.options.params)==null?void 0:$.stringify)??U.options.stringifyParams}).filter(Boolean).forEach(U=>{N={...N,...U(N)}})),_=vg({path:_,params:N??{},leaveWildcards:!1,leaveParams:t.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let A=k;if(t._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let U={};o==null||o.matchedRoutes.forEach($=>{try{$.options.validateSearch&&(U={...U,...gx($.options.validateSearch,{...U,...A})??{}})}catch{}}),A=U}A=(U=>{const $=(o==null?void 0:o.matchedRoutes.reduce((ce,G)=>{var ue;const ie=[];if("search"in G.options)(ue=G.options.search)!=null&&ue.middlewares&&ie.push(...G.options.search.middlewares);else if(G.options.preSearchFilters||G.options.postSearchFilters){const re=({search:L,next:te})=>{let F=L;"preSearchFilters"in G.options&&G.options.preSearchFilters&&(F=G.options.preSearchFilters.reduce((Q,X)=>X(Q),L));const H=te(F);return"postSearchFilters"in G.options&&G.options.postSearchFilters?G.options.postSearchFilters.reduce((Q,X)=>X(Q),H):H};ie.push(re)}if(t._includeValidateSearch&&G.options.validateSearch){const re=({search:L,next:te})=>{try{const F=te(L);return{...F,...gx(G.options.validateSearch,F)??{}}}catch{}};ie.push(re)}return ce.concat(ie)},[]))??[],de=({search:ce})=>s.search?s.search===!0?ce:mg(s.search,ce):{};$.push(de);const se=(ce,G)=>{if(ce>=$.length)return G;const ue=$[ce];return ue({search:G,next:re=>se(ce+1,re)})};return se(0,U)})(A),A=Fr(k,A);const D=this.options.stringifySearch(A),B=s.hash===!0?this.latestLocation.hash:s.hash?mg(s.hash,this.latestLocation.hash):void 0,P=B?`#${B}`:"";let Z=s.state===!0?this.latestLocation.state:s.state?mg(s.state,this.latestLocation.state):{};return Z=Fr(this.latestLocation.state,Z),{pathname:_,search:A,searchStr:D,state:Z,hash:B??"",href:`${_}${D}${P}`,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{var l;const u=r(s);let f=o?r(o):void 0;if(!f){let g={};const y=(l=this.options.routeMasks)==null?void 0:l.find(S=>{const C=yg(this.basepath,u.pathname,{to:S.from,caseSensitive:!1,fuzzy:!1});return C?(g=C,!0):!1});if(y){const{from:S,...C}=y;o={...o0(t,["from"]),...C,params:g},f=r(o)}}const h=this.getMatchedRoutes(u,s),m=r(s,h);if(f){const g=this.getMatchedRoutes(f,o),y=r(o,g);m.maskedLocation=y}return m};return t.mask?i(t,{...o0(t,["from"]),...t.mask}):i(t)},this.commitLocation=({viewTransition:t,ignoreBlocker:r,...i})=>{const s=()=>{i.state.key=this.latestLocation.state.key;const u=Jd(i.state,this.latestLocation.state);return delete i.state.key,u},o=this.latestLocation.href===i.href,l=this.commitLocationPromise;if(this.commitLocationPromise=zc(()=>{l==null||l.resolve()}),o&&s())this.load();else{let{maskedLocation:u,hashScrollIntoView:f,...h}=i;u&&(h={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[i.replace?"replace":"push"](h.href,h.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:l,...u}={})=>{if(l){const h=this.history.location.state.__TSR_index,m=vh(l,{__TSR_index:t?h:h+1});u.to=m.pathname,u.search=this.options.parseSearch(m.search),u.hash=m.hash.slice(1)}const f=this.buildLocation({...u,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:s,replace:t,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o})},this.navigate=({to:t,reloadDocument:r,href:i,...s})=>{if(r){i||(i=this.buildLocation({to:t,...s}).href),s.replace?window.location.replace(i):window.location.href=i;return}return this.buildAndCommitLocation({...s,href:i,to:t})},this.load=async t=>{this.latestLocation=this.parseLocation(this.latestLocation);let r,i,s;for(s=new Promise(o=>{this.startReactTransition(async()=>{var l;try{const u=this.latestLocation,f=this.state.resolvedLocation,h=f.href!==u.href,m=f.pathname!==u.pathname;this.cancelMatches();let g;hx(()=>{g=this.matchRoutes(u),this.__store.setState(y=>({...y,status:"pending",isLoading:!0,location:u,pendingMatches:g,cachedMatches:y.cachedMatches.filter(S=>!g.find(C=>C.id===S.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:f,toLocation:u,pathChanged:m,hrefChanged:h}),this.emit({type:"onBeforeLoad",fromLocation:f,toLocation:u,pathChanged:m,hrefChanged:h}),await this.loadMatches({sync:t==null?void 0:t.sync,matches:g,location:u,onReady:async()=>{this.startViewTransition(async()=>{let y,S,C;hx(()=>{this.__store.setState(k=>{const E=k.matches,_=k.pendingMatches||k.matches;return y=E.filter(T=>!_.find(N=>N.id===T.id)),S=_.filter(T=>!E.find(N=>N.id===T.id)),C=E.filter(T=>_.find(N=>N.id===T.id)),{...k,isLoading:!1,loadedAt:Date.now(),matches:_,pendingMatches:void 0,cachedMatches:[...k.cachedMatches,...y.filter(T=>T.status!=="error")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[S,"onEnter"],[C,"onStay"]].forEach(([k,E])=>{k.forEach(_=>{var T,N;(N=(T=this.looseRoutesById[_.routeId].options)[E])==null||N.call(T,_)})})})}})}catch(u){mx(u)?(r=u,this.isServer||this.navigate({...r,replace:!0,ignoreBlocker:!0})):vi(u)&&(i=u),this.__store.setState(f=>({...f,statusCode:r?r.statusCode:i?404:f.matches.some(h=>h.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=t=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;typeof r=="object"&&this.isViewTransitionTypesSupported?i={update:t,types:r.types}:i=t,document.startViewTransition(i)}else t()},this.updateMatch=(t,r)=>{var i;let s;const o=(i=this.state.pendingMatches)==null?void 0:i.find(h=>h.id===t),l=this.state.matches.find(h=>h.id===t),u=this.state.cachedMatches.find(h=>h.id===t),f=o?"pendingMatches":l?"matches":u?"cachedMatches":"";return f&&this.__store.setState(h=>{var m;return{...h,[f]:(m=h[f])==null?void 0:m.map(g=>g.id===t?s=r(g):g)}}),s},this.getMatch=t=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===t),this.loadMatches=async({location:t,matches:r,preload:i,onReady:s,updateMatch:o=this.updateMatch,sync:l})=>{let u,f=!1;const h=async()=>{f||(f=!0,await(s==null?void 0:s()))},m=y=>!!(i&&!this.state.matches.find(S=>S.id===y));!this.isServer&&!this.state.matches.length&&h();const g=(y,S)=>{var C,k,E;if(mx(S)&&!S.reloadDocument)throw S;if(Ga(S)||vi(S)){if(o(y.id,_=>({..._,status:Ga(S)?"redirected":vi(S)?"notFound":"error",isFetching:!1,error:S,beforeLoadPromise:void 0,loaderPromise:void 0})),S.routeId||(S.routeId=y.routeId),(C=y.beforeLoadPromise)==null||C.resolve(),(k=y.loaderPromise)==null||k.resolve(),(E=y.loadPromise)==null||E.resolve(),Ga(S))throw f=!0,S=this.resolveRedirect({...S,_fromLocation:t}),S;if(vi(S))throw this._handleNotFound(r,S,{updateMatch:o}),S}};try{await new Promise((y,S)=>{(async()=>{var C,k,E;try{const _=(A,O,D)=>{var B,P;const{id:Z,routeId:U}=r[A],$=this.looseRoutesById[U];if(O instanceof Promise)throw O;O.routerCode=D,u=u??A,g(this.getMatch(Z),O);try{(P=(B=$.options).onError)==null||P.call(B,O)}catch(de){O=de,g(this.getMatch(Z),O)}o(Z,de=>{var se,ce;return(se=de.beforeLoadPromise)==null||se.resolve(),(ce=de.loadPromise)==null||ce.resolve(),{...de,error:O,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[A,{id:O,routeId:D}]of r.entries()){const B=this.getMatch(O),P=(C=r[A-1])==null?void 0:C.id,Z=this.looseRoutesById[D],U=Z.options.pendingMs??this.options.defaultPendingMs,$=!!(s&&!this.isServer&&!m(O)&&(Z.options.loader||Z.options.beforeLoad)&&typeof U=="number"&&U!==1/0&&(Z.options.pendingComponent??this.options.defaultPendingComponent));let de=!0;if((B.beforeLoadPromise||B.loaderPromise)&&($&&setTimeout(()=>{try{h()}catch{}},U),await B.beforeLoadPromise,de=this.getMatch(O).status!=="success"),de){try{o(O,ne=>({...ne,loadPromise:zc(()=>{var me;(me=ne.loadPromise)==null||me.resolve()}),beforeLoadPromise:zc()}));const se=new AbortController;let ce;$&&(ce=setTimeout(()=>{try{h()}catch{}},U));const{paramsError:G,searchError:ue}=this.getMatch(O);G&&_(A,G,"PARSE_PARAMS"),ue&&_(A,ue,"VALIDATE_SEARCH");const ie=()=>P?this.getMatch(P).context:this.options.context??{};o(O,ne=>({...ne,isFetching:"beforeLoad",fetchCount:ne.fetchCount+1,abortController:se,pendingTimeout:ce,context:{...ie(),...ne.__routeContext}}));const{search:re,params:L,context:te,cause:F}=this.getMatch(O),H=m(O),Q={search:re,abortController:se,params:L,preload:H,context:te,location:t,navigate:ne=>this.navigate({...ne,_fromLocation:t}),buildLocation:this.buildLocation,cause:H?"preload":F,matches:r};let X=await((E=(k=Z.options).beforeLoad)==null?void 0:E.call(k,Q))??{};this.serializeLoaderData&&(X=this.serializeLoaderData("__beforeLoadContext",X,{router:this,match:this.getMatch(O)})),(Ga(X)||vi(X))&&_(A,X,"BEFORE_LOAD"),o(O,ne=>({...ne,__beforeLoadContext:X,context:{...ie(),...ne.__routeContext,...X},abortController:se}))}catch(se){_(A,se,"BEFORE_LOAD")}o(O,se=>{var ce;return(ce=se.beforeLoadPromise)==null||ce.resolve(),{...se,beforeLoadPromise:void 0,isFetching:!1}})}}const T=r.slice(0,u),N=[];T.forEach(({id:A,routeId:O},D)=>{N.push((async()=>{const{loaderPromise:B}=this.getMatch(A);let P=!1,Z=!1;if(B){await B;const U=this.getMatch(A);U.error&&g(U,U.error)}else{const U=N[D-1],$=this.looseRoutesById[O],de=()=>{const{params:F,loaderDeps:H,abortController:Q,context:X,cause:ne}=this.getMatch(A),me=m(A);return{params:F,deps:H,preload:!!me,parentMatchPromise:U,abortController:Q,context:X,location:t,navigate:ye=>this.navigate({...ye,_fromLocation:t}),cause:me?"preload":ne,route:$}},se=Date.now()-this.getMatch(A).updatedAt,ce=m(A),G=ce?$.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:$.options.staleTime??this.options.defaultStaleTime??0,ue=$.options.shouldReload,ie=typeof ue=="function"?ue(de()):ue;o(A,F=>({...F,loaderPromise:zc(),preload:!!ce&&!this.state.matches.find(H=>H.id===A)}));const re=async()=>{var F,H,Q,X,ne,me,ye,_e;try{const Ne=async()=>{const Xe=this.getMatch(A);Xe.minPendingPromise&&await Xe.minPendingPromise};try{this.loadRouteChunk($),o(A,ur=>({...ur,isFetching:"loader"}));let Xe=await((H=(F=$.options).loader)==null?void 0:H.call(F,de()));this.serializeLoaderData&&(Xe=this.serializeLoaderData("loaderData",Xe,{router:this,match:this.getMatch(A)})),g(this.getMatch(A),Xe),await $._lazyPromise,await Ne();const xt=(X=(Q=$.options).head)==null?void 0:X.call(Q,{matches:r,match:this.getMatch(A),params:this.getMatch(A).params,loaderData:Xe}),qe=xt==null?void 0:xt.meta,Ut=xt==null?void 0:xt.links,qn=xt==null?void 0:xt.scripts,Nn=(me=(ne=$.options).headers)==null?void 0:me.call(ne,{loaderData:Xe});o(A,ur=>({...ur,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:Xe,meta:qe,links:Ut,scripts:qn,headers:Nn}))}catch(Xe){let xt=Xe;await Ne(),g(this.getMatch(A),Xe);try{(_e=(ye=$.options).onError)==null||_e.call(ye,Xe)}catch(qe){xt=qe,g(this.getMatch(A),qe)}o(A,qe=>({...qe,error:xt,status:"error",isFetching:!1}))}await $._componentsPromise}catch(Ne){o(A,Xe=>({...Xe,loaderPromise:void 0})),g(this.getMatch(A),Ne)}},{status:L,invalid:te}=this.getMatch(A);P=L==="success"&&(te||(ie??se>G)),ce&&$.options.preload===!1||(P&&!l?(Z=!0,(async()=>{try{await re();const{loaderPromise:F,loadPromise:H}=this.getMatch(A);F==null||F.resolve(),H==null||H.resolve(),o(A,Q=>({...Q,loaderPromise:void 0}))}catch(F){mx(F)&&await this.navigate(F)}})()):(L!=="success"||P&&l)&&await re())}if(!Z){const{loaderPromise:U,loadPromise:$}=this.getMatch(A);U==null||U.resolve(),$==null||$.resolve()}return o(A,U=>({...U,isFetching:Z?U.isFetching:!1,loaderPromise:Z?U.loaderPromise:void 0,invalid:!1})),this.getMatch(A)})())}),await Promise.all(N),y()}catch(_){S(_)}})()}),await h()}catch(y){if(Ga(y)||vi(y))throw vi(y)&&!i&&await h(),y}return r},this.invalidate=t=>{const r=i=>{var s;return((s=t==null?void 0:t.filter)==null?void 0:s.call(t,i))??!0?{...i,invalid:!0,...i.status==="error"?{status:"pending",error:void 0}:{}}:i};return this.__store.setState(i=>{var s;return{...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:(s=i.pendingMatches)==null?void 0:s.map(r)}}),this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t;return r.href||(r.href=this.buildLocation(r).href),r},this.clearCache=t=>{const r=t==null?void 0:t.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(s=>!r(s))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const s=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(r.status!=="error"&&Date.now()-r.updatedAt(t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(t.options,s)}):t._lazyPromise=Promise.resolve()),t._componentsPromise===void 0&&(t._componentsPromise=t._lazyPromise.then(()=>Promise.all(U4.map(async r=>{const i=t.options[r];i!=null&&i.preload&&await i.preload()})))),t._componentsPromise),this.preloadRoute=async t=>{const r=this.buildLocation(t);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:t});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(l=>l.id)),o=new Set([...s,...this.state.cachedMatches.map(l=>l.id)]);hx(()=>{i.forEach(l=>{o.has(l.id)||this.__store.setState(u=>({...u,cachedMatches:[...u.cachedMatches,l]}))})});try{return i=await this.loadMatches({matches:i,location:r,preload:!0,updateMatch:(l,u)=>{s.has(l)?i=i.map(f=>f.id===l?u(f):f):this.updateMatch(l,u)}}),i}catch(l){if(Ga(l))return l.reloadDocument?void 0:await this.preloadRoute({...l,_fromLocation:r});console.error(l);return}},this.matchRoute=(t,r)=>{const i={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},s=this.buildLocation(i);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const l=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,u=yg(this.basepath,l.pathname,{...r,to:s.pathname});return!u||t.params&&!Jd(u,t.params,{partial:!0})?!1:u&&((r==null?void 0:r.includeSearch)??!0)?Jd(l.search,s.search,{partial:!0})?u:!1:u},this.dehydrate=()=>{var t;const r=((t=this.options.errorSerializer)==null?void 0:t.serialize)??DU;return{state:{dehydratedMatches:this.state.matches.map(i=>({...o0(i,["id","status","updatedAt"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var t,r,i;let s;typeof document<"u"&&(s=this.options.transformer.parse((t=window.__TSR__)==null?void 0:t.dehydrated)),Er(s),this.dehydratedData=s.payload,(i=(r=this.options).hydrate)==null||i.call(r,s.payload);const o=s.router.state,l=this.matchRoutes(this.state.location).map(u=>{const f=o.dehydratedMatches.find(h=>h.id===u.id);return Er(f,`Could not find a client-side match for dehydrated match with id: ${u.id}!`),{...u,...f}});this.__store.setState(u=>({...u,matches:l})),this.manifest=s.router.manifest},this.injectedHtml=[],this.injectHtml=t=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(i=>i!==r),t);this.injectedHtml.push(r)},this.injectScript=(t,r)=>{this.injectHtml(` - - - -
- - diff --git a/playground/dist/index.js b/playground/dist/index.js deleted file mode 100644 index 78e83cdd6..000000000 --- a/playground/dist/index.js +++ /dev/null @@ -1,181 +0,0 @@ -var a$=Object.defineProperty;var lR=n=>{throw TypeError(n)};var l$=(n,e,t)=>e in n?a$(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var lm=(n,e,t)=>l$(n,typeof e!="symbol"?e+"":e,t),$1=(n,e,t)=>e.has(n)||lR("Cannot "+t);var O=(n,e,t)=>($1(n,e,"read from private field"),t?t.call(n):e.get(n)),Pe=(n,e,t)=>e.has(n)?lR("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ve=(n,e,t,r)=>($1(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),We=(n,e,t)=>($1(n,e,"access private method"),t);var bd=(n,e,t,r)=>({set _(i){ve(n,e,i,t)},get _(){return O(n,e,r)}});function c$(n,e){for(var t=0;tr[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function OM(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B1={exports:{}},wd={},F1={exports:{}},rt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var cR;function u$(){if(cR)return rt;cR=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function m($){return $===null||typeof $!="object"?null:($=h&&$[h]||$["@@iterator"],typeof $=="function"?$:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function C($,I,U){this.props=$,this.context=I,this.refs=w,this.updater=U||v}C.prototype.isReactComponent={},C.prototype.setState=function($,I){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,I,"setState")},C.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function _(){}_.prototype=C.prototype;function E($,I,U){this.props=$,this.context=I,this.refs=w,this.updater=U||v}var P=E.prototype=new _;P.constructor=E,b(P,C.prototype),P.isPureReactComponent=!0;var A=Array.isArray,T=Object.prototype.hasOwnProperty,M={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function j($,I,U){var ee,J={},te=null,ae=null;if(I!=null)for(ee in I.ref!==void 0&&(ae=I.ref),I.key!==void 0&&(te=""+I.key),I)T.call(I,ee)&&!N.hasOwnProperty(ee)&&(J[ee]=I[ee]);var ye=arguments.length-2;if(ye===1)J.children=U;else if(1n.forEach(t=>h$(t,e))}function At(...n){return x.useCallback(Wv(...n),n)}function p$(n,e){const t=x.createContext(e),r=s=>{const{children:o,...a}=s,c=x.useMemo(()=>a,Object.values(a));return y.jsx(t.Provider,{value:c,children:o})};r.displayName=n+"Provider";function i(s){const o=x.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function Ei(n,e=[]){let t=[];function r(s,o){const a=x.createContext(o),c=t.length;t=[...t,o];const d=h=>{var _;const{scope:m,children:v,...b}=h,w=((_=m==null?void 0:m[n])==null?void 0:_[c])||a,C=x.useMemo(()=>b,Object.values(b));return y.jsx(w.Provider,{value:C,children:v})};d.displayName=s+"Provider";function f(h,m){var w;const v=((w=m==null?void 0:m[n])==null?void 0:w[c])||a,b=x.useContext(v);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,f]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return i.scopeName=n,[r,m$(i,...e)]}function m$(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:c,scopeName:d})=>{const h=c(s)[`__scope${d}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var z1={exports:{}},Wn={},V1={exports:{}},H1={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hR;function g$(){return hR||(hR=1,function(n){function e(G,Q){var re=G.length;G.push(Q);e:for(;0>>1,I=G[$];if(0>>1;$i(J,re))tei(ae,J)?(G[$]=ae,G[te]=re,$=te):(G[$]=J,G[ee]=re,$=ee);else if(tei(ae,re))G[$]=ae,G[te]=re,$=te;else break e}}return Q}function i(G,Q){var re=G.sortIndex-Q.sortIndex;return re!==0?re:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var c=[],d=[],f=1,h=null,m=3,v=!1,b=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(G){for(var Q=t(d);Q!==null;){if(Q.callback===null)r(d);else if(Q.startTime<=G)r(d),Q.sortIndex=Q.expirationTime,e(c,Q);else break;Q=t(d)}}function A(G){if(w=!1,P(G),!b)if(t(c)!==null)b=!0,se(T);else{var Q=t(d);Q!==null&&pe(A,Q.startTime-G)}}function T(G,Q){b=!1,w&&(w=!1,_(j),j=-1),v=!0;var re=m;try{for(P(Q),h=t(c);h!==null&&(!(h.expirationTime>Q)||G&&!H());){var $=h.callback;if(typeof $=="function"){h.callback=null,m=h.priorityLevel;var I=$(h.expirationTime<=Q);Q=n.unstable_now(),typeof I=="function"?h.callback=I:h===t(c)&&r(c),P(Q)}else r(c);h=t(c)}if(h!==null)var U=!0;else{var ee=t(d);ee!==null&&pe(A,ee.startTime-Q),U=!1}return U}finally{h=null,m=re,v=!1}}var M=!1,N=null,j=-1,L=5,Z=-1;function H(){return!(n.unstable_now()-ZG||125$?(G.sortIndex=re,e(d,G),t(c)===null&&G===t(d)&&(w?(_(j),j=-1):w=!0,pe(A,re-$))):(G.sortIndex=I,e(c,G),b||v||(b=!0,se(T))),G},n.unstable_shouldYield=H,n.unstable_wrapCallback=function(G){var Q=m;return function(){var re=m;m=Q;try{return G.apply(this,arguments)}finally{m=re}}}}(H1)),H1}var pR;function v$(){return pR||(pR=1,V1.exports=g$()),V1.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var mR;function y$(){if(mR)return Wn;mR=1;var n=Ph(),e=v$();function t(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,p=1;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function m(l){return c.call(h,l)?!0:c.call(f,l)?!1:d.test(l)?h[l]=!0:(f[l]=!0,!1)}function v(l,u,p,g){if(p!==null&&p.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return g?!1:p!==null?!p.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function b(l,u,p,g){if(u===null||typeof u>"u"||v(l,u,p,g))return!0;if(g)return!1;if(p!==null)switch(p.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function w(l,u,p,g,S,k,R){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=g,this.attributeNamespace=S,this.mustUseProperty=p,this.propertyName=l,this.type=u,this.sanitizeURL=k,this.removeEmptyString=R}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){C[l]=new w(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var u=l[0];C[u]=new w(u,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){C[l]=new w(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){C[l]=new w(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){C[l]=new w(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){C[l]=new w(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){C[l]=new w(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){C[l]=new w(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){C[l]=new w(l,5,!1,l.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function E(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){C[l]=new w(l,1,!1,l.toLowerCase(),null,!1,!1)}),C.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){C[l]=new w(l,1,!1,l.toLowerCase(),null,!0,!0)});function P(l,u,p,g){var S=C.hasOwnProperty(u)?C[u]:null;(S!==null?S.type!==0:g||!(2D||S[R]!==k[D]){var F=` -`+S[R].replace(" at new "," at ");return l.displayName&&F.includes("")&&(F=F.replace("",l.displayName)),F}while(1<=R&&0<=D);break}}}finally{U=!1,Error.prepareStackTrace=p}return(l=l?l.displayName||l.name:"")?I(l):""}function J(l){switch(l.tag){case 5:return I(l.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return l=ee(l.type,!1),l;case 11:return l=ee(l.type.render,!1),l;case 1:return l=ee(l.type,!0),l;default:return""}}function te(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case N:return"Fragment";case M:return"Portal";case L:return"Profiler";case j:return"StrictMode";case oe:return"Suspense";case ne:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case H:return(l.displayName||"Context")+".Consumer";case Z:return(l._context.displayName||"Context")+".Provider";case z:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case ce:return u=l.displayName||null,u!==null?u:te(l.type)||"Memo";case se:u=l._payload,l=l._init;try{return te(l(u))}catch{}}return null}function ae(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(u);case 8:return u===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function ye(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function Se(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Fe(l){var u=Se(l)?"checked":"value",p=Object.getOwnPropertyDescriptor(l.constructor.prototype,u),g=""+l[u];if(!l.hasOwnProperty(u)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var S=p.get,k=p.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return S.call(this)},set:function(R){g=""+R,k.call(this,R)}}),Object.defineProperty(l,u,{enumerable:p.enumerable}),{getValue:function(){return g},setValue:function(R){g=""+R},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function ct(l){l._valueTracker||(l._valueTracker=Fe(l))}function wt(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var p=u.getValue(),g="";return l&&(g=Se(l)?l.checked?"true":"false":l.value),l=g,l!==p?(u.setValue(l),!0):!1}function Xe(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Vt(l,u){var p=u.checked;return re({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??l._wrapperState.initialChecked})}function Rr(l,u){var p=u.defaultValue==null?"":u.defaultValue,g=u.checked!=null?u.checked:u.defaultChecked;p=ye(u.value!=null?u.value:p),l._wrapperState={initialChecked:g,initialValue:p,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Xr(l,u){u=u.checked,u!=null&&P(l,"checked",u,!1)}function or(l,u){Xr(l,u);var p=ye(u.value),g=u.type;if(p!=null)g==="number"?(p===0&&l.value===""||l.value!=p)&&(l.value=""+p):l.value!==""+p&&(l.value=""+p);else if(g==="submit"||g==="reset"){l.removeAttribute("value");return}u.hasOwnProperty("value")?ei(l,u.type,p):u.hasOwnProperty("defaultValue")&&ei(l,u.type,ye(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(l.defaultChecked=!!u.defaultChecked)}function qt(l,u,p){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var g=u.type;if(!(g!=="submit"&&g!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+l._wrapperState.initialValue,p||u===l.value||(l.value=u),l.defaultValue=u}p=l.name,p!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,p!==""&&(l.name=p)}function ei(l,u,p){(u!=="number"||Xe(l.ownerDocument)!==l)&&(p==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+p&&(l.defaultValue=""+p))}var ea=Array.isArray;function Pr(l,u,p,g){if(l=l.options,u){u={};for(var S=0;S"+u.valueOf().toString()+"",u=ep.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;u.firstChild;)l.appendChild(u.firstChild)}});function Iu(l,u){if(u){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=u;return}}l.textContent=u}var Lu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},d6=["Webkit","ms","Moz","O"];Object.keys(Lu).forEach(function(l){d6.forEach(function(u){u=u+l.charAt(0).toUpperCase()+l.substring(1),Lu[u]=Lu[l]})});function C2(l,u,p){return u==null||typeof u=="boolean"||u===""?"":p||typeof u!="number"||u===0||Lu.hasOwnProperty(l)&&Lu[l]?(""+u).trim():u+"px"}function k2(l,u){l=l.style;for(var p in u)if(u.hasOwnProperty(p)){var g=p.indexOf("--")===0,S=C2(p,u[p],g);p==="float"&&(p="cssFloat"),g?l.setProperty(p,S):l[p]=S}}var f6=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Qy(l,u){if(u){if(f6[l]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(t(137,l));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(t(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(t(61))}if(u.style!=null&&typeof u.style!="object")throw Error(t(62))}}function Jy(l,u){if(l.indexOf("-")===-1)return typeof u.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yy=null;function Xy(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var e0=null,Sl=null,Cl=null;function _2(l){if(l=sd(l)){if(typeof e0!="function")throw Error(t(280));var u=l.stateNode;u&&(u=Cp(u),e0(l.stateNode,l.type,u))}}function E2(l){Sl?Cl?Cl.push(l):Cl=[l]:Sl=l}function R2(){if(Sl){var l=Sl,u=Cl;if(Cl=Sl=null,_2(l),u)for(l=0;l>>=0,l===0?32:31-(C6(l)/k6|0)|0}var sp=64,op=4194304;function zu(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function ap(l,u){var p=l.pendingLanes;if(p===0)return 0;var g=0,S=l.suspendedLanes,k=l.pingedLanes,R=p&268435455;if(R!==0){var D=R&~S;D!==0?g=zu(D):(k&=R,k!==0&&(g=zu(k)))}else R=p&~S,R!==0?g=zu(R):k!==0&&(g=zu(k));if(g===0)return 0;if(u!==0&&u!==g&&!(u&S)&&(S=g&-g,k=u&-u,S>=k||S===16&&(k&4194240)!==0))return u;if(g&4&&(g|=p&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=g;0p;p++)u.push(l);return u}function Vu(l,u,p){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-ti(u),l[u]=p}function P6(l,u){var p=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var g=l.eventTimes;for(l=l.expirationTimes;0=Qu),t_=" ",n_=!1;function r_(l,u){switch(l){case"keyup":return n7.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function i_(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var El=!1;function i7(l,u){switch(l){case"compositionend":return i_(u);case"keypress":return u.which!==32?null:(n_=!0,t_);case"textInput":return l=u.data,l===t_&&n_?null:l;default:return null}}function s7(l,u){if(El)return l==="compositionend"||!y0&&r_(l,u)?(l=G2(),fp=f0=Fs=null,El=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-l};l=g}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=d_(p)}}function h_(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?h_(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function p_(){for(var l=window,u=Xe();u instanceof l.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)l=u.contentWindow;else break;u=Xe(l.document)}return u}function w0(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}function p7(l){var u=p_(),p=l.focusedElem,g=l.selectionRange;if(u!==p&&p&&p.ownerDocument&&h_(p.ownerDocument.documentElement,p)){if(g!==null&&w0(p)){if(u=g.start,l=g.end,l===void 0&&(l=u),"selectionStart"in p)p.selectionStart=u,p.selectionEnd=Math.min(l,p.value.length);else if(l=(u=p.ownerDocument||document)&&u.defaultView||window,l.getSelection){l=l.getSelection();var S=p.textContent.length,k=Math.min(g.start,S);g=g.end===void 0?k:Math.min(g.end,S),!l.extend&&k>g&&(S=g,g=k,k=S),S=f_(p,k);var R=f_(p,g);S&&R&&(l.rangeCount!==1||l.anchorNode!==S.node||l.anchorOffset!==S.offset||l.focusNode!==R.node||l.focusOffset!==R.offset)&&(u=u.createRange(),u.setStart(S.node,S.offset),l.removeAllRanges(),k>g?(l.addRange(u),l.extend(R.node,R.offset)):(u.setEnd(R.node,R.offset),l.addRange(u)))}}for(u=[],l=p;l=l.parentNode;)l.nodeType===1&&u.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p=document.documentMode,Rl=null,S0=null,ed=null,C0=!1;function m_(l,u,p){var g=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;C0||Rl==null||Rl!==Xe(g)||(g=Rl,"selectionStart"in g&&w0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ed&&Xu(ed,g)||(ed=g,g=bp(S0,"onSelect"),0Nl||(l.current=D0[Nl],D0[Nl]=null,Nl--)}function St(l,u){Nl++,D0[Nl]=l.current,l.current=u}var Us={},hn=Hs(Us),Fn=Hs(!1),ra=Us;function Ol(l,u){var p=l.type.contextTypes;if(!p)return Us;var g=l.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===u)return g.__reactInternalMemoizedMaskedChildContext;var S={},k;for(k in p)S[k]=u[k];return g&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=S),S}function zn(l){return l=l.childContextTypes,l!=null}function kp(){Et(Fn),Et(hn)}function A_(l,u,p){if(hn.current!==Us)throw Error(t(168));St(hn,u),St(Fn,p)}function M_(l,u,p){var g=l.stateNode;if(u=u.childContextTypes,typeof g.getChildContext!="function")return p;g=g.getChildContext();for(var S in g)if(!(S in u))throw Error(t(108,ae(l)||"Unknown",S));return re({},p,g)}function _p(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Us,ra=hn.current,St(hn,l),St(Fn,Fn.current),!0}function N_(l,u,p){var g=l.stateNode;if(!g)throw Error(t(169));p?(l=M_(l,u,ra),g.__reactInternalMemoizedMergedChildContext=l,Et(Fn),Et(hn),St(hn,l)):Et(Fn),St(Fn,p)}var cs=null,Ep=!1,I0=!1;function O_(l){cs===null?cs=[l]:cs.push(l)}function E7(l){Ep=!0,O_(l)}function Ws(){if(!I0&&cs!==null){I0=!0;var l=0,u=vt;try{var p=cs;for(vt=1;l>=R,S-=R,us=1<<32-ti(u)+S|p<Ke?(en=Be,Be=null):en=Be.sibling;var pt=ue(q,Be,K[Ke],ge);if(pt===null){Be===null&&(Be=en);break}l&&Be&&pt.alternate===null&&u(q,Be),V=k(pt,V,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt,Be=en}if(Ke===K.length)return p(q,Be),Mt&&sa(q,Ke),je;if(Be===null){for(;KeKe?(en=Be,Be=null):en=Be.sibling;var eo=ue(q,Be,pt.value,ge);if(eo===null){Be===null&&(Be=en);break}l&&Be&&eo.alternate===null&&u(q,Be),V=k(eo,V,Ke),$e===null?je=eo:$e.sibling=eo,$e=eo,Be=en}if(pt.done)return p(q,Be),Mt&&sa(q,Ke),je;if(Be===null){for(;!pt.done;Ke++,pt=K.next())pt=fe(q,pt.value,ge),pt!==null&&(V=k(pt,V,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt);return Mt&&sa(q,Ke),je}for(Be=g(q,Be);!pt.done;Ke++,pt=K.next())pt=ke(Be,q,Ke,pt.value,ge),pt!==null&&(l&&pt.alternate!==null&&Be.delete(pt.key===null?Ke:pt.key),V=k(pt,V,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt);return l&&Be.forEach(function(o$){return u(q,o$)}),Mt&&sa(q,Ke),je}function Bt(q,V,K,ge){if(typeof K=="object"&&K!==null&&K.type===N&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case T:e:{for(var je=K.key,$e=V;$e!==null;){if($e.key===je){if(je=K.type,je===N){if($e.tag===7){p(q,$e.sibling),V=S($e,K.props.children),V.return=q,q=V;break e}}else if($e.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===se&&B_(je)===$e.type){p(q,$e.sibling),V=S($e,K.props),V.ref=od(q,$e,K),V.return=q,q=V;break e}p(q,$e);break}else u(q,$e);$e=$e.sibling}K.type===N?(V=ha(K.props.children,q.mode,ge,K.key),V.return=q,q=V):(ge=em(K.type,K.key,K.props,null,q.mode,ge),ge.ref=od(q,V,K),ge.return=q,q=ge)}return R(q);case M:e:{for($e=K.key;V!==null;){if(V.key===$e)if(V.tag===4&&V.stateNode.containerInfo===K.containerInfo&&V.stateNode.implementation===K.implementation){p(q,V.sibling),V=S(V,K.children||[]),V.return=q,q=V;break e}else{p(q,V);break}else u(q,V);V=V.sibling}V=O1(K,q.mode,ge),V.return=q,q=V}return R(q);case se:return $e=K._init,Bt(q,V,$e(K._payload),ge)}if(ea(K))return Ne(q,V,K,ge);if(Q(K))return Oe(q,V,K,ge);Ap(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,V!==null&&V.tag===6?(p(q,V.sibling),V=S(V,K),V.return=q,q=V):(p(q,V),V=N1(K,q.mode,ge),V.return=q,q=V),R(q)):p(q,V)}return Bt}var Ll=F_(!0),z_=F_(!1),Mp=Hs(null),Np=null,$l=null,V0=null;function H0(){V0=$l=Np=null}function U0(l){var u=Mp.current;Et(Mp),l._currentValue=u}function W0(l,u,p){for(;l!==null;){var g=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),l===p)break;l=l.return}}function Bl(l,u){Np=l,V0=$l=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&u&&(Vn=!0),l.firstContext=null)}function Mr(l){var u=l._currentValue;if(V0!==l)if(l={context:l,memoizedValue:u,next:null},$l===null){if(Np===null)throw Error(t(308));$l=l,Np.dependencies={lanes:0,firstContext:l}}else $l=$l.next=l;return u}var oa=null;function q0(l){oa===null?oa=[l]:oa.push(l)}function V_(l,u,p,g){var S=u.interleaved;return S===null?(p.next=p,q0(u)):(p.next=S.next,S.next=p),u.interleaved=p,fs(l,g)}function fs(l,u){l.lanes|=u;var p=l.alternate;for(p!==null&&(p.lanes|=u),p=l,l=l.return;l!==null;)l.childLanes|=u,p=l.alternate,p!==null&&(p.childLanes|=u),p=l,l=l.return;return p.tag===3?p.stateNode:null}var qs=!1;function Z0(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function H_(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function hs(l,u){return{eventTime:l,lane:u,tag:0,payload:null,callback:null,next:null}}function Zs(l,u,p){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,ft&2){var S=g.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),g.pending=u,fs(l,p)}return S=g.interleaved,S===null?(u.next=u,q0(g)):(u.next=S.next,S.next=u),g.interleaved=u,fs(l,p)}function Op(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194240)!==0)){var g=u.lanes;g&=l.pendingLanes,p|=g,u.lanes=p,a0(l,p)}}function U_(l,u){var p=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,p===g)){var S=null,k=null;if(p=p.firstBaseUpdate,p!==null){do{var R={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};k===null?S=k=R:k=k.next=R,p=p.next}while(p!==null);k===null?S=k=u:k=k.next=u}else S=k=u;p={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:k,shared:g.shared,effects:g.effects},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}function jp(l,u,p,g){var S=l.updateQueue;qs=!1;var k=S.firstBaseUpdate,R=S.lastBaseUpdate,D=S.shared.pending;if(D!==null){S.shared.pending=null;var F=D,Y=F.next;F.next=null,R===null?k=Y:R.next=Y,R=F;var de=l.alternate;de!==null&&(de=de.updateQueue,D=de.lastBaseUpdate,D!==R&&(D===null?de.firstBaseUpdate=Y:D.next=Y,de.lastBaseUpdate=F))}if(k!==null){var fe=S.baseState;R=0,de=Y=F=null,D=k;do{var ue=D.lane,ke=D.eventTime;if((g&ue)===ue){de!==null&&(de=de.next={eventTime:ke,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ne=l,Oe=D;switch(ue=u,ke=p,Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){fe=Ne.call(ke,fe,ue);break e}fe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,ue=typeof Ne=="function"?Ne.call(ke,fe,ue):Ne,ue==null)break e;fe=re({},fe,ue);break e;case 2:qs=!0}}D.callback!==null&&D.lane!==0&&(l.flags|=64,ue=S.effects,ue===null?S.effects=[D]:ue.push(D))}else ke={eventTime:ke,lane:ue,tag:D.tag,payload:D.payload,callback:D.callback,next:null},de===null?(Y=de=ke,F=fe):de=de.next=ke,R|=ue;if(D=D.next,D===null){if(D=S.shared.pending,D===null)break;ue=D,D=ue.next,ue.next=null,S.lastBaseUpdate=ue,S.shared.pending=null}}while(!0);if(de===null&&(F=fe),S.baseState=F,S.firstBaseUpdate=Y,S.lastBaseUpdate=de,u=S.shared.interleaved,u!==null){S=u;do R|=S.lane,S=S.next;while(S!==u)}else k===null&&(S.shared.lanes=0);ca|=R,l.lanes=R,l.memoizedState=fe}}function W_(l,u,p){if(l=u.effects,u.effects=null,l!==null)for(u=0;up?p:4,l(!0);var g=Y0.transition;Y0.transition={};try{l(!1),u()}finally{vt=p,Y0.transition=g}}function uE(){return Nr().memoizedState}function A7(l,u,p){var g=Js(l);if(p={lane:g,action:p,hasEagerState:!1,eagerState:null,next:null},dE(l))fE(u,p);else if(p=V_(l,u,p,g),p!==null){var S=En();ai(p,l,g,S),hE(p,u,g)}}function M7(l,u,p){var g=Js(l),S={lane:g,action:p,hasEagerState:!1,eagerState:null,next:null};if(dE(l))fE(u,S);else{var k=l.alternate;if(l.lanes===0&&(k===null||k.lanes===0)&&(k=u.lastRenderedReducer,k!==null))try{var R=u.lastRenderedState,D=k(R,p);if(S.hasEagerState=!0,S.eagerState=D,ni(D,R)){var F=u.interleaved;F===null?(S.next=S,q0(u)):(S.next=F.next,F.next=S),u.interleaved=S;return}}catch{}finally{}p=V_(l,u,S,g),p!==null&&(S=En(),ai(p,l,g,S),hE(p,u,g))}}function dE(l){var u=l.alternate;return l===jt||u!==null&&u===jt}function fE(l,u){ud=Lp=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function hE(l,u,p){if(p&4194240){var g=u.lanes;g&=l.pendingLanes,p|=g,u.lanes=p,a0(l,p)}}var Fp={readContext:Mr,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},N7={readContext:Mr,useCallback:function(l,u){return Oi().memoizedState=[l,u===void 0?null:u],l},useContext:Mr,useEffect:nE,useImperativeHandle:function(l,u,p){return p=p!=null?p.concat([l]):null,$p(4194308,4,sE.bind(null,u,l),p)},useLayoutEffect:function(l,u){return $p(4194308,4,l,u)},useInsertionEffect:function(l,u){return $p(4,2,l,u)},useMemo:function(l,u){var p=Oi();return u=u===void 0?null:u,l=l(),p.memoizedState=[l,u],l},useReducer:function(l,u,p){var g=Oi();return u=p!==void 0?p(u):u,g.memoizedState=g.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},g.queue=l,l=l.dispatch=A7.bind(null,jt,l),[g.memoizedState,l]},useRef:function(l){var u=Oi();return l={current:l},u.memoizedState=l},useState:eE,useDebugValue:s1,useDeferredValue:function(l){return Oi().memoizedState=l},useTransition:function(){var l=eE(!1),u=l[0];return l=T7.bind(null,l[1]),Oi().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,p){var g=jt,S=Oi();if(Mt){if(p===void 0)throw Error(t(407));p=p()}else{if(p=u(),Xt===null)throw Error(t(349));la&30||G_(g,u,p)}S.memoizedState=p;var k={value:p,getSnapshot:u};return S.queue=k,nE(J_.bind(null,g,k,l),[l]),g.flags|=2048,hd(9,Q_.bind(null,g,k,p,u),void 0,null),p},useId:function(){var l=Oi(),u=Xt.identifierPrefix;if(Mt){var p=ds,g=us;p=(g&~(1<<32-ti(g)-1)).toString(32)+p,u=":"+u+"R"+p,p=dd++,0<\/script>",l=l.removeChild(l.firstChild)):typeof g.is=="string"?l=R.createElement(p,{is:g.is}):(l=R.createElement(p),p==="select"&&(R=l,g.multiple?R.multiple=!0:g.size&&(R.size=g.size))):l=R.createElementNS(l,p),l[Mi]=u,l[id]=g,OE(l,u,!1,!1),u.stateNode=l;e:{switch(R=Jy(p,g),p){case"dialog":_t("cancel",l),_t("close",l),S=g;break;case"iframe":case"object":case"embed":_t("load",l),S=g;break;case"video":case"audio":for(S=0;SUl&&(u.flags|=128,g=!0,pd(k,!1),u.lanes=4194304)}else{if(!g)if(l=Dp(R),l!==null){if(u.flags|=128,g=!0,p=l.updateQueue,p!==null&&(u.updateQueue=p,u.flags|=4),pd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!R.alternate&&!Mt)return mn(u),null}else 2*$t()-k.renderingStartTime>Ul&&p!==1073741824&&(u.flags|=128,g=!0,pd(k,!1),u.lanes=4194304);k.isBackwards?(R.sibling=u.child,u.child=R):(p=k.last,p!==null?p.sibling=R:u.child=R,k.last=R)}return k.tail!==null?(u=k.tail,k.rendering=u,k.tail=u.sibling,k.renderingStartTime=$t(),u.sibling=null,p=Ot.current,St(Ot,g?p&1|2:p&1),u):(mn(u),null);case 22:case 23:return T1(),g=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==g&&(u.flags|=8192),g&&u.mode&1?ur&1073741824&&(mn(u),u.subtreeFlags&6&&(u.flags|=8192)):mn(u),null;case 24:return null;case 25:return null}throw Error(t(156,u.tag))}function F7(l,u){switch($0(u),u.tag){case 1:return zn(u.type)&&kp(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Fl(),Et(Fn),Et(hn),J0(),l=u.flags,l&65536&&!(l&128)?(u.flags=l&-65537|128,u):null;case 5:return G0(u),null;case 13:if(Et(Ot),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(t(340));Il()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Et(Ot),null;case 4:return Fl(),null;case 10:return U0(u.type._context),null;case 22:case 23:return T1(),null;case 24:return null;default:return null}}var Up=!1,gn=!1,z7=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function Vl(l,u){var p=l.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(g){It(l,u,g)}else p.current=null}function v1(l,u,p){try{p()}catch(g){It(l,u,g)}}var IE=!1;function V7(l,u){if(T0=up,l=p_(),w0(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var g=p.getSelection&&p.getSelection();if(g&&g.rangeCount!==0){p=g.anchorNode;var S=g.anchorOffset,k=g.focusNode;g=g.focusOffset;try{p.nodeType,k.nodeType}catch{p=null;break e}var R=0,D=-1,F=-1,Y=0,de=0,fe=l,ue=null;t:for(;;){for(var ke;fe!==p||S!==0&&fe.nodeType!==3||(D=R+S),fe!==k||g!==0&&fe.nodeType!==3||(F=R+g),fe.nodeType===3&&(R+=fe.nodeValue.length),(ke=fe.firstChild)!==null;)ue=fe,fe=ke;for(;;){if(fe===l)break t;if(ue===p&&++Y===S&&(D=R),ue===k&&++de===g&&(F=R),(ke=fe.nextSibling)!==null)break;fe=ue,ue=fe.parentNode}fe=ke}p=D===-1||F===-1?null:{start:D,end:F}}else p=null}p=p||{start:0,end:0}}else p=null;for(A0={focusedElem:l,selectionRange:p},up=!1,Ae=u;Ae!==null;)if(u=Ae,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,Ae=l;else for(;Ae!==null;){u=Ae;try{var Ne=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Oe=Ne.memoizedProps,Bt=Ne.memoizedState,q=u.stateNode,V=q.getSnapshotBeforeUpdate(u.elementType===u.type?Oe:ii(u.type,Oe),Bt);q.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var K=u.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(ge){It(u,u.return,ge)}if(l=u.sibling,l!==null){l.return=u.return,Ae=l;break}Ae=u.return}return Ne=IE,IE=!1,Ne}function md(l,u,p){var g=u.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var S=g=g.next;do{if((S.tag&l)===l){var k=S.destroy;S.destroy=void 0,k!==void 0&&v1(u,p,k)}S=S.next}while(S!==g)}}function Wp(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&l)===l){var g=p.create;p.destroy=g()}p=p.next}while(p!==u)}}function y1(l){var u=l.ref;if(u!==null){var p=l.stateNode;switch(l.tag){case 5:l=p;break;default:l=p}typeof u=="function"?u(l):u.current=l}}function LE(l){var u=l.alternate;u!==null&&(l.alternate=null,LE(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&(delete u[Mi],delete u[id],delete u[j0],delete u[k7],delete u[_7])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function $E(l){return l.tag===5||l.tag===3||l.tag===4}function BE(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||$E(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function x1(l,u,p){var g=l.tag;if(g===5||g===6)l=l.stateNode,u?p.nodeType===8?p.parentNode.insertBefore(l,u):p.insertBefore(l,u):(p.nodeType===8?(u=p.parentNode,u.insertBefore(l,p)):(u=p,u.appendChild(l)),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=Sp));else if(g!==4&&(l=l.child,l!==null))for(x1(l,u,p),l=l.sibling;l!==null;)x1(l,u,p),l=l.sibling}function b1(l,u,p){var g=l.tag;if(g===5||g===6)l=l.stateNode,u?p.insertBefore(l,u):p.appendChild(l);else if(g!==4&&(l=l.child,l!==null))for(b1(l,u,p),l=l.sibling;l!==null;)b1(l,u,p),l=l.sibling}var sn=null,si=!1;function Ks(l,u,p){for(p=p.child;p!==null;)FE(l,u,p),p=p.sibling}function FE(l,u,p){if(Ai&&typeof Ai.onCommitFiberUnmount=="function")try{Ai.onCommitFiberUnmount(ip,p)}catch{}switch(p.tag){case 5:gn||Vl(p,u);case 6:var g=sn,S=si;sn=null,Ks(l,u,p),sn=g,si=S,sn!==null&&(si?(l=sn,p=p.stateNode,l.nodeType===8?l.parentNode.removeChild(p):l.removeChild(p)):sn.removeChild(p.stateNode));break;case 18:sn!==null&&(si?(l=sn,p=p.stateNode,l.nodeType===8?O0(l.parentNode,p):l.nodeType===1&&O0(l,p),Zu(l)):O0(sn,p.stateNode));break;case 4:g=sn,S=si,sn=p.stateNode.containerInfo,si=!0,Ks(l,u,p),sn=g,si=S;break;case 0:case 11:case 14:case 15:if(!gn&&(g=p.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){S=g=g.next;do{var k=S,R=k.destroy;k=k.tag,R!==void 0&&(k&2||k&4)&&v1(p,u,R),S=S.next}while(S!==g)}Ks(l,u,p);break;case 1:if(!gn&&(Vl(p,u),g=p.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=p.memoizedProps,g.state=p.memoizedState,g.componentWillUnmount()}catch(D){It(p,u,D)}Ks(l,u,p);break;case 21:Ks(l,u,p);break;case 22:p.mode&1?(gn=(g=gn)||p.memoizedState!==null,Ks(l,u,p),gn=g):Ks(l,u,p);break;default:Ks(l,u,p)}}function zE(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var p=l.stateNode;p===null&&(p=l.stateNode=new z7),u.forEach(function(g){var S=J7.bind(null,l,g);p.has(g)||(p.add(g),g.then(S,S))})}}function oi(l,u){var p=u.deletions;if(p!==null)for(var g=0;gS&&(S=R),g&=~k}if(g=S,g=$t()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*U7(g/1960))-g,10l?16:l,Qs===null)var g=!1;else{if(l=Qs,Qs=null,Qp=0,ft&6)throw Error(t(331));var S=ft;for(ft|=4,Ae=l.current;Ae!==null;){var k=Ae,R=k.child;if(Ae.flags&16){var D=k.deletions;if(D!==null){for(var F=0;F$t()-C1?da(l,0):S1|=p),Un(l,u)}function eR(l,u){u===0&&(l.mode&1?(u=op,op<<=1,!(op&130023424)&&(op=4194304)):u=1);var p=En();l=fs(l,u),l!==null&&(Vu(l,u,p),Un(l,p))}function Q7(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),eR(l,p)}function J7(l,u){var p=0;switch(l.tag){case 13:var g=l.stateNode,S=l.memoizedState;S!==null&&(p=S.retryLane);break;case 19:g=l.stateNode;break;default:throw Error(t(314))}g!==null&&g.delete(u),eR(l,p)}var tR;tR=function(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps||Fn.current)Vn=!0;else{if(!(l.lanes&p)&&!(u.flags&128))return Vn=!1,$7(l,u,p);Vn=!!(l.flags&131072)}else Vn=!1,Mt&&u.flags&1048576&&j_(u,Pp,u.index);switch(u.lanes=0,u.tag){case 2:var g=u.type;Hp(l,u),l=u.pendingProps;var S=Ol(u,hn.current);Bl(u,p),S=e1(null,u,g,l,S,p);var k=t1();return u.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,zn(g)?(k=!0,_p(u)):k=!1,u.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,Z0(u),S.updater=zp,u.stateNode=S,S._reactInternals=u,a1(u,g,l,p),u=d1(null,u,g,!0,k,p)):(u.tag=0,Mt&&k&&L0(u),_n(null,u,S,p),u=u.child),u;case 16:g=u.elementType;e:{switch(Hp(l,u),l=u.pendingProps,S=g._init,g=S(g._payload),u.type=g,S=u.tag=X7(g),l=ii(g,l),S){case 0:u=u1(null,u,g,l,p);break e;case 1:u=RE(null,u,g,l,p);break e;case 11:u=SE(null,u,g,l,p);break e;case 14:u=CE(null,u,g,ii(g.type,l),p);break e}throw Error(t(306,g,""))}return u;case 0:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),u1(l,u,g,S,p);case 1:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),RE(l,u,g,S,p);case 3:e:{if(PE(u),l===null)throw Error(t(387));g=u.pendingProps,k=u.memoizedState,S=k.element,H_(l,u),jp(u,g,null,p);var R=u.memoizedState;if(g=R.element,k.isDehydrated)if(k={element:g,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},u.updateQueue.baseState=k,u.memoizedState=k,u.flags&256){S=zl(Error(t(423)),u),u=TE(l,u,g,p,S);break e}else if(g!==S){S=zl(Error(t(424)),u),u=TE(l,u,g,p,S);break e}else for(cr=Vs(u.stateNode.containerInfo.firstChild),lr=u,Mt=!0,ri=null,p=z_(u,null,g,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Il(),g===S){u=ps(l,u,p);break e}_n(l,u,g,p)}u=u.child}return u;case 5:return q_(u),l===null&&F0(u),g=u.type,S=u.pendingProps,k=l!==null?l.memoizedProps:null,R=S.children,M0(g,S)?R=null:k!==null&&M0(g,k)&&(u.flags|=32),EE(l,u),_n(l,u,R,p),u.child;case 6:return l===null&&F0(u),null;case 13:return AE(l,u,p);case 4:return K0(u,u.stateNode.containerInfo),g=u.pendingProps,l===null?u.child=Ll(u,null,g,p):_n(l,u,g,p),u.child;case 11:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),SE(l,u,g,S,p);case 7:return _n(l,u,u.pendingProps,p),u.child;case 8:return _n(l,u,u.pendingProps.children,p),u.child;case 12:return _n(l,u,u.pendingProps.children,p),u.child;case 10:e:{if(g=u.type._context,S=u.pendingProps,k=u.memoizedProps,R=S.value,St(Mp,g._currentValue),g._currentValue=R,k!==null)if(ni(k.value,R)){if(k.children===S.children&&!Fn.current){u=ps(l,u,p);break e}}else for(k=u.child,k!==null&&(k.return=u);k!==null;){var D=k.dependencies;if(D!==null){R=k.child;for(var F=D.firstContext;F!==null;){if(F.context===g){if(k.tag===1){F=hs(-1,p&-p),F.tag=2;var Y=k.updateQueue;if(Y!==null){Y=Y.shared;var de=Y.pending;de===null?F.next=F:(F.next=de.next,de.next=F),Y.pending=F}}k.lanes|=p,F=k.alternate,F!==null&&(F.lanes|=p),W0(k.return,p,u),D.lanes|=p;break}F=F.next}}else if(k.tag===10)R=k.type===u.type?null:k.child;else if(k.tag===18){if(R=k.return,R===null)throw Error(t(341));R.lanes|=p,D=R.alternate,D!==null&&(D.lanes|=p),W0(R,p,u),R=k.sibling}else R=k.child;if(R!==null)R.return=k;else for(R=k;R!==null;){if(R===u){R=null;break}if(k=R.sibling,k!==null){k.return=R.return,R=k;break}R=R.return}k=R}_n(l,u,S.children,p),u=u.child}return u;case 9:return S=u.type,g=u.pendingProps.children,Bl(u,p),S=Mr(S),g=g(S),u.flags|=1,_n(l,u,g,p),u.child;case 14:return g=u.type,S=ii(g,u.pendingProps),S=ii(g.type,S),CE(l,u,g,S,p);case 15:return kE(l,u,u.type,u.pendingProps,p);case 17:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),Hp(l,u),u.tag=1,zn(g)?(l=!0,_p(u)):l=!1,Bl(u,p),mE(u,g,S),a1(u,g,S,p),d1(null,u,g,!0,l,p);case 19:return NE(l,u,p);case 22:return _E(l,u,p)}throw Error(t(156,u.tag))};function nR(l,u){return D2(l,u)}function Y7(l,u,p,g){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(l,u,p,g){return new Y7(l,u,p,g)}function M1(l){return l=l.prototype,!(!l||!l.isReactComponent)}function X7(l){if(typeof l=="function")return M1(l)?1:0;if(l!=null){if(l=l.$$typeof,l===z)return 11;if(l===ce)return 14}return 2}function Xs(l,u){var p=l.alternate;return p===null?(p=jr(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&14680064,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p}function em(l,u,p,g,S,k){var R=2;if(g=l,typeof l=="function")M1(l)&&(R=1);else if(typeof l=="string")R=5;else e:switch(l){case N:return ha(p.children,S,k,u);case j:R=8,S|=8;break;case L:return l=jr(12,p,u,S|2),l.elementType=L,l.lanes=k,l;case oe:return l=jr(13,p,u,S),l.elementType=oe,l.lanes=k,l;case ne:return l=jr(19,p,u,S),l.elementType=ne,l.lanes=k,l;case pe:return tm(p,S,k,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Z:R=10;break e;case H:R=9;break e;case z:R=11;break e;case ce:R=14;break e;case se:R=16,g=null;break e}throw Error(t(130,l==null?l:typeof l,""))}return u=jr(R,p,u,S),u.elementType=l,u.type=g,u.lanes=k,u}function ha(l,u,p,g){return l=jr(7,l,g,u),l.lanes=p,l}function tm(l,u,p,g){return l=jr(22,l,g,u),l.elementType=pe,l.lanes=p,l.stateNode={isHidden:!1},l}function N1(l,u,p){return l=jr(6,l,null,u),l.lanes=p,l}function O1(l,u,p){return u=jr(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function e$(l,u,p,g,S){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=o0(0),this.expirationTimes=o0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=o0(0),this.identifierPrefix=g,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function j1(l,u,p,g,S,k,R,D,F){return l=new e$(l,u,p,D,F),u===1?(u=1,k===!0&&(u|=8)):u=0,k=jr(3,null,null,u),l.current=k,k.stateNode=l,k.memoizedState={element:g,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},Z0(k),l}function t$(l,u,p){var g=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),z1.exports=y$(),z1.exports}var Th=jM();const DM=OM(Th);var Do=x.forwardRef((n,e)=>{const{children:t,...r}=n,i=x.Children.toArray(t),s=i.find(x$);if(s){const o=s.props.children,a=i.map(c=>c===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return y.jsx(ub,{...r,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,a):null})}return y.jsx(ub,{...r,ref:e,children:t})});Do.displayName="Slot";var ub=x.forwardRef((n,e)=>{const{children:t,...r}=n;if(x.isValidElement(t)){const i=w$(t);return x.cloneElement(t,{...b$(r,t.props),ref:e?Wv(e,i):i})}return x.Children.count(t)>1?x.Children.only(null):null});ub.displayName="SlotClone";var IM=({children:n})=>y.jsx(y.Fragment,{children:n});function x$(n){return x.isValidElement(n)&&n.type===IM}function b$(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...a)=>{s(...a),i(...a)}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function w$(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var S$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],st=S$.reduce((n,e)=>{const t=x.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?Do:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...o,ref:i})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function LM(n,e){n&&Th.flushSync(()=>n.dispatchEvent(e))}function nn(n){const e=x.useRef(n);return x.useEffect(()=>{e.current=n}),x.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function C$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var k$="DismissableLayer",db="dismissableLayer.update",_$="dismissableLayer.pointerDownOutside",E$="dismissableLayer.focusOutside",vR,$M=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ah=x.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...c}=n,d=x.useContext($M),[f,h]=x.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=x.useState({}),b=At(e,N=>h(N)),w=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(C),E=f?w.indexOf(f):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,A=E>=_,T=T$(N=>{const j=N.target,L=[...d.branches].some(Z=>Z.contains(j));!A||L||(i==null||i(N),o==null||o(N),N.defaultPrevented||a==null||a())},m),M=A$(N=>{const j=N.target;[...d.branches].some(Z=>Z.contains(j))||(s==null||s(N),o==null||o(N),N.defaultPrevented||a==null||a())},m);return C$(N=>{E===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},m),x.useEffect(()=>{if(f)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(vR=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),yR(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=vR)}},[f,m,t,d]),x.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),yR())},[f,d]),x.useEffect(()=>{const N=()=>v({});return document.addEventListener(db,N),()=>document.removeEventListener(db,N)},[]),y.jsx(st.div,{...c,ref:b,style:{pointerEvents:P?A?"auto":"none":void 0,...n.style},onFocusCapture:Me(n.onFocusCapture,M.onFocusCapture),onBlurCapture:Me(n.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Me(n.onPointerDownCapture,T.onPointerDownCapture)})});Ah.displayName=k$;var R$="DismissableLayerBranch",P$=x.forwardRef((n,e)=>{const t=x.useContext($M),r=x.useRef(null),i=At(e,r);return x.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),y.jsx(st.div,{...n,ref:i})});P$.displayName=R$;function T$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){BM(_$,t,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function A$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&BM(E$,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function yR(){const n=new CustomEvent(db);document.dispatchEvent(n)}function BM(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?LM(i,s):i.dispatchEvent(s)}var xi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},M$=Uv.useId||(()=>{}),N$=0;function wr(n){const[e,t]=x.useState(M$());return xi(()=>{n||t(r=>r??String(N$++))},[n]),n||(e?`radix-${e}`:"")}const O$=["top","right","bottom","left"],Io=Math.min,vr=Math.max,Rg=Math.round,cm=Math.floor,Zi=n=>({x:n,y:n}),j$={left:"right",right:"left",bottom:"top",top:"bottom"},D$={start:"end",end:"start"};function fb(n,e,t){return vr(n,Io(e,t))}function Ts(n,e){return typeof n=="function"?n(e):n}function As(n){return n.split("-")[0]}function ku(n){return n.split("-")[1]}function BS(n){return n==="x"?"y":"x"}function FS(n){return n==="y"?"height":"width"}function Lo(n){return["top","bottom"].includes(As(n))?"y":"x"}function zS(n){return BS(Lo(n))}function I$(n,e,t){t===void 0&&(t=!1);const r=ku(n),i=zS(n),s=FS(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Pg(o)),[o,Pg(o)]}function L$(n){const e=Pg(n);return[hb(n),e,hb(e)]}function hb(n){return n.replace(/start|end/g,e=>D$[e])}function $$(n,e,t){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function B$(n,e,t,r){const i=ku(n);let s=$$(As(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(hb)))),s}function Pg(n){return n.replace(/left|right|bottom|top/g,e=>j$[e])}function F$(n){return{top:0,right:0,bottom:0,left:0,...n}}function FM(n){return typeof n!="number"?F$(n):{top:n,right:n,bottom:n,left:n}}function Tg(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function xR(n,e,t){let{reference:r,floating:i}=n;const s=Lo(e),o=zS(e),a=FS(o),c=As(e),d=s==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-i.width,y:h};break;default:v={x:r.x,y:r.y}}switch(ku(e)){case"start":v[o]-=m*(t&&d?-1:1);break;case"end":v[o]+=m*(t&&d?-1:1);break}return v}const z$=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let d=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:f,y:h}=xR(d,r,c),m=r,v={},b=0;for(let w=0;w({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:d,padding:f=0}=Ts(n,e)||{};if(d==null)return{};const h=FM(f),m={x:t,y:r},v=zS(i),b=FS(v),w=await o.getDimensions(d),C=v==="y",_=C?"top":"left",E=C?"bottom":"right",P=C?"clientHeight":"clientWidth",A=s.reference[b]+s.reference[v]-m[v]-s.floating[b],T=m[v]-s.reference[v],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let N=M?M[P]:0;(!N||!await(o.isElement==null?void 0:o.isElement(M)))&&(N=a.floating[P]||s.floating[b]);const j=A/2-T/2,L=N/2-w[b]/2-1,Z=Io(h[_],L),H=Io(h[E],L),z=Z,oe=N-w[b]-H,ne=N/2-w[b]/2+j,ce=fb(z,ne,oe),se=!c.arrow&&ku(i)!=null&&ne!==ce&&s.reference[b]/2-(nene<=0)){var H,z;const ne=(((H=s.flip)==null?void 0:H.index)||0)+1,ce=N[ne];if(ce)return{data:{index:ne,overflows:Z},reset:{placement:ce}};let se=(z=Z.filter(pe=>pe.overflows[0]<=0).sort((pe,G)=>pe.overflows[1]-G.overflows[1])[0])==null?void 0:z.placement;if(!se)switch(v){case"bestFit":{var oe;const pe=(oe=Z.filter(G=>{if(M){const Q=Lo(G.placement);return Q===E||Q==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Q=>Q>0).reduce((Q,re)=>Q+re,0)]).sort((G,Q)=>G[1]-Q[1])[0])==null?void 0:oe[0];pe&&(se=pe);break}case"initialPlacement":se=a;break}if(i!==se)return{reset:{placement:se}}}return{}}}};function bR(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function wR(n){return O$.some(e=>n[e]>=0)}const U$=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=Ts(n,e);switch(r){case"referenceHidden":{const s=await mf(e,{...i,elementContext:"reference"}),o=bR(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:wR(o)}}}case"escaped":{const s=await mf(e,{...i,altBoundary:!0}),o=bR(s,t.floating);return{data:{escapedOffsets:o,escaped:wR(o)}}}default:return{}}}}};async function W$(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=As(t),a=ku(t),c=Lo(t)==="y",d=["left","top"].includes(o)?-1:1,f=s&&c?-1:1,h=Ts(e,n);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(v=a==="end"?b*-1:b),c?{x:v*f,y:m*d}:{x:m*d,y:v*f}}const q$=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:a}=e,c=await W$(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},Z$=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:C=>{let{x:_,y:E}=C;return{x:_,y:E}}},...c}=Ts(n,e),d={x:t,y:r},f=await mf(e,c),h=Lo(As(i)),m=BS(h);let v=d[m],b=d[h];if(s){const C=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=v+f[C],P=v-f[_];v=fb(E,v,P)}if(o){const C=h==="y"?"top":"left",_=h==="y"?"bottom":"right",E=b+f[C],P=b-f[_];b=fb(E,b,P)}const w=a.fn({...e,[m]:v,[h]:b});return{...w,data:{x:w.x-t,y:w.y-r,enabled:{[m]:s,[h]:o}}}}}},K$=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:d=!0}=Ts(n,e),f={x:t,y:r},h=Lo(i),m=BS(h);let v=f[m],b=f[h];const w=Ts(a,e),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const P=m==="y"?"height":"width",A=s.reference[m]-s.floating[P]+C.mainAxis,T=s.reference[m]+s.reference[P]-C.mainAxis;vT&&(v=T)}if(d){var _,E;const P=m==="y"?"width":"height",A=["top","left"].includes(As(i)),T=s.reference[h]-s.floating[P]+(A&&((_=o.offset)==null?void 0:_[h])||0)+(A?0:C.crossAxis),M=s.reference[h]+s.reference[P]+(A?0:((E=o.offset)==null?void 0:E[h])||0)-(A?C.crossAxis:0);bM&&(b=M)}return{[m]:v,[h]:b}}}},G$=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:c=()=>{},...d}=Ts(n,e),f=await mf(e,d),h=As(i),m=ku(i),v=Lo(i)==="y",{width:b,height:w}=s.floating;let C,_;h==="top"||h==="bottom"?(C=h,_=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=h,C=m==="end"?"top":"bottom");const E=w-f.top-f.bottom,P=b-f.left-f.right,A=Io(w-f[C],E),T=Io(b-f[_],P),M=!e.middlewareData.shift;let N=A,j=T;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(j=P),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(N=E),M&&!m){const Z=vr(f.left,0),H=vr(f.right,0),z=vr(f.top,0),oe=vr(f.bottom,0);v?j=b-2*(Z!==0||H!==0?Z+H:vr(f.left,f.right)):N=w-2*(z!==0||oe!==0?z+oe:vr(f.top,f.bottom))}await c({...e,availableWidth:j,availableHeight:N});const L=await o.getDimensions(a.floating);return b!==L.width||w!==L.height?{reset:{rects:!0}}:{}}}};function qv(){return typeof window<"u"}function _u(n){return zM(n)?(n.nodeName||"").toLowerCase():"#document"}function Sr(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ns(n){var e;return(e=(zM(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function zM(n){return qv()?n instanceof Node||n instanceof Sr(n).Node:!1}function bi(n){return qv()?n instanceof Element||n instanceof Sr(n).Element:!1}function Ji(n){return qv()?n instanceof HTMLElement||n instanceof Sr(n).HTMLElement:!1}function SR(n){return!qv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Sr(n).ShadowRoot}function Mh(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=wi(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function Q$(n){return["table","td","th"].includes(_u(n))}function Zv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function VS(n){const e=HS(),t=bi(n)?wi(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function J$(n){let e=$o(n);for(;Ji(e)&&!Qc(e);){if(VS(e))return e;if(Zv(e))return null;e=$o(e)}return null}function HS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qc(n){return["html","body","#document"].includes(_u(n))}function wi(n){return Sr(n).getComputedStyle(n)}function Kv(n){return bi(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function $o(n){if(_u(n)==="html")return n;const e=n.assignedSlot||n.parentNode||SR(n)&&n.host||ns(n);return SR(e)?e.host:e}function VM(n){const e=$o(n);return Qc(e)?n.ownerDocument?n.ownerDocument.body:n.body:Ji(e)&&Mh(e)?e:VM(e)}function gf(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=VM(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=Sr(i);if(s){const a=pb(o);return e.concat(o,o.visualViewport||[],Mh(i)?i:[],a&&t?gf(a):[])}return e.concat(i,gf(i,[],t))}function pb(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function HM(n){const e=wi(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ji(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,a=Rg(t)!==s||Rg(r)!==o;return a&&(t=s,r=o),{width:t,height:r,$:a}}function US(n){return bi(n)?n:n.contextElement}function yc(n){const e=US(n);if(!Ji(e))return Zi(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=HM(e);let o=(s?Rg(t.width):t.width)/r,a=(s?Rg(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Y$=Zi(0);function UM(n){const e=Sr(n);return!HS()||!e.visualViewport?Y$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function X$(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Sr(n)?!1:e}function qa(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=US(n);let o=Zi(1);e&&(r?bi(r)&&(o=yc(r)):o=yc(n));const a=X$(s,t,r)?UM(s):Zi(0);let c=(i.left+a.x)/o.x,d=(i.top+a.y)/o.y,f=i.width/o.x,h=i.height/o.y;if(s){const m=Sr(s),v=r&&bi(r)?Sr(r):r;let b=m,w=pb(b);for(;w&&r&&v!==b;){const C=yc(w),_=w.getBoundingClientRect(),E=wi(w),P=_.left+(w.clientLeft+parseFloat(E.paddingLeft))*C.x,A=_.top+(w.clientTop+parseFloat(E.paddingTop))*C.y;c*=C.x,d*=C.y,f*=C.x,h*=C.y,c+=P,d+=A,b=Sr(w),w=pb(b)}}return Tg({width:f,height:h,x:c,y:d})}function WS(n,e){const t=Kv(n).scrollLeft;return e?e.left+t:qa(ns(n)).left+t}function WM(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:WS(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function eB(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=ns(r),a=e?Zv(e.floating):!1;if(r===o||a&&s)return t;let c={scrollLeft:0,scrollTop:0},d=Zi(1);const f=Zi(0),h=Ji(r);if((h||!h&&!s)&&((_u(r)!=="body"||Mh(o))&&(c=Kv(r)),Ji(r))){const v=qa(r);d=yc(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=o&&!h&&!s?WM(o,c,!0):Zi(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:t.y*d.y-c.scrollTop*d.y+f.y+m.y}}function tB(n){return Array.from(n.getClientRects())}function nB(n){const e=ns(n),t=Kv(n),r=n.ownerDocument.body,i=vr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=vr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+WS(n);const a=-t.scrollTop;return wi(r).direction==="rtl"&&(o+=vr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function rB(n,e){const t=Sr(n),r=ns(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const d=HS();(!d||d&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function iB(n,e){const t=qa(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=Ji(n)?yc(n):Zi(1),o=n.clientWidth*s.x,a=n.clientHeight*s.y,c=i*s.x,d=r*s.y;return{width:o,height:a,x:c,y:d}}function CR(n,e,t){let r;if(e==="viewport")r=rB(n,t);else if(e==="document")r=nB(ns(n));else if(bi(e))r=iB(e,t);else{const i=UM(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Tg(r)}function qM(n,e){const t=$o(n);return t===e||!bi(t)||Qc(t)?!1:wi(t).position==="fixed"||qM(t,e)}function sB(n,e){const t=e.get(n);if(t)return t;let r=gf(n,[],!1).filter(a=>bi(a)&&_u(a)!=="body"),i=null;const s=wi(n).position==="fixed";let o=s?$o(n):n;for(;bi(o)&&!Qc(o);){const a=wi(o),c=VS(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Mh(o)&&!c&&qM(n,o))?r=r.filter(f=>f!==o):i=a,o=$o(o)}return e.set(n,r),r}function oB(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?Zv(e)?[]:sB(e,this._c):[].concat(t),r],a=o[0],c=o.reduce((d,f)=>{const h=CR(e,f,i);return d.top=vr(h.top,d.top),d.right=Io(h.right,d.right),d.bottom=Io(h.bottom,d.bottom),d.left=vr(h.left,d.left),d},CR(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function aB(n){const{width:e,height:t}=HM(n);return{width:e,height:t}}function lB(n,e,t){const r=Ji(e),i=ns(e),s=t==="fixed",o=qa(n,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=Zi(0);if(r||!r&&!s)if((_u(e)!=="body"||Mh(i))&&(a=Kv(e)),r){const m=qa(e,!0,s,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}else i&&(c.x=WS(i));const d=i&&!r&&!s?WM(i,a):Zi(0),f=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function U1(n){return wi(n).position==="static"}function kR(n,e){if(!Ji(n)||wi(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ns(n)===t&&(t=t.ownerDocument.body),t}function ZM(n,e){const t=Sr(n);if(Zv(n))return t;if(!Ji(n)){let i=$o(n);for(;i&&!Qc(i);){if(bi(i)&&!U1(i))return i;i=$o(i)}return t}let r=kR(n,e);for(;r&&Q$(r)&&U1(r);)r=kR(r,e);return r&&Qc(r)&&U1(r)&&!VS(r)?t:r||J$(n)||t}const cB=async function(n){const e=this.getOffsetParent||ZM,t=this.getDimensions,r=await t(n.floating);return{reference:lB(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uB(n){return wi(n).direction==="rtl"}const dB={convertOffsetParentRelativeRectToViewportRelativeRect:eB,getDocumentElement:ns,getClippingRect:oB,getOffsetParent:ZM,getElementRects:cB,getClientRects:tB,getDimensions:aB,getScale:yc,isElement:bi,isRTL:uB};function fB(n,e){let t=null,r;const i=ns(n);function s(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:d,top:f,width:h,height:m}=n.getBoundingClientRect();if(a||e(),!h||!m)return;const v=cm(f),b=cm(i.clientWidth-(d+h)),w=cm(i.clientHeight-(f+m)),C=cm(d),E={rootMargin:-v+"px "+-b+"px "+-w+"px "+-C+"px",threshold:vr(0,Io(1,c))||1};let P=!0;function A(T){const M=T[0].intersectionRatio;if(M!==c){if(!P)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}P=!1}try{t=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{t=new IntersectionObserver(A,E)}t.observe(n)}return o(!0),s}function hB(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=US(n),f=i||s?[...d?gf(d):[],...gf(e)]:[];f.forEach(_=>{i&&_.addEventListener("scroll",t,{passive:!0}),s&&_.addEventListener("resize",t)});const h=d&&a?fB(d,t):null;let m=-1,v=null;o&&(v=new ResizeObserver(_=>{let[E]=_;E&&E.target===d&&v&&(v.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=v)==null||P.observe(e)})),t()}),d&&!c&&v.observe(d),v.observe(e));let b,w=c?qa(n):null;c&&C();function C(){const _=qa(n);w&&(_.x!==w.x||_.y!==w.y||_.width!==w.width||_.height!==w.height)&&t(),w=_,b=requestAnimationFrame(C)}return t(),()=>{var _;f.forEach(E=>{i&&E.removeEventListener("scroll",t),s&&E.removeEventListener("resize",t)}),h==null||h(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const pB=q$,mB=Z$,gB=H$,vB=G$,yB=U$,_R=V$,xB=K$,bB=(n,e,t)=>{const r=new Map,i={platform:dB,...t},s={...i.platform,_c:r};return z$(n,e,{...i,platform:s})};var rg=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ag(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!Ag(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!Ag(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function KM(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function ER(n,e){const t=KM(n);return Math.round(e*t)/t}function W1(n){const e=x.useRef(n);return rg(()=>{e.current=n}),e}function wB(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:d}=n,[f,h]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,v]=x.useState(r);Ag(m,r)||v(r);const[b,w]=x.useState(null),[C,_]=x.useState(null),E=x.useCallback(G=>{G!==M.current&&(M.current=G,w(G))},[]),P=x.useCallback(G=>{G!==N.current&&(N.current=G,_(G))},[]),A=s||b,T=o||C,M=x.useRef(null),N=x.useRef(null),j=x.useRef(f),L=c!=null,Z=W1(c),H=W1(i),z=W1(d),oe=x.useCallback(()=>{if(!M.current||!N.current)return;const G={placement:e,strategy:t,middleware:m};H.current&&(G.platform=H.current),bB(M.current,N.current,G).then(Q=>{const re={...Q,isPositioned:z.current!==!1};ne.current&&!Ag(j.current,re)&&(j.current=re,Th.flushSync(()=>{h(re)}))})},[m,e,t,H,z]);rg(()=>{d===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,h(G=>({...G,isPositioned:!1})))},[d]);const ne=x.useRef(!1);rg(()=>(ne.current=!0,()=>{ne.current=!1}),[]),rg(()=>{if(A&&(M.current=A),T&&(N.current=T),A&&T){if(Z.current)return Z.current(A,T,oe);oe()}},[A,T,oe,Z,L]);const ce=x.useMemo(()=>({reference:M,floating:N,setReference:E,setFloating:P}),[E,P]),se=x.useMemo(()=>({reference:A,floating:T}),[A,T]),pe=x.useMemo(()=>{const G={position:t,left:0,top:0};if(!se.floating)return G;const Q=ER(se.floating,f.x),re=ER(se.floating,f.y);return a?{...G,transform:"translate("+Q+"px, "+re+"px)",...KM(se.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Q,top:re}},[t,a,se.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:oe,refs:ce,elements:se,floatingStyles:pe}),[f,oe,ce,se,pe])}const SB=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?_R({element:r.current,padding:i}).fn(t):{}:r?_R({element:r,padding:i}).fn(t):{}}}},CB=(n,e)=>({...pB(n),options:[n,e]}),kB=(n,e)=>({...mB(n),options:[n,e]}),_B=(n,e)=>({...xB(n),options:[n,e]}),EB=(n,e)=>({...gB(n),options:[n,e]}),RB=(n,e)=>({...vB(n),options:[n,e]}),PB=(n,e)=>({...yB(n),options:[n,e]}),TB=(n,e)=>({...SB(n),options:[n,e]});var AB="Arrow",GM=x.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return y.jsx(st.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});GM.displayName=AB;var MB=GM;function qS(n,e=[]){let t=[];function r(s,o){const a=x.createContext(o),c=t.length;t=[...t,o];function d(h){const{scope:m,children:v,...b}=h,w=(m==null?void 0:m[n][c])||a,C=x.useMemo(()=>b,Object.values(b));return y.jsx(w.Provider,{value:C,children:v})}function f(h,m){const v=(m==null?void 0:m[n][c])||a,b=x.useContext(v);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return d.displayName=s+"Provider",[d,f]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return i.scopeName=n,[r,NB(i,...e)]}function NB(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:c,scopeName:d})=>{const h=c(s)[`__scope${d}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function ZS(n){const[e,t]=x.useState(void 0);return xi(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,a=d.blockSize}else o=n.offsetWidth,a=n.offsetHeight;t({width:o,height:a})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var KS="Popper",[QM,Eu]=qS(KS),[OB,JM]=QM(KS),YM=n=>{const{__scopePopper:e,children:t}=n,[r,i]=x.useState(null);return y.jsx(OB,{scope:e,anchor:r,onAnchorChange:i,children:t})};YM.displayName=KS;var XM="PopperAnchor",e5=x.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=JM(XM,t),o=x.useRef(null),a=At(e,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:y.jsx(st.div,{...i,ref:a})});e5.displayName=XM;var GS="PopperContent",[jB,DB]=QM(GS),t5=x.forwardRef((n,e)=>{var ae,ye,Se,Fe,ct,wt;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:b,...w}=n,C=JM(GS,t),[_,E]=x.useState(null),P=At(e,Xe=>E(Xe)),[A,T]=x.useState(null),M=ZS(A),N=(M==null?void 0:M.width)??0,j=(M==null?void 0:M.height)??0,L=r+(s!=="center"?"-"+s:""),Z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},H=Array.isArray(d)?d:[d],z=H.length>0,oe={padding:Z,boundary:H.filter(LB),altBoundary:z},{refs:ne,floatingStyles:ce,placement:se,isPositioned:pe,middlewareData:G}=wB({strategy:"fixed",placement:L,whileElementsMounted:(...Xe)=>hB(...Xe,{animationFrame:v==="always"}),elements:{reference:C.anchor},middleware:[CB({mainAxis:i+j,alignmentAxis:o}),c&&kB({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?_B():void 0,...oe}),c&&EB({...oe}),RB({...oe,apply:({elements:Xe,rects:Vt,availableWidth:Rr,availableHeight:Xr})=>{const{width:or,height:qt}=Vt.reference,ei=Xe.floating.style;ei.setProperty("--radix-popper-available-width",`${Rr}px`),ei.setProperty("--radix-popper-available-height",`${Xr}px`),ei.setProperty("--radix-popper-anchor-width",`${or}px`),ei.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),A&&TB({element:A,padding:a}),$B({arrowWidth:N,arrowHeight:j}),m&&PB({strategy:"referenceHidden",...oe})]}),[Q,re]=i5(se),$=nn(b);xi(()=>{pe&&($==null||$())},[pe,$]);const I=(ae=G.arrow)==null?void 0:ae.x,U=(ye=G.arrow)==null?void 0:ye.y,ee=((Se=G.arrow)==null?void 0:Se.centerOffset)!==0,[J,te]=x.useState();return xi(()=>{_&&te(window.getComputedStyle(_).zIndex)},[_]),y.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:pe?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(Fe=G.transformOrigin)==null?void 0:Fe.x,(ct=G.transformOrigin)==null?void 0:ct.y].join(" "),...((wt=G.hide)==null?void 0:wt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:y.jsx(jB,{scope:t,placedSide:Q,onArrowChange:T,arrowX:I,arrowY:U,shouldHideArrow:ee,children:y.jsx(st.div,{"data-side":Q,"data-align":re,...w,ref:P,style:{...w.style,animation:pe?void 0:"none"}})})})});t5.displayName=GS;var n5="PopperArrow",IB={top:"bottom",right:"left",bottom:"top",left:"right"},r5=x.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=DB(n5,r),o=IB[s.placedSide];return y.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:y.jsx(MB,{...i,ref:t,style:{...i.style,display:"block"}})})});r5.displayName=n5;function LB(n){return n!==null}var $B=n=>({name:"transformOrigin",options:n,fn(e){var C,_,E;const{placement:t,rects:r,middlewareData:i}=e,o=((C=i.arrow)==null?void 0:C.centerOffset)!==0,a=o?0:n.arrowWidth,c=o?0:n.arrowHeight,[d,f]=i5(t),h={start:"0%",center:"50%",end:"100%"}[f],m=(((_=i.arrow)==null?void 0:_.x)??0)+a/2,v=(((E=i.arrow)==null?void 0:E.y)??0)+c/2;let b="",w="";return d==="bottom"?(b=o?h:`${m}px`,w=`${-c}px`):d==="top"?(b=o?h:`${m}px`,w=`${r.floating.height+c}px`):d==="right"?(b=`${-c}px`,w=o?h:`${v}px`):d==="left"&&(b=`${r.floating.width+c}px`,w=o?h:`${v}px`),{data:{x:b,y:w}}}});function i5(n){const[e,t="center"]=n.split("-");return[e,t]}var QS=YM,Gv=e5,JS=t5,YS=r5,BB="Portal",Nh=x.forwardRef((n,e)=>{var a;const{container:t,...r}=n,[i,s]=x.useState(!1);xi(()=>s(!0),[]);const o=t||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?DM.createPortal(y.jsx(st.div,{...r,ref:e}),o):null});Nh.displayName=BB;function FB(n,e){return x.useReducer((t,r)=>e[t][r]??t,n)}var Ln=n=>{const{present:e,children:t}=n,r=zB(e),i=typeof t=="function"?t({present:r.isPresent}):x.Children.only(t),s=At(r.ref,VB(i));return typeof t=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};Ln.displayName="Presence";function zB(n){const[e,t]=x.useState(),r=x.useRef({}),i=x.useRef(n),s=x.useRef("none"),o=n?"mounted":"unmounted",[a,c]=FB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=um(r.current);s.current=a==="mounted"?d:"none"},[a]),xi(()=>{const d=r.current,f=i.current;if(f!==n){const m=s.current,v=um(d);n?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,c]),xi(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=v=>{const w=um(r.current).includes(v.animationName);if(v.target===e&&w&&(c("ANIMATION_END"),!i.current)){const C=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=C)})}},m=v=>{v.target===e&&(s.current=um(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(d=>{d&&(r.current=getComputedStyle(d)),t(d)},[])}}function um(n){return(n==null?void 0:n.animationName)||"none"}function VB(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function rs({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=HB({defaultProp:e,onChange:t}),s=n!==void 0,o=s?n:r,a=nn(t),c=x.useCallback(d=>{if(s){const h=typeof d=="function"?d(n):d;h!==n&&a(h)}else i(d)},[s,n,i,a]);return[o,c]}function HB({defaultProp:n,onChange:e}){const t=x.useState(n),[r]=t,i=x.useRef(r),s=nn(e);return x.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),t}var UB="VisuallyHidden",s5=x.forwardRef((n,e)=>y.jsx(st.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));s5.displayName=UB;var WB=s5,[Qv,Lue]=Ei("Tooltip",[Eu]),Jv=Eu(),o5="TooltipProvider",qB=700,mb="tooltip.open",[ZB,XS]=Qv(o5),a5=n=>{const{__scopeTooltip:e,delayDuration:t=qB,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,[o,a]=x.useState(!0),c=x.useRef(!1),d=x.useRef(0);return x.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),y.jsx(ZB,{scope:e,isOpenDelayed:o,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(d.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(f=>{c.current=f},[]),disableHoverableContent:i,children:s})};a5.displayName=o5;var Yv="Tooltip",[KB,Oh]=Qv(Yv),l5=n=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=n,c=XS(Yv,n.__scopeTooltip),d=Jv(e),[f,h]=x.useState(null),m=wr(),v=x.useRef(0),b=o??c.disableHoverableContent,w=a??c.delayDuration,C=x.useRef(!1),[_=!1,E]=rs({prop:r,defaultProp:i,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(mb))):c.onClose(),s==null||s(N)}}),P=x.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),A=x.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C.current=!1,E(!0)},[E]),T=x.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),M=x.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,E(!0),v.current=0},w)},[w,E]);return x.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),y.jsx(QS,{...d,children:y.jsx(KB,{scope:e,contentId:m,open:_,stateAttribute:P,trigger:f,onTriggerChange:h,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?M():A()},[c.isOpenDelayed,M,A]),onTriggerLeave:x.useCallback(()=>{b?T():(window.clearTimeout(v.current),v.current=0)},[T,b]),onOpen:A,onClose:T,disableHoverableContent:b,children:t})})};l5.displayName=Yv;var gb="TooltipTrigger",c5=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Oh(gb,t),s=XS(gb,t),o=Jv(t),a=x.useRef(null),c=At(e,a,i.onTriggerChange),d=x.useRef(!1),f=x.useRef(!1),h=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),y.jsx(Gv,{asChild:!0,...o,children:y.jsx(st.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:Me(n.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Me(n.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Me(n.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Me(n.onFocus,()=>{d.current||i.onOpen()}),onBlur:Me(n.onBlur,i.onClose),onClick:Me(n.onClick,i.onClose)})})});c5.displayName=gb;var eC="TooltipPortal",[GB,QB]=Qv(eC,{forceMount:void 0}),u5=n=>{const{__scopeTooltip:e,forceMount:t,children:r,container:i}=n,s=Oh(eC,e);return y.jsx(GB,{scope:e,forceMount:t,children:y.jsx(Ln,{present:t||s.open,children:y.jsx(Nh,{asChild:!0,container:i,children:r})})})};u5.displayName=eC;var Jc="TooltipContent",d5=x.forwardRef((n,e)=>{const t=QB(Jc,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=Oh(Jc,n.__scopeTooltip);return y.jsx(Ln,{present:r||o.open,children:o.disableHoverableContent?y.jsx(f5,{side:i,...s,ref:e}):y.jsx(JB,{side:i,...s,ref:e})})}),JB=x.forwardRef((n,e)=>{const t=Oh(Jc,n.__scopeTooltip),r=XS(Jc,n.__scopeTooltip),i=x.useRef(null),s=At(e,i),[o,a]=x.useState(null),{trigger:c,onClose:d}=t,f=i.current,{onPointerInTransitChange:h}=r,m=x.useCallback(()=>{a(null),h(!1)},[h]),v=x.useCallback((b,w)=>{const C=b.currentTarget,_={x:b.clientX,y:b.clientY},E=tF(_,C.getBoundingClientRect()),P=nF(_,E),A=rF(w.getBoundingClientRect()),T=sF([...P,...A]);a(T),h(!0)},[h]);return x.useEffect(()=>()=>m(),[m]),x.useEffect(()=>{if(c&&f){const b=C=>v(C,f),w=C=>v(C,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",w)}}},[c,f,v,m]),x.useEffect(()=>{if(o){const b=w=>{const C=w.target,_={x:w.clientX,y:w.clientY},E=(c==null?void 0:c.contains(C))||(f==null?void 0:f.contains(C)),P=!iF(_,o);E?m():P&&(m(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,o,d,m]),y.jsx(f5,{...n,ref:s})}),[YB,XB]=Qv(Yv,{isInside:!1}),f5=x.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=n,c=Oh(Jc,t),d=Jv(t),{onClose:f}=c;return x.useEffect(()=>(document.addEventListener(mb,f),()=>document.removeEventListener(mb,f)),[f]),x.useEffect(()=>{if(c.trigger){const h=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),y.jsx(Ah,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:y.jsxs(JS,{"data-state":c.stateAttribute,...d,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(IM,{children:r}),y.jsx(YB,{scope:t,isInside:!0,children:y.jsx(WB,{id:c.contentId,role:"tooltip",children:i||r})})]})})});d5.displayName=Jc;var h5="TooltipArrow",eF=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Jv(t);return XB(h5,t).isInside?null:y.jsx(YS,{...i,...r,ref:e})});eF.displayName=h5;function tF(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nF(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function rF(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function iF(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;sr!=f>r&&t<(d-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function sF(n){const e=n.slice();return e.sort((t,r)=>t.xr.x?1:t.yr.y?1:0),oF(e)}function oF(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var aF=a5,lF=l5,cF=c5,uF=u5,p5=d5;function m5(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e{const e=hF(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const a=o.split(nC);return a[0]===""&&a.length!==1&&a.shift(),g5(a,e)||fF(o)},getConflictingClassGroupIds:(o,a)=>{const c=t[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},g5=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?g5(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(nC);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},RR=/^\[(.+)\]$/,fF=n=>{if(RR.test(n)){const e=RR.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},hF=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return mF(Object.entries(n.classGroups),t).forEach(([s,o])=>{vb(o,r,s,e)}),r},vb=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:PR(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(pF(i)){vb(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{vb(o,PR(e,s),t,r)})})},PR=(n,e)=>{let t=n;return e.split(nC).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},pF=n=>n.isThemeGetter,mF=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[t,i]}):n,gF=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},v5="!",vF=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=a=>{const c=[];let d=0,f=0,h;for(let C=0;Cf?h-f:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:w}};return t?a=>t({className:a,parseClassName:o}):o},yF=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},xF=n=>({cache:gF(n.cacheSize),parseClassName:vF(n),...dF(n)}),bF=/\s+/,wF=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(bF);let a="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}=t(d);let b=!!v,w=r(b?m.substring(0,v):m);if(!w){if(!b){a=d+(a.length>0?" "+a:a);continue}if(w=r(m),!w){a=d+(a.length>0?" "+a:a);continue}b=!1}const C=yF(f).join(":"),_=h?C+v5:C,E=_+w;if(s.includes(E))continue;s.push(E);const P=i(w,b);for(let A=0;A0?" "+a:a)}return a};function SF(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rh(f),n());return t=xF(d),r=t.cache.get,i=t.cache.set,s=a,a(c)}function a(c){const d=r(c);if(d)return d;const f=wF(c,t);return i(c,f),f}return function(){return s(SF.apply(null,arguments))}}const Rt=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},x5=/^\[(?:([a-z-]+):)?(.+)\]$/i,kF=/^\d+\/\d+$/,_F=new Set(["px","full","screen"]),EF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,PF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=n=>xc(n)||_F.has(n)||kF.test(n),to=n=>Ru(n,"length",$F),xc=n=>!!n&&!Number.isNaN(Number(n)),q1=n=>Ru(n,"number",xc),Sd=n=>!!n&&Number.isInteger(Number(n)),MF=n=>n.endsWith("%")&&xc(n.slice(0,-1)),Ye=n=>x5.test(n),no=n=>EF.test(n),NF=new Set(["length","size","percentage"]),OF=n=>Ru(n,NF,b5),jF=n=>Ru(n,"position",b5),DF=new Set(["image","url"]),IF=n=>Ru(n,DF,FF),LF=n=>Ru(n,"",BF),Cd=()=>!0,Ru=(n,e,t)=>{const r=x5.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},$F=n=>RF.test(n)&&!PF.test(n),b5=()=>!1,BF=n=>TF.test(n),FF=n=>AF.test(n),zF=()=>{const n=Rt("colors"),e=Rt("spacing"),t=Rt("blur"),r=Rt("brightness"),i=Rt("borderColor"),s=Rt("borderRadius"),o=Rt("borderSpacing"),a=Rt("borderWidth"),c=Rt("contrast"),d=Rt("grayscale"),f=Rt("hueRotate"),h=Rt("invert"),m=Rt("gap"),v=Rt("gradientColorStops"),b=Rt("gradientColorStopPositions"),w=Rt("inset"),C=Rt("margin"),_=Rt("opacity"),E=Rt("padding"),P=Rt("saturate"),A=Rt("scale"),T=Rt("sepia"),M=Rt("skew"),N=Rt("space"),j=Rt("translate"),L=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Ye,e],z=()=>[Ye,e],oe=()=>["",gs,to],ne=()=>["auto",xc,Ye],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Ye],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[xc,Ye];return{cacheSize:500,separator:":",theme:{colors:[Cd],spacing:[gs,to],blur:["none","",no,Ye],brightness:$(),borderColor:[n],borderRadius:["none","","full",no,Ye],borderSpacing:z(),borderWidth:oe(),contrast:$(),grayscale:Q(),hueRotate:$(),invert:Q(),gap:z(),gradientColorStops:[n],gradientColorStopPositions:[MF,to],inset:H(),margin:H(),opacity:$(),padding:z(),saturate:$(),scale:$(),sepia:Q(),skew:$(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[no]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Ye]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sd,Ye]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Sd,Ye]}],"grid-cols":[{"grid-cols":[Cd]}],"col-start-end":[{col:["auto",{span:["full",Sd,Ye]},Ye]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[Cd]}],"row-start-end":[{row:["auto",{span:[Sd,Ye]},Ye]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,e]}],"min-w":[{"min-w":[Ye,e,"min","max","fit"]}],"max-w":[{"max-w":[Ye,e,"none","full","min","max","fit","prose",{screen:[no]},no]}],h:[{h:[Ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",no,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",q1]}],"font-family":[{font:[Cd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",xc,q1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gs,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gs,to]}],"underline-offset":[{"underline-offset":["auto",gs,Ye]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),jF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IF]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:se()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[gs,Ye]}],"outline-w":[{outline:[gs,to]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[gs,to]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",no,LF]}],"shadow-color":[{shadow:[Cd]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",no,Ye]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[P]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Sd,Ye]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[gs,to,q1]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},w5=CF(zF);function Ve(...n){return w5(tC(n))}const VF=aF,jh=lF,Dh=cF,Pu=x.forwardRef(({className:n,sideOffset:e=4,...t},r)=>y.jsx(uF,{children:y.jsx(p5,{ref:r,sideOffset:e,className:Ve("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",n),...t})}));Pu.displayName=p5.displayName;var Tu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Za=typeof window>"u"||"Deno"in globalThis;function Lr(){}function HF(n,e){return typeof n=="function"?n(e):n}function yb(n){return typeof n=="number"&&n>=0&&n!==1/0}function S5(n,e){return Math.max(n+(e||0)-Date.now(),0)}function bc(n,e){return typeof n=="function"?n(e):n}function fi(n,e){return typeof n=="function"?n(e):n}function TR(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=n;if(o){if(r){if(e.queryHash!==rC(o,e.options))return!1}else if(!vf(e.queryKey,o))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function AR(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Ka(e.options.mutationKey)!==Ka(s))return!1}else if(!vf(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function rC(n,e){return((e==null?void 0:e.queryKeyHashFn)||Ka)(n)}function Ka(n){return JSON.stringify(n,(e,t)=>xb(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function vf(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!vf(n[t],e[t])):!1}function C5(n,e){if(n===e)return n;const t=MR(n)&&MR(e);if(t||xb(n)&&xb(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,a=t?[]:{};let c=0;for(let d=0;d{setTimeout(e,n)})}function bb(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?C5(n,e):e}function WF(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function qF(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var iC=Symbol();function k5(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===iC?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var Ra,ho,Ic,vM,ZF=(vM=class extends Tu{constructor(){super();Pe(this,Ra);Pe(this,ho);Pe(this,Ic);ve(this,Ic,e=>{if(!Za&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){O(this,ho)||this.setEventListener(O(this,Ic))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,ho))==null||e.call(this),ve(this,ho,void 0))}setEventListener(e){var t;ve(this,Ic,e),(t=O(this,ho))==null||t.call(this),ve(this,ho,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){O(this,Ra)!==e&&(ve(this,Ra,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof O(this,Ra)=="boolean"?O(this,Ra):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ra=new WeakMap,ho=new WeakMap,Ic=new WeakMap,vM),sC=new ZF,Lc,po,$c,yM,KF=(yM=class extends Tu{constructor(){super();Pe(this,Lc,!0);Pe(this,po);Pe(this,$c);ve(this,$c,e=>{if(!Za&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){O(this,po)||this.setEventListener(O(this,$c))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,po))==null||e.call(this),ve(this,po,void 0))}setEventListener(e){var t;ve(this,$c,e),(t=O(this,po))==null||t.call(this),ve(this,po,e(this.setOnline.bind(this)))}setOnline(e){O(this,Lc)!==e&&(ve(this,Lc,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return O(this,Lc)}},Lc=new WeakMap,po=new WeakMap,$c=new WeakMap,yM),Ng=new KF;function wb(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function GF(n){return Math.min(1e3*2**n,3e4)}function _5(n){return(n??"online")==="online"?Ng.isOnline():!0}var E5=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Z1(n){return n instanceof E5}function R5(n){let e=!1,t=0,r=!1,i;const s=wb(),o=w=>{var C;r||(m(new E5(w)),(C=n.abort)==null||C.call(n))},a=()=>{e=!0},c=()=>{e=!1},d=()=>sC.isFocused()&&(n.networkMode==="always"||Ng.isOnline())&&n.canRun(),f=()=>_5(n.networkMode)&&n.canRun(),h=w=>{var C;r||(r=!0,(C=n.onSuccess)==null||C.call(n,w),i==null||i(),s.resolve(w))},m=w=>{var C;r||(r=!0,(C=n.onError)==null||C.call(n,w),i==null||i(),s.reject(w))},v=()=>new Promise(w=>{var C;i=_=>{(r||d())&&w(_)},(C=n.onPause)==null||C.call(n)}).then(()=>{var w;i=void 0,r||(w=n.onContinue)==null||w.call(n)}),b=()=>{if(r)return;let w;const C=t===0?n.initialPromise:void 0;try{w=C??n.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(h).catch(_=>{var M;if(r)return;const E=n.retry??(Za?0:3),P=n.retryDelay??GF,A=typeof P=="function"?P(t,_):P,T=E===!0||typeof E=="number"&&td()?void 0:v()).then(()=>{e?m(_):b()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),s)}}function QF(){let n=[],e=0,t=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{e?n.push(a):i(()=>{t(a)})},o=()=>{const a=n;n=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{t(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Qt=QF(),Pa,xM,P5=(xM=class{constructor(){Pe(this,Pa)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yb(this.gcTime)&&ve(this,Pa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Za?1/0:5*60*1e3))}clearGcTimeout(){O(this,Pa)&&(clearTimeout(O(this,Pa)),ve(this,Pa,void 0))}},Pa=new WeakMap,xM),Bc,Fc,Ir,vn,Ch,Ta,ci,vs,bM,JF=(bM=class extends P5{constructor(e){super();Pe(this,ci);Pe(this,Bc);Pe(this,Fc);Pe(this,Ir);Pe(this,vn);Pe(this,Ch);Pe(this,Ta);ve(this,Ta,!1),ve(this,Ch,e.defaultOptions),this.setOptions(e.options),this.observers=[],ve(this,Ir,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ve(this,Bc,YF(this.options)),this.state=e.state??O(this,Bc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=O(this,vn))==null?void 0:e.promise}setOptions(e){this.options={...O(this,Ch),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Ir).remove(this)}setData(e,t){const r=bb(this.state.data,e,this.options);return We(this,ci,vs).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){We(this,ci,vs).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=O(this,vn))==null?void 0:r.promise;return(i=O(this,vn))==null||i.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Bc))}isActive(){return this.observers.some(e=>fi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iC||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!S5(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=O(this,vn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=O(this,vn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),O(this,Ir).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(O(this,vn)&&(O(this,Ta)?O(this,vn).cancel({revert:!0}):O(this,vn).cancelRetry()),this.scheduleGc()),O(this,Ir).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,ci,vs).call(this,{type:"invalidate"})}fetch(e,t){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(O(this,vn))return O(this,vn).continueRetry(),O(this,vn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ve(this,Ta,!0),r.signal)})},s=()=>{const h=k5(this.options,t),m={queryKey:this.queryKey,meta:this.meta};return i(m),ve(this,Ta,!1),this.options.persister?this.options.persister(h,m,this):h(m)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),ve(this,Fc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&We(this,ci,vs).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=h=>{var m,v,b,w;Z1(h)&&h.silent||We(this,ci,vs).call(this,{type:"error",error:h}),Z1(h)||((v=(m=O(this,Ir).config).onError)==null||v.call(m,h,this),(w=(b=O(this,Ir).config).onSettled)==null||w.call(b,this.state.data,h,this)),this.scheduleGc()};return ve(this,vn,R5({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,v,b,w;if(h===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(C){a(C);return}(v=(m=O(this,Ir).config).onSuccess)==null||v.call(m,h,this),(w=(b=O(this,Ir).config).onSettled)==null||w.call(b,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,m)=>{We(this,ci,vs).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{We(this,ci,vs).call(this,{type:"pause"})},onContinue:()=>{We(this,ci,vs).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),O(this,vn).start()}},Bc=new WeakMap,Fc=new WeakMap,Ir=new WeakMap,vn=new WeakMap,Ch=new WeakMap,Ta=new WeakMap,ci=new WeakSet,vs=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...T5(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Z1(i)&&i.revert&&O(this,Fc)?{...O(this,Fc),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,Ir).notify({query:this,type:"updated",action:e})})},bM);function T5(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_5(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function YF(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Bi,wM,XF=(wM=class extends Tu{constructor(e={}){super();Pe(this,Bi);this.config=e,ve(this,Bi,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??rC(i,t);let o=this.get(s);return o||(o=new JF({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){O(this,Bi).has(e.queryHash)||(O(this,Bi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=O(this,Bi).get(e.queryHash);t&&(e.destroy(),t===e&&O(this,Bi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return O(this,Bi).get(e)}getAll(){return[...O(this,Bi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>TR(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>TR(e,r)):t}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Bi=new WeakMap,wM),Fi,Rn,Aa,zi,ro,SM,ez=(SM=class extends P5{constructor(e){super();Pe(this,zi);Pe(this,Fi);Pe(this,Rn);Pe(this,Aa);this.mutationId=e.mutationId,ve(this,Rn,e.mutationCache),ve(this,Fi,[]),this.state=e.state||A5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){O(this,Fi).includes(e)||(O(this,Fi).push(e),this.clearGcTimeout(),O(this,Rn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ve(this,Fi,O(this,Fi).filter(t=>t!==e)),this.scheduleGc(),O(this,Rn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){O(this,Fi).length||(this.state.status==="pending"?this.scheduleGc():O(this,Rn).remove(this))}continue(){var e;return((e=O(this,Aa))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,d,f,h,m,v,b,w,C,_,E,P,A,T,M,N;ve(this,Aa,R5({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(j,L)=>{We(this,zi,ro).call(this,{type:"failed",failureCount:j,error:L})},onPause:()=>{We(this,zi,ro).call(this,{type:"pause"})},onContinue:()=>{We(this,zi,ro).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Rn).canRun(this)}));const t=this.state.status==="pending",r=!O(this,Aa).canStart();try{if(!t){We(this,zi,ro).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=O(this,Rn).config).onMutate)==null?void 0:s.call(i,e,this));const L=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));L!==this.state.context&&We(this,zi,ro).call(this,{type:"pending",context:L,variables:e,isPaused:r})}const j=await O(this,Aa).start();return await((d=(c=O(this,Rn).config).onSuccess)==null?void 0:d.call(c,j,e,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,j,e,this.state.context)),await((v=(m=O(this,Rn).config).onSettled)==null?void 0:v.call(m,j,null,this.state.variables,this.state.context,this)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,j,null,e,this.state.context)),We(this,zi,ro).call(this,{type:"success",data:j}),j}catch(j){try{throw await((_=(C=O(this,Rn).config).onError)==null?void 0:_.call(C,j,e,this.state.context,this)),await((P=(E=this.options).onError)==null?void 0:P.call(E,j,e,this.state.context)),await((T=(A=O(this,Rn).config).onSettled)==null?void 0:T.call(A,void 0,j,this.state.variables,this.state.context,this)),await((N=(M=this.options).onSettled)==null?void 0:N.call(M,void 0,j,e,this.state.context)),j}finally{We(this,zi,ro).call(this,{type:"error",error:j})}}finally{O(this,Rn).runNext(this)}}},Fi=new WeakMap,Rn=new WeakMap,Aa=new WeakMap,zi=new WeakSet,ro=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qt.batch(()=>{O(this,Fi).forEach(r=>{r.onMutationUpdate(e)}),O(this,Rn).notify({mutation:this,type:"updated",action:e})})},SM);function A5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var hr,kh,CM,tz=(CM=class extends Tu{constructor(e={}){super();Pe(this,hr);Pe(this,kh);this.config=e,ve(this,hr,new Map),ve(this,kh,Date.now())}build(e,t,r){const i=new ez({mutationCache:this,mutationId:++bd(this,kh)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){const t=dm(e),r=O(this,hr).get(t)??[];r.push(e),O(this,hr).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var r;const t=dm(e);if(O(this,hr).has(t)){const i=(r=O(this,hr).get(t))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?O(this,hr).delete(t):O(this,hr).set(t,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const t=(r=O(this,hr).get(dm(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!t||t===e}runNext(e){var r;const t=(r=O(this,hr).get(dm(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...O(this,hr).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(r=>AR(t,r))}findAll(e={}){return this.getAll().filter(t=>AR(e,t))}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}},hr=new WeakMap,kh=new WeakMap,CM);function dm(n){var e;return((e=n.options.scope)==null?void 0:e.id)??String(n.mutationId)}function OR(n){return{onFetch:(e,t)=>{var f,h,m,v,b;const r=e.options,i=(m=(h=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((v=e.state.data)==null?void 0:v.pages)||[],o=((b=e.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const d=async()=>{let w=!1;const C=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(e.signal.aborted?w=!0:e.signal.addEventListener("abort",()=>{w=!0}),e.signal)})},_=k5(e.options,e.fetchOptions),E=async(P,A,T)=>{if(w)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const M={queryKey:e.queryKey,pageParam:A,direction:T?"backward":"forward",meta:e.options.meta};C(M);const N=await _(M),{maxPages:j}=e.options,L=T?qF:WF;return{pages:L(P.pages,N,j),pageParams:L(P.pageParams,A,j)}};if(i&&s.length){const P=i==="backward",A=P?nz:jR,T={pages:s,pageParams:o},M=A(r,T);a=await E(T,M,P)}else{const P=n??s.length;do{const A=c===0?o[0]??r.initialPageParam:jR(r,a);if(c>0&&A==null)break;a=await E(a,A),c++}while(c{var w,C;return(C=(w=e.options).persister)==null?void 0:C.call(w,d,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=d}}}function jR(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function nz(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Lt,mo,go,zc,Vc,vo,Hc,Uc,kM,rz=(kM=class{constructor(n={}){Pe(this,Lt);Pe(this,mo);Pe(this,go);Pe(this,zc);Pe(this,Vc);Pe(this,vo);Pe(this,Hc);Pe(this,Uc);ve(this,Lt,n.queryCache||new XF),ve(this,mo,n.mutationCache||new tz),ve(this,go,n.defaultOptions||{}),ve(this,zc,new Map),ve(this,Vc,new Map),ve(this,vo,0)}mount(){bd(this,vo)._++,O(this,vo)===1&&(ve(this,Hc,sC.subscribe(async n=>{n&&(await this.resumePausedMutations(),O(this,Lt).onFocus())})),ve(this,Uc,Ng.subscribe(async n=>{n&&(await this.resumePausedMutations(),O(this,Lt).onOnline())})))}unmount(){var n,e;bd(this,vo)._--,O(this,vo)===0&&((n=O(this,Hc))==null||n.call(this),ve(this,Hc,void 0),(e=O(this,Uc))==null||e.call(this),ve(this,Uc,void 0))}isFetching(n){return O(this,Lt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return O(this,mo).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=O(this,Lt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.getQueryData(n.queryKey);if(e===void 0)return this.fetchQuery(n);{const t=this.defaultQueryOptions(n),r=O(this,Lt).build(this,t);return n.revalidateIfStale&&r.isStaleByTime(bc(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(n){return O(this,Lt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=O(this,Lt).get(r.queryHash),s=i==null?void 0:i.state.data,o=HF(e,s);if(o!==void 0)return O(this,Lt).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return Qt.batch(()=>O(this,Lt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=O(this,Lt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=O(this,Lt);Qt.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=O(this,Lt),r={type:"active",...n};return Qt.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(n={},e={}){const t={revert:!0,...e},r=Qt.batch(()=>O(this,Lt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(n={},e={}){return Qt.batch(()=>{if(O(this,Lt).findAll(n).forEach(r=>{r.invalidate()}),n.refetchType==="none")return Promise.resolve();const t={...n,type:n.refetchType??n.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(n={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Qt.batch(()=>O(this,Lt).findAll(n).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Lr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Lr)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=O(this,Lt).build(this,e);return t.isStaleByTime(bc(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Lr).catch(Lr)}fetchInfiniteQuery(n){return n.behavior=OR(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Lr).catch(Lr)}ensureInfiniteQueryData(n){return n.behavior=OR(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ng.isOnline()?O(this,mo).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Lt)}getMutationCache(){return O(this,mo)}getDefaultOptions(){return O(this,go)}setDefaultOptions(n){ve(this,go,n)}setQueryDefaults(n,e){O(this,zc).set(Ka(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...O(this,zc).values()];let t={};return e.forEach(r=>{vf(n,r.queryKey)&&(t={...t,...r.defaultOptions})}),t}setMutationDefaults(n,e){O(this,Vc).set(Ka(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...O(this,Vc).values()];let t={};return e.forEach(r=>{vf(n,r.mutationKey)&&(t={...t,...r.defaultOptions})}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...O(this,go).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=rC(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===iC&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...O(this,go).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){O(this,Lt).clear(),O(this,mo).clear()}},Lt=new WeakMap,mo=new WeakMap,go=new WeakMap,zc=new WeakMap,Vc=new WeakMap,vo=new WeakMap,Hc=new WeakMap,Uc=new WeakMap,kM),Zn,at,_h,Pn,Ma,Wc,yo,Vi,Eh,qc,Zc,Na,Oa,xo,Kc,gt,jd,Sb,Cb,kb,_b,Eb,Rb,Pb,M5,_M,iz=(_M=class extends Tu{constructor(e,t){super();Pe(this,gt);Pe(this,Zn);Pe(this,at);Pe(this,_h);Pe(this,Pn);Pe(this,Ma);Pe(this,Wc);Pe(this,yo);Pe(this,Vi);Pe(this,Eh);Pe(this,qc);Pe(this,Zc);Pe(this,Na);Pe(this,Oa);Pe(this,xo);Pe(this,Kc,new Set);this.options=t,ve(this,Zn,e),ve(this,Vi,null),ve(this,yo,wb()),this.options.experimental_prefetchInRender||O(this,yo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,at).addObserver(this),DR(O(this,at),this.options)?We(this,gt,jd).call(this):this.updateResult(),We(this,gt,_b).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tb(O(this,at),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tb(O(this,at),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,gt,Eb).call(this),We(this,gt,Rb).call(this),O(this,at).removeObserver(this)}setOptions(e,t){const r=this.options,i=O(this,at);if(this.options=O(this,Zn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fi(this.options.enabled,O(this,at))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,gt,Pb).call(this),O(this,at).setOptions(this.options),r._defaulted&&!Mg(this.options,r)&&O(this,Zn).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,at),observer:this});const s=this.hasListeners();s&&IR(O(this,at),i,this.options,r)&&We(this,gt,jd).call(this),this.updateResult(t),s&&(O(this,at)!==i||fi(this.options.enabled,O(this,at))!==fi(r.enabled,O(this,at))||bc(this.options.staleTime,O(this,at))!==bc(r.staleTime,O(this,at)))&&We(this,gt,Sb).call(this);const o=We(this,gt,Cb).call(this);s&&(O(this,at)!==i||fi(this.options.enabled,O(this,at))!==fi(r.enabled,O(this,at))||o!==O(this,xo))&&We(this,gt,kb).call(this,o)}getOptimisticResult(e){const t=O(this,Zn).getQueryCache().build(O(this,Zn),e),r=this.createResult(t,e);return oz(this,r)&&(ve(this,Pn,r),ve(this,Wc,this.options),ve(this,Ma,O(this,at).state)),r}getCurrentResult(){return O(this,Pn)}trackResult(e,t){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t==null||t(i),e[i])})}),r}trackProp(e){O(this,Kc).add(e)}getCurrentQuery(){return O(this,at)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=O(this,Zn).defaultQueryOptions(e),r=O(this,Zn).getQueryCache().build(O(this,Zn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return We(this,gt,jd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Pn)))}createResult(e,t){var j;const r=O(this,at),i=this.options,s=O(this,Pn),o=O(this,Ma),a=O(this,Wc),d=e!==r?e.state:O(this,_h),{state:f}=e;let h={...f},m=!1,v;if(t._optimisticResults){const L=this.hasListeners(),Z=!L&&DR(e,t),H=L&&IR(e,r,t,i);(Z||H)&&(h={...h,...T5(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:C}=h;if(t.select&&h.data!==void 0)if(s&&h.data===(o==null?void 0:o.data)&&t.select===O(this,Eh))v=O(this,qc);else try{ve(this,Eh,t.select),v=t.select(h.data),v=bb(s==null?void 0:s.data,v,t),ve(this,qc,v),ve(this,Vi,null)}catch(L){ve(this,Vi,L)}else v=h.data;if(t.placeholderData!==void 0&&v===void 0&&C==="pending"){let L;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))L=s.data;else if(L=typeof t.placeholderData=="function"?t.placeholderData((j=O(this,Zc))==null?void 0:j.state.data,O(this,Zc)):t.placeholderData,t.select&&L!==void 0)try{L=t.select(L),ve(this,Vi,null)}catch(Z){ve(this,Vi,Z)}L!==void 0&&(C="success",v=bb(s==null?void 0:s.data,L,t),m=!0)}O(this,Vi)&&(b=O(this,Vi),v=O(this,qc),w=Date.now(),C="error");const _=h.fetchStatus==="fetching",E=C==="pending",P=C==="error",A=E&&_,T=v!==void 0,N={status:C,fetchStatus:h.fetchStatus,isPending:E,isSuccess:C==="success",isError:P,isInitialLoading:A,isLoading:A,data:v,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:_,isRefetching:_&&!E,isLoadingError:P&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:P&&T,isStale:oC(e,t),refetch:this.refetch,promise:O(this,yo)};if(this.options.experimental_prefetchInRender){const L=z=>{N.status==="error"?z.reject(N.error):N.data!==void 0&&z.resolve(N.data)},Z=()=>{const z=ve(this,yo,N.promise=wb());L(z)},H=O(this,yo);switch(H.status){case"pending":e.queryHash===r.queryHash&&L(H);break;case"fulfilled":(N.status==="error"||N.data!==H.value)&&Z();break;case"rejected":(N.status!=="error"||N.error!==H.reason)&&Z();break}}return N}updateResult(e){const t=O(this,Pn),r=this.createResult(O(this,at),this.options);if(ve(this,Ma,O(this,at).state),ve(this,Wc,this.options),O(this,Ma).data!==void 0&&ve(this,Zc,O(this,at)),Mg(r,t))return;ve(this,Pn,r);const i={},s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!O(this,Kc).size)return!0;const c=new Set(a??O(this,Kc));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,Pn)).some(d=>{const f=d;return O(this,Pn)[f]!==t[f]&&c.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),We(this,gt,M5).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,gt,_b).call(this)}},Zn=new WeakMap,at=new WeakMap,_h=new WeakMap,Pn=new WeakMap,Ma=new WeakMap,Wc=new WeakMap,yo=new WeakMap,Vi=new WeakMap,Eh=new WeakMap,qc=new WeakMap,Zc=new WeakMap,Na=new WeakMap,Oa=new WeakMap,xo=new WeakMap,Kc=new WeakMap,gt=new WeakSet,jd=function(e){We(this,gt,Pb).call(this);let t=O(this,at).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Lr)),t},Sb=function(){We(this,gt,Eb).call(this);const e=bc(this.options.staleTime,O(this,at));if(Za||O(this,Pn).isStale||!yb(e))return;const r=S5(O(this,Pn).dataUpdatedAt,e)+1;ve(this,Na,setTimeout(()=>{O(this,Pn).isStale||this.updateResult()},r))},Cb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,at)):this.options.refetchInterval)??!1},kb=function(e){We(this,gt,Rb).call(this),ve(this,xo,e),!(Za||fi(this.options.enabled,O(this,at))===!1||!yb(O(this,xo))||O(this,xo)===0)&&ve(this,Oa,setInterval(()=>{(this.options.refetchIntervalInBackground||sC.isFocused())&&We(this,gt,jd).call(this)},O(this,xo)))},_b=function(){We(this,gt,Sb).call(this),We(this,gt,kb).call(this,We(this,gt,Cb).call(this))},Eb=function(){O(this,Na)&&(clearTimeout(O(this,Na)),ve(this,Na,void 0))},Rb=function(){O(this,Oa)&&(clearInterval(O(this,Oa)),ve(this,Oa,void 0))},Pb=function(){const e=O(this,Zn).getQueryCache().build(O(this,Zn),this.options);if(e===O(this,at))return;const t=O(this,at);ve(this,at,e),ve(this,_h,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},M5=function(e){Qt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(O(this,Pn))}),O(this,Zn).getQueryCache().notify({query:O(this,at),type:"observerResultsUpdated"})})},_M);function sz(n,e){return fi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function DR(n,e){return sz(n,e)||n.state.data!==void 0&&Tb(n,e,e.refetchOnMount)}function Tb(n,e,t){if(fi(e.enabled,n)!==!1){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&oC(n,e)}return!1}function IR(n,e,t,r){return(n!==e||fi(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&oC(n,t)}function oC(n,e){return fi(e.enabled,n)!==!1&&n.isStaleByTime(bc(e.staleTime,n))}function oz(n,e){return!Mg(n.getCurrentResult(),e)}var bo,wo,Kn,Ss,Ps,ig,Ab,EM,az=(EM=class extends Tu{constructor(t,r){super();Pe(this,Ps);Pe(this,bo);Pe(this,wo);Pe(this,Kn);Pe(this,Ss);ve(this,bo,t),this.setOptions(r),this.bindMethods(),We(this,Ps,ig).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=O(this,bo).defaultMutationOptions(t),Mg(this.options,r)||O(this,bo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,Kn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():((i=O(this,Kn))==null?void 0:i.state.status)==="pending"&&O(this,Kn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=O(this,Kn))==null||t.removeObserver(this)}onMutationUpdate(t){We(this,Ps,ig).call(this),We(this,Ps,Ab).call(this,t)}getCurrentResult(){return O(this,wo)}reset(){var t;(t=O(this,Kn))==null||t.removeObserver(this),ve(this,Kn,void 0),We(this,Ps,ig).call(this),We(this,Ps,Ab).call(this)}mutate(t,r){var i;return ve(this,Ss,r),(i=O(this,Kn))==null||i.removeObserver(this),ve(this,Kn,O(this,bo).getMutationCache().build(O(this,bo),this.options)),O(this,Kn).addObserver(this),O(this,Kn).execute(t)}},bo=new WeakMap,wo=new WeakMap,Kn=new WeakMap,Ss=new WeakMap,Ps=new WeakSet,ig=function(){var r;const t=((r=O(this,Kn))==null?void 0:r.state)??A5();ve(this,wo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ab=function(t){Qt.batch(()=>{var r,i,s,o,a,c,d,f;if(O(this,Ss)&&this.hasListeners()){const h=O(this,wo).variables,m=O(this,wo).context;(t==null?void 0:t.type)==="success"?((i=(r=O(this,Ss)).onSuccess)==null||i.call(r,t.data,h,m),(o=(s=O(this,Ss)).onSettled)==null||o.call(s,t.data,null,h,m)):(t==null?void 0:t.type)==="error"&&((c=(a=O(this,Ss)).onError)==null||c.call(a,t.error,h,m),(f=(d=O(this,Ss)).onSettled)==null||f.call(d,void 0,t.error,h,m))}this.listeners.forEach(h=>{h(O(this,wo))})})},EM),N5=x.createContext(void 0),aC=n=>{const e=x.useContext(N5);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},lz=({client:n,children:e})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),y.jsx(N5.Provider,{value:n,children:e})),O5=x.createContext(!1),cz=()=>x.useContext(O5);O5.Provider;function uz(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var dz=x.createContext(uz()),fz=()=>x.useContext(dz);function j5(n,e){return typeof n=="function"?n(...e):!!n}function Mb(){}var hz=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},pz=n=>{x.useEffect(()=>{n.clearReset()},[n])},mz=({result:n,errorResetBoundary:e,throwOnError:t,query:r})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&j5(t,[n.error,r]),gz=n=>{n.suspense&&(n.staleTime===void 0&&(n.staleTime=1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},vz=(n,e)=>n.isLoading&&n.isFetching&&!e,yz=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,LR=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function xz(n,e,t){var f,h,m,v,b;const r=aC(),i=cz(),s=fz(),o=r.defaultQueryOptions(n);(h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",gz(o),hz(o,s),pz(s);const a=!r.getQueryCache().get(o.queryHash),[c]=x.useState(()=>new e(r,o)),d=c.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(w=>{const C=i?Mb:c.subscribe(Qt.batchCalls(w));return c.updateResult(),C},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),x.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),yz(o,d))throw LR(o,c,s);if(mz({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw d.error;if((v=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||v.call(m,o,d),o.experimental_prefetchInRender&&!Za&&vz(d,i)){const w=a?LR(o,c,s):(b=r.getQueryCache().get(o.queryHash))==null?void 0:b.promise;w==null||w.catch(Mb).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function bz(n,e){return xz(n,iz)}function wz(n,e){const t=aC(),[r]=x.useState(()=>new az(t,n));x.useEffect(()=>{r.setOptions(n)},[r,n]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(Qt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=x.useCallback((o,a)=>{r.mutate(o,a).catch(Mb)},[r]);if(i.error&&j5(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const $a="__TSR_index",$R="popstate",BR="beforeunload";function D5(n){let e=n.getLocation();const t=new Set,r=o=>{e=n.getLocation(),t.forEach(a=>a({location:e,action:o}))},i=o=>{n.notifyOnIndexChange??!0?r(o):e=n.getLocation()},s=async({task:o,navigateOpts:a,...c})=>{var d,f;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const m=((d=n.getBlockers)==null?void 0:d.call(n))??[],v=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&m.length&&v)for(const b of m){const w=yf(c.path,c.state);if(await b.blockerFn({currentLocation:e,nextLocation:w,action:c.type})){(f=n.onBlocked)==null||f.call(n);return}}o()};return{get location(){return e},get length(){return n.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,a,c)=>{const d=e.state[$a];a=Nb(d+1,a),s({task:()=>{n.pushState(o,a),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:a})},replace:(o,a,c)=>{const d=e.state[$a];a=Nb(d,a),s({task:()=>{n.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{n.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{n.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{n.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[$a]!==0,createHref:o=>n.createHref(o),block:o=>{var a;if(!n.setBlockers)return()=>{};const c=((a=n.getBlockers)==null?void 0:a.call(n))??[];return n.setBlockers([...c,o]),()=>{var d,f;const h=((d=n.getBlockers)==null?void 0:d.call(n))??[];(f=n.setBlockers)==null||f.call(n,h.filter(m=>m!==o))}},flush:()=>{var o;return(o=n.flush)==null?void 0:o.call(n)},destroy:()=>{var o;return(o=n.destroy)==null?void 0:o.call(n)},notify:r}}function Nb(n,e){return e||(e={}),{...e,key:kz(),[$a]:n}}function Sz(n){const e=typeof document<"u"?window:void 0,t=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,o=j=>i=j,a=j=>j,c=()=>yf(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state);let d=c(),f,h=!1,m=!1,v=!1,b=!1;const w=()=>d;let C,_;const E=()=>{C&&(N._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),N._ignoreSubscribers=!1,C=void 0,_=void 0,f=void 0)},P=(j,L,Z)=>{const H=a(L);_||(f=d),d=yf(L,Z),C={href:H,state:Z,isPush:(C==null?void 0:C.isPush)||j==="push"},_||(_=Promise.resolve().then(()=>E()))},A=j=>{d=c(),N.notify({type:j})},T=async()=>{if(m){m=!1;return}const j=c(),L=j.state[$a]-d.state[$a],Z=L===1,H=L===-1,z=!Z&&!H||h;h=!1;const oe=z?"GO":H?"BACK":"FORWARD",ne=z?{type:"GO",index:L}:{type:H?"BACK":"FORWARD"};if(v)v=!1;else{const ce=s();if(typeof document<"u"&&ce.length){for(const se of ce)if(await se.blockerFn({currentLocation:d,nextLocation:j,action:oe})){m=!0,e.history.go(1),N.notify(ne);return}}}d=c(),N.notify(ne)},M=j=>{if(b){b=!1;return}let L=!1;const Z=s();if(typeof document<"u"&&Z.length)for(const H of Z){const z=H.enableBeforeUnload??!0;if(z===!0){L=!0;break}if(typeof z=="function"&&z()===!0){L=!0;break}}if(L)return j.preventDefault(),j.returnValue=""},N=D5({getLocation:w,getLength:()=>e.history.length,pushState:(j,L)=>P("push",j,L),replaceState:(j,L)=>P("replace",j,L),back:j=>(j&&(v=!0),b=!0,e.history.back()),forward:j=>{j&&(v=!0),b=!0,e.history.forward()},go:j=>{h=!0,e.history.go(j)},createHref:j=>a(j),flush:E,destroy:()=>{e.history.pushState=t,e.history.replaceState=r,e.removeEventListener(BR,M,{capture:!0}),e.removeEventListener($R,T)},onBlocked:()=>{f&&d!==f&&(d=f)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(BR,M,{capture:!0}),e.addEventListener($R,T),e.history.pushState=function(...j){const L=t.apply(e.history,j);return N._ignoreSubscribers||A("PUSH"),L},e.history.replaceState=function(...j){const L=r.apply(e.history,j);return N._ignoreSubscribers||A("REPLACE"),L},N}function Cz(n={initialEntries:["/"]}){const e=n.initialEntries;let t=n.initialIndex?Math.min(Math.max(n.initialIndex,0),e.length-1):e.length-1;const r=e.map((s,o)=>Nb(o,void 0));return D5({getLocation:()=>yf(e[t],r[t]),getLength:()=>e.length,pushState:(s,o)=>{t{r[t]=o,e[t]=s},back:()=>{t=Math.max(t-1,0)},forward:()=>{t=Math.min(t+1,e.length-1)},go:s=>{t=Math.min(Math.max(t+s,0),e.length-1)},createHref:s=>s})}function yf(n,e){const t=n.indexOf("#"),r=n.indexOf("?");return{href:n,pathname:n.substring(0,t>0?r>0?Math.min(t,r):t:r>0?r:n.length),hash:t>-1?n.substring(t):"",search:r>-1?n.slice(r,t===-1?void 0:t):"",state:e||{[$a]:0}}}function kz(){return(Math.random()+1).toString(36).substring(7)}var _z="Invariant failed";function yr(n,e){if(!n)throw new Error(_z)}const K1=x.createContext(null);function I5(){return typeof document>"u"?K1:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=K1,K1)}function fl(n){const e=x.useContext(I5());return n==null||n.warn,e}var G1={exports:{}},Q1={},J1={exports:{}},Y1={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var FR;function Ez(){if(FR)return Y1;FR=1;var n=Ph();function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,i=n.useEffect,s=n.useLayoutEffect,o=n.useDebugValue;function a(h,m){var v=m(),b=r({inst:{value:v,getSnapshot:m}}),w=b[0].inst,C=b[1];return s(function(){w.value=v,w.getSnapshot=m,c(w)&&C({inst:w})},[h,v,m]),i(function(){return c(w)&&C({inst:w}),h(function(){c(w)&&C({inst:w})})},[h]),o(v),v}function c(h){var m=h.getSnapshot;h=h.value;try{var v=m();return!t(h,v)}catch{return!0}}function d(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return Y1.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:f,Y1}var zR;function Rz(){return zR||(zR=1,J1.exports=Ez()),J1.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var VR;function Pz(){if(VR)return Q1;VR=1;var n=Ph(),e=Rz();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,s=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return Q1.useSyncExternalStoreWithSelector=function(d,f,h,m,v){var b=s(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=a(function(){function _(M){if(!E){if(E=!0,P=M,M=m(M),v!==void 0&&w.hasValue){var N=w.value;if(v(N,M))return A=N}return A=M}if(N=A,r(P,M))return N;var j=m(M);return v!==void 0&&v(N,j)?(P=M,N):(P=M,A=j)}var E=!1,P,A,T=h===void 0?null:h;return[function(){return _(f())},T===null?void 0:function(){return _(T())}]},[f,h,m,v]);var C=i(d,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=C},[C]),c(C),C},Q1}var HR;function Tz(){return HR||(HR=1,G1.exports=Pz()),G1.exports}var Az=Tz();const wc=new WeakMap,sg=new WeakMap,Og={current:[]};let X1=!1,Jd=0;const Dd=new Set,fm=new Map;function L5(n){const e=Array.from(n).sort((t,r)=>t instanceof Sc&&t.options.deps.includes(r)?1:r instanceof Sc&&r.options.deps.includes(t)?-1:0);for(const t of e){if(Og.current.includes(t))continue;Og.current.push(t),t.recompute();const r=sg.get(t);if(r)for(const i of r){const s=wc.get(i);s&&L5(s)}}}function Mz(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function Nz(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function $5(n){if(Jd>0&&!fm.has(n)&&fm.set(n,n.prevState),Dd.add(n),!(Jd>0)&&!X1)try{for(X1=!0;Dd.size>0;){const e=Array.from(Dd);Dd.clear();for(const t of e){const r=fm.get(t)??t.prevState;t.prevState=r,Mz(t)}for(const t of e){const r=wc.get(t);r&&(Og.current.push(t),L5(r))}for(const t of e){const r=wc.get(t);if(r)for(const i of r)Nz(i)}}}finally{X1=!1,Og.current=[],fm.clear()}}function ex(n){Jd++;try{n()}finally{if(Jd--,Jd===0){const e=Array.from(Dd)[0];e&&$5(e)}}}class Ob{constructor(e,t){this.listeners=new Set,this.subscribe=r=>{var i,s;this.listeners.add(r);const o=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=>{this.listeners.delete(r),o==null||o()}},this.setState=r=>{var i,s,o;this.prevState=this.state,this.state=(i=this.options)!=null&&i.updateFn?this.options.updateFn(this.prevState)(r):r(this.prevState),(o=(s=this.options)==null?void 0:s.onUpdate)==null||o.call(s),$5(this)},this.prevState=e,this.state=e,this.options=t}}class Sc{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const t=[],r=[];for(const i of this.options.deps)t.push(i.prevState),r.push(i.state);return this.lastSeenDepValues=r,{prevDepVals:t,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var t,r;this.prevState=this.state;const{prevDepVals:i,currDepVals:s,prevVal:o}=this.getDepVals();this.state=this.options.fn({prevDepVals:i,currDepVals:s,prevVal:o}),(r=(t=this.options).onUpdate)==null||r.call(t)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof Sc&&s.checkIfRecalculationNeededDeeply();let t=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const t of this._subscriptions)t()}),this.subscribe=t=>{var r,i;this.listeners.add(t);const s=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,t,this);return()=>{this.listeners.delete(t),s==null||s()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const t of e)if(t instanceof Sc)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof Ob){let r=wc.get(t);r||(r=new Set,wc.set(t,r)),r.add(this);let i=sg.get(this);i||(i=new Set,sg.set(this,i)),i.add(t)}}unregisterFromGraph(e=this.options.deps){for(const t of e)if(t instanceof Sc)this.unregisterFromGraph(t.options.deps);else if(t instanceof Ob){const r=wc.get(t);r&&r.delete(this);const i=sg.get(this);i&&i.delete(t)}}}function Oz(n,e=t=>t){return Az.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,e,jz)}function jz(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;if(n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(const[r,i]of n)if(!e.has(r)||!Object.is(i,e.get(r)))return!1;return!0}if(n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(const r of n)if(!e.has(r))return!1;return!0}const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let r=0;r{e.substring(0,1)==="?"&&(e=e.substring(1));const t=Iz(e);for(const r in t){const i=t[r];if(typeof i=="string")try{t[r]=n(i)}catch{}}return t}}function Fz(n,e){function t(r){if(typeof r=="object"&&r!==null)try{return n(r)}catch{}else if(typeof r=="string"&&typeof e=="function")try{return e(r),n(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(s=>{const o=r[s];typeof o>"u"||o===void 0?delete r[s]:r[s]=t(o)});const i=Dz(r).toString();return i?`?${i}`:""}}function Yd(n){return n[n.length-1]}function zz(n){return typeof n=="function"}function hm(n,e){return zz(n)?n(e):n}function og(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function Dr(n,e){if(n===e)return n;const t=e,r=qR(n)&&qR(t);if(r||Eo(n)&&Eo(t)){const i=r?n:Object.keys(n),s=i.length,o=r?t:Object.keys(t),a=o.length,c=r?[]:{};let d=0;for(let f=0;f"u")return!0;const t=e.prototype;return!(!WR(t)||!t.hasOwnProperty("isPrototypeOf"))}function WR(n){return Object.prototype.toString.call(n)==="[object Object]"}function qR(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ZR(n,e){let t=Object.keys(n);return e&&(t=t.filter(r=>n[r]!==void 0)),t}function Xd(n,e,t){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(Eo(n)&&Eo(e)){const r=(t==null?void 0:t.ignoreUndefined)??!0,i=ZR(n,r),s=ZR(e,r);return!(t!=null&&t.partial)&&i.length!==s.length?!1:s.every(o=>Xd(n[o],e[o],t))}return Array.isArray(n)&&Array.isArray(e)?n.length!==e.length?!1:!n.some((r,i)=>!Xd(r,e[i],t)):!1}const pm=typeof window<"u"?x.useLayoutEffect:x.useEffect;function tc(n){let e,t;const r=new Promise((i,s)=>{e=i,t=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,e(i),n==null||n(i)},r.reject=i=>{r.status="rejected",t(i)},r}function tx(n){const e=x.useRef({value:n,prev:null}),t=e.current.value;return n!==t&&(e.current={value:n,prev:t}),e.current.prev}function Es(n){return Xv(n.filter(e=>e!==void 0).join("/"))}function Xv(n){return n.replace(/\/{2,}/g,"/")}function lC(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function Ca(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function Vz(n){return Ca(lC(n))}function Hz({basepath:n,base:e,to:t,trailingSlash:r="never",caseSensitive:i}){var s,o;e=jg(n,e,i),t=jg(n,t,i);let a=Yc(e);const c=Yc(t);a.length>1&&((s=Yd(a))==null?void 0:s.value)==="/"&&a.pop(),c.forEach((f,h)=>{f.value==="/"?h?h===c.length-1&&a.push(f):a=[f]:f.value===".."?a.pop():f.value==="."||a.push(f)}),a.length>1&&(((o=Yd(a))==null?void 0:o.value)==="/"?r==="never"&&a.pop():r==="always"&&a.push({type:"pathname",value:"/"}));const d=Es([n,...a.map(f=>f.value)]);return Xv(d)}function Yc(n){if(!n)return[];n=Xv(n);const e=[];if(n.slice(0,1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),!n)return e;const t=n.split("/").filter(Boolean);return e.push(...t.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURI(r)})),n.slice(-1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),e}function mm({path:n,params:e,leaveWildcards:t,leaveParams:r,decodeCharMap:i}){const s=Yc(n),o={};for(const[a,c]of Object.entries(e)){const d=typeof c=="string";["*","_splat"].includes(a)?o[a]=d?encodeURI(c):c:o[a]=d?Uz(c,i):c}return Es(s.map(a=>{if(a.type==="wildcard"){const c=o._splat;return t?`${a.value}${c??""}`:c}if(a.type==="param"){if(r){const c=o[a.value];return`${a.value}${c??""}`}return o[a.value.substring(1)]??"undefined"}return a.value}))}function Uz(n,e){let t=encodeURIComponent(n);if(e)for(const[r,i]of e)t=t.replaceAll(r,i);return t}function gm(n,e,t){const r=Wz(n,e,t);if(!(t.to&&!r))return r??{}}function jg(n,e,t=!1){const r=t?n:n.toLowerCase(),i=t?e:e.toLowerCase();switch(!0){case r==="/":return e;case i===r:return"";case e.length{for(let c=0;c=i.length-1,m=c>=s.length-1;if(f){if(f.type==="wildcard"){const v=decodeURI(Es(i.slice(c).map(b=>b.value)));return o["*"]=v,o._splat=v,!0}if(f.type==="pathname"){if(f.value==="/"&&!(d!=null&&d.value))return!0;if(d){if(t.caseSensitive){if(f.value!==d.value)return!1}else if(f.value.toLowerCase()!==d.value.toLowerCase())return!1}}if(!d)return!1;if(f.type==="param"){if(d.value==="/")return!1;d.value.charAt(0)!=="$"&&(o[f.value.substring(1)]=decodeURIComponent(d.value))}}if(!h&&m)return o["**"]=Es(i.slice(c+1).map(v=>v.value)),!!t.fuzzy&&(f==null?void 0:f.value)!=="/"}return!0})()?o:void 0}function ga(n){return!!(n!=null&&n.isRedirect)}function nx(n){return!!(n!=null&&n.isRedirect)&&n.href}function cC(n){const e=n.errorComponent??ey;return y.jsx(qz,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:t,reset:r})=>t?x.createElement(e,{error:t,reset:r}):n.children})}class qz extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ey({error:n}){const[e,t]=x.useState(!1);return y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),y.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:e?"Hide Error":"Show Error"})]}),y.jsx("div",{style:{height:".25rem"}}),e?y.jsx("div",{children:y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?y.jsx("code",{children:n.message}):null})}):null]})}function Hr(n){const e=fl({warn:(n==null?void 0:n.router)===void 0}),t=(n==null?void 0:n.router)||e,r=x.useRef();return Oz(t.__store,i=>{if(n!=null&&n.select){if(n.structuralSharing??t.options.defaultStructuralSharing){const s=Dr(r.current,n.select(i));return r.current=s,s}return n.select(i)}return i})}function di(n){return!!(n!=null&&n.isNotFound)}function Zz(n){const e=Hr({select:t=>`not-found-${t.location.pathname}-${t.status}`});return y.jsx(cC,{getResetKey:()=>e,onCatch:(t,r)=>{var i;if(di(t))(i=n.onCatch)==null||i.call(n,t,r);else throw t},errorComponent:({error:t})=>{var r;if(di(t))return(r=n.fallback)==null?void 0:r.call(n,t);throw t},children:n.children})}function Kz(){return y.jsx("p",{children:"Not Found"})}const Id={stringify:n=>JSON.stringify(n,function(t,r){const i=this[t],s=ym.find(o=>o.stringifyCondition(i));return s?s.stringify(i):r}),parse:n=>JSON.parse(n,function(t,r){const i=this[t];if(Eo(i)){const s=ym.find(o=>o.parseCondition(i));if(s)return s.parse(i)}return r}),encode:n=>{if(Array.isArray(n))return n.map(t=>Id.encode(t));if(Eo(n))return Object.fromEntries(Object.entries(n).map(([t,r])=>[t,Id.encode(r)]));const e=ym.find(t=>t.stringifyCondition(n));return e?e.stringify(n):n},decode:n=>{if(Eo(n)){const e=ym.find(t=>t.parseCondition(n));if(e)return e.parse(n)}return Array.isArray(n)?n.map(e=>Id.decode(e)):Eo(n)?Object.fromEntries(Object.entries(n).map(([e,t])=>[e,Id.decode(t)])):n}},vm=(n,e,t,r)=>({key:n,stringifyCondition:e,stringify:i=>({[`$${n}`]:t(i)}),parseCondition:i=>Object.hasOwn(i,`$${n}`),parse:i=>r(i[`$${n}`])}),ym=[vm("undefined",n=>n===void 0,()=>0,()=>{}),vm("date",n=>n instanceof Date,n=>n.toISOString(),n=>new Date(n)),vm("error",n=>n instanceof Error,n=>({...n,message:n.message,stack:n.stack,cause:n.cause}),n=>Object.assign(new Error(n.message),n)),vm("formData",n=>n instanceof FormData,n=>{const e={};return n.forEach((t,r)=>{const i=e[r];i!==void 0?Array.isArray(i)?i.push(t):e[r]=[i,t]:e[r]=t}),e},n=>{const e=new FormData;return Object.entries(n).forEach(([t,r])=>{Array.isArray(r)?r.forEach(i=>e.append(t,i)):e.append(t,r)}),e})],B5=["component","errorComponent","pendingComponent","notFoundComponent"];function Gz(n){var e;for(const t of B5)if((e=n.options[t])!=null&&e.preload)return!0;return!1}function rx(n,e){if(n==null)return{};if("~standard"in n){const t=n["~standard"].validate(e);if(t instanceof Promise)throw new jb("Async validation not supported");if(t.issues)throw new jb(JSON.stringify(t.issues,void 0,2));return t.value}return"parse"in n?n.parse(e):typeof n=="function"?n(e):{}}function Qz(n){return new Jz(n)}class Jz{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=t=>t(),this.update=t=>{var r;t.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options;this.options={...this.options,...t},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(s=>[encodeURIComponent(s),s])):void 0,(!this.basepath||t.basepath&&t.basepath!==i.basepath)&&(t.basepath===void 0||t.basepath===""||t.basepath==="/"?this.basepath="/":this.basepath=`/${Vz(t.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?Cz({initialEntries:[this.basepath||"/"]}):Sz()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Ob(Xz(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(s=>!["redirected"].includes(s.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((r=window.CSS)==null?void 0:r.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const t=this.options.notFoundRoute;t&&(t.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[t.id]=t);const r=o=>{o.forEach((a,c)=>{a.init({originalIndex:c,defaultSsr:this.options.defaultSsr});const d=this.routesById[a.id];if(yr(!d,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const h=Ca(a.fullPath);(!this.routesByPath[h]||a.fullPath.endsWith("/"))&&(this.routesByPath[h]=a)}const f=a.children;f!=null&&f.length&&r(f)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((o,a)=>{var c;if(o.isRoot||!o.path)return;const d=lC(o.fullPath),f=Yc(d);for(;f.length>1&&((c=f[0])==null?void 0:c.value)==="/";)f.shift();const h=f.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);i.push({child:o,trimmed:d,parsed:f,index:a,scores:h})}),this.flatRoutes=i.sort((o,a)=>{const c=Math.min(o.scores.length,a.scores.length);for(let d=0;da.parsed[d].value?1:-1;return o.index-a.index}).map((o,a)=>(o.child.rank=a,o.child))},this.subscribe=(t,r)=>{const i={eventType:t,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=t=>{this.subscribers.forEach(r=>{r.eventType===t.type&&r.fn(t)})},this.parseLocation=(t,r)=>{const i=({pathname:c,search:d,hash:f,state:h})=>{const m=this.options.parseSearch(d),v=this.options.stringifySearch(m);return{pathname:c,searchStr:v,search:Dr(t==null?void 0:t.search,m),hash:f.split("#").reverse()[0]??"",href:`${c}${v}${f}`,state:Dr(t==null?void 0:t.state,h)}},s=i(r??this.history.location),{__tempLocation:o,__tempKey:a}=s.state;if(o&&(!a||a===this.tempLocationKey)){const c=i(o);return c.state.key=s.state.key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(t,r)=>Hz({basepath:this.basepath,base:t,to:Xv(r),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(t,r)=>{let i={};const s=Ca(t.pathname),o=f=>gm(this.basepath,s,{to:f.fullPath,caseSensitive:f.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let a=(r==null?void 0:r.to)!==void 0?this.routesByPath[r.to]:void 0;a?i=o(a):a=this.flatRoutes.find(f=>{const h=o(f);return h?(i=h,!0):!1});let c=a||this.routesById[gr];const d=[c];for(;c.parentRoute;)c=c.parentRoute,d.unshift(c);return{matchedRoutes:d,routeParams:i,foundRoute:a}},this.cancelMatch=t=>{const r=this.getMatch(t);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var t;(t=this.state.pendingMatches)==null||t.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=t=>{const r=(s={},o)=>{var a,c,d,f,h,m;const v=s._fromLocation?this.matchRoutes(s._fromLocation,{_buildLocation:!0}):this.state.matches,b=s.from!=null?v.find(H=>gm(this.basepath,Ca(H.pathname),{to:s.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(b==null?void 0:b.pathname)||this.latestLocation.pathname;yr(s.from==null||b!=null,"Could not find match for from: "+s.from);const C=(a=this.state.pendingMatches)!=null&&a.length?(c=Yd(this.state.pendingMatches))==null?void 0:c.search:((d=Yd(v))==null?void 0:d.search)||this.latestLocation.search,_=o==null?void 0:o.matchedRoutes.filter(H=>v.find(z=>z.routeId===H.id));let E;if(s.to)E=this.resolvePathWithBase(w,`${s.to}`);else{const H=this.routesById[(f=_==null?void 0:_.find(z=>{const oe=mm({path:z.fullPath,params:(o==null?void 0:o.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Es([this.basepath,oe])===w}))==null?void 0:f.id];E=this.resolvePathWithBase(w,(H==null?void 0:H.to)??w)}const P={...(h=Yd(v))==null?void 0:h.params};let A=(s.params??!0)===!0?P:{...P,...hm(s.params,P)};Object.keys(A).length>0&&(o==null||o.matchedRoutes.map(H=>{var z;return((z=H.options.params)==null?void 0:z.stringify)??H.options.stringifyParams}).filter(Boolean).forEach(H=>{A={...A,...H(A)}})),E=mm({path:E,params:A??{},leaveWildcards:!1,leaveParams:t.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let T=C;if(t._includeValidateSearch&&((m=this.options.search)!=null&&m.strict)){let H={};o==null||o.matchedRoutes.forEach(z=>{try{z.options.validateSearch&&(H={...H,...rx(z.options.validateSearch,{...H,...T})??{}})}catch{}}),T=H}T=(H=>{const z=(o==null?void 0:o.matchedRoutes.reduce((ce,se)=>{var pe;const G=[];if("search"in se.options)(pe=se.options.search)!=null&&pe.middlewares&&G.push(...se.options.search.middlewares);else if(se.options.preSearchFilters||se.options.postSearchFilters){const Q=({search:re,next:$})=>{let I=re;"preSearchFilters"in se.options&&se.options.preSearchFilters&&(I=se.options.preSearchFilters.reduce((ee,J)=>J(ee),re));const U=$(I);return"postSearchFilters"in se.options&&se.options.postSearchFilters?se.options.postSearchFilters.reduce((ee,J)=>J(ee),U):U};G.push(Q)}if(t._includeValidateSearch&&se.options.validateSearch){const Q=({search:re,next:$})=>{try{const I=$(re);return{...I,...rx(se.options.validateSearch,I)??{}}}catch{}};G.push(Q)}return ce.concat(G)},[]))??[],oe=({search:ce})=>s.search?s.search===!0?ce:hm(s.search,ce):{};z.push(oe);const ne=(ce,se)=>{if(ce>=z.length)return se;const pe=z[ce];return pe({search:se,next:Q=>ne(ce+1,Q)})};return ne(0,H)})(T),T=Dr(C,T);const N=this.options.stringifySearch(T),j=s.hash===!0?this.latestLocation.hash:s.hash?hm(s.hash,this.latestLocation.hash):void 0,L=j?`#${j}`:"";let Z=s.state===!0?this.latestLocation.state:s.state?hm(s.state,this.latestLocation.state):{};return Z=Dr(this.latestLocation.state,Z),{pathname:E,search:T,searchStr:N,state:Z,hash:j??"",href:`${E}${N}${L}`,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{var a;const c=r(s);let d=o?r(o):void 0;if(!d){let m={};const v=(a=this.options.routeMasks)==null?void 0:a.find(b=>{const w=gm(this.basepath,c.pathname,{to:b.from,caseSensitive:!1,fuzzy:!1});return w?(m=w,!0):!1});if(v){const{from:b,...w}=v;o={...og(t,["from"]),...w,params:m},d=r(o)}}const f=this.getMatchedRoutes(c,s),h=r(s,f);if(d){const m=this.getMatchedRoutes(d,o),v=r(o,m);h.maskedLocation=v}return h};return t.mask?i(t,{...og(t,["from"]),...t.mask}):i(t)},this.commitLocation=({viewTransition:t,ignoreBlocker:r,...i})=>{const s=()=>{i.state.key=this.latestLocation.state.key;const c=Xd(i.state,this.latestLocation.state);return delete i.state.key,c},o=this.latestLocation.href===i.href,a=this.commitLocationPromise;if(this.commitLocationPromise=tc(()=>{a==null||a.resolve()}),o&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:d,...f}=i;c&&(f={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[i.replace?"replace":"push"](f.href,f.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...c}={})=>{if(a){const f=this.history.location.state.__TSR_index,h=yf(a,{__TSR_index:t?f:f+1});c.to=h.pathname,c.search=this.options.parseSearch(h.search),c.hash=h.hash.slice(1)}const d=this.buildLocation({...c,_includeValidateSearch:!0});return this.commitLocation({...d,viewTransition:s,replace:t,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o})},this.navigate=({to:t,reloadDocument:r,href:i,...s})=>{if(r){i||(i=this.buildLocation({to:t,...s}).href),s.replace?window.location.replace(i):window.location.href=i;return}return this.buildAndCommitLocation({...s,href:i,to:t})},this.load=async t=>{this.latestLocation=this.parseLocation(this.latestLocation);let r,i,s;for(s=new Promise(o=>{this.startReactTransition(async()=>{var a;try{const c=this.latestLocation,d=this.state.resolvedLocation,f=d.href!==c.href,h=d.pathname!==c.pathname;this.cancelMatches();let m;ex(()=>{m=this.matchRoutes(c),this.__store.setState(v=>({...v,status:"pending",isLoading:!0,location:c,pendingMatches:m,cachedMatches:v.cachedMatches.filter(b=>!m.find(w=>w.id===b.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:d,toLocation:c,pathChanged:h,hrefChanged:f}),this.emit({type:"onBeforeLoad",fromLocation:d,toLocation:c,pathChanged:h,hrefChanged:f}),await this.loadMatches({sync:t==null?void 0:t.sync,matches:m,location:c,onReady:async()=>{this.startViewTransition(async()=>{let v,b,w;ex(()=>{this.__store.setState(C=>{const _=C.matches,E=C.pendingMatches||C.matches;return v=_.filter(P=>!E.find(A=>A.id===P.id)),b=E.filter(P=>!_.find(A=>A.id===P.id)),w=_.filter(P=>E.find(A=>A.id===P.id)),{...C,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...C.cachedMatches,...v.filter(P=>P.status!=="error")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[b,"onEnter"],[w,"onStay"]].forEach(([C,_])=>{C.forEach(E=>{var P,A;(A=(P=this.looseRoutesById[E.routeId].options)[_])==null||A.call(P,E)})})})}})}catch(c){nx(c)?(r=c,this.isServer||this.navigate({...r,replace:!0,ignoreBlocker:!0})):di(c)&&(i=c),this.__store.setState(d=>({...d,statusCode:r?r.statusCode:i?404:d.matches.some(f=>f.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=t=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;typeof r=="object"&&this.isViewTransitionTypesSupported?i={update:t,types:r.types}:i=t,document.startViewTransition(i)}else t()},this.updateMatch=(t,r)=>{var i;let s;const o=(i=this.state.pendingMatches)==null?void 0:i.find(f=>f.id===t),a=this.state.matches.find(f=>f.id===t),c=this.state.cachedMatches.find(f=>f.id===t),d=o?"pendingMatches":a?"matches":c?"cachedMatches":"";return d&&this.__store.setState(f=>{var h;return{...f,[d]:(h=f[d])==null?void 0:h.map(m=>m.id===t?s=r(m):m)}}),s},this.getMatch=t=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===t),this.loadMatches=async({location:t,matches:r,preload:i,onReady:s,updateMatch:o=this.updateMatch,sync:a})=>{let c,d=!1;const f=async()=>{d||(d=!0,await(s==null?void 0:s()))},h=v=>!!(i&&!this.state.matches.find(b=>b.id===v));!this.isServer&&!this.state.matches.length&&f();const m=(v,b)=>{var w,C,_;if(nx(b)&&!b.reloadDocument)throw b;if(ga(b)||di(b)){if(o(v.id,E=>({...E,status:ga(b)?"redirected":di(b)?"notFound":"error",isFetching:!1,error:b,beforeLoadPromise:void 0,loaderPromise:void 0})),b.routeId||(b.routeId=v.routeId),(w=v.beforeLoadPromise)==null||w.resolve(),(C=v.loaderPromise)==null||C.resolve(),(_=v.loadPromise)==null||_.resolve(),ga(b))throw d=!0,b=this.resolveRedirect({...b,_fromLocation:t}),b;if(di(b))throw this._handleNotFound(r,b,{updateMatch:o}),b}};try{await new Promise((v,b)=>{(async()=>{var w,C,_;try{const E=(T,M,N)=>{var j,L;const{id:Z,routeId:H}=r[T],z=this.looseRoutesById[H];if(M instanceof Promise)throw M;M.routerCode=N,c=c??T,m(this.getMatch(Z),M);try{(L=(j=z.options).onError)==null||L.call(j,M)}catch(oe){M=oe,m(this.getMatch(Z),M)}o(Z,oe=>{var ne,ce;return(ne=oe.beforeLoadPromise)==null||ne.resolve(),(ce=oe.loadPromise)==null||ce.resolve(),{...oe,error:M,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[T,{id:M,routeId:N}]of r.entries()){const j=this.getMatch(M),L=(w=r[T-1])==null?void 0:w.id,Z=this.looseRoutesById[N],H=Z.options.pendingMs??this.options.defaultPendingMs,z=!!(s&&!this.isServer&&!h(M)&&(Z.options.loader||Z.options.beforeLoad)&&typeof H=="number"&&H!==1/0&&(Z.options.pendingComponent??this.options.defaultPendingComponent));let oe=!0;if((j.beforeLoadPromise||j.loaderPromise)&&(z&&setTimeout(()=>{try{f()}catch{}},H),await j.beforeLoadPromise,oe=this.getMatch(M).status!=="success"),oe){try{o(M,te=>({...te,loadPromise:tc(()=>{var ae;(ae=te.loadPromise)==null||ae.resolve()}),beforeLoadPromise:tc()}));const ne=new AbortController;let ce;z&&(ce=setTimeout(()=>{try{f()}catch{}},H));const{paramsError:se,searchError:pe}=this.getMatch(M);se&&E(T,se,"PARSE_PARAMS"),pe&&E(T,pe,"VALIDATE_SEARCH");const G=()=>L?this.getMatch(L).context:this.options.context??{};o(M,te=>({...te,isFetching:"beforeLoad",fetchCount:te.fetchCount+1,abortController:ne,pendingTimeout:ce,context:{...G(),...te.__routeContext}}));const{search:Q,params:re,context:$,cause:I}=this.getMatch(M),U=h(M),ee={search:Q,abortController:ne,params:re,preload:U,context:$,location:t,navigate:te=>this.navigate({...te,_fromLocation:t}),buildLocation:this.buildLocation,cause:U?"preload":I,matches:r};let J=await((_=(C=Z.options).beforeLoad)==null?void 0:_.call(C,ee))??{};this.serializeLoaderData&&(J=this.serializeLoaderData("__beforeLoadContext",J,{router:this,match:this.getMatch(M)})),(ga(J)||di(J))&&E(T,J,"BEFORE_LOAD"),o(M,te=>({...te,__beforeLoadContext:J,context:{...G(),...te.__routeContext,...J},abortController:ne}))}catch(ne){E(T,ne,"BEFORE_LOAD")}o(M,ne=>{var ce;return(ce=ne.beforeLoadPromise)==null||ce.resolve(),{...ne,beforeLoadPromise:void 0,isFetching:!1}})}}const P=r.slice(0,c),A=[];P.forEach(({id:T,routeId:M},N)=>{A.push((async()=>{const{loaderPromise:j}=this.getMatch(T);let L=!1,Z=!1;if(j){await j;const H=this.getMatch(T);H.error&&m(H,H.error)}else{const H=A[N-1],z=this.looseRoutesById[M],oe=()=>{const{params:I,loaderDeps:U,abortController:ee,context:J,cause:te}=this.getMatch(T),ae=h(T);return{params:I,deps:U,preload:!!ae,parentMatchPromise:H,abortController:ee,context:J,location:t,navigate:ye=>this.navigate({...ye,_fromLocation:t}),cause:ae?"preload":te,route:z}},ne=Date.now()-this.getMatch(T).updatedAt,ce=h(T),se=ce?z.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:z.options.staleTime??this.options.defaultStaleTime??0,pe=z.options.shouldReload,G=typeof pe=="function"?pe(oe()):pe;o(T,I=>({...I,loaderPromise:tc(),preload:!!ce&&!this.state.matches.find(U=>U.id===T)}));const Q=async()=>{var I,U,ee,J,te,ae,ye,Se;try{const Fe=async()=>{const ct=this.getMatch(T);ct.minPendingPromise&&await ct.minPendingPromise};try{this.loadRouteChunk(z),o(T,or=>({...or,isFetching:"loader"}));let ct=await((U=(I=z.options).loader)==null?void 0:U.call(I,oe()));this.serializeLoaderData&&(ct=this.serializeLoaderData("loaderData",ct,{router:this,match:this.getMatch(T)})),m(this.getMatch(T),ct),await z._lazyPromise,await Fe();const wt=(J=(ee=z.options).head)==null?void 0:J.call(ee,{matches:r,match:this.getMatch(T),params:this.getMatch(T).params,loaderData:ct}),Xe=wt==null?void 0:wt.meta,Vt=wt==null?void 0:wt.links,Rr=wt==null?void 0:wt.scripts,Xr=(ae=(te=z.options).headers)==null?void 0:ae.call(te,{loaderData:ct});o(T,or=>({...or,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:ct,meta:Xe,links:Vt,scripts:Rr,headers:Xr}))}catch(ct){let wt=ct;await Fe(),m(this.getMatch(T),ct);try{(Se=(ye=z.options).onError)==null||Se.call(ye,ct)}catch(Xe){wt=Xe,m(this.getMatch(T),Xe)}o(T,Xe=>({...Xe,error:wt,status:"error",isFetching:!1}))}await z._componentsPromise}catch(Fe){o(T,ct=>({...ct,loaderPromise:void 0})),m(this.getMatch(T),Fe)}},{status:re,invalid:$}=this.getMatch(T);L=re==="success"&&($||(G??ne>se)),ce&&z.options.preload===!1||(L&&!a?(Z=!0,(async()=>{try{await Q();const{loaderPromise:I,loadPromise:U}=this.getMatch(T);I==null||I.resolve(),U==null||U.resolve(),o(T,ee=>({...ee,loaderPromise:void 0}))}catch(I){nx(I)&&await this.navigate(I)}})()):(re!=="success"||L&&a)&&await Q())}if(!Z){const{loaderPromise:H,loadPromise:z}=this.getMatch(T);H==null||H.resolve(),z==null||z.resolve()}return o(T,H=>({...H,isFetching:Z?H.isFetching:!1,loaderPromise:Z?H.loaderPromise:void 0,invalid:!1})),this.getMatch(T)})())}),await Promise.all(A),v()}catch(E){b(E)}})()}),await f()}catch(v){if(ga(v)||di(v))throw di(v)&&!i&&await f(),v}return r},this.invalidate=t=>{const r=i=>{var s;return((s=t==null?void 0:t.filter)==null?void 0:s.call(t,i))??!0?{...i,invalid:!0,...i.status==="error"?{status:"pending",error:void 0}:{}}:i};return this.__store.setState(i=>{var s;return{...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:(s=i.pendingMatches)==null?void 0:s.map(r)}}),this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t;return r.href||(r.href=this.buildLocation(r).href),r},this.clearCache=t=>{const r=t==null?void 0:t.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(s=>!r(s))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const s=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(r.status!=="error"&&Date.now()-r.updatedAt(t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(t.options,s)}):t._lazyPromise=Promise.resolve()),t._componentsPromise===void 0&&(t._componentsPromise=t._lazyPromise.then(()=>Promise.all(B5.map(async r=>{const i=t.options[r];i!=null&&i.preload&&await i.preload()})))),t._componentsPromise),this.preloadRoute=async t=>{const r=this.buildLocation(t);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:t});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),o=new Set([...s,...this.state.cachedMatches.map(a=>a.id)]);ex(()=>{i.forEach(a=>{o.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return i=await this.loadMatches({matches:i,location:r,preload:!0,updateMatch:(a,c)=>{s.has(a)?i=i.map(d=>d.id===a?c(d):d):this.updateMatch(a,c)}}),i}catch(a){if(ga(a))return a.reloadDocument?void 0:await this.preloadRoute({...a,_fromLocation:r});console.error(a);return}},this.matchRoute=(t,r)=>{const i={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},s=this.buildLocation(i);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,c=gm(this.basepath,a.pathname,{...r,to:s.pathname});return!c||t.params&&!Xd(c,t.params,{partial:!0})?!1:c&&((r==null?void 0:r.includeSearch)??!0)?Xd(a.search,s.search,{partial:!0})?c:!1:c},this.dehydrate=()=>{var t;const r=((t=this.options.errorSerializer)==null?void 0:t.serialize)??eV;return{state:{dehydratedMatches:this.state.matches.map(i=>({...og(i,["id","status","updatedAt"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var t,r,i;let s;typeof document<"u"&&(s=this.options.transformer.parse((t=window.__TSR__)==null?void 0:t.dehydrated)),yr(s),this.dehydratedData=s.payload,(i=(r=this.options).hydrate)==null||i.call(r,s.payload);const o=s.router.state,a=this.matchRoutes(this.state.location).map(c=>{const d=o.dehydratedMatches.find(f=>f.id===c.id);return yr(d,`Could not find a client-side match for dehydrated match with id: ${c.id}!`),{...c,...d}});this.__store.setState(c=>({...c,matches:a})),this.manifest=s.router.manifest},this.injectedHtml=[],this.injectHtml=t=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(i=>i!==r),t);this.injectedHtml.push(r)},this.injectScript=(t,r)=>{this.injectHtml(` + )} + - - - -
- - diff --git a/playground/dist/index.js b/playground/dist/index.js deleted file mode 100644 index febe1051a..000000000 --- a/playground/dist/index.js +++ /dev/null @@ -1,186 +0,0 @@ -var d$=Object.defineProperty;var pR=n=>{throw TypeError(n)};var f$=(n,e,t)=>e in n?d$(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var um=(n,e,t)=>f$(n,typeof e!="symbol"?e+"":e,t),F1=(n,e,t)=>e.has(n)||pR("Cannot "+t);var j=(n,e,t)=>(F1(n,e,"read from private field"),t?t.call(n):e.get(n)),Pe=(n,e,t)=>e.has(n)?pR("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ve=(n,e,t,r)=>(F1(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),We=(n,e,t)=>(F1(n,e,"access private method"),t);var kd=(n,e,t,r)=>({set _(i){ve(n,e,i,t)},get _(){return j(n,e,r)}});function h$(n,e){for(var t=0;tr[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function BA(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var z1={exports:{}},_d={},V1={exports:{}},rt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var mR;function p$(){if(mR)return rt;mR=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=h&&F[h]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function C(F,L,W){this.props=F,this.context=L,this.refs=w,this.updater=W||y}C.prototype.isReactComponent={},C.prototype.setState=function(F,L){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,L,"setState")},C.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function _(){}_.prototype=C.prototype;function E(F,L,W){this.props=F,this.context=L,this.refs=w,this.updater=W||y}var P=E.prototype=new _;P.constructor=E,b(P,C.prototype),P.isPureReactComponent=!0;var A=Array.isArray,T=Object.prototype.hasOwnProperty,M={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function D(F,L,W){var ee,J={},te=null,ae=null;if(L!=null)for(ee in L.ref!==void 0&&(ae=L.ref),L.key!==void 0&&(te=""+L.key),L)T.call(L,ee)&&!N.hasOwnProperty(ee)&&(J[ee]=L[ee]);var ye=arguments.length-2;if(ye===1)J.children=W;else if(1n.forEach(t=>v$(t,e))}function At(...n){return x.useCallback(qv(...n),n)}function y$(n,e){const t=x.createContext(e),r=s=>{const{children:o,...a}=s,c=x.useMemo(()=>a,Object.values(a));return v.jsx(t.Provider,{value:c,children:o})};r.displayName=n+"Provider";function i(s){const o=x.useContext(t);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${n}\``)}return[r,i]}function Ei(n,e=[]){let t=[];function r(s,o){const a=x.createContext(o),c=t.length;t=[...t,o];const d=h=>{var _;const{scope:m,children:y,...b}=h,w=((_=m==null?void 0:m[n])==null?void 0:_[c])||a,C=x.useMemo(()=>b,Object.values(b));return v.jsx(w.Provider,{value:C,children:y})};d.displayName=s+"Provider";function f(h,m){var w;const y=((w=m==null?void 0:m[n])==null?void 0:w[c])||a,b=x.useContext(y);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[d,f]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return i.scopeName=n,[r,x$(i,...e)]}function x$(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:c,scopeName:d})=>{const h=c(s)[`__scope${d}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}var H1={exports:{}},Wn={},U1={exports:{}},W1={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var xR;function b$(){return xR||(xR=1,function(n){function e(G,Q){var re=G.length;G.push(Q);e:for(;0>>1,L=G[F];if(0>>1;Fi(J,re))tei(ae,J)?(G[F]=ae,G[te]=re,F=te):(G[F]=J,G[ee]=re,F=ee);else if(tei(ae,re))G[F]=ae,G[te]=re,F=te;else break e}}return Q}function i(G,Q){var re=G.sortIndex-Q.sortIndex;return re!==0?re:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var c=[],d=[],f=1,h=null,m=3,y=!1,b=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(G){for(var Q=t(d);Q!==null;){if(Q.callback===null)r(d);else if(Q.startTime<=G)r(d),Q.sortIndex=Q.expirationTime,e(c,Q);else break;Q=t(d)}}function A(G){if(w=!1,P(G),!b)if(t(c)!==null)b=!0,se(T);else{var Q=t(d);Q!==null&&pe(A,Q.startTime-G)}}function T(G,Q){b=!1,w&&(w=!1,_(D),D=-1),y=!0;var re=m;try{for(P(Q),h=t(c);h!==null&&(!(h.expirationTime>Q)||G&&!U());){var F=h.callback;if(typeof F=="function"){h.callback=null,m=h.priorityLevel;var L=F(h.expirationTime<=Q);Q=n.unstable_now(),typeof L=="function"?h.callback=L:h===t(c)&&r(c),P(Q)}else r(c);h=t(c)}if(h!==null)var W=!0;else{var ee=t(d);ee!==null&&pe(A,ee.startTime-Q),W=!1}return W}finally{h=null,m=re,y=!1}}var M=!1,N=null,D=-1,$=5,Z=-1;function U(){return!(n.unstable_now()-Z<$)}function V(){if(N!==null){var G=n.unstable_now();Z=G;var Q=!0;try{Q=N(!0,G)}finally{Q?oe():(M=!1,N=null)}}else M=!1}var oe;if(typeof E=="function")oe=function(){E(V)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,ce=ne.port2;ne.port1.onmessage=V,oe=function(){ce.postMessage(null)}}else oe=function(){C(V,0)};function se(G){N=G,M||(M=!0,oe())}function pe(G,Q){D=C(function(){G(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_continueExecution=function(){b||y||(b=!0,se(T))},n.unstable_forceFrameRate=function(G){0>G||125F?(G.sortIndex=re,e(d,G),t(c)===null&&G===t(d)&&(w?(_(D),D=-1):w=!0,pe(A,re-F))):(G.sortIndex=L,e(c,G),b||y||(b=!0,se(T))),G},n.unstable_shouldYield=U,n.unstable_wrapCallback=function(G){var Q=m;return function(){var re=m;m=Q;try{return G.apply(this,arguments)}finally{m=re}}}}(W1)),W1}var bR;function w$(){return bR||(bR=1,U1.exports=b$()),U1.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wR;function S$(){if(wR)return Wn;wR=1;var n=Nh(),e=w$();function t(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,p=1;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function m(l){return c.call(h,l)?!0:c.call(f,l)?!1:d.test(l)?h[l]=!0:(f[l]=!0,!1)}function y(l,u,p,g){if(p!==null&&p.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return g?!1:p!==null?!p.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function b(l,u,p,g){if(u===null||typeof u>"u"||y(l,u,p,g))return!0;if(g)return!1;if(p!==null)switch(p.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function w(l,u,p,g,S,k,R){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=g,this.attributeNamespace=S,this.mustUseProperty=p,this.propertyName=l,this.type=u,this.sanitizeURL=k,this.removeEmptyString=R}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){C[l]=new w(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var u=l[0];C[u]=new w(u,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){C[l]=new w(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){C[l]=new w(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){C[l]=new w(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){C[l]=new w(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){C[l]=new w(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){C[l]=new w(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){C[l]=new w(l,5,!1,l.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function E(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var u=l.replace(_,E);C[u]=new w(u,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){C[l]=new w(l,1,!1,l.toLowerCase(),null,!1,!1)}),C.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){C[l]=new w(l,1,!1,l.toLowerCase(),null,!0,!0)});function P(l,u,p,g){var S=C.hasOwnProperty(u)?C[u]:null;(S!==null?S.type!==0:g||!(2I||S[R]!==k[I]){var z=` -`+S[R].replace(" at new "," at ");return l.displayName&&z.includes("")&&(z=z.replace("",l.displayName)),z}while(1<=R&&0<=I);break}}}finally{W=!1,Error.prepareStackTrace=p}return(l=l?l.displayName||l.name:"")?L(l):""}function J(l){switch(l.tag){case 5:return L(l.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return l=ee(l.type,!1),l;case 11:return l=ee(l.type.render,!1),l;case 1:return l=ee(l.type,!0),l;default:return""}}function te(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case N:return"Fragment";case M:return"Portal";case $:return"Profiler";case D:return"StrictMode";case oe:return"Suspense";case ne:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case U:return(l.displayName||"Context")+".Consumer";case Z:return(l._context.displayName||"Context")+".Provider";case V:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case ce:return u=l.displayName||null,u!==null?u:te(l.type)||"Memo";case se:u=l._payload,l=l._init;try{return te(l(u))}catch{}}return null}function ae(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(u);case 8:return u===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function ye(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function Se(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Fe(l){var u=Se(l)?"checked":"value",p=Object.getOwnPropertyDescriptor(l.constructor.prototype,u),g=""+l[u];if(!l.hasOwnProperty(u)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var S=p.get,k=p.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return S.call(this)},set:function(R){g=""+R,k.call(this,R)}}),Object.defineProperty(l,u,{enumerable:p.enumerable}),{getValue:function(){return g},setValue:function(R){g=""+R},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function ct(l){l._valueTracker||(l._valueTracker=Fe(l))}function wt(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var p=u.getValue(),g="";return l&&(g=Se(l)?l.checked?"true":"false":l.value),l=g,l!==p?(u.setValue(l),!0):!1}function Xe(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Vt(l,u){var p=u.checked;return re({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??l._wrapperState.initialChecked})}function Rr(l,u){var p=u.defaultValue==null?"":u.defaultValue,g=u.checked!=null?u.checked:u.defaultChecked;p=ye(u.value!=null?u.value:p),l._wrapperState={initialChecked:g,initialValue:p,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Xr(l,u){u=u.checked,u!=null&&P(l,"checked",u,!1)}function or(l,u){Xr(l,u);var p=ye(u.value),g=u.type;if(p!=null)g==="number"?(p===0&&l.value===""||l.value!=p)&&(l.value=""+p):l.value!==""+p&&(l.value=""+p);else if(g==="submit"||g==="reset"){l.removeAttribute("value");return}u.hasOwnProperty("value")?ei(l,u.type,p):u.hasOwnProperty("defaultValue")&&ei(l,u.type,ye(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(l.defaultChecked=!!u.defaultChecked)}function qt(l,u,p){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var g=u.type;if(!(g!=="submit"&&g!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+l._wrapperState.initialValue,p||u===l.value||(l.value=u),l.defaultValue=u}p=l.name,p!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,p!==""&&(l.name=p)}function ei(l,u,p){(u!=="number"||Xe(l.ownerDocument)!==l)&&(p==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+p&&(l.defaultValue=""+p))}var ta=Array.isArray;function Pr(l,u,p,g){if(l=l.options,u){u={};for(var S=0;S"+u.valueOf().toString()+"",u=np.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;u.firstChild;)l.appendChild(u.firstChild)}});function Fu(l,u){if(u){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=u;return}}l.textContent=u}var zu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mL=["Webkit","ms","Moz","O"];Object.keys(zu).forEach(function(l){mL.forEach(function(u){u=u+l.charAt(0).toUpperCase()+l.substring(1),zu[u]=zu[l]})});function T2(l,u,p){return u==null||typeof u=="boolean"||u===""?"":p||typeof u!="number"||u===0||zu.hasOwnProperty(l)&&zu[l]?(""+u).trim():u+"px"}function A2(l,u){l=l.style;for(var p in u)if(u.hasOwnProperty(p)){var g=p.indexOf("--")===0,S=T2(p,u[p],g);p==="float"&&(p="cssFloat"),g?l.setProperty(p,S):l[p]=S}}var gL=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yy(l,u){if(u){if(gL[l]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(t(137,l));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(t(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(t(61))}if(u.style!=null&&typeof u.style!="object")throw Error(t(62))}}function Xy(l,u){if(l.indexOf("-")===-1)return typeof u.is=="string";switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var e0=null;function t0(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var n0=null,El=null,Rl=null;function M2(l){if(l=cd(l)){if(typeof n0!="function")throw Error(t(280));var u=l.stateNode;u&&(u=_p(u),n0(l.stateNode,l.type,u))}}function N2(l){El?Rl?Rl.push(l):Rl=[l]:El=l}function O2(){if(El){var l=El,u=Rl;if(Rl=El=null,M2(l),u)for(l=0;l>>=0,l===0?32:31-(RL(l)/PL|0)|0}var ap=64,lp=4194304;function Wu(l){switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function cp(l,u){var p=l.pendingLanes;if(p===0)return 0;var g=0,S=l.suspendedLanes,k=l.pingedLanes,R=p&268435455;if(R!==0){var I=R&~S;I!==0?g=Wu(I):(k&=R,k!==0&&(g=Wu(k)))}else R=p&~S,R!==0?g=Wu(R):k!==0&&(g=Wu(k));if(g===0)return 0;if(u!==0&&u!==g&&!(u&S)&&(S=g&-g,k=u&-u,S>=k||S===16&&(k&4194240)!==0))return u;if(g&4&&(g|=p&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=g;0p;p++)u.push(l);return u}function qu(l,u,p){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-ti(u),l[u]=p}function NL(l,u){var p=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var g=l.eventTimes;for(l=l.expirationTimes;0=ed),a_=" ",l_=!1;function c_(l,u){switch(l){case"keyup":return o7.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u_(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Al=!1;function l7(l,u){switch(l){case"compositionend":return u_(u);case"keypress":return u.which!==32?null:(l_=!0,a_);case"textInput":return l=u.data,l===a_&&l_?null:l;default:return null}}function c7(l,u){if(Al)return l==="compositionend"||!b0&&c_(l,u)?(l=t_(),pp=p0=Fs=null,Al=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-l};l=g}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=v_(p)}}function x_(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?x_(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function b_(){for(var l=window,u=Xe();u instanceof l.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)l=u.contentWindow;else break;u=Xe(l.document)}return u}function C0(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}function y7(l){var u=b_(),p=l.focusedElem,g=l.selectionRange;if(u!==p&&p&&p.ownerDocument&&x_(p.ownerDocument.documentElement,p)){if(g!==null&&C0(p)){if(u=g.start,l=g.end,l===void 0&&(l=u),"selectionStart"in p)p.selectionStart=u,p.selectionEnd=Math.min(l,p.value.length);else if(l=(u=p.ownerDocument||document)&&u.defaultView||window,l.getSelection){l=l.getSelection();var S=p.textContent.length,k=Math.min(g.start,S);g=g.end===void 0?k:Math.min(g.end,S),!l.extend&&k>g&&(S=g,g=k,k=S),S=y_(p,k);var R=y_(p,g);S&&R&&(l.rangeCount!==1||l.anchorNode!==S.node||l.anchorOffset!==S.offset||l.focusNode!==R.node||l.focusOffset!==R.offset)&&(u=u.createRange(),u.setStart(S.node,S.offset),l.removeAllRanges(),k>g?(l.addRange(u),l.extend(R.node,R.offset)):(u.setEnd(R.node,R.offset),l.addRange(u)))}}for(u=[],l=p;l=l.parentNode;)l.nodeType===1&&u.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p=document.documentMode,Ml=null,k0=null,id=null,_0=!1;function w_(l,u,p){var g=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;_0||Ml==null||Ml!==Xe(g)||(g=Ml,"selectionStart"in g&&C0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),id&&rd(id,g)||(id=g,g=Sp(k0,"onSelect"),0Il||(l.current=L0[Il],L0[Il]=null,Il--)}function St(l,u){Il++,L0[Il]=l.current,l.current=u}var Us={},hn=Hs(Us),Fn=Hs(!1),ia=Us;function Ll(l,u){var p=l.type.contextTypes;if(!p)return Us;var g=l.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===u)return g.__reactInternalMemoizedMaskedChildContext;var S={},k;for(k in p)S[k]=u[k];return g&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=S),S}function zn(l){return l=l.childContextTypes,l!=null}function Ep(){Et(Fn),Et(hn)}function I_(l,u,p){if(hn.current!==Us)throw Error(t(168));St(hn,u),St(Fn,p)}function L_(l,u,p){var g=l.stateNode;if(u=u.childContextTypes,typeof g.getChildContext!="function")return p;g=g.getChildContext();for(var S in g)if(!(S in u))throw Error(t(108,ae(l)||"Unknown",S));return re({},p,g)}function Rp(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Us,ia=hn.current,St(hn,l),St(Fn,Fn.current),!0}function $_(l,u,p){var g=l.stateNode;if(!g)throw Error(t(169));p?(l=L_(l,u,ia),g.__reactInternalMemoizedMergedChildContext=l,Et(Fn),Et(hn),St(hn,l)):Et(Fn),St(Fn,p)}var cs=null,Pp=!1,$0=!1;function B_(l){cs===null?cs=[l]:cs.push(l)}function A7(l){Pp=!0,B_(l)}function Ws(){if(!$0&&cs!==null){$0=!0;var l=0,u=vt;try{var p=cs;for(vt=1;l>=R,S-=R,us=1<<32-ti(u)+S|p<Ke?(en=Be,Be=null):en=Be.sibling;var pt=ue(q,Be,K[Ke],ge);if(pt===null){Be===null&&(Be=en);break}l&&Be&&pt.alternate===null&&u(q,Be),H=k(pt,H,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt,Be=en}if(Ke===K.length)return p(q,Be),Mt&&oa(q,Ke),je;if(Be===null){for(;KeKe?(en=Be,Be=null):en=Be.sibling;var eo=ue(q,Be,pt.value,ge);if(eo===null){Be===null&&(Be=en);break}l&&Be&&eo.alternate===null&&u(q,Be),H=k(eo,H,Ke),$e===null?je=eo:$e.sibling=eo,$e=eo,Be=en}if(pt.done)return p(q,Be),Mt&&oa(q,Ke),je;if(Be===null){for(;!pt.done;Ke++,pt=K.next())pt=fe(q,pt.value,ge),pt!==null&&(H=k(pt,H,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt);return Mt&&oa(q,Ke),je}for(Be=g(q,Be);!pt.done;Ke++,pt=K.next())pt=ke(Be,q,Ke,pt.value,ge),pt!==null&&(l&&pt.alternate!==null&&Be.delete(pt.key===null?Ke:pt.key),H=k(pt,H,Ke),$e===null?je=pt:$e.sibling=pt,$e=pt);return l&&Be.forEach(function(u$){return u(q,u$)}),Mt&&oa(q,Ke),je}function Bt(q,H,K,ge){if(typeof K=="object"&&K!==null&&K.type===N&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case T:e:{for(var je=K.key,$e=H;$e!==null;){if($e.key===je){if(je=K.type,je===N){if($e.tag===7){p(q,$e.sibling),H=S($e,K.props.children),H.return=q,q=H;break e}}else if($e.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===se&&W_(je)===$e.type){p(q,$e.sibling),H=S($e,K.props),H.ref=ud(q,$e,K),H.return=q,q=H;break e}p(q,$e);break}else u(q,$e);$e=$e.sibling}K.type===N?(H=pa(K.props.children,q.mode,ge,K.key),H.return=q,q=H):(ge=nm(K.type,K.key,K.props,null,q.mode,ge),ge.ref=ud(q,H,K),ge.return=q,q=ge)}return R(q);case M:e:{for($e=K.key;H!==null;){if(H.key===$e)if(H.tag===4&&H.stateNode.containerInfo===K.containerInfo&&H.stateNode.implementation===K.implementation){p(q,H.sibling),H=S(H,K.children||[]),H.return=q,q=H;break e}else{p(q,H);break}else u(q,H);H=H.sibling}H=D1(K,q.mode,ge),H.return=q,q=H}return R(q);case se:return $e=K._init,Bt(q,H,$e(K._payload),ge)}if(ta(K))return Ne(q,H,K,ge);if(Q(K))return Oe(q,H,K,ge);Np(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,H!==null&&H.tag===6?(p(q,H.sibling),H=S(H,K),H.return=q,q=H):(p(q,H),H=j1(K,q.mode,ge),H.return=q,q=H),R(q)):p(q,H)}return Bt}var zl=q_(!0),Z_=q_(!1),Op=Hs(null),jp=null,Vl=null,U0=null;function W0(){U0=Vl=jp=null}function q0(l){var u=Op.current;Et(Op),l._currentValue=u}function Z0(l,u,p){for(;l!==null;){var g=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,g!==null&&(g.childLanes|=u)):g!==null&&(g.childLanes&u)!==u&&(g.childLanes|=u),l===p)break;l=l.return}}function Hl(l,u){jp=l,U0=Vl=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&u&&(Vn=!0),l.firstContext=null)}function Mr(l){var u=l._currentValue;if(U0!==l)if(l={context:l,memoizedValue:u,next:null},Vl===null){if(jp===null)throw Error(t(308));Vl=l,jp.dependencies={lanes:0,firstContext:l}}else Vl=Vl.next=l;return u}var aa=null;function K0(l){aa===null?aa=[l]:aa.push(l)}function K_(l,u,p,g){var S=u.interleaved;return S===null?(p.next=p,K0(u)):(p.next=S.next,S.next=p),u.interleaved=p,fs(l,g)}function fs(l,u){l.lanes|=u;var p=l.alternate;for(p!==null&&(p.lanes|=u),p=l,l=l.return;l!==null;)l.childLanes|=u,p=l.alternate,p!==null&&(p.childLanes|=u),p=l,l=l.return;return p.tag===3?p.stateNode:null}var qs=!1;function G0(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function G_(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function hs(l,u){return{eventTime:l,lane:u,tag:0,payload:null,callback:null,next:null}}function Zs(l,u,p){var g=l.updateQueue;if(g===null)return null;if(g=g.shared,ft&2){var S=g.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),g.pending=u,fs(l,p)}return S=g.interleaved,S===null?(u.next=u,K0(g)):(u.next=S.next,S.next=u),g.interleaved=u,fs(l,p)}function Dp(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194240)!==0)){var g=u.lanes;g&=l.pendingLanes,p|=g,u.lanes=p,c0(l,p)}}function Q_(l,u){var p=l.updateQueue,g=l.alternate;if(g!==null&&(g=g.updateQueue,p===g)){var S=null,k=null;if(p=p.firstBaseUpdate,p!==null){do{var R={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};k===null?S=k=R:k=k.next=R,p=p.next}while(p!==null);k===null?S=k=u:k=k.next=u}else S=k=u;p={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:k,shared:g.shared,effects:g.effects},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}function Ip(l,u,p,g){var S=l.updateQueue;qs=!1;var k=S.firstBaseUpdate,R=S.lastBaseUpdate,I=S.shared.pending;if(I!==null){S.shared.pending=null;var z=I,X=z.next;z.next=null,R===null?k=X:R.next=X,R=z;var de=l.alternate;de!==null&&(de=de.updateQueue,I=de.lastBaseUpdate,I!==R&&(I===null?de.firstBaseUpdate=X:I.next=X,de.lastBaseUpdate=z))}if(k!==null){var fe=S.baseState;R=0,de=X=z=null,I=k;do{var ue=I.lane,ke=I.eventTime;if((g&ue)===ue){de!==null&&(de=de.next={eventTime:ke,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ne=l,Oe=I;switch(ue=u,ke=p,Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){fe=Ne.call(ke,fe,ue);break e}fe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,ue=typeof Ne=="function"?Ne.call(ke,fe,ue):Ne,ue==null)break e;fe=re({},fe,ue);break e;case 2:qs=!0}}I.callback!==null&&I.lane!==0&&(l.flags|=64,ue=S.effects,ue===null?S.effects=[I]:ue.push(I))}else ke={eventTime:ke,lane:ue,tag:I.tag,payload:I.payload,callback:I.callback,next:null},de===null?(X=de=ke,z=fe):de=de.next=ke,R|=ue;if(I=I.next,I===null){if(I=S.shared.pending,I===null)break;ue=I,I=ue.next,ue.next=null,S.lastBaseUpdate=ue,S.shared.pending=null}}while(!0);if(de===null&&(z=fe),S.baseState=z,S.firstBaseUpdate=X,S.lastBaseUpdate=de,u=S.shared.interleaved,u!==null){S=u;do R|=S.lane,S=S.next;while(S!==u)}else k===null&&(S.shared.lanes=0);ua|=R,l.lanes=R,l.memoizedState=fe}}function J_(l,u,p){if(l=u.effects,u.effects=null,l!==null)for(u=0;up?p:4,l(!0);var g=e1.transition;e1.transition={};try{l(!1),u()}finally{vt=p,e1.transition=g}}function gE(){return Nr().memoizedState}function j7(l,u,p){var g=Js(l);if(p={lane:g,action:p,hasEagerState:!1,eagerState:null,next:null},vE(l))yE(u,p);else if(p=K_(l,u,p,g),p!==null){var S=Pn();ai(p,l,g,S),xE(p,u,g)}}function D7(l,u,p){var g=Js(l),S={lane:g,action:p,hasEagerState:!1,eagerState:null,next:null};if(vE(l))yE(u,S);else{var k=l.alternate;if(l.lanes===0&&(k===null||k.lanes===0)&&(k=u.lastRenderedReducer,k!==null))try{var R=u.lastRenderedState,I=k(R,p);if(S.hasEagerState=!0,S.eagerState=I,ni(I,R)){var z=u.interleaved;z===null?(S.next=S,K0(u)):(S.next=z.next,z.next=S),u.interleaved=S;return}}catch{}finally{}p=K_(l,u,S,g),p!==null&&(S=Pn(),ai(p,l,g,S),xE(p,u,g))}}function vE(l){var u=l.alternate;return l===jt||u!==null&&u===jt}function yE(l,u){pd=Bp=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function xE(l,u,p){if(p&4194240){var g=u.lanes;g&=l.pendingLanes,p|=g,u.lanes=p,c0(l,p)}}var Vp={readContext:Mr,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useInsertionEffect:pn,useLayoutEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useMutableSource:pn,useSyncExternalStore:pn,useId:pn,unstable_isNewReconciler:!1},I7={readContext:Mr,useCallback:function(l,u){return Oi().memoizedState=[l,u===void 0?null:u],l},useContext:Mr,useEffect:lE,useImperativeHandle:function(l,u,p){return p=p!=null?p.concat([l]):null,Fp(4194308,4,dE.bind(null,u,l),p)},useLayoutEffect:function(l,u){return Fp(4194308,4,l,u)},useInsertionEffect:function(l,u){return Fp(4,2,l,u)},useMemo:function(l,u){var p=Oi();return u=u===void 0?null:u,l=l(),p.memoizedState=[l,u],l},useReducer:function(l,u,p){var g=Oi();return u=p!==void 0?p(u):u,g.memoizedState=g.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},g.queue=l,l=l.dispatch=j7.bind(null,jt,l),[g.memoizedState,l]},useRef:function(l){var u=Oi();return l={current:l},u.memoizedState=l},useState:oE,useDebugValue:a1,useDeferredValue:function(l){return Oi().memoizedState=l},useTransition:function(){var l=oE(!1),u=l[0];return l=O7.bind(null,l[1]),Oi().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,p){var g=jt,S=Oi();if(Mt){if(p===void 0)throw Error(t(407));p=p()}else{if(p=u(),Xt===null)throw Error(t(349));ca&30||tE(g,u,p)}S.memoizedState=p;var k={value:p,getSnapshot:u};return S.queue=k,lE(rE.bind(null,g,k,l),[l]),g.flags|=2048,vd(9,nE.bind(null,g,k,p,u),void 0,null),p},useId:function(){var l=Oi(),u=Xt.identifierPrefix;if(Mt){var p=ds,g=us;p=(g&~(1<<32-ti(g)-1)).toString(32)+p,u=":"+u+"R"+p,p=md++,0<\/script>",l=l.removeChild(l.firstChild)):typeof g.is=="string"?l=R.createElement(p,{is:g.is}):(l=R.createElement(p),p==="select"&&(R=l,g.multiple?R.multiple=!0:g.size&&(R.size=g.size))):l=R.createElementNS(l,p),l[Mi]=u,l[ld]=g,BE(l,u,!1,!1),u.stateNode=l;e:{switch(R=Xy(p,g),p){case"dialog":_t("cancel",l),_t("close",l),S=g;break;case"iframe":case"object":case"embed":_t("load",l),S=g;break;case"video":case"audio":for(S=0;SKl&&(u.flags|=128,g=!0,yd(k,!1),u.lanes=4194304)}else{if(!g)if(l=Lp(R),l!==null){if(u.flags|=128,g=!0,p=l.updateQueue,p!==null&&(u.updateQueue=p,u.flags|=4),yd(k,!0),k.tail===null&&k.tailMode==="hidden"&&!R.alternate&&!Mt)return mn(u),null}else 2*$t()-k.renderingStartTime>Kl&&p!==1073741824&&(u.flags|=128,g=!0,yd(k,!1),u.lanes=4194304);k.isBackwards?(R.sibling=u.child,u.child=R):(p=k.last,p!==null?p.sibling=R:u.child=R,k.last=R)}return k.tail!==null?(u=k.tail,k.rendering=u,k.tail=u.sibling,k.renderingStartTime=$t(),u.sibling=null,p=Ot.current,St(Ot,g?p&1|2:p&1),u):(mn(u),null);case 22:case 23:return M1(),g=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==g&&(u.flags|=8192),g&&u.mode&1?ur&1073741824&&(mn(u),u.subtreeFlags&6&&(u.flags|=8192)):mn(u),null;case 24:return null;case 25:return null}throw Error(t(156,u.tag))}function U7(l,u){switch(F0(u),u.tag){case 1:return zn(u.type)&&Ep(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Ul(),Et(Fn),Et(hn),X0(),l=u.flags,l&65536&&!(l&128)?(u.flags=l&-65537|128,u):null;case 5:return J0(u),null;case 13:if(Et(Ot),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(t(340));Fl()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Et(Ot),null;case 4:return Ul(),null;case 10:return q0(u.type._context),null;case 22:case 23:return M1(),null;case 24:return null;default:return null}}var qp=!1,gn=!1,W7=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function ql(l,u){var p=l.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(g){It(l,u,g)}else p.current=null}function x1(l,u,p){try{p()}catch(g){It(l,u,g)}}var VE=!1;function q7(l,u){if(M0=fp,l=b_(),C0(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var g=p.getSelection&&p.getSelection();if(g&&g.rangeCount!==0){p=g.anchorNode;var S=g.anchorOffset,k=g.focusNode;g=g.focusOffset;try{p.nodeType,k.nodeType}catch{p=null;break e}var R=0,I=-1,z=-1,X=0,de=0,fe=l,ue=null;t:for(;;){for(var ke;fe!==p||S!==0&&fe.nodeType!==3||(I=R+S),fe!==k||g!==0&&fe.nodeType!==3||(z=R+g),fe.nodeType===3&&(R+=fe.nodeValue.length),(ke=fe.firstChild)!==null;)ue=fe,fe=ke;for(;;){if(fe===l)break t;if(ue===p&&++X===S&&(I=R),ue===k&&++de===g&&(z=R),(ke=fe.nextSibling)!==null)break;fe=ue,ue=fe.parentNode}fe=ke}p=I===-1||z===-1?null:{start:I,end:z}}else p=null}p=p||{start:0,end:0}}else p=null;for(N0={focusedElem:l,selectionRange:p},fp=!1,Ae=u;Ae!==null;)if(u=Ae,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,Ae=l;else for(;Ae!==null;){u=Ae;try{var Ne=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Oe=Ne.memoizedProps,Bt=Ne.memoizedState,q=u.stateNode,H=q.getSnapshotBeforeUpdate(u.elementType===u.type?Oe:ii(u.type,Oe),Bt);q.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var K=u.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(ge){It(u,u.return,ge)}if(l=u.sibling,l!==null){l.return=u.return,Ae=l;break}Ae=u.return}return Ne=VE,VE=!1,Ne}function xd(l,u,p){var g=u.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var S=g=g.next;do{if((S.tag&l)===l){var k=S.destroy;S.destroy=void 0,k!==void 0&&x1(u,p,k)}S=S.next}while(S!==g)}}function Zp(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&l)===l){var g=p.create;p.destroy=g()}p=p.next}while(p!==u)}}function b1(l){var u=l.ref;if(u!==null){var p=l.stateNode;switch(l.tag){case 5:l=p;break;default:l=p}typeof u=="function"?u(l):u.current=l}}function HE(l){var u=l.alternate;u!==null&&(l.alternate=null,HE(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&(delete u[Mi],delete u[ld],delete u[I0],delete u[P7],delete u[T7])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function UE(l){return l.tag===5||l.tag===3||l.tag===4}function WE(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||UE(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function w1(l,u,p){var g=l.tag;if(g===5||g===6)l=l.stateNode,u?p.nodeType===8?p.parentNode.insertBefore(l,u):p.insertBefore(l,u):(p.nodeType===8?(u=p.parentNode,u.insertBefore(l,p)):(u=p,u.appendChild(l)),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=kp));else if(g!==4&&(l=l.child,l!==null))for(w1(l,u,p),l=l.sibling;l!==null;)w1(l,u,p),l=l.sibling}function S1(l,u,p){var g=l.tag;if(g===5||g===6)l=l.stateNode,u?p.insertBefore(l,u):p.appendChild(l);else if(g!==4&&(l=l.child,l!==null))for(S1(l,u,p),l=l.sibling;l!==null;)S1(l,u,p),l=l.sibling}var sn=null,si=!1;function Ks(l,u,p){for(p=p.child;p!==null;)qE(l,u,p),p=p.sibling}function qE(l,u,p){if(Ai&&typeof Ai.onCommitFiberUnmount=="function")try{Ai.onCommitFiberUnmount(op,p)}catch{}switch(p.tag){case 5:gn||ql(p,u);case 6:var g=sn,S=si;sn=null,Ks(l,u,p),sn=g,si=S,sn!==null&&(si?(l=sn,p=p.stateNode,l.nodeType===8?l.parentNode.removeChild(p):l.removeChild(p)):sn.removeChild(p.stateNode));break;case 18:sn!==null&&(si?(l=sn,p=p.stateNode,l.nodeType===8?D0(l.parentNode,p):l.nodeType===1&&D0(l,p),Ju(l)):D0(sn,p.stateNode));break;case 4:g=sn,S=si,sn=p.stateNode.containerInfo,si=!0,Ks(l,u,p),sn=g,si=S;break;case 0:case 11:case 14:case 15:if(!gn&&(g=p.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){S=g=g.next;do{var k=S,R=k.destroy;k=k.tag,R!==void 0&&(k&2||k&4)&&x1(p,u,R),S=S.next}while(S!==g)}Ks(l,u,p);break;case 1:if(!gn&&(ql(p,u),g=p.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=p.memoizedProps,g.state=p.memoizedState,g.componentWillUnmount()}catch(I){It(p,u,I)}Ks(l,u,p);break;case 21:Ks(l,u,p);break;case 22:p.mode&1?(gn=(g=gn)||p.memoizedState!==null,Ks(l,u,p),gn=g):Ks(l,u,p);break;default:Ks(l,u,p)}}function ZE(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var p=l.stateNode;p===null&&(p=l.stateNode=new W7),u.forEach(function(g){var S=t$.bind(null,l,g);p.has(g)||(p.add(g),g.then(S,S))})}}function oi(l,u){var p=u.deletions;if(p!==null)for(var g=0;gS&&(S=R),g&=~k}if(g=S,g=$t()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*K7(g/1960))-g,10l?16:l,Qs===null)var g=!1;else{if(l=Qs,Qs=null,Yp=0,ft&6)throw Error(t(331));var S=ft;for(ft|=4,Ae=l.current;Ae!==null;){var k=Ae,R=k.child;if(Ae.flags&16){var I=k.deletions;if(I!==null){for(var z=0;z$t()-_1?fa(l,0):k1|=p),Un(l,u)}function oR(l,u){u===0&&(l.mode&1?(u=lp,lp<<=1,!(lp&130023424)&&(lp=4194304)):u=1);var p=Pn();l=fs(l,u),l!==null&&(qu(l,u,p),Un(l,p))}function e$(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),oR(l,p)}function t$(l,u){var p=0;switch(l.tag){case 13:var g=l.stateNode,S=l.memoizedState;S!==null&&(p=S.retryLane);break;case 19:g=l.stateNode;break;default:throw Error(t(314))}g!==null&&g.delete(u),oR(l,p)}var aR;aR=function(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps||Fn.current)Vn=!0;else{if(!(l.lanes&p)&&!(u.flags&128))return Vn=!1,V7(l,u,p);Vn=!!(l.flags&131072)}else Vn=!1,Mt&&u.flags&1048576&&F_(u,Ap,u.index);switch(u.lanes=0,u.tag){case 2:var g=u.type;Wp(l,u),l=u.pendingProps;var S=Ll(u,hn.current);Hl(u,p),S=n1(null,u,g,l,S,p);var k=r1();return u.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,zn(g)?(k=!0,Rp(u)):k=!1,u.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,G0(u),S.updater=Hp,u.stateNode=S,S._reactInternals=u,c1(u,g,l,p),u=h1(null,u,g,!0,k,p)):(u.tag=0,Mt&&k&&B0(u),Rn(null,u,S,p),u=u.child),u;case 16:g=u.elementType;e:{switch(Wp(l,u),l=u.pendingProps,S=g._init,g=S(g._payload),u.type=g,S=u.tag=r$(g),l=ii(g,l),S){case 0:u=f1(null,u,g,l,p);break e;case 1:u=OE(null,u,g,l,p);break e;case 11:u=PE(null,u,g,l,p);break e;case 14:u=TE(null,u,g,ii(g.type,l),p);break e}throw Error(t(306,g,""))}return u;case 0:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),f1(l,u,g,S,p);case 1:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),OE(l,u,g,S,p);case 3:e:{if(jE(u),l===null)throw Error(t(387));g=u.pendingProps,k=u.memoizedState,S=k.element,G_(l,u),Ip(u,g,null,p);var R=u.memoizedState;if(g=R.element,k.isDehydrated)if(k={element:g,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},u.updateQueue.baseState=k,u.memoizedState=k,u.flags&256){S=Wl(Error(t(423)),u),u=DE(l,u,g,p,S);break e}else if(g!==S){S=Wl(Error(t(424)),u),u=DE(l,u,g,p,S);break e}else for(cr=Vs(u.stateNode.containerInfo.firstChild),lr=u,Mt=!0,ri=null,p=Z_(u,null,g,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Fl(),g===S){u=ps(l,u,p);break e}Rn(l,u,g,p)}u=u.child}return u;case 5:return Y_(u),l===null&&V0(u),g=u.type,S=u.pendingProps,k=l!==null?l.memoizedProps:null,R=S.children,O0(g,S)?R=null:k!==null&&O0(g,k)&&(u.flags|=32),NE(l,u),Rn(l,u,R,p),u.child;case 6:return l===null&&V0(u),null;case 13:return IE(l,u,p);case 4:return Q0(u,u.stateNode.containerInfo),g=u.pendingProps,l===null?u.child=zl(u,null,g,p):Rn(l,u,g,p),u.child;case 11:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),PE(l,u,g,S,p);case 7:return Rn(l,u,u.pendingProps,p),u.child;case 8:return Rn(l,u,u.pendingProps.children,p),u.child;case 12:return Rn(l,u,u.pendingProps.children,p),u.child;case 10:e:{if(g=u.type._context,S=u.pendingProps,k=u.memoizedProps,R=S.value,St(Op,g._currentValue),g._currentValue=R,k!==null)if(ni(k.value,R)){if(k.children===S.children&&!Fn.current){u=ps(l,u,p);break e}}else for(k=u.child,k!==null&&(k.return=u);k!==null;){var I=k.dependencies;if(I!==null){R=k.child;for(var z=I.firstContext;z!==null;){if(z.context===g){if(k.tag===1){z=hs(-1,p&-p),z.tag=2;var X=k.updateQueue;if(X!==null){X=X.shared;var de=X.pending;de===null?z.next=z:(z.next=de.next,de.next=z),X.pending=z}}k.lanes|=p,z=k.alternate,z!==null&&(z.lanes|=p),Z0(k.return,p,u),I.lanes|=p;break}z=z.next}}else if(k.tag===10)R=k.type===u.type?null:k.child;else if(k.tag===18){if(R=k.return,R===null)throw Error(t(341));R.lanes|=p,I=R.alternate,I!==null&&(I.lanes|=p),Z0(R,p,u),R=k.sibling}else R=k.child;if(R!==null)R.return=k;else for(R=k;R!==null;){if(R===u){R=null;break}if(k=R.sibling,k!==null){k.return=R.return,R=k;break}R=R.return}k=R}Rn(l,u,S.children,p),u=u.child}return u;case 9:return S=u.type,g=u.pendingProps.children,Hl(u,p),S=Mr(S),g=g(S),u.flags|=1,Rn(l,u,g,p),u.child;case 14:return g=u.type,S=ii(g,u.pendingProps),S=ii(g.type,S),TE(l,u,g,S,p);case 15:return AE(l,u,u.type,u.pendingProps,p);case 17:return g=u.type,S=u.pendingProps,S=u.elementType===g?S:ii(g,S),Wp(l,u),u.tag=1,zn(g)?(l=!0,Rp(u)):l=!1,Hl(u,p),wE(u,g,S),c1(u,g,S,p),h1(null,u,g,!0,l,p);case 19:return $E(l,u,p);case 22:return ME(l,u,p)}throw Error(t(156,u.tag))};function lR(l,u){return z2(l,u)}function n$(l,u,p,g){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jr(l,u,p,g){return new n$(l,u,p,g)}function O1(l){return l=l.prototype,!(!l||!l.isReactComponent)}function r$(l){if(typeof l=="function")return O1(l)?1:0;if(l!=null){if(l=l.$$typeof,l===V)return 11;if(l===ce)return 14}return 2}function Xs(l,u){var p=l.alternate;return p===null?(p=jr(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&14680064,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p}function nm(l,u,p,g,S,k){var R=2;if(g=l,typeof l=="function")O1(l)&&(R=1);else if(typeof l=="string")R=5;else e:switch(l){case N:return pa(p.children,S,k,u);case D:R=8,S|=8;break;case $:return l=jr(12,p,u,S|2),l.elementType=$,l.lanes=k,l;case oe:return l=jr(13,p,u,S),l.elementType=oe,l.lanes=k,l;case ne:return l=jr(19,p,u,S),l.elementType=ne,l.lanes=k,l;case pe:return rm(p,S,k,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Z:R=10;break e;case U:R=9;break e;case V:R=11;break e;case ce:R=14;break e;case se:R=16,g=null;break e}throw Error(t(130,l==null?l:typeof l,""))}return u=jr(R,p,u,S),u.elementType=l,u.type=g,u.lanes=k,u}function pa(l,u,p,g){return l=jr(7,l,g,u),l.lanes=p,l}function rm(l,u,p,g){return l=jr(22,l,g,u),l.elementType=pe,l.lanes=p,l.stateNode={isHidden:!1},l}function j1(l,u,p){return l=jr(6,l,null,u),l.lanes=p,l}function D1(l,u,p){return u=jr(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function i$(l,u,p,g,S){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=l0(0),this.expirationTimes=l0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=l0(0),this.identifierPrefix=g,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function I1(l,u,p,g,S,k,R,I,z){return l=new i$(l,u,p,I,z),u===1?(u=1,k===!0&&(u|=8)):u=0,k=jr(3,null,null,u),l.current=k,k.stateNode=l,k.memoizedState={element:g,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},G0(k),l}function s$(l,u,p){var g=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),H1.exports=S$(),H1.exports}var Oh=FA();const zA=BA(Oh);var Do=x.forwardRef((n,e)=>{const{children:t,...r}=n,i=x.Children.toArray(t),s=i.find(C$);if(s){const o=s.props.children,a=i.map(c=>c===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return v.jsx(hb,{...r,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,a):null})}return v.jsx(hb,{...r,ref:e,children:t})});Do.displayName="Slot";var hb=x.forwardRef((n,e)=>{const{children:t,...r}=n;if(x.isValidElement(t)){const i=_$(t);return x.cloneElement(t,{...k$(r,t.props),ref:e?qv(e,i):i})}return x.Children.count(t)>1?x.Children.only(null):null});hb.displayName="SlotClone";var VA=({children:n})=>v.jsx(v.Fragment,{children:n});function C$(n){return x.isValidElement(n)&&n.type===VA}function k$(n,e){const t={...e};for(const r in e){const i=n[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?t[r]=(...a)=>{s(...a),i(...a)}:i&&(t[r]=i):r==="style"?t[r]={...i,...s}:r==="className"&&(t[r]=[i,s].filter(Boolean).join(" "))}return{...n,...t}}function _$(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var E$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],st=E$.reduce((n,e)=>{const t=x.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?Do:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(a,{...o,ref:i})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function HA(n,e){n&&Oh.flushSync(()=>n.dispatchEvent(e))}function nn(n){const e=x.useRef(n);return x.useEffect(()=>{e.current=n}),x.useMemo(()=>(...t)=>{var r;return(r=e.current)==null?void 0:r.call(e,...t)},[])}function R$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&t(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[t,e])}var P$="DismissableLayer",pb="dismissableLayer.update",T$="dismissableLayer.pointerDownOutside",A$="dismissableLayer.focusOutside",CR,UA=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jh=x.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...c}=n,d=x.useContext(UA),[f,h]=x.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=x.useState({}),b=At(e,N=>h(N)),w=Array.from(d.layers),[C]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(C),E=f?w.indexOf(f):-1,P=d.layersWithOutsidePointerEventsDisabled.size>0,A=E>=_,T=O$(N=>{const D=N.target,$=[...d.branches].some(Z=>Z.contains(D));!A||$||(i==null||i(N),o==null||o(N),N.defaultPrevented||a==null||a())},m),M=j$(N=>{const D=N.target;[...d.branches].some(Z=>Z.contains(D))||(s==null||s(N),o==null||o(N),N.defaultPrevented||a==null||a())},m);return R$(N=>{E===d.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},m),x.useEffect(()=>{if(f)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(CR=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),kR(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=CR)}},[f,m,t,d]),x.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),kR())},[f,d]),x.useEffect(()=>{const N=()=>y({});return document.addEventListener(pb,N),()=>document.removeEventListener(pb,N)},[]),v.jsx(st.div,{...c,ref:b,style:{pointerEvents:P?A?"auto":"none":void 0,...n.style},onFocusCapture:Me(n.onFocusCapture,M.onFocusCapture),onBlurCapture:Me(n.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Me(n.onPointerDownCapture,T.onPointerDownCapture)})});jh.displayName=P$;var M$="DismissableLayerBranch",N$=x.forwardRef((n,e)=>{const t=x.useContext(UA),r=x.useRef(null),i=At(e,r);return x.useEffect(()=>{const s=r.current;if(s)return t.branches.add(s),()=>{t.branches.delete(s)}},[t.branches]),v.jsx(st.div,{...n,ref:i})});N$.displayName=M$;function O$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){WA(T$,t,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,t]),{onPointerDownCapture:()=>r.current=!0}}function j$(n,e=globalThis==null?void 0:globalThis.document){const t=nn(n),r=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!r.current&&WA(A$,t,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,t]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kR(){const n=new CustomEvent(pb);document.dispatchEvent(n)}function WA(n,e,t,{discrete:r}){const i=t.originalEvent.target,s=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&i.addEventListener(n,e,{once:!0}),r?HA(i,s):i.dispatchEvent(s)}var xi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},D$=Wv.useId||(()=>{}),I$=0;function wr(n){const[e,t]=x.useState(D$());return xi(()=>{n||t(r=>r??String(I$++))},[n]),n||(e?`radix-${e}`:"")}const L$=["top","right","bottom","left"],Io=Math.min,vr=Math.max,Tg=Math.round,dm=Math.floor,Zi=n=>({x:n,y:n}),$$={left:"right",right:"left",bottom:"top",top:"bottom"},B$={start:"end",end:"start"};function mb(n,e,t){return vr(n,Io(e,t))}function Ts(n,e){return typeof n=="function"?n(e):n}function As(n){return n.split("-")[0]}function Pu(n){return n.split("-")[1]}function US(n){return n==="x"?"y":"x"}function WS(n){return n==="y"?"height":"width"}function Lo(n){return["top","bottom"].includes(As(n))?"y":"x"}function qS(n){return US(Lo(n))}function F$(n,e,t){t===void 0&&(t=!1);const r=Pu(n),i=qS(n),s=WS(i);let o=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Ag(o)),[o,Ag(o)]}function z$(n){const e=Ag(n);return[gb(n),e,gb(e)]}function gb(n){return n.replace(/start|end/g,e=>B$[e])}function V$(n,e,t){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function H$(n,e,t,r){const i=Pu(n);let s=V$(As(n),t==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(gb)))),s}function Ag(n){return n.replace(/left|right|bottom|top/g,e=>$$[e])}function U$(n){return{top:0,right:0,bottom:0,left:0,...n}}function qA(n){return typeof n!="number"?U$(n):{top:n,right:n,bottom:n,left:n}}function Mg(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function _R(n,e,t){let{reference:r,floating:i}=n;const s=Lo(e),o=qS(e),a=WS(o),c=As(e),d=s==="y",f=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,m=r[a]/2-i[a]/2;let y;switch(c){case"top":y={x:f,y:r.y-i.height};break;case"bottom":y={x:f,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:h};break;case"left":y={x:r.x-i.width,y:h};break;default:y={x:r.x,y:r.y}}switch(Pu(e)){case"start":y[o]-=m*(t&&d?-1:1);break;case"end":y[o]+=m*(t&&d?-1:1);break}return y}const W$=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let d=await o.getElementRects({reference:n,floating:e,strategy:i}),{x:f,y:h}=_R(d,r,c),m=r,y={},b=0;for(let w=0;w({name:"arrow",options:n,async fn(e){const{x:t,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:d,padding:f=0}=Ts(n,e)||{};if(d==null)return{};const h=qA(f),m={x:t,y:r},y=qS(i),b=WS(y),w=await o.getDimensions(d),C=y==="y",_=C?"top":"left",E=C?"bottom":"right",P=C?"clientHeight":"clientWidth",A=s.reference[b]+s.reference[y]-m[y]-s.floating[b],T=m[y]-s.reference[y],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let N=M?M[P]:0;(!N||!await(o.isElement==null?void 0:o.isElement(M)))&&(N=a.floating[P]||s.floating[b]);const D=A/2-T/2,$=N/2-w[b]/2-1,Z=Io(h[_],$),U=Io(h[E],$),V=Z,oe=N-w[b]-U,ne=N/2-w[b]/2+D,ce=mb(V,ne,oe),se=!c.arrow&&Pu(i)!=null&&ne!==ce&&s.reference[b]/2-(nene<=0)){var U,V;const ne=(((U=s.flip)==null?void 0:U.index)||0)+1,ce=N[ne];if(ce)return{data:{index:ne,overflows:Z},reset:{placement:ce}};let se=(V=Z.filter(pe=>pe.overflows[0]<=0).sort((pe,G)=>pe.overflows[1]-G.overflows[1])[0])==null?void 0:V.placement;if(!se)switch(y){case"bestFit":{var oe;const pe=(oe=Z.filter(G=>{if(M){const Q=Lo(G.placement);return Q===E||Q==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Q=>Q>0).reduce((Q,re)=>Q+re,0)]).sort((G,Q)=>G[1]-Q[1])[0])==null?void 0:oe[0];pe&&(se=pe);break}case"initialPlacement":se=a;break}if(i!==se)return{reset:{placement:se}}}return{}}}};function ER(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function RR(n){return L$.some(e=>n[e]>=0)}const K$=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=Ts(n,e);switch(r){case"referenceHidden":{const s=await xf(e,{...i,elementContext:"reference"}),o=ER(s,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:RR(o)}}}case"escaped":{const s=await xf(e,{...i,altBoundary:!0}),o=ER(s,t.floating);return{data:{escapedOffsets:o,escaped:RR(o)}}}default:return{}}}}};async function G$(n,e){const{placement:t,platform:r,elements:i}=n,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=As(t),a=Pu(t),c=Lo(t)==="y",d=["left","top"].includes(o)?-1:1,f=s&&c?-1:1,h=Ts(e,n);let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(y=a==="end"?b*-1:b),c?{x:y*f,y:m*d}:{x:m*d,y:y*f}}const Q$=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:s,placement:o,middlewareData:a}=e,c=await G$(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},J$=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:C=>{let{x:_,y:E}=C;return{x:_,y:E}}},...c}=Ts(n,e),d={x:t,y:r},f=await xf(e,c),h=Lo(As(i)),m=US(h);let y=d[m],b=d[h];if(s){const C=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=y+f[C],P=y-f[_];y=mb(E,y,P)}if(o){const C=h==="y"?"top":"left",_=h==="y"?"bottom":"right",E=b+f[C],P=b-f[_];b=mb(E,b,P)}const w=a.fn({...e,[m]:y,[h]:b});return{...w,data:{x:w.x-t,y:w.y-r,enabled:{[m]:s,[h]:o}}}}}},Y$=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:d=!0}=Ts(n,e),f={x:t,y:r},h=Lo(i),m=US(h);let y=f[m],b=f[h];const w=Ts(a,e),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const P=m==="y"?"height":"width",A=s.reference[m]-s.floating[P]+C.mainAxis,T=s.reference[m]+s.reference[P]-C.mainAxis;yT&&(y=T)}if(d){var _,E;const P=m==="y"?"width":"height",A=["top","left"].includes(As(i)),T=s.reference[h]-s.floating[P]+(A&&((_=o.offset)==null?void 0:_[h])||0)+(A?0:C.crossAxis),M=s.reference[h]+s.reference[P]+(A?0:((E=o.offset)==null?void 0:E[h])||0)-(A?C.crossAxis:0);bM&&(b=M)}return{[m]:y,[h]:b}}}},X$=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:c=()=>{},...d}=Ts(n,e),f=await xf(e,d),h=As(i),m=Pu(i),y=Lo(i)==="y",{width:b,height:w}=s.floating;let C,_;h==="top"||h==="bottom"?(C=h,_=m===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=h,C=m==="end"?"top":"bottom");const E=w-f.top-f.bottom,P=b-f.left-f.right,A=Io(w-f[C],E),T=Io(b-f[_],P),M=!e.middlewareData.shift;let N=A,D=T;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(D=P),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(N=E),M&&!m){const Z=vr(f.left,0),U=vr(f.right,0),V=vr(f.top,0),oe=vr(f.bottom,0);y?D=b-2*(Z!==0||U!==0?Z+U:vr(f.left,f.right)):N=w-2*(V!==0||oe!==0?V+oe:vr(f.top,f.bottom))}await c({...e,availableWidth:D,availableHeight:N});const $=await o.getDimensions(a.floating);return b!==$.width||w!==$.height?{reset:{rects:!0}}:{}}}};function Zv(){return typeof window<"u"}function Tu(n){return ZA(n)?(n.nodeName||"").toLowerCase():"#document"}function Sr(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ns(n){var e;return(e=(ZA(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function ZA(n){return Zv()?n instanceof Node||n instanceof Sr(n).Node:!1}function bi(n){return Zv()?n instanceof Element||n instanceof Sr(n).Element:!1}function Ji(n){return Zv()?n instanceof HTMLElement||n instanceof Sr(n).HTMLElement:!1}function PR(n){return!Zv()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Sr(n).ShadowRoot}function Dh(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=wi(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function eB(n){return["table","td","th"].includes(Tu(n))}function Kv(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function ZS(n){const e=KS(),t=bi(n)?wi(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function tB(n){let e=$o(n);for(;Ji(e)&&!tu(e);){if(ZS(e))return e;if(Kv(e))return null;e=$o(e)}return null}function KS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tu(n){return["html","body","#document"].includes(Tu(n))}function wi(n){return Sr(n).getComputedStyle(n)}function Gv(n){return bi(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function $o(n){if(Tu(n)==="html")return n;const e=n.assignedSlot||n.parentNode||PR(n)&&n.host||ns(n);return PR(e)?e.host:e}function KA(n){const e=$o(n);return tu(e)?n.ownerDocument?n.ownerDocument.body:n.body:Ji(e)&&Dh(e)?e:KA(e)}function bf(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=KA(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),o=Sr(i);if(s){const a=vb(o);return e.concat(o,o.visualViewport||[],Dh(i)?i:[],a&&t?bf(a):[])}return e.concat(i,bf(i,[],t))}function vb(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function GA(n){const e=wi(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ji(n),s=i?n.offsetWidth:t,o=i?n.offsetHeight:r,a=Tg(t)!==s||Tg(r)!==o;return a&&(t=s,r=o),{width:t,height:r,$:a}}function GS(n){return bi(n)?n:n.contextElement}function Cc(n){const e=GS(n);if(!Ji(e))return Zi(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:s}=GA(e);let o=(s?Tg(t.width):t.width)/r,a=(s?Tg(t.height):t.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const nB=Zi(0);function QA(n){const e=Sr(n);return!KS()||!e.visualViewport?nB:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function rB(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Sr(n)?!1:e}function Za(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),s=GS(n);let o=Zi(1);e&&(r?bi(r)&&(o=Cc(r)):o=Cc(n));const a=rB(s,t,r)?QA(s):Zi(0);let c=(i.left+a.x)/o.x,d=(i.top+a.y)/o.y,f=i.width/o.x,h=i.height/o.y;if(s){const m=Sr(s),y=r&&bi(r)?Sr(r):r;let b=m,w=vb(b);for(;w&&r&&y!==b;){const C=Cc(w),_=w.getBoundingClientRect(),E=wi(w),P=_.left+(w.clientLeft+parseFloat(E.paddingLeft))*C.x,A=_.top+(w.clientTop+parseFloat(E.paddingTop))*C.y;c*=C.x,d*=C.y,f*=C.x,h*=C.y,c+=P,d+=A,b=Sr(w),w=vb(b)}}return Mg({width:f,height:h,x:c,y:d})}function QS(n,e){const t=Gv(n).scrollLeft;return e?e.left+t:Za(ns(n)).left+t}function JA(n,e,t){t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=r.left+e.scrollLeft-(t?0:QS(n,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function iB(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const s=i==="fixed",o=ns(r),a=e?Kv(e.floating):!1;if(r===o||a&&s)return t;let c={scrollLeft:0,scrollTop:0},d=Zi(1);const f=Zi(0),h=Ji(r);if((h||!h&&!s)&&((Tu(r)!=="body"||Dh(o))&&(c=Gv(r)),Ji(r))){const y=Za(r);d=Cc(r),f.x=y.x+r.clientLeft,f.y=y.y+r.clientTop}const m=o&&!h&&!s?JA(o,c,!0):Zi(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:t.y*d.y-c.scrollTop*d.y+f.y+m.y}}function sB(n){return Array.from(n.getClientRects())}function oB(n){const e=ns(n),t=Gv(n),r=n.ownerDocument.body,i=vr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=vr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-t.scrollLeft+QS(n);const a=-t.scrollTop;return wi(r).direction==="rtl"&&(o+=vr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function aB(n,e){const t=Sr(n),r=ns(n),i=t.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const d=KS();(!d||d&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function lB(n,e){const t=Za(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,s=Ji(n)?Cc(n):Zi(1),o=n.clientWidth*s.x,a=n.clientHeight*s.y,c=i*s.x,d=r*s.y;return{width:o,height:a,x:c,y:d}}function TR(n,e,t){let r;if(e==="viewport")r=aB(n,t);else if(e==="document")r=oB(ns(n));else if(bi(e))r=lB(e,t);else{const i=QA(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Mg(r)}function YA(n,e){const t=$o(n);return t===e||!bi(t)||tu(t)?!1:wi(t).position==="fixed"||YA(t,e)}function cB(n,e){const t=e.get(n);if(t)return t;let r=bf(n,[],!1).filter(a=>bi(a)&&Tu(a)!=="body"),i=null;const s=wi(n).position==="fixed";let o=s?$o(n):n;for(;bi(o)&&!tu(o);){const a=wi(o),c=ZS(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Dh(o)&&!c&&YA(n,o))?r=r.filter(f=>f!==o):i=a,o=$o(o)}return e.set(n,r),r}function uB(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=[...t==="clippingAncestors"?Kv(e)?[]:cB(e,this._c):[].concat(t),r],a=o[0],c=o.reduce((d,f)=>{const h=TR(e,f,i);return d.top=vr(h.top,d.top),d.right=Io(h.right,d.right),d.bottom=Io(h.bottom,d.bottom),d.left=vr(h.left,d.left),d},TR(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dB(n){const{width:e,height:t}=GA(n);return{width:e,height:t}}function fB(n,e,t){const r=Ji(e),i=ns(e),s=t==="fixed",o=Za(n,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=Zi(0);if(r||!r&&!s)if((Tu(e)!=="body"||Dh(i))&&(a=Gv(e)),r){const m=Za(e,!0,s,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}else i&&(c.x=QS(i));const d=i&&!r&&!s?JA(i,a):Zi(0),f=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function q1(n){return wi(n).position==="static"}function AR(n,e){if(!Ji(n)||wi(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return ns(n)===t&&(t=t.ownerDocument.body),t}function XA(n,e){const t=Sr(n);if(Kv(n))return t;if(!Ji(n)){let i=$o(n);for(;i&&!tu(i);){if(bi(i)&&!q1(i))return i;i=$o(i)}return t}let r=AR(n,e);for(;r&&eB(r)&&q1(r);)r=AR(r,e);return r&&tu(r)&&q1(r)&&!ZS(r)?t:r||tB(n)||t}const hB=async function(n){const e=this.getOffsetParent||XA,t=this.getDimensions,r=await t(n.floating);return{reference:fB(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pB(n){return wi(n).direction==="rtl"}const mB={convertOffsetParentRelativeRectToViewportRelativeRect:iB,getDocumentElement:ns,getClippingRect:uB,getOffsetParent:XA,getElementRects:hB,getClientRects:sB,getDimensions:dB,getScale:Cc,isElement:bi,isRTL:pB};function gB(n,e){let t=null,r;const i=ns(n);function s(){var a;clearTimeout(r),(a=t)==null||a.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:d,top:f,width:h,height:m}=n.getBoundingClientRect();if(a||e(),!h||!m)return;const y=dm(f),b=dm(i.clientWidth-(d+h)),w=dm(i.clientHeight-(f+m)),C=dm(d),E={rootMargin:-y+"px "+-b+"px "+-w+"px "+-C+"px",threshold:vr(0,Io(1,c))||1};let P=!0;function A(T){const M=T[0].intersectionRatio;if(M!==c){if(!P)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}P=!1}try{t=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{t=new IntersectionObserver(A,E)}t.observe(n)}return o(!0),s}function vB(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=GS(n),f=i||s?[...d?bf(d):[],...bf(e)]:[];f.forEach(_=>{i&&_.addEventListener("scroll",t,{passive:!0}),s&&_.addEventListener("resize",t)});const h=d&&a?gB(d,t):null;let m=-1,y=null;o&&(y=new ResizeObserver(_=>{let[E]=_;E&&E.target===d&&y&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=y)==null||P.observe(e)})),t()}),d&&!c&&y.observe(d),y.observe(e));let b,w=c?Za(n):null;c&&C();function C(){const _=Za(n);w&&(_.x!==w.x||_.y!==w.y||_.width!==w.width||_.height!==w.height)&&t(),w=_,b=requestAnimationFrame(C)}return t(),()=>{var _;f.forEach(E=>{i&&E.removeEventListener("scroll",t),s&&E.removeEventListener("resize",t)}),h==null||h(),(_=y)==null||_.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const yB=Q$,xB=J$,bB=Z$,wB=X$,SB=K$,MR=q$,CB=Y$,kB=(n,e,t)=>{const r=new Map,i={platform:mB,...t},s={...i.platform,_c:r};return W$(n,e,{...i,platform:s})};var og=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Ng(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!==0;)if(!Ng(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!==0;){const s=i[r];if(!(s==="_owner"&&n.$$typeof)&&!Ng(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function eM(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function NR(n,e){const t=eM(n);return Math.round(e*t)/t}function Z1(n){const e=x.useRef(n);return og(()=>{e.current=n}),e}function _B(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:d}=n,[f,h]=x.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,y]=x.useState(r);Ng(m,r)||y(r);const[b,w]=x.useState(null),[C,_]=x.useState(null),E=x.useCallback(G=>{G!==M.current&&(M.current=G,w(G))},[]),P=x.useCallback(G=>{G!==N.current&&(N.current=G,_(G))},[]),A=s||b,T=o||C,M=x.useRef(null),N=x.useRef(null),D=x.useRef(f),$=c!=null,Z=Z1(c),U=Z1(i),V=Z1(d),oe=x.useCallback(()=>{if(!M.current||!N.current)return;const G={placement:e,strategy:t,middleware:m};U.current&&(G.platform=U.current),kB(M.current,N.current,G).then(Q=>{const re={...Q,isPositioned:V.current!==!1};ne.current&&!Ng(D.current,re)&&(D.current=re,Oh.flushSync(()=>{h(re)}))})},[m,e,t,U,V]);og(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,h(G=>({...G,isPositioned:!1})))},[d]);const ne=x.useRef(!1);og(()=>(ne.current=!0,()=>{ne.current=!1}),[]),og(()=>{if(A&&(M.current=A),T&&(N.current=T),A&&T){if(Z.current)return Z.current(A,T,oe);oe()}},[A,T,oe,Z,$]);const ce=x.useMemo(()=>({reference:M,floating:N,setReference:E,setFloating:P}),[E,P]),se=x.useMemo(()=>({reference:A,floating:T}),[A,T]),pe=x.useMemo(()=>{const G={position:t,left:0,top:0};if(!se.floating)return G;const Q=NR(se.floating,f.x),re=NR(se.floating,f.y);return a?{...G,transform:"translate("+Q+"px, "+re+"px)",...eM(se.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Q,top:re}},[t,a,se.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:oe,refs:ce,elements:se,floatingStyles:pe}),[f,oe,ce,se,pe])}const EB=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:r,padding:i}=typeof n=="function"?n(t):n;return r&&e(r)?r.current!=null?MR({element:r.current,padding:i}).fn(t):{}:r?MR({element:r,padding:i}).fn(t):{}}}},RB=(n,e)=>({...yB(n),options:[n,e]}),PB=(n,e)=>({...xB(n),options:[n,e]}),TB=(n,e)=>({...CB(n),options:[n,e]}),AB=(n,e)=>({...bB(n),options:[n,e]}),MB=(n,e)=>({...wB(n),options:[n,e]}),NB=(n,e)=>({...SB(n),options:[n,e]}),OB=(n,e)=>({...EB(n),options:[n,e]});var jB="Arrow",tM=x.forwardRef((n,e)=>{const{children:t,width:r=10,height:i=5,...s}=n;return v.jsx(st.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});tM.displayName=jB;var DB=tM;function JS(n,e=[]){let t=[];function r(s,o){const a=x.createContext(o),c=t.length;t=[...t,o];function d(h){const{scope:m,children:y,...b}=h,w=(m==null?void 0:m[n][c])||a,C=x.useMemo(()=>b,Object.values(b));return v.jsx(w.Provider,{value:C,children:y})}function f(h,m){const y=(m==null?void 0:m[n][c])||a,b=x.useContext(y);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${s}\``)}return d.displayName=s+"Provider",[d,f]}const i=()=>{const s=t.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[n])||s;return x.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return i.scopeName=n,[r,IB(i,...e)]}function IB(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const r=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:c,scopeName:d})=>{const h=c(s)[`__scope${d}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function YS(n){const[e,t]=x.useState(void 0);return xi(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,a=d.blockSize}else o=n.offsetWidth,a=n.offsetHeight;t({width:o,height:a})});return r.observe(n,{box:"border-box"}),()=>r.unobserve(n)}else t(void 0)},[n]),e}var XS="Popper",[nM,Au]=JS(XS),[LB,rM]=nM(XS),iM=n=>{const{__scopePopper:e,children:t}=n,[r,i]=x.useState(null);return v.jsx(LB,{scope:e,anchor:r,onAnchorChange:i,children:t})};iM.displayName=XS;var sM="PopperAnchor",oM=x.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:r,...i}=n,s=rM(sM,t),o=x.useRef(null),a=At(e,o);return x.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:v.jsx(st.div,{...i,ref:a})});oM.displayName=sM;var eC="PopperContent",[$B,BB]=nM(eC),aM=x.forwardRef((n,e)=>{var ae,ye,Se,Fe,ct,wt;const{__scopePopper:t,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:y="optimized",onPlaced:b,...w}=n,C=rM(eC,t),[_,E]=x.useState(null),P=At(e,Xe=>E(Xe)),[A,T]=x.useState(null),M=YS(A),N=(M==null?void 0:M.width)??0,D=(M==null?void 0:M.height)??0,$=r+(s!=="center"?"-"+s:""),Z=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},U=Array.isArray(d)?d:[d],V=U.length>0,oe={padding:Z,boundary:U.filter(zB),altBoundary:V},{refs:ne,floatingStyles:ce,placement:se,isPositioned:pe,middlewareData:G}=_B({strategy:"fixed",placement:$,whileElementsMounted:(...Xe)=>vB(...Xe,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[RB({mainAxis:i+D,alignmentAxis:o}),c&&PB({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?TB():void 0,...oe}),c&&AB({...oe}),MB({...oe,apply:({elements:Xe,rects:Vt,availableWidth:Rr,availableHeight:Xr})=>{const{width:or,height:qt}=Vt.reference,ei=Xe.floating.style;ei.setProperty("--radix-popper-available-width",`${Rr}px`),ei.setProperty("--radix-popper-available-height",`${Xr}px`),ei.setProperty("--radix-popper-anchor-width",`${or}px`),ei.setProperty("--radix-popper-anchor-height",`${qt}px`)}}),A&&OB({element:A,padding:a}),VB({arrowWidth:N,arrowHeight:D}),m&&NB({strategy:"referenceHidden",...oe})]}),[Q,re]=uM(se),F=nn(b);xi(()=>{pe&&(F==null||F())},[pe,F]);const L=(ae=G.arrow)==null?void 0:ae.x,W=(ye=G.arrow)==null?void 0:ye.y,ee=((Se=G.arrow)==null?void 0:Se.centerOffset)!==0,[J,te]=x.useState();return xi(()=>{_&&te(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:pe?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(Fe=G.transformOrigin)==null?void 0:Fe.x,(ct=G.transformOrigin)==null?void 0:ct.y].join(" "),...((wt=G.hide)==null?void 0:wt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx($B,{scope:t,placedSide:Q,onArrowChange:T,arrowX:L,arrowY:W,shouldHideArrow:ee,children:v.jsx(st.div,{"data-side":Q,"data-align":re,...w,ref:P,style:{...w.style,animation:pe?void 0:"none"}})})})});aM.displayName=eC;var lM="PopperArrow",FB={top:"bottom",right:"left",bottom:"top",left:"right"},cM=x.forwardRef(function(e,t){const{__scopePopper:r,...i}=e,s=BB(lM,r),o=FB[s.placedSide];return v.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:v.jsx(DB,{...i,ref:t,style:{...i.style,display:"block"}})})});cM.displayName=lM;function zB(n){return n!==null}var VB=n=>({name:"transformOrigin",options:n,fn(e){var C,_,E;const{placement:t,rects:r,middlewareData:i}=e,o=((C=i.arrow)==null?void 0:C.centerOffset)!==0,a=o?0:n.arrowWidth,c=o?0:n.arrowHeight,[d,f]=uM(t),h={start:"0%",center:"50%",end:"100%"}[f],m=(((_=i.arrow)==null?void 0:_.x)??0)+a/2,y=(((E=i.arrow)==null?void 0:E.y)??0)+c/2;let b="",w="";return d==="bottom"?(b=o?h:`${m}px`,w=`${-c}px`):d==="top"?(b=o?h:`${m}px`,w=`${r.floating.height+c}px`):d==="right"?(b=`${-c}px`,w=o?h:`${y}px`):d==="left"&&(b=`${r.floating.width+c}px`,w=o?h:`${y}px`),{data:{x:b,y:w}}}});function uM(n){const[e,t="center"]=n.split("-");return[e,t]}var tC=iM,Qv=oM,nC=aM,rC=cM,HB="Portal",Ih=x.forwardRef((n,e)=>{var a;const{container:t,...r}=n,[i,s]=x.useState(!1);xi(()=>s(!0),[]);const o=t||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?zA.createPortal(v.jsx(st.div,{...r,ref:e}),o):null});Ih.displayName=HB;function UB(n,e){return x.useReducer((t,r)=>e[t][r]??t,n)}var $n=n=>{const{present:e,children:t}=n,r=WB(e),i=typeof t=="function"?t({present:r.isPresent}):x.Children.only(t),s=At(r.ref,qB(i));return typeof t=="function"||r.isPresent?x.cloneElement(i,{ref:s}):null};$n.displayName="Presence";function WB(n){const[e,t]=x.useState(),r=x.useRef({}),i=x.useRef(n),s=x.useRef("none"),o=n?"mounted":"unmounted",[a,c]=UB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=fm(r.current);s.current=a==="mounted"?d:"none"},[a]),xi(()=>{const d=r.current,f=i.current;if(f!==n){const m=s.current,y=fm(d);n?c("MOUNT"):y==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&m!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,c]),xi(()=>{if(e){let d;const f=e.ownerDocument.defaultView??window,h=y=>{const w=fm(r.current).includes(y.animationName);if(y.target===e&&w&&(c("ANIMATION_END"),!i.current)){const C=e.style.animationFillMode;e.style.animationFillMode="forwards",d=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=C)})}},m=y=>{y.target===e&&(s.current=fm(r.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{f.clearTimeout(d),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(d=>{d&&(r.current=getComputedStyle(d)),t(d)},[])}}function fm(n){return(n==null?void 0:n.animationName)||"none"}function qB(n){var r,i;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function rs({prop:n,defaultProp:e,onChange:t=()=>{}}){const[r,i]=ZB({defaultProp:e,onChange:t}),s=n!==void 0,o=s?n:r,a=nn(t),c=x.useCallback(d=>{if(s){const h=typeof d=="function"?d(n):d;h!==n&&a(h)}else i(d)},[s,n,i,a]);return[o,c]}function ZB({defaultProp:n,onChange:e}){const t=x.useState(n),[r]=t,i=x.useRef(r),s=nn(e);return x.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),t}var KB="VisuallyHidden",dM=x.forwardRef((n,e)=>v.jsx(st.span,{...n,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}));dM.displayName=KB;var GB=dM,[Jv,nde]=Ei("Tooltip",[Au]),Yv=Au(),fM="TooltipProvider",QB=700,yb="tooltip.open",[JB,iC]=Jv(fM),hM=n=>{const{__scopeTooltip:e,delayDuration:t=QB,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=n,[o,a]=x.useState(!0),c=x.useRef(!1),d=x.useRef(0);return x.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),v.jsx(JB,{scope:e,isOpenDelayed:o,delayDuration:t,onOpen:x.useCallback(()=>{window.clearTimeout(d.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(f=>{c.current=f},[]),disableHoverableContent:i,children:s})};hM.displayName=fM;var Xv="Tooltip",[YB,Lh]=Jv(Xv),pM=n=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=n,c=iC(Xv,n.__scopeTooltip),d=Yv(e),[f,h]=x.useState(null),m=wr(),y=x.useRef(0),b=o??c.disableHoverableContent,w=a??c.delayDuration,C=x.useRef(!1),[_=!1,E]=rs({prop:r,defaultProp:i,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(yb))):c.onClose(),s==null||s(N)}}),P=x.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),A=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,E(!0)},[E]),T=x.useCallback(()=>{window.clearTimeout(y.current),y.current=0,E(!1)},[E]),M=x.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,E(!0),y.current=0},w)},[w,E]);return x.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),v.jsx(tC,{...d,children:v.jsx(YB,{scope:e,contentId:m,open:_,stateAttribute:P,trigger:f,onTriggerChange:h,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?M():A()},[c.isOpenDelayed,M,A]),onTriggerLeave:x.useCallback(()=>{b?T():(window.clearTimeout(y.current),y.current=0)},[T,b]),onOpen:A,onClose:T,disableHoverableContent:b,children:t})})};pM.displayName=Xv;var xb="TooltipTrigger",mM=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Lh(xb,t),s=iC(xb,t),o=Yv(t),a=x.useRef(null),c=At(e,a,i.onTriggerChange),d=x.useRef(!1),f=x.useRef(!1),h=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),v.jsx(Qv,{asChild:!0,...o,children:v.jsx(st.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:Me(n.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Me(n.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Me(n.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Me(n.onFocus,()=>{d.current||i.onOpen()}),onBlur:Me(n.onBlur,i.onClose),onClick:Me(n.onClick,i.onClose)})})});mM.displayName=xb;var sC="TooltipPortal",[XB,eF]=Jv(sC,{forceMount:void 0}),gM=n=>{const{__scopeTooltip:e,forceMount:t,children:r,container:i}=n,s=Lh(sC,e);return v.jsx(XB,{scope:e,forceMount:t,children:v.jsx($n,{present:t||s.open,children:v.jsx(Ih,{asChild:!0,container:i,children:r})})})};gM.displayName=sC;var nu="TooltipContent",vM=x.forwardRef((n,e)=>{const t=eF(nu,n.__scopeTooltip),{forceMount:r=t.forceMount,side:i="top",...s}=n,o=Lh(nu,n.__scopeTooltip);return v.jsx($n,{present:r||o.open,children:o.disableHoverableContent?v.jsx(yM,{side:i,...s,ref:e}):v.jsx(tF,{side:i,...s,ref:e})})}),tF=x.forwardRef((n,e)=>{const t=Lh(nu,n.__scopeTooltip),r=iC(nu,n.__scopeTooltip),i=x.useRef(null),s=At(e,i),[o,a]=x.useState(null),{trigger:c,onClose:d}=t,f=i.current,{onPointerInTransitChange:h}=r,m=x.useCallback(()=>{a(null),h(!1)},[h]),y=x.useCallback((b,w)=>{const C=b.currentTarget,_={x:b.clientX,y:b.clientY},E=sF(_,C.getBoundingClientRect()),P=oF(_,E),A=aF(w.getBoundingClientRect()),T=cF([...P,...A]);a(T),h(!0)},[h]);return x.useEffect(()=>()=>m(),[m]),x.useEffect(()=>{if(c&&f){const b=C=>y(C,f),w=C=>y(C,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",w)}}},[c,f,y,m]),x.useEffect(()=>{if(o){const b=w=>{const C=w.target,_={x:w.clientX,y:w.clientY},E=(c==null?void 0:c.contains(C))||(f==null?void 0:f.contains(C)),P=!lF(_,o);E?m():P&&(m(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,o,d,m]),v.jsx(yM,{...n,ref:s})}),[nF,rF]=Jv(Xv,{isInside:!1}),yM=x.forwardRef((n,e)=>{const{__scopeTooltip:t,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=n,c=Lh(nu,t),d=Yv(t),{onClose:f}=c;return x.useEffect(()=>(document.addEventListener(yb,f),()=>document.removeEventListener(yb,f)),[f]),x.useEffect(()=>{if(c.trigger){const h=m=>{const y=m.target;y!=null&&y.contains(c.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,f]),v.jsx(jh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:v.jsxs(nC,{"data-state":c.stateAttribute,...d,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(VA,{children:r}),v.jsx(nF,{scope:t,isInside:!0,children:v.jsx(GB,{id:c.contentId,role:"tooltip",children:i||r})})]})})});vM.displayName=nu;var xM="TooltipArrow",iF=x.forwardRef((n,e)=>{const{__scopeTooltip:t,...r}=n,i=Yv(t);return rF(xM,t).isInside?null:v.jsx(rC,{...i,...r,ref:e})});iF.displayName=xM;function sF(n,e){const t=Math.abs(e.top-n.y),r=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),s=Math.abs(e.left-n.x);switch(Math.min(t,r,i,s)){case s:return"left";case i:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function oF(n,e,t=5){const r=[];switch(e){case"top":r.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":r.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":r.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":r.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return r}function aF(n){const{top:e,right:t,bottom:r,left:i}=n;return[{x:i,y:e},{x:t,y:e},{x:t,y:r},{x:i,y:r}]}function lF(n,e){const{x:t,y:r}=n;let i=!1;for(let s=0,o=e.length-1;sr!=f>r&&t<(d-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function cF(n){const e=n.slice();return e.sort((t,r)=>t.xr.x?1:t.yr.y?1:0),uF(e)}function uF(n){if(n.length<=1)return n.slice();const e=[];for(let r=0;r=2;){const s=e[e.length-1],o=e[e.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))e.pop();else break}e.push(i)}e.pop();const t=[];for(let r=n.length-1;r>=0;r--){const i=n[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var dF=hM,fF=pM,hF=mM,pF=gM,bM=vM;function wM(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e{const e=vF(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const a=o.split(aC);return a[0]===""&&a.length!==1&&a.shift(),SM(a,e)||gF(o)},getConflictingClassGroupIds:(o,a)=>{const c=t[o]||[];return a&&r[o]?[...c,...r[o]]:c}}},SM=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?SM(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(aC);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},OR=/^\[(.+)\]$/,gF=n=>{if(OR.test(n)){const e=OR.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},vF=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return xF(Object.entries(n.classGroups),t).forEach(([s,o])=>{bb(o,r,s,e)}),r},bb=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:jR(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(yF(i)){bb(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{bb(o,jR(e,s),t,r)})})},jR=(n,e)=>{let t=n;return e.split(aC).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},yF=n=>n.isThemeGetter,xF=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[t,i]}):n,bF=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},CM="!",wF=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=a=>{const c=[];let d=0,f=0,h;for(let C=0;Cf?h-f:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:w}};return t?a=>t({className:a,parseClassName:o}):o},SF=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},CF=n=>({cache:bF(n.cacheSize),parseClassName:wF(n),...mF(n)}),kF=/\s+/,_F=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(kF);let a="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}=t(d);let b=!!y,w=r(b?m.substring(0,y):m);if(!w){if(!b){a=d+(a.length>0?" "+a:a);continue}if(w=r(m),!w){a=d+(a.length>0?" "+a:a);continue}b=!1}const C=SF(f).join(":"),_=h?C+CM:C,E=_+w;if(s.includes(E))continue;s.push(E);const P=i(w,b);for(let A=0;A0?" "+a:a)}return a};function EF(){let n=0,e,t,r="";for(;n{if(typeof n=="string")return n;let e,t="";for(let r=0;rh(f),n());return t=CF(d),r=t.cache.get,i=t.cache.set,s=a,a(c)}function a(c){const d=r(c);if(d)return d;const f=_F(c,t);return i(c,f),f}return function(){return s(EF.apply(null,arguments))}}const Rt=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},_M=/^\[(?:([a-z-]+):)?(.+)\]$/i,PF=/^\d+\/\d+$/,TF=new Set(["px","full","screen"]),AF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,NF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=n=>kc(n)||TF.has(n)||PF.test(n),to=n=>Mu(n,"length",VF),kc=n=>!!n&&!Number.isNaN(Number(n)),K1=n=>Mu(n,"number",kc),Ed=n=>!!n&&Number.isInteger(Number(n)),DF=n=>n.endsWith("%")&&kc(n.slice(0,-1)),Ye=n=>_M.test(n),no=n=>AF.test(n),IF=new Set(["length","size","percentage"]),LF=n=>Mu(n,IF,EM),$F=n=>Mu(n,"position",EM),BF=new Set(["image","url"]),FF=n=>Mu(n,BF,UF),zF=n=>Mu(n,"",HF),Rd=()=>!0,Mu=(n,e,t)=>{const r=_M.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},VF=n=>MF.test(n)&&!NF.test(n),EM=()=>!1,HF=n=>OF.test(n),UF=n=>jF.test(n),WF=()=>{const n=Rt("colors"),e=Rt("spacing"),t=Rt("blur"),r=Rt("brightness"),i=Rt("borderColor"),s=Rt("borderRadius"),o=Rt("borderSpacing"),a=Rt("borderWidth"),c=Rt("contrast"),d=Rt("grayscale"),f=Rt("hueRotate"),h=Rt("invert"),m=Rt("gap"),y=Rt("gradientColorStops"),b=Rt("gradientColorStopPositions"),w=Rt("inset"),C=Rt("margin"),_=Rt("opacity"),E=Rt("padding"),P=Rt("saturate"),A=Rt("scale"),T=Rt("sepia"),M=Rt("skew"),N=Rt("space"),D=Rt("translate"),$=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ye,e],V=()=>[Ye,e],oe=()=>["",gs,to],ne=()=>["auto",kc,Ye],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Ye],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[kc,Ye];return{cacheSize:500,separator:":",theme:{colors:[Rd],spacing:[gs,to],blur:["none","",no,Ye],brightness:F(),borderColor:[n],borderRadius:["none","","full",no,Ye],borderSpacing:V(),borderWidth:oe(),contrast:F(),grayscale:Q(),hueRotate:F(),invert:Q(),gap:V(),gradientColorStops:[n],gradientColorStopPositions:[DF,to],inset:U(),margin:U(),opacity:F(),padding:V(),saturate:F(),scale:F(),sepia:Q(),skew:F(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[no]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ce(),Ye]}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ed,Ye]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Ed,Ye]}],"grid-cols":[{"grid-cols":[Rd]}],"col-start-end":[{col:["auto",{span:["full",Ed,Ye]},Ye]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[Rd]}],"row-start-end":[{row:["auto",{span:[Ed,Ye]},Ye]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,e]}],"min-w":[{"min-w":[Ye,e,"min","max","fit"]}],"max-w":[{"max-w":[Ye,e,"none","full","min","max","fit","prose",{screen:[no]},no]}],h:[{h:[Ye,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,e,"auto","min","max","fit"]}],"font-size":[{text:["base",no,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",K1]}],"font-family":[{font:[Rd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ye]}],"line-clamp":[{"line-clamp":["none",kc,K1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gs,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gs,to]}],"underline-offset":[{"underline-offset":["auto",gs,Ye]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),$F]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},FF]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:se()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[gs,Ye]}],"outline-w":[{outline:[gs,to]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[gs,to]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",no,zF]}],"shadow-color":[{shadow:[Rd]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...pe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pe()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",no,Ye]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[P]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[P]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Ed,Ye]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[gs,to,K1]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},RM=RF(WF);function Ve(...n){return RM(oC(n))}const qF=dF,Nu=fF,Ou=hF,ml=x.forwardRef(({className:n,sideOffset:e=4,...t},r)=>v.jsx(pF,{children:v.jsx(bM,{ref:r,sideOffset:e,className:Ve("z-50 overflow-hidden rounded-md bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-sm border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",n),...t})}));ml.displayName=bM.displayName;var ju=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ka=typeof window>"u"||"Deno"in globalThis;function Lr(){}function ZF(n,e){return typeof n=="function"?n(e):n}function wb(n){return typeof n=="number"&&n>=0&&n!==1/0}function PM(n,e){return Math.max(n+(e||0)-Date.now(),0)}function _c(n,e){return typeof n=="function"?n(e):n}function fi(n,e){return typeof n=="function"?n(e):n}function DR(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=n;if(o){if(r){if(e.queryHash!==lC(o,e.options))return!1}else if(!wf(e.queryKey,o))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function IR(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Ga(e.options.mutationKey)!==Ga(s))return!1}else if(!wf(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function lC(n,e){return((e==null?void 0:e.queryKeyHashFn)||Ga)(n)}function Ga(n){return JSON.stringify(n,(e,t)=>Sb(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function wf(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!wf(n[t],e[t])):!1}function TM(n,e){if(n===e)return n;const t=LR(n)&&LR(e);if(t||Sb(n)&&Sb(e)){const r=t?n:Object.keys(n),i=r.length,s=t?e:Object.keys(e),o=s.length,a=t?[]:{};let c=0;for(let d=0;d{setTimeout(e,n)})}function Cb(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?TM(n,e):e}function GF(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function QF(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var cC=Symbol();function AM(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===cC?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var Pa,ho,zc,CA,JF=(CA=class extends ju{constructor(){super();Pe(this,Pa);Pe(this,ho);Pe(this,zc);ve(this,zc,e=>{if(!Ka&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){j(this,ho)||this.setEventListener(j(this,zc))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,ho))==null||e.call(this),ve(this,ho,void 0))}setEventListener(e){var t;ve(this,zc,e),(t=j(this,ho))==null||t.call(this),ve(this,ho,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){j(this,Pa)!==e&&(ve(this,Pa,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof j(this,Pa)=="boolean"?j(this,Pa):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Pa=new WeakMap,ho=new WeakMap,zc=new WeakMap,CA),uC=new JF,Vc,po,Hc,kA,YF=(kA=class extends ju{constructor(){super();Pe(this,Vc,!0);Pe(this,po);Pe(this,Hc);ve(this,Hc,e=>{if(!Ka&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,po)||this.setEventListener(j(this,Hc))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,po))==null||e.call(this),ve(this,po,void 0))}setEventListener(e){var t;ve(this,Hc,e),(t=j(this,po))==null||t.call(this),ve(this,po,e(this.setOnline.bind(this)))}setOnline(e){j(this,Vc)!==e&&(ve(this,Vc,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return j(this,Vc)}},Vc=new WeakMap,po=new WeakMap,Hc=new WeakMap,kA),jg=new YF;function kb(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}function XF(n){return Math.min(1e3*2**n,3e4)}function MM(n){return(n??"online")==="online"?jg.isOnline():!0}var NM=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function G1(n){return n instanceof NM}function OM(n){let e=!1,t=0,r=!1,i;const s=kb(),o=w=>{var C;r||(m(new NM(w)),(C=n.abort)==null||C.call(n))},a=()=>{e=!0},c=()=>{e=!1},d=()=>uC.isFocused()&&(n.networkMode==="always"||jg.isOnline())&&n.canRun(),f=()=>MM(n.networkMode)&&n.canRun(),h=w=>{var C;r||(r=!0,(C=n.onSuccess)==null||C.call(n,w),i==null||i(),s.resolve(w))},m=w=>{var C;r||(r=!0,(C=n.onError)==null||C.call(n,w),i==null||i(),s.reject(w))},y=()=>new Promise(w=>{var C;i=_=>{(r||d())&&w(_)},(C=n.onPause)==null||C.call(n)}).then(()=>{var w;i=void 0,r||(w=n.onContinue)==null||w.call(n)}),b=()=>{if(r)return;let w;const C=t===0?n.initialPromise:void 0;try{w=C??n.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(h).catch(_=>{var M;if(r)return;const E=n.retry??(Ka?0:3),P=n.retryDelay??XF,A=typeof P=="function"?P(t,_):P,T=E===!0||typeof E=="number"&&td()?void 0:y()).then(()=>{e?m(_):b()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?b():y().then(b),s)}}function ez(){let n=[],e=0,t=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const s=a=>{e?n.push(a):i(()=>{t(a)})},o=()=>{const a=n;n=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{t(c)})})})};return{batch:a=>{let c;e++;try{c=a()}finally{e--,e||o()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Qt=ez(),Ta,_A,jM=(_A=class{constructor(){Pe(this,Ta)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wb(this.gcTime)&&ve(this,Ta,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ka?1/0:5*60*1e3))}clearGcTimeout(){j(this,Ta)&&(clearTimeout(j(this,Ta)),ve(this,Ta,void 0))}},Ta=new WeakMap,_A),Uc,Wc,Ir,vn,Rh,Aa,ci,vs,EA,tz=(EA=class extends jM{constructor(e){super();Pe(this,ci);Pe(this,Uc);Pe(this,Wc);Pe(this,Ir);Pe(this,vn);Pe(this,Rh);Pe(this,Aa);ve(this,Aa,!1),ve(this,Rh,e.defaultOptions),this.setOptions(e.options),this.observers=[],ve(this,Ir,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ve(this,Uc,nz(this.options)),this.state=e.state??j(this,Uc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,vn))==null?void 0:e.promise}setOptions(e){this.options={...j(this,Rh),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Ir).remove(this)}setData(e,t){const r=Cb(this.state.data,e,this.options);return We(this,ci,vs).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){We(this,ci,vs).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=j(this,vn))==null?void 0:r.promise;return(i=j(this,vn))==null||i.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Uc))}isActive(){return this.observers.some(e=>fi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cC||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!PM(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,vn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=j(this,vn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,Ir).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(j(this,vn)&&(j(this,Aa)?j(this,vn).cancel({revert:!0}):j(this,vn).cancelRetry()),this.scheduleGc()),j(this,Ir).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,ci,vs).call(this,{type:"invalidate"})}fetch(e,t){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(j(this,vn))return j(this,vn).continueRetry(),j(this,vn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ve(this,Aa,!0),r.signal)})},s=()=>{const h=AM(this.options,t),m={queryKey:this.queryKey,meta:this.meta};return i(m),ve(this,Aa,!1),this.options.persister?this.options.persister(h,m,this):h(m)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),ve(this,Wc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&We(this,ci,vs).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const a=h=>{var m,y,b,w;G1(h)&&h.silent||We(this,ci,vs).call(this,{type:"error",error:h}),G1(h)||((y=(m=j(this,Ir).config).onError)==null||y.call(m,h,this),(w=(b=j(this,Ir).config).onSettled)==null||w.call(b,this.state.data,h,this)),this.scheduleGc()};return ve(this,vn,OM({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var m,y,b,w;if(h===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(C){a(C);return}(y=(m=j(this,Ir).config).onSuccess)==null||y.call(m,h,this),(w=(b=j(this,Ir).config).onSettled)==null||w.call(b,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,m)=>{We(this,ci,vs).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{We(this,ci,vs).call(this,{type:"pause"})},onContinue:()=>{We(this,ci,vs).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,vn).start()}},Uc=new WeakMap,Wc=new WeakMap,Ir=new WeakMap,vn=new WeakMap,Rh=new WeakMap,Aa=new WeakMap,ci=new WeakSet,vs=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...DM(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return G1(i)&&i.revert&&j(this,Wc)?{...j(this,Wc),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,Ir).notify({query:this,type:"updated",action:e})})},EA);function DM(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MM(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function nz(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Bi,RA,rz=(RA=class extends ju{constructor(e={}){super();Pe(this,Bi);this.config=e,ve(this,Bi,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??lC(i,t);let o=this.get(s);return o||(o=new tz({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){j(this,Bi).has(e.queryHash)||(j(this,Bi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=j(this,Bi).get(e.queryHash);t&&(e.destroy(),t===e&&j(this,Bi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,Bi).get(e)}getAll(){return[...j(this,Bi).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>DR(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>DR(e,r)):t}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Bi=new WeakMap,RA),Fi,Tn,Ma,zi,ro,PA,iz=(PA=class extends jM{constructor(e){super();Pe(this,zi);Pe(this,Fi);Pe(this,Tn);Pe(this,Ma);this.mutationId=e.mutationId,ve(this,Tn,e.mutationCache),ve(this,Fi,[]),this.state=e.state||IM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,Fi).includes(e)||(j(this,Fi).push(e),this.clearGcTimeout(),j(this,Tn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ve(this,Fi,j(this,Fi).filter(t=>t!==e)),this.scheduleGc(),j(this,Tn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,Fi).length||(this.state.status==="pending"?this.scheduleGc():j(this,Tn).remove(this))}continue(){var e;return((e=j(this,Ma))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,d,f,h,m,y,b,w,C,_,E,P,A,T,M,N;ve(this,Ma,OM({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(D,$)=>{We(this,zi,ro).call(this,{type:"failed",failureCount:D,error:$})},onPause:()=>{We(this,zi,ro).call(this,{type:"pause"})},onContinue:()=>{We(this,zi,ro).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Tn).canRun(this)}));const t=this.state.status==="pending",r=!j(this,Ma).canStart();try{if(!t){We(this,zi,ro).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=j(this,Tn).config).onMutate)==null?void 0:s.call(i,e,this));const $=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));$!==this.state.context&&We(this,zi,ro).call(this,{type:"pending",context:$,variables:e,isPaused:r})}const D=await j(this,Ma).start();return await((d=(c=j(this,Tn).config).onSuccess)==null?void 0:d.call(c,D,e,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,D,e,this.state.context)),await((y=(m=j(this,Tn).config).onSettled)==null?void 0:y.call(m,D,null,this.state.variables,this.state.context,this)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,D,null,e,this.state.context)),We(this,zi,ro).call(this,{type:"success",data:D}),D}catch(D){try{throw await((_=(C=j(this,Tn).config).onError)==null?void 0:_.call(C,D,e,this.state.context,this)),await((P=(E=this.options).onError)==null?void 0:P.call(E,D,e,this.state.context)),await((T=(A=j(this,Tn).config).onSettled)==null?void 0:T.call(A,void 0,D,this.state.variables,this.state.context,this)),await((N=(M=this.options).onSettled)==null?void 0:N.call(M,void 0,D,e,this.state.context)),D}finally{We(this,zi,ro).call(this,{type:"error",error:D})}}finally{j(this,Tn).runNext(this)}}},Fi=new WeakMap,Tn=new WeakMap,Ma=new WeakMap,zi=new WeakSet,ro=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Qt.batch(()=>{j(this,Fi).forEach(r=>{r.onMutationUpdate(e)}),j(this,Tn).notify({mutation:this,type:"updated",action:e})})},PA);function IM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var hr,Ph,TA,sz=(TA=class extends ju{constructor(e={}){super();Pe(this,hr);Pe(this,Ph);this.config=e,ve(this,hr,new Map),ve(this,Ph,Date.now())}build(e,t,r){const i=new iz({mutationCache:this,mutationId:++kd(this,Ph)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){const t=hm(e),r=j(this,hr).get(t)??[];r.push(e),j(this,hr).set(t,r),this.notify({type:"added",mutation:e})}remove(e){var r;const t=hm(e);if(j(this,hr).has(t)){const i=(r=j(this,hr).get(t))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?j(this,hr).delete(t):j(this,hr).set(t,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const t=(r=j(this,hr).get(hm(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!t||t===e}runNext(e){var r;const t=(r=j(this,hr).get(hm(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(t==null?void 0:t.continue())??Promise.resolve()}clear(){Qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...j(this,hr).values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(r=>IR(t,r))}findAll(e={}){return this.getAll().filter(t=>IR(e,t))}notify(e){Qt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}},hr=new WeakMap,Ph=new WeakMap,TA);function hm(n){var e;return((e=n.options.scope)==null?void 0:e.id)??String(n.mutationId)}function BR(n){return{onFetch:(e,t)=>{var f,h,m,y,b;const r=e.options,i=(m=(h=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,s=((y=e.state.data)==null?void 0:y.pages)||[],o=((b=e.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const d=async()=>{let w=!1;const C=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(e.signal.aborted?w=!0:e.signal.addEventListener("abort",()=>{w=!0}),e.signal)})},_=AM(e.options,e.fetchOptions),E=async(P,A,T)=>{if(w)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const M={queryKey:e.queryKey,pageParam:A,direction:T?"backward":"forward",meta:e.options.meta};C(M);const N=await _(M),{maxPages:D}=e.options,$=T?QF:GF;return{pages:$(P.pages,N,D),pageParams:$(P.pageParams,A,D)}};if(i&&s.length){const P=i==="backward",A=P?oz:FR,T={pages:s,pageParams:o},M=A(r,T);a=await E(T,M,P)}else{const P=n??s.length;do{const A=c===0?o[0]??r.initialPageParam:FR(r,a);if(c>0&&A==null)break;a=await E(a,A),c++}while(c{var w,C;return(C=(w=e.options).persister)==null?void 0:C.call(w,d,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=d}}}function FR(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function oz(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var Lt,mo,go,qc,Zc,vo,Kc,Gc,AA,az=(AA=class{constructor(n={}){Pe(this,Lt);Pe(this,mo);Pe(this,go);Pe(this,qc);Pe(this,Zc);Pe(this,vo);Pe(this,Kc);Pe(this,Gc);ve(this,Lt,n.queryCache||new rz),ve(this,mo,n.mutationCache||new sz),ve(this,go,n.defaultOptions||{}),ve(this,qc,new Map),ve(this,Zc,new Map),ve(this,vo,0)}mount(){kd(this,vo)._++,j(this,vo)===1&&(ve(this,Kc,uC.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Lt).onFocus())})),ve(this,Gc,jg.subscribe(async n=>{n&&(await this.resumePausedMutations(),j(this,Lt).onOnline())})))}unmount(){var n,e;kd(this,vo)._--,j(this,vo)===0&&((n=j(this,Kc))==null||n.call(this),ve(this,Kc,void 0),(e=j(this,Gc))==null||e.call(this),ve(this,Gc,void 0))}isFetching(n){return j(this,Lt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return j(this,mo).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Lt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.getQueryData(n.queryKey);if(e===void 0)return this.fetchQuery(n);{const t=this.defaultQueryOptions(n),r=j(this,Lt).build(this,t);return n.revalidateIfStale&&r.isStaleByTime(_c(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(e)}}getQueriesData(n){return j(this,Lt).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=j(this,Lt).get(r.queryHash),s=i==null?void 0:i.state.data,o=ZF(e,s);if(o!==void 0)return j(this,Lt).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return Qt.batch(()=>j(this,Lt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=j(this,Lt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=j(this,Lt);Qt.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=j(this,Lt),r={type:"active",...n};return Qt.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(n={},e={}){const t={revert:!0,...e},r=Qt.batch(()=>j(this,Lt).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(n={},e={}){return Qt.batch(()=>{if(j(this,Lt).findAll(n).forEach(r=>{r.invalidate()}),n.refetchType==="none")return Promise.resolve();const t={...n,type:n.refetchType??n.type??"active"};return this.refetchQueries(t,e)})}refetchQueries(n={},e){const t={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Qt.batch(()=>j(this,Lt).findAll(n).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Lr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Lr)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=j(this,Lt).build(this,e);return t.isStaleByTime(_c(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Lr).catch(Lr)}fetchInfiniteQuery(n){return n.behavior=BR(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Lr).catch(Lr)}ensureInfiniteQueryData(n){return n.behavior=BR(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return jg.isOnline()?j(this,mo).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Lt)}getMutationCache(){return j(this,mo)}getDefaultOptions(){return j(this,go)}setDefaultOptions(n){ve(this,go,n)}setQueryDefaults(n,e){j(this,qc).set(Ga(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...j(this,qc).values()];let t={};return e.forEach(r=>{wf(n,r.queryKey)&&(t={...t,...r.defaultOptions})}),t}setMutationDefaults(n,e){j(this,Zc).set(Ga(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...j(this,Zc).values()];let t={};return e.forEach(r=>{wf(n,r.mutationKey)&&(t={...t,...r.defaultOptions})}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...j(this,go).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=lC(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===cC&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...j(this,go).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){j(this,Lt).clear(),j(this,mo).clear()}},Lt=new WeakMap,mo=new WeakMap,go=new WeakMap,qc=new WeakMap,Zc=new WeakMap,vo=new WeakMap,Kc=new WeakMap,Gc=new WeakMap,AA),Zn,at,Th,An,Na,Qc,yo,Vi,Ah,Jc,Yc,Oa,ja,xo,Xc,gt,$d,_b,Eb,Rb,Pb,Tb,Ab,Mb,LM,MA,lz=(MA=class extends ju{constructor(e,t){super();Pe(this,gt);Pe(this,Zn);Pe(this,at);Pe(this,Th);Pe(this,An);Pe(this,Na);Pe(this,Qc);Pe(this,yo);Pe(this,Vi);Pe(this,Ah);Pe(this,Jc);Pe(this,Yc);Pe(this,Oa);Pe(this,ja);Pe(this,xo);Pe(this,Xc,new Set);this.options=t,ve(this,Zn,e),ve(this,Vi,null),ve(this,yo,kb()),this.options.experimental_prefetchInRender||j(this,yo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,at).addObserver(this),zR(j(this,at),this.options)?We(this,gt,$d).call(this):this.updateResult(),We(this,gt,Pb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nb(j(this,at),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nb(j(this,at),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,We(this,gt,Tb).call(this),We(this,gt,Ab).call(this),j(this,at).removeObserver(this)}setOptions(e,t){const r=this.options,i=j(this,at);if(this.options=j(this,Zn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fi(this.options.enabled,j(this,at))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");We(this,gt,Mb).call(this),j(this,at).setOptions(this.options),r._defaulted&&!Og(this.options,r)&&j(this,Zn).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,at),observer:this});const s=this.hasListeners();s&&VR(j(this,at),i,this.options,r)&&We(this,gt,$d).call(this),this.updateResult(t),s&&(j(this,at)!==i||fi(this.options.enabled,j(this,at))!==fi(r.enabled,j(this,at))||_c(this.options.staleTime,j(this,at))!==_c(r.staleTime,j(this,at)))&&We(this,gt,_b).call(this);const o=We(this,gt,Eb).call(this);s&&(j(this,at)!==i||fi(this.options.enabled,j(this,at))!==fi(r.enabled,j(this,at))||o!==j(this,xo))&&We(this,gt,Rb).call(this,o)}getOptimisticResult(e){const t=j(this,Zn).getQueryCache().build(j(this,Zn),e),r=this.createResult(t,e);return uz(this,r)&&(ve(this,An,r),ve(this,Qc,this.options),ve(this,Na,j(this,at).state)),r}getCurrentResult(){return j(this,An)}trackResult(e,t){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t==null||t(i),e[i])})}),r}trackProp(e){j(this,Xc).add(e)}getCurrentQuery(){return j(this,at)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=j(this,Zn).defaultQueryOptions(e),r=j(this,Zn).getQueryCache().build(j(this,Zn),t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return We(this,gt,$d).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,An)))}createResult(e,t){var D;const r=j(this,at),i=this.options,s=j(this,An),o=j(this,Na),a=j(this,Qc),d=e!==r?e.state:j(this,Th),{state:f}=e;let h={...f},m=!1,y;if(t._optimisticResults){const $=this.hasListeners(),Z=!$&&zR(e,t),U=$&&VR(e,r,t,i);(Z||U)&&(h={...h,...DM(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:C}=h;if(t.select&&h.data!==void 0)if(s&&h.data===(o==null?void 0:o.data)&&t.select===j(this,Ah))y=j(this,Jc);else try{ve(this,Ah,t.select),y=t.select(h.data),y=Cb(s==null?void 0:s.data,y,t),ve(this,Jc,y),ve(this,Vi,null)}catch($){ve(this,Vi,$)}else y=h.data;if(t.placeholderData!==void 0&&y===void 0&&C==="pending"){let $;if(s!=null&&s.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData))$=s.data;else if($=typeof t.placeholderData=="function"?t.placeholderData((D=j(this,Yc))==null?void 0:D.state.data,j(this,Yc)):t.placeholderData,t.select&&$!==void 0)try{$=t.select($),ve(this,Vi,null)}catch(Z){ve(this,Vi,Z)}$!==void 0&&(C="success",y=Cb(s==null?void 0:s.data,$,t),m=!0)}j(this,Vi)&&(b=j(this,Vi),y=j(this,Jc),w=Date.now(),C="error");const _=h.fetchStatus==="fetching",E=C==="pending",P=C==="error",A=E&&_,T=y!==void 0,N={status:C,fetchStatus:h.fetchStatus,isPending:E,isSuccess:C==="success",isError:P,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:_,isRefetching:_&&!E,isLoadingError:P&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:P&&T,isStale:dC(e,t),refetch:this.refetch,promise:j(this,yo)};if(this.options.experimental_prefetchInRender){const $=V=>{N.status==="error"?V.reject(N.error):N.data!==void 0&&V.resolve(N.data)},Z=()=>{const V=ve(this,yo,N.promise=kb());$(V)},U=j(this,yo);switch(U.status){case"pending":e.queryHash===r.queryHash&&$(U);break;case"fulfilled":(N.status==="error"||N.data!==U.value)&&Z();break;case"rejected":(N.status!=="error"||N.error!==U.reason)&&Z();break}}return N}updateResult(e){const t=j(this,An),r=this.createResult(j(this,at),this.options);if(ve(this,Na,j(this,at).state),ve(this,Qc,this.options),j(this,Na).data!==void 0&&ve(this,Yc,j(this,at)),Og(r,t))return;ve(this,An,r);const i={},s=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!j(this,Xc).size)return!0;const c=new Set(a??j(this,Xc));return this.options.throwOnError&&c.add("error"),Object.keys(j(this,An)).some(d=>{const f=d;return j(this,An)[f]!==t[f]&&c.has(f)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),We(this,gt,LM).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&We(this,gt,Pb).call(this)}},Zn=new WeakMap,at=new WeakMap,Th=new WeakMap,An=new WeakMap,Na=new WeakMap,Qc=new WeakMap,yo=new WeakMap,Vi=new WeakMap,Ah=new WeakMap,Jc=new WeakMap,Yc=new WeakMap,Oa=new WeakMap,ja=new WeakMap,xo=new WeakMap,Xc=new WeakMap,gt=new WeakSet,$d=function(e){We(this,gt,Mb).call(this);let t=j(this,at).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(Lr)),t},_b=function(){We(this,gt,Tb).call(this);const e=_c(this.options.staleTime,j(this,at));if(Ka||j(this,An).isStale||!wb(e))return;const r=PM(j(this,An).dataUpdatedAt,e)+1;ve(this,Oa,setTimeout(()=>{j(this,An).isStale||this.updateResult()},r))},Eb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,at)):this.options.refetchInterval)??!1},Rb=function(e){We(this,gt,Ab).call(this),ve(this,xo,e),!(Ka||fi(this.options.enabled,j(this,at))===!1||!wb(j(this,xo))||j(this,xo)===0)&&ve(this,ja,setInterval(()=>{(this.options.refetchIntervalInBackground||uC.isFocused())&&We(this,gt,$d).call(this)},j(this,xo)))},Pb=function(){We(this,gt,_b).call(this),We(this,gt,Rb).call(this,We(this,gt,Eb).call(this))},Tb=function(){j(this,Oa)&&(clearTimeout(j(this,Oa)),ve(this,Oa,void 0))},Ab=function(){j(this,ja)&&(clearInterval(j(this,ja)),ve(this,ja,void 0))},Mb=function(){const e=j(this,Zn).getQueryCache().build(j(this,Zn),this.options);if(e===j(this,at))return;const t=j(this,at);ve(this,at,e),ve(this,Th,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},LM=function(e){Qt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(j(this,An))}),j(this,Zn).getQueryCache().notify({query:j(this,at),type:"observerResultsUpdated"})})},MA);function cz(n,e){return fi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function zR(n,e){return cz(n,e)||n.state.data!==void 0&&Nb(n,e,e.refetchOnMount)}function Nb(n,e,t){if(fi(e.enabled,n)!==!1){const r=typeof t=="function"?t(n):t;return r==="always"||r!==!1&&dC(n,e)}return!1}function VR(n,e,t,r){return(n!==e||fi(r.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&dC(n,t)}function dC(n,e){return fi(e.enabled,n)!==!1&&n.isStaleByTime(_c(e.staleTime,n))}function uz(n,e){return!Og(n.getCurrentResult(),e)}var bo,wo,Kn,Ss,Ps,ag,Ob,NA,dz=(NA=class extends ju{constructor(t,r){super();Pe(this,Ps);Pe(this,bo);Pe(this,wo);Pe(this,Kn);Pe(this,Ss);ve(this,bo,t),this.setOptions(r),this.bindMethods(),We(this,Ps,ag).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const r=this.options;this.options=j(this,bo).defaultMutationOptions(t),Og(this.options,r)||j(this,bo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,Kn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ga(r.mutationKey)!==Ga(this.options.mutationKey)?this.reset():((i=j(this,Kn))==null?void 0:i.state.status)==="pending"&&j(this,Kn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=j(this,Kn))==null||t.removeObserver(this)}onMutationUpdate(t){We(this,Ps,ag).call(this),We(this,Ps,Ob).call(this,t)}getCurrentResult(){return j(this,wo)}reset(){var t;(t=j(this,Kn))==null||t.removeObserver(this),ve(this,Kn,void 0),We(this,Ps,ag).call(this),We(this,Ps,Ob).call(this)}mutate(t,r){var i;return ve(this,Ss,r),(i=j(this,Kn))==null||i.removeObserver(this),ve(this,Kn,j(this,bo).getMutationCache().build(j(this,bo),this.options)),j(this,Kn).addObserver(this),j(this,Kn).execute(t)}},bo=new WeakMap,wo=new WeakMap,Kn=new WeakMap,Ss=new WeakMap,Ps=new WeakSet,ag=function(){var r;const t=((r=j(this,Kn))==null?void 0:r.state)??IM();ve(this,wo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ob=function(t){Qt.batch(()=>{var r,i,s,o,a,c,d,f;if(j(this,Ss)&&this.hasListeners()){const h=j(this,wo).variables,m=j(this,wo).context;(t==null?void 0:t.type)==="success"?((i=(r=j(this,Ss)).onSuccess)==null||i.call(r,t.data,h,m),(o=(s=j(this,Ss)).onSettled)==null||o.call(s,t.data,null,h,m)):(t==null?void 0:t.type)==="error"&&((c=(a=j(this,Ss)).onError)==null||c.call(a,t.error,h,m),(f=(d=j(this,Ss)).onSettled)==null||f.call(d,void 0,t.error,h,m))}this.listeners.forEach(h=>{h(j(this,wo))})})},NA),$M=x.createContext(void 0),fC=n=>{const e=x.useContext($M);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},fz=({client:n,children:e})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx($M.Provider,{value:n,children:e})),BM=x.createContext(!1),hz=()=>x.useContext(BM);BM.Provider;function pz(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var mz=x.createContext(pz()),gz=()=>x.useContext(mz);function FM(n,e){return typeof n=="function"?n(...e):!!n}function jb(){}var vz=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},yz=n=>{x.useEffect(()=>{n.clearReset()},[n])},xz=({result:n,errorResetBoundary:e,throwOnError:t,query:r})=>n.isError&&!e.isReset()&&!n.isFetching&&r&&FM(t,[n.error,r]),bz=n=>{n.suspense&&(n.staleTime===void 0&&(n.staleTime=1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},wz=(n,e)=>n.isLoading&&n.isFetching&&!e,Sz=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,HR=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function Cz(n,e,t){var f,h,m,y,b;const r=fC(),i=hz(),s=gz(),o=r.defaultQueryOptions(n);(h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",bz(o),vz(o,s),yz(s);const a=!r.getQueryCache().get(o.queryHash),[c]=x.useState(()=>new e(r,o)),d=c.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(w=>{const C=i?jb:c.subscribe(Qt.batchCalls(w));return c.updateResult(),C},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),x.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),Sz(o,d))throw HR(o,c,s);if(xz({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw d.error;if((y=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||y.call(m,o,d),o.experimental_prefetchInRender&&!Ka&&wz(d,i)){const w=a?HR(o,c,s):(b=r.getQueryCache().get(o.queryHash))==null?void 0:b.promise;w==null||w.catch(jb).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function kz(n,e){return Cz(n,lz)}function _z(n,e){const t=fC(),[r]=x.useState(()=>new dz(t,n));x.useEffect(()=>{r.setOptions(n)},[r,n]);const i=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(Qt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=x.useCallback((o,a)=>{r.mutate(o,a).catch(jb)},[r]);if(i.error&&FM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const Ba="__TSR_index",UR="popstate",WR="beforeunload";function zM(n){let e=n.getLocation();const t=new Set,r=o=>{e=n.getLocation(),t.forEach(a=>a({location:e,action:o}))},i=o=>{n.notifyOnIndexChange??!0?r(o):e=n.getLocation()},s=async({task:o,navigateOpts:a,...c})=>{var d,f;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const m=((d=n.getBlockers)==null?void 0:d.call(n))??[],y=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&m.length&&y)for(const b of m){const w=Sf(c.path,c.state);if(await b.blockerFn({currentLocation:e,nextLocation:w,action:c.type})){(f=n.onBlocked)==null||f.call(n);return}}o()};return{get location(){return e},get length(){return n.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,a,c)=>{const d=e.state[Ba];a=Db(d+1,a),s({task:()=>{n.pushState(o,a),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:a})},replace:(o,a,c)=>{const d=e.state[Ba];a=Db(d,a),s({task:()=>{n.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:a})},go:(o,a)=>{s({task:()=>{n.go(o),i({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{s({task:()=>{n.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{n.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[Ba]!==0,createHref:o=>n.createHref(o),block:o=>{var a;if(!n.setBlockers)return()=>{};const c=((a=n.getBlockers)==null?void 0:a.call(n))??[];return n.setBlockers([...c,o]),()=>{var d,f;const h=((d=n.getBlockers)==null?void 0:d.call(n))??[];(f=n.setBlockers)==null||f.call(n,h.filter(m=>m!==o))}},flush:()=>{var o;return(o=n.flush)==null?void 0:o.call(n)},destroy:()=>{var o;return(o=n.destroy)==null?void 0:o.call(n)},notify:r}}function Db(n,e){return e||(e={}),{...e,key:Pz(),[Ba]:n}}function Ez(n){const e=typeof document<"u"?window:void 0,t=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,o=D=>i=D,a=D=>D,c=()=>Sf(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state);let d=c(),f,h=!1,m=!1,y=!1,b=!1;const w=()=>d;let C,_;const E=()=>{C&&(N._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),N._ignoreSubscribers=!1,C=void 0,_=void 0,f=void 0)},P=(D,$,Z)=>{const U=a($);_||(f=d),d=Sf($,Z),C={href:U,state:Z,isPush:(C==null?void 0:C.isPush)||D==="push"},_||(_=Promise.resolve().then(()=>E()))},A=D=>{d=c(),N.notify({type:D})},T=async()=>{if(m){m=!1;return}const D=c(),$=D.state[Ba]-d.state[Ba],Z=$===1,U=$===-1,V=!Z&&!U||h;h=!1;const oe=V?"GO":U?"BACK":"FORWARD",ne=V?{type:"GO",index:$}:{type:U?"BACK":"FORWARD"};if(y)y=!1;else{const ce=s();if(typeof document<"u"&&ce.length){for(const se of ce)if(await se.blockerFn({currentLocation:d,nextLocation:D,action:oe})){m=!0,e.history.go(1),N.notify(ne);return}}}d=c(),N.notify(ne)},M=D=>{if(b){b=!1;return}let $=!1;const Z=s();if(typeof document<"u"&&Z.length)for(const U of Z){const V=U.enableBeforeUnload??!0;if(V===!0){$=!0;break}if(typeof V=="function"&&V()===!0){$=!0;break}}if($)return D.preventDefault(),D.returnValue=""},N=zM({getLocation:w,getLength:()=>e.history.length,pushState:(D,$)=>P("push",D,$),replaceState:(D,$)=>P("replace",D,$),back:D=>(D&&(y=!0),b=!0,e.history.back()),forward:D=>{D&&(y=!0),b=!0,e.history.forward()},go:D=>{h=!0,e.history.go(D)},createHref:D=>a(D),flush:E,destroy:()=>{e.history.pushState=t,e.history.replaceState=r,e.removeEventListener(WR,M,{capture:!0}),e.removeEventListener(UR,T)},onBlocked:()=>{f&&d!==f&&(d=f)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(WR,M,{capture:!0}),e.addEventListener(UR,T),e.history.pushState=function(...D){const $=t.apply(e.history,D);return N._ignoreSubscribers||A("PUSH"),$},e.history.replaceState=function(...D){const $=r.apply(e.history,D);return N._ignoreSubscribers||A("REPLACE"),$},N}function Rz(n={initialEntries:["/"]}){const e=n.initialEntries;let t=n.initialIndex?Math.min(Math.max(n.initialIndex,0),e.length-1):e.length-1;const r=e.map((s,o)=>Db(o,void 0));return zM({getLocation:()=>Sf(e[t],r[t]),getLength:()=>e.length,pushState:(s,o)=>{t{r[t]=o,e[t]=s},back:()=>{t=Math.max(t-1,0)},forward:()=>{t=Math.min(t+1,e.length-1)},go:s=>{t=Math.min(Math.max(t+s,0),e.length-1)},createHref:s=>s})}function Sf(n,e){const t=n.indexOf("#"),r=n.indexOf("?");return{href:n,pathname:n.substring(0,t>0?r>0?Math.min(t,r):t:r>0?r:n.length),hash:t>-1?n.substring(t):"",search:r>-1?n.slice(r,t===-1?void 0:t):"",state:e||{[Ba]:0}}}function Pz(){return(Math.random()+1).toString(36).substring(7)}var Tz="Invariant failed";function yr(n,e){if(!n)throw new Error(Tz)}const Q1=x.createContext(null);function VM(){return typeof document>"u"?Q1:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Q1,Q1)}function gl(n){const e=x.useContext(VM());return n==null||n.warn,e}var J1={exports:{}},Y1={},X1={exports:{}},ex={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var qR;function Az(){if(qR)return ex;qR=1;var n=Nh();function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var t=typeof Object.is=="function"?Object.is:e,r=n.useState,i=n.useEffect,s=n.useLayoutEffect,o=n.useDebugValue;function a(h,m){var y=m(),b=r({inst:{value:y,getSnapshot:m}}),w=b[0].inst,C=b[1];return s(function(){w.value=y,w.getSnapshot=m,c(w)&&C({inst:w})},[h,y,m]),i(function(){return c(w)&&C({inst:w}),h(function(){c(w)&&C({inst:w})})},[h]),o(y),y}function c(h){var m=h.getSnapshot;h=h.value;try{var y=m();return!t(h,y)}catch{return!0}}function d(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return ex.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:f,ex}var ZR;function Mz(){return ZR||(ZR=1,X1.exports=Az()),X1.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var KR;function Nz(){if(KR)return Y1;KR=1;var n=Nh(),e=Mz();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var r=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,s=n.useRef,o=n.useEffect,a=n.useMemo,c=n.useDebugValue;return Y1.useSyncExternalStoreWithSelector=function(d,f,h,m,y){var b=s(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=a(function(){function _(M){if(!E){if(E=!0,P=M,M=m(M),y!==void 0&&w.hasValue){var N=w.value;if(y(N,M))return A=N}return A=M}if(N=A,r(P,M))return N;var D=m(M);return y!==void 0&&y(N,D)?(P=M,N):(P=M,A=D)}var E=!1,P,A,T=h===void 0?null:h;return[function(){return _(f())},T===null?void 0:function(){return _(T())}]},[f,h,m,y]);var C=i(d,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=C},[C]),c(C),C},Y1}var GR;function Oz(){return GR||(GR=1,J1.exports=Nz()),J1.exports}var jz=Oz();const Ec=new WeakMap,lg=new WeakMap,Dg={current:[]};let tx=!1,tf=0;const Bd=new Set,pm=new Map;function HM(n){const e=Array.from(n).sort((t,r)=>t instanceof Rc&&t.options.deps.includes(r)?1:r instanceof Rc&&r.options.deps.includes(t)?-1:0);for(const t of e){if(Dg.current.includes(t))continue;Dg.current.push(t),t.recompute();const r=lg.get(t);if(r)for(const i of r){const s=Ec.get(i);s&&HM(s)}}}function Dz(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function Iz(n){n.listeners.forEach(e=>e({prevVal:n.prevState,currentVal:n.state}))}function UM(n){if(tf>0&&!pm.has(n)&&pm.set(n,n.prevState),Bd.add(n),!(tf>0)&&!tx)try{for(tx=!0;Bd.size>0;){const e=Array.from(Bd);Bd.clear();for(const t of e){const r=pm.get(t)??t.prevState;t.prevState=r,Dz(t)}for(const t of e){const r=Ec.get(t);r&&(Dg.current.push(t),HM(r))}for(const t of e){const r=Ec.get(t);if(r)for(const i of r)Iz(i)}}}finally{tx=!1,Dg.current=[],pm.clear()}}function nx(n){tf++;try{n()}finally{if(tf--,tf===0){const e=Array.from(Bd)[0];e&&UM(e)}}}class Ib{constructor(e,t){this.listeners=new Set,this.subscribe=r=>{var i,s;this.listeners.add(r);const o=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=>{this.listeners.delete(r),o==null||o()}},this.setState=r=>{var i,s,o;this.prevState=this.state,this.state=(i=this.options)!=null&&i.updateFn?this.options.updateFn(this.prevState)(r):r(this.prevState),(o=(s=this.options)==null?void 0:s.onUpdate)==null||o.call(s),UM(this)},this.prevState=e,this.state=e,this.options=t}}class Rc{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const t=[],r=[];for(const i of this.options.deps)t.push(i.prevState),r.push(i.state);return this.lastSeenDepValues=r,{prevDepVals:t,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var t,r;this.prevState=this.state;const{prevDepVals:i,currDepVals:s,prevVal:o}=this.getDepVals();this.state=this.options.fn({prevDepVals:i,currDepVals:s,prevVal:o}),(r=(t=this.options).onUpdate)==null||r.call(t)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof Rc&&s.checkIfRecalculationNeededDeeply();let t=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const t of this._subscriptions)t()}),this.subscribe=t=>{var r,i;this.listeners.add(t);const s=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,t,this);return()=>{this.listeners.delete(t),s==null||s()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const t of e)if(t instanceof Rc)t.registerOnGraph(),this.registerOnGraph(t.options.deps);else if(t instanceof Ib){let r=Ec.get(t);r||(r=new Set,Ec.set(t,r)),r.add(this);let i=lg.get(this);i||(i=new Set,lg.set(this,i)),i.add(t)}}unregisterFromGraph(e=this.options.deps){for(const t of e)if(t instanceof Rc)this.unregisterFromGraph(t.options.deps);else if(t instanceof Ib){const r=Ec.get(t);r&&r.delete(this);const i=lg.get(this);i&&i.delete(t)}}}function Lz(n,e=t=>t){return jz.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,e,$z)}function $z(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;if(n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(const[r,i]of n)if(!e.has(r)||!Object.is(i,e.get(r)))return!1;return!0}if(n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(const r of n)if(!e.has(r))return!1;return!0}const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let r=0;r{e.substring(0,1)==="?"&&(e=e.substring(1));const t=Fz(e);for(const r in t){const i=t[r];if(typeof i=="string")try{t[r]=n(i)}catch{}}return t}}function Uz(n,e){function t(r){if(typeof r=="object"&&r!==null)try{return n(r)}catch{}else if(typeof r=="string"&&typeof e=="function")try{return e(r),n(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(s=>{const o=r[s];typeof o>"u"||o===void 0?delete r[s]:r[s]=t(o)});const i=Bz(r).toString();return i?`?${i}`:""}}function nf(n){return n[n.length-1]}function Wz(n){return typeof n=="function"}function mm(n,e){return Wz(n)?n(e):n}function cg(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function Dr(n,e){if(n===e)return n;const t=e,r=YR(n)&&YR(t);if(r||Eo(n)&&Eo(t)){const i=r?n:Object.keys(n),s=i.length,o=r?t:Object.keys(t),a=o.length,c=r?[]:{};let d=0;for(let f=0;f"u")return!0;const t=e.prototype;return!(!JR(t)||!t.hasOwnProperty("isPrototypeOf"))}function JR(n){return Object.prototype.toString.call(n)==="[object Object]"}function YR(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function XR(n,e){let t=Object.keys(n);return e&&(t=t.filter(r=>n[r]!==void 0)),t}function rf(n,e,t){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(Eo(n)&&Eo(e)){const r=(t==null?void 0:t.ignoreUndefined)??!0,i=XR(n,r),s=XR(e,r);return!(t!=null&&t.partial)&&i.length!==s.length?!1:s.every(o=>rf(n[o],e[o],t))}return Array.isArray(n)&&Array.isArray(e)?n.length!==e.length?!1:!n.some((r,i)=>!rf(r,e[i],t)):!1}const gm=typeof window<"u"?x.useLayoutEffect:x.useEffect;function sc(n){let e,t;const r=new Promise((i,s)=>{e=i,t=s});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,e(i),n==null||n(i)},r.reject=i=>{r.status="rejected",t(i)},r}function rx(n){const e=x.useRef({value:n,prev:null}),t=e.current.value;return n!==t&&(e.current={value:n,prev:t}),e.current.prev}function Es(n){return ey(n.filter(e=>e!==void 0).join("/"))}function ey(n){return n.replace(/\/{2,}/g,"/")}function hC(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function ka(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function qz(n){return ka(hC(n))}function Zz({basepath:n,base:e,to:t,trailingSlash:r="never",caseSensitive:i}){var s,o;e=Ig(n,e,i),t=Ig(n,t,i);let a=ru(e);const c=ru(t);a.length>1&&((s=nf(a))==null?void 0:s.value)==="/"&&a.pop(),c.forEach((f,h)=>{f.value==="/"?h?h===c.length-1&&a.push(f):a=[f]:f.value===".."?a.pop():f.value==="."||a.push(f)}),a.length>1&&(((o=nf(a))==null?void 0:o.value)==="/"?r==="never"&&a.pop():r==="always"&&a.push({type:"pathname",value:"/"}));const d=Es([n,...a.map(f=>f.value)]);return ey(d)}function ru(n){if(!n)return[];n=ey(n);const e=[];if(n.slice(0,1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),!n)return e;const t=n.split("/").filter(Boolean);return e.push(...t.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURI(r)})),n.slice(-1)==="/"&&(n=n.substring(1),e.push({type:"pathname",value:"/"})),e}function vm({path:n,params:e,leaveWildcards:t,leaveParams:r,decodeCharMap:i}){const s=ru(n),o={};for(const[a,c]of Object.entries(e)){const d=typeof c=="string";["*","_splat"].includes(a)?o[a]=d?encodeURI(c):c:o[a]=d?Kz(c,i):c}return Es(s.map(a=>{if(a.type==="wildcard"){const c=o._splat;return t?`${a.value}${c??""}`:c}if(a.type==="param"){if(r){const c=o[a.value];return`${a.value}${c??""}`}return o[a.value.substring(1)]??"undefined"}return a.value}))}function Kz(n,e){let t=encodeURIComponent(n);if(e)for(const[r,i]of e)t=t.replaceAll(r,i);return t}function ym(n,e,t){const r=Gz(n,e,t);if(!(t.to&&!r))return r??{}}function Ig(n,e,t=!1){const r=t?n:n.toLowerCase(),i=t?e:e.toLowerCase();switch(!0){case r==="/":return e;case i===r:return"";case e.length{for(let c=0;c=i.length-1,m=c>=s.length-1;if(f){if(f.type==="wildcard"){const y=decodeURI(Es(i.slice(c).map(b=>b.value)));return o["*"]=y,o._splat=y,!0}if(f.type==="pathname"){if(f.value==="/"&&!(d!=null&&d.value))return!0;if(d){if(t.caseSensitive){if(f.value!==d.value)return!1}else if(f.value.toLowerCase()!==d.value.toLowerCase())return!1}}if(!d)return!1;if(f.type==="param"){if(d.value==="/")return!1;d.value.charAt(0)!=="$"&&(o[f.value.substring(1)]=decodeURIComponent(d.value))}}if(!h&&m)return o["**"]=Es(i.slice(c+1).map(y=>y.value)),!!t.fuzzy&&(f==null?void 0:f.value)!=="/"}return!0})()?o:void 0}function va(n){return!!(n!=null&&n.isRedirect)}function ix(n){return!!(n!=null&&n.isRedirect)&&n.href}function pC(n){const e=n.errorComponent??ty;return v.jsx(Qz,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:t,reset:r})=>t?x.createElement(e,{error:t,reset:r}):n.children})}class Qz extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ty({error:n}){const[e,t]=x.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:e?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),e?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?v.jsx("code",{children:n.message}):null})}):null]})}function Hr(n){const e=gl({warn:(n==null?void 0:n.router)===void 0}),t=(n==null?void 0:n.router)||e,r=x.useRef();return Lz(t.__store,i=>{if(n!=null&&n.select){if(n.structuralSharing??t.options.defaultStructuralSharing){const s=Dr(r.current,n.select(i));return r.current=s,s}return n.select(i)}return i})}function di(n){return!!(n!=null&&n.isNotFound)}function Jz(n){const e=Hr({select:t=>`not-found-${t.location.pathname}-${t.status}`});return v.jsx(pC,{getResetKey:()=>e,onCatch:(t,r)=>{var i;if(di(t))(i=n.onCatch)==null||i.call(n,t,r);else throw t},errorComponent:({error:t})=>{var r;if(di(t))return(r=n.fallback)==null?void 0:r.call(n,t);throw t},children:n.children})}function Yz(){return v.jsx("p",{children:"Not Found"})}const Fd={stringify:n=>JSON.stringify(n,function(t,r){const i=this[t],s=bm.find(o=>o.stringifyCondition(i));return s?s.stringify(i):r}),parse:n=>JSON.parse(n,function(t,r){const i=this[t];if(Eo(i)){const s=bm.find(o=>o.parseCondition(i));if(s)return s.parse(i)}return r}),encode:n=>{if(Array.isArray(n))return n.map(t=>Fd.encode(t));if(Eo(n))return Object.fromEntries(Object.entries(n).map(([t,r])=>[t,Fd.encode(r)]));const e=bm.find(t=>t.stringifyCondition(n));return e?e.stringify(n):n},decode:n=>{if(Eo(n)){const e=bm.find(t=>t.parseCondition(n));if(e)return e.parse(n)}return Array.isArray(n)?n.map(e=>Fd.decode(e)):Eo(n)?Object.fromEntries(Object.entries(n).map(([e,t])=>[e,Fd.decode(t)])):n}},xm=(n,e,t,r)=>({key:n,stringifyCondition:e,stringify:i=>({[`$${n}`]:t(i)}),parseCondition:i=>Object.hasOwn(i,`$${n}`),parse:i=>r(i[`$${n}`])}),bm=[xm("undefined",n=>n===void 0,()=>0,()=>{}),xm("date",n=>n instanceof Date,n=>n.toISOString(),n=>new Date(n)),xm("error",n=>n instanceof Error,n=>({...n,message:n.message,stack:n.stack,cause:n.cause}),n=>Object.assign(new Error(n.message),n)),xm("formData",n=>n instanceof FormData,n=>{const e={};return n.forEach((t,r)=>{const i=e[r];i!==void 0?Array.isArray(i)?i.push(t):e[r]=[i,t]:e[r]=t}),e},n=>{const e=new FormData;return Object.entries(n).forEach(([t,r])=>{Array.isArray(r)?r.forEach(i=>e.append(t,i)):e.append(t,r)}),e})],WM=["component","errorComponent","pendingComponent","notFoundComponent"];function Xz(n){var e;for(const t of WM)if((e=n.options[t])!=null&&e.preload)return!0;return!1}function sx(n,e){if(n==null)return{};if("~standard"in n){const t=n["~standard"].validate(e);if(t instanceof Promise)throw new Lb("Async validation not supported");if(t.issues)throw new Lb(JSON.stringify(t.issues,void 0,2));return t.value}return"parse"in n?n.parse(e):typeof n=="function"?n(e):{}}function eV(n){return new tV(n)}class tV{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.startReactTransition=t=>t(),this.update=t=>{var r;t.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options;this.options={...this.options,...t},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(s=>[encodeURIComponent(s),s])):void 0,(!this.basepath||t.basepath&&t.basepath!==i.basepath)&&(t.basepath===void 0||t.basepath===""||t.basepath==="/"?this.basepath="/":this.basepath=`/${qz(t.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?Rz({initialEntries:[this.basepath||"/"]}):Ez()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Ib(rV(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(s=>!["redirected"].includes(s.status))}}})),typeof window<"u"&&"CSS"in window&&typeof((r=window.CSS)==null?void 0:r.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const t=this.options.notFoundRoute;t&&(t.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[t.id]=t);const r=o=>{o.forEach((a,c)=>{a.init({originalIndex:c,defaultSsr:this.options.defaultSsr});const d=this.routesById[a.id];if(yr(!d,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const h=ka(a.fullPath);(!this.routesByPath[h]||a.fullPath.endsWith("/"))&&(this.routesByPath[h]=a)}const f=a.children;f!=null&&f.length&&r(f)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((o,a)=>{var c;if(o.isRoot||!o.path)return;const d=hC(o.fullPath),f=ru(d);for(;f.length>1&&((c=f[0])==null?void 0:c.value)==="/";)f.shift();const h=f.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);i.push({child:o,trimmed:d,parsed:f,index:a,scores:h})}),this.flatRoutes=i.sort((o,a)=>{const c=Math.min(o.scores.length,a.scores.length);for(let d=0;da.parsed[d].value?1:-1;return o.index-a.index}).map((o,a)=>(o.child.rank=a,o.child))},this.subscribe=(t,r)=>{const i={eventType:t,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=t=>{this.subscribers.forEach(r=>{r.eventType===t.type&&r.fn(t)})},this.parseLocation=(t,r)=>{const i=({pathname:c,search:d,hash:f,state:h})=>{const m=this.options.parseSearch(d),y=this.options.stringifySearch(m);return{pathname:c,searchStr:y,search:Dr(t==null?void 0:t.search,m),hash:f.split("#").reverse()[0]??"",href:`${c}${y}${f}`,state:Dr(t==null?void 0:t.state,h)}},s=i(r??this.history.location),{__tempLocation:o,__tempKey:a}=s.state;if(o&&(!a||a===this.tempLocationKey)){const c=i(o);return c.state.key=s.state.key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(t,r)=>Zz({basepath:this.basepath,base:t,to:ey(r),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.getMatchedRoutes=(t,r)=>{let i={};const s=ka(t.pathname),o=f=>ym(this.basepath,s,{to:f.fullPath,caseSensitive:f.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let a=(r==null?void 0:r.to)!==void 0?this.routesByPath[r.to]:void 0;a?i=o(a):a=this.flatRoutes.find(f=>{const h=o(f);return h?(i=h,!0):!1});let c=a||this.routesById[gr];const d=[c];for(;c.parentRoute;)c=c.parentRoute,d.unshift(c);return{matchedRoutes:d,routeParams:i,foundRoute:a}},this.cancelMatch=t=>{const r=this.getMatch(t);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var t;(t=this.state.pendingMatches)==null||t.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=t=>{const r=(s={},o)=>{var a,c,d,f,h,m;const y=s._fromLocation?this.matchRoutes(s._fromLocation,{_buildLocation:!0}):this.state.matches,b=s.from!=null?y.find(U=>ym(this.basepath,ka(U.pathname),{to:s.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(b==null?void 0:b.pathname)||this.latestLocation.pathname;yr(s.from==null||b!=null,"Could not find match for from: "+s.from);const C=(a=this.state.pendingMatches)!=null&&a.length?(c=nf(this.state.pendingMatches))==null?void 0:c.search:((d=nf(y))==null?void 0:d.search)||this.latestLocation.search,_=o==null?void 0:o.matchedRoutes.filter(U=>y.find(V=>V.routeId===U.id));let E;if(s.to)E=this.resolvePathWithBase(w,`${s.to}`);else{const U=this.routesById[(f=_==null?void 0:_.find(V=>{const oe=vm({path:V.fullPath,params:(o==null?void 0:o.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap});return Es([this.basepath,oe])===w}))==null?void 0:f.id];E=this.resolvePathWithBase(w,(U==null?void 0:U.to)??w)}const P={...(h=nf(y))==null?void 0:h.params};let A=(s.params??!0)===!0?P:{...P,...mm(s.params,P)};Object.keys(A).length>0&&(o==null||o.matchedRoutes.map(U=>{var V;return((V=U.options.params)==null?void 0:V.stringify)??U.options.stringifyParams}).filter(Boolean).forEach(U=>{A={...A,...U(A)}})),E=vm({path:E,params:A??{},leaveWildcards:!1,leaveParams:t.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap});let T=C;if(t._includeValidateSearch&&((m=this.options.search)!=null&&m.strict)){let U={};o==null||o.matchedRoutes.forEach(V=>{try{V.options.validateSearch&&(U={...U,...sx(V.options.validateSearch,{...U,...T})??{}})}catch{}}),T=U}T=(U=>{const V=(o==null?void 0:o.matchedRoutes.reduce((ce,se)=>{var pe;const G=[];if("search"in se.options)(pe=se.options.search)!=null&&pe.middlewares&&G.push(...se.options.search.middlewares);else if(se.options.preSearchFilters||se.options.postSearchFilters){const Q=({search:re,next:F})=>{let L=re;"preSearchFilters"in se.options&&se.options.preSearchFilters&&(L=se.options.preSearchFilters.reduce((ee,J)=>J(ee),re));const W=F(L);return"postSearchFilters"in se.options&&se.options.postSearchFilters?se.options.postSearchFilters.reduce((ee,J)=>J(ee),W):W};G.push(Q)}if(t._includeValidateSearch&&se.options.validateSearch){const Q=({search:re,next:F})=>{try{const L=F(re);return{...L,...sx(se.options.validateSearch,L)??{}}}catch{}};G.push(Q)}return ce.concat(G)},[]))??[],oe=({search:ce})=>s.search?s.search===!0?ce:mm(s.search,ce):{};V.push(oe);const ne=(ce,se)=>{if(ce>=V.length)return se;const pe=V[ce];return pe({search:se,next:Q=>ne(ce+1,Q)})};return ne(0,U)})(T),T=Dr(C,T);const N=this.options.stringifySearch(T),D=s.hash===!0?this.latestLocation.hash:s.hash?mm(s.hash,this.latestLocation.hash):void 0,$=D?`#${D}`:"";let Z=s.state===!0?this.latestLocation.state:s.state?mm(s.state,this.latestLocation.state):{};return Z=Dr(this.latestLocation.state,Z),{pathname:E,search:T,searchStr:N,state:Z,hash:D??"",href:`${E}${N}${$}`,unmaskOnReload:s.unmaskOnReload}},i=(s={},o)=>{var a;const c=r(s);let d=o?r(o):void 0;if(!d){let m={};const y=(a=this.options.routeMasks)==null?void 0:a.find(b=>{const w=ym(this.basepath,c.pathname,{to:b.from,caseSensitive:!1,fuzzy:!1});return w?(m=w,!0):!1});if(y){const{from:b,...w}=y;o={...cg(t,["from"]),...w,params:m},d=r(o)}}const f=this.getMatchedRoutes(c,s),h=r(s,f);if(d){const m=this.getMatchedRoutes(d,o),y=r(o,m);h.maskedLocation=y}return h};return t.mask?i(t,{...cg(t,["from"]),...t.mask}):i(t)},this.commitLocation=({viewTransition:t,ignoreBlocker:r,...i})=>{const s=()=>{i.state.key=this.latestLocation.state.key;const c=rf(i.state,this.latestLocation.state);return delete i.state.key,c},o=this.latestLocation.href===i.href,a=this.commitLocationPromise;if(this.commitLocationPromise=sc(()=>{a==null||a.resolve()}),o&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:d,...f}=i;c&&(f={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[i.replace?"replace":"push"](f.href,f.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:o,href:a,...c}={})=>{if(a){const f=this.history.location.state.__TSR_index,h=Sf(a,{__TSR_index:t?f:f+1});c.to=h.pathname,c.search=this.options.parseSearch(h.search),c.hash=h.hash.slice(1)}const d=this.buildLocation({...c,_includeValidateSearch:!0});return this.commitLocation({...d,viewTransition:s,replace:t,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o})},this.navigate=({to:t,reloadDocument:r,href:i,...s})=>{if(r){i||(i=this.buildLocation({to:t,...s}).href),s.replace?window.location.replace(i):window.location.href=i;return}return this.buildAndCommitLocation({...s,href:i,to:t})},this.load=async t=>{this.latestLocation=this.parseLocation(this.latestLocation);let r,i,s;for(s=new Promise(o=>{this.startReactTransition(async()=>{var a;try{const c=this.latestLocation,d=this.state.resolvedLocation,f=d.href!==c.href,h=d.pathname!==c.pathname;this.cancelMatches();let m;nx(()=>{m=this.matchRoutes(c),this.__store.setState(y=>({...y,status:"pending",isLoading:!0,location:c,pendingMatches:m,cachedMatches:y.cachedMatches.filter(b=>!m.find(w=>w.id===b.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:d,toLocation:c,pathChanged:h,hrefChanged:f}),this.emit({type:"onBeforeLoad",fromLocation:d,toLocation:c,pathChanged:h,hrefChanged:f}),await this.loadMatches({sync:t==null?void 0:t.sync,matches:m,location:c,onReady:async()=>{this.startViewTransition(async()=>{let y,b,w;nx(()=>{this.__store.setState(C=>{const _=C.matches,E=C.pendingMatches||C.matches;return y=_.filter(P=>!E.find(A=>A.id===P.id)),b=E.filter(P=>!_.find(A=>A.id===P.id)),w=_.filter(P=>E.find(A=>A.id===P.id)),{...C,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...C.cachedMatches,...y.filter(P=>P.status!=="error")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[b,"onEnter"],[w,"onStay"]].forEach(([C,_])=>{C.forEach(E=>{var P,A;(A=(P=this.looseRoutesById[E.routeId].options)[_])==null||A.call(P,E)})})})}})}catch(c){ix(c)?(r=c,this.isServer||this.navigate({...r,replace:!0,ignoreBlocker:!0})):di(c)&&(i=c),this.__store.setState(d=>({...d,statusCode:r?r.statusCode:i?404:d.matches.some(f=>f.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=t=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;typeof r=="object"&&this.isViewTransitionTypesSupported?i={update:t,types:r.types}:i=t,document.startViewTransition(i)}else t()},this.updateMatch=(t,r)=>{var i;let s;const o=(i=this.state.pendingMatches)==null?void 0:i.find(f=>f.id===t),a=this.state.matches.find(f=>f.id===t),c=this.state.cachedMatches.find(f=>f.id===t),d=o?"pendingMatches":a?"matches":c?"cachedMatches":"";return d&&this.__store.setState(f=>{var h;return{...f,[d]:(h=f[d])==null?void 0:h.map(m=>m.id===t?s=r(m):m)}}),s},this.getMatch=t=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===t),this.loadMatches=async({location:t,matches:r,preload:i,onReady:s,updateMatch:o=this.updateMatch,sync:a})=>{let c,d=!1;const f=async()=>{d||(d=!0,await(s==null?void 0:s()))},h=y=>!!(i&&!this.state.matches.find(b=>b.id===y));!this.isServer&&!this.state.matches.length&&f();const m=(y,b)=>{var w,C,_;if(ix(b)&&!b.reloadDocument)throw b;if(va(b)||di(b)){if(o(y.id,E=>({...E,status:va(b)?"redirected":di(b)?"notFound":"error",isFetching:!1,error:b,beforeLoadPromise:void 0,loaderPromise:void 0})),b.routeId||(b.routeId=y.routeId),(w=y.beforeLoadPromise)==null||w.resolve(),(C=y.loaderPromise)==null||C.resolve(),(_=y.loadPromise)==null||_.resolve(),va(b))throw d=!0,b=this.resolveRedirect({...b,_fromLocation:t}),b;if(di(b))throw this._handleNotFound(r,b,{updateMatch:o}),b}};try{await new Promise((y,b)=>{(async()=>{var w,C,_;try{const E=(T,M,N)=>{var D,$;const{id:Z,routeId:U}=r[T],V=this.looseRoutesById[U];if(M instanceof Promise)throw M;M.routerCode=N,c=c??T,m(this.getMatch(Z),M);try{($=(D=V.options).onError)==null||$.call(D,M)}catch(oe){M=oe,m(this.getMatch(Z),M)}o(Z,oe=>{var ne,ce;return(ne=oe.beforeLoadPromise)==null||ne.resolve(),(ce=oe.loadPromise)==null||ce.resolve(),{...oe,error:M,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[T,{id:M,routeId:N}]of r.entries()){const D=this.getMatch(M),$=(w=r[T-1])==null?void 0:w.id,Z=this.looseRoutesById[N],U=Z.options.pendingMs??this.options.defaultPendingMs,V=!!(s&&!this.isServer&&!h(M)&&(Z.options.loader||Z.options.beforeLoad)&&typeof U=="number"&&U!==1/0&&(Z.options.pendingComponent??this.options.defaultPendingComponent));let oe=!0;if((D.beforeLoadPromise||D.loaderPromise)&&(V&&setTimeout(()=>{try{f()}catch{}},U),await D.beforeLoadPromise,oe=this.getMatch(M).status!=="success"),oe){try{o(M,te=>({...te,loadPromise:sc(()=>{var ae;(ae=te.loadPromise)==null||ae.resolve()}),beforeLoadPromise:sc()}));const ne=new AbortController;let ce;V&&(ce=setTimeout(()=>{try{f()}catch{}},U));const{paramsError:se,searchError:pe}=this.getMatch(M);se&&E(T,se,"PARSE_PARAMS"),pe&&E(T,pe,"VALIDATE_SEARCH");const G=()=>$?this.getMatch($).context:this.options.context??{};o(M,te=>({...te,isFetching:"beforeLoad",fetchCount:te.fetchCount+1,abortController:ne,pendingTimeout:ce,context:{...G(),...te.__routeContext}}));const{search:Q,params:re,context:F,cause:L}=this.getMatch(M),W=h(M),ee={search:Q,abortController:ne,params:re,preload:W,context:F,location:t,navigate:te=>this.navigate({...te,_fromLocation:t}),buildLocation:this.buildLocation,cause:W?"preload":L,matches:r};let J=await((_=(C=Z.options).beforeLoad)==null?void 0:_.call(C,ee))??{};this.serializeLoaderData&&(J=this.serializeLoaderData("__beforeLoadContext",J,{router:this,match:this.getMatch(M)})),(va(J)||di(J))&&E(T,J,"BEFORE_LOAD"),o(M,te=>({...te,__beforeLoadContext:J,context:{...G(),...te.__routeContext,...J},abortController:ne}))}catch(ne){E(T,ne,"BEFORE_LOAD")}o(M,ne=>{var ce;return(ce=ne.beforeLoadPromise)==null||ce.resolve(),{...ne,beforeLoadPromise:void 0,isFetching:!1}})}}const P=r.slice(0,c),A=[];P.forEach(({id:T,routeId:M},N)=>{A.push((async()=>{const{loaderPromise:D}=this.getMatch(T);let $=!1,Z=!1;if(D){await D;const U=this.getMatch(T);U.error&&m(U,U.error)}else{const U=A[N-1],V=this.looseRoutesById[M],oe=()=>{const{params:L,loaderDeps:W,abortController:ee,context:J,cause:te}=this.getMatch(T),ae=h(T);return{params:L,deps:W,preload:!!ae,parentMatchPromise:U,abortController:ee,context:J,location:t,navigate:ye=>this.navigate({...ye,_fromLocation:t}),cause:ae?"preload":te,route:V}},ne=Date.now()-this.getMatch(T).updatedAt,ce=h(T),se=ce?V.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:V.options.staleTime??this.options.defaultStaleTime??0,pe=V.options.shouldReload,G=typeof pe=="function"?pe(oe()):pe;o(T,L=>({...L,loaderPromise:sc(),preload:!!ce&&!this.state.matches.find(W=>W.id===T)}));const Q=async()=>{var L,W,ee,J,te,ae,ye,Se;try{const Fe=async()=>{const ct=this.getMatch(T);ct.minPendingPromise&&await ct.minPendingPromise};try{this.loadRouteChunk(V),o(T,or=>({...or,isFetching:"loader"}));let ct=await((W=(L=V.options).loader)==null?void 0:W.call(L,oe()));this.serializeLoaderData&&(ct=this.serializeLoaderData("loaderData",ct,{router:this,match:this.getMatch(T)})),m(this.getMatch(T),ct),await V._lazyPromise,await Fe();const wt=(J=(ee=V.options).head)==null?void 0:J.call(ee,{matches:r,match:this.getMatch(T),params:this.getMatch(T).params,loaderData:ct}),Xe=wt==null?void 0:wt.meta,Vt=wt==null?void 0:wt.links,Rr=wt==null?void 0:wt.scripts,Xr=(ae=(te=V.options).headers)==null?void 0:ae.call(te,{loaderData:ct});o(T,or=>({...or,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:ct,meta:Xe,links:Vt,scripts:Rr,headers:Xr}))}catch(ct){let wt=ct;await Fe(),m(this.getMatch(T),ct);try{(Se=(ye=V.options).onError)==null||Se.call(ye,ct)}catch(Xe){wt=Xe,m(this.getMatch(T),Xe)}o(T,Xe=>({...Xe,error:wt,status:"error",isFetching:!1}))}await V._componentsPromise}catch(Fe){o(T,ct=>({...ct,loaderPromise:void 0})),m(this.getMatch(T),Fe)}},{status:re,invalid:F}=this.getMatch(T);$=re==="success"&&(F||(G??ne>se)),ce&&V.options.preload===!1||($&&!a?(Z=!0,(async()=>{try{await Q();const{loaderPromise:L,loadPromise:W}=this.getMatch(T);L==null||L.resolve(),W==null||W.resolve(),o(T,ee=>({...ee,loaderPromise:void 0}))}catch(L){ix(L)&&await this.navigate(L)}})()):(re!=="success"||$&&a)&&await Q())}if(!Z){const{loaderPromise:U,loadPromise:V}=this.getMatch(T);U==null||U.resolve(),V==null||V.resolve()}return o(T,U=>({...U,isFetching:Z?U.isFetching:!1,loaderPromise:Z?U.loaderPromise:void 0,invalid:!1})),this.getMatch(T)})())}),await Promise.all(A),y()}catch(E){b(E)}})()}),await f()}catch(y){if(va(y)||di(y))throw di(y)&&!i&&await f(),y}return r},this.invalidate=t=>{const r=i=>{var s;return((s=t==null?void 0:t.filter)==null?void 0:s.call(t,i))??!0?{...i,invalid:!0,...i.status==="error"?{status:"pending",error:void 0}:{}}:i};return this.__store.setState(i=>{var s;return{...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:(s=i.pendingMatches)==null?void 0:s.map(r)}}),this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t;return r.href||(r.href=this.buildLocation(r).href),r},this.clearCache=t=>{const r=t==null?void 0:t.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(s=>!r(s))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const s=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(r.status!=="error"&&Date.now()-r.updatedAt(t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(t.options,s)}):t._lazyPromise=Promise.resolve()),t._componentsPromise===void 0&&(t._componentsPromise=t._lazyPromise.then(()=>Promise.all(WM.map(async r=>{const i=t.options[r];i!=null&&i.preload&&await i.preload()})))),t._componentsPromise),this.preloadRoute=async t=>{const r=this.buildLocation(t);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:t});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),o=new Set([...s,...this.state.cachedMatches.map(a=>a.id)]);nx(()=>{i.forEach(a=>{o.has(a.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,a]}))})});try{return i=await this.loadMatches({matches:i,location:r,preload:!0,updateMatch:(a,c)=>{s.has(a)?i=i.map(d=>d.id===a?c(d):d):this.updateMatch(a,c)}}),i}catch(a){if(va(a))return a.reloadDocument?void 0:await this.preloadRoute({...a,_fromLocation:r});console.error(a);return}},this.matchRoute=(t,r)=>{const i={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},s=this.buildLocation(i);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,c=ym(this.basepath,a.pathname,{...r,to:s.pathname});return!c||t.params&&!rf(c,t.params,{partial:!0})?!1:c&&((r==null?void 0:r.includeSearch)??!0)?rf(a.search,s.search,{partial:!0})?c:!1:c},this.dehydrate=()=>{var t;const r=((t=this.options.errorSerializer)==null?void 0:t.serialize)??iV;return{state:{dehydratedMatches:this.state.matches.map(i=>({...cg(i,["id","status","updatedAt"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var t,r,i;let s;typeof document<"u"&&(s=this.options.transformer.parse((t=window.__TSR__)==null?void 0:t.dehydrated)),yr(s),this.dehydratedData=s.payload,(i=(r=this.options).hydrate)==null||i.call(r,s.payload);const o=s.router.state,a=this.matchRoutes(this.state.location).map(c=>{const d=o.dehydratedMatches.find(f=>f.id===c.id);return yr(d,`Could not find a client-side match for dehydrated match with id: ${c.id}!`),{...c,...d}});this.__store.setState(c=>({...c,matches:a})),this.manifest=s.router.manifest},this.injectedHtml=[],this.injectHtml=t=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(i=>i!==r),t);this.injectedHtml.push(r)},this.injectScript=(t,r)=>{this.injectHtml(` + )} + `; +}; + +function ensureOriginServer( + doc: OpenAPIV3_1.Document | OpenAPIV3.Document, + origin: string, +): void { + if (!doc?.servers?.some((server) => server.url === origin)) { + doc.servers = [ + { + url: origin, + description: "Current environment", + }, + ...(doc.servers || []), + ]; + } +} + +export type ResolvedSpec = + | { + type: "success"; + spec: OpenAPIV3_1.Document | OpenAPIV3.Document | undefined; + source: RouterSpec["type"]; + } + | { + type: "error"; + error: string; + source: RouterSpec["type"]; + retryable: boolean; + attemptedUrl?: string; + }; + +async function resolveSpec( + spec?: RouterSpec, + origin?: string, +): Promise { + if (!spec || spec.type === "empty") { + return { type: "success", spec: undefined, source: "empty" }; + } + + switch (spec.type) { + case "raw": + try { + if (origin) { + ensureOriginServer(spec.value, origin); + } + return { type: "success", spec: spec.value, source: "raw" }; + } catch (error) { + return { + type: "error", + error: "Failed to process raw spec", + source: "raw", + retryable: false, + }; + } + + case "url": + case "path": { + const url = spec.type === "url" ? spec.value : `${origin}${spec.value}`; + try { + console.log("Fetching spec from", url); + const response = await fetch(url); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + const doc = (await response.json()) as + | OpenAPIV3_1.Document + | OpenAPIV3.Document; + + if (origin) { + ensureOriginServer(doc, origin); + } + return { type: "success", spec: doc, source: spec.type }; + } catch (error) { + return { + type: "error", + error: + error instanceof Error + ? error.message + : "Failed to fetch or parse spec", + source: spec.type, + retryable: true, + attemptedUrl: url, + }; + } + } + + default: { + const _exhaustiveCheck: never = spec; + return { + type: "error", + error: "Unknown spec type", + source: "empty", + retryable: false, + }; + } + } +} diff --git a/playground/.gitignore b/playground/.gitignore index cf7ff2f72..a547bf36d 100644 --- a/playground/.gitignore +++ b/playground/.gitignore @@ -8,7 +8,7 @@ pnpm-debug.log* lerna-debug.log* node_modules -# dist +dist dist-ssr *.local From d03e6c635980a31f251af76dcb270608a4154a5c Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 15:57:16 +0100 Subject: [PATCH 097/108] Refactor routeDocumentation rendering and improve handling of e.g., arrays of strings --- .../RouteDocumentation/RouteDocumentation.tsx | 207 ++++++++++++------ 1 file changed, 142 insertions(+), 65 deletions(-) diff --git a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx index 8d4673677..99f0187a2 100644 --- a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx +++ b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx @@ -188,6 +188,143 @@ export const RouteDocumentation = memo(function RouteDocumentation({ ); }); +// Helper functions for type checking +const isArraySchema = (schema: OpenAPISchema): boolean => + schema.type === "array" && !!schema.items; + +const isObjectSchema = (schema: OpenAPISchema): boolean => + schema.type === "object" && !!schema.properties; + +const isPrimitiveArrayItems = (schema: OpenAPISchema): boolean => + isArraySchema(schema) && + (schema.items as OpenAPISchema).type !== "object"; + +// Component for rendering array type schemas +type ArraySchemaProps = { + schema: OpenAPISchema; +}; + +function ArraySchemaViewer({ schema }: ArraySchemaProps) { + const itemSchema = schema.items as OpenAPISchema; + + return ( +
+ {/* Array type header */} +
+ + of + +
+ + {/* Array items content */} +
+ {isPrimitiveArrayItems(schema) ? ( + // Primitive array items (strings, numbers, etc) + <> + {itemSchema.description && ( + + )} + {itemSchema.example !== undefined && ( + + )} + + ) : ( + // Object array items + <> +
+ Array items: +
+ + + )} +
+
+ ); +} + +// Component for rendering object type schemas +type ObjectSchemaProps = { + schema: OpenAPISchema; +}; + +function ObjectSchemaViewer({ schema }: ObjectSchemaProps) { + return ( +
+ {Object.entries( + schema.properties as Record, + ).map(([key, prop]) => ( +
+ {/* Property name and type */} + + + {/* Property details */} +
+ {prop.description && ( + + )} + {/* Handle nested arrays */} + {prop.type === "array" && prop.items && ( + isArraySchema(prop) && isPrimitiveArrayItems(prop) ? ( + + ) : ( + + ) + )} + {/* Handle non-array properties */} + {prop.type !== "array" && prop.example !== undefined && ( + + )} +
+
+ ))} +
+ ); +} + +// Component for rendering primitive type schemas +type PrimitiveSchemaProps = { + schema: OpenAPISchema; +}; + +function PrimitiveSchemaViewer({ schema }: PrimitiveSchemaProps) { + return ( +
+ {/* Type and enum information */} +
+ + {schema.type} + + {schema.enum && ( + + enum: [{schema.enum.join(", ")}] + + )} +
+ + {/* Description and example */} + {(schema.description || schema.example !== undefined) && ( +
+ {schema.description && ( + + )} + {schema.example !== undefined && ( + + )} +
+ )} +
+ ); +} + +// Main schema viewer component that routes to the appropriate sub-component type SchemaViewerProps = { schema: OpenAPISchema; className?: string; @@ -200,72 +337,12 @@ function SchemaViewer({ schema, className }: SchemaViewerProps) { return (
- {schema.type === "array" ? ( -
-
- - of - {schema.items && ( - - )} -
- {schema.items && ( -
-
- Array items: -
- -
- )} -
- ) : schema.type === "object" && schema.properties ? ( -
- {Object.entries( - schema.properties as Record, - ).map(([key, prop]) => ( -
- -
- {prop.description && ( - - )} - {prop.example !== undefined && ( - - )} -
-
- ))} -
+ {isArraySchema(schema) ? ( + + ) : isObjectSchema(schema) ? ( + ) : ( -
-
- - {schema.type} - - {schema.enum && ( - - enum: [{schema.enum.join(", ")}] - - )} -
- - {(schema.description || schema.example !== undefined) && ( -
- {schema.description && ( - - )} - {schema.example !== undefined && ( - - )} -
- )} -
+ )}
); From 11eec0b87f9e2a763ec21fd210ef6268f1176490 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 16:07:50 +0100 Subject: [PATCH 098/108] Move zod from peer deps to deps for embedded package --- packages/embedded/package.json | 6 +++--- pnpm-lock.yaml | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/embedded/package.json b/packages/embedded/package.json index a034bb0ee..47e903122 100644 --- a/packages/embedded/package.json +++ b/packages/embedded/package.json @@ -23,7 +23,8 @@ "build": "tsc", "format": "biome check . --write", "lint": "biome lint .", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "zod": "^3.23.8" }, "devDependencies": { "@types/node": "*", @@ -34,8 +35,7 @@ "react-dom": "^18.2.0" }, "peerDependencies": { - "hono": "^4.0", - "zod": "^3.23.8" + "hono": "^4.0" }, "dependencies": { "openapi-types": "^12.1.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c7b9687c..4e62daa4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,9 +735,6 @@ importers: openapi-types: specifier: ^12.1.3 version: 12.1.3 - zod: - specifier: ^3.23.8 - version: 3.24.1 devDependencies: '@types/node': specifier: '*' From 749426a7b5194cfe130bb5765f9f6b8befa67f54 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 16:43:56 +0100 Subject: [PATCH 099/108] Improve handling of objects and arrays of objects --- .../RouteDocumentation/RouteDocumentation.tsx | 130 +++++++++++++----- 1 file changed, 94 insertions(+), 36 deletions(-) diff --git a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx index 99f0187a2..1c19e66d5 100644 --- a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx +++ b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx @@ -4,6 +4,8 @@ import { ScrollArea } from "@/components/ui/scroll-area"; import { cn, getHttpMethodTextColor } from "@/utils"; import { memo } from "react"; import type { OpenAPIOperation, OpenAPISchema } from "./openapi"; +import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ui/collapsible"; +import { ChevronRight } from "lucide-react"; type OpenAPIParameter = NonNullable< NonNullable[number] @@ -49,6 +51,8 @@ export const RouteDocumentation = memo(function RouteDocumentation({ const modTitle = getTitleWithFallback(title, route); + console.log("hIII", openApiSpec); + return (
@@ -190,14 +194,15 @@ export const RouteDocumentation = memo(function RouteDocumentation({ // Helper functions for type checking const isArraySchema = (schema: OpenAPISchema): boolean => - schema.type === "array" && !!schema.items; + schema?.type === "array"; const isObjectSchema = (schema: OpenAPISchema): boolean => - schema.type === "object" && !!schema.properties; + schema?.type === "object" || !!schema?.properties; const isPrimitiveArrayItems = (schema: OpenAPISchema): boolean => isArraySchema(schema) && - (schema.items as OpenAPISchema).type !== "object"; + (schema.items as OpenAPISchema)?.type !== "object" && + !(schema.items as OpenAPISchema)?.properties; // Component for rendering array type schemas type ArraySchemaProps = { @@ -209,37 +214,57 @@ function ArraySchemaViewer({ schema }: ArraySchemaProps) { return (
- {/* Array type header */} -
- - of - -
- - {/* Array items content */} -
- {isPrimitiveArrayItems(schema) ? ( - // Primitive array items (strings, numbers, etc) - <> - {itemSchema.description && ( - + + {/* Array type header - acts as trigger */} + + + + of + + + + {/* Array items content - collapsible */} + +
+ {/* Show array example if it exists */} + {schema.example && ( +
+ +
)} - {itemSchema.example !== undefined && ( - + + {isPrimitiveArrayItems(schema) ? ( + // Primitive array items (strings, numbers, etc) + <> + {itemSchema.description && ( + + )} + {/* Show item example if no array example exists */} + {!schema.example && itemSchema.example !== undefined && ( + + )} + + ) : ( + // Object array items + <> +
+ Array items: +
+ + {/* Show item example if no array example exists */} + {!schema.example && itemSchema.example !== undefined && ( +
+
Example item:
+ +
+ )} + )} - - ) : ( - // Object array items - <> -
- Array items: -
- - - )} -
+
+ +
); } @@ -250,11 +275,41 @@ type ObjectSchemaProps = { }; function ObjectSchemaViewer({ schema }: ObjectSchemaProps) { + // Handle objects with additionalProperties but no defined properties + if (!schema.properties && schema.additionalProperties) { + return ( +
+
+ Object with additional properties of type: { + typeof schema.additionalProperties === 'object' + ? (schema.additionalProperties as OpenAPISchema).type ?? 'any' + : 'any' + } +
+ {schema.example && ( + + )} +
+ ); + } + + // Handle objects with no properties defined + if (!schema.properties) { + return ( +
+
+ Object type +
+ {schema.example && ( + + )} +
+ ); + } + return (
- {Object.entries( - schema.properties as Record, - ).map(([key, prop]) => ( + {Object.entries(schema.properties).map(([key, prop]) => (
{/* Property name and type */} {schema.enum && ( - + enum: [{schema.enum.join(", ")}] )} @@ -335,6 +390,9 @@ function SchemaViewer({ schema, className }: SchemaViewerProps) { return null; } + // Debug logging to help diagnose schema type issues + console.log("Schema type:", schema.type, "Has properties:", !!schema.properties, "Is array:", isArraySchema(schema)); + return (
{isArraySchema(schema) ? ( From 03bb96f808bd4aadeddde4b93de6f4516eeee13b Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 16:55:23 +0100 Subject: [PATCH 100/108] Run formatter and add enums to url parameter docs --- api/package.json | 6 +- packages/embedded/src/middleware.ts | 48 +++--- packages/embedded/src/router.ts | 36 ++--- packages/embedded/src/routes/api/tokens.ts | 2 +- packages/embedded/src/routes/playground.tsx | 24 +-- packages/embedded/src/services/base.ts | 14 +- packages/embedded/src/services/index.ts | 7 +- packages/embedded/src/services/tokens.ts | 16 +- .../RouteDocumentation/RouteDocumentation.tsx | 146 ++++++++++++------ 9 files changed, 180 insertions(+), 119 deletions(-) diff --git a/api/package.json b/api/package.json index 49e8e64d9..d1804873b 100644 --- a/api/package.json +++ b/api/package.json @@ -34,11 +34,7 @@ "access": "public" }, "license": "MIT or Apache 2", - "keywords": [ - "hono", - "local", - "debugging" - ], + "keywords": ["hono", "local", "debugging"], "bin": { "fpx": "bin/cli.js" }, diff --git a/packages/embedded/src/middleware.ts b/packages/embedded/src/middleware.ts index 6da0277e8..f36bf35cf 100644 --- a/packages/embedded/src/middleware.ts +++ b/packages/embedded/src/middleware.ts @@ -1,7 +1,7 @@ +import type { Context } from "hono"; import type { Env, MiddlewareHandler } from "hono/types"; import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; -import { createRouter, type RouterSpec } from "./router.js"; -import type { Context } from "hono"; +import { type RouterSpec, createRouter } from "./router.js"; // HACK - We need to manually update the version in the CDN URL when you release a new version // Eventually we should do this automagically when building the package (and derive the version from the package.json) @@ -16,33 +16,33 @@ export interface EmbeddedMiddlewareOptions { export const createMiddleware = (options: EmbeddedMiddlewareOptions): MiddlewareHandler => - async (c, next) => { - const { mountedPath, internalPath } = getPaths(c); + async (c, next) => { + const { mountedPath, internalPath } = getPaths(c); - const origin = new URL(c.req.url).origin; - const modSpec: RouterSpec = parseSpecParameter(options?.spec, origin); + const origin = new URL(c.req.url).origin; + const modSpec: RouterSpec = parseSpecParameter(options?.spec, origin); - // Forward request to embedded router, continuing middleware chain if no route matches - const router = createRouter({ - ...options, - mountedPath, - cdn: options?.cdn ?? CDN_URL, - spec: modSpec, - }); + // Forward request to embedded router, continuing middleware chain if no route matches + const router = createRouter({ + ...options, + mountedPath, + cdn: options?.cdn ?? CDN_URL, + spec: modSpec, + }); - // Create a new request with the corrected (internal) path - const newUrl = new URL(c.req.url); - newUrl.pathname = internalPath; - const newRequest = new Request(newUrl, c.req.raw); - const response = await router.fetch(newRequest); + // Create a new request with the corrected (internal) path + const newUrl = new URL(c.req.url); + newUrl.pathname = internalPath; + const newRequest = new Request(newUrl, c.req.raw); + const response = await router.fetch(newRequest); - // Skip the middleware and continue if the embedded router doesn't match - if (response.status === 404) { - return next(); - } + // Skip the middleware and continue if the embedded router doesn't match + if (response.status === 404) { + return next(); + } - return response; - }; + return response; + }; // This middleware is designed to be mounted within another Hono app at any path. // Since the parent app determines the mount path, we need to extract and remove diff --git a/packages/embedded/src/router.ts b/packages/embedded/src/router.ts index 1dde67b11..e3c7463e6 100644 --- a/packages/embedded/src/router.ts +++ b/packages/embedded/src/router.ts @@ -1,30 +1,30 @@ import { type Env, Hono } from "hono"; +import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; import type { EmbeddedMiddlewareOptions } from "./middleware.js"; -import createEmbeddedPlayground from "./routes/playground.js"; import createApiRoutes from "./routes/api/index.js"; -import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; +import createEmbeddedPlayground from "./routes/playground.js"; export type RouterSpec = | { - type: "url"; - value: string; - origin: string; - } + type: "url"; + value: string; + origin: string; + } | { - type: "path"; - value: string; - origin: string; - } + type: "path"; + value: string; + origin: string; + } | { - type: "raw"; - value: OpenAPIV3_1.Document | OpenAPIV3.Document; - origin: string; - } + type: "raw"; + value: OpenAPIV3_1.Document | OpenAPIV3.Document; + origin: string; + } | { - type: "empty"; - value: undefined; - origin: string; - }; + type: "empty"; + value: undefined; + origin: string; + }; export interface EmbeddedRouterOptions extends Omit { diff --git a/packages/embedded/src/routes/api/tokens.ts b/packages/embedded/src/routes/api/tokens.ts index 9514d0a82..85a9c1397 100644 --- a/packages/embedded/src/routes/api/tokens.ts +++ b/packages/embedded/src/routes/api/tokens.ts @@ -1,6 +1,6 @@ import { Hono } from "hono"; -import { FpService } from "../../services/index.js"; import { z } from "zod"; +import { FpService } from "../../services/index.js"; // Temporary implementation export default function createTokensApiRoute(apiKey: string) { diff --git a/packages/embedded/src/routes/playground.tsx b/packages/embedded/src/routes/playground.tsx index 29b6853ff..7f99bcb80 100644 --- a/packages/embedded/src/routes/playground.tsx +++ b/packages/embedded/src/routes/playground.tsx @@ -3,9 +3,9 @@ import { jsx } from "hono/jsx"; import { Hono } from "hono"; -import type { EmbeddedRouterOptions, RouterSpec } from "../router.js"; -import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; import { html, raw } from "hono/html"; +import type { OpenAPIV3, OpenAPIV3_1 } from "openapi-types"; +import type { EmbeddedRouterOptions, RouterSpec } from "../router.js"; export default function createPlayground({ cdn, @@ -84,17 +84,17 @@ function ensureOriginServer( export type ResolvedSpec = | { - type: "success"; - spec: OpenAPIV3_1.Document | OpenAPIV3.Document | undefined; - source: RouterSpec["type"]; - } + type: "success"; + spec: OpenAPIV3_1.Document | OpenAPIV3.Document | undefined; + source: RouterSpec["type"]; + } | { - type: "error"; - error: string; - source: RouterSpec["type"]; - retryable: boolean; - attemptedUrl?: string; - }; + type: "error"; + error: string; + source: RouterSpec["type"]; + retryable: boolean; + attemptedUrl?: string; + }; async function resolveSpec( spec?: RouterSpec, diff --git a/packages/embedded/src/services/base.ts b/packages/embedded/src/services/base.ts index 9df8a945b..ddfc8ccc9 100644 --- a/packages/embedded/src/services/base.ts +++ b/packages/embedded/src/services/base.ts @@ -9,11 +9,15 @@ export class BaseService { this.baseUrl = baseUrl; } - protected async request(schema: z.ZodType, endpoint: string, options: RequestInit = {}): Promise { - const url = `${this.baseUrl}${endpoint}` + protected async request( + schema: z.ZodType, + endpoint: string, + options: RequestInit = {}, + ): Promise { + const url = `${this.baseUrl}${endpoint}`; const headers = { - 'Authorization': `Bearer ${this.apiKey}`, - 'Content-Type': 'application/json', + Authorization: `Bearer ${this.apiKey}`, + "Content-Type": "application/json", ...options.headers, }; @@ -25,4 +29,4 @@ export class BaseService { const json = await response.json(); return schema.parse(json); } -} \ No newline at end of file +} diff --git a/packages/embedded/src/services/index.ts b/packages/embedded/src/services/index.ts index fdebd8ec9..8fc8e51d7 100644 --- a/packages/embedded/src/services/index.ts +++ b/packages/embedded/src/services/index.ts @@ -9,7 +9,10 @@ interface FpServiceOptions { export class FpService { readonly tokens: TokenService; - constructor({ apiKey, baseUrl = "http://localhost:1234/api" }: FpServiceOptions) { + constructor({ + apiKey, + baseUrl = "http://localhost:1234/api", + }: FpServiceOptions) { this.tokens = new TokenService(apiKey, baseUrl); } -} \ No newline at end of file +} diff --git a/packages/embedded/src/services/tokens.ts b/packages/embedded/src/services/tokens.ts index 15b1214ec..18f6a0791 100644 --- a/packages/embedded/src/services/tokens.ts +++ b/packages/embedded/src/services/tokens.ts @@ -7,22 +7,22 @@ const RevokeTokenResponseSchema = z.object({ success: z.boolean() }); export class TokenService extends BaseService { async createToken(metadata: string) { - return this.request(CreateTokenResponseSchema, '/tokens', { - method: 'PUT', - body: JSON.stringify({metadata}), + return this.request(CreateTokenResponseSchema, "/tokens", { + method: "PUT", + body: JSON.stringify({ metadata }), }); } async verifyToken(token: string) { - return this.request(VerifyTokenResponseSchema, '/tokens/verify', { - method: 'POST', - body: JSON.stringify({token}), + return this.request(VerifyTokenResponseSchema, "/tokens/verify", { + method: "POST", + body: JSON.stringify({ token }), }); } async revokeToken(token: string) { return this.request(RevokeTokenResponseSchema, `/tokens/revoke/${token}`, { - method: 'DELETE', + method: "DELETE", }); } -} \ No newline at end of file +} diff --git a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx index 1c19e66d5..5d2d6ca32 100644 --- a/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx +++ b/playground/src/garbage/RequestorPage/RequestPanel/RouteDocumentation/RouteDocumentation.tsx @@ -1,11 +1,15 @@ import { StatusCode } from "@/components/StatusCode"; import { Badge } from "@/components/ui/badge"; +import { + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "@/components/ui/collapsible"; import { ScrollArea } from "@/components/ui/scroll-area"; import { cn, getHttpMethodTextColor } from "@/utils"; +import { ChevronRight } from "lucide-react"; import { memo } from "react"; import type { OpenAPIOperation, OpenAPISchema } from "./openapi"; -import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/components/ui/collapsible"; -import { ChevronRight } from "lucide-react"; type OpenAPIParameter = NonNullable< NonNullable[number] @@ -51,8 +55,6 @@ export const RouteDocumentation = memo(function RouteDocumentation({ const modTitle = getTitleWithFallback(title, route); - console.log("hIII", openApiSpec); - return (
@@ -90,10 +92,10 @@ export const RouteDocumentation = memo(function RouteDocumentation({ name={param?.name} type={getTypeFromParameter(param)} required={param.required ?? false} + schema={param.schema} + showExample + description={param.description} /> - {param.description && ( - - )}
))}
@@ -193,14 +195,14 @@ export const RouteDocumentation = memo(function RouteDocumentation({ }); // Helper functions for type checking -const isArraySchema = (schema: OpenAPISchema): boolean => +const isArraySchema = (schema: OpenAPISchema): boolean => schema?.type === "array"; -const isObjectSchema = (schema: OpenAPISchema): boolean => +const isObjectSchema = (schema: OpenAPISchema): boolean => schema?.type === "object" || !!schema?.properties; const isPrimitiveArrayItems = (schema: OpenAPISchema): boolean => - isArraySchema(schema) && + isArraySchema(schema) && (schema.items as OpenAPISchema)?.type !== "object" && !(schema.items as OpenAPISchema)?.properties; @@ -211,7 +213,7 @@ type ArraySchemaProps = { function ArraySchemaViewer({ schema }: ArraySchemaProps) { const itemSchema = schema.items as OpenAPISchema; - + return (
@@ -232,13 +234,13 @@ function ArraySchemaViewer({ schema }: ArraySchemaProps) {
)} - + {isPrimitiveArrayItems(schema) ? ( // Primitive array items (strings, numbers, etc) <> {itemSchema.description && ( - )} {/* Show item example if no array example exists */} @@ -256,7 +258,9 @@ function ArraySchemaViewer({ schema }: ArraySchemaProps) { {/* Show item example if no array example exists */} {!schema.example && itemSchema.example !== undefined && (
-
Example item:
+
+ Example item: +
)} @@ -280,15 +284,12 @@ function ObjectSchemaViewer({ schema }: ObjectSchemaProps) { return (
- Object with additional properties of type: { - typeof schema.additionalProperties === 'object' - ? (schema.additionalProperties as OpenAPISchema).type ?? 'any' - : 'any' - } + Object with additional properties of type:{" "} + {typeof schema.additionalProperties === "object" + ? ((schema.additionalProperties as OpenAPISchema).type ?? "any") + : "any"}
- {schema.example && ( - - )} + {schema.example && }
); } @@ -297,12 +298,8 @@ function ObjectSchemaViewer({ schema }: ObjectSchemaProps) { if (!schema.properties) { return (
-
- Object type -
- {schema.example && ( - - )} +
Object type
+ {schema.example && }
); } @@ -314,25 +311,29 @@ function ObjectSchemaViewer({ schema }: ObjectSchemaProps) { {/* Property name and type */} - + {/* Property details */}
{prop.description && ( )} {/* Handle nested arrays */} - {prop.type === "array" && prop.items && ( - isArraySchema(prop) && isPrimitiveArrayItems(prop) ? ( + {prop.type === "array" && + prop.items && + (isArraySchema(prop) && isPrimitiveArrayItems(prop) ? ( ) : ( - ) - )} + ))} {/* Handle non-array properties */} {prop.type !== "array" && prop.example !== undefined && ( @@ -391,7 +392,14 @@ function SchemaViewer({ schema, className }: SchemaViewerProps) { } // Debug logging to help diagnose schema type issues - console.log("Schema type:", schema.type, "Has properties:", !!schema.properties, "Is array:", isArraySchema(schema)); + console.log( + "Schema type:", + schema.type, + "Has properties:", + !!schema.properties, + "Is array:", + isArraySchema(schema), + ); return (
@@ -410,14 +418,64 @@ function DocsParameter({ name, type, required, -}: { name: string; type: string; required: boolean }) { + schema, + showExample, + description, +}: { + name: string; + type: string; + required: boolean; + schema?: OpenAPIParameter["schema"]; + showExample?: boolean; + description?: string; +}) { return ( -
- -
- - {required && } +
+ {/* Parameter name and type */} +
+ +
+ + {required && } +
+ + {description && } + + {/* Enum values */} + {schema && "enum" in schema && schema.enum && ( +
+
Allowed values:
+
+ {schema.enum.map((value) => ( + + {value} + {value === schema.default && ( + + (default) + + )} + + ))} +
+
+ )} + + {/* Example value */} + {showExample && + schema && + "example" in schema && + schema.example !== undefined && ( +
+ +
+ )}
); } From 2d9f95fdf3bcc58b9cc1435cdae5ed50644283f6 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 17:00:01 +0100 Subject: [PATCH 101/108] Update embedded to 0.0.16 --- packages/embedded/package.json | 2 +- packages/embedded/src/middleware.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/embedded/package.json b/packages/embedded/package.json index 47e903122..1a1759017 100644 --- a/packages/embedded/package.json +++ b/packages/embedded/package.json @@ -1,6 +1,6 @@ { "name": "@fiberplane/embedded", - "version": "0.0.15", + "version": "0.0.16", "type": "module", "exports": { ".": { diff --git a/packages/embedded/src/middleware.ts b/packages/embedded/src/middleware.ts index f36bf35cf..fd9705502 100644 --- a/packages/embedded/src/middleware.ts +++ b/packages/embedded/src/middleware.ts @@ -5,7 +5,7 @@ import { type RouterSpec, createRouter } from "./router.js"; // HACK - We need to manually update the version in the CDN URL when you release a new version // Eventually we should do this automagically when building the package (and derive the version from the package.json) -const VERSION = "0.0.15"; +const VERSION = "0.0.16"; const CDN_URL = `https://cdn.jsdelivr.net/npm/@fiberplane/embedded@${VERSION}/dist/playground/`; export interface EmbeddedMiddlewareOptions { From 1f00582fbdc2414ce24ebde54f5407d58a534f5a Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 17:01:10 +0100 Subject: [PATCH 102/108] Oops update the zod dep for embedded again bc i did a dumb --- packages/embedded/package.json | 6 +++--- pnpm-lock.yaml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/embedded/package.json b/packages/embedded/package.json index 1a1759017..08464c663 100644 --- a/packages/embedded/package.json +++ b/packages/embedded/package.json @@ -23,8 +23,7 @@ "build": "tsc", "format": "biome check . --write", "lint": "biome lint .", - "typecheck": "tsc --noEmit", - "zod": "^3.23.8" + "typecheck": "tsc --noEmit" }, "devDependencies": { "@types/node": "*", @@ -38,6 +37,7 @@ "hono": "^4.0" }, "dependencies": { - "openapi-types": "^12.1.3" + "openapi-types": "^12.1.3", + "zod": "^3.23.8" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e62daa4f..9c7b9687c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -735,6 +735,9 @@ importers: openapi-types: specifier: ^12.1.3 version: 12.1.3 + zod: + specifier: ^3.23.8 + version: 3.24.1 devDependencies: '@types/node': specifier: '*' From 480a7630537976fe52195bdb881aa3c2a2c0bba6 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 17:04:49 +0100 Subject: [PATCH 103/108] Update lilo-worker to 0.0.16 of embedded --- lilo/lilo-worker/package.json | 2 +- pnpm-lock.yaml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lilo/lilo-worker/package.json b/lilo/lilo-worker/package.json index 81dac13e0..ba3f6c96d 100644 --- a/lilo/lilo-worker/package.json +++ b/lilo/lilo-worker/package.json @@ -22,7 +22,7 @@ "dependencies": { "@ai-sdk/google": "^1.0.9", "@ai-sdk/openai": "^1.0.8", - "@fiberplane/embedded": "^0.0.15", + "@fiberplane/embedded": "^0.0.16", "@hono/oauth-providers": "^0.6.2", "@hono/zod-openapi": "^0.18.0", "@hono/zod-validator": "^0.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c7b9687c..b75a59c5c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -608,8 +608,8 @@ importers: specifier: ^1.0.8 version: 1.0.8(zod@3.24.0) '@fiberplane/embedded': - specifier: ^0.0.15 - version: 0.0.15(hono@4.6.13) + specifier: ^0.0.16 + version: 0.0.16(hono@4.6.13) '@hono/oauth-providers': specifier: ^0.6.2 version: 0.6.2(hono@4.6.13) @@ -3262,8 +3262,8 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@fiberplane/embedded@0.0.15': - resolution: {integrity: sha512-P0Moi7qUVp6Of8ng+xiwaR5HyCrpYXvlopQ5haXM/YgbjLCSNsIqXgvjJA7TsEvblzC6IS4BjNVxRYUZhReFaA==} + '@fiberplane/embedded@0.0.16': + resolution: {integrity: sha512-3/hND7ZgvdMew/O+loJGW848I3d31TrjnnT1U15zEfJebRg0zMDbWUJZKGpHy/Ysc3iJ+VbqRAwkincw1A7bTQ==} peerDependencies: hono: ^4.0 @@ -13719,10 +13719,11 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@fiberplane/embedded@0.0.15(hono@4.6.13)': + '@fiberplane/embedded@0.0.16(hono@4.6.13)': dependencies: hono: 4.6.13 openapi-types: 12.1.3 + zod: 3.24.1 '@fiberplane/hono-otel@0.3.1': dependencies: From a972a1a2c2d04f19fe9b01e7bd56f58fc8a62d35 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 17:25:54 +0100 Subject: [PATCH 104/108] Change styles on unknown response body --- .../RequestorPage/ResponsePanel/ResponseBody/ResponseBody.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playground/src/garbage/RequestorPage/ResponsePanel/ResponseBody/ResponseBody.tsx b/playground/src/garbage/RequestorPage/ResponsePanel/ResponseBody/ResponseBody.tsx index 87ee4f22c..2142c609f 100644 --- a/playground/src/garbage/RequestorPage/ResponsePanel/ResponseBody/ResponseBody.tsx +++ b/playground/src/garbage/RequestorPage/ResponsePanel/ResponseBody/ResponseBody.tsx @@ -111,9 +111,9 @@ function UnknownResponse({ return (
-
+
- + Unknown response type, cannot render body
From a46534d314b74aedb877f3537c82fb19778ecead Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 18:18:30 +0100 Subject: [PATCH 105/108] Fix up the menu items along the bottom --- .../Settings/KeyboardShortcutsModal.tsx | 93 +++++++++++++++++++ .../src/Layout/Settings/SettingsMenu.tsx | 35 ++++--- .../RequestorPage/CommandBar/CommandBar.tsx | 12 +++ .../garbage/RequestorPage/RequestorInput.tsx | 4 +- .../RequestorPage/store/slices/types.ts | 2 + .../RequestorPage/store/slices/uiSlice.ts | 6 ++ 6 files changed, 133 insertions(+), 19 deletions(-) create mode 100644 playground/src/Layout/Settings/KeyboardShortcutsModal.tsx diff --git a/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx b/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx new file mode 100644 index 000000000..9f35c379a --- /dev/null +++ b/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx @@ -0,0 +1,93 @@ +import { KeyboardShortcutKey } from "@/components/KeyboardShortcut"; +import { Dialog, DialogContent } from "@/components/ui/dialog"; +import { Icon } from "@iconify/react"; + +type ShortcutSection = { + title: string; + shortcuts: { + label: string; + keys: string[]; + }[]; +}; + +const KEYBOARD_SHORTCUTS: ShortcutSection[] = [ + { + title: "General", + shortcuts: [ + { label: "Open Command Menu", keys: ["⌘", "K"] }, + { label: "Send Request", keys: ["⌘", "Enter"] }, + { label: "Use Example Data", keys: ["⌘", "G"] }, + ], + }, + { + title: "Sidebar Navigation", + shortcuts: [ + { label: "Toggle Sidebar", keys: ["⌘", "B"] }, + { label: "Go to Next Route", keys: ["j"] }, + { label: "Go to Previous Route", keys: ["k"] }, + { label: "Select Focused Route", keys: ["Enter"] }, + { label: "Filter Routes List", keys: ["/"] }, + ], + }, +]; + +export function KeyboardShortcutsModal({ + onClose, +}: { + onClose: () => void; +}) { + return ( + + +
+
+

Keyboard Shortcuts

+
+ +
+ {KEYBOARD_SHORTCUTS.map((section) => ( +
+

+ {section.title} +

+
+ {section.shortcuts.map((shortcut) => ( +
+ {shortcut.label} +
+ {shortcut.keys.map((key, index) => ( + + {index > 0 && key !== "then" && ( + + + + + )} + {key === "then" ? ( + + then + + ) : ( + + {key} + + )} + + ))} +
+
+ ))} +
+
+ ))} +
+
+
+
+ ); +} diff --git a/playground/src/Layout/Settings/SettingsMenu.tsx b/playground/src/Layout/Settings/SettingsMenu.tsx index 2af24e11d..fbbca39fd 100644 --- a/playground/src/Layout/Settings/SettingsMenu.tsx +++ b/playground/src/Layout/Settings/SettingsMenu.tsx @@ -1,5 +1,5 @@ +import { useStudioStore } from "@/garbage/RequestorPage/store"; import { Icon } from "@iconify/react"; -import { DiscordLogoIcon, GitHubLogoIcon } from "@radix-ui/react-icons"; import { Menubar, MenubarContent, @@ -10,12 +10,17 @@ import { } from "@radix-ui/react-menubar"; import { useRef, useState } from "react"; import { useHotkeys } from "react-hotkeys-hook"; +import { KeyboardShortcutsModal } from "./KeyboardShortcutsModal"; export function SettingsMenu({ setSettingsOpen, }: { setSettingsOpen: (open: boolean) => void }) { const menuBarTriggerRef = useRef(null); const [menuOpen, setMenuOpen] = useState(undefined); + const { shortcutsOpen, setShortcutsOpen } = useStudioStore( + "shortcutsOpen", + "setShortcutsOpen", + ); useHotkeys("shift+?", () => { setMenuOpen(true); @@ -39,24 +44,15 @@ export function SettingsMenu({ forceMount={menuOpen} className="z-50 min-w-[200px] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md grid gap-1 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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" > - } - > - Docs - - } - > - GitHub - - } + setShortcutsOpen(true)} > - Discord - +
+ + Keyboard Shortcuts +
+ + {shortcutsOpen && ( + setShortcutsOpen(false)} /> + )} ); } diff --git a/playground/src/garbage/RequestorPage/CommandBar/CommandBar.tsx b/playground/src/garbage/RequestorPage/CommandBar/CommandBar.tsx index f69b8425a..a83ee53d5 100644 --- a/playground/src/garbage/RequestorPage/CommandBar/CommandBar.tsx +++ b/playground/src/garbage/RequestorPage/CommandBar/CommandBar.tsx @@ -30,12 +30,14 @@ export function CommandBar({ open, setOpen }: CommandBarProps) { setSettingsOpen, useMockApiSpec, setUseMockApiSpec, + setShortcutsOpen, } = useStudioStore( "visibleRequestsPanelTabs", "setActiveRequestsPanelTab", "setSettingsOpen", "useMockApiSpec", "setUseMockApiSpec", + "setShortcutsOpen", ); const { setTheme } = useTheme(); @@ -69,6 +71,16 @@ export function CommandBar({ open, setOpen }: CommandBarProps) { Open Settings + { + setShortcutsOpen(true); + setOpen(false); + }} + value="keyboard shortcuts hotkeys" + > + + View Keyboard Shortcuts + { setUseMockApiSpec(!useMockApiSpec); diff --git a/playground/src/garbage/RequestorPage/RequestorInput.tsx b/playground/src/garbage/RequestorPage/RequestorInput.tsx index 5f497d055..d30ef8019 100644 --- a/playground/src/garbage/RequestorPage/RequestorInput.tsx +++ b/playground/src/garbage/RequestorPage/RequestorInput.tsx @@ -33,7 +33,9 @@ export function RequestorInput({
void; sidePanel: PanelState; togglePanel: (panelName: "sidePanel") => void; + shortcutsOpen: boolean; + setShortcutsOpen: (open: boolean) => void; } export type StudioState = RequestResponseSlice & diff --git a/playground/src/garbage/RequestorPage/store/slices/uiSlice.ts b/playground/src/garbage/RequestorPage/store/slices/uiSlice.ts index 774837f84..55a919960 100644 --- a/playground/src/garbage/RequestorPage/store/slices/uiSlice.ts +++ b/playground/src/garbage/RequestorPage/store/slices/uiSlice.ts @@ -26,5 +26,11 @@ export const uiSlice: StateCreator< state[panelName] = state[panelName] === "open" ? "closed" : "open"; return; }), + + shortcutsOpen: false, + setShortcutsOpen: (open: boolean) => + set((state) => { + state.shortcutsOpen = open; + }), }; }; From c4641a88a7e222d9984400bd30e5312612e38a2b Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 18:20:44 +0100 Subject: [PATCH 106/108] Prepare for 0.0.17 embedded --- packages/embedded/package.json | 2 +- packages/embedded/src/middleware.ts | 2 +- playground/src/Layout/Settings/KeyboardShortcutsModal.tsx | 1 - playground/src/Layout/Settings/SettingsMenu.tsx | 4 +++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/embedded/package.json b/packages/embedded/package.json index 08464c663..8abd1ade3 100644 --- a/packages/embedded/package.json +++ b/packages/embedded/package.json @@ -1,6 +1,6 @@ { "name": "@fiberplane/embedded", - "version": "0.0.16", + "version": "0.0.17", "type": "module", "exports": { ".": { diff --git a/packages/embedded/src/middleware.ts b/packages/embedded/src/middleware.ts index fd9705502..ff88752e5 100644 --- a/packages/embedded/src/middleware.ts +++ b/packages/embedded/src/middleware.ts @@ -5,7 +5,7 @@ import { type RouterSpec, createRouter } from "./router.js"; // HACK - We need to manually update the version in the CDN URL when you release a new version // Eventually we should do this automagically when building the package (and derive the version from the package.json) -const VERSION = "0.0.16"; +const VERSION = "0.0.17"; const CDN_URL = `https://cdn.jsdelivr.net/npm/@fiberplane/embedded@${VERSION}/dist/playground/`; export interface EmbeddedMiddlewareOptions { diff --git a/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx b/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx index 9f35c379a..460f1cddd 100644 --- a/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx +++ b/playground/src/Layout/Settings/KeyboardShortcutsModal.tsx @@ -1,6 +1,5 @@ import { KeyboardShortcutKey } from "@/components/KeyboardShortcut"; import { Dialog, DialogContent } from "@/components/ui/dialog"; -import { Icon } from "@iconify/react"; type ShortcutSection = { title: string; diff --git a/playground/src/Layout/Settings/SettingsMenu.tsx b/playground/src/Layout/Settings/SettingsMenu.tsx index fbbca39fd..30f4932c9 100644 --- a/playground/src/Layout/Settings/SettingsMenu.tsx +++ b/playground/src/Layout/Settings/SettingsMenu.tsx @@ -72,7 +72,9 @@ export function SettingsMenu({ ); } -function MenuItemLink({ +// NOTE - IF we want to link to the Slack community or another doc page for the external api, this would be a good place to do it +// Or we can link to Fiberplane stuff... +export function _MenuItemLinkOld({ href, icon, children, From 40cdb8d55c9b0180fd26c9f6edf928170b7a8f61 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Tue, 21 Jan 2025 18:26:49 +0100 Subject: [PATCH 107/108] Update lilo to latest embedded --- lilo/lilo-worker/package.json | 2 +- lilo/lilo-worker/src/index.tsx | 1 + pnpm-lock.yaml | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lilo/lilo-worker/package.json b/lilo/lilo-worker/package.json index ba3f6c96d..fd21d11d4 100644 --- a/lilo/lilo-worker/package.json +++ b/lilo/lilo-worker/package.json @@ -22,7 +22,7 @@ "dependencies": { "@ai-sdk/google": "^1.0.9", "@ai-sdk/openai": "^1.0.8", - "@fiberplane/embedded": "^0.0.16", + "@fiberplane/embedded": "^0.0.17", "@hono/oauth-providers": "^0.6.2", "@hono/zod-openapi": "^0.18.0", "@hono/zod-validator": "^0.4.1", diff --git a/lilo/lilo-worker/src/index.tsx b/lilo/lilo-worker/src/index.tsx index 6e628507b..c318454d1 100644 --- a/lilo/lilo-worker/src/index.tsx +++ b/lilo/lilo-worker/src/index.tsx @@ -47,6 +47,7 @@ app.doc("/doc", (c) => ({ app.use( "/fp/*", createMiddleware({ + apiKey: "12345", spec: "/doc", }), ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b75a59c5c..26e8b57d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -608,8 +608,8 @@ importers: specifier: ^1.0.8 version: 1.0.8(zod@3.24.0) '@fiberplane/embedded': - specifier: ^0.0.16 - version: 0.0.16(hono@4.6.13) + specifier: ^0.0.17 + version: 0.0.17(hono@4.6.13) '@hono/oauth-providers': specifier: ^0.6.2 version: 0.6.2(hono@4.6.13) @@ -3262,8 +3262,8 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@fiberplane/embedded@0.0.16': - resolution: {integrity: sha512-3/hND7ZgvdMew/O+loJGW848I3d31TrjnnT1U15zEfJebRg0zMDbWUJZKGpHy/Ysc3iJ+VbqRAwkincw1A7bTQ==} + '@fiberplane/embedded@0.0.17': + resolution: {integrity: sha512-GZDoT1oYw/GKc5DD1dW3AnIJv3nF+eBTgOEq7HRgb7I/MFVHKLroMZCbaapAcS17cVXMtAqaTJY3rodk74+EBQ==} peerDependencies: hono: ^4.0 @@ -13719,7 +13719,7 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@fiberplane/embedded@0.0.16(hono@4.6.13)': + '@fiberplane/embedded@0.0.17(hono@4.6.13)': dependencies: hono: 4.6.13 openapi-types: 12.1.3 From ed4fad82c7930af6b3f706e557055d48604ad833 Mon Sep 17 00:00:00 2001 From: Brett Beutell Date: Wed, 22 Jan 2025 11:40:51 +0100 Subject: [PATCH 108/108] Fix panel overflow on small screens --- playground/src/garbage/RequestorPage/Tabs.tsx | 2 +- .../queries/hooks/fiberplane-embedded/adapter.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/playground/src/garbage/RequestorPage/Tabs.tsx b/playground/src/garbage/RequestorPage/Tabs.tsx index b9421c3d6..ecc8ea281 100644 --- a/playground/src/garbage/RequestorPage/Tabs.tsx +++ b/playground/src/garbage/RequestorPage/Tabs.tsx @@ -58,7 +58,7 @@ export const CustomTabsContent = React.forwardRef< tabIndex={-1} className={cn( "px-3 py-2 data-[state=active]:h-full data-[state=inactive]:hidden", - "md:overflow-y-auto max-h-full", + "overflow-y-auto max-h-full", className, )} /> diff --git a/playground/src/garbage/RequestorPage/queries/hooks/fiberplane-embedded/adapter.ts b/playground/src/garbage/RequestorPage/queries/hooks/fiberplane-embedded/adapter.ts index 5d80c7157..550aa3aea 100644 --- a/playground/src/garbage/RequestorPage/queries/hooks/fiberplane-embedded/adapter.ts +++ b/playground/src/garbage/RequestorPage/queries/hooks/fiberplane-embedded/adapter.ts @@ -1,4 +1,4 @@ -// import PLACEGOOSE_API_SPEC from "@/lib/placegoose.json"; +import PLACEGOOSE_API_SPEC from "@/lib/placegoose.json"; import TIGHTKNIT_API_SPEC from "@/lib/tightknit.json"; import { specToProbedRoutes } from "./spec-to-probed-routes"; @@ -47,7 +47,8 @@ function getOpenApiSpec(useMockApiSpec: boolean): ResolvedSpecResult { if (useMockApiSpec) { return { type: "success", - spec: TIGHTKNIT_API_SPEC as unknown as OpenAPISpec, + spec: (TIGHTKNIT_API_SPEC || + PLACEGOOSE_API_SPEC) as unknown as OpenAPISpec, }; }