@asteby/metacore-starter-core 7.0.1 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/lib/utils.ts","../src/stores/auth-store.ts","../src/lib/currency-utils.ts","../src/lib/format.ts","../src/lib/date-utils.ts","../src/lib/countries.ts","../src/lib/option-colors.ts","../src/lib/cookies.ts","../src/lib/sound.ts","../src/lib/notifications.ts","../src/i18n/i18n.ts","../src/lib/api.ts","../src/lib/push-notifications.ts","../src/lib/handle-server-error.ts","../src/components/ui/accordion.tsx","../src/components/ui/alert.tsx","../src/components/ui/button.tsx","../src/components/ui/alert-dialog.tsx","../src/components/ui/avatar.tsx","../src/components/ui/badge.tsx","../src/components/ui/calendar.tsx","../src/components/ui/card.tsx","../src/components/ui/checkbox.tsx","../src/components/ui/collapsible.tsx","../src/components/ui/dialog.tsx","../src/components/ui/command.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/label.tsx","../src/components/ui/form.tsx","../src/components/ui/image-upload.tsx","../src/components/ui/input.tsx","../src/components/ui/input-otp.tsx","../src/components/ui/popover.tsx","../src/components/ui/multi-select.tsx","../src/components/ui/scroll-area.tsx","../src/components/ui/phone-input.tsx","../src/components/ui/progress.tsx","../src/components/ui/radio-group.tsx","../src/components/ui/select.tsx","../src/components/ui/separator.tsx","../src/components/ui/sheet.tsx","../src/hooks/use-mobile.tsx","../src/components/ui/skeleton.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/sidebar.tsx","../src/context/theme-provider.tsx","../src/components/ui/sonner.tsx","../src/components/ui/switch.tsx","../src/components/ui/table.tsx","../src/components/ui/tabs.tsx","../src/components/ui/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Resolves the backend base URL at runtime. We can't read\n * `import.meta.env.VITE_API_URL` here because Vite inlines its value during\n * the SDK's own build (so consuming apps end up with whatever value the SDK\n * happened to have at build time — typically `localhost:8080`). Instead we\n * read from a global that the consuming app sets at startup.\n *\n * Apps (Vite, Next.js, anything else) should set this once before rendering:\n *\n * ;(globalThis as any).__METACORE_BACKEND_URL__ = import.meta.env.VITE_BACKEND_URL\n *\n * If the global is missing we fall back to `localhost:8080`, matching the\n * historical default.\n */\nfunction resolveBackendBaseUrl(): string {\n const g = globalThis as { __METACORE_BACKEND_URL__?: string }\n const raw = g.__METACORE_BACKEND_URL__ || 'http://localhost:8080'\n return raw.replace(/\\/api\\/?$/, '').replace(/\\/+$/, '')\n}\n\n/**\n * Gets the full URL for a storage file\n * @param filename - File name (e.g., \"20260112_uuid.png\")\n * @param folder - Storage folder (e.g., \"organizations\", \"uploads\")\n * @returns Full URL with backend base URL\n */\nexport function getStorageUrl(filename: string | undefined | null, folder: string): string {\n if (!filename) return ''\n\n // If it's already a full URL, return as is\n if (filename.startsWith('http://') || filename.startsWith('https://')) {\n return filename\n }\n\n const baseUrl = resolveBackendBaseUrl()\n\n // If it's already an absolute storage path, use it directly\n if (filename.startsWith('/storage/')) {\n return `${baseUrl}${filename}`\n }\n\n return `${baseUrl}/storage/${folder}/${filename}`\n}\n\n/**\n * Helper to get the full URL for an image path stored in the DB (e.g. /storage/uploads/...)\n */\nexport function getImageUrl(path: string | undefined | null): string {\n if (!path) return ''\n if (path.startsWith('http://') || path.startsWith('https://')) return path\n\n const baseUrl = resolveBackendBaseUrl()\n const cleanPath = path.startsWith('/') ? path : `/${path}`\n return `${baseUrl}${cleanPath}`\n}\n\nexport function sleep(ms: number = 1000) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Generates page numbers for pagination with ellipsis\n * @param currentPage - Current page number (1-based)\n * @param totalPages - Total number of pages\n * @returns Array of page numbers and ellipsis strings\n *\n * Examples:\n * - Small dataset (≤5 pages): [1, 2, 3, 4, 5]\n * - Near beginning: [1, 2, 3, 4, '...', 10]\n * - In middle: [1, '...', 4, 5, 6, '...', 10]\n * - Near end: [1, '...', 7, 8, 9, 10]\n */\nexport function getPageNumbers(currentPage: number, totalPages: number) {\n const maxVisiblePages = 5 // Maximum number of page buttons to show\n const rangeWithDots = []\n\n if (totalPages <= maxVisiblePages) {\n // If total pages is 5 or less, show all pages\n for (let i = 1; i <= totalPages; i++) {\n rangeWithDots.push(i)\n }\n } else {\n // Always show first page\n rangeWithDots.push(1)\n\n if (currentPage <= 3) {\n // Near the beginning: [1] [2] [3] [4] ... [10]\n for (let i = 2; i <= 4; i++) {\n rangeWithDots.push(i)\n }\n rangeWithDots.push('...', totalPages)\n } else if (currentPage >= totalPages - 2) {\n // Near the end: [1] ... [7] [8] [9] [10]\n rangeWithDots.push('...')\n for (let i = totalPages - 3; i <= totalPages; i++) {\n rangeWithDots.push(i)\n }\n } else {\n // In the middle: [1] ... [4] [5] [6] ... [10]\n rangeWithDots.push('...')\n for (let i = currentPage - 1; i <= currentPage + 1; i++) {\n rangeWithDots.push(i)\n }\n rangeWithDots.push('...', totalPages)\n }\n }\n\n return rangeWithDots\n}\n","import { create } from 'zustand'\n\nconst ACCESS_TOKEN = 'auth_token'\nconst USER_STORAGE = 'auth_user'\n\ninterface AuthUser {\n id: string\n email: string\n name: string\n role: string\n avatar?: string\n organization_id?: string\n organization_name?: string\n organization_logo?: string\n // Subscription info\n plan_slug?: string\n plan_name?: string\n subscription_status?: 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid'\n current_period_end?: string\n is_subscription_active?: boolean\n currency_code?: string\n timezone?: string\n checkout_mode?: 'integrated' | 'cashier'\n fulfillment_mode?: 'auto' | 'warehouse'\n tax_rate?: number\n tax_included?: boolean\n ticket_width?: number\n print_copies?: number\n auto_print?: boolean\n}\n\ninterface AuthState {\n auth: {\n user: AuthUser | null\n setUser: (user: AuthUser | null) => void\n accessToken: string\n setAccessToken: (accessToken: string) => void\n resetAccessToken: () => void\n reset: () => void\n }\n}\n\nexport const useAuthStore = create<AuthState>()((set) => {\n const token = localStorage.getItem(ACCESS_TOKEN) || ''\n const storedUser = localStorage.getItem(USER_STORAGE)\n const initialUser = storedUser ? JSON.parse(storedUser) : null\n\n return {\n auth: {\n user: initialUser,\n setUser: (user) =>\n set((state) => {\n if (user) {\n localStorage.setItem(USER_STORAGE, JSON.stringify(user))\n } else {\n localStorage.removeItem(USER_STORAGE)\n }\n return { ...state, auth: { ...state.auth, user } }\n }),\n accessToken: token,\n setAccessToken: (accessToken) =>\n set((state) => {\n localStorage.setItem(ACCESS_TOKEN, accessToken)\n return { ...state, auth: { ...state.auth, accessToken } }\n }),\n resetAccessToken: () =>\n set((state) => {\n localStorage.removeItem(ACCESS_TOKEN)\n localStorage.removeItem(USER_STORAGE)\n return { ...state, auth: { ...state.auth, accessToken: '', user: null } }\n }),\n reset: () =>\n set((state) => {\n localStorage.removeItem(ACCESS_TOKEN)\n localStorage.removeItem(USER_STORAGE)\n return {\n ...state,\n auth: { ...state.auth, user: null, accessToken: '' },\n }\n }),\n },\n }\n})\n","/**\n * Enhanced Currency Utility focusing on correct symbols for Spanish-speaking countries\n */\n\nexport interface CurrencyInfo {\n code: string\n name: string\n symbol: string\n label: string\n}\n\n/**\n * Manual mapping for symbols in Spanish-speaking countries\n * This ensures S/ for PEN, Bs. for VES, etc., which Intl often gets wrong.\n */\nexport const SPANISH_SYMBOLS: Record<string, string> = {\n 'PEN': 'S/',\n 'VES': 'Bs.',\n 'BOB': 'Bs.',\n 'GTQ': 'Q',\n 'HNL': 'L',\n 'NIO': 'C$',\n 'CRC': '₡',\n 'PAB': 'B/.',\n 'PYG': '₲',\n 'MXN': '$',\n 'COP': '$',\n 'ARS': '$',\n 'CLP': '$',\n 'UYU': '$',\n 'DOP': '$',\n 'CUP': '$',\n 'EUR': '€',\n 'USD': '$'\n}\n\nexport function formatCurrency(amount: number, currencyCode: string = 'USD', locale: string = 'es'): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n }).format(amount)\n } catch (e) {\n return `${currencyCode} ${amount}`\n }\n}\nexport function getCurrencySymbol(code: string): string {\n return SPANISH_SYMBOLS[code] ||\n (typeof Intl !== 'undefined' ?\n new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: code,\n currencyDisplay: 'narrowSymbol'\n }).formatToParts(0).find(p => p.type === 'currency')?.value || code\n : '$')\n}\n","import { useAuthStore } from '../stores/auth-store'\nimport { formatCurrency } from './currency-utils'\n\n/**\n * Returns a currency formatter bound to the current org's currency.\n * Usage: const fmt = useFormatCurrency(); fmt(1234.56) → \"$1,234.56\"\n */\nexport function useFormatCurrency() {\n const currencyCode = useAuthStore((s) => s.auth.user?.currency_code) || 'USD'\n return (amount: number) => formatCurrency(amount, currencyCode)\n}\n\n/**\n * Non-hook version: reads currency from store snapshot.\n * Use in callbacks or outside React components.\n */\nexport function fmtCurrency(amount: number): string {\n const currencyCode = useAuthStore.getState().auth.user?.currency_code || 'USD'\n return formatCurrency(amount, currencyCode)\n}\n","export interface TimezoneInfo {\n value: string;\n label: string;\n offset: string;\n}\n\n/**\n * Returns all supported IANA timezones with their current GMT offset\n */\nexport function getAllTimezones(): TimezoneInfo[] {\n // @ts-ignore - Intl.supportedValuesOf is relatively new but supported in modern browsers\n const timezones = typeof Intl !== 'undefined' && (Intl as any).supportedValuesOf ? (Intl as any).supportedValuesOf('timeZone') : [\n 'UTC', 'America/Mexico_City', 'America/Bogota', 'America/Santiago', 'America/Argentina/Buenos_Aires',\n 'America/New_York', 'America/Los_Angeles', 'Europe/Madrid', 'Europe/London', 'Europe/Paris',\n 'Asia/Tokyo', 'Asia/Shanghai', 'Asia/Dubai', 'Australia/Sydney'\n ];\n\n const now = new Date();\n\n return timezones.map((tz: string) => {\n try {\n const formatter = new Intl.DateTimeFormat('en-US', {\n timeZone: tz,\n timeZoneName: 'shortOffset'\n });\n const parts = formatter.formatToParts(now);\n const offset = parts.find(p => p.type === 'timeZoneName')?.value || '';\n\n // Format label as: (GMT-6) America/Mexico_City\n return {\n value: tz,\n label: `(${offset}) ${tz.replace(/_/g, ' ')}`,\n offset: offset\n };\n } catch (e) {\n return {\n value: tz,\n label: tz,\n offset: ''\n };\n }\n }).sort((a: TimezoneInfo, b: TimezoneInfo) => {\n // Sort by offset primarily, then by name\n const getOffsetValue = (off: string) => {\n if (!off || off === 'GMT') return 0;\n const match = off.match(/GMT([+-])(\\d+)(?::(\\d+))?/);\n if (!match) return 0;\n const sign = match[1] === '+' ? 1 : -1;\n const hours = parseInt(match[2]);\n const minutes = parseInt(match[3] || '0');\n return sign * (hours * 60 + minutes);\n };\n\n const offsetA = getOffsetValue(a.offset);\n const offsetB = getOffsetValue(b.offset);\n\n if (offsetA !== offsetB) return offsetA - offsetB;\n return a.value.localeCompare(b.value);\n });\n}\n","// ISO 3166-1 alpha-2 country codes\n// Names are resolved at runtime via Intl.DisplayNames for proper localization\nconst countryCodes = [\n \"AR\",\"AT\",\"AU\",\"AE\",\"AL\",\"AO\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BG\",\"BH\",\"BO\",\"BR\",\"BS\",\"BY\",\"BZ\",\n \"CA\",\"CD\",\"CH\",\"CI\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CY\",\"CZ\",\n \"DE\",\"DK\",\"DO\",\"DZ\",\n \"EC\",\"EE\",\"EG\",\"ES\",\"ET\",\"SV\",\n \"FI\",\"FJ\",\"FR\",\n \"GB\",\"GE\",\"GH\",\"GR\",\"GT\",\"GY\",\n \"HK\",\"HN\",\"HR\",\"HT\",\"HU\",\n \"ID\",\"IE\",\"IL\",\"IN\",\"IQ\",\"IR\",\"IS\",\"IT\",\n \"JM\",\"JO\",\"JP\",\n \"KE\",\"KH\",\"KR\",\"KW\",\"KZ\",\n \"LA\",\"LB\",\"LK\",\"LT\",\"LU\",\"LV\",\"LY\",\n \"MA\",\"MD\",\"ME\",\"MK\",\"MM\",\"MN\",\"MT\",\"MU\",\"MX\",\"MY\",\"MZ\",\n \"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NZ\",\n \"OM\",\n \"PA\",\"PE\",\"PG\",\"PH\",\"PK\",\"PL\",\"PR\",\"PT\",\"PY\",\n \"QA\",\n \"RO\",\"RS\",\"RU\",\"RW\",\n \"SA\",\"SE\",\"SG\",\"SI\",\"SK\",\"SN\",\"SR\",\n \"TH\",\"TN\",\"TR\",\"TT\",\"TW\",\"TZ\",\n \"UA\",\"UG\",\"US\",\"UY\",\"UZ\",\n \"VE\",\"VN\",\n \"ZA\",\n] as const\n\n// Convert country code to flag emoji\nfunction codeToFlag(code: string): string {\n return String.fromCodePoint(\n ...code.toUpperCase().split('').map(c => 0x1F1E6 + c.charCodeAt(0) - 65)\n )\n}\n\nexport interface Country {\n code: string\n name: string\n flag: string\n}\n\nexport function getCountries(locale?: string): Country[] {\n const lang = locale || navigator.language || 'es'\n const displayNames = new Intl.DisplayNames([lang], { type: 'region' })\n\n return countryCodes.map(code => ({\n code,\n name: displayNames.of(code) || code,\n flag: codeToFlag(code),\n })).sort((a, b) => a.name.localeCompare(b.name, lang))\n}\n","/**\n * Centralized color resolution for OptionDef.color (badges, dots, filters).\n *\n * Backend metadata can express option colors either as Tailwind-style semantic\n * names (`\"green\"`, `\"emerald\"`, `\"blue\"`, ...) — the preferred convention —\n * or as raw hex (`\"#22c55e\"`). Every consumer (table cell badges, filter\n * pills, column header chips) must funnel through this module so the visual\n * language stays consistent across the app and the theme palette only needs\n * to be updated in one place.\n */\n\n// Tailwind-500 palette. Keep in sync with tailwind.config if it diverges.\nconst COLOR_MAP: Record<string, string> = {\n red: 'ef4444',\n orange: 'f97316',\n amber: 'f59e0b',\n yellow: 'eab308',\n lime: '84cc16',\n green: '22c55e',\n emerald: '10b981',\n teal: '14b8a6',\n cyan: '06b6d4',\n sky: '0ea5e9',\n blue: '3b82f6',\n indigo: '6366f1',\n violet: '8b5cf6',\n purple: 'a855f7',\n fuchsia: 'd946ef',\n pink: 'ec4899',\n rose: 'f43f5e',\n gray: '6b7280',\n slate: '64748b',\n zinc: '71717a',\n neutral: '737373',\n stone: '78716c',\n}\n\n/**\n * Returns a 6-digit hex string (no `#`) for an OptionDef color value, accepting\n * either a semantic name from COLOR_MAP or any hex literal.\n */\nexport const resolveColorHex = (input: string): string => {\n if (!input) return ''\n const named = COLOR_MAP[input.toLowerCase()]\n if (named) return named\n return input.replace('#', '')\n}\n\n/** Returns a `#xxxxxx` CSS-safe color literal — handy for inline styles. */\nexport const resolveColorCss = (input: string): string => {\n const hex = resolveColorHex(input)\n return hex ? `#${hex}` : ''\n}\n\ninterface BadgeStyleOptions {\n isDark: boolean\n}\n\n/**\n * Builds the inline style object for a colored badge (background + border +\n * text), tinted in the OptionDef color and adapted to light/dark mode.\n */\nexport const generateBadgeStyles = (\n input: string,\n { isDark }: BadgeStyleOptions,\n): React.CSSProperties => {\n const hex = resolveColorHex(input)\n if (hex.length < 6) return {}\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n if (isDark) {\n return {\n backgroundColor: `rgba(${r}, ${g}, ${b}, 0.2)`,\n color: `rgb(${Math.min(255, Math.floor(r * 1.2))}, ${Math.min(255, Math.floor(g * 1.2))}, ${Math.min(255, Math.floor(b * 1.2))})`,\n border: `1px solid rgba(${r}, ${g}, ${b}, 0.5)`,\n fontWeight: 500,\n }\n }\n return {\n backgroundColor: `rgba(${r}, ${g}, ${b}, 0.12)`,\n color: `rgb(${Math.floor(r * 0.5)}, ${Math.floor(g * 0.5)}, ${Math.floor(b * 0.5)})`,\n border: `1px solid rgba(${r}, ${g}, ${b}, 0.25)`,\n fontWeight: 500,\n }\n}\n","/**\n * Cookie utility functions using manual document.cookie approach\n * Replaces js-cookie dependency for better consistency\n */\n\nconst DEFAULT_MAX_AGE = 60 * 60 * 24 * 7 // 7 days\n\n/**\n * Get a cookie value by name\n */\nexport function getCookie(name: string): string | undefined {\n if (typeof document === 'undefined') return undefined\n\n const value = `; ${document.cookie}`\n const parts = value.split(`; ${name}=`)\n if (parts.length === 2) {\n const cookieValue = parts.pop()?.split(';').shift()\n return cookieValue\n }\n return undefined\n}\n\n/**\n * Set a cookie with name, value, and optional max age\n */\nexport function setCookie(\n name: string,\n value: string,\n maxAge: number = DEFAULT_MAX_AGE\n): void {\n if (typeof document === 'undefined') return\n\n document.cookie = `${name}=${value}; path=/; max-age=${maxAge}`\n}\n\n/**\n * Remove a cookie by setting its max age to 0\n */\nexport function removeCookie(name: string): void {\n if (typeof document === 'undefined') return\n\n document.cookie = `${name}=; path=/; max-age=0`\n}\n","export function playNotificationSound() {\n try {\n const AudioContext = window.AudioContext || (window as any).webkitAudioContext\n if (!AudioContext) return\n\n const ctx = new AudioContext()\n\n // Create an oscillator\n const osc = ctx.createOscillator()\n const gain = ctx.createGain()\n\n // Connect oscillator to gain to destination\n osc.connect(gain)\n gain.connect(ctx.destination)\n\n // Set parameters for a pleasant \"ding\"\n // Use a sine wave for a smooth tone\n osc.type = 'sine'\n // Start at 880Hz (A5) and drop slightly to \n osc.frequency.setValueAtTime(880, ctx.currentTime)\n osc.frequency.exponentialRampToValueAtTime(500, ctx.currentTime + 0.5)\n\n // Envelope for the sound (fade out)\n gain.gain.setValueAtTime(0.1, ctx.currentTime)\n gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.4)\n\n // Play\n osc.start(ctx.currentTime)\n osc.stop(ctx.currentTime + 0.5)\n } catch (e) {\n console.error('Error playing notification sound:', e)\n }\n}\n","import { toast } from 'sonner'\n\nexport interface NotificationOptions {\n title: string\n body: string\n icon?: string\n tag?: string\n data?: any\n requireInteraction?: boolean\n silent?: boolean\n}\n\nclass NotificationManager {\n private permission: NotificationPermission = 'default'\n\n constructor() {\n if ('Notification' in window) {\n this.permission = Notification.permission\n }\n }\n\n async requestPermission(): Promise<boolean> {\n if (!('Notification' in window)) {\n toast.error('Este navegador no soporta notificaciones')\n return false\n }\n\n if (this.permission === 'granted') {\n return true\n }\n\n try {\n const permission = await Notification.requestPermission()\n this.permission = permission\n \n if (permission === 'granted') {\n toast.success('Notificaciones activadas')\n return true\n } else {\n toast.error('Permiso de notificaciones denegado')\n return false\n }\n } catch (error) {\n console.error('Error requesting notification permission:', error)\n toast.error('Error al solicitar permisos')\n return false\n }\n }\n\n async show(options: NotificationOptions): Promise<void> {\n if (!('Notification' in window)) {\n toast(options.title, { description: options.body })\n return\n }\n\n if (this.permission !== 'granted') {\n const granted = await this.requestPermission()\n if (!granted) {\n toast(options.title, { description: options.body })\n return\n }\n }\n\n try {\n if ('serviceWorker' in navigator && navigator.serviceWorker.controller) {\n // Use service worker for better notification handling\n const registration = await navigator.serviceWorker.ready\n await registration.showNotification(options.title, {\n body: options.body,\n icon: options.icon || '/images/icons/android/android-launchericon-192-192.png',\n badge: '/images/icons/android/android-launchericon-96-96.png',\n tag: options.tag,\n data: options.data,\n requireInteraction: options.requireInteraction || false,\n silent: options.silent || false\n })\n } else {\n // Fallback to regular notification\n const notification = new Notification(options.title, {\n body: options.body,\n icon: options.icon || '/images/icons/android/android-launchericon-192-192.png',\n tag: options.tag,\n data: options.data,\n requireInteraction: options.requireInteraction || false,\n silent: options.silent || false\n })\n\n notification.onclick = () => {\n window.focus()\n notification.close()\n }\n }\n\n // Also show toast for in-app notification\n toast(options.title, { \n description: options.body,\n duration: 5000\n })\n } catch (error) {\n console.error('Error showing notification:', error)\n toast(options.title, { description: options.body })\n }\n }\n\n isSupported(): boolean {\n return 'Notification' in window\n }\n\n getPermission(): NotificationPermission {\n return this.permission\n }\n}\n\nexport const notificationManager = new NotificationManager()\n","// Stub — phase A4 will port the real i18next setup.\n// Minimal surface so api.ts compiles during phase A1/A2.\nconst i18n = {\n language: 'es',\n}\n\nexport default i18n\n","import axios from 'axios'\nimport { useAuthStore } from '../stores/auth-store'\n\nexport const api = axios.create({\n baseURL: import.meta.env.VITE_API_URL || '/api',\n headers: {\n 'Content-Type': 'application/json',\n },\n})\n\nimport i18n from '../i18n/i18n'\n\n// Add request interceptor to include auth token and language\napi.interceptors.request.use((config) => {\n const token = localStorage.getItem('auth_token')\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n\n // Add current language header\n config.headers['Accept-Language'] = i18n.language || 'es'\n\n // Add current branch header for multi-branch scoping\n try {\n const branch = JSON.parse(localStorage.getItem('current_branch') || '{}')\n if (branch?.id) config.headers['X-Branch-ID'] = branch.id\n } catch { /* ignore parse errors */ }\n\n // Let browser set Content-Type with boundary for FormData uploads\n if (config.data instanceof FormData) {\n delete config.headers['Content-Type']\n }\n\n return config\n})\n\n\n// Add response interceptor to handle auth errors and log all API errors\napi.interceptors.response.use(\n (response) => response,\n (error) => {\n // Always log API errors with backend message for debugging\n const status = error.response?.status\n const data = error.response?.data\n const url = error.config?.method?.toUpperCase() + ' ' + error.config?.url\n const serverMessage = data?.message || data?.error || data?.title || error.message\n console.error(`[API Error] ${url} → ${status}: ${serverMessage}`, data)\n\n if (status === 401) {\n const { reset } = useAuthStore.getState().auth\n reset()\n window.location.href = '/sign-in'\n }\n return Promise.reject(error)\n }\n)\n","import { api } from './api'\nimport { toast } from 'sonner'\n\ninterface PushSubscriptionKeys {\n p256dh: string\n auth: string\n}\n\nclass PushNotificationService {\n private vapidPublicKey: string | null = null\n private subscription: PushSubscription | null = null\n private isSupported: boolean = false\n\n constructor() {\n this.isSupported = 'serviceWorker' in navigator && 'PushManager' in window\n }\n\n async init(): Promise<void> {\n if (!this.isSupported) {\n console.log('⚠️ Push notifications not supported')\n return\n }\n\n try {\n // Get VAPID public key from backend\n const response = await api.get('/push/public-key')\n if (response.data?.publicKey) {\n this.vapidPublicKey = response.data.publicKey\n console.log('✅ VAPID public key loaded')\n }\n\n // Check existing subscription\n const registration = await navigator.serviceWorker.ready\n this.subscription = await registration.pushManager.getSubscription()\n \n if (this.subscription) {\n console.log('✅ Existing push subscription found')\n }\n } catch (error) {\n console.error('Failed to initialize push service:', error)\n }\n }\n\n async subscribe(): Promise<boolean> {\n if (!this.isSupported) {\n toast.error('Tu navegador no soporta notificaciones push')\n return false\n }\n\n if (!this.vapidPublicKey) {\n await this.init()\n if (!this.vapidPublicKey) {\n toast.error('No se pudo obtener la clave del servidor')\n return false\n }\n }\n\n try {\n // Request notification permission first\n const permission = await Notification.requestPermission()\n if (permission !== 'granted') {\n toast.error('Permiso de notificaciones denegado')\n return false\n }\n\n // Get service worker registration\n const registration = await navigator.serviceWorker.ready\n\n // Subscribe to push\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: this.urlBase64ToUint8Array(this.vapidPublicKey) as BufferSource\n })\n\n this.subscription = subscription\n\n // Send subscription to backend\n const keys = subscription.toJSON().keys as unknown as PushSubscriptionKeys\n await api.post('/push/subscribe', {\n endpoint: subscription.endpoint,\n p256dh: keys.p256dh,\n auth: keys.auth,\n device_type: this.detectDeviceType()\n })\n\n toast.success('🔔 Notificaciones push activadas')\n console.log('✅ Push subscription registered')\n return true\n } catch (error) {\n console.error('Failed to subscribe to push:', error)\n toast.error('Error al activar notificaciones push')\n return false\n }\n }\n\n async unsubscribe(): Promise<boolean> {\n if (!this.subscription) {\n return true\n }\n\n try {\n // Unsubscribe from push manager\n await this.subscription.unsubscribe()\n\n // Remove from backend\n await api.post('/push/unsubscribe', {\n endpoint: this.subscription.endpoint\n })\n\n this.subscription = null\n toast.success('Notificaciones push desactivadas')\n return true\n } catch (error) {\n console.error('Failed to unsubscribe:', error)\n toast.error('Error al desactivar notificaciones')\n return false\n }\n }\n\n async testNotification(): Promise<void> {\n try {\n await api.post('/push/test')\n toast.success('Notificación de prueba enviada')\n } catch (error) {\n console.error('Failed to send test notification:', error)\n toast.error('Error al enviar notificación de prueba')\n }\n }\n\n isSubscribed(): boolean {\n return this.subscription !== null\n }\n\n getSupported(): boolean {\n return this.isSupported\n }\n\n private urlBase64ToUint8Array(base64String: string): Uint8Array {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4)\n const base64 = (base64String + padding)\n .replace(/-/g, '+')\n .replace(/_/g, '/')\n\n const rawData = window.atob(base64)\n const outputArray = new Uint8Array(rawData.length)\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i)\n }\n return outputArray\n }\n\n private detectDeviceType(): string {\n const userAgent = navigator.userAgent.toLowerCase()\n \n if (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)) {\n return 'mobile'\n }\n \n if (/electron/i.test(userAgent)) {\n return 'desktop'\n }\n \n return 'web'\n }\n}\n\nexport const pushService = new PushNotificationService()\n","import { AxiosError } from 'axios'\nimport { toast } from 'sonner'\n\nexport function handleServerError(error: unknown) {\n // eslint-disable-next-line no-console\n console.log(error)\n\n let errMsg = 'Something went wrong!'\n\n if (\n error &&\n typeof error === 'object' &&\n 'status' in error &&\n Number(error.status) === 204\n ) {\n errMsg = 'Content not found.'\n }\n\n if (error instanceof AxiosError) {\n errMsg = error.response?.data?.message || error.response?.data?.title || error.message\n }\n\n toast.error(errMsg)\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(\"border-b\", className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot='alert'\n role='alert'\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-title'\n className={cn(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-description'\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='button'\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cn } from '../../lib/utils'\nimport { buttonVariants } from './button'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot='alert-dialog' {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot='alert-dialog-trigger' {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot='alert-dialog-portal' {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot='alert-dialog-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot='alert-dialog-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-dialog-header'\n className={cn('flex flex-col gap-2 text-center sm:text-start', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-dialog-footer'\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot='alert-dialog-title'\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot='alert-dialog-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: 'outline' }), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n","import * as React from 'react'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { cn } from '../../lib/utils'\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot='avatar'\n className={cn(\n 'relative flex size-8 shrink-0 overflow-hidden rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot='avatar-image'\n className={cn('aspect-square size-full object-cover', className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot='avatar-fallback'\n className={cn(\n 'bg-muted flex size-full items-center justify-center rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',\n {\n variants: {\n variant: {\n default:\n 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',\n destructive:\n 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'span'\n\n return (\n <Comp\n data-slot='badge'\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from 'react'\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from 'lucide-react'\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker'\nimport { cn } from '../../lib/utils'\nimport { Button, buttonVariants } from './button'\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant']\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn(\n 'flex gap-4 flex-col md:flex-row relative',\n defaultClassNames.months\n ),\n month: cn('flex flex-col w-full gap-4', defaultClassNames.month),\n nav: cn(\n 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n 'absolute bg-popover inset-0 opacity-0',\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : 'rounded-md ps-2 pe-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none',\n defaultClassNames.weekday\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn(\n 'select-none w-(--cell-size)',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-[0.8rem] select-none text-muted-foreground',\n defaultClassNames.week_number\n ),\n day: cn(\n 'relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',\n defaultClassNames.day\n ),\n range_start: cn(\n 'rounded-l-md bg-accent',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside\n ),\n disabled: cn(\n 'text-muted-foreground opacity-50',\n defaultClassNames.disabled\n ),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot='calendar'\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return (\n <ChevronLeftIcon className={cn('size-4', className)} {...props} />\n )\n }\n\n if (orientation === 'right') {\n return (\n <ChevronRightIcon\n className={cn('size-4', className)}\n {...props}\n />\n )\n }\n\n return (\n <ChevronDownIcon className={cn('size-4', className)} {...props} />\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className='flex size-(--cell-size) items-center justify-center text-center'>\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant='ghost'\n size='icon'\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Card({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card'\n className={cn(\n 'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-header'\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-title'\n className={cn('leading-none font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-action'\n className={cn(\n 'col-start-2 row-span-2 row-start-1 self-start justify-self-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-content'\n className={cn('px-6', className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-footer'\n className={cn('flex items-center px-6 [.border-t]:pt-6', className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot='checkbox'\n className={cn(\n 'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot='checkbox-indicator'\n className='flex items-center justify-center text-current transition-none'\n >\n <CheckIcon className='size-3.5' />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n","import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot='collapsible' {...props} />\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot='collapsible-trigger'\n {...props}\n />\n )\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot='collapsible-content'\n {...props}\n />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { XIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot='dialog' {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot='dialog-trigger' {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot='dialog-portal' {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot='dialog-close' {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot='dialog-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot='dialog-portal'>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot='dialog-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot='dialog-close'\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className='sr-only'>Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-header'\n className={cn('flex flex-col gap-2 text-center sm:text-start', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-footer'\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot='dialog-title'\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot='dialog-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import * as React from 'react'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { SearchIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from './dialog'\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot='command'\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className='sr-only'>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot='command-input-wrapper'\n className='flex h-10 items-center gap-2 border-b px-3'\n >\n <SearchIcon className='size-4 shrink-0 opacity-50' />\n <CommandPrimitive.Input\n data-slot='command-input'\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot='command-list'\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot='command-empty'\n className='py-6 text-center text-sm'\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot='command-group'\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot='command-separator'\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot='command-item'\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='command-shortcut'\n className={cn(\n 'text-muted-foreground ms-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot='dropdown-menu' {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot='dropdown-menu-portal' {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot='dropdown-menu-trigger'\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot='dropdown-menu-content'\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot='dropdown-menu-group' {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot='dropdown-menu-item'\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot='dropdown-menu-checkbox-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className='size-4' />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot='dropdown-menu-radio-group'\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot='dropdown-menu-radio-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className='size-2 fill-current' />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot='dropdown-menu-label'\n data-inset={inset}\n className={cn(\n 'px-2 py-1.5 text-sm font-medium data-[inset]:ps-8',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot='dropdown-menu-separator'\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='dropdown-menu-shortcut'\n className={cn(\n 'text-muted-foreground ms-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot='dropdown-menu-sub' {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot='dropdown-menu-sub-trigger'\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:ps-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className='ms-auto size-4' />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot='dropdown-menu-sub-content'\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as LabelPrimitive from '@radix-ui/react-label'\nimport { cn } from '../../lib/utils'\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot='label'\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from 'react'\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form'\nimport * as LabelPrimitive from '@radix-ui/react-label'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../../lib/utils'\nimport { Label } from './label'\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>')\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot='form-item'\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n data-slot='form-label'\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n data-slot='form-control'\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n data-slot='form-description'\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? '') : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n data-slot='form-message'\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n )\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n","import { useRef, useState, useEffect } from 'react'\nimport { Button } from './button'\nimport { Label } from './label'\nimport { api } from '../../lib/api'\nimport { Image as ImageIcon, Loader2, X } from 'lucide-react'\nimport { toast } from 'sonner'\nimport { cn } from '../../lib/utils'\n\ninterface ImageUploadProps {\n value?: string | string[]\n onChange: (url: string | string[]) => void\n label?: string\n disabled?: boolean\n multiple?: boolean\n className?: string\n}\n\nexport function ImageUpload({ value, onChange, label = 'Imagen', disabled, multiple = false, className }: ImageUploadProps) {\n const fileInputRef = useRef<HTMLInputElement>(null)\n const [uploading, setUploading] = useState(false)\n const [imageUrls, setImageUrls] = useState<string[]>([])\n\n // Sync state with props\n useEffect(() => {\n if (Array.isArray(value)) {\n setImageUrls(value)\n } else if (value) {\n setImageUrls([value])\n } else {\n setImageUrls([])\n }\n }, [value])\n\n // Handle file selection\n const handleFileChange = async (e: React.ChangeEvent<HTMLInputElement>) => {\n const files = e.target.files\n if (!files || files.length === 0) return\n\n const validFiles: File[] = []\n for (let i = 0; i < files.length; i++) {\n const file = files[i]\n if (!file.type.startsWith('image/')) {\n toast.error(`Archivo ${file.name} no es una imagen válida`)\n continue\n }\n if (file.size > 5 * 1024 * 1024) {\n toast.error(`Imagen ${file.name} supera los 5MB`)\n continue\n }\n validFiles.push(file)\n }\n\n if (validFiles.length > 0) {\n await uploadImages(validFiles)\n }\n }\n\n const uploadImages = async (files: File[]) => {\n setUploading(true)\n try {\n // Upload parallel\n const promises = files.map(async (file) => {\n const formData = new FormData()\n formData.append('file', file)\n\n try {\n const res = await api.post('/upload', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n })\n return res.data.url\n } catch (err) {\n console.error(\"Single file upload failed\", err)\n return null\n }\n })\n\n const results = await Promise.all(promises)\n const newUrls = results.filter(url => url !== null)\n\n if (newUrls.length > 0) {\n if (multiple) {\n const updated = [...imageUrls, ...newUrls]\n onChange(updated)\n } else {\n onChange(newUrls[0])\n }\n toast.success(`${newUrls.length} imagen(es) cargada(s)`)\n }\n\n } catch (error) {\n console.error('Upload Error:', error)\n toast.error('Error al subir imágenes')\n } finally {\n setUploading(false)\n if (fileInputRef.current) fileInputRef.current.value = ''\n }\n }\n\n const handleRemove = (urlToRemove: string) => {\n if (multiple) {\n const updated = imageUrls.filter(url => url !== urlToRemove)\n onChange(updated)\n } else {\n onChange('')\n }\n }\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <Label>{label}</Label>\n\n {/* Grid of existing images */}\n {imageUrls.length > 0 && (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4 mb-4\">\n {imageUrls.map((url, index) => (\n <div key={index} className=\"relative group rounded-lg overflow-hidden border bg-background aspect-square flex items-center justify-center bg-gray-50 dark:bg-gray-800/50\">\n <img\n src={url}\n alt={`Image ${index + 1}`}\n className=\"h-full w-full object-contain p-1\"\n />\n {!disabled && (\n <div className=\"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n className=\"h-6 w-6 rounded-full\"\n onClick={() => handleRemove(url)}\n >\n <X className=\"h-3 w-3\" />\n </Button>\n </div>\n )}\n </div>\n ))}\n </div>\n )}\n\n {/* Upload Button Area - Show if multiple or if no image selected yet */}\n {(!disabled && (multiple || imageUrls.length === 0)) && (\n <div\n className={`\n border-2 border-dashed border-muted-foreground/25 rounded-lg \n flex flex-col items-center justify-center p-6 gap-2 \n transition-all hover:bg-accent/50 cursor-pointer hover:border-primary/50\n ${uploading ? 'opacity-50 pointer-events-none' : ''}\n `}\n onClick={() => fileInputRef.current?.click()}\n >\n {uploading ? (\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n ) : (\n <ImageIcon className=\"h-8 w-8 text-muted-foreground\" />\n )}\n\n <span className=\"text-sm text-muted-foreground font-medium\">\n {uploading ? 'Subiendo...' : multiple ? 'Click para agregar imágenes' : 'Click para subir imagen'}\n </span>\n <p className=\"text-xs text-muted-foreground/70\">\n Soporta: JPG, PNG, WEBP (Max 5MB)\n </p>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept=\"image/*\"\n multiple={multiple}\n onChange={handleFileChange}\n disabled={disabled || uploading}\n />\n </div>\n )}\n </div>\n )\n}\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot='input'\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import * as React from 'react'\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport { MinusIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot='input-otp'\n containerClassName={cn(\n 'flex items-center gap-2 has-disabled:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='input-otp-group'\n className={cn('flex items-center', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot='input-otp-slot'\n data-active={isActive}\n className={cn(\n 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>\n <div className='animate-caret-blink bg-foreground h-4 w-px duration-1000' />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot='input-otp-separator' role='separator' {...props}>\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n","import * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport { cn } from '../../lib/utils'\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot='popover' {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot='popover-content'\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot='popover-anchor' {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","import * as React from \"react\"\nimport { Check, ChevronsUpDown, X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"./popover\"\nimport { Badge } from \"./badge\"\n\nexport type Option = {\n label: string\n value: string\n icon?: React.ComponentType<{ className?: string }>\n}\n\ninterface MultiSelectProps {\n options: Option[]\n selected: string[]\n onChange: (selected: string[]) => void\n placeholder?: string\n className?: string\n}\n\nexport function MultiSelect({\n options,\n selected,\n onChange,\n placeholder = \"Select options...\",\n className,\n}: MultiSelectProps) {\n const [open, setOpen] = React.useState(false)\n\n const handleUnselect = (item: string) => {\n onChange(selected.filter((i) => i !== item))\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <div\n role=\"combobox\"\n aria-expanded={open}\n className={cn(\n \"flex w-full justify-between items-center rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer hover:bg-accent hover:text-accent-foreground\",\n \"h-auto min-h-10\",\n className\n )}\n onClick={() => setOpen(!open)}\n >\n <div className=\"flex flex-wrap gap-1\">\n {selected.length > 0 ? (\n selected.map((itemValue) => {\n const item = options.find((i) => i.value === itemValue)\n if (!item) return null\n return (\n <Badge\n variant=\"secondary\"\n key={item.value}\n className=\"mr-1 mb-1\"\n onClick={(e) => {\n e.stopPropagation()\n handleUnselect(itemValue)\n }}\n >\n {item.icon && <item.icon className=\"mr-1 h-3 w-3\" />}\n {item.label}\n <button\n className=\"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\"\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n handleUnselect(itemValue)\n }\n }}\n onMouseDown={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n handleUnselect(itemValue)\n }}\n >\n <X className=\"h-3 w-3 text-muted-foreground hover:text-foreground\" />\n </button>\n </Badge>\n )\n })\n ) : (\n <span className=\"text-muted-foreground font-normal\">{placeholder}</span>\n )}\n </div>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </div>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\">\n <Command>\n <CommandInput placeholder=\"Search...\" />\n <CommandEmpty>No item found.</CommandEmpty>\n <CommandList>\n <CommandGroup className=\"max-h-64 overflow-auto\">\n {options.map((option) => (\n <CommandItem\n key={option.value}\n onSelect={() => {\n if (selected.includes(option.value)) {\n onChange(selected.filter((item) => item !== option.value))\n } else {\n onChange([...selected, option.value])\n }\n setOpen(true)\n }}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n selected.includes(option.value)\n ? \"opacity-100\"\n : \"opacity-0\"\n )}\n />\n {option.icon && <option.icon className=\"mr-2 h-4 w-4\" />}\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n","import * as React from 'react'\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'\nimport { cn } from '../../lib/utils'\n\ninterface ScrollAreaProps\n extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {\n orientation?: 'vertical' | 'horizontal'\n}\n\nconst ScrollArea = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.Root>,\n ScrollAreaProps & { type?: 'auto' | 'always' | 'scroll' | 'hover' }\n>(({ className, children, orientation = 'vertical', type = 'hover', ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n data-slot='scroll-area'\n type={type}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot='scroll-area-viewport'\n className={cn(\n 'focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1',\n orientation === 'horizontal' && 'overflow-x-auto!'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation={orientation} />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = 'ScrollArea'\n\nconst ScrollBar = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n data-slot='scroll-area-scrollbar'\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' &&\n 'h-full w-3 border-l border-l-transparent',\n orientation === 'horizontal' &&\n 'h-3 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot='scroll-area-thumb'\n className='bg-foreground/35 hover:bg-foreground/50 relative flex-1 rounded-full transition-colors'\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = 'ScrollBar'\n\nexport { ScrollArea, ScrollBar }\n","import * as React from \"react\"\nimport { CheckIcon, ChevronsUpDown } from \"lucide-react\"\nimport * as RPNInput from \"react-phone-number-input\"\nimport flags from \"react-phone-number-input/flags\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"./button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\"\nimport { Input } from \"./input\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"./popover\"\nimport { ScrollArea } from \"./scroll-area\"\n\ntype PhoneInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"onChange\" | \"value\" | \"ref\"\n> &\n Omit<RPNInput.Props<typeof RPNInput.default>, \"onChange\"> & {\n onChange?: (value: RPNInput.Value) => void\n }\n\nconst PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps> =\n React.forwardRef<React.ElementRef<typeof RPNInput.default>, PhoneInputProps>(\n ({ className, onChange, ...props }, ref) => {\n return (\n <RPNInput.default\n ref={ref}\n className={cn(\"flex\", className)}\n flagComponent={FlagComponent}\n countrySelectComponent={CountrySelect}\n inputComponent={InputComponent}\n smartCaret={false}\n onChange={(value) => onChange?.(value || (\"\" as RPNInput.Value))}\n {...props}\n />\n )\n }\n )\nPhoneInput.displayName = \"PhoneInput\"\n\nconst InputComponent = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<\"input\">\n>(({ className, ...props }, ref) => (\n <Input\n className={cn(\"rounded-e-lg rounded-s-none\", className)}\n {...props}\n ref={ref}\n />\n))\nInputComponent.displayName = \"InputComponent\"\n\ntype CountryEntry = { label: string; value: RPNInput.Country | undefined }\n\ntype CountrySelectProps = {\n disabled?: boolean\n value: RPNInput.Country\n onChange: (value: RPNInput.Country) => void\n options: CountryEntry[]\n}\n\nconst CountrySelect = ({\n disabled,\n value,\n onChange,\n options,\n}: CountrySelectProps) => {\n const handleSelect = React.useCallback(\n (country: RPNInput.Country) => {\n onChange(country)\n },\n [onChange]\n )\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\n \"flex gap-1 rounded-e-none rounded-s-lg border-r-0 px-3 focus:z-10\"\n )}\n disabled={disabled}\n >\n <FlagComponent country={value} countryName={value} />\n <ChevronsUpDown\n className={cn(\n \"-mr-2 size-4 opacity-50\",\n disabled ? \"hidden\" : \"opacity-100\"\n )}\n />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[300px] p-0\">\n <Command>\n <CommandInput placeholder=\"Buscar país...\" />\n <CommandList>\n <ScrollArea className=\"h-72\">\n <CommandEmpty>País no encontrado.</CommandEmpty>\n <CommandGroup>\n {options\n .filter((x) => x.value)\n .map((option) => (\n <CommandItem\n className=\"gap-2\"\n key={option.value}\n onSelect={() => handleSelect(option.value!)}\n >\n <FlagComponent\n country={option.value!}\n countryName={option.label}\n />\n <span className=\"flex-1 text-sm\">{option.label}</span>\n {option.value && (\n <span className=\"text-sm text-foreground/50\">\n {`+${RPNInput.getCountryCallingCode(option.value)}`}\n </span>\n )}\n <CheckIcon\n className={cn(\n \"ml-auto size-4\",\n option.value === value ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </ScrollArea>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n\nconst FlagComponent = ({ country, countryName }: RPNInput.FlagProps) => {\n const Flag = flags[country]\n\n return (\n <span className=\"flex h-5 w-7 shrink-0 items-center justify-center overflow-hidden rounded-sm bg-foreground/10 [&_svg]:h-full [&_svg]:w-full [&_svg]:object-cover\">\n {Flag && <Flag title={countryName} />}\n </span>\n )\n}\n\nexport { PhoneInput }\n","import * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full bg-primary transition-transform duration-300 ease-out\"\n style={{\n width: '100%',\n transform: `translateX(-${100 - (value || 0)}%)`\n }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n","import * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CircleIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot='radio-group'\n className={cn('grid gap-3', className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot='radio-group-item'\n className={cn(\n 'border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot='radio-group-indicator'\n className='relative flex items-center justify-center'\n >\n <CircleIcon className='fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2' />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n","import * as React from 'react'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot='select' {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot='select-group' {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot='select-value' {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className='size-4 opacity-50' />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot='select-content'\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot='select-label'\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className='absolute end-2 flex size-3.5 items-center justify-center'>\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className='size-4' />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot='select-separator'\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot='select-scroll-up-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className='size-4' />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot='select-scroll-down-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className='size-4' />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","import * as React from 'react'\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport { cn } from '../../lib/utils'\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot='separator'\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","import * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { XIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot='sheet' {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot='sheet-trigger' {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot='sheet-close' {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot='sheet-portal' {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot='sheet-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left'\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot='sheet-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-end data-[state=open]:slide-in-from-end inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-start data-[state=open]:slide-in-from-start inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none'>\n <XIcon className='size-4' />\n <span className='sr-only'>Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sheet-header'\n className={cn('flex flex-col gap-1.5 p-4', className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sheet-footer'\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot='sheet-title'\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot='sheet-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import * as React from 'react'\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener('change', onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener('change', onChange)\n }, [])\n\n return !!isMobile\n}\n","import { cn } from '../../lib/utils'\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='skeleton'\n className={cn('bg-accent animate-pulse rounded-md', className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","'use client'\n\nimport * as React from 'react'\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport { cn } from '../../lib/utils'\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot='tooltip-provider'\n delayDuration={delayDuration}\n {...props}\n />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot='tooltip' {...props} />\n </TooltipProvider>\n )\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot='tooltip-trigger' {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot='tooltip-content'\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className='bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]' />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { PanelLeftIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { useIsMobile } from '../../hooks/use-mobile'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from './sheet'\nimport { Skeleton } from './skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from './tooltip'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '3rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot='sidebar-wrapper'\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh w-full overflow-hidden',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot='sidebar'\n className={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar='sidebar'\n data-slot='sidebar'\n data-mobile='true'\n className='bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden'\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className='sr-only'>\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className='flex h-full w-full flex-col'>{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className='group peer text-sidebar-foreground hidden md:block'\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot='sidebar'\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot='sidebar-gap'\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot='sidebar-container'\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[inset-inline,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'start-0 group-data-[collapsible=offcanvas]:-start-[calc(var(--sidebar-width))]'\n : 'end-0 group-data-[collapsible=offcanvas]:-end-[calc(var(--sidebar-width))]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s',\n className\n )}\n {...props}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n className='bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm'\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar='trigger'\n data-slot='sidebar-trigger'\n variant='ghost'\n size='icon'\n className={cn('size-7', className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className='sr-only'>Toggle Sidebar</span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar='rail'\n data-slot='sidebar-rail'\n aria-label='Toggle Sidebar'\n tabIndex={-1}\n onClick={toggleSidebar}\n title='Toggle Sidebar'\n className={cn(\n 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-end-4 group-data-[side=right]:start-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:start-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-end-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-start-2',\n\n // RTL support\n 'rtl:translate-x-1/2',\n 'rtl:in-data-[side=left]:cursor-e-resize rtl:in-data-[side=right]:cursor-w-resize',\n 'rtl:[[data-side=left][data-state=collapsed]_&]:cursor-w-resize rtl:[[data-side=right][data-state=collapsed]_&]:cursor-e-resize',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-inset'\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col overflow-y-auto',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot='sidebar-input'\n data-sidebar='input'\n className={cn('bg-background h-8 w-full shadow-none', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-header'\n data-sidebar='header'\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-footer'\n data-sidebar='footer'\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot='sidebar-separator'\n data-sidebar='separator'\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-content'\n data-sidebar='content'\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-group'\n data-sidebar='group'\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot='sidebar-group-label'\n data-sidebar='group-label'\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='sidebar-group-action'\n data-sidebar='group-action'\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute end-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-group-content'\n data-sidebar='group-content'\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='sidebar-menu'\n data-sidebar='menu'\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot='sidebar-menu-item'\n data-sidebar='menu-item'\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pe-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n data-slot='sidebar-menu-button'\n data-sidebar='menu-button'\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side='right'\n align='center'\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='sidebar-menu-action'\n data-sidebar='menu-action'\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute end-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-menu-badge'\n data-sidebar='menu-badge'\n className={cn(\n 'text-sidebar-foreground pointer-events-none absolute end-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot='sidebar-menu-skeleton'\n data-sidebar='menu-skeleton'\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className='size-4 rounded-md'\n data-sidebar='menu-skeleton-icon'\n />\n )}\n <Skeleton\n className='h-4 max-w-(--skeleton-width) flex-1'\n data-sidebar='menu-skeleton-text'\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='sidebar-menu-sub'\n data-sidebar='menu-sub'\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-s px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot='sidebar-menu-sub-item'\n data-sidebar='menu-sub-item'\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean\n size?: 'sm' | 'md'\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot : 'a'\n\n return (\n <Comp\n data-slot='sidebar-menu-sub-button'\n data-sidebar='menu-sub-button'\n data-size={size}\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-inherit',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import { createContext, useContext, useEffect, useState, useMemo } from 'react'\nimport { getCookie, setCookie, removeCookie } from '@/lib/cookies'\n\ntype Theme = 'dark' | 'light' | 'system'\ntype ResolvedTheme = Exclude<Theme, 'system'>\n\nconst DEFAULT_THEME = 'system'\nconst THEME_COOKIE_NAME = 'vite-ui-theme'\nconst THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 365 // 1 year\n\ntype ThemeProviderProps = {\n children: React.ReactNode\n defaultTheme?: Theme\n storageKey?: string\n}\n\ntype ThemeProviderState = {\n defaultTheme: Theme\n resolvedTheme: ResolvedTheme\n theme: Theme\n setTheme: (theme: Theme) => void\n resetTheme: () => void\n}\n\nconst initialState: ThemeProviderState = {\n defaultTheme: DEFAULT_THEME,\n resolvedTheme: 'light',\n theme: DEFAULT_THEME,\n setTheme: () => null,\n resetTheme: () => null,\n}\n\nconst ThemeContext = createContext<ThemeProviderState>(initialState)\n\nexport function ThemeProvider({\n children,\n defaultTheme = DEFAULT_THEME,\n storageKey = THEME_COOKIE_NAME,\n ...props\n}: ThemeProviderProps) {\n const [theme, _setTheme] = useState<Theme>(\n () => (getCookie(storageKey) as Theme) || defaultTheme\n )\n\n // Optimized: Memoize the resolved theme calculation to prevent unnecessary re-computations\n const resolvedTheme = useMemo((): ResolvedTheme => {\n if (theme === 'system') {\n return window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light'\n }\n return theme as ResolvedTheme\n }, [theme])\n\n useEffect(() => {\n const root = window.document.documentElement\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n\n const applyTheme = (currentResolvedTheme: ResolvedTheme) => {\n root.classList.remove('light', 'dark') // Remove existing theme classes\n root.classList.add(currentResolvedTheme) // Add the new theme class\n }\n\n const handleChange = () => {\n if (theme === 'system') {\n const systemTheme = mediaQuery.matches ? 'dark' : 'light'\n applyTheme(systemTheme)\n }\n }\n\n applyTheme(resolvedTheme)\n\n mediaQuery.addEventListener('change', handleChange)\n\n return () => mediaQuery.removeEventListener('change', handleChange)\n }, [theme, resolvedTheme])\n\n const setTheme = (theme: Theme) => {\n setCookie(storageKey, theme, THEME_COOKIE_MAX_AGE)\n _setTheme(theme)\n }\n\n const resetTheme = () => {\n removeCookie(storageKey)\n _setTheme(DEFAULT_THEME)\n }\n\n const contextValue = {\n defaultTheme,\n resolvedTheme,\n resetTheme,\n theme,\n setTheme,\n }\n\n return (\n <ThemeContext value={contextValue} {...props}>\n {children}\n </ThemeContext>\n )\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport const useTheme = () => {\n const context = useContext(ThemeContext)\n\n if (!context) throw new Error('useTheme must be used within a ThemeProvider')\n\n return context\n}\n","import { Toaster as Sonner, type ToasterProps } from 'sonner'\nimport { useTheme } from '../../context/theme-provider'\n\nexport function Toaster({ ...props }: ToasterProps) {\n const { theme = 'system' } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className='toaster group [&_div[data-content]]:w-full'\n toastOptions={{\n classNames: {\n toast: 'rounded-lg border bg-background shadow-lg',\n title: 'font-semibold',\n description: 'text-sm text-muted-foreground',\n actionButton: 'bg-primary text-primary-foreground',\n cancelButton: 'bg-muted text-muted-foreground',\n },\n }}\n style={\n {\n '--normal-bg': 'var(--popover)',\n '--normal-text': 'var(--popover-foreground)',\n '--normal-border': 'var(--border)',\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n","import * as React from 'react'\nimport * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { cn } from '../../lib/utils'\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot='switch'\n className={cn(\n 'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot='switch-thumb'\n className={cn(\n 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]'\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\ninterface TableProps extends React.ComponentProps<'table'> {\n noWrapper?: boolean\n}\n\nfunction Table({ className, noWrapper, ...props }: TableProps) {\n const table = (\n <table\n data-slot='table'\n className={cn('w-full caption-bottom text-sm', className)}\n {...props}\n />\n )\n\n if (noWrapper) {\n return table\n }\n\n return (\n <div\n data-slot='table-container'\n className='relative w-full overflow-x-auto'\n >\n {table}\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return (\n <thead\n data-slot='table-header'\n className={cn('[&_tr]:border-b', className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return (\n <tbody\n data-slot='table-body'\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot='table-footer'\n className={cn(\n 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot='table-row'\n className={cn(\n 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot='table-head'\n className={cn(\n 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot='table-cell'\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<'caption'>) {\n return (\n <caption\n data-slot='table-caption'\n className={cn('text-muted-foreground mt-4 text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from 'react'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cn } from '../../lib/utils'\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot='tabs'\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot='tabs-list'\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot='tabs-trigger'\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot='tabs-content'\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot='textarea'\n className={cn(\n 'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible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,CAClC,OACE,EAAA,EAAA,KAAC,UAAD,CACE,YAAU,gBACV,UAAW,EAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CC3GN,SAAS,GAAK,CACZ,YACA,GAAG,GAC+C,CAClD,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,OACV,UAAW,EAAG,sBAAuB,EAAU,CAC/C,GAAI,EACJ,CAAA,CAIN,SAAS,GAAS,CAChB,YACA,GAAG,GAC+C,CAClD,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,YACV,UAAW,EACT,sGACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,GAAY,CACnB,YACA,GAAG,GACkD,CACrD,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EACT,kqBACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,GAAY,CACnB,YACA,GAAG,GACkD,CACrD,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EAAG,sBAAuB,EAAU,CAC/C,GAAI,EACJ,CAAA,CCvDN,SAAS,GAAS,CAAE,YAAW,GAAG,GAA2C,CAC3E,OACE,EAAA,EAAA,KAAC,WAAD,CACE,YAAU,WACV,UAAW,EACT,scACA,EACD,CACD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/lib/utils.ts","../src/stores/auth-store.ts","../src/lib/currency-utils.ts","../src/lib/format.ts","../src/lib/date-utils.ts","../src/lib/countries.ts","../src/lib/option-colors.ts","../src/lib/cookies.ts","../src/lib/sound.ts","../src/lib/notifications.ts","../src/i18n/i18n.ts","../src/lib/api.ts","../src/lib/push-notifications.ts","../src/lib/handle-server-error.ts","../src/components/ui/accordion.tsx","../src/components/ui/alert.tsx","../src/components/ui/button.tsx","../src/components/ui/alert-dialog.tsx","../src/components/ui/avatar.tsx","../src/components/ui/badge.tsx","../src/components/ui/calendar.tsx","../src/components/ui/card.tsx","../src/components/ui/checkbox.tsx","../src/components/ui/collapsible.tsx","../src/components/ui/dialog.tsx","../src/components/ui/command.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/label.tsx","../src/components/ui/form.tsx","../src/components/ui/image-upload.tsx","../src/components/ui/input.tsx","../src/components/ui/input-otp.tsx","../src/components/ui/popover.tsx","../src/components/ui/multi-select.tsx","../src/components/ui/scroll-area.tsx","../src/components/ui/phone-input.tsx","../src/components/ui/progress.tsx","../src/components/ui/radio-group.tsx","../src/components/ui/select.tsx","../src/components/ui/separator.tsx","../src/components/ui/sheet.tsx","../src/hooks/use-mobile.tsx","../src/components/ui/skeleton.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/sidebar.tsx","../src/context/theme-provider.tsx","../src/components/ui/sonner.tsx","../src/components/ui/switch.tsx","../src/components/ui/table.tsx","../src/components/ui/tabs.tsx","../src/components/ui/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\n/**\n * Resolves the backend base URL at runtime. We can't read\n * `import.meta.env.VITE_API_URL` here because Vite inlines its value during\n * the SDK's own build (so consuming apps end up with whatever value the SDK\n * happened to have at build time — typically `localhost:8080`). Instead we\n * read from a global that the consuming app sets at startup.\n *\n * Apps (Vite, Next.js, anything else) should set this once before rendering:\n *\n * ;(globalThis as any).__METACORE_BACKEND_URL__ = import.meta.env.VITE_BACKEND_URL\n *\n * If the global is missing we fall back to `localhost:8080`, matching the\n * historical default.\n */\nfunction resolveBackendBaseUrl(): string {\n const g = globalThis as { __METACORE_BACKEND_URL__?: string }\n const raw = g.__METACORE_BACKEND_URL__ || 'http://localhost:8080'\n return raw.replace(/\\/api\\/?$/, '').replace(/\\/+$/, '')\n}\n\n/**\n * Gets the full URL for a storage file\n * @param filename - File name (e.g., \"20260112_uuid.png\")\n * @param folder - Storage folder (e.g., \"organizations\", \"uploads\")\n * @returns Full URL with backend base URL\n */\nexport function getStorageUrl(filename: string | undefined | null, folder: string): string {\n if (!filename) return ''\n\n // If it's already a full URL, return as is\n if (filename.startsWith('http://') || filename.startsWith('https://')) {\n return filename\n }\n\n const baseUrl = resolveBackendBaseUrl()\n\n // If it's already an absolute storage path, use it directly\n if (filename.startsWith('/storage/')) {\n return `${baseUrl}${filename}`\n }\n\n return `${baseUrl}/storage/${folder}/${filename}`\n}\n\n/**\n * Helper to get the full URL for an image path stored in the DB (e.g. /storage/uploads/...)\n */\nexport function getImageUrl(path: string | undefined | null): string {\n if (!path) return ''\n if (path.startsWith('http://') || path.startsWith('https://')) return path\n\n const baseUrl = resolveBackendBaseUrl()\n const cleanPath = path.startsWith('/') ? path : `/${path}`\n return `${baseUrl}${cleanPath}`\n}\n\nexport function sleep(ms: number = 1000) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Generates page numbers for pagination with ellipsis\n * @param currentPage - Current page number (1-based)\n * @param totalPages - Total number of pages\n * @returns Array of page numbers and ellipsis strings\n *\n * Examples:\n * - Small dataset (≤5 pages): [1, 2, 3, 4, 5]\n * - Near beginning: [1, 2, 3, 4, '...', 10]\n * - In middle: [1, '...', 4, 5, 6, '...', 10]\n * - Near end: [1, '...', 7, 8, 9, 10]\n */\nexport function getPageNumbers(currentPage: number, totalPages: number) {\n const maxVisiblePages = 5 // Maximum number of page buttons to show\n const rangeWithDots = []\n\n if (totalPages <= maxVisiblePages) {\n // If total pages is 5 or less, show all pages\n for (let i = 1; i <= totalPages; i++) {\n rangeWithDots.push(i)\n }\n } else {\n // Always show first page\n rangeWithDots.push(1)\n\n if (currentPage <= 3) {\n // Near the beginning: [1] [2] [3] [4] ... [10]\n for (let i = 2; i <= 4; i++) {\n rangeWithDots.push(i)\n }\n rangeWithDots.push('...', totalPages)\n } else if (currentPage >= totalPages - 2) {\n // Near the end: [1] ... [7] [8] [9] [10]\n rangeWithDots.push('...')\n for (let i = totalPages - 3; i <= totalPages; i++) {\n rangeWithDots.push(i)\n }\n } else {\n // In the middle: [1] ... [4] [5] [6] ... [10]\n rangeWithDots.push('...')\n for (let i = currentPage - 1; i <= currentPage + 1; i++) {\n rangeWithDots.push(i)\n }\n rangeWithDots.push('...', totalPages)\n }\n }\n\n return rangeWithDots\n}\n","import { create } from 'zustand'\n\nconst ACCESS_TOKEN = 'auth_token'\nconst USER_STORAGE = 'auth_user'\n\ninterface AuthUser {\n id: string\n email: string\n name: string\n role: string\n avatar?: string\n organization_id?: string\n organization_name?: string\n organization_logo?: string\n // Subscription info\n plan_slug?: string\n plan_name?: string\n subscription_status?: 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid'\n current_period_end?: string\n is_subscription_active?: boolean\n currency_code?: string\n timezone?: string\n checkout_mode?: 'integrated' | 'cashier'\n fulfillment_mode?: 'auto' | 'warehouse'\n tax_rate?: number\n tax_included?: boolean\n ticket_width?: number\n print_copies?: number\n auto_print?: boolean\n}\n\ninterface AuthState {\n auth: {\n user: AuthUser | null\n setUser: (user: AuthUser | null) => void\n accessToken: string\n setAccessToken: (accessToken: string) => void\n resetAccessToken: () => void\n reset: () => void\n }\n}\n\nexport const useAuthStore = create<AuthState>()((set) => {\n const token = localStorage.getItem(ACCESS_TOKEN) || ''\n const storedUser = localStorage.getItem(USER_STORAGE)\n const initialUser = storedUser ? JSON.parse(storedUser) : null\n\n return {\n auth: {\n user: initialUser,\n setUser: (user) =>\n set((state) => {\n if (user) {\n localStorage.setItem(USER_STORAGE, JSON.stringify(user))\n } else {\n localStorage.removeItem(USER_STORAGE)\n }\n return { ...state, auth: { ...state.auth, user } }\n }),\n accessToken: token,\n setAccessToken: (accessToken) =>\n set((state) => {\n localStorage.setItem(ACCESS_TOKEN, accessToken)\n return { ...state, auth: { ...state.auth, accessToken } }\n }),\n resetAccessToken: () =>\n set((state) => {\n localStorage.removeItem(ACCESS_TOKEN)\n localStorage.removeItem(USER_STORAGE)\n return { ...state, auth: { ...state.auth, accessToken: '', user: null } }\n }),\n reset: () =>\n set((state) => {\n localStorage.removeItem(ACCESS_TOKEN)\n localStorage.removeItem(USER_STORAGE)\n return {\n ...state,\n auth: { ...state.auth, user: null, accessToken: '' },\n }\n }),\n },\n }\n})\n","/**\n * Enhanced Currency Utility focusing on correct symbols for Spanish-speaking countries\n */\n\nexport interface CurrencyInfo {\n code: string\n name: string\n symbol: string\n label: string\n}\n\n/**\n * Manual mapping for symbols in Spanish-speaking countries\n * This ensures S/ for PEN, Bs. for VES, etc., which Intl often gets wrong.\n */\nexport const SPANISH_SYMBOLS: Record<string, string> = {\n 'PEN': 'S/',\n 'VES': 'Bs.',\n 'BOB': 'Bs.',\n 'GTQ': 'Q',\n 'HNL': 'L',\n 'NIO': 'C$',\n 'CRC': '₡',\n 'PAB': 'B/.',\n 'PYG': '₲',\n 'MXN': '$',\n 'COP': '$',\n 'ARS': '$',\n 'CLP': '$',\n 'UYU': '$',\n 'DOP': '$',\n 'CUP': '$',\n 'EUR': '€',\n 'USD': '$'\n}\n\nexport function formatCurrency(amount: number, currencyCode: string = 'USD', locale: string = 'es'): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyCode,\n }).format(amount)\n } catch (e) {\n return `${currencyCode} ${amount}`\n }\n}\nexport function getCurrencySymbol(code: string): string {\n return SPANISH_SYMBOLS[code] ||\n (typeof Intl !== 'undefined' ?\n new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: code,\n currencyDisplay: 'narrowSymbol'\n }).formatToParts(0).find(p => p.type === 'currency')?.value || code\n : '$')\n}\n","import { useAuthStore } from '../stores/auth-store'\nimport { formatCurrency } from './currency-utils'\n\n/**\n * Returns a currency formatter bound to the current org's currency.\n * Usage: const fmt = useFormatCurrency(); fmt(1234.56) → \"$1,234.56\"\n */\nexport function useFormatCurrency() {\n const currencyCode = useAuthStore((s) => s.auth.user?.currency_code) || 'USD'\n return (amount: number) => formatCurrency(amount, currencyCode)\n}\n\n/**\n * Non-hook version: reads currency from store snapshot.\n * Use in callbacks or outside React components.\n */\nexport function fmtCurrency(amount: number): string {\n const currencyCode = useAuthStore.getState().auth.user?.currency_code || 'USD'\n return formatCurrency(amount, currencyCode)\n}\n","export interface TimezoneInfo {\n value: string;\n label: string;\n offset: string;\n}\n\n/**\n * Returns all supported IANA timezones with their current GMT offset\n */\nexport function getAllTimezones(): TimezoneInfo[] {\n // @ts-ignore - Intl.supportedValuesOf is relatively new but supported in modern browsers\n const timezones = typeof Intl !== 'undefined' && (Intl as any).supportedValuesOf ? (Intl as any).supportedValuesOf('timeZone') : [\n 'UTC', 'America/Mexico_City', 'America/Bogota', 'America/Santiago', 'America/Argentina/Buenos_Aires',\n 'America/New_York', 'America/Los_Angeles', 'Europe/Madrid', 'Europe/London', 'Europe/Paris',\n 'Asia/Tokyo', 'Asia/Shanghai', 'Asia/Dubai', 'Australia/Sydney'\n ];\n\n const now = new Date();\n\n return timezones.map((tz: string) => {\n try {\n const formatter = new Intl.DateTimeFormat('en-US', {\n timeZone: tz,\n timeZoneName: 'shortOffset'\n });\n const parts = formatter.formatToParts(now);\n const offset = parts.find(p => p.type === 'timeZoneName')?.value || '';\n\n // Format label as: (GMT-6) America/Mexico_City\n return {\n value: tz,\n label: `(${offset}) ${tz.replace(/_/g, ' ')}`,\n offset: offset\n };\n } catch (e) {\n return {\n value: tz,\n label: tz,\n offset: ''\n };\n }\n }).sort((a: TimezoneInfo, b: TimezoneInfo) => {\n // Sort by offset primarily, then by name\n const getOffsetValue = (off: string) => {\n if (!off || off === 'GMT') return 0;\n const match = off.match(/GMT([+-])(\\d+)(?::(\\d+))?/);\n if (!match) return 0;\n const sign = match[1] === '+' ? 1 : -1;\n const hours = parseInt(match[2]);\n const minutes = parseInt(match[3] || '0');\n return sign * (hours * 60 + minutes);\n };\n\n const offsetA = getOffsetValue(a.offset);\n const offsetB = getOffsetValue(b.offset);\n\n if (offsetA !== offsetB) return offsetA - offsetB;\n return a.value.localeCompare(b.value);\n });\n}\n","// ISO 3166-1 alpha-2 country codes\n// Names are resolved at runtime via Intl.DisplayNames for proper localization\nconst countryCodes = [\n \"AR\",\"AT\",\"AU\",\"AE\",\"AL\",\"AO\",\"AZ\",\"BA\",\"BB\",\"BD\",\"BE\",\"BG\",\"BH\",\"BO\",\"BR\",\"BS\",\"BY\",\"BZ\",\n \"CA\",\"CD\",\"CH\",\"CI\",\"CL\",\"CM\",\"CN\",\"CO\",\"CR\",\"CU\",\"CY\",\"CZ\",\n \"DE\",\"DK\",\"DO\",\"DZ\",\n \"EC\",\"EE\",\"EG\",\"ES\",\"ET\",\"SV\",\n \"FI\",\"FJ\",\"FR\",\n \"GB\",\"GE\",\"GH\",\"GR\",\"GT\",\"GY\",\n \"HK\",\"HN\",\"HR\",\"HT\",\"HU\",\n \"ID\",\"IE\",\"IL\",\"IN\",\"IQ\",\"IR\",\"IS\",\"IT\",\n \"JM\",\"JO\",\"JP\",\n \"KE\",\"KH\",\"KR\",\"KW\",\"KZ\",\n \"LA\",\"LB\",\"LK\",\"LT\",\"LU\",\"LV\",\"LY\",\n \"MA\",\"MD\",\"ME\",\"MK\",\"MM\",\"MN\",\"MT\",\"MU\",\"MX\",\"MY\",\"MZ\",\n \"NG\",\"NI\",\"NL\",\"NO\",\"NP\",\"NZ\",\n \"OM\",\n \"PA\",\"PE\",\"PG\",\"PH\",\"PK\",\"PL\",\"PR\",\"PT\",\"PY\",\n \"QA\",\n \"RO\",\"RS\",\"RU\",\"RW\",\n \"SA\",\"SE\",\"SG\",\"SI\",\"SK\",\"SN\",\"SR\",\n \"TH\",\"TN\",\"TR\",\"TT\",\"TW\",\"TZ\",\n \"UA\",\"UG\",\"US\",\"UY\",\"UZ\",\n \"VE\",\"VN\",\n \"ZA\",\n] as const\n\n// Convert country code to flag emoji\nfunction codeToFlag(code: string): string {\n return String.fromCodePoint(\n ...code.toUpperCase().split('').map(c => 0x1F1E6 + c.charCodeAt(0) - 65)\n )\n}\n\nexport interface Country {\n code: string\n name: string\n flag: string\n}\n\nexport function getCountries(locale?: string): Country[] {\n const lang = locale || navigator.language || 'es'\n const displayNames = new Intl.DisplayNames([lang], { type: 'region' })\n\n return countryCodes.map(code => ({\n code,\n name: displayNames.of(code) || code,\n flag: codeToFlag(code),\n })).sort((a, b) => a.name.localeCompare(b.name, lang))\n}\n","/**\n * Centralized color resolution for OptionDef.color (badges, dots, filters).\n *\n * Backend metadata can express option colors either as Tailwind-style semantic\n * names (`\"green\"`, `\"emerald\"`, `\"blue\"`, ...) — the preferred convention —\n * or as raw hex (`\"#22c55e\"`). Every consumer (table cell badges, filter\n * pills, column header chips) must funnel through this module so the visual\n * language stays consistent across the app and the theme palette only needs\n * to be updated in one place.\n */\n\n// Tailwind-500 palette. Keep in sync with tailwind.config if it diverges.\nconst COLOR_MAP: Record<string, string> = {\n red: 'ef4444',\n orange: 'f97316',\n amber: 'f59e0b',\n yellow: 'eab308',\n lime: '84cc16',\n green: '22c55e',\n emerald: '10b981',\n teal: '14b8a6',\n cyan: '06b6d4',\n sky: '0ea5e9',\n blue: '3b82f6',\n indigo: '6366f1',\n violet: '8b5cf6',\n purple: 'a855f7',\n fuchsia: 'd946ef',\n pink: 'ec4899',\n rose: 'f43f5e',\n gray: '6b7280',\n slate: '64748b',\n zinc: '71717a',\n neutral: '737373',\n stone: '78716c',\n}\n\n/**\n * Returns a 6-digit hex string (no `#`) for an OptionDef color value, accepting\n * either a semantic name from COLOR_MAP or any hex literal.\n */\nexport const resolveColorHex = (input: string): string => {\n if (!input) return ''\n const named = COLOR_MAP[input.toLowerCase()]\n if (named) return named\n return input.replace('#', '')\n}\n\n/** Returns a `#xxxxxx` CSS-safe color literal — handy for inline styles. */\nexport const resolveColorCss = (input: string): string => {\n const hex = resolveColorHex(input)\n return hex ? `#${hex}` : ''\n}\n\ninterface BadgeStyleOptions {\n isDark: boolean\n}\n\n/**\n * Builds the inline style object for a colored badge (background + border +\n * text), tinted in the OptionDef color and adapted to light/dark mode.\n */\nexport const generateBadgeStyles = (\n input: string,\n { isDark }: BadgeStyleOptions,\n): React.CSSProperties => {\n const hex = resolveColorHex(input)\n if (hex.length < 6) return {}\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n if (isDark) {\n return {\n backgroundColor: `rgba(${r}, ${g}, ${b}, 0.2)`,\n color: `rgb(${Math.min(255, Math.floor(r * 1.2))}, ${Math.min(255, Math.floor(g * 1.2))}, ${Math.min(255, Math.floor(b * 1.2))})`,\n border: `1px solid rgba(${r}, ${g}, ${b}, 0.5)`,\n fontWeight: 500,\n }\n }\n return {\n backgroundColor: `rgba(${r}, ${g}, ${b}, 0.12)`,\n color: `rgb(${Math.floor(r * 0.5)}, ${Math.floor(g * 0.5)}, ${Math.floor(b * 0.5)})`,\n border: `1px solid rgba(${r}, ${g}, ${b}, 0.25)`,\n fontWeight: 500,\n }\n}\n","/**\n * Cookie utility functions using manual document.cookie approach\n * Replaces js-cookie dependency for better consistency\n */\n\nconst DEFAULT_MAX_AGE = 60 * 60 * 24 * 7 // 7 days\n\n/**\n * Get a cookie value by name\n */\nexport function getCookie(name: string): string | undefined {\n if (typeof document === 'undefined') return undefined\n\n const value = `; ${document.cookie}`\n const parts = value.split(`; ${name}=`)\n if (parts.length === 2) {\n const cookieValue = parts.pop()?.split(';').shift()\n return cookieValue\n }\n return undefined\n}\n\n/**\n * Set a cookie with name, value, and optional max age\n */\nexport function setCookie(\n name: string,\n value: string,\n maxAge: number = DEFAULT_MAX_AGE\n): void {\n if (typeof document === 'undefined') return\n\n document.cookie = `${name}=${value}; path=/; max-age=${maxAge}`\n}\n\n/**\n * Remove a cookie by setting its max age to 0\n */\nexport function removeCookie(name: string): void {\n if (typeof document === 'undefined') return\n\n document.cookie = `${name}=; path=/; max-age=0`\n}\n","export function playNotificationSound() {\n try {\n const AudioContext = window.AudioContext || (window as any).webkitAudioContext\n if (!AudioContext) return\n\n const ctx = new AudioContext()\n\n // Create an oscillator\n const osc = ctx.createOscillator()\n const gain = ctx.createGain()\n\n // Connect oscillator to gain to destination\n osc.connect(gain)\n gain.connect(ctx.destination)\n\n // Set parameters for a pleasant \"ding\"\n // Use a sine wave for a smooth tone\n osc.type = 'sine'\n // Start at 880Hz (A5) and drop slightly to \n osc.frequency.setValueAtTime(880, ctx.currentTime)\n osc.frequency.exponentialRampToValueAtTime(500, ctx.currentTime + 0.5)\n\n // Envelope for the sound (fade out)\n gain.gain.setValueAtTime(0.1, ctx.currentTime)\n gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.4)\n\n // Play\n osc.start(ctx.currentTime)\n osc.stop(ctx.currentTime + 0.5)\n } catch (e) {\n console.error('Error playing notification sound:', e)\n }\n}\n","import { toast } from 'sonner'\n\nexport interface NotificationOptions {\n title: string\n body: string\n icon?: string\n tag?: string\n data?: any\n requireInteraction?: boolean\n silent?: boolean\n}\n\nclass NotificationManager {\n private permission: NotificationPermission = 'default'\n\n constructor() {\n if ('Notification' in window) {\n this.permission = Notification.permission\n }\n }\n\n async requestPermission(): Promise<boolean> {\n if (!('Notification' in window)) {\n toast.error('Este navegador no soporta notificaciones')\n return false\n }\n\n if (this.permission === 'granted') {\n return true\n }\n\n try {\n const permission = await Notification.requestPermission()\n this.permission = permission\n \n if (permission === 'granted') {\n toast.success('Notificaciones activadas')\n return true\n } else {\n toast.error('Permiso de notificaciones denegado')\n return false\n }\n } catch (error) {\n console.error('Error requesting notification permission:', error)\n toast.error('Error al solicitar permisos')\n return false\n }\n }\n\n async show(options: NotificationOptions): Promise<void> {\n if (!('Notification' in window)) {\n toast(options.title, { description: options.body })\n return\n }\n\n if (this.permission !== 'granted') {\n const granted = await this.requestPermission()\n if (!granted) {\n toast(options.title, { description: options.body })\n return\n }\n }\n\n try {\n if ('serviceWorker' in navigator && navigator.serviceWorker.controller) {\n // Use service worker for better notification handling\n const registration = await navigator.serviceWorker.ready\n await registration.showNotification(options.title, {\n body: options.body,\n icon: options.icon || '/images/icons/android/android-launchericon-192-192.png',\n badge: '/images/icons/android/android-launchericon-96-96.png',\n tag: options.tag,\n data: options.data,\n requireInteraction: options.requireInteraction || false,\n silent: options.silent || false\n })\n } else {\n // Fallback to regular notification\n const notification = new Notification(options.title, {\n body: options.body,\n icon: options.icon || '/images/icons/android/android-launchericon-192-192.png',\n tag: options.tag,\n data: options.data,\n requireInteraction: options.requireInteraction || false,\n silent: options.silent || false\n })\n\n notification.onclick = () => {\n window.focus()\n notification.close()\n }\n }\n\n // Also show toast for in-app notification\n toast(options.title, { \n description: options.body,\n duration: 5000\n })\n } catch (error) {\n console.error('Error showing notification:', error)\n toast(options.title, { description: options.body })\n }\n }\n\n isSupported(): boolean {\n return 'Notification' in window\n }\n\n getPermission(): NotificationPermission {\n return this.permission\n }\n}\n\nexport const notificationManager = new NotificationManager()\n","// Stub — phase A4 will port the real i18next setup.\n// Minimal surface so api.ts compiles during phase A1/A2.\nconst i18n = {\n language: 'es',\n}\n\nexport default i18n\n","import axios from 'axios'\nimport { useAuthStore } from '../stores/auth-store'\n\nexport const api = axios.create({\n baseURL: import.meta.env.VITE_API_URL || '/api',\n headers: {\n 'Content-Type': 'application/json',\n },\n})\n\nimport i18n from '../i18n/i18n'\n\n// Add request interceptor to include auth token and language\napi.interceptors.request.use((config) => {\n const token = localStorage.getItem('auth_token')\n if (token) {\n config.headers.Authorization = `Bearer ${token}`\n }\n\n // Add current language header\n config.headers['Accept-Language'] = i18n.language || 'es'\n\n // Add current branch header for multi-branch scoping\n try {\n const branch = JSON.parse(localStorage.getItem('current_branch') || '{}')\n if (branch?.id) config.headers['X-Branch-ID'] = branch.id\n } catch { /* ignore parse errors */ }\n\n // Let browser set Content-Type with boundary for FormData uploads\n if (config.data instanceof FormData) {\n delete config.headers['Content-Type']\n }\n\n return config\n})\n\n\n// Add response interceptor to handle auth errors and log all API errors\napi.interceptors.response.use(\n (response) => response,\n (error) => {\n // Always log API errors with backend message for debugging\n const status = error.response?.status\n const data = error.response?.data\n const url = error.config?.method?.toUpperCase() + ' ' + error.config?.url\n const serverMessage = data?.message || data?.error || data?.title || error.message\n console.error(`[API Error] ${url} → ${status}: ${serverMessage}`, data)\n\n if (status === 401) {\n const { reset } = useAuthStore.getState().auth\n reset()\n window.location.href = '/sign-in'\n }\n return Promise.reject(error)\n }\n)\n","import { api } from './api'\nimport { toast } from 'sonner'\n\ninterface PushSubscriptionKeys {\n p256dh: string\n auth: string\n}\n\nclass PushNotificationService {\n private vapidPublicKey: string | null = null\n private subscription: PushSubscription | null = null\n private isSupported: boolean = false\n\n constructor() {\n this.isSupported = 'serviceWorker' in navigator && 'PushManager' in window\n }\n\n async init(): Promise<void> {\n if (!this.isSupported) {\n console.log('⚠️ Push notifications not supported')\n return\n }\n\n try {\n // Get VAPID public key from backend\n const response = await api.get('/push/public-key')\n if (response.data?.publicKey) {\n this.vapidPublicKey = response.data.publicKey\n console.log('✅ VAPID public key loaded')\n }\n\n // Check existing subscription\n const registration = await navigator.serviceWorker.ready\n this.subscription = await registration.pushManager.getSubscription()\n \n if (this.subscription) {\n console.log('✅ Existing push subscription found')\n }\n } catch (error) {\n console.error('Failed to initialize push service:', error)\n }\n }\n\n async subscribe(): Promise<boolean> {\n if (!this.isSupported) {\n toast.error('Tu navegador no soporta notificaciones push')\n return false\n }\n\n if (!this.vapidPublicKey) {\n await this.init()\n if (!this.vapidPublicKey) {\n toast.error('No se pudo obtener la clave del servidor')\n return false\n }\n }\n\n try {\n // Request notification permission first\n const permission = await Notification.requestPermission()\n if (permission !== 'granted') {\n toast.error('Permiso de notificaciones denegado')\n return false\n }\n\n // Get service worker registration\n const registration = await navigator.serviceWorker.ready\n\n // Subscribe to push\n const subscription = await registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: this.urlBase64ToUint8Array(this.vapidPublicKey) as BufferSource\n })\n\n this.subscription = subscription\n\n // Send subscription to backend\n const keys = subscription.toJSON().keys as unknown as PushSubscriptionKeys\n await api.post('/push/subscribe', {\n endpoint: subscription.endpoint,\n p256dh: keys.p256dh,\n auth: keys.auth,\n device_type: this.detectDeviceType()\n })\n\n toast.success('🔔 Notificaciones push activadas')\n console.log('✅ Push subscription registered')\n return true\n } catch (error) {\n console.error('Failed to subscribe to push:', error)\n toast.error('Error al activar notificaciones push')\n return false\n }\n }\n\n async unsubscribe(): Promise<boolean> {\n if (!this.subscription) {\n return true\n }\n\n try {\n // Unsubscribe from push manager\n await this.subscription.unsubscribe()\n\n // Remove from backend\n await api.post('/push/unsubscribe', {\n endpoint: this.subscription.endpoint\n })\n\n this.subscription = null\n toast.success('Notificaciones push desactivadas')\n return true\n } catch (error) {\n console.error('Failed to unsubscribe:', error)\n toast.error('Error al desactivar notificaciones')\n return false\n }\n }\n\n async testNotification(): Promise<void> {\n try {\n await api.post('/push/test')\n toast.success('Notificación de prueba enviada')\n } catch (error) {\n console.error('Failed to send test notification:', error)\n toast.error('Error al enviar notificación de prueba')\n }\n }\n\n isSubscribed(): boolean {\n return this.subscription !== null\n }\n\n getSupported(): boolean {\n return this.isSupported\n }\n\n private urlBase64ToUint8Array(base64String: string): Uint8Array {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4)\n const base64 = (base64String + padding)\n .replace(/-/g, '+')\n .replace(/_/g, '/')\n\n const rawData = window.atob(base64)\n const outputArray = new Uint8Array(rawData.length)\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i)\n }\n return outputArray\n }\n\n private detectDeviceType(): string {\n const userAgent = navigator.userAgent.toLowerCase()\n \n if (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent)) {\n return 'mobile'\n }\n \n if (/electron/i.test(userAgent)) {\n return 'desktop'\n }\n \n return 'web'\n }\n}\n\nexport const pushService = new PushNotificationService()\n","import { AxiosError } from 'axios'\nimport { toast } from 'sonner'\n\nexport function handleServerError(error: unknown) {\n // eslint-disable-next-line no-console\n console.log(error)\n\n let errMsg = 'Something went wrong!'\n\n if (\n error &&\n typeof error === 'object' &&\n 'status' in error &&\n Number(error.status) === 204\n ) {\n errMsg = 'Content not found.'\n }\n\n if (error instanceof AxiosError) {\n errMsg = error.response?.data?.message || error.response?.data?.title || error.message\n }\n\n toast.error(errMsg)\n}\n","import * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\n\nconst Accordion = AccordionPrimitive.Root\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(\"border-b\", className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot='alert'\n role='alert'\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-title'\n className={cn(\n 'col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-description'\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean\n }) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='button'\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","import * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cn } from '../../lib/utils'\nimport { buttonVariants } from './button'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot='alert-dialog' {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot='alert-dialog-trigger' {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot='alert-dialog-portal' {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot='alert-dialog-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot='alert-dialog-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-dialog-header'\n className={cn('flex flex-col gap-2 text-center sm:text-start', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-dialog-footer'\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot='alert-dialog-title'\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot='alert-dialog-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: 'outline' }), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n","import * as React from 'react'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { cn } from '../../lib/utils'\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot='avatar'\n className={cn(\n 'relative flex size-8 shrink-0 overflow-hidden rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot='avatar-image'\n className={cn('aspect-square size-full object-cover', className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot='avatar-fallback'\n className={cn(\n 'bg-muted flex size-full items-center justify-center rounded-full',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { cn } from '../../lib/utils'\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',\n {\n variants: {\n variant: {\n default:\n 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',\n destructive:\n 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'span'\n\n return (\n <Comp\n data-slot='badge'\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import * as React from 'react'\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from 'lucide-react'\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker'\nimport { cn } from '../../lib/utils'\nimport { Button, buttonVariants } from './button'\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant']\n}) {\n const defaultClassNames = getDefaultClassNames()\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn(\n 'flex gap-4 flex-col md:flex-row relative',\n defaultClassNames.months\n ),\n month: cn('flex flex-col w-full gap-4', defaultClassNames.month),\n nav: cn(\n 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',\n defaultClassNames.nav\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_previous\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_next\n ),\n month_caption: cn(\n 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',\n defaultClassNames.month_caption\n ),\n dropdowns: cn(\n 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',\n defaultClassNames.dropdowns\n ),\n dropdown_root: cn(\n 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',\n defaultClassNames.dropdown_root\n ),\n dropdown: cn(\n 'absolute bg-popover inset-0 opacity-0',\n defaultClassNames.dropdown\n ),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : 'rounded-md ps-2 pe-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5',\n defaultClassNames.caption_label\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none',\n defaultClassNames.weekday\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn(\n 'select-none w-(--cell-size)',\n defaultClassNames.week_number_header\n ),\n week_number: cn(\n 'text-[0.8rem] select-none text-muted-foreground',\n defaultClassNames.week_number\n ),\n day: cn(\n 'relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',\n defaultClassNames.day\n ),\n range_start: cn(\n 'rounded-l-md bg-accent',\n defaultClassNames.range_start\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',\n defaultClassNames.today\n ),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside\n ),\n disabled: cn(\n 'text-muted-foreground opacity-50',\n defaultClassNames.disabled\n ),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot='calendar'\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n )\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return (\n <ChevronLeftIcon className={cn('size-4', className)} {...props} />\n )\n }\n\n if (orientation === 'right') {\n return (\n <ChevronRightIcon\n className={cn('size-4', className)}\n {...props}\n />\n )\n }\n\n return (\n <ChevronDownIcon className={cn('size-4', className)} {...props} />\n )\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className='flex size-(--cell-size) items-center justify-center text-center'>\n {children}\n </div>\n </td>\n )\n },\n ...components,\n }}\n {...props}\n />\n )\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames()\n\n const ref = React.useRef<HTMLButtonElement>(null)\n React.useEffect(() => {\n if (modifiers.focused) ref.current?.focus()\n }, [modifiers.focused])\n\n return (\n <Button\n ref={ref}\n variant='ghost'\n size='icon'\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Calendar, CalendarDayButton }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Card({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card'\n className={cn(\n 'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-header'\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-title'\n className={cn('leading-none font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-action'\n className={cn(\n 'col-start-2 row-span-2 row-start-1 self-start justify-self-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-content'\n className={cn('px-6', className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-footer'\n className={cn('flex items-center px-6 [.border-t]:pt-6', className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n","import * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { CheckIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Checkbox({\n className,\n ...props\n}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot='checkbox'\n className={cn(\n 'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot='checkbox-indicator'\n className='flex items-center justify-center text-current transition-none'\n >\n <CheckIcon className='size-3.5' />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n","import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'\n\nfunction Collapsible({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot='collapsible' {...props} />\n}\n\nfunction CollapsibleTrigger({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return (\n <CollapsiblePrimitive.CollapsibleTrigger\n data-slot='collapsible-trigger'\n {...props}\n />\n )\n}\n\nfunction CollapsibleContent({\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return (\n <CollapsiblePrimitive.CollapsibleContent\n data-slot='collapsible-content'\n {...props}\n />\n )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent }\n","'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { XIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot='dialog' {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot='dialog-trigger' {...props} />\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot='dialog-portal' {...props} />\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot='dialog-close' {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot='dialog-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal data-slot='dialog-portal'>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot='dialog-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot='dialog-close'\n className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className='sr-only'>Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-header'\n className={cn('flex flex-col gap-2 text-center sm:text-start', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-footer'\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot='dialog-title'\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot='dialog-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import * as React from 'react'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { SearchIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from './dialog'\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot='command'\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className='sr-only'>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('overflow-hidden p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot='command-input-wrapper'\n className='flex h-10 items-center gap-2 border-b px-3'\n >\n <SearchIcon className='size-4 shrink-0 opacity-50' />\n <CommandPrimitive.Input\n data-slot='command-input'\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot='command-list'\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot='command-empty'\n className='py-6 text-center text-sm'\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot='command-group'\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot='command-separator'\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot='command-item'\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='command-shortcut'\n className={cn(\n 'text-muted-foreground ms-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","import * as React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot='dropdown-menu' {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot='dropdown-menu-portal' {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot='dropdown-menu-trigger'\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot='dropdown-menu-content'\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot='dropdown-menu-group' {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: 'default' | 'destructive'\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot='dropdown-menu-item'\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot='dropdown-menu-checkbox-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className='size-4' />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot='dropdown-menu-radio-group'\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot='dropdown-menu-radio-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className='pointer-events-none absolute start-2 flex size-3.5 items-center justify-center'>\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className='size-2 fill-current' />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot='dropdown-menu-label'\n data-inset={inset}\n className={cn(\n 'px-2 py-1.5 text-sm font-medium data-[inset]:ps-8',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot='dropdown-menu-separator'\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='dropdown-menu-shortcut'\n className={cn(\n 'text-muted-foreground ms-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot='dropdown-menu-sub' {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot='dropdown-menu-sub-trigger'\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:ps-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className='ms-auto size-4' />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot='dropdown-menu-sub-content'\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as LabelPrimitive from '@radix-ui/react-label'\nimport { cn } from '../../lib/utils'\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot='label'\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n","import * as React from 'react'\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form'\nimport * as LabelPrimitive from '@radix-ui/react-label'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../../lib/utils'\nimport { Label } from './label'\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>')\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot='form-item'\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n data-slot='form-label'\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n data-slot='form-control'\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n data-slot='form-description'\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? '') : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n data-slot='form-message'\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n )\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n}\n","import { useRef, useState, useEffect } from 'react'\nimport { Button } from './button'\nimport { Label } from './label'\nimport { api } from '../../lib/api'\nimport { Image as ImageIcon, Loader2, X } from 'lucide-react'\nimport { toast } from 'sonner'\nimport { cn } from '../../lib/utils'\n\ninterface ImageUploadProps {\n value?: string | string[]\n onChange: (url: string | string[]) => void\n label?: string\n disabled?: boolean\n multiple?: boolean\n className?: string\n}\n\nexport function ImageUpload({ value, onChange, label = 'Imagen', disabled, multiple = false, className }: ImageUploadProps) {\n const fileInputRef = useRef<HTMLInputElement>(null)\n const [uploading, setUploading] = useState(false)\n const [imageUrls, setImageUrls] = useState<string[]>([])\n\n // Sync state with props\n useEffect(() => {\n if (Array.isArray(value)) {\n setImageUrls(value)\n } else if (value) {\n setImageUrls([value])\n } else {\n setImageUrls([])\n }\n }, [value])\n\n // Handle file selection\n const handleFileChange = async (e: React.ChangeEvent<HTMLInputElement>) => {\n const files = e.target.files\n if (!files || files.length === 0) return\n\n const validFiles: File[] = []\n for (let i = 0; i < files.length; i++) {\n const file = files[i]\n if (!file.type.startsWith('image/')) {\n toast.error(`Archivo ${file.name} no es una imagen válida`)\n continue\n }\n if (file.size > 5 * 1024 * 1024) {\n toast.error(`Imagen ${file.name} supera los 5MB`)\n continue\n }\n validFiles.push(file)\n }\n\n if (validFiles.length > 0) {\n await uploadImages(validFiles)\n }\n }\n\n const uploadImages = async (files: File[]) => {\n setUploading(true)\n try {\n // Upload parallel\n const promises = files.map(async (file) => {\n const formData = new FormData()\n formData.append('file', file)\n\n try {\n const res = await api.post('/upload', formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n })\n return res.data.url\n } catch (err) {\n console.error(\"Single file upload failed\", err)\n return null\n }\n })\n\n const results = await Promise.all(promises)\n const newUrls = results.filter(url => url !== null)\n\n if (newUrls.length > 0) {\n if (multiple) {\n const updated = [...imageUrls, ...newUrls]\n onChange(updated)\n } else {\n onChange(newUrls[0])\n }\n toast.success(`${newUrls.length} imagen(es) cargada(s)`)\n }\n\n } catch (error) {\n console.error('Upload Error:', error)\n toast.error('Error al subir imágenes')\n } finally {\n setUploading(false)\n if (fileInputRef.current) fileInputRef.current.value = ''\n }\n }\n\n const handleRemove = (urlToRemove: string) => {\n if (multiple) {\n const updated = imageUrls.filter(url => url !== urlToRemove)\n onChange(updated)\n } else {\n onChange('')\n }\n }\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <Label>{label}</Label>\n\n {/* Grid of existing images */}\n {imageUrls.length > 0 && (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4 mb-4\">\n {imageUrls.map((url, index) => (\n <div key={index} className=\"relative group rounded-lg overflow-hidden border bg-background aspect-square flex items-center justify-center bg-gray-50 dark:bg-gray-800/50\">\n <img\n src={url}\n alt={`Image ${index + 1}`}\n className=\"h-full w-full object-contain p-1\"\n />\n {!disabled && (\n <div className=\"absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <Button\n type=\"button\"\n variant=\"destructive\"\n size=\"icon\"\n className=\"h-6 w-6 rounded-full\"\n onClick={() => handleRemove(url)}\n >\n <X className=\"h-3 w-3\" />\n </Button>\n </div>\n )}\n </div>\n ))}\n </div>\n )}\n\n {/* Upload Button Area - Show if multiple or if no image selected yet */}\n {(!disabled && (multiple || imageUrls.length === 0)) && (\n <div\n className={`\n border-2 border-dashed border-muted-foreground/25 rounded-lg \n flex flex-col items-center justify-center p-6 gap-2 \n transition-all hover:bg-accent/50 cursor-pointer hover:border-primary/50\n ${uploading ? 'opacity-50 pointer-events-none' : ''}\n `}\n onClick={() => fileInputRef.current?.click()}\n >\n {uploading ? (\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n ) : (\n <ImageIcon className=\"h-8 w-8 text-muted-foreground\" />\n )}\n\n <span className=\"text-sm text-muted-foreground font-medium\">\n {uploading ? 'Subiendo...' : multiple ? 'Click para agregar imágenes' : 'Click para subir imagen'}\n </span>\n <p className=\"text-xs text-muted-foreground/70\">\n Soporta: JPG, PNG, WEBP (Max 5MB)\n </p>\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept=\"image/*\"\n multiple={multiple}\n onChange={handleFileChange}\n disabled={disabled || uploading}\n />\n </div>\n )}\n </div>\n )\n}\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot='input'\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n","import * as React from 'react'\nimport { OTPInput, OTPInputContext } from 'input-otp'\nimport { MinusIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction InputOTP({\n className,\n containerClassName,\n ...props\n}: React.ComponentProps<typeof OTPInput> & {\n containerClassName?: string\n}) {\n return (\n <OTPInput\n data-slot='input-otp'\n containerClassName={cn(\n 'flex items-center gap-2 has-disabled:opacity-50',\n containerClassName\n )}\n className={cn('disabled:cursor-not-allowed', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='input-otp-group'\n className={cn('flex items-center', className)}\n {...props}\n />\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n index: number\n}) {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot='input-otp-slot'\n data-active={isActive}\n className={cn(\n 'data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]',\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>\n <div className='animate-caret-blink bg-foreground h-4 w-px duration-1000' />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot='input-otp-separator' role='separator' {...props}>\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n","import * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport { cn } from '../../lib/utils'\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot='popover' {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot='popover-content'\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot='popover-anchor' {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","import * as React from \"react\"\nimport { Check, ChevronsUpDown, X } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"./popover\"\nimport { Badge } from \"./badge\"\n\nexport type Option = {\n label: string\n value: string\n icon?: React.ComponentType<{ className?: string }>\n}\n\ninterface MultiSelectProps {\n options: Option[]\n selected: string[]\n onChange: (selected: string[]) => void\n placeholder?: string\n className?: string\n}\n\nexport function MultiSelect({\n options,\n selected,\n onChange,\n placeholder = \"Select options...\",\n className,\n}: MultiSelectProps) {\n const [open, setOpen] = React.useState(false)\n\n const handleUnselect = (item: string) => {\n onChange(selected.filter((i) => i !== item))\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <div\n role=\"combobox\"\n aria-expanded={open}\n className={cn(\n \"flex w-full justify-between items-center rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer hover:bg-accent hover:text-accent-foreground\",\n \"h-auto min-h-10\",\n className\n )}\n onClick={() => setOpen(!open)}\n >\n <div className=\"flex flex-wrap gap-1\">\n {selected.length > 0 ? (\n selected.map((itemValue) => {\n const item = options.find((i) => i.value === itemValue)\n if (!item) return null\n return (\n <Badge\n variant=\"secondary\"\n key={item.value}\n className=\"mr-1 mb-1\"\n onClick={(e) => {\n e.stopPropagation()\n handleUnselect(itemValue)\n }}\n >\n {item.icon && <item.icon className=\"mr-1 h-3 w-3\" />}\n {item.label}\n <button\n className=\"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\"\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n handleUnselect(itemValue)\n }\n }}\n onMouseDown={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n handleUnselect(itemValue)\n }}\n >\n <X className=\"h-3 w-3 text-muted-foreground hover:text-foreground\" />\n </button>\n </Badge>\n )\n })\n ) : (\n <span className=\"text-muted-foreground font-normal\">{placeholder}</span>\n )}\n </div>\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </div>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\">\n <Command>\n <CommandInput placeholder=\"Search...\" />\n <CommandEmpty>No item found.</CommandEmpty>\n <CommandList>\n <CommandGroup className=\"max-h-64 overflow-auto\">\n {options.map((option) => (\n <CommandItem\n key={option.value}\n onSelect={() => {\n if (selected.includes(option.value)) {\n onChange(selected.filter((item) => item !== option.value))\n } else {\n onChange([...selected, option.value])\n }\n setOpen(true)\n }}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n selected.includes(option.value)\n ? \"opacity-100\"\n : \"opacity-0\"\n )}\n />\n {option.icon && <option.icon className=\"mr-2 h-4 w-4\" />}\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n","import * as React from 'react'\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'\nimport { cn } from '../../lib/utils'\n\ninterface ScrollAreaProps\n extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {\n orientation?: 'vertical' | 'horizontal'\n}\n\nconst ScrollArea = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.Root>,\n ScrollAreaProps & { type?: 'auto' | 'always' | 'scroll' | 'hover' }\n>(({ className, children, orientation = 'vertical', type = 'hover', ...props }, ref) => (\n <ScrollAreaPrimitive.Root\n ref={ref}\n data-slot='scroll-area'\n type={type}\n className={cn('relative overflow-hidden', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot='scroll-area-viewport'\n className={cn(\n 'focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1',\n orientation === 'horizontal' && 'overflow-x-auto!'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation={orientation} />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n))\nScrollArea.displayName = 'ScrollArea'\n\nconst ScrollBar = React.forwardRef<\n React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n data-slot='scroll-area-scrollbar'\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n orientation === 'vertical' &&\n 'h-full w-3 border-l border-l-transparent',\n orientation === 'horizontal' &&\n 'h-3 flex-col border-t border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot='scroll-area-thumb'\n className='bg-foreground/35 hover:bg-foreground/50 relative flex-1 rounded-full transition-colors'\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n))\nScrollBar.displayName = 'ScrollBar'\n\nexport { ScrollArea, ScrollBar }\n","import * as React from \"react\"\nimport { CheckIcon, ChevronsUpDown } from \"lucide-react\"\nimport * as RPNInput from \"react-phone-number-input\"\nimport flags from \"react-phone-number-input/flags\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"./button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\"\nimport { Input } from \"./input\"\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"./popover\"\nimport { ScrollArea } from \"./scroll-area\"\n\ntype PhoneInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"onChange\" | \"value\" | \"ref\"\n> &\n Omit<RPNInput.Props<typeof RPNInput.default>, \"onChange\"> & {\n onChange?: (value: RPNInput.Value) => void\n }\n\nconst PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps> =\n React.forwardRef<React.ElementRef<typeof RPNInput.default>, PhoneInputProps>(\n ({ className, onChange, ...props }, ref) => {\n return (\n <RPNInput.default\n ref={ref}\n className={cn(\"flex\", className)}\n flagComponent={FlagComponent}\n countrySelectComponent={CountrySelect}\n inputComponent={InputComponent}\n smartCaret={false}\n onChange={(value) => onChange?.(value || (\"\" as RPNInput.Value))}\n {...props}\n />\n )\n }\n )\nPhoneInput.displayName = \"PhoneInput\"\n\nconst InputComponent = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<\"input\">\n>(({ className, ...props }, ref) => (\n <Input\n className={cn(\"rounded-e-lg rounded-s-none\", className)}\n {...props}\n ref={ref}\n />\n))\nInputComponent.displayName = \"InputComponent\"\n\ntype CountryEntry = { label: string; value: RPNInput.Country | undefined }\n\ntype CountrySelectProps = {\n disabled?: boolean\n value: RPNInput.Country\n onChange: (value: RPNInput.Country) => void\n options: CountryEntry[]\n}\n\nconst CountrySelect = ({\n disabled,\n value,\n onChange,\n options,\n}: CountrySelectProps) => {\n const handleSelect = React.useCallback(\n (country: RPNInput.Country) => {\n onChange(country)\n },\n [onChange]\n )\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n type=\"button\"\n variant=\"outline\"\n className={cn(\n \"flex gap-1 rounded-e-none rounded-s-lg border-r-0 px-3 focus:z-10\"\n )}\n disabled={disabled}\n >\n <FlagComponent country={value} countryName={value} />\n <ChevronsUpDown\n className={cn(\n \"-mr-2 size-4 opacity-50\",\n disabled ? \"hidden\" : \"opacity-100\"\n )}\n />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[300px] p-0\">\n <Command>\n <CommandInput placeholder=\"Buscar país...\" />\n <CommandList>\n <ScrollArea className=\"h-72\">\n <CommandEmpty>País no encontrado.</CommandEmpty>\n <CommandGroup>\n {options\n .filter((x) => x.value)\n .map((option) => (\n <CommandItem\n className=\"gap-2\"\n key={option.value}\n onSelect={() => handleSelect(option.value!)}\n >\n <FlagComponent\n country={option.value!}\n countryName={option.label}\n />\n <span className=\"flex-1 text-sm\">{option.label}</span>\n {option.value && (\n <span className=\"text-sm text-foreground/50\">\n {`+${RPNInput.getCountryCallingCode(option.value)}`}\n </span>\n )}\n <CheckIcon\n className={cn(\n \"ml-auto size-4\",\n option.value === value ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </ScrollArea>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n\nconst FlagComponent = ({ country, countryName }: RPNInput.FlagProps) => {\n const Flag = flags[country]\n\n return (\n <span className=\"flex h-5 w-7 shrink-0 items-center justify-center overflow-hidden rounded-sm bg-foreground/10 [&_svg]:h-full [&_svg]:w-full [&_svg]:object-cover\">\n {Flag && <Flag title={countryName} />}\n </span>\n )\n}\n\nexport { PhoneInput }\n","import * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../lib/utils\"\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full bg-primary/20\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"h-full bg-primary transition-transform duration-300 ease-out\"\n style={{\n width: '100%',\n transform: `translateX(-${100 - (value || 0)}%)`\n }}\n />\n </ProgressPrimitive.Root>\n))\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n","import * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { CircleIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot='radio-group'\n className={cn('grid gap-3', className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot='radio-group-item'\n className={cn(\n 'border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot='radio-group-indicator'\n className='relative flex items-center justify-center'\n >\n <CircleIcon className='fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2' />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n","import * as React from 'react'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot='select' {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot='select-group' {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot='select-value' {...props} />\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className='size-4 opacity-50' />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot='select-content'\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot='select-label'\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className='absolute end-2 flex size-3.5 items-center justify-center'>\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className='size-4' />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot='select-separator'\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot='select-scroll-up-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className='size-4' />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot='select-scroll-down-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className='size-4' />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n","import * as React from 'react'\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport { cn } from '../../lib/utils'\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot='separator'\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n","import * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { XIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot='sheet' {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot='sheet-trigger' {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot='sheet-close' {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot='sheet-portal' {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot='sheet-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left'\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot='sheet-content'\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-end data-[state=open]:slide-in-from-end inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-start data-[state=open]:slide-in-from-start inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none'>\n <XIcon className='size-4' />\n <span className='sr-only'>Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sheet-header'\n className={cn('flex flex-col gap-1.5 p-4', className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sheet-footer'\n className={cn('mt-auto flex flex-col gap-2 p-4', className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot='sheet-title'\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot='sheet-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import * as React from 'react'\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener('change', onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener('change', onChange)\n }, [])\n\n return !!isMobile\n}\n","import { cn } from '../../lib/utils'\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='skeleton'\n className={cn('bg-accent animate-pulse rounded-md', className)}\n {...props}\n />\n )\n}\n\nexport { Skeleton }\n","'use client'\n\nimport * as React from 'react'\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport { cn } from '../../lib/utils'\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot='tooltip-provider'\n delayDuration={delayDuration}\n {...props}\n />\n )\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot='tooltip' {...props} />\n </TooltipProvider>\n )\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot='tooltip-trigger' {...props} />\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot='tooltip-content'\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className='bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]' />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { PanelLeftIcon } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { useIsMobile } from '../../hooks/use-mobile'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from './sheet'\nimport { Skeleton } from './skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from './tooltip'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '3rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n\n return context\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}) {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = React.useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = React.useCallback(() => {\n return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open)\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n data-slot='sidebar-wrapper'\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh w-full overflow-hidden',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n}\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'offcanvas',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar()\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot='sidebar'\n className={cn(\n 'bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar='sidebar'\n data-slot='sidebar'\n data-mobile='true'\n className='bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden'\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className='sr-only'>\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className='flex h-full w-full flex-col'>{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className='group peer text-sidebar-foreground hidden md:block'\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot='sidebar'\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot='sidebar-gap'\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot='sidebar-container'\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[inset-inline,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'start-0 group-data-[collapsible=offcanvas]:-start-[calc(var(--sidebar-width))]'\n : 'end-0 group-data-[collapsible=offcanvas]:-end-[calc(var(--sidebar-width))]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s',\n className\n )}\n {...props}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n className='bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm'\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <Button\n data-sidebar='trigger'\n data-slot='sidebar-trigger'\n variant='ghost'\n size='icon'\n className={cn('size-7', className)}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className='sr-only'>Toggle Sidebar</span>\n </Button>\n )\n}\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n data-sidebar='rail'\n data-slot='sidebar-rail'\n aria-label='Toggle Sidebar'\n tabIndex={-1}\n onClick={toggleSidebar}\n title='Toggle Sidebar'\n className={cn(\n 'hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-end-4 group-data-[side=right]:start-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:start-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-end-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-start-2',\n\n // RTL support\n 'rtl:translate-x-1/2',\n 'rtl:in-data-[side=left]:cursor-e-resize rtl:in-data-[side=right]:cursor-w-resize',\n 'rtl:[[data-side=left][data-state=collapsed]_&]:cursor-w-resize rtl:[[data-side=right][data-state=collapsed]_&]:cursor-e-resize',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInset({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-inset'\n className={cn(\n 'bg-background relative flex w-full flex-1 flex-col overflow-y-auto',\n 'md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarInput({\n className,\n ...props\n}: React.ComponentProps<typeof Input>) {\n return (\n <Input\n data-slot='sidebar-input'\n data-sidebar='input'\n className={cn('bg-background h-8 w-full shadow-none', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-header'\n data-sidebar='header'\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-footer'\n data-sidebar='footer'\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot='sidebar-separator'\n data-sidebar='separator'\n className={cn('bg-sidebar-border mx-2 w-auto', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-content'\n data-sidebar='content'\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-group'\n data-sidebar='group'\n className={cn('relative flex w-full min-w-0 flex-col p-2', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot='sidebar-group-label'\n data-sidebar='group-label'\n className={cn(\n 'text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupAction({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='sidebar-group-action'\n data-sidebar='group-action'\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute end-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarGroupContent({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-group-content'\n data-sidebar='group-content'\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='sidebar-menu'\n data-sidebar='menu'\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot='sidebar-menu-item'\n data-sidebar='menu-item'\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pe-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar()\n\n const button = (\n <Comp\n data-slot='sidebar-menu-button'\n data-sidebar='menu-button'\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side='right'\n align='center'\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: React.ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot='sidebar-menu-action'\n data-sidebar='menu-action'\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute end-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:absolute after:-inset-2 md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuBadge({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='sidebar-menu-badge'\n data-sidebar='menu-badge'\n className={cn(\n 'text-sidebar-foreground pointer-events-none absolute end-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none',\n 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: React.ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot='sidebar-menu-skeleton'\n data-sidebar='menu-skeleton'\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className='size-4 rounded-md'\n data-sidebar='menu-skeleton-icon'\n />\n )}\n <Skeleton\n className='h-4 max-w-(--skeleton-width) flex-1'\n data-sidebar='menu-skeleton-text'\n style={\n {\n '--skeleton-width': width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n}\n\nfunction SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-slot='sidebar-menu-sub'\n data-sidebar='menu-sub'\n className={cn(\n 'border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-s px-2.5 py-0.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubItem({\n className,\n ...props\n}: React.ComponentProps<'li'>) {\n return (\n <li\n data-slot='sidebar-menu-sub-item'\n data-sidebar='menu-sub-item'\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\nfunction SidebarMenuSubButton({\n asChild = false,\n size = 'md',\n isActive = false,\n className,\n ...props\n}: React.ComponentProps<'a'> & {\n asChild?: boolean\n size?: 'sm' | 'md'\n isActive?: boolean\n}) {\n const Comp = asChild ? Slot : 'a'\n\n return (\n <Comp\n data-slot='sidebar-menu-sub-button'\n data-sidebar='menu-sub-button'\n data-size={size}\n data-active={isActive}\n className={cn(\n 'text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-inherit',\n 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n","import { createContext, useContext, useEffect, useState, useMemo } from 'react'\nimport { getCookie, setCookie, removeCookie } from '@/lib/cookies'\n\ntype Theme = 'dark' | 'light' | 'system'\ntype ResolvedTheme = Exclude<Theme, 'system'>\n\nconst DEFAULT_THEME = 'system'\nconst THEME_COOKIE_NAME = 'vite-ui-theme'\nconst THEME_COOKIE_MAX_AGE = 60 * 60 * 24 * 365 // 1 year\n\ntype ThemeProviderProps = {\n children: React.ReactNode\n defaultTheme?: Theme\n storageKey?: string\n}\n\ntype ThemeProviderState = {\n defaultTheme: Theme\n resolvedTheme: ResolvedTheme\n theme: Theme\n setTheme: (theme: Theme) => void\n resetTheme: () => void\n}\n\nconst initialState: ThemeProviderState = {\n defaultTheme: DEFAULT_THEME,\n resolvedTheme: 'light',\n theme: DEFAULT_THEME,\n setTheme: () => null,\n resetTheme: () => null,\n}\n\nconst ThemeContext = createContext<ThemeProviderState>(initialState)\n\nexport function ThemeProvider({\n children,\n defaultTheme = DEFAULT_THEME,\n storageKey = THEME_COOKIE_NAME,\n ...props\n}: ThemeProviderProps) {\n const [theme, _setTheme] = useState<Theme>(\n () => (getCookie(storageKey) as Theme) || defaultTheme\n )\n\n // Optimized: Memoize the resolved theme calculation to prevent unnecessary re-computations\n const resolvedTheme = useMemo((): ResolvedTheme => {\n if (theme === 'system') {\n return window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light'\n }\n return theme as ResolvedTheme\n }, [theme])\n\n useEffect(() => {\n const root = window.document.documentElement\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n\n const applyTheme = (currentResolvedTheme: ResolvedTheme) => {\n root.classList.remove('light', 'dark') // Remove existing theme classes\n root.classList.add(currentResolvedTheme) // Add the new theme class\n }\n\n const handleChange = () => {\n if (theme === 'system') {\n const systemTheme = mediaQuery.matches ? 'dark' : 'light'\n applyTheme(systemTheme)\n }\n }\n\n applyTheme(resolvedTheme)\n\n mediaQuery.addEventListener('change', handleChange)\n\n return () => mediaQuery.removeEventListener('change', handleChange)\n }, [theme, resolvedTheme])\n\n const setTheme = (theme: Theme) => {\n setCookie(storageKey, theme, THEME_COOKIE_MAX_AGE)\n _setTheme(theme)\n }\n\n const resetTheme = () => {\n removeCookie(storageKey)\n _setTheme(DEFAULT_THEME)\n }\n\n const contextValue = {\n defaultTheme,\n resolvedTheme,\n resetTheme,\n theme,\n setTheme,\n }\n\n return (\n <ThemeContext value={contextValue} {...props}>\n {children}\n </ThemeContext>\n )\n}\n\n// eslint-disable-next-line react-refresh/only-export-components\nexport const useTheme = () => {\n const context = useContext(ThemeContext)\n\n if (!context) throw new Error('useTheme must be used within a ThemeProvider')\n\n return context\n}\n","import { Toaster as Sonner, type ToasterProps } from 'sonner'\nimport { useTheme } from '../../context/theme-provider'\n\nexport function Toaster({ ...props }: ToasterProps) {\n const { theme = 'system' } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className='toaster group [&_div[data-content]]:w-full'\n toastOptions={{\n classNames: {\n toast: 'rounded-lg border bg-background shadow-lg',\n title: 'font-semibold',\n description: 'text-sm text-muted-foreground',\n actionButton: 'bg-primary text-primary-foreground',\n cancelButton: 'bg-muted text-muted-foreground',\n },\n }}\n style={\n {\n '--normal-bg': 'var(--popover)',\n '--normal-text': 'var(--popover-foreground)',\n '--normal-border': 'var(--border)',\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n","import * as React from 'react'\nimport * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { cn } from '../../lib/utils'\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot='switch'\n className={cn(\n 'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot='switch-thumb'\n className={cn(\n 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]'\n )}\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\ninterface TableProps extends React.ComponentProps<'table'> {\n noWrapper?: boolean\n}\n\nfunction Table({ className, noWrapper, ...props }: TableProps) {\n const table = (\n <table\n data-slot='table'\n className={cn('w-full caption-bottom text-sm', className)}\n {...props}\n />\n )\n\n if (noWrapper) {\n return table\n }\n\n return (\n <div\n data-slot='table-container'\n className='relative w-full overflow-x-auto'\n >\n {table}\n </div>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return (\n <thead\n data-slot='table-header'\n className={cn('[&_tr]:border-b', className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return (\n <tbody\n data-slot='table-body'\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot='table-footer'\n className={cn(\n 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot='table-row'\n className={cn(\n 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot='table-head'\n className={cn(\n 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot='table-cell'\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&>[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<'caption'>) {\n return (\n <caption\n data-slot='table-caption'\n className={cn('text-muted-foreground mt-4 text-sm', className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","import * as React from 'react'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cn } from '../../lib/utils'\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot='tabs'\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot='tabs-list'\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot='tabs-trigger'\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot='tabs-content'\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import * as React from 'react'\nimport { cn } from '../../lib/utils'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot='textarea'\n className={cn(\n 'border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n"],"mappings":"m3DAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAoB,EAAO,CAAC,CAiB9B,SAAS,IAAgC,CAGvC,OADY,WAAE,0BAA4B,yBAC/B,QAAQ,YAAa,GAAG,CAAC,QAAQ,OAAQ,GAAG,CASzD,SAAgB,GAAc,EAAqC,EAAwB,CACzF,GAAI,CAAC,EAAU,MAAO,GAGtB,GAAI,EAAS,WAAW,UAAU,EAAI,EAAS,WAAW,WAAW,CACnE,OAAO,EAGT,IAAM,EAAU,IAAuB,CAOvC,OAJI,EAAS,WAAW,YAAY,CAC3B,GAAG,IAAU,IAGf,GAAG,EAAQ,WAA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