diff --git a/.gitignore b/.gitignore index 2679b9b..eda8024 100644 --- a/.gitignore +++ b/.gitignore @@ -1,34 +1,39 @@ -# Dependencies -node_modules -.pnp -.pnp.js - -# Testing -coverage - -# Next.js -.next/ -out/ -build - -# Misc -.DS_Store -*.pem - -# Debug -npm-debug.log* -yarn-debug.log* -pnpm-debug.log* - -# Local env files -.env*.local - -# Vercel -.vercel - -# TypeScript -*.tsbuildinfo -next-env.d.ts - -# Security -server-settings.json +# Dependencies +node_modules +.pnp +.pnp.js + +# Testing +coverage + +# Next.js +.next/ +out/ +build + +# Misc +.DS_Store +*.pem + +# Debug +npm-debug.log* +yarn-debug.log* +pnpm-debug.log* + +# Local env files +.env*.local + +# Vercel +.vercel + +# TypeScript +*.tsbuildinfo +next-env.d.ts + +# Security +server-settings.json +.env +auth-otp.json + +# Local dev +local_Caddyfile diff --git a/app/alerts/page.tsx b/app/alerts/page.tsx index c8c2fd5..78ad5c2 100644 --- a/app/alerts/page.tsx +++ b/app/alerts/page.tsx @@ -1,13 +1,11 @@ 'use client' -import { Sidebar, Header, MobileNav } from '@/components/layout' +import { DashboardLayout } from '@/components/layout/DashboardLayout' import { AlertPanel, useAlerts } from '@/components/alerts' -import { useSidebar } from '@/app/providers' import { RefreshCw } from 'lucide-react' export default function AlertsPage() { - const { isOpen, toggle, close } = useSidebar() - const { regenerateAlerts, dismissAll, unreadCount } = useAlerts() + const { regenerateAlerts, dismissAll } = useAlerts() const handleRegenerateAlerts = () => { regenerateAlerts() @@ -18,41 +16,31 @@ export default function AlertsPage() { } return ( -
- + +
+ {/* Action Buttons */} +
+ -
-
+ +
-
-
- {/* Action Buttons */} -
- - - -
- - {/* Alert Panel */} -
- -
-
-
- - + {/* Alert Panel */} +
+ +
-
+
) } diff --git a/app/api/auth/send/route.ts b/app/api/auth/send/route.ts new file mode 100644 index 0000000..ac024b2 --- /dev/null +++ b/app/api/auth/send/route.ts @@ -0,0 +1,25 @@ +import { NextResponse } from 'next/server'; +import TelegramBot from 'node-telegram-bot-api'; +import { generateOTP, saveOTP } from '@/lib/otp'; + +export async function POST() { + const token = process.env.TELEGRAM_BOT_TOKEN; + const chatId = process.env.TELEGRAM_CHAT_ID; + + if (!token || !chatId) { + console.error("Telegram credentials missing"); + return NextResponse.json({ error: 'Telegram not configured' }, { status: 500 }); + } + + const otp = generateOTP(); + saveOTP(otp); + + const bot = new TelegramBot(token, { polling: false }); + try { + await bot.sendMessage(chatId, `🔐 Your Login Code: ${otp}`); + return NextResponse.json({ success: true }); + } catch (error: any) { + console.error('Telegram Error:', error); + return NextResponse.json({ error: 'Failed to send message: ' + error.message }, { status: 500 }); + } +} diff --git a/app/api/auth/verify/route.ts b/app/api/auth/verify/route.ts new file mode 100644 index 0000000..4b37de1 --- /dev/null +++ b/app/api/auth/verify/route.ts @@ -0,0 +1,24 @@ +import { NextResponse } from 'next/server'; +import { verifyOTP } from '@/lib/otp'; +import { cookies } from 'next/headers'; + +export async function POST(req: Request) { + try { + const { code } = await req.json(); + + if (verifyOTP(code)) { + // Set cookie + cookies().set('auth_token', 'true', { + httpOnly: true, + secure: process.env.NODE_ENV === 'production', + maxAge: 60 * 60 * 24 * 7, // 1 week + path: '/' + }); + return NextResponse.json({ success: true }); + } + + return NextResponse.json({ error: 'Invalid Code' }, { status: 401 }); + } catch (error) { + return NextResponse.json({ error: 'Invalid Request' }, { status: 400 }); + } +} diff --git a/app/api/sync/route.ts b/app/api/sync/route.ts new file mode 100644 index 0000000..705ff56 --- /dev/null +++ b/app/api/sync/route.ts @@ -0,0 +1,17 @@ +import { NextResponse } from 'next/server'; +import { getDatabase, saveDatabase } from '@/lib/server-db'; + +export async function GET() { + const data = getDatabase(); + return NextResponse.json(data); +} + +export async function POST(req: Request) { + try { + const body = await req.json(); + saveDatabase(body); + return NextResponse.json({ success: true }); + } catch (error) { + return NextResponse.json({ error: 'Invalid Data' }, { status: 400 }); + } +} diff --git a/app/budget/page.tsx b/app/budget/page.tsx index 11fa1b8..f4824e3 100644 --- a/app/budget/page.tsx +++ b/app/budget/page.tsx @@ -1,27 +1,12 @@ 'use client' -import { Sidebar, Header, MobileNav } from '@/components/layout' +import { DashboardLayout } from '@/components/layout/DashboardLayout' import { BudgetSection } from '@/components/budget' -import { useSidebar } from '@/app/providers' -import { useAlerts } from '@/components/alerts' export default function BudgetPage() { - const { isOpen, close, toggle } = useSidebar() - const { unreadCount } = useAlerts() - return ( -
- - -
-
- -
- -
- - -
-
+ + + ) } diff --git a/app/cards/page.tsx b/app/cards/page.tsx index 489ddfa..c74ffca 100644 --- a/app/cards/page.tsx +++ b/app/cards/page.tsx @@ -1,27 +1,12 @@ 'use client'; -import { Sidebar, Header, MobileNav } from '@/components/layout'; +import { DashboardLayout } from '@/components/layout/DashboardLayout'; import { CardSection } from '@/components/cards'; -import { useSidebar } from '@/app/providers'; -import { useAlerts } from '@/components/alerts'; export default function CardsPage() { - const { isOpen, toggle, close } = useSidebar(); - const { unreadCount } = useAlerts(); - return ( -
- - -
-
- -
- -
-
- - -
+ + + ); } diff --git a/app/debts/page.tsx b/app/debts/page.tsx index 270b5f9..87f3f27 100644 --- a/app/debts/page.tsx +++ b/app/debts/page.tsx @@ -1,32 +1,12 @@ 'use client' -import { Sidebar, Header, MobileNav } from '@/components/layout' +import { DashboardLayout } from '@/components/layout/DashboardLayout' import { DebtSection } from '@/components/debts' -import { useSidebar } from '@/app/providers' -import { useAlerts } from '@/components/alerts' export default function DebtsPage() { - const { isOpen, close, open } = useSidebar() - const { unreadCount } = useAlerts() - return ( -
- {/* Sidebar */} - - - {/* Main content */} -
- {/* Header */} -
- - {/* Page content */} -
- -
-
- - {/* Mobile Navigation */} - -
+ + + ) } diff --git a/app/incomes/page.tsx b/app/incomes/page.tsx new file mode 100644 index 0000000..40392be --- /dev/null +++ b/app/incomes/page.tsx @@ -0,0 +1,165 @@ +'use client' + +import { useState } from 'react' +import { useFinanzasStore } from '@/lib/store' +import { Plus, Trash2, TrendingUp, DollarSign } from 'lucide-react' +import { format } from 'date-fns' +import { es } from 'date-fns/locale' +import { DashboardLayout } from '@/components/layout/DashboardLayout' + +export default function IncomesPage() { + const incomes = useFinanzasStore((state) => state.incomes) || [] + const addIncome = useFinanzasStore((state) => state.addIncome) + const removeIncome = useFinanzasStore((state) => state.removeIncome) + + const [newIncome, setNewIncome] = useState({ + amount: '', + description: '', + category: 'salary' as const, + }) + + const handleAdd = () => { + if (!newIncome.amount || !newIncome.description) return + + addIncome({ + amount: parseFloat(newIncome.amount), + description: newIncome.description, + category: newIncome.category, + date: new Date().toISOString(), + }) + setNewIncome({ amount: '', description: '', category: 'salary' }) + } + + const totalIncomes = incomes.reduce((acc, curr) => acc + curr.amount, 0) + + return ( + +
+
+

+ Ingresos +

+
+

Total Acumulado

+

+ ${totalIncomes.toLocaleString()} +

+
+
+ +
+ {/* Formulario */} +
+
+

Nuevo Ingreso

+
+
+
+ + + setNewIncome({ ...newIncome, description: e.target.value }) + } + className="w-full bg-slate-700 border-slate-600 border rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-2 focus:ring-emerald-500" + /> +
+
+ +
+ + + setNewIncome({ ...newIncome, amount: e.target.value }) + } + className="w-full pl-9 bg-slate-700 border-slate-600 border rounded-lg px-3 py-2 text-white focus:outline-none focus:ring-2 focus:ring-emerald-500" + /> +
+
+
+ + +
+ +
+
+ + {/* Lista */} +
+
+

Historial de Ingresos

+
+
+ {incomes.length === 0 ? ( +

+ No hay ingresos registrados aún. +

+ ) : ( +
+ {incomes + .sort( + (a, b) => + new Date(b.date).getTime() - new Date(a.date).getTime() + ) + .map((income) => ( +
+
+

+ {income.description} +

+

+ {income.category} •{' '} + {format(new Date(income.date), "d 'de' MMMM", { + locale: es, + })} +

+
+
+ + +${income.amount.toLocaleString()} + + +
+
+ ))} +
+ )} +
+
+
+
+
+ ) +} diff --git a/app/login/page.tsx b/app/login/page.tsx new file mode 100644 index 0000000..529f90d --- /dev/null +++ b/app/login/page.tsx @@ -0,0 +1,115 @@ +'use client'; + +import { useState } from 'react'; +import { useRouter } from 'next/navigation'; +import { Lock, Send, Loader2 } from 'lucide-react'; + +export default function LoginPage() { + const [step, setStep] = useState<'initial' | 'verify'>('initial'); + const [code, setCode] = useState(''); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(''); + const router = useRouter(); + + const sendCode = async () => { + setLoading(true); + setError(''); + try { + const res = await fetch('/api/auth/send', { method: 'POST' }); + const data = await res.json(); + if (!res.ok) throw new Error(data.error || 'Failed to send code'); + setStep('verify'); + } catch (err: any) { + setError(err.message); + } finally { + setLoading(false); + } + }; + + const verifyCode = async () => { + setLoading(true); + setError(''); + try { + const res = await fetch('/api/auth/verify', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ code }) + }); + const data = await res.json(); + if (!res.ok) throw new Error(data.error || 'Invalid code'); + + // Redirect + router.push('/'); + router.refresh(); + } catch (err: any) { + setError(err.message); + } finally { + setLoading(false); + } + }; + + return ( +
+
+
+
+ +
+

Secure Access

+

+ Finanzas Personales +

+
+ + {error && ( +
+ {error} +
+ )} + + {step === 'initial' ? ( +
+

+ Click below to receive a login code via Telegram. +

+ +
+ ) : ( +
+

+ Enter the 6-digit code sent to your Telegram. +

+ setCode(e.target.value)} + placeholder="123456" + className="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-3 text-center text-2xl tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-500" + maxLength={6} + /> + + +
+ )} +
+
+ ); +} diff --git a/app/page.tsx b/app/page.tsx index cba8300..f5601c7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,25 +1,21 @@ 'use client' import { useEffect, useState } from 'react' -import { Sidebar, Header, MobileNav } from '@/components/layout' import { SummarySection, QuickActions, RecentActivity } from '@/components/dashboard' -import { useSidebar } from '@/app/providers' import { useFinanzasStore } from '@/lib/store' import { AlertBanner, useAlerts } from '@/components/alerts' import { AddDebtModal } from '@/components/modals/AddDebtModal' import { AddCardModal } from '@/components/modals/AddCardModal' import { AddPaymentModal } from '@/components/modals/AddPaymentModal' +import { DashboardLayout } from '@/components/layout/DashboardLayout' export default function Home() { - // Sidebar control - const sidebar = useSidebar() - // Datos del store const markAlertAsRead = useFinanzasStore((state) => state.markAlertAsRead) const deleteAlert = useFinanzasStore((state) => state.deleteAlert) // Alertas - const { unreadAlerts, unreadCount, regenerateAlerts } = useAlerts() + const { unreadAlerts, regenerateAlerts } = useAlerts() // Estados locales para modales const [isAddDebtModalOpen, setIsAddDebtModalOpen] = useState(false) @@ -31,23 +27,6 @@ export default function Home() { regenerateAlerts() }, [regenerateAlerts]) - // Efecto para manejar resize de ventana - useEffect(() => { - const handleResize = () => { - if (window.innerWidth >= 1024) { - sidebar.open() - } else { - sidebar.close() - } - } - - // Estado inicial - handleResize() - - window.addEventListener('resize', handleResize) - return () => window.removeEventListener('resize', handleResize) - }, [sidebar]) - // Handlers para modales const handleAddDebt = () => { setIsAddDebtModalOpen(true) @@ -65,54 +44,35 @@ export default function Home() { const topAlerts = unreadAlerts.slice(0, 3) return ( -
- {/* Sidebar */} - - - {/* Main content */} -
- {/* Header */} -
- - {/* Main content area */} -
-
- {/* Alertas destacadas */} - {topAlerts.length > 0 && ( -
- {topAlerts.map((alert) => ( - deleteAlert(alert.id)} - onMarkRead={() => markAlertAsRead(alert.id)} - /> - ))} -
- )} - - {/* Sección de resumen */} - - - {/* Acciones rápidas */} - - - {/* Actividad reciente */} - + +
+ {/* Alertas destacadas */} + {topAlerts.length > 0 && ( +
+ {topAlerts.map((alert) => ( + deleteAlert(alert.id)} + onMarkRead={() => markAlertAsRead(alert.id)} + /> + ))}
-
-
+ )} - {/* Mobile navigation */} - + {/* Sección de resumen */} + + + {/* Acciones rápidas */} + + + {/* Actividad reciente */} + +
{/* Modales */} setIsAddPaymentModalOpen(false)} /> -
+ ) } diff --git a/app/providers.tsx b/app/providers.tsx index da0fe27..44f5191 100644 --- a/app/providers.tsx +++ b/app/providers.tsx @@ -1,6 +1,7 @@ "use client"; import { createContext, useContext, useState, ReactNode } from "react"; +import { DataSync } from "@/components/DataSync"; interface SidebarContextType { isOpen: boolean; @@ -27,6 +28,7 @@ export function Providers({ children }: { children: ReactNode }) { open: openSidebar, }} > + {children} ); diff --git a/app/services/page.tsx b/app/services/page.tsx index 5fe0792..8ba01f5 100644 --- a/app/services/page.tsx +++ b/app/services/page.tsx @@ -1,142 +1,145 @@ -'use client' - -import { useState } from 'react' -import { useFinanzasStore } from '@/lib/store' -import { predictNextBill, calculateTrend } from '@/lib/predictions' -import { formatCurrency } from '@/lib/utils' -import { Zap, Droplets, Flame, Wifi, TrendingUp, TrendingDown, Plus, History } from 'lucide-react' -import { cn } from '@/lib/utils' -import { AddServiceModal } from '@/components/modals/AddServiceModal' - -const SERVICES = [ - { id: 'electricity', label: 'Luz (Electricidad)', icon: Zap, color: 'text-yellow-400', bg: 'bg-yellow-400/10' }, - { id: 'water', label: 'Agua', icon: Droplets, color: 'text-blue-400', bg: 'bg-blue-400/10' }, - { id: 'gas', label: 'Gas', icon: Flame, color: 'text-orange-400', bg: 'bg-orange-400/10' }, - { id: 'internet', label: 'Internet', icon: Wifi, color: 'text-cyan-400', bg: 'bg-cyan-400/10' }, -] - -export default function ServicesPage() { - const serviceBills = useFinanzasStore((state) => state.serviceBills) - const [isAddModalOpen, setIsAddModalOpen] = useState(false) - - return ( -
- - {/* Header */} -
-
-

Servicios y Predicciones

-

Gestiona tus consumos de Luz, Agua y Gas.

-
- -
- - {/* Service Cards */} -
- {SERVICES.map((service) => { - const Icon = service.icon - const prediction = predictNextBill(serviceBills, service.id as any) - const trend = calculateTrend(serviceBills, service.id as any) - const lastBill = serviceBills - .filter(b => b.type === service.id) - .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())[0] - - return ( -
-
-
- -
- {trend !== 0 && ( -
0 ? "bg-red-500/10 text-red-400" : "bg-emerald-500/10 text-emerald-400")}> - {trend > 0 ? : } - {Math.abs(trend).toFixed(0)}% -
- )} -
- -
-

{service.label}

-
-

- {formatCurrency(prediction || (lastBill?.amount ?? 0))} -

- {prediction > 0 && (est.)} -
-

- {lastBill - ? `Último: ${formatCurrency(lastBill.amount)}` - : 'Sin historial'} -

-
-
- ) - })} -
- - {/* History List */} -
-
- -

Historial de Pagos

-
-
- {serviceBills.length === 0 ? ( -
- No hay facturas registradas. Comienza agregando una para ver predicciones. -
- ) : ( - serviceBills - .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) - .map((bill) => { - const service = SERVICES.find(s => s.id === bill.type) - const Icon = service?.icon || Zap - - return ( -
-
-
- -
-
-

{service?.label || bill.type}

-
-

{new Date(bill.date).toLocaleDateString('es-AR', { dateStyle: 'long' })}

- {bill.usage && ( - <> - -

- Consumo: {bill.usage} {bill.unit} -

- - )} -
-
-
-
-

{formatCurrency(bill.amount)}

-
-

{bill.period}

- {bill.usage && bill.amount && ( -

- {formatCurrency(bill.amount / bill.usage)} / {bill.unit} -

- )} -
-
-
- ) - }) - )} -
-
- - setIsAddModalOpen(false)} /> -
- ) -} +'use client' + +import { useState } from 'react' +import { useFinanzasStore } from '@/lib/store' +import { predictNextBill, calculateTrend } from '@/lib/predictions' +import { formatCurrency } from '@/lib/utils' +import { Zap, Droplets, Flame, Wifi, TrendingUp, TrendingDown, Plus, History } from 'lucide-react' +import { cn } from '@/lib/utils' +import { AddServiceModal } from '@/components/modals/AddServiceModal' +import { DashboardLayout } from '@/components/layout/DashboardLayout' + +const SERVICES = [ + { id: 'electricity', label: 'Luz (Electricidad)', icon: Zap, color: 'text-yellow-400', bg: 'bg-yellow-400/10' }, + { id: 'water', label: 'Agua', icon: Droplets, color: 'text-blue-400', bg: 'bg-blue-400/10' }, + { id: 'gas', label: 'Gas', icon: Flame, color: 'text-orange-400', bg: 'bg-orange-400/10' }, + { id: 'internet', label: 'Internet', icon: Wifi, color: 'text-cyan-400', bg: 'bg-cyan-400/10' }, +] + +export default function ServicesPage() { + const serviceBills = useFinanzasStore((state) => state.serviceBills) + const [isAddModalOpen, setIsAddModalOpen] = useState(false) + + return ( + +
+ + {/* Header */} +
+
+

Servicios y Predicciones

+

Gestiona tus consumos de Luz, Agua y Gas.

+
+ +
+ + {/* Service Cards */} +
+ {SERVICES.map((service) => { + const Icon = service.icon + const prediction = predictNextBill(serviceBills, service.id as any) + const trend = calculateTrend(serviceBills, service.id as any) + const lastBill = serviceBills + .filter(b => b.type === service.id) + .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())[0] + + return ( +
+
+
+ +
+ {trend !== 0 && ( +
0 ? "bg-red-500/10 text-red-400" : "bg-emerald-500/10 text-emerald-400")}> + {trend > 0 ? : } + {Math.abs(trend).toFixed(0)}% +
+ )} +
+ +
+

{service.label}

+
+

+ {formatCurrency(prediction || (lastBill?.amount ?? 0))} +

+ {prediction > 0 && (est.)} +
+

+ {lastBill + ? `Último: ${formatCurrency(lastBill.amount)}` + : 'Sin historial'} +

+
+
+ ) + })} +
+ + {/* History List */} +
+
+ +

Historial de Pagos

+
+
+ {serviceBills.length === 0 ? ( +
+ No hay facturas registradas. Comienza agregando una para ver predicciones. +
+ ) : ( + serviceBills + .sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) + .map((bill) => { + const service = SERVICES.find(s => s.id === bill.type) + const Icon = service?.icon || Zap + + return ( +
+
+
+ +
+
+

{service?.label || bill.type}

+
+

{new Date(bill.date).toLocaleDateString('es-AR', { dateStyle: 'long' })}

+ {bill.usage && ( + <> + +

+ Consumo: {bill.usage} {bill.unit} +

+ + )} +
+
+
+
+

{formatCurrency(bill.amount)}

+
+

{bill.period}

+ {bill.usage && bill.amount && ( +

+ {formatCurrency(bill.amount / bill.usage)} / {bill.unit} +

+ )} +
+
+
+ ) + }) + )} +
+
+ + setIsAddModalOpen(false)} /> +
+
+ ) +} diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 72c269f..fc5a939 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -4,6 +4,7 @@ import { useState, useEffect } from 'react' import { Save, Plus, Trash2, Bot, MessageSquare, Key, Link as LinkIcon, Lock, Send, CheckCircle2, XCircle, Loader2, Sparkles, Box } from 'lucide-react' import { cn } from '@/lib/utils' import { AIServiceConfig, AppSettings } from '@/lib/types' +import { DashboardLayout } from '@/components/layout/DashboardLayout' export default function SettingsPage() { const [loading, setLoading] = useState(true) @@ -159,211 +160,213 @@ export default function SettingsPage() { if (loading) return
Cargando configuración...
return ( -
+ +
-
-
-

Configuración

-

Gestiona la integración con Telegram e Inteligencia Artificial.

-
- -
- - {message && ( -
- {message.type === 'success' ? : } - {message.text} -
- )} - - {/* Telegram Configuration */} -
-
-
- -

Telegram Bot

+
+
+

Configuración

+

Gestiona la integración con Telegram e Inteligencia Artificial.

-
-
- - setSettings({ ...settings, telegram: { ...settings.telegram, botToken: e.target.value } })} - className="w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700" - /> -

El token que te da @BotFather.

+ {message && ( +
+ {message.type === 'success' ? : } + {message.text}
+ )} -
- - setSettings({ ...settings, telegram: { ...settings.telegram, chatId: e.target.value } })} - className="w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700" - /> -

Tu ID numérico de Telegram (o el ID del grupo).

-
-
-
- - {/* AI Providers Configuration */} -
-
-
- -

Proveedores de IA

-
- -
- -
- {settings.aiProviders.length === 0 && ( -
- No hay proveedores de IA configurados. Agrega uno para empezar. + {/* Telegram Configuration */} +
+
+
+ +

Telegram Bot

- )} + +
- {settings.aiProviders.map((provider, index) => ( -
-
-

- Provider #{index + 1} -

-
- - -
+
+
+ + setSettings({ ...settings, telegram: { ...settings.telegram, botToken: e.target.value } })} + className="w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700" + /> +

El token que te da @BotFather.

+
+ +
+ + setSettings({ ...settings, telegram: { ...settings.telegram, chatId: e.target.value } })} + className="w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700" + /> +

Tu ID numérico de Telegram (o el ID del grupo).

+
+
+
+ + {/* AI Providers Configuration */} +
+
+
+ +

Proveedores de IA

+
+ +
+ +
+ {settings.aiProviders.length === 0 && ( +
+ No hay proveedores de IA configurados. Agrega uno para empezar.
+ )} -
-
- - updateProvider(provider.id, 'name', e.target.value)} - className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none" - /> -
- -
-
- - updateProvider(provider.id, 'endpoint', e.target.value)} - className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" - /> -
-
- - updateProvider(provider.id, 'token', e.target.value)} - className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" - /> -
-
- - {/* Model Selection */} -
-
- + {settings.aiProviders.map((provider, index) => ( +
+
+

+ Provider #{index + 1} +

+
+
- {availableModels[provider.id] ? ( - - ) : ( - updateProvider(provider.id, 'model', e.target.value)} - className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" - /> - )}
+
+
+ + updateProvider(provider.id, 'name', e.target.value)} + className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none" + /> +
+ +
+
+ + updateProvider(provider.id, 'endpoint', e.target.value)} + className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" + /> +
+
+ + updateProvider(provider.id, 'token', e.target.value)} + className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" + /> +
+
+ + {/* Model Selection */} +
+
+ + +
+ {availableModels[provider.id] ? ( + + ) : ( + updateProvider(provider.id, 'model', e.target.value)} + className="w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none" + /> + )} +
+ +
-
- ))} -
-
-
+ ))} +
+
+
+
) } diff --git a/components/DataSync.tsx b/components/DataSync.tsx new file mode 100644 index 0000000..770196e --- /dev/null +++ b/components/DataSync.tsx @@ -0,0 +1,64 @@ +'use client'; + +import { useEffect, useRef } from 'react'; +import { useFinanzasStore } from '@/lib/store'; + +export function DataSync() { + // const isHydrated = useFinanzasStore(state => state._hasHydrated); + const store = useFinanzasStore(); + const initialized = useRef(false); + + useEffect(() => { + async function init() { + if (initialized.current) return; + initialized.current = true; + + try { + const res = await fetch('/api/sync'); + if (!res.ok) return; + const serverData = await res.json(); + + // Simple logic: if server has data (debts or cards or something), trust server. + const hasServerData = serverData.fixedDebts?.length > 0 || serverData.creditCards?.length > 0; + + if (hasServerData) { + console.log("Sync: Hydrating from Server"); + useFinanzasStore.setState(serverData); + } else { + // Server is empty, but we might have local data. + // Push local data to server to initialize it. + console.log("Sync: Initializing Server with Local Data"); + syncToServer(useFinanzasStore.getState()); + } + } catch (e) { + console.error("Sync init error", e); + } + } + + init(); + }, []); + + // Sync on change + useEffect(() => { + if (!initialized.current) return; + + const unsub = useFinanzasStore.subscribe((state) => { + syncToServer(state); + }); + return () => unsub(); + }, []); + + return null; +} + +let timeout: NodeJS.Timeout; +function syncToServer(state: any) { + clearTimeout(timeout); + timeout = setTimeout(() => { + fetch('/api/sync', { + method: 'POST', + headers: {'Content-Type': 'application/json'}, + body: JSON.stringify(state) + }).catch(e => console.error("Sync error", e)); + }, 2000); // Debounce 2s +} diff --git a/components/layout/DashboardLayout.tsx b/components/layout/DashboardLayout.tsx new file mode 100644 index 0000000..35fdfc9 --- /dev/null +++ b/components/layout/DashboardLayout.tsx @@ -0,0 +1,60 @@ +'use client' + +import { ReactNode, useEffect } from 'react' +import { Sidebar, Header, MobileNav } from '@/components/layout' +import { useSidebar } from '@/app/providers' +import { useAlerts } from '@/components/alerts' + +interface DashboardLayoutProps { + children: ReactNode + title: string +} + +export function DashboardLayout({ children, title }: DashboardLayoutProps) { + const { isOpen, toggle, close, open } = useSidebar() + const { unreadCount } = useAlerts() + + // Ensure sidebar is open on desktop mount + useEffect(() => { + const handleResize = () => { + if (window.innerWidth >= 1024) { + open() + } else { + close() + } + } + + // Initial check + handleResize() + + window.addEventListener('resize', handleResize) + return () => window.removeEventListener('resize', handleResize) + }, [open, close]) + + return ( +
+ {/* Sidebar */} + + + {/* Main content wrapper */} +
+ {/* Header */} +
+ + {/* Page content */} +
+
+ {children} +
+
+
+ + {/* Mobile Navigation */} + +
+ ) +} diff --git a/components/layout/Sidebar.tsx b/components/layout/Sidebar.tsx index 9b7cab3..60ee777 100644 --- a/components/layout/Sidebar.tsx +++ b/components/layout/Sidebar.tsx @@ -8,6 +8,7 @@ import { Bell, Lightbulb, Settings, + TrendingUp, X, } from 'lucide-react'; import Link from 'next/link'; @@ -22,6 +23,7 @@ interface SidebarProps { const navigationItems = [ { name: 'Dashboard', href: '/', icon: LayoutDashboard }, + { name: 'Ingresos', href: '/incomes', icon: TrendingUp }, { name: 'Deudas', href: '/debts', icon: Wallet }, { name: 'Tarjetas', href: '/cards', icon: CreditCard }, { name: 'Presupuesto', href: '/budget', icon: PiggyBank }, diff --git a/data/db.json b/data/db.json new file mode 100644 index 0000000..d6f38e1 --- /dev/null +++ b/data/db.json @@ -0,0 +1,29 @@ +{ + "fixedDebts": [], + "variableDebts": [ + { + "name": "netflix", + "amount": 5000, + "date": "2026-01-29T00:00:00.000Z", + "category": "shopping", + "isPaid": false, + "id": "f2e424ca-5f07-4f57-9386-822354e0ee1e" + }, + { + "name": "youtube", + "amount": 2500, + "date": "2026-01-29T00:00:00.000Z", + "category": "shopping", + "isPaid": false, + "id": "621c3caf-529b-4c33-b46f-3d86b119dd75" + } + ], + "creditCards": [], + "cardPayments": [], + "monthlyBudgets": [], + "currentMonth": 1, + "currentYear": 2026, + "alerts": [], + "serviceBills": [], + "incomes": [] +} \ No newline at end of file diff --git a/dist/404.html b/dist/404.html new file mode 100644 index 0000000..8e06ed8 --- /dev/null +++ b/dist/404.html @@ -0,0 +1 @@ +404: This page could not be found.Finanzas Personales

404

This page could not be found.

\ No newline at end of file diff --git a/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_buildManifest.js b/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_buildManifest.js new file mode 100644 index 0000000..e183940 --- /dev/null +++ b/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-7ba65e1336b92748.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_ssgManifest.js b/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_ssgManifest.js new file mode 100644 index 0000000..5b3ff59 --- /dev/null +++ b/dist/_next/static/4SrcMtBIfNF-pqHyUpitS/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/dist/_next/static/chunks/117-14b82d0a7edfd352.js b/dist/_next/static/chunks/117-14b82d0a7edfd352.js new file mode 100644 index 0000000..b51839f --- /dev/null +++ b/dist/_next/static/chunks/117-14b82d0a7edfd352.js @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[117],{5157:function(e,t){"use strict";function n(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return n}})},1572:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let r=n(8498),o=n(8521);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,r.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5266:function(e,t){"use strict";function n(e){var t,n;t=self.__next_s,n=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[n,r]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(r)for(let e in r)"children"!==e&&o.setAttribute(e,r[e]);n?(o.src=n,o.onload=()=>e(),o.onerror=t):r&&(o.innerHTML=r.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return n}}),window.next={version:"14.2.35",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let r=n(2846);async function o(e,t){let n=(0,r.getServerActionDispatcher)();if(!n)throw Error("Invariant: missing action dispatcher.");return new Promise((r,o)=>{n({actionId:e,actionArgs:t,resolve:r,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2304:function(e,t,n){"use strict";let r,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return x}});let u=n(7043),l=n(3099),a=n(7437);n(1572);let i=u._(n(4040)),c=l._(n(2265)),s=n(6671),f=n(8701),d=u._(n(1404)),p=n(3079),h=n(9721),y=n(2103);n(647);let _=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),n=0;n{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=new TextEncoder,g=!1,m=!1,R=null;function P(e){if(0===e[0])r=[];else if(1===e[0]){if(!r)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(b.encode(e[1])):r.push(e[1])}else 2===e[0]&&(R=e[1])}let j=function(){o&&!m&&(o.close(),m=!0,r=void 0),g=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",j,!1):j();let O=self.__next_f=self.__next_f||[];O.forEach(P),O.push=P;let E=new ReadableStream({start(e){r&&(r.forEach(t=>{e.enqueue(b.encode(t))}),g&&!m&&(e.close(),m=!0,r=void 0)),o=e}}),S=(0,s.createFromReadableStream)(E,{callServer:p.callServer});function w(){return(0,c.use)(S)}let M=c.default.StrictMode;function T(e){let{children:t}=e;return t}function x(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(M,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(T,{children:(0,a.jsx)(w,{})})})})}),n=window.__next_root_layout_missing_tags,r=!!(null==n?void 0:n.length),o={onRecoverableError:d.default};"__next_error__"===document.documentElement.id||r?i.default.createRoot(v,o).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...o,formState:R}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(9506),(0,n(5266).appBootstrap)(()=>{let{hydrate:e}=n(2304);n(2846),n(4707),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(5157);{let e=n.u;n.u=function(){for(var t=arguments.length,n=Array(t),r=0;r(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,r.useState)(""),c=(0,r.useRef)();return(0,r.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),n?(0,o.createPortal)(a,n):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6866:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION:function(){return r},FLIGHT_PARAMETERS:function(){return i},NEXT_DID_POSTPONE_HEADER:function(){return s},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_RSC_UNION_QUERY:function(){return c},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_HEADER:function(){return n}});let n="RSC",r="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=[[n],[o],[u]],c="_rsc",s="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createEmptyCacheNode:function(){return C},default:function(){return I},getServerActionDispatcher:function(){return S},urlToUrlWithoutFlightMarker:function(){return M}});let r=n(3099),o=n(7437),u=r._(n(2265)),l=n(1956),a=n(4673),i=n(3456),c=n(9060),s=n(7744),f=n(1060),d=n(2952),p=n(6146),h=n(1634),y=n(6495),_=n(4123),v=n(9320),b=n(8137),g=n(6866),m=n(5076),R=n(1283),P=n(4541),j="undefined"==typeof window,O=j?null:new Map,E=null;function S(){return E}let w={};function M(e){let t=new URL(e,location.origin);if(t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,n=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-n)}return t}function T(e){return e.origin!==window.location.origin}function x(e){let{appRouterState:t,sync:n}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:o}=t,u={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(r.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),n(t)},[t,n]),null}function C(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null}}function A(e){null==e&&(e={});let t=window.history.state,n=null==t?void 0:t.__NA;n&&(e.__NA=n);let r=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return r&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=r),e}function N(e){let{headCacheNode:t}=e,n=null!==t?t.head:null,r=null!==t?t.prefetchHead:null,o=null!==r?r:n;return(0,u.useDeferredValue)(n,o)}function D(e){let t,{buildId:n,initialHead:r,initialTree:i,urlParts:f,initialSeedData:g,couldBeIntercepted:S,assetPrefix:M,missingSlots:C}=e,D=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:n,initialSeedData:g,urlParts:f,initialTree:i,initialParallelRoutes:O,location:j?null:window.location,initialHead:r,couldBeIntercepted:S}),[n,g,f,i,r,S]),[I,U,k]=(0,s.useReducerWithReduxDevtools)(D);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:F}=(0,s.useUnwrapState)(I),{searchParams:L,pathname:H}=(0,u.useMemo)(()=>{let e=new URL(F,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,R.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[F]),G=(0,u.useCallback)(e=>{let{previousTree:t,serverResponse:n}=e;(0,u.startTransition)(()=>{U({type:a.ACTION_SERVER_PATCH,previousTree:t,serverResponse:n})})},[U]),$=(0,u.useCallback)((e,t,n)=>{let r=new URL((0,h.addBasePath)(e),location.href);return U({type:a.ACTION_NAVIGATE,url:r,isExternalUrl:T(r),locationSearch:location.search,shouldScroll:null==n||n,navigateType:t})},[U]);E=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{U({...e,type:a.ACTION_SERVER_ACTION})})},[U]);let z=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let n;if(!(0,p.isBot)(window.navigator.userAgent)){try{n=new URL((0,h.addBasePath)(e),window.location.href)}catch(t){throw Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL.")}T(n)||(0,u.startTransition)(()=>{var e;U({type:a.ACTION_PREFETCH,url:n,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})}},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;$(e,"replace",null==(n=t.scroll)||n)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;$(e,"push",null==(n=t.scroll)||n)})},refresh:()=>{(0,u.startTransition)(()=>{U({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[U,$]);(0,u.useEffect)(()=>{window.next&&(window.next.router=z)},[z]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(w.pendingMpaPath=void 0,U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[U]);let{pushRef:B}=(0,s.useUnwrapState)(I);if(B.mpaNavigation){if(w.pendingMpaPath!==F){let e=window.location;B.pendingPush?e.assign(F):e.replace(F),w.pendingMpaPath=F}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),n=e=>{var t;let n=window.location.href,r=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(null!=e?e:n,n),tree:r})})};window.history.pushState=function(t,r,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=A(t),o&&n(o)),e(t,r,o)},window.history.replaceState=function(e,r,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=A(e),o&&n(o)),t(e,r,o)};let r=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",r),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",r)}},[U]);let{cache:W,tree:K,nextUrl:V,focusAndScrollRef:Y}=(0,s.useUnwrapState)(I),X=(0,u.useMemo)(()=>(0,v.findHeadInCache)(W,K[1]),[W,K]),q=(0,u.useMemo)(()=>(function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(P.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):o&&(n[t[0]]=t[1]),n=e(r,n))}return n})(K),[K]);if(null!==X){let[e,n]=X;t=(0,o.jsx)(N,{headCacheNode:e},n)}else t=null;let J=(0,o.jsxs)(_.RedirectBoundary,{children:[t,W.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:K})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{appRouterState:(0,s.useUnwrapState)(I),sync:k}),(0,o.jsx)(c.PathParamsContext.Provider,{value:q,children:(0,o.jsx)(c.PathnameContext.Provider,{value:H,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:L,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:n,changeByServerResponse:G,tree:K,focusAndScrollRef:Y,nextUrl:V},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:z,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:W.parallelRoutes,tree:K,url:F,loading:W.loading},children:J})})})})})})]})}function I(e){let{globalErrorComponent:t,...n}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(D,{...n})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let r=n(8993),o=n(1845);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new r.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let r=n(7437),o=n(4535);function u(e){let{Component:t,props:n}=e;return n.searchParams=(0,o.createDynamicallyTrackedSearchParams)(n.searchParams||{}),(0,r.jsx)(t,{...n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let r=n(7043),o=n(7437),u=r._(n(2265)),l=n(5475),a=n(9721),i=n(1845),c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e,n=i.staticGenerationAsyncStorage.getStore();if((null==n?void 0:n.isRevalidate)||(null==n?void 0:n.isStaticGeneration))throw console.error(t),t;return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,n=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:c.text,children:"Application error: a "+(n?"server":"client")+"-side exception has occurred (see the "+(n?"server logs":"browser console")+" for more information)."}),n?(0,o.jsx)("p",{style:c.text,children:"Digest: "+n}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:n,errorScripts:r,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:n,errorScripts:r,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return o}});let n="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let r=n(8200),o=n(8968);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,r.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});let r=n(7043),o=n(3099),u=n(7437),l=o._(n(2265)),a=r._(n(4887)),i=n(1956),c=n(4848),s=n(8137),f=n(1060),d=n(6015),p=n(7092),h=n(4123),y=n(80),_=n(3171),v=n(8505),b=n(8077),g=["bottom","height","left","right","top","width","x","y"];function m(e,t){let n=e.getBoundingClientRect();return n.top>=0&&n.top<=t}class R extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var n;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,n)=>(0,d.matchSegment)(t,e[n]))))return;let r=null,o=e.hashFragment;if(o&&(r="top"===o?document.body:null!=(n=document.getElementById(o))?n:document.getElementsByName(o)[0]),r||(r="undefined"==typeof window?null:a.default.findDOMNode(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return g.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){r.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!m(r,t)&&(e.scrollTop=0,m(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:n}=e,r=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:r.focusAndScrollRef,children:n})}function j(e){let{parallelRouterKey:t,url:n,childNodes:r,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=r.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};v=e,r.set(f,e)}let g=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,m=(0,l.useDeferredValue)(v.rsc,g),R="object"==typeof m&&null!==m&&"function"==typeof m.then?(0,l.use)(m):m;if(!R){let e=v.lazyData;if(null===e){let t=function e(t,n){if(t){let[r,o]=t,u=2===t.length;if((0,d.matchSegment)(n[0],r)&&n[1].hasOwnProperty(o)){if(u){let t=e(void 0,n[1][o]);return[n[0],{...n[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[n[0],{...n[1],[o]:e(t.slice(2),n[1][o])}]}}return n}(["",...o],_),r=(0,b.hasInterceptionRouteInCurrentTree)(_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(n,location.origin),t,r?p.nextUrl:null,h),v.lazyDataResolved=!1}let t=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y({previousTree:_,serverResponse:t})})}),v.lazyDataResolved=!0),(0,l.use)(s.unresolvedThenable)}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:n,loading:v.loading},children:R})}function O(e){let{children:t,hasLoading:n,loading:r,loadingStyles:o,loadingScripts:a}=e;return n?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[o,a,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function E(e){let{parallelRouterKey:t,segmentPath:n,error:r,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,template:d,notFound:p,notFoundStyles:b}=e,g=(0,l.useContext)(i.LayoutRouterContext);if(!g)throw Error("invariant expected layout router to be mounted");let{childNodes:m,tree:R,url:E,loading:S}=g,w=m.get(t);w||(w=new Map,m.set(t,w));let M=R[1][t][0],T=(0,_.getSegmentValue)(M),x=[M];return(0,u.jsx)(u.Fragment,{children:x.map(e=>{let l=(0,_.getSegmentValue)(e),g=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:n,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:r,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:!!S,loading:null==S?void 0:S[0],loadingStyles:null==S?void 0:S[1],loadingScripts:null==S?void 0:S[2],children:(0,u.jsx)(y.NotFoundBoundary,{notFound:p,notFoundStyles:b,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:E,tree:R,childNodes:w,segmentPath:n,cacheKey:g,isActive:T===l})})})})})}),children:[c,s,d]},(0,v.createRouterCacheKey)(e,!0))})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{canSegmentBeOverridden:function(){return u},matchSegment:function(){return o}});let r=n(7417),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var n;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(n=(0,r.getSegmentParam)(e))?void 0:n.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},useParams:function(){return p},usePathname:function(){return f},useRouter:function(){return d},useSearchParams:function(){return s},useSelectedLayoutSegment:function(){return y},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(2265),o=n(1956),u=n(9060),l=n(3171),a=n(4541),i=n(2646),c=n(5501);function s(){let e=(0,r.useContext)(u.SearchParamsContext),t=(0,r.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=n(6149);e("useSearchParams()")}return t}function f(){return(0,r.useContext)(u.PathnameContext)}function d(){let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(u.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,r.useContext)(o.LayoutRouterContext);return t?function e(t,n,r,o){let u;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)u=t[1][n];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,n,!1,o))}(t.tree,e):null}function y(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l},RedirectType:function(){return r.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(8968),o=n(8200);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class l extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let r=n(3099),o=n(7437),u=r._(n(2265)),l=n(5475),a=n(8200);n(1765);let i=n(1956);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:n,asNotFound:r,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:n,asNotFound:r,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8200:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let r=n(2522),o=n(675);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,n;let o=new Promise((e,r)=>{t=e,n=r}),u=async()=>{try{r._(this,l)[l]++;let n=await e();t(n)}catch(e){n(e)}finally{r._(this,l)[l]--,r._(this,i)[i]()}};return r._(this,a)[a].push({promiseFn:o,task:u}),r._(this,i)[i](),o}bump(e){let t=r._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=r._(this,a)[a].splice(t,1)[0];r._(this,a)[a].unshift(e),r._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),r._(this,u)[u]=e,r._(this,l)[l]=0,r._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(r._(this,l)[l]0){var t;null==(t=r._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectBoundary:function(){return s},RedirectErrorBoundary:function(){return c}});let r=n(3099),o=n(7437),u=r._(n(2265)),l=n(5475),a=n(8968);function i(e){let{redirect:t,reset:n,redirectType:r}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{r===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),n()})},[t,r,n,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,n=(0,l.useRouter)();return(0,o.jsx)(c,{router:n,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5001:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8968:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return y},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return d},permanentRedirect:function(){return f},redirect:function(){return s}});let u=n(544),l=n(295),a=n(5001),i="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(i);r.digest=i+";"+t+";"+e+";"+n+";";let o=u.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function s(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(3099),o=n(7437),u=r._(n(2265)),l=n(1956);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(9134);function o(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let r=n(7420),o=n(2576);function u(e,t,n,u){let[l,a,i]=n.slice(-3);if(null===a)return!1;if(3===n.length){let n=a[2],o=a[3];t.loading=o,t.rsc=n,t.prefetchRsc=null,(0,r.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),t.loading=e.loading,(0,o.fillCacheWithNewSubTreeData)(t,e,n,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,n,r,a){let i;let[c,s,f,d,p]=n;if(1===t.length){let e=l(n,r,t);return(0,u.addRefreshMarkerToActiveParallelSegments)(e,a),e}let[h,y]=t;if(!(0,o.matchSegment)(h,c))return null;if(2===t.length)i=l(s[y],r,t);else if(null===(i=e(t.slice(2),s[y],r,a)))return null;let _=[t[0],{...s,[y]:i},f,d];return p&&(_[4]=!0),(0,u.addRefreshMarkerToActiveParallelSegments)(_,a),_}}});let r=n(4541),o=n(6015),u=n(232);function l(e,t,n){let[u,a]=e,[i,c]=t;if(i===r.DEFAULT_SEGMENT_KEY&&u!==r.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(u,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=l(a[e],c[e],n):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let r=[u,t];return e[2]&&(r[2]=e[2]),e[3]&&(r[3]=e[3]),e[4]&&(r[4]=e[4]),r}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l),s=t.parallelRoutes.get(l);s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s));let f=null==c?void 0:c.get(i),d=s.get(i);if(u){d&&d.lazyData&&d!==f||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}if(!d||!f){d||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}return d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved,loading:d.loading},s.set(i,d)),e(d,f,o.slice(2))}}});let r=n(8505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c}});let r=n(1182),o=n(4541),u=n(6015),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let n=Array.isArray(e[0])?e[0][1]:e[0];if(n===o.DEFAULT_SEGMENT_KEY||r.INTERCEPTION_ROUTE_MARKERS.some(e=>n.startsWith(e)))return;if(n.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(n)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let n=c(t);void 0!==n&&u.push(n)}return i(u)}function s(e,t){let n=function e(t,n){let[o,l]=t,[i,s]=n,f=a(o),d=a(i);if(r.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(n))?p:""}for(let t in l)if(s[t]){let n=e(l[t],s[t]);if(null!==n)return a(i)+"/"+n}return null}(e,t);return null==n||"/"===n?n:i(n.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3456:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return c}});let r=n(3456),o=n(7420),u=n(5410),l=n(305),a=n(4673),i=n(232);function c(e){var t;let{buildId:n,initialTree:c,initialSeedData:s,urlParts:f,initialParallelRoutes:d,location:p,initialHead:h,couldBeIntercepted:y}=e,_=f.join("/"),v=!p,b={lazyData:null,rsc:s[2],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:v?new Map:d,lazyDataResolved:!1,loading:s[3]},g=p?(0,r.createHrefFromUrl)(p):_;(0,i.addRefreshMarkerToActiveParallelSegments)(c,g);let m=new Map;(null===d||0===d.size)&&(0,o.fillLazyItemsTillLeafWithHead)(b,void 0,c,s,h);let R={buildId:n,tree:c,cache:b,prefetchCache:m,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:g,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(c)||(null==p?void 0:p.pathname))?t:null};if(p){let e=new URL(""+p.pathname+p.search,p.origin),t=[["",c,null,null]];(0,l.createPrefetchCacheEntryForInitialLoad)({url:e,kind:a.PrefetchKind.AUTO,data:[t,void 0,!1,y],tree:R.tree,prefetchCache:R.prefetchCache,nextUrl:R.nextUrl})}return R}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let r=n(4541);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(r.PAGE_SEGMENT_KEY)?r.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return f}});let r=n(6866),o=n(2846),u=n(3079),l=n(4673),a=n(7207),i=n(1311),{createFromFetch:c}=n(6671);function s(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0,!1,!1]}async function f(e,t,n,f,d){let p={[r.RSC_HEADER]:"1",[r.NEXT_ROUTER_STATE_TREE]:(0,i.prepareFlightRouterStateForRequest)(t)};d===l.PrefetchKind.AUTO&&(p[r.NEXT_ROUTER_PREFETCH_HEADER]="1"),n&&(p[r.NEXT_URL]=n);let h=(0,a.hexHash)([p[r.NEXT_ROUTER_PREFETCH_HEADER]||"0",p[r.NEXT_ROUTER_STATE_TREE],p[r.NEXT_URL]].join(","));try{var y;let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(r.NEXT_RSC_UNION_QUERY,h);let n=await fetch(t,{credentials:"same-origin",headers:p}),l=(0,o.urlToUrlWithoutFlightMarker)(n.url),a=n.redirected?l:void 0,i=n.headers.get("content-type")||"",d=!!n.headers.get(r.NEXT_DID_POSTPONE_HEADER),_=!!(null==(y=n.headers.get("vary"))?void 0:y.includes(r.NEXT_URL)),v=i===r.RSC_CONTENT_TYPE_HEADER;if(v||(v=i.startsWith("text/plain")),!v||!n.ok)return e.hash&&(l.hash=e.hash),s(l.toString());let[b,g]=await c(Promise.resolve(n),{callServer:u.callServer});if(f!==b)return s(n.url);return[g,a,d,_]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0,!1,!1]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,n,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=n.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,head:null,prefetchHead:null,loading:e[3],parallelRoutes:h?new Map(h.parallelRoutes):new Map,lazyDataResolved:!1},h&&(0,r.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,head:y.head,prefetchHead:y.prefetchHead,parallelRoutes:new Map(y.parallelRoutes),lazyDataResolved:!1,loading:y.loading},p.set(f,y)),e(y,h,l.slice(2),a))}}});let r=n(4377),o=n(7420),u=n(8505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,n,u,l,a,i){if(0===Object.keys(u[1]).length){t.head=a;return}for(let c in u[1]){let s;let f=u[1][c],d=f[0],p=(0,r.createRouterCacheKey)(d),h=null!==l&&void 0!==l[1][c]?l[1][c]:null;if(n){let r=n.parallelRoutes.get(c);if(r){let n;let u=(null==i?void 0:i.kind)==="auto"&&i.status===o.PrefetchCacheEntryStatus.reusable,l=new Map(r),s=l.get(p);n=null!==h?{lazyData:null,rsc:h[2],prefetchRsc:null,head:null,prefetchHead:null,loading:h[3],parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1}:u&&s?{lazyData:s.lazyData,rsc:s.rsc,prefetchRsc:s.prefetchRsc,head:s.head,prefetchHead:s.prefetchHead,parallelRoutes:new Map(s.parallelRoutes),lazyDataResolved:s.lazyDataResolved,loading:s.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1,loading:null},l.set(p,n),e(n,s,f,h||null,a,i),t.parallelRoutes.set(c,l);continue}}if(null!==h){let e=h[2],t=h[3];s={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:t}}else s={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};let y=t.parallelRoutes.get(c);y?y.set(p,s):t.parallelRoutes.set(c,new Map([[p,s]])),e(s,void 0,f,h,a,i)}}}});let r=n(8505),o=n(4673);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let r=n(5410);function o(e){return void 0!==e}function u(e,t){var n,u,l;let a=null==(u=t.shouldScroll)||u,i=e.nextUrl;if(o(t.patchedTree)){let n=(0,r.computeChangedPath)(e.tree,t.patchedTree);n?i=n:i||(i=e.canonicalUrl)}return{buildId:e.buildId,canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!a&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:!!t.hashFragment&&e.canonicalUrl.split("#",1)[0]===(null==(n=t.canonicalUrl)?void 0:n.split("#",1)[0]),hashFragment:a?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:a?null!=(l=null==t?void 0:t.scrollableSegments)?l:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let r=n(5967);function o(e,t,n){return(0,r.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l);if(!c)return;let s=t.parallelRoutes.get(l);if(s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s)),u){s.delete(i);return}let f=c.get(i),d=s.get(i);d&&f&&(d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved},s.set(i,d)),e(d,f,o.slice(2)))}}});let r=n(8505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let r=n(8505);function o(e,t,n){for(let o in n[1]){let u=n[1][o][0],l=(0,r.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,n){let r=t[0],o=n[0];if(Array.isArray(r)&&Array.isArray(o)){if(r[0]!==o[0]||r[2]!==o[2])return!0}else if(r!==o)return!0;if(t[4])return!n[4];if(n[4])return!0;let u=Object.values(t[1])[0],l=Object.values(n[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{abortTask:function(){return c},listenForDynamicRequest:function(){return a},updateCacheNodeOnNavigation:function(){return function e(t,n,a,c,s){let f=n[1],d=a[1],p=c[1],h=t.parallelRoutes,y=new Map(h),_={},v=null;for(let t in d){let n;let a=d[t],c=f[t],b=h.get(t),g=p[t],m=a[0],R=(0,u.createRouterCacheKey)(m),P=void 0!==c?c[0]:void 0,j=void 0!==b?b.get(R):void 0;if(null!==(n=m===r.PAGE_SEGMENT_KEY?l(a,void 0!==g?g:null,s):m===r.DEFAULT_SEGMENT_KEY?void 0!==c?{route:c,node:null,children:null}:l(a,void 0!==g?g:null,s):void 0!==P&&(0,o.matchSegment)(m,P)&&void 0!==j&&void 0!==c?null!=g?e(j,c,a,g,s):function(e){let t=i(e,null,null);return{route:e,node:t,children:null}}(a):l(a,void 0!==g?g:null,s))){null===v&&(v=new Map),v.set(t,n);let e=n.node;if(null!==e){let n=new Map(b);n.set(R,e),y.set(t,n)}_[t]=n.route}else _[t]=a}if(null===v)return null;let b={lazyData:null,rsc:t.rsc,prefetchRsc:t.prefetchRsc,head:t.head,prefetchHead:t.prefetchHead,loading:t.loading,parallelRoutes:y,lazyDataResolved:!1};return{route:function(e,t){let n=[e[0],t];return 2 in e&&(n[2]=e[2]),3 in e&&(n[3]=e[3]),4 in e&&(n[4]=e[4]),n}(a,_),node:b,children:v}}},updateCacheNodeOnPopstateRestoration:function(){return function e(t,n){let r=n[1],o=t.parallelRoutes,l=new Map(o);for(let t in r){let n=r[t],a=n[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let r=c.get(i);if(void 0!==r){let o=e(r,n),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=d(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:null,prefetchRsc:i?t.prefetchRsc:null,loading:i?t.loading:null,parallelRoutes:l,lazyDataResolved:!1}}}});let r=n(4541),o=n(6015),u=n(8505);function l(e,t,n){let r=i(e,t,n);return{route:e,node:r,children:null}}function a(e,t){t.then(t=>{for(let n of t[0]){let t=n.slice(0,-3),r=n[n.length-3],l=n[n.length-2],a=n[n.length-1];"string"!=typeof t&&function(e,t,n,r,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,n){let r=e[1],o=null!==t?t[1]:null,l=new Map;for(let e in r){let t=r[e],a=null!==o?o[e]:null,c=t[0],s=(0,u.createRouterCacheKey)(c),f=i(t,void 0===a?null:a,n),d=new Map;d.set(s,f),l.set(e,d)}let a=0===l.size,c=null!==t?t[2]:null,s=null!==t?t[3]:null;return{lazyData:null,parallelRoutes:l,prefetchRsc:void 0!==c?c:null,prefetchHead:a?n:null,loading:void 0!==s?s:null,rsc:p(),head:a?p():null,lazyDataResolved:!1}}function c(e,t){let n=e.node;if(null===n)return;let r=e.children;if(null===r)s(e.route,n,t);else for(let e of r.values())c(e,t);e.node=null}function s(e,t,n){let r=e[1],o=t.parallelRoutes;for(let e in r){let t=r[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,n)}let l=t.rsc;d(l)&&(null===n?l.resolve(null):l.reject(n));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.status="pending",n.resolve=t=>{"pending"===n.status&&(n.status="fulfilled",n.value=t,e(t))},n.reject=e=>{"pending"===n.status&&(n.status="rejected",n.reason=e,t(e))},n.tag=f,n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createPrefetchCacheEntryForInitialLoad:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let r=n(3456),o=n(4848),u=n(4673),l=n(4819);function a(e,t){let n=(0,r.createHrefFromUrl)(e,!1);return t?t+"%"+n:n}function i(e){let t,{url:n,nextUrl:r,tree:o,buildId:l,prefetchCache:i,kind:c}=e,f=a(n,r),d=i.get(f);if(d)t=d;else{let e=a(n),r=i.get(e);r&&(t=r)}return t?(t.status=h(t),t.kind!==u.PrefetchKind.FULL&&c===u.PrefetchKind.FULL)?s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:null!=c?c:u.PrefetchKind.TEMPORARY}):(c&&t.kind===u.PrefetchKind.TEMPORARY&&(t.kind=c),t):s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:c||u.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:n,prefetchCache:r,url:o,kind:l,data:i}=e,[,,,c]=i,s=c?a(o,t):a(o),f={treeAtTimeOfPrefetch:n,data:Promise.resolve(i),kind:l,prefetchTime:Date.now(),lastUsedTime:Date.now(),key:s,status:u.PrefetchCacheEntryStatus.fresh};return r.set(s,f),f}function s(e){let{url:t,kind:n,tree:r,nextUrl:i,buildId:c,prefetchCache:s}=e,f=a(t),d=l.prefetchQueue.enqueue(()=>(0,o.fetchServerResponse)(t,r,i,c,n).then(e=>{let[,,,n]=e;return n&&function(e){let{url:t,nextUrl:n,prefetchCache:r}=e,o=a(t),u=r.get(o);if(!u)return;let l=a(t,n);r.set(l,u),r.delete(o)}({url:t,nextUrl:i,prefetchCache:s}),e})),p={treeAtTimeOfPrefetch:r,data:d,kind:n,prefetchTime:Date.now(),lastUsedTime:null,key:f,status:u.PrefetchCacheEntryStatus.fresh};return s.set(f,p),p}function f(e){for(let[t,n]of e)h(n)===u.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("30"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:n,lastUsedTime:r}=e;return Date.now()<(null!=r?r:n)+d?r?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.fresh:"auto"===t&&Date.now(){let[n,f]=t,h=!1;if(E.lastUsedTime||(E.lastUsedTime=Date.now(),h=!0),"string"==typeof n)return _(e,R,n,O);if(document.getElementById("__next-page-redirect"))return _(e,R,j,O);let b=e.tree,g=e.cache,w=[];for(let t of n){let n=t.slice(0,-4),r=t.slice(-3)[0],c=["",...n],f=(0,u.applyRouterStatePatchToTree)(c,b,r,j);if(null===f&&(f=(0,u.applyRouterStatePatchToTree)(c,S,r,j)),null!==f){if((0,a.isNavigatingToNewRootLayout)(b,f))return _(e,R,j,O);let u=(0,d.createEmptyCacheNode)(),m=!1;for(let e of(E.status!==i.PrefetchCacheEntryStatus.stale||h?m=(0,s.applyFlightData)(g,u,t,E):(m=function(e,t,n,r){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),v(r).map(e=>[...n,...e])))(0,y.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(u,g,n,r),E.lastUsedTime=Date.now()),(0,l.shouldHardNavigate)(c,b)?(u.rsc=g.rsc,u.prefetchRsc=g.prefetchRsc,(0,o.invalidateCacheBelowFlightSegmentPath)(u,g,n),R.cache=u):m&&(R.cache=u,g=u),b=f,v(r))){let t=[...n,...e];t[t.length-1]!==p.DEFAULT_SEGMENT_KEY&&w.push(t)}}}return R.patchedTree=b,R.canonicalUrl=f?(0,r.createHrefFromUrl)(f):j,R.pendingPush=O,R.scrollableSegments=w,R.hashFragment=P,R.shouldScroll=m,(0,c.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{prefetchQueue:function(){return l},prefetchReducer:function(){return a}});let r=n(6866),o=n(9744),u=n(305),l=new o.PromiseQueue(5);function a(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:n}=t;return n.searchParams.delete(r.NEXT_RSC_UNION_QUERY),(0,u.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,buildId:e.buildId}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let r=n(4848),o=n(3456),u=n(1935),l=n(3237),a=n(5967),i=n(4510),c=n(7420),s=n(2846),f=n(7831),d=n(8077),p=n(232);function h(e,t){let{origin:n}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let v=(0,s.createEmptyCacheNode)(),b=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);return v.lazyData=(0,r.fetchServerResponse)(new URL(y,n),[_[0],_[1],_[2],"refetch"],b?e.nextUrl:null,e.buildId),v.lazyData.then(async n=>{let[r,s]=n;if("string"==typeof r)return(0,a.handleExternalUrl)(e,h,r,e.pushRef.pendingPush);for(let n of(v.lazyData=null,r)){if(3!==n.length)return console.log("REFRESH FAILED"),e;let[r]=n,i=(0,u.applyRouterStatePatchToTree)([""],_,r,e.canonicalUrl);if(null===i)return(0,f.handleSegmentMismatch)(e,t,r);if((0,l.isNavigatingToNewRootLayout)(_,i))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let d=s?(0,o.createHrefFromUrl)(s):void 0;s&&(h.canonicalUrl=d);let[g,m]=n.slice(-2);if(null!==g){let e=g[2];v.rsc=e,v.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(v,void 0,r,g,m),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({state:e,updatedTree:i,updatedCache:v,includeNextUrl:b,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=v,h.patchedTree=i,h.canonicalUrl=y,_=i}return(0,i.handleMutable)(e,h)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let r=n(3456),o=n(5410);function u(e,t){var n;let{url:u,tree:l}=t,a=(0,r.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(n=(0,o.extractPathFromFlightRouterState)(i))?n:u.pathname}}n(6118),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return m}});let r=n(3079),o=n(6866),u=n(1634),l=n(3456),a=n(5967),i=n(1935),c=n(3237),s=n(4510),f=n(7420),d=n(2846),p=n(8077),h=n(7831),y=n(232),_=n(1311),{createFromFetch:v,encodeReply:b}=n(6671);async function g(e,t,n){let l,{actionId:a,actionArgs:i}=n,c=await b(i),s=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:a,[o.NEXT_ROUTER_STATE_TREE]:(0,_.prepareFlightRouterStateForRequest)(e.tree),...t?{[o.NEXT_URL]:t}:{}},body:c}),f=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");l={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){l={paths:[],tag:!1,cookie:!1}}let d=f?new URL((0,u.addBasePath)(f),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await v(Promise.resolve(s),{callServer:r.callServer});if(f){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:d,revalidatedParts:l}}let[t,[,n]]=null!=e?e:[];return{actionResult:t,actionFlightData:n,redirectLocation:d,revalidatedParts:l}}return{redirectLocation:d,revalidatedParts:l}}function m(e,t){let{resolve:n,reject:r}=t,o={},u=e.canonicalUrl,_=e.tree;o.preserveCustomHistoryState=!1;let v=e.nextUrl&&(0,p.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null;return o.inFlightServerAction=g(e,v,t),o.inFlightServerAction.then(async r=>{let{actionResult:p,actionFlightData:b,redirectLocation:g}=r;if(g&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!b)return(n(p),g)?(0,a.handleExternalUrl)(e,o,g.href,e.pushRef.pendingPush):e;if("string"==typeof b)return(0,a.handleExternalUrl)(e,o,b,e.pushRef.pendingPush);if(o.inFlightServerAction=null,g){let e=(0,l.createHrefFromUrl)(g,!1);o.canonicalUrl=e}for(let n of b){if(3!==n.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[r]=n,s=(0,i.applyRouterStatePatchToTree)([""],_,r,g?(0,l.createHrefFromUrl)(g):e.canonicalUrl);if(null===s)return(0,h.handleSegmentMismatch)(e,t,r);if((0,c.isNavigatingToNewRootLayout)(_,s))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[p,b]=n.slice(-2),m=null!==p?p[2]:null;if(null!==m){let t=(0,d.createEmptyCacheNode)();t.rsc=m,t.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(t,void 0,r,p,b),await (0,y.refreshInactiveParallelSegments)({state:e,updatedTree:s,updatedCache:t,includeNextUrl:!!v,canonicalUrl:o.canonicalUrl||e.canonicalUrl}),o.cache=t,o.prefetchCache=new Map}o.patchedTree=s,_=s}return n(p),(0,s.handleMutable)(e,o)},t=>(r(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let r=n(3456),o=n(1935),u=n(3237),l=n(5967),a=n(2356),i=n(4510),c=n(2846),s=n(7831);function f(e,t){let{serverResponse:n}=t,[f,d]=n,p={};if(p.preserveCustomHistoryState=!1,"string"==typeof f)return(0,l.handleExternalUrl)(e,p,f,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let n of f){let i=n.slice(0,-4),[f]=n.slice(-3,-2),_=(0,o.applyRouterStatePatchToTree)(["",...i],h,f,e.canonicalUrl);if(null===_)return(0,s.handleSegmentMismatch)(e,t,f);if((0,u.isNavigatingToNewRootLayout)(h,_))return(0,l.handleExternalUrl)(e,p,e.canonicalUrl,e.pushRef.pendingPush);let v=d?(0,r.createHrefFromUrl)(d):void 0;v&&(p.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(y,b,n),p.patchedTree=_,p.cache=b,y=b,h=_}return(0,i.handleMutable)(e,p)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,n){let[r,o,,l]=t;for(let a in r.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=n,t[3]="refresh"),o)e(o[a],n)}},refreshInactiveParallelSegments:function(){return l}});let r=n(2356),o=n(4848),u=n(4541);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{state:t,updatedTree:n,updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c=n,canonicalUrl:s}=e,[,f,d,p]=n,h=[];if(d&&d!==s&&"refresh"===p&&!i.has(d)){i.add(d);let e=(0,o.fetchServerResponse)(new URL(d,location.origin),[c[0],c[1],c[2],"refetch"],l?t.nextUrl:null,t.buildId).then(e=>{let t=e[0];if("string"!=typeof t)for(let e of t)(0,r.applyFlightData)(u,u,e)});h.push(e)}for(let e in f){let n=a({state:t,updatedTree:f[e],updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c,canonicalUrl:s});h.push(n)}await Promise.all(h)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4673:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return s},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",a="navigate",i="restore",c="server-patch",s="prefetch",f="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let r=n(4673),o=n(5967),u=n(8448),l=n(7784),a=n(9601),i=n(4819),c=n(4529),s=n(3722),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case r.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case r.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case r.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case r.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case r.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case r.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case r.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,n){let[o,u]=n,[l,a]=t;return(0,r.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let r=n(6015);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createDynamicallyTrackedSearchParams:function(){return a},createUntrackedSearchParams:function(){return l}});let r=n(1845),o=n(6999),u=n(650);function l(e){let t=r.staticGenerationAsyncStorage.getStore();return t&&t.forceStatic?{}:e}function a(e){let t=r.staticGenerationAsyncStorage.getStore();return t?t.forceStatic?{}:t.isStaticGeneration||t.dynamicShouldError?new Proxy({},{get:(e,n,r)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),u.ReflectAdapter.get(e,n,r)),has:(e,n)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),Reflect.has(e,n)),ownKeys:e=>((0,o.trackDynamicDataAccessed)(t,"searchParams"),Reflect.ownKeys(e))}):e:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});let r=n(30);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6864:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{StaticGenBailoutError:function(){return r},isStaticGenBailoutError:function(){return o}});let n="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{useReducerWithReduxDevtools:function(){return i},useUnwrapState:function(){return a}});let r=n(3099)._(n(2265)),o=n(4673),u=n(2103);function l(e){if(e instanceof Map){let t={};for(let[n,r]of e.entries()){if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r._bundlerConfig){t[n]="FlightData";continue}}t[n]=l(r)}return t}if("object"==typeof e&&null!==e){let t={};for(let n in e){let r=e[n];if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r.hasOwnProperty("_bundlerConfig")){t[n]="FlightData";continue}}t[n]=l(r)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,r.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,n]=r.default.useState(e),o=(0,r.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,r.useRef)(),i=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,r.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,n)},[o,e]),(0,r.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1311:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prepareFlightRouterStateForRequest",{enumerable:!0,get:function(){return o}});let r=n(4541);function o(e,t){return t?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(JSON.stringify(function e(t){let[n,o,,u,l]=t,a="string"==typeof n&&n.startsWith(r.PAGE_SEGMENT_KEY+"?")?r.PAGE_SEGMENT_KEY:n,i={};for(let[t,n]of Object.entries(o))i[t]=e(n);let c=[a,i,null,u&&"refresh"!==u?u:null];return void 0!==l&&(c[4]=l),c}(e)))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let r=n(580);function o(e){return(0,r.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let r=n(6674),o=n(3381),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:u}=(0,o.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(8993);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,r.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5076:function(e,t,n){"use strict";function r(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(1283),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2010:function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0>>1,o=e[r];if(0>>1;ru(i,n))cu(s,i)?(e[r]=s,e[c]=n,r=c):(e[r]=i,e[a]=n,r=a);else if(cu(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function R(e){for(var t=r(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,n(s,t);else break;t=r(f)}}function P(e){if(v=!1,R(e),!_){if(null!==r(s))_=!0,C();else{var t=r(f);null!==t&&A(P,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j=!1,O=-1,E=5,S=-1;function w(){return!(t.unstable_now()-Se&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,R(e),n=!0;break t}p===r(s)&&o(s),R(e)}else o(s);p=r(s)}if(null!==p)n=!0;else{var c=r(f);null!==c&&A(P,c.startTime-e),n=!1}}break e}finally{p=null,h=u,y=!1}n=void 0}}finally{n?l():j=!1}}}if("function"==typeof m)l=function(){m(M)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,x=T.port2;T.port1.onmessage=M,l=function(){x.postMessage(null)}}else l=function(){b(M,0)};function C(){j||(j=!0,l())}function A(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,C())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,n(f,e),null===r(s)&&e===r(f)&&(v?(g(O),O=-1):v=!0,A(P,u-l))):(e.sortIndex=a,n(s,e),_||y||(_=!0,C())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},1767:function(e,t,n){"use strict";e.exports=n(2010)},934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getPathname:function(){return r},isFullStringUrl:function(){return o},parseUrl:function(){return u}});let n="http://n";function r(e){return new URL(e,n).pathname}function o(e){return/https?:\/\//.test(e)}function u(e){let t;try{t=new URL(e,n)}catch{}return t}},6999:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return c},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return s},trackDynamicDataAccessed:function(){return f},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return y}});let o=(r=n(2265))&&r.__esModule?r:{default:r},u=n(6177),l=n(6864),a=n(934),i="function"==typeof o.default.unstable_postpone;function c(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function s(e,t){let n=(0,a.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}}function f(e,t){let n=(0,a.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${n} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}function d({reason:e,prerenderState:t,pathname:n}){h(t,e,n)}function p(e,t){e.prerenderState&&h(e.prerenderState,t,e.urlPathname)}function h(e,t,n){v();let r=`Route ${n} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),o.default.unstable_postpone(r)}function y(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" ()")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}: +${t}`))}function v(){if(!i)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")}function b(e){v();let t=new AbortController;try{o.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}},7417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let r=n(1182);function o(e){let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:t?"catchall-intercepted":"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:t?"dynamic-intercepted":"dynamic",param:e.slice(1,-1)}:null}},647:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HMR_ACTIONS_SENT_TO_BROWSER",{enumerable:!0,get:function(){return n}}),(r=n||(n={})).ADDED_PAGE="addedPage",r.REMOVED_PAGE="removedPage",r.RELOAD_PAGE="reloadPage",r.SERVER_COMPONENT_CHANGES="serverComponentChanges",r.MIDDLEWARE_CHANGES="middlewareChanges",r.CLIENT_CHANGES="clientChanges",r.SERVER_ONLY_CHANGES="serverOnlyChanges",r.SYNC="sync",r.BUILT="built",r.BUILDING="building",r.DEV_PAGES_MANIFEST_UPDATE="devPagesManifestUpdate",r.TURBOPACK_MESSAGE="turbopack-message",r.SERVER_ERROR="serverError",r.TURBOPACK_CONNECTED="turbopack-connected"},1182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return l},isInterceptionRouteAppPath:function(){return u}});let r=n(926),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,n,u;for(let r of e.split("/"))if(n=o.find(e=>r.startsWith(e))){[t,u]=e.split(n,2);break}if(!t||!n||!u)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":u="/"===t?`/${u}`:t+"/"+u;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},650:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,n){let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},1956:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return l},LayoutRouterContext:function(){return u},MissingSlotContext:function(){return i},TemplateContext:function(){return a}});let r=n(7043)._(n(2265)),o=r.default.createContext(null),u=r.default.createContext(null),l=r.default.createContext(null),a=r.default.createContext(null),i=r.default.createContext(new Set)},7207:function(e,t){"use strict";function n(e){let t=5381;for(let n=0;n>>0}function r(e){return n(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{djb2Hash:function(){return n},hexHash:function(){return r}})},8701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return r}});let r=n(7043)._(n(2265)).default.createContext({})},9060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PathParamsContext:function(){return l},PathnameContext:function(){return u},SearchParamsContext:function(){return o}});let r=n(2265),o=(0,r.createContext)(null),u=(0,r.createContext)(null),l=(0,r.createContext)(null)},8993:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{BailoutToCSRError:function(){return r},isBailoutToCSRError:function(){return o}});let n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class r extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}},8162:function(e,t){"use strict";function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},2103:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let r=n(3099),o=n(4673),u=n(1450),l=r._(n(2265)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending?c({actionQueue:e,action:e.pending,setState:t}):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},t)))}async function c(e){let{actionQueue:t,action:n,setState:r}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=n;let l=n.payload,a=t.action(u,l);function c(e){n.discarded||(t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,r),n.resolve(e))}(0,o.isThenable)(a)?a.then(c,e=>{i(t,r),n.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,n)=>(function(e,t,n){let r={resolve:n,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{r={resolve:e,reject:t}});(0,l.startTransition)(()=>{n(e)})}let u={payload:t,next:null,resolve:r.resolve,reject:r.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:n})):t.type===o.ACTION_NAVIGATE||t.type===o.ACTION_RESTORE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:n})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,n),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},8498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let r=n(3381);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:o,hash:u}=(0,r.parsePath)(e);return""+t+n+o+u}},926:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let r=n(8162),o=n(4541);function u(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},7092:function(e,t){"use strict";function n(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let n=document.documentElement,r=n.style.scrollBehavior;n.style.scrollBehavior="auto",t.dontForceLayout||n.getClientRects(),e(),n.style.scrollBehavior=r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return n}})},6146:function(e,t){"use strict";function n(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return n}})},3381:function(e,t){"use strict";function n(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return n}})},580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let r=n(3381);function o(e,t){if("string"!=typeof e)return!1;let{pathname:n}=(0,r.parsePath)(e);return n===t||n.startsWith(t+"/")}},6674:function(e,t){"use strict";function n(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return n}})},4541:function(e,t){"use strict";function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",o="__DEFAULT__"},5501:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let r=n(3099)._(n(2265)),o=r.default.createContext(null);function u(e){let t=(0,r.useContext)(o);t&&t(e)}},1765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},7149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(4832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9134:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(4832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(4832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4040:function(e,t,n){"use strict";var r=n(4887);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},4887:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4417)},7950:function(e,t,n){"use strict";var r=n(4887),o={stream:!0},u=Object.prototype.hasOwnProperty,l=new Map;function a(e){var t=n(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function i(){}var c=new Map,s=n.u;n.u=function(e){var t=c.get(e);return void 0!==t?t:s(e)};var f=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,d=Symbol.for("react.element"),p=Symbol.for("react.lazy"),h=Symbol.iterator,y=Array.isArray,_=Object.getPrototypeOf,v=Object.prototype,b=new WeakMap;function g(e,t,n,r){this.status=e,this.value=t,this.reason=n,this._response=r}function m(e){switch(e.status){case"resolved_model":w(e);break;case"resolved_module":M(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function R(e,t){for(var n=0;nh?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(m=d[p++])?h=4:v=v<<4|(96d.length&&(m=-1)}var R=d.byteOffset+p;if(-1i(e=>!e),close:()=>i(!1),open:()=>i(!0)},children:t})}function l(){let e=(0,n.useContext)(s);if(void 0===e)throw Error("useSidebar must be used within a Providers");return e}},3263:function(e,t,a){a.d(t,{Y0:function(){return f},KG:function(){return w},Z7:function(){return C}});var r=a(7437),n=a(2265),s=a(401),i=a(2489),l=a(4508),o=a(9322),c=a(6865),d=a(3245);let u={PAYMENT_DUE:o.Z,BUDGET_WARNING:c.Z,CARD_CLOSING:d.Z,CARD_DUE:o.Z,SAVINGS_GOAL:d.Z,UNUSUAL_SPENDING:c.Z};function m(e){let{type:t,className:a}=e,n=u[t];return(0,r.jsx)(n,{className:(0,l.cn)("h-5 w-5",a)})}let x={info:{bg:"bg-blue-900/50",border:"border-l-blue-500",icon:"text-blue-400"},warning:{bg:"bg-amber-900/50",border:"border-l-amber-500",icon:"text-amber-400"},danger:{bg:"bg-red-900/50",border:"border-l-red-500",icon:"text-red-400"}};function f(e){let{alert:t,onDismiss:a,onMarkRead:o}=e,[c,d]=(0,n.useState)(!0),[u,f]=(0,n.useState)(!1),h=x[t.severity];return c?(0,r.jsx)("div",{className:(0,l.cn)("relative overflow-hidden rounded-r-lg border-l-4 p-4","transition-all duration-300 ease-out","animate-in slide-in-from-top-2",u&&"animate-out slide-out-to-top-2 opacity-0",h.bg,h.border),role:"alert",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:(0,l.cn)("flex-shrink-0 mt-0.5",h.icon),children:(0,r.jsx)(m,{type:t.type})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h4",{className:"font-semibold text-white text-sm",children:t.title}),(0,r.jsx)("p",{className:"mt-1 text-sm text-gray-300",children:t.message})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[!t.isRead&&(0,r.jsx)("button",{onClick:()=>{f(!0),setTimeout(()=>{d(!1),o()},300)},className:(0,l.cn)("p-1.5 rounded-md transition-colors","text-gray-400 hover:text-white hover:bg-white/10","focus:outline-none focus:ring-2 focus:ring-white/20"),title:"Marcar como le\xedda","aria-label":"Marcar como le\xedda",children:(0,r.jsx)(s.Z,{className:"h-4 w-4"})}),(0,r.jsx)("button",{onClick:()=>{f(!0),setTimeout(()=>{d(!1),a()},300)},className:(0,l.cn)("p-1.5 rounded-md transition-colors","text-gray-400 hover:text-white hover:bg-white/10","focus:outline-none focus:ring-2 focus:ring-white/20"),title:"Cerrar","aria-label":"Cerrar alerta",children:(0,r.jsx)(i.Z,{className:"h-4 w-4"})})]})]})}):null}var h=a(8930);let g={info:"text-blue-400",warning:"text-amber-400",danger:"text-red-400"};function b(e){let{alert:t,onMarkRead:a,onDelete:i}=e,[o,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:(0,l.cn)("group relative flex items-center gap-3 p-3 rounded-lg","transition-all duration-200","hover:bg-white/5",d&&"opacity-0 -translate-x-4",!t.isRead&&"bg-white/[0.02]"),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),role:"listitem",children:[!t.isRead&&(0,r.jsx)("span",{className:"absolute left-1 top-1/2 -translate-y-1/2 h-2 w-2 rounded-full bg-blue-500"}),(0,r.jsx)("div",{className:(0,l.cn)("flex-shrink-0",g[t.severity],!t.isRead&&"ml-3"),children:(0,r.jsx)(m,{type:t.type,className:"h-4 w-4"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:(0,l.cn)("text-sm truncate",t.isRead?"text-gray-400":"text-white font-medium"),children:t.title}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:function(e){let t=new Date,a=new Date(e),r=t.getTime()-a.getTime(),n=Math.floor(r/6e4),s=Math.floor(r/36e5),i=Math.floor(r/864e5);return n<1?"ahora":n<60?"hace ".concat(n," min"):s<24?"hace ".concat(s," hora").concat(s>1?"s":""):1===i?"ayer":i<7?"hace ".concat(i," d\xedas"):a.toLocaleDateString("es-AR",{day:"numeric",month:"short"})}(t.date)})]}),(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center gap-1 transition-opacity duration-200",o?"opacity-100":"opacity-0"),children:[!t.isRead&&(0,r.jsx)("button",{onClick:()=>{u(!0),setTimeout(()=>{a()},200)},className:(0,l.cn)("p-1.5 rounded-md transition-colors","text-gray-500 hover:text-green-400 hover:bg-green-400/10","focus:outline-none focus:ring-2 focus:ring-green-400/20"),title:"Marcar como le\xedda","aria-label":"Marcar como le\xedda",children:(0,r.jsx)(s.Z,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("button",{onClick:()=>{u(!0),setTimeout(()=>{i()},200)},className:(0,l.cn)("p-1.5 rounded-md transition-colors","text-gray-500 hover:text-red-400 hover:bg-red-400/10","focus:outline-none focus:ring-2 focus:ring-red-400/20"),title:"Eliminar","aria-label":"Eliminar alerta",children:(0,r.jsx)(h.Z,{className:"h-3.5 w-3.5"})})]})]})}var p=a(4766),y=a(9196),v=a(9801),j=a(4835);function N(e){let{count:t,variant:a="default"}=e;return 0===t?null:"dot"===a?(0,r.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 rounded-full bg-red-500 animate-pulse"}):(0,r.jsx)("span",{className:(0,l.cn)("inline-flex items-center justify-center min-w-[20px] h-5 px-1.5","rounded-full bg-red-500 text-white text-xs font-medium","animate-pulse"),children:t>99?"99+":t})}function w(){let[e,t]=(0,n.useState)("all"),a=(0,j.J)(e=>e.alerts),s=(0,j.J)(e=>e.markAlertAsRead),i=(0,j.J)(e=>e.deleteAlert),o=(0,j.J)(e=>e.clearAllAlerts),c=a.filter(e=>!e.isRead),d=c.length,u="unread"===e?c:a;return(0,r.jsxs)("div",{className:"w-full max-w-md bg-gray-900 rounded-xl border border-gray-800 shadow-xl",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-gray-800",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(p.Z,{className:"h-5 w-5 text-gray-400"}),d>0&&(0,r.jsx)(N,{count:d,variant:"dot"})]}),(0,r.jsx)("h3",{className:"font-semibold text-white",children:"Alertas"}),d>0&&(0,r.jsxs)("span",{className:"text-xs text-gray-500",children:["(",d,")"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[d>0&&(0,r.jsx)("button",{onClick:()=>{c.forEach(e=>{s(e.id)})},className:(0,l.cn)("p-2 rounded-md transition-colors","text-gray-500 hover:text-green-400 hover:bg-green-400/10","focus:outline-none focus:ring-2 focus:ring-green-400/20"),title:"Marcar todas como le\xeddas","aria-label":"Marcar todas como le\xeddas",children:(0,r.jsx)(y.Z,{className:"h-4 w-4"})}),a.length>0&&(0,r.jsx)("button",{onClick:()=>{o()},className:(0,l.cn)("p-2 rounded-md transition-colors","text-gray-500 hover:text-red-400 hover:bg-red-400/10","focus:outline-none focus:ring-2 focus:ring-red-400/20"),title:"Limpiar todas","aria-label":"Limpiar todas las alertas",children:(0,r.jsx)(h.Z,{className:"h-4 w-4"})})]})]}),a.length>0&&(0,r.jsxs)("div",{className:"flex border-b border-gray-800",children:[(0,r.jsxs)("button",{onClick:()=>t("all"),className:(0,l.cn)("flex-1 px-4 py-2 text-sm font-medium transition-colors","focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500/20","all"===e?"text-white border-b-2 border-blue-500":"text-gray-500 hover:text-gray-300"),children:["Todas",(0,r.jsxs)("span",{className:"ml-1.5 text-xs text-gray-600",children:["(",a.length,")"]})]}),(0,r.jsxs)("button",{onClick:()=>t("unread"),className:(0,l.cn)("flex-1 px-4 py-2 text-sm font-medium transition-colors","focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500/20","unread"===e?"text-white border-b-2 border-blue-500":"text-gray-500 hover:text-gray-300"),children:["No le\xeddas",d>0&&(0,r.jsxs)("span",{className:"ml-1.5 text-xs text-blue-400",children:["(",d,")"]})]})]}),(0,r.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===u.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center",children:[(0,r.jsx)("div",{className:"h-12 w-12 rounded-full bg-gray-800 flex items-center justify-center mb-3",children:(0,r.jsx)(v.Z,{className:"h-6 w-6 text-gray-600"})}),(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:"unread"===e?"No tienes alertas sin leer":"No tienes alertas"}),(0,r.jsx)("p",{className:"text-gray-600 text-xs mt-1",children:"Las alertas aparecer\xe1n cuando haya pagos pr\xf3ximos o eventos importantes"})]}):(0,r.jsx)("div",{className:"divide-y divide-gray-800/50",role:"list",children:u.map(e=>(0,r.jsx)(b,{alert:e,onMarkRead:()=>s(e.id),onDelete:()=>i(e.id)},e.id))})})]})}var D=a(3261);function C(){let e=(0,j.J)(e=>e.alerts),t=(0,j.J)(e=>e.addAlert),a=(0,j.J)(e=>e.clearAllAlerts),r=(0,j.J)(e=>e.fixedDebts),s=(0,j.J)(e=>e.variableDebts),i=(0,j.J)(e=>e.creditCards),l=(0,j.J)(e=>e.monthlyBudgets),o=(0,j.J)(e=>e.currentMonth),c=(0,j.J)(e=>e.currentYear),d=(0,n.useMemo)(()=>e.filter(e=>!e.isRead),[e]);return{alerts:e,unreadCount:d.length,unreadAlerts:d,regenerateAlerts:(0,n.useCallback)(()=>{let e=(0,D.Bn)({fixedDebts:r,variableDebts:s,creditCards:i,monthlyBudgets:l,currentMonth:o,currentYear:c});return a(),e.forEach(e=>{t({...e,isRead:!1})}),e.length},[r,s,i,l,o,c,a,t]),dismissAll:(0,n.useCallback)(()=>{a()},[a])}}},553:function(e,t,a){a.d(t,{h4:function(){return N},zM:function(){return D},YE:function(){return p}});var r=a(7437),n=a(5466),s=a(1804),i=a(8226),l=a(2568),o=a(5846),c=a(8728),d=a(4766),u=a(2489),m=a(7648),x=a(9376);let f={sm:{icon:24,text:"text-lg"},md:{icon:32,text:"text-xl"},lg:{icon:40,text:"text-2xl"}};function h(e){let{size:t="md",showText:a=!0}=e,{icon:n,text:i}=f[t];return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsx)(s.Z,{className:"text-emerald-500",size:n,strokeWidth:2})}),a&&(0,r.jsx)("span",{className:"font-bold text-slate-100 ".concat(i),children:"Finanzas"})]})}var g=a(257);let b=[{name:"Dashboard",href:"/",icon:n.Z},{name:"Deudas",href:"/debts",icon:s.Z},{name:"Tarjetas",href:"/cards",icon:i.Z},{name:"Presupuesto",href:"/budget",icon:l.Z},{name:"Servicios",href:"/services",icon:o.Z},{name:"Configuraci\xf3n",href:"/settings",icon:c.Z},{name:"Alertas",href:"/alerts",icon:d.Z,hasBadge:!0}];function p(e){let{isOpen:t,onClose:a,unreadAlertsCount:n=0}=e,s=(0,x.usePathname)(),i=e=>"/"===e?"/"===s:s.startsWith(e);return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:a,"aria-hidden":"true"}),(0,r.jsx)("aside",{className:"\n fixed top-0 left-0 z-50 h-full w-64 bg-slate-900 border-r border-slate-800\n transform transition-transform duration-300 ease-in-out\n lg:translate-x-0 lg:static lg:h-screen\n ".concat(t?"translate-x-0":"-translate-x-full","\n "),children:(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-slate-800",children:[(0,r.jsx)(h,{size:"md",showText:!0}),(0,r.jsx)("button",{onClick:a,className:"lg:hidden p-2 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded-lg transition-colors","aria-label":"Cerrar men\xfa",children:(0,r.jsx)(u.Z,{className:"w-5 h-5"})})]}),(0,r.jsx)("nav",{className:"flex-1 overflow-y-auto py-4 px-3",children:(0,r.jsx)("ul",{className:"space-y-1",children:b.map(e=>{let t=i(e.href),s=e.icon;return(0,r.jsx)("li",{children:(0,r.jsxs)(m.default,{href:e.href,onClick:a,className:"\n flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium\n transition-colors relative\n ".concat(t?"bg-slate-800 text-emerald-400 border-l-2 border-emerald-500":"text-slate-300 hover:bg-slate-800 hover:text-slate-100","\n "),children:[(0,r.jsx)(s,{className:"w-5 h-5 flex-shrink-0"}),(0,r.jsx)("span",{className:"flex-1",children:e.name}),e.hasBadge&&n>0&&(0,r.jsx)("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold bg-red-500 text-white rounded-full",children:n>99?"99+":n})]})},e.name)})})}),(0,r.jsx)("div",{className:"p-4 border-t border-slate-800",children:(0,r.jsxs)("p",{className:"text-xs text-slate-500 text-center",children:["Finanzas v",g.env.NEXT_PUBLIC_APP_VERSION||"1.0.0"]})})]})})]})}var y=a(8293),v=a(2514),j=a(7240);function N(e){let{onMenuClick:t,title:a}=e,n=(0,v.WU)(new Date,"EEEE, d 'de' MMMM 'de' yyyy",{locale:j.es}),s=n.charAt(0).toUpperCase()+n.slice(1);return(0,r.jsx)("header",{className:"sticky top-0 z-30 bg-slate-900/95 backdrop-blur-sm border-b border-slate-800",children:(0,r.jsxs)("div",{className:"flex items-center justify-between h-16 px-4 md:px-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("button",{onClick:t,className:"lg:hidden p-2 -ml-2 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded-lg transition-colors","aria-label":"Abrir men\xfa",children:(0,r.jsx)(y.Z,{className:"w-6 h-6"})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"lg:hidden",children:(0,r.jsx)(h,{size:"sm",showText:!1})}),(0,r.jsx)("h1",{className:"text-lg md:text-xl font-semibold text-slate-100",children:a})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("div",{className:"hidden md:flex items-center gap-2",children:(0,r.jsx)(h,{size:"sm",showText:!0})}),(0,r.jsx)("time",{className:"text-sm text-slate-400 hidden sm:block",children:s})]})]})})}let w=[{name:"Dashboard",href:"/",icon:n.Z},{name:"Deudas",href:"/debts",icon:s.Z},{name:"Tarjetas",href:"/cards",icon:i.Z},{name:"Presupuesto",href:"/budget",icon:l.Z},{name:"Alertas",href:"/alerts",icon:d.Z,hasBadge:!0}];function D(e){let{unreadAlertsCount:t=0}=e,a=(0,x.usePathname)(),n=e=>"/"===e?"/"===a:a.startsWith(e);return(0,r.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-40 bg-slate-900 border-t border-slate-800 lg:hidden",children:(0,r.jsx)("ul",{className:"flex items-center justify-around h-16",children:w.map(e=>{let a=n(e.href),s=e.icon;return(0,r.jsx)("li",{className:"flex-1",children:(0,r.jsxs)(m.default,{href:e.href,className:"\n flex flex-col items-center justify-center gap-1 py-2\n transition-colors relative\n ".concat(a?"text-emerald-500":"text-slate-400 hover:text-slate-300","\n "),children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(s,{className:"w-6 h-6"}),e.hasBadge&&t>0&&(0,r.jsx)("span",{className:"absolute -top-1 -right-1 flex items-center justify-center min-w-[16px] h-4 px-1 text-[10px] font-semibold bg-red-500 text-white rounded-full",children:t>99?"99+":t})]}),(0,r.jsx)("span",{className:"text-[10px] font-medium",children:e.name})]})},e.name)})})})}},3261:function(e,t,a){a.d(t,{B0:function(){return n},Bn:function(){return i},FB:function(){return s}});var r=a(4508);function n(e,t,a){return e.find(e=>e.month===t&&e.year===a)||null}function s(e,t){return(0,r.zF)(e)+(0,r.Q0)(t)}function i(e){let{fixedDebts:t,variableDebts:a,creditCards:i,monthlyBudgets:l,currentMonth:o,currentYear:c}=e,d=function(e){let t=new Set;return e.filter(e=>{let a="".concat(e.type,"-").concat(e.relatedId||"global");return!t.has(a)&&(t.add(a),!0)})}([...function(e){let t=function(e,t){let a=new Date,n=a.getDate(),s=a.getMonth(),i=a.getFullYear();return e.filter(e=>!e.isPaid).map(e=>{let t=new Date(i,s,e.dueDay);return n>e.dueDay&&(t=new Date(i,s+1,e.dueDay)),{debt:e,daysUntil:(0,r.P8)(t),dueDate:t}}).filter(e=>{let{daysUntil:t}=e;return t>=0&&t<=3}).sort((e,t)=>e.daysUntil-t.daysUntil)}(e,0),a=[];for(let{debt:e,daysUntil:n}of t){let t=n<=1?"danger":"warning",s=0===n?"hoy":1===n?"ma\xf1ana":"en ".concat(n," d\xedas");a.push({type:"PAYMENT_DUE",title:"Pago pr\xf3ximo",message:"'".concat(e.name,"' vence ").concat(s,": ").concat((0,r.xG)(e.amount)),severity:t,relatedId:e.id})}return a}(t),...function(e,t,a,r,i){let l=n(a,r,i);if(!l)return[];let o=l.fixedExpenses+l.variableExpenses;if(o<=0)return[];let c=s(e,t)/o*100;return c<80?[]:[{type:"BUDGET_WARNING",title:"Presupuesto al l\xedmite",message:"Has usado el ".concat(c.toFixed(1),"% de tu presupuesto mensual"),severity:c>95?"danger":"warning"}]}(t,a,l,o,c),...function(e){let t=function(e,t){let a=[];for(let t of e){let e=(0,r.JG)(t.closingDay),n=(0,r.P8)(e);n>=0&&n<=3&&a.push({card:t,type:"closing",daysUntil:n,date:e});let s=(0,r.JG)(t.dueDay),i=(0,r.P8)(s);i>=0&&i<=3&&a.push({card:t,type:"due",daysUntil:i,date:s})}return a.sort((e,t)=>e.daysUntil-t.daysUntil)}(e,0),a=[],n=[];for(let e of t)if("closing"===e.type){let t=0===e.daysUntil?"hoy":1===e.daysUntil?"ma\xf1ana":"en ".concat(e.daysUntil," d\xedas");a.push({type:"CARD_CLOSING",title:"Cierre de tarjeta pr\xf3ximo",message:"Tu tarjeta ".concat(e.card.name," cierra ").concat(t,". Balance: ").concat((0,r.xG)(e.card.currentBalance)),severity:"info",relatedId:e.card.id})}else{let t=e.daysUntil<=2?"warning":"info",a=0===e.daysUntil?"hoy":1===e.daysUntil?"ma\xf1ana":"en ".concat(e.daysUntil," d\xedas");n.push({type:"CARD_DUE",title:"Vencimiento de tarjeta",message:"Vencimiento de ".concat(e.card.name," ").concat(a,". Balance: ").concat((0,r.xG)(e.card.currentBalance)),severity:t,relatedId:e.card.id})}return[...a,...n]}(i),...function(e,t,a,r,i){let l=n(a,r,i);if(!l||l.savingsGoal<=0)return[];let o=s(e,t),c=l.totalIncome-o;if(c>=l.savingsGoal)return[];let d=(l.savingsGoal-c)/l.savingsGoal*100;return[{type:"SAVINGS_GOAL",title:"Meta de ahorro",message:"Vas ".concat(d.toFixed(0),"% por debajo de tu meta de ahorro mensual"),severity:"info"}]}(t,a,l,o,c)]),u={danger:0,warning:1,info:2};return d.sort((e,t)=>u[e.severity]-u[t.severity])}},4835:function(e,t,a){a.d(t,{J:function(){return m}});var r=a(3011),n=a(6885),s=a(4147);let i=e=>({fixedDebts:[],variableDebts:[],addFixedDebt:t=>e(e=>({fixedDebts:[...e.fixedDebts,{...t,id:(0,s.Z)()}]})),updateFixedDebt:(t,a)=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteFixedDebt:t=>e(e=>({fixedDebts:e.fixedDebts.filter(e=>e.id!==t)})),toggleFixedDebtPaid:t=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)})),addVariableDebt:t=>e(e=>({variableDebts:[...e.variableDebts,{...t,id:(0,s.Z)()}]})),updateVariableDebt:(t,a)=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteVariableDebt:t=>e(e=>({variableDebts:e.variableDebts.filter(e=>e.id!==t)})),toggleVariableDebtPaid:t=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),l=e=>({creditCards:[],cardPayments:[],addCreditCard:t=>e(e=>({creditCards:[...e.creditCards,{...t,id:(0,s.Z)()}]})),updateCreditCard:(t,a)=>e(e=>({creditCards:e.creditCards.map(e=>e.id===t?{...e,...a}:e)})),deleteCreditCard:t=>e(e=>({creditCards:e.creditCards.filter(e=>e.id!==t)})),addCardPayment:t=>e(e=>({cardPayments:[...e.cardPayments,{...t,id:(0,s.Z)()}]})),deleteCardPayment:t=>e(e=>({cardPayments:e.cardPayments.filter(e=>e.id!==t)}))}),o=new Date,c=e=>({monthlyBudgets:[],currentMonth:o.getMonth()+1,currentYear:o.getFullYear(),setMonthlyBudget:t=>e(e=>{let a=e.monthlyBudgets.findIndex(e=>e.month===t.month&&e.year===t.year);if(a>=0){let r=[...e.monthlyBudgets];return r[a]=t,{monthlyBudgets:r}}return{monthlyBudgets:[...e.monthlyBudgets,t]}}),updateMonthlyBudget:(t,a,r)=>e(e=>({monthlyBudgets:e.monthlyBudgets.map(e=>e.month===t&&e.year===a?{...e,...r}:e)}))}),d=e=>({alerts:[],addAlert:t=>e(e=>({alerts:[...e.alerts,{...t,id:(0,s.Z)(),date:new Date().toISOString()}]})),markAlertAsRead:t=>e(e=>({alerts:e.alerts.map(e=>e.id===t?{...e,isRead:!0}:e)})),deleteAlert:t=>e(e=>({alerts:e.alerts.filter(e=>e.id!==t)})),clearAllAlerts:()=>e(()=>({alerts:[]}))}),u=e=>({serviceBills:[],addServiceBill:t=>e(e=>({serviceBills:[...e.serviceBills,{...t,id:(0,s.Z)(),isPaid:!1}]})),deleteServiceBill:t=>e(e=>({serviceBills:e.serviceBills.filter(e=>e.id!==t)})),toggleServiceBillPaid:t=>e(e=>({serviceBills:e.serviceBills.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),m=(0,r.U)()((0,n.tJ)(function(){for(var e=arguments.length,t=Array(e),a=0;ae&&(i+=1)>11&&(i=0,s+=1);let l=new Date(s,i+1,0).getDate();return new Date(s,i,Math.min(e,l))}function d(e){if(e<1||e>12)throw Error("El mes debe estar entre 1 y 12");return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][e-1]}function u(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function m(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function x(e,t){return(t?e.filter(e=>e.cardId===t):e).reduce((e,t)=>e+t.amount,0)}function f(e){return c(e)}function h(e){return c(e)}function g(e,t){return t<=0?0:Math.min(Math.max(e/t*100,0),100)}}}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/697-93a9cd29100d0d50.js b/dist/_next/static/chunks/697-93a9cd29100d0d50.js new file mode 100644 index 0000000..6398ca5 --- /dev/null +++ b/dist/_next/static/chunks/697-93a9cd29100d0d50.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[697],{8755:function(e,r,o){o.d(r,{Z:function(){return m}});var t=o(2265);let l=function(){for(var e=arguments.length,r=Array(e),o=0;o!!e&&""!==e.trim()&&o.indexOf(e)===r).join(" ").trim()},a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),s=e=>{let r=n(e);return r.charAt(0).toUpperCase()+r.slice(1)};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1},c=(0,t.forwardRef)((e,r)=>{let{color:o="currentColor",size:a=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:c="",children:m,iconNode:p,...u}=e;return(0,t.createElement)("svg",{ref:r,...i,width:a,height:a,stroke:o,strokeWidth:s?24*Number(n)/Number(a):n,className:l("lucide",c),...!m&&!d(u)&&{"aria-hidden":"true"},...u},[...p.map(e=>{let[r,o]=e;return(0,t.createElement)(r,o)}),...Array.isArray(m)?m:[m]])}),m=(e,r)=>{let o=(0,t.forwardRef)((o,n)=>{let{className:i,...d}=o;return(0,t.createElement)(c,{ref:n,iconNode:r,className:l("lucide-".concat(a(s(e))),"lucide-".concat(e),i),...d})});return o.displayName=s(e),o}},1994:function(e,r,o){o.d(r,{W:function(){return t}});function t(){for(var e,r,o=0,t="",l=arguments.length;o{let o=Array(e.length+r.length);for(let r=0;r({classGroupId:e,validator:r}),a=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),n=[],s=e=>{let r=c(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return d(e);let o=e.split("-"),t=""===o[0]&&o.length>1?1:0;return i(o,t,r)},getConflictingClassGroupIds:(e,r)=>{if(r){let r=l[e],a=o[e];return r?a?t(a,r):r:a||n}return o[e]||n}}},i=(e,r,o)=>{if(0==e.length-r)return o.classGroupId;let t=e[r],l=o.nextPart.get(t);if(l){let o=i(e,r+1,l);if(o)return o}let a=o.validators;if(null===a)return;let n=0===r?e.join("-"):e.slice(r).join("-"),s=a.length;for(let e=0;e-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{let r=e.slice(1,-1),o=r.indexOf(":"),t=r.slice(0,o);return t?"arbitrary.."+t:void 0})(),c=e=>{let{theme:r,classGroups:o}=e;return m(o,r)},m=(e,r)=>{let o=a();for(let t in e)p(e[t],o,t,r);return o},p=(e,r,o,t)=>{let l=e.length;for(let a=0;a{if("string"==typeof e){b(e,r,o);return}if("function"==typeof e){f(e,r,o,t);return}g(e,r,o,t)},b=(e,r,o)=>{(""===e?r:h(r,e)).classGroupId=o},f=(e,r,o,t)=>{if(k(e)){p(e(t),r,o,t);return}null===r.validators&&(r.validators=[]),r.validators.push(l(o,e))},g=(e,r,o,t)=>{let l=Object.entries(e),a=l.length;for(let e=0;e{let o=e,t=r.split("-"),l=t.length;for(let e=0;e"isThemeGetter"in e&&!0===e.isThemeGetter,w=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let r=0,o=Object.create(null),t=Object.create(null),l=(l,a)=>{o[l]=a,++r>e&&(r=0,t=o,o=Object.create(null))};return{get(e){let r=o[e];return void 0!==r?r:void 0!==(r=t[e])?(l(e,r),r):void 0},set(e,r){e in o?o[e]=r:l(e,r)}}},x=[],y=(e,r,o,t,l)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:t,isExternal:l}),v=e=>{let{prefix:r,experimentalParseClassName:o}=e,t=e=>{let r;let o=[],t=0,l=0,a=0,n=e.length;for(let s=0;sa?r-a:void 0)};if(r){let e=r+":",o=t;t=r=>r.startsWith(e)?o(r.slice(e.length)):y(x,!1,r,void 0,!0)}if(o){let e=t;t=r=>o({className:r,parseClassName:e})}return t},z=e=>{let r=new Map;return e.orderSensitiveModifiers.forEach((e,o)=>{r.set(e,1e6+o)}),e=>{let o=[],t=[];for(let l=0;l0&&(t.sort(),o.push(...t),t=[]),o.push(a)):t.push(a)}return t.length>0&&(t.sort(),o.push(...t)),o}},j=e=>({cache:w(e.cacheSize),parseClassName:v(e),sortModifiers:z(e),...s(e)}),C=/\s+/,N=(e,r)=>{let{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:l,sortModifiers:a}=r,n=[],s=e.trim().split(C),i="";for(let e=s.length-1;e>=0;e-=1){let r=s[e],{isExternal:d,modifiers:c,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:u}=o(r);if(d){i=r+(i.length>0?" "+i:i);continue}let b=!!u,f=t(b?p.substring(0,u):p);if(!f){if(!b||!(f=t(p))){i=r+(i.length>0?" "+i:i);continue}b=!1}let g=0===c.length?"":1===c.length?c[0]:a(c).join(":"),h=m?g+"!":g,k=h+f;if(n.indexOf(k)>-1)continue;n.push(k);let w=l(f,b);for(let e=0;e0?" "+i:i)}return i},G=(...e)=>{let r,o,t=0,l="";for(;t{let r;if("string"==typeof e)return e;let o="";for(let t=0;t{let r=r=>r[e]||A;return r.isThemeGetter=!0,r},O=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,E=/^\d+\/\d+$/,I=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,L=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,S=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,P=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>E.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),R=e=>e.endsWith("%")&&Z(e.slice(0,-1)),U=e=>I.test(e),B=()=>!0,D=e=>M.test(e)&&!L.test(e),F=()=>!1,H=e=>S.test(e),J=e=>P.test(e),K=e=>!V(e)&&!et(e),Q=e=>ec(e,eb,F),V=e=>O.test(e),X=e=>ec(e,ef,D),Y=e=>ec(e,eg,Z),ee=e=>ec(e,ep,F),er=e=>ec(e,eu,J),eo=e=>ec(e,ek,H),et=e=>_.test(e),el=e=>em(e,ef),ea=e=>em(e,eh),en=e=>em(e,ep),es=e=>em(e,eb),ei=e=>em(e,eu),ed=e=>em(e,ek,!0),ec=(e,r,o)=>{let t=O.exec(e);return!!t&&(t[1]?r(t[1]):o(t[2]))},em=(e,r,o=!1)=>{let t=_.exec(e);return!!t&&(t[1]?r(t[1]):o)},ep=e=>"position"===e||"percentage"===e,eu=e=>"image"===e||"url"===e,eb=e=>"length"===e||"size"===e||"bg-size"===e,ef=e=>"length"===e,eg=e=>"number"===e,eh=e=>"family-name"===e,ek=e=>"shadow"===e,ew=((e,...r)=>{let o,t,l,a;let n=e=>{let r=t(e);if(r)return r;let a=N(e,o);return l(e,a),a};return a=s=>(t=(o=j(r.reduce((e,r)=>r(e),e()))).cache.get,l=o.cache.set,a=n,n(s)),(...e)=>a(G(...e))})(()=>{let e=$("color"),r=$("font"),o=$("text"),t=$("font-weight"),l=$("tracking"),a=$("leading"),n=$("breakpoint"),s=$("container"),i=$("spacing"),d=$("radius"),c=$("shadow"),m=$("inset-shadow"),p=$("text-shadow"),u=$("drop-shadow"),b=$("blur"),f=$("perspective"),g=$("aspect"),h=$("ease"),k=$("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...x(),et,V],v=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],j=()=>[et,V,i],C=()=>[T,"full","auto",...j()],N=()=>[q,"none","subgrid",et,V],G=()=>["auto",{span:["full",q,et,V]},q,et,V],W=()=>[q,"auto",et,V],A=()=>["auto","min","max","fr",et,V],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...j()],I=()=>[T,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],M=()=>[e,et,V],L=()=>[...x(),en,ee,{position:[et,V]}],S=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",es,Q,{size:[et,V]}],D=()=>[R,el,X],F=()=>["","none","full",d,et,V],H=()=>["",Z,el,X],J=()=>["solid","dashed","dotted","double"],ec=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],em=()=>[Z,R,en,ee],ep=()=>["","none",b,et,V],eu=()=>["none",Z,et,V],eb=()=>["none",Z,et,V],ef=()=>[Z,et,V],eg=()=>[T,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[B],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[K],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",Z],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",T,V,et,g]}],container:["container"],columns:[{columns:[Z,V,et,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",et,V]}],basis:[{basis:[T,"full","auto",s,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Z,T,"auto","initial","none",V]}],grow:[{grow:["",Z,et,V]}],shrink:[{shrink:["",Z,et,V]}],order:[{order:[q,"first","last","none",et,V]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[s,"screen",...I()]}],"min-w":[{"min-w":[s,"screen","none",...I()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[n]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",o,el,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,et,Y]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",R,V]}],"font-family":[{font:[ea,V,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,et,V]}],"line-clamp":[{"line-clamp":[Z,"none",et,Y]}],leading:[{leading:[a,...j()]}],"list-image":[{"list-image":["none",et,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",et,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[Z,"from-font","auto",et,X]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Z,"auto",et,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et,V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",et,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:S()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,et,V],radial:["",et,V],conic:[q,et,V]},ei,er]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Z,et,V]}],"outline-w":[{outline:["",Z,el,X]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",c,ed,eo]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",m,ed,eo]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Z,X]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,ed,eo]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Z,et,V]}],"mix-blend":[{"mix-blend":[...ec(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ec()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":em()}],"mask-image-linear-to-pos":[{"mask-linear-to":em()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":em()}],"mask-image-t-to-pos":[{"mask-t-to":em()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":em()}],"mask-image-r-to-pos":[{"mask-r-to":em()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":em()}],"mask-image-b-to-pos":[{"mask-b-to":em()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":em()}],"mask-image-l-to-pos":[{"mask-l-to":em()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":em()}],"mask-image-x-to-pos":[{"mask-x-to":em()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":em()}],"mask-image-y-to-pos":[{"mask-y-to":em()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[et,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":em()}],"mask-image-radial-to-pos":[{"mask-radial-to":em()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":em()}],"mask-image-conic-to-pos":[{"mask-conic-to":em()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:S()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",et,V]}],filter:[{filter:["","none",et,V]}],blur:[{blur:ep()}],brightness:[{brightness:[Z,et,V]}],contrast:[{contrast:[Z,et,V]}],"drop-shadow":[{"drop-shadow":["","none",u,ed,eo]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Z,et,V]}],"hue-rotate":[{"hue-rotate":[Z,et,V]}],invert:[{invert:["",Z,et,V]}],saturate:[{saturate:[Z,et,V]}],sepia:[{sepia:["",Z,et,V]}],"backdrop-filter":[{"backdrop-filter":["","none",et,V]}],"backdrop-blur":[{"backdrop-blur":ep()}],"backdrop-brightness":[{"backdrop-brightness":[Z,et,V]}],"backdrop-contrast":[{"backdrop-contrast":[Z,et,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Z,et,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,et,V]}],"backdrop-invert":[{"backdrop-invert":["",Z,et,V]}],"backdrop-opacity":[{"backdrop-opacity":[Z,et,V]}],"backdrop-saturate":[{"backdrop-saturate":[Z,et,V]}],"backdrop-sepia":[{"backdrop-sepia":["",Z,et,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",et,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Z,"initial",et,V]}],ease:[{ease:["linear","initial",h,et,V]}],delay:[{delay:[Z,et,V]}],animate:[{animate:["none",k,et,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,et,V]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:eu()}],"rotate-x":[{"rotate-x":eu()}],"rotate-y":[{"rotate-y":eu()}],"rotate-z":[{"rotate-z":eu()}],scale:[{scale:eb()}],"scale-x":[{"scale-x":eb()}],"scale-y":[{"scale-y":eb()}],"scale-z":[{"scale-z":eb()}],"scale-3d":["scale-3d"],skew:[{skew:ef()}],"skew-x":[{"skew-x":ef()}],"skew-y":[{"skew-y":ef()}],transform:[{transform:[et,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:eg()}],"translate-x":[{"translate-x":eg()}],"translate-y":[{"translate-y":eg()}],"translate-z":[{"translate-z":eg()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",et,V]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",et,V]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Z,el,X,Y]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})}}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/71-fccb418814321416.js b/dist/_next/static/chunks/71-fccb418814321416.js new file mode 100644 index 0000000..abb34df --- /dev/null +++ b/dist/_next/static/chunks/71-fccb418814321416.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[71],{2489:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},4147:function(e,t,r){let n;r.d(t,{Z:function(){return u}});var o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let a=new Uint8Array(16),i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));var u=function(e,t,r){return!o.randomUUID||t||e?function(e,t,r){let o=(e=e||{}).random??e.rng?.()??function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(a)}();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=o[e];return t}return function(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}(o)}(e,t,r):o.randomUUID()}},6885:function(e,t,r){r.d(t,{tJ:function(){return o}});let n=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>n(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>n(t)(e)}}},o=(e,t)=>(r,o,a)=>{let i,u={storage:function(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var t;let n=e=>null===e?null:JSON.parse(e,void 0),o=null!=(t=r.getItem(e))?t:null;return o instanceof Promise?o.then(n):n(o)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,s=0,c=new Set,d=new Set,f=u.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),r(...e)},o,a);let m=()=>{let e=u.partialize({...o()});return f.setItem(u.name,{state:e,version:u.version})},g=a.setState;a.setState=(e,t)=>(g(e,t),m());let h=e((...e)=>(r(...e),m()),o,a);a.getInitialState=()=>h;let p=()=>{var e,t;if(!f)return;let a=++s;l=!1,c.forEach(e=>{var t;return e(null!=(t=o())?t:h)});let g=(null==(t=u.onRehydrateStorage)?void 0:t.call(u,null!=(e=o())?e:h))||void 0;return n(f.getItem.bind(f))(u.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===u.version)return[!1,e.state];if(u.migrate){let t=u.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;if(a!==s)return;let[n,l]=e;if(r(i=u.merge(l,null!=(t=o())?t:h),!0),n)return m()}).then(()=>{a===s&&(null==g||g(i,void 0),i=o(),l=!0,d.forEach(e=>e(i)))}).catch(e=>{a===s&&(null==g||g(void 0,e))})};return a.persist={setOptions:e=>{u={...u,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>p(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},u.skipHydration||p(),i||h}},3011:function(e,t,r){r.d(t,{U:function(){return l}});var n=r(2265);let o=e=>{let t;let r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>i,subscribe:e=>(r.add(e),()=>r.delete(e))},i=t=e(n,o,a);return a},a=e=>e?o(e):o,i=e=>e,u=e=>{let t=a(e),r=e=>(function(e,t=i){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},l=e=>e?u(e):u}}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/796-9d56fd2c469c90a6.js b/dist/_next/static/chunks/796-9d56fd2c469c90a6.js new file mode 100644 index 0000000..ed419f6 --- /dev/null +++ b/dist/_next/static/chunks/796-9d56fd2c469c90a6.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[796],{4766:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},9196:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},401:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9322:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},8226:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},9801:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]])},3245:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},5466:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},5846:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},8293:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},2568:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("piggy-bank",[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]])},8728:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},8930:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},6865:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},1804:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(8755).Z)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]])},7648:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var r=n(2972),a=n.n(r)},9376:function(e,t,n){"use strict";var r=n(5475);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}})},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},5449:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(8521);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;ro?e.prefetch(t,a):e.prefetch(t,n,r))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let w=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:y,children:w,prefetch:_=null,passHref:E,replace:P,shallow:M,scroll:S,locale:R,onClick:x,onMouseEnter:T,onTouchStart:k,legacyBehavior:O=!1,...A}=e;n=w,O&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let N=o.default.useContext(c.RouterContext),C=o.default.useContext(f.AppRouterContext),j=null!=N?N:C,I=!N,D=!1!==_,W=null===_?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:L,as:Y}=o.default.useMemo(()=>{if(!N){let e=b(s);return{href:e,as:y?b(y):e}}let[e,t]=(0,i.resolveHref)(N,s,!0);return{href:e,as:y?(0,i.resolveHref)(N,y):t||e}},[N,s,y]),H=o.default.useRef(L),F=o.default.useRef(Y);O&&(r=o.default.Children.only(n));let X=O?r&&"object"==typeof r&&r.ref:t,[U,z,q]=(0,h.useIntersection)({rootMargin:"200px"}),G=o.default.useCallback(e=>{(F.current!==Y||H.current!==L)&&(q(),F.current=Y,H.current=L),U(e),X&&("function"==typeof X?X(e):"object"==typeof X&&(X.current=e))},[Y,X,L,q,U]);o.default.useEffect(()=>{j&&z&&D&&v(j,L,Y,{locale:R},{kind:W},I)},[Y,L,z,R,D,null==N?void 0:N.locale,j,I,W]);let B={ref:G,onClick(e){O||"function"!=typeof x||x(e),O&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),j&&!e.defaultPrevented&&function(e,t,n,r,a,i,s,l,d){let{nodeName:c}=e.currentTarget;if("A"===c.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!d&&!(0,u.isLocalURL)(n)))return;e.preventDefault();let f=()=>{let e=null==s||s;"beforePopState"in t?t[a?"replace":"push"](n,r,{shallow:i,locale:l,scroll:e}):t[a?"replace":"push"](r||n,{scroll:e})};d?o.default.startTransition(f):f()}(e,j,L,Y,P,M,S,R,I)},onMouseEnter(e){O||"function"!=typeof T||T(e),O&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),j&&(D||!I)&&v(j,L,Y,{locale:R,priority:!0,bypassPrefetchedCheck:!0},{kind:W},I)},onTouchStart:function(e){O||"function"!=typeof k||k(e),O&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),j&&(D||!I)&&v(j,L,Y,{locale:R,priority:!0,bypassPrefetchedCheck:!0},{kind:W},I)}};if((0,l.isAbsoluteUrl)(Y))B.href=Y;else if(!O||E||"a"===r.type&&!("href"in r.props)){let e=void 0!==R?R:null==N?void 0:N.locale,t=(null==N?void 0:N.isLocaleDomain)&&(0,m.getDomainLocale)(Y,e,null==N?void 0:N.locales,null==N?void 0:N.domainLocales);B.href=t||(0,p.addBasePath)((0,d.addLocale)(Y,e,null==N?void 0:N.defaultLocale))}return O?o.default.cloneElement(r,B):(0,a.jsx)("a",{...A,...B,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5246:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return c}});let r=n(8637),a=n(7497),o=n(7053),i=n(3987),u=n(8521),s=n(3552),l=n(6279),d=n(7205);function c(e,t,n){let c;let f="string"==typeof t?t:(0,a.formatWithValidation)(t),h=f.match(/^[a-zA-Z]{1,}:\/\//),m=h?f.slice(h[0].length):f;if((m.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+f+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(m);f=(h?h[0]:"")+t}if(!(0,s.isLocalURL)(f))return n?[f]:f;try{c=new URL(f.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){c=new URL("/","http://n")}try{let e=new URL(f,c);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,l.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,d.interpolateAs)(e.pathname,e.pathname,n);i&&(t=(0,a.formatWithValidation)({pathname:i,hash:e.hash,query:(0,o.omit)(n,u)}))}let i=e.origin===c.origin?e.href.slice(e.origin.length):e.href;return n?[i,t||i]:i}catch(e){return n?[f]:f}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6081:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return s}});let r=n(2265),a=n(3515),o="function"==typeof IntersectionObserver,i=new Map,u=[];function s(e){let{rootRef:t,rootMargin:n,disabled:s}=e,l=s||!o,[d,c]=(0,r.useState)(!1),f=(0,r.useRef)(null),h=(0,r.useCallback)(e=>{f.current=e},[]);return(0,r.useEffect)(()=>{if(o){if(l||d)return;let e=f.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:a,elements:o}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=u.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=i.get(r)))return t;let a=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=a.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:a},u.push(n),i.set(n,t),t}(n);return o.set(e,t),a.observe(e),function(){if(o.delete(e),a.unobserve(e),0===o.size){a.disconnect(),i.delete(r);let e=u.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&u.splice(e,1)}}}(e,e=>e&&c(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!d){let e=(0,a.requestIdleCallback)(()=>c(!0));return()=>(0,a.cancelIdleCallback)(e)}},[l,n,t,d,f.current]),[h,d,(0,r.useCallback)(()=>{c(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function o(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function u(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s=[],l=!1,d=-1;function c(){l&&r&&(l=!1,r.length?s=r.concat(s):d=-1,s.length&&f())}function f(){if(!l){var e=u(c);l=!0;for(var t=s.length;t;){for(r=s,s=[];++d1)for(var n=1;n{let t=s[e]||"",{repeat:n,optional:r}=u[e],a="["+(n?"...":"")+e+"]";return r&&(a=(t?"":"/")+"["+a+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in s)&&(o=o.replace(a,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(o=""),{params:l,result:o}}},8104:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return o}});let r=n(1182),a=/\/\[[^/]+?\](?=\/|$)/;function o(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),a.test(e)}},3552:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return o}});let r=n(3987),a=n(1283);function o(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,a.hasBasePath)(n.pathname)}catch(e){return!1}}},7053:function(e,t){"use strict";function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},8637:function(e,t){"use strict";function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function a(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,a]=e;Array.isArray(a)?a.forEach(e=>t.append(n,r(e))):t.set(n,r(a))}),t}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{assign:function(){return o},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return a}})},4199:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return a}});let r=n(3987);function a(e){let{re:t,groups:n}=e;return e=>{let a=t.exec(e);if(!a)return!1;let o=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},i={};return Object.keys(n).forEach(e=>{let t=n[e],r=a[t.pos];void 0!==r&&(i[e]=~r.indexOf("/")?r.split("/").map(e=>o(e)):t.repeat?[o(r)]:o(r))}),i}}},9964:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getNamedMiddlewareRegex:function(){return h},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return u}});let r=n(9259),a=n(1182),o=n(42),i=n(6674);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function s(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),n={},r=1;return{parameterizedRoute:t.map(e=>{let t=a.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:a,repeat:s}=u(i[1]);return n[e]={pos:r++,repeat:s,optional:a},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:a}=u(i[1]);return n[e]={pos:r++,repeat:t,optional:a},t?a?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function l(e){let{parameterizedRoute:t,groups:n}=s(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function d(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:a,keyPrefix:i}=e,{key:s,optional:l,repeat:d}=u(r),c=s.replace(/\W/g,"");i&&(c=""+i+c);let f=!1;(0===c.length||c.length>30)&&(f=!0),isNaN(parseInt(c.slice(0,1)))||(f=!0),f&&(c=n()),i?a[c]=""+i+s:a[c]=s;let h=t?(0,o.escapeStringRegexp)(t):"";return d?l?"(?:/"+h+"(?<"+c+">.+?))?":"/"+h+"(?<"+c+">.+?)":"/"+h+"(?<"+c+">[^/]+?)"}function c(e,t){let n;let u=(0,i.removeTrailingSlash)(e).slice(1).split("/"),s=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:u.map(e=>{let n=a.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&i){let[n]=e.split(i[0]);return d({getSafeRouteKey:s,interceptionMarker:n,segment:i[1],routeKeys:l,keyPrefix:t?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}return i?d({getSafeRouteKey:s,segment:i[1],routeKeys:l,keyPrefix:t?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let n=c(e,t);return{...l(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function h(e,t){let{parameterizedRoute:n}=s(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:a}=c(e,!1);return{namedRegex:"^"+a+(r?"(?:(/.*)?)":"")+"$"}}},4777:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let a=e[0];if(a.startsWith("[")&&a.endsWith("]")){let n=a.slice(1,-1),i=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),i=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function o(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===a.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');o(this.optionalRestSlugName,n),this.optionalRestSlugName=n,a="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');o(this.restSlugName,n),this.restSlugName=n,a="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');o(this.slugName,n),this.slugName=n,a="[]"}}this.children.has(a)||this.children.set(a,new n),this.children.get(a)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return m},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return y},NormalizeError:function(){return p},PageNotFoundError:function(){return g},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return s},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return o},isResSent:function(){return l},loadGetInitialProps:function(){return c},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return b}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,a=Array(r),o=0;oa.test(e);function i(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function s(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function l(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function c(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await c(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&l(n))return r;if(!r)throw Error('"'+s(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let f="undefined"!=typeof performance,h=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class p extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},2514:function(e,t,n){"use strict";n.d(t,{WU:function(){return Y}});let r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var a=n(2050);let o={date:(0,a.l)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,a.l)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,a.l)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var u=n(8172);let s={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:(0,u.Y)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,u.Y)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:(0,u.Y)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,u.Y)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,u.Y)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};var l=n(5186);let d={code:"en-US",formatDistance:(e,t,n)=>{let a;let o=r[e];return(a="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null==n?void 0:n.addSuffix)?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},formatLong:o,formatRelative:(e,t,n,r)=>i[e],localize:s,match:{ordinalNumber:(0,n(2540).y)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,l.t)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,l.t)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,l.t)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,l.t)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,l.t)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},c={},f=Symbol.for("constructDateFrom");function h(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&f in e?e[f](t):e instanceof Date?new e.constructor(t):new Date(t)}function m(e,t){return h(t||e,e)}function p(e){let t=m(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function g(e,t){let n=m(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function y(e,t){var n,r,a,o,i,u,s,l;let d=null!==(l=null!==(s=null!==(u=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t?void 0:null===(r=t.locale)||void 0===r?void 0:null===(n=r.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==u?u:c.weekStartsOn)&&void 0!==s?s:null===(o=c.locale)||void 0===o?void 0:null===(a=o.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==l?l:0,f=m(e,null==t?void 0:t.in),h=f.getDay();return f.setDate(f.getDate()-((h=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function w(e,t){var n,r,a,o,i,u,s,l;let d=m(e,null==t?void 0:t.in),f=d.getFullYear(),p=null!==(l=null!==(s=null!==(u=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(r=t.locale)||void 0===r?void 0:null===(n=r.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==u?u:c.firstWeekContainsDate)&&void 0!==s?s:null===(o=c.locale)||void 0===o?void 0:null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==l?l:1,g=h((null==t?void 0:t.in)||e,0);g.setFullYear(f+1,0,p),g.setHours(0,0,0,0);let v=y(g,t),b=h((null==t?void 0:t.in)||e,0);b.setFullYear(f,0,p),b.setHours(0,0,0,0);let w=y(b,t);return+d>=+v?f+1:+d>=+w?f:f-1}function _(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let E={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return _("yy"===t?r%100:r,t.length)},M(e,t){let n=e.getMonth();return"M"===t?String(n+1):_(n+1,2)},d:(e,t)=>_(e.getDate(),t.length),a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>_(e.getHours()%12||12,t.length),H:(e,t)=>_(e.getHours(),t.length),m:(e,t)=>_(e.getMinutes(),t.length),s:(e,t)=>_(e.getSeconds(),t.length),S(e,t){let n=t.length;return _(Math.trunc(e.getMilliseconds()*Math.pow(10,n-3)),t.length)}},P={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},M={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){let t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return E.y(e,t)},Y:function(e,t,n,r){let a=w(e,r),o=a>0?a:1-a;return"YY"===t?_(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):_(o,t.length)},R:function(e,t){return _(b(e),t.length)},u:function(e,t){return _(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return E.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let a=function(e,t){let n=m(e,null==t?void 0:t.in);return Math.round((+y(n,t)-+function(e,t){var n,r,a,o,i,u,s,l;let d=null!==(l=null!==(s=null!==(u=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t?void 0:null===(r=t.locale)||void 0===r?void 0:null===(n=r.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==u?u:c.firstWeekContainsDate)&&void 0!==s?s:null===(o=c.locale)||void 0===o?void 0:null===(a=o.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==l?l:1,f=w(e,t),m=h((null==t?void 0:t.in)||e,0);return m.setFullYear(f,0,d),m.setHours(0,0,0,0),y(m,t)}(n,t))/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):_(a,t.length)},I:function(e,t,n){let r=function(e,t){let n=m(e,void 0);return Math.round((+v(n)-+function(e,t){let n=b(e,void 0),r=h(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),v(r)}(n))/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):_(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):E.d(e,t)},D:function(e,t,n){let r=function(e,t){let n=m(e,void 0);return function(e,t,n){let[r,a]=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r"object"==typeof e));return n.map(a)}(void 0,e,t),o=g(r),i=g(a);return Math.round((+o-p(o)-(+i-p(i)))/864e5)}(n,function(e,t){let n=m(e,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):_(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return _(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return _(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return _(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r;let a=e.getHours();switch(r=12===a?P.noon:0===a?P.midnight:a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r;let a=e.getHours();switch(r=a>=17?P.evening:a>=12?P.afternoon:a>=4?P.morning:P.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return E.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):E.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):_(r,t.length)},k:function(e,t,n){let r=e.getHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):_(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):E.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):E.s(e,t)},S:function(e,t){return E.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return R(r);case"XXXX":case"XX":return x(r);default:return x(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return R(r);case"xxxx":case"xx":return x(r);default:return x(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S(r,":");default:return"GMT"+x(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S(r,":");default:return"GMT"+x(r,":")}},t:function(e,t,n){return _(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return _(+e,t.length)}};function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return 0===o?n+String(a):n+String(a)+t+_(o,2)}function R(e,t){return e%60==0?(e>0?"-":"+")+_(Math.abs(e)/60,2):x(e,t)}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Math.abs(e);return(e>0?"-":"+")+_(Math.trunc(n/60),2)+t+_(n%60,2)}let T=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},O={p:k,P:(e,t)=>{let n;let r=e.match(/(P+)(p+)?/)||[],a=r[1],o=r[2];if(!o)return T(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",T(a,t)).replace("{{time}}",k(o,t))}},A=/^D+$/,N=/^Y+$/,C=["D","DD","YY","YYYY"],j=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,I=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,D=/^'([^]*?)'?$/,W=/''/g,L=/[a-zA-Z]/;function Y(e,t,n){var r,a,o,i,u,s,l,f,h,p,g,y,v,b,w,_,E,P;let S=null!==(p=null!==(h=null==n?void 0:n.locale)&&void 0!==h?h:c.locale)&&void 0!==p?p:d,R=null!==(b=null!==(v=null!==(y=null!==(g=null==n?void 0:n.firstWeekContainsDate)&&void 0!==g?g:null==n?void 0:null===(a=n.locale)||void 0===a?void 0:null===(r=a.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==y?y:c.firstWeekContainsDate)&&void 0!==v?v:null===(i=c.locale)||void 0===i?void 0:null===(o=i.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==b?b:1,x=null!==(P=null!==(E=null!==(_=null!==(w=null==n?void 0:n.weekStartsOn)&&void 0!==w?w:null==n?void 0:null===(s=n.locale)||void 0===s?void 0:null===(u=s.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==_?_:c.weekStartsOn)&&void 0!==E?E:null===(f=c.locale)||void 0===f?void 0:null===(l=f.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==P?P:0,T=m(e,null==n?void 0:n.in);if(!(T instanceof Date||"object"==typeof T&&"[object Date]"===Object.prototype.toString.call(T))&&"number"!=typeof T||isNaN(+m(T)))throw RangeError("Invalid time value");let k=t.match(I).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,O[t])(e,S.formatLong):e}).join("").match(j).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t)return{isToken:!1,value:function(e){let t=e.match(D);return t?t[1].replace(W,"'"):e}(e)};if(M[t])return{isToken:!0,value:e};if(t.match(L))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});S.localize.preprocessor&&(k=S.localize.preprocessor(T,k));let Y={firstWeekContainsDate:R,weekStartsOn:x,locale:S};return k.map(r=>{if(!r.isToken)return r.value;let a=r.value;return(!(null==n?void 0:n.useAdditionalWeekYearTokens)&&N.test(a)||!(null==n?void 0:n.useAdditionalDayOfYearTokens)&&A.test(a))&&function(e,t,n){let r=function(e,t,n){let r="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(r," to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,n);if(console.warn(r),C.includes(e))throw RangeError(r)}(a,t,String(e)),(0,M[a[0]])(T,a,S.localize,Y)}).join("")}},2050:function(e,t,n){"use strict";function r(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}n.d(t,{l:function(){return r}})},8172:function(e,t,n){"use strict";function r(e){return(t,n)=>{let r;if("formatting"===((null==n?void 0:n.context)?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,a=(null==n?void 0:n.width)?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{let t=e.defaultWidth,a=(null==n?void 0:n.width)?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}n.d(t,{Y:function(){return r}})},5186:function(e,t,n){"use strict";function r(e){return function(t){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;let u=i[0],s=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;ne.test(u)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(u));return n=e.valueCallback?e.valueCallback(l):l,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(u.length)}}}n.d(t,{t:function(){return r}})},2540:function(e,t,n){"use strict";function r(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;let a=r[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:i=n.valueCallback?n.valueCallback(i):i,rest:t.slice(a.length)}}}n.d(t,{y:function(){return r}})},7240:function(e,t,n){"use strict";n.d(t,{es:function(){return f}});let r={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 d\xeda",other:"{{count}} d\xedas"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 a\xf1o",other:"alrededor de {{count}} a\xf1os"},xYears:{one:"1 a\xf1o",other:"{{count}} a\xf1os"},overXYears:{one:"m\xe1s de 1 a\xf1o",other:"m\xe1s de {{count}} a\xf1os"},almostXYears:{one:"casi 1 a\xf1o",other:"casi {{count}} a\xf1os"}};var a=n(2050);let o={date:(0,a.l)({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:(0,a.l)({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:(0,a.l)({formats:{full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'ma\xf1ana a la' p",nextWeek:"eeee 'a la' p",other:"P"},u={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'ma\xf1ana a las' p",nextWeek:"eeee 'a las' p",other:"P"};var s=n(8172);let l={ordinalNumber:(e,t)=>Number(e)+"\xba",era:(0,s.Y)({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","despu\xe9s de cristo"]},defaultWidth:"wide"}),quarter:(0,s.Y)({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1\xba trimestre","2\xba trimestre","3\xba trimestre","4\xba trimestre"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:(0,s.Y)({values:{narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},defaultWidth:"wide"}),day:(0,s.Y)({values:{narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","s\xe1"],abbreviated:["dom","lun","mar","mi\xe9","jue","vie","s\xe1b"],wide:["domingo","lunes","martes","mi\xe9rcoles","jueves","viernes","s\xe1bado"]},defaultWidth:"wide"}),dayPeriod:(0,s.Y)({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"ma\xf1ana",afternoon:"tarde",evening:"tarde",night:"noche"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la ma\xf1ana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},defaultFormattingWidth:"wide"})};var d=n(2540),c=n(5186);let f={code:"es",formatDistance:(e,t,n)=>{let a;let o=r[e];return(a="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null==n?void 0:n.addSuffix)?n.comparison&&n.comparison>0?"en "+a:"hace "+a:a},formatLong:o,formatRelative:(e,t,n,r)=>1!==t.getHours()?u[e]:i[e],localize:l,match:{ordinalNumber:(0,d.y)({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,c.t)({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},defaultParseWidth:"any"}),quarter:(0,c.t)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,c.t)({matchPatterns:{narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},defaultParseWidth:"any"}),day:(0,c.t)({matchPatterns:{narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,c.t)({matchPatterns:{narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}}}}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/838-3b22f3c21887b523.js b/dist/_next/static/chunks/838-3b22f3c21887b523.js new file mode 100644 index 0000000..5c22c95 --- /dev/null +++ b/dist/_next/static/chunks/838-3b22f3c21887b523.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[838],{1134:function(e,t,r){var n;!function(i){"use strict";var o,a={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},u=!0,l="[DecimalError] ",c=l+"Invalid argument: ",s=l+"Exponent out of range: ",f=Math.floor,h=Math.pow,d=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=f(1286742750677284.5),y={};function v(e,t){var r,n,i,o,a,l,c,s,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),u?_(t,h):t;if(c=e.d,s=t.d,a=e.e,i=t.e,c=c.slice(),o=a-i){for(o<0?(n=c,o=-o,l=s.length):(n=s,i=a,l=c.length),o>(l=(a=Math.ceil(h/7))>l?a+1:l+1)&&(o=l,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for((l=c.length)-(o=s.length)<0&&(o=l,n=s,s=c,c=n),r=0;o;)r=(c[--o]=c[o]+s[o]+r)/1e7|0,c[o]%=1e7;for(r&&(c.unshift(r),++i),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=i,u?_(t,h):t}function g(e,t,r){if(e!==~~e||er)throw Error(c+e)}function m(e){var t,r,n,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;te.e^this.s<0?1:-1;for(t=0,r=(n=this.d.length)<(i=e.d.length)?n:i;te.d[t]^this.s<0?1:-1;return n===i?0:n>i^this.s<0?1:-1},y.decimalPlaces=y.dp=function(){var e=this.d.length-1,t=(e-this.e)*7;if(e=this.d[e])for(;e%10==0;e/=10)t--;return t<0?0:t},y.dividedBy=y.div=function(e){return b(this,new this.constructor(e))},y.dividedToIntegerBy=y.idiv=function(e){var t=this.constructor;return _(b(this,new t(e),0,1),t.precision)},y.equals=y.eq=function(e){return!this.cmp(e)},y.exponent=function(){return x(this)},y.greaterThan=y.gt=function(e){return this.cmp(e)>0},y.greaterThanOrEqualTo=y.gte=function(e){return this.cmp(e)>=0},y.isInteger=y.isint=function(){return this.e>this.d.length-2},y.isNegative=y.isneg=function(){return this.s<0},y.isPositive=y.ispos=function(){return this.s>0},y.isZero=function(){return 0===this.s},y.lessThan=y.lt=function(e){return 0>this.cmp(e)},y.lessThanOrEqualTo=y.lte=function(e){return 1>this.cmp(e)},y.logarithm=y.log=function(e){var t,r=this.constructor,n=r.precision,i=n+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(o))throw Error(l+"NaN");if(this.s<1)throw Error(l+(this.s?"NaN":"-Infinity"));return this.eq(o)?new r(0):(u=!1,t=b(j(this,i),j(e,i),i),u=!0,_(t,n))},y.minus=y.sub=function(e){return e=new this.constructor(e),this.s==e.s?E(this,e):v(this,(e.s=-e.s,e))},y.modulo=y.mod=function(e){var t,r=this.constructor,n=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return this.s?(u=!1,t=b(this,e,0,1).times(e),u=!0,this.minus(t)):_(new r(this),n)},y.naturalExponential=y.exp=function(){return w(this)},y.naturalLogarithm=y.ln=function(){return j(this)},y.negated=y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},y.plus=y.add=function(e){return e=new this.constructor(e),this.s==e.s?v(this,e):E(this,(e.s=-e.s,e))},y.precision=y.sd=function(e){var t,r,n;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(c+e);if(t=x(this)+1,r=7*(n=this.d.length-1)+1,n=this.d[n]){for(;n%10==0;n/=10)r--;for(n=this.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},y.squareRoot=y.sqrt=function(){var e,t,r,n,i,o,a,c=this.constructor;if(this.s<1){if(!this.s)return new c(0);throw Error(l+"NaN")}for(e=x(this),u=!1,0==(i=Math.sqrt(+this))||i==1/0?(((t=m(this.d)).length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=f((e+1)/2)-(e<0||e%2),n=new c(t=i==1/0?"5e"+e:(t=i.toExponential()).slice(0,t.indexOf("e")+1)+e)):n=new c(i.toString()),i=a=(r=c.precision)+3;;)if(n=(o=n).plus(b(this,o,a+2)).times(.5),m(o.d).slice(0,a)===(t=m(n.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&"4999"==t){if(_(o,r+1,0),o.times(o).eq(this)){n=o;break}}else if("9999"!=t)break;a+=4}return u=!0,_(n,r)},y.times=y.mul=function(e){var t,r,n,i,o,a,l,c,s,f=this.constructor,h=this.d,d=(e=new f(e)).d;if(!this.s||!e.s)return new f(0);for(e.s*=this.s,r=this.e+e.e,(c=h.length)<(s=d.length)&&(o=h,h=d,d=o,a=c,c=s,s=a),o=[],n=a=c+s;n--;)o.push(0);for(n=s;--n>=0;){for(t=0,i=c+n;i>n;)l=o[i]+d[n]*h[i-n-1]+t,o[i--]=l%1e7|0,t=l/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,u?_(e,f.precision):e},y.toDecimalPlaces=y.todp=function(e,t){var r=this,n=r.constructor;return(r=new n(r),void 0===e)?r:(g(e,0,1e9),void 0===t?t=n.rounding:g(t,0,8),_(r,e+x(r)+1,t))},y.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=A(n,!0):(g(e,0,1e9),void 0===t?t=i.rounding:g(t,0,8),r=A(n=_(new i(n),e+1,t),!0,e+1)),r},y.toFixed=function(e,t){var r,n,i=this.constructor;return void 0===e?A(this):(g(e,0,1e9),void 0===t?t=i.rounding:g(t,0,8),r=A((n=_(new i(this),e+x(this)+1,t)).abs(),!1,e+x(n)+1),this.isneg()&&!this.isZero()?"-"+r:r)},y.toInteger=y.toint=function(){var e=this.constructor;return _(new e(this),x(this)+1,e.rounding)},y.toNumber=function(){return+this},y.toPower=y.pow=function(e){var t,r,n,i,a,c,s=this,h=s.constructor,d=+(e=new h(e));if(!e.s)return new h(o);if(!(s=new h(s)).s){if(e.s<1)throw Error(l+"Infinity");return s}if(s.eq(o))return s;if(n=h.precision,e.eq(o))return _(s,n);if(c=(t=e.e)>=(r=e.d.length-1),a=s.s,c){if((r=d<0?-d:d)<=9007199254740991){for(i=new h(o),t=Math.ceil(n/7+4),u=!1;r%2&&M((i=i.times(s)).d,t),0!==(r=f(r/2));)M((s=s.times(s)).d,t);return u=!0,e.s<0?new h(o).div(i):_(i,n)}}else if(a<0)throw Error(l+"NaN");return a=a<0&&1&e.d[Math.max(t,r)]?-1:1,s.s=1,u=!1,i=e.times(j(s,n+12)),u=!0,(i=w(i)).s=a,i},y.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?(r=x(i),n=A(i,r<=o.toExpNeg||r>=o.toExpPos)):(g(e,1,1e9),void 0===t?t=o.rounding:g(t,0,8),r=x(i=_(new o(i),e,t)),n=A(i,e<=r||r<=o.toExpNeg,e)),n},y.toSignificantDigits=y.tosd=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(g(e,1,1e9),void 0===t?t=r.rounding:g(t,0,8)),_(new r(this),e,t)},y.toString=y.valueOf=y.val=y.toJSON=function(){var e=x(this),t=this.constructor;return A(this,e<=t.toExpNeg||e>=t.toExpPos)};var b=function(){function e(e,t){var r,n=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+n,e[i]=r%1e7|0,n=r/1e7|0;return n&&e.unshift(n),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,r){for(var n=0;r--;)e[r]-=n,n=e[r]1;)e.shift()}return function(n,i,o,a){var u,c,s,f,h,d,p,y,v,g,m,b,w,O,P,j,S,E,A=n.constructor,M=n.s==i.s?1:-1,k=n.d,T=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(l+"Division by zero");for(s=0,c=n.e-i.e,S=T.length,P=k.length,y=(p=new A(M)).d=[];T[s]==(k[s]||0);)++s;if(T[s]>(k[s]||0)&&--c,(b=null==o?o=A.precision:a?o+(x(n)-x(i))+1:o)<0)return new A(0);if(b=b/7+2|0,s=0,1==S)for(f=0,T=T[0],b++;(s1&&(T=e(T,f),k=e(k,f),S=T.length,P=k.length),O=S,g=(v=k.slice(0,S)).length;g=1e7/2&&++j;do f=0,(u=t(T,v,S,g))<0?(m=v[0],S!=g&&(m=1e7*m+(v[1]||0)),(f=m/j|0)>1?(f>=1e7&&(f=1e7-1),d=(h=e(T,f)).length,g=v.length,1==(u=t(h,v,d,g))&&(f--,r(h,S16)throw Error(s+x(e));if(!e.s)return new d(o);for(null==t?(u=!1,l=p):l=t,a=new d(.03125);e.abs().gte(.1);)e=e.times(a),f+=5;for(l+=Math.log(h(2,f))/Math.LN10*2+5|0,r=n=i=new d(o),d.precision=l;;){if(n=_(n.times(e),l),r=r.times(++c),m((a=i.plus(b(n,r,l))).d).slice(0,l)===m(i.d).slice(0,l)){for(;f--;)i=_(i.times(i),l);return d.precision=p,null==t?(u=!0,_(i,p)):i}i=a}}function x(e){for(var t=7*e.e,r=e.d[0];r>=10;r/=10)t++;return t}function O(e,t,r){if(t>e.LN10.sd())throw u=!0,r&&(e.precision=r),Error(l+"LN10 precision limit exceeded");return _(new e(e.LN10),t)}function P(e){for(var t="";e--;)t+="0";return t}function j(e,t){var r,n,i,a,c,s,f,h,d,p=1,y=e,v=y.d,g=y.constructor,w=g.precision;if(y.s<1)throw Error(l+(y.s?"NaN":"-Infinity"));if(y.eq(o))return new g(0);if(null==t?(u=!1,h=w):h=t,y.eq(10))return null==t&&(u=!0),O(g,h);if(h+=10,g.precision=h,n=(r=m(v)).charAt(0),!(15e14>Math.abs(a=x(y))))return f=O(g,h+2,w).times(a+""),y=j(new g(n+"."+r.slice(1)),h-10).plus(f),g.precision=w,null==t?(u=!0,_(y,w)):y;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=m((y=y.times(e)).d)).charAt(0),p++;for(a=x(y),n>1?(y=new g("0."+r),a++):y=new g(n+"."+r.slice(1)),s=c=y=b(y.minus(o),y.plus(o),h),d=_(y.times(y),h),i=3;;){if(c=_(c.times(d),h),m((f=s.plus(b(c,new g(i),h))).d).slice(0,h)===m(s.d).slice(0,h))return s=s.times(2),0!==a&&(s=s.plus(O(g,h+2,w).times(a+""))),s=b(s,new g(p),h),g.precision=w,null==t?(u=!0,_(s,w)):s;s=f,i+=2}}function S(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);)++n;for(i=t.length;48===t.charCodeAt(i-1);)--i;if(t=t.slice(n,i)){if(i-=n,r=r-n-1,e.e=f(r/7),e.d=[],n=(r+1)%7,r<0&&(n+=7),np||e.e<-p))throw Error(s+r)}else e.s=0,e.e=0,e.d=[0];return e}function _(e,t,r){var n,i,o,a,l,c,d,y,v=e.d;for(a=1,o=v[0];o>=10;o/=10)a++;if((n=t-a)<0)n+=7,i=t,d=v[y=0];else{if((y=Math.ceil((n+1)/7))>=(o=v.length))return e;for(a=1,d=o=v[y];o>=10;o/=10)a++;n%=7,i=n-7+a}if(void 0!==r&&(l=d/(o=h(10,a-i-1))%10|0,c=t<0||void 0!==v[y+1]||d%o,c=r<4?(l||c)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||c||6==r&&(n>0?i>0?d/h(10,a-i):0:v[y-1])%10&1||r==(e.s<0?8:7))),t<1||!v[0])return c?(o=x(e),v.length=1,t=t-o-1,v[0]=h(10,(7-t%7)%7),e.e=f(-t/7)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(0==n?(v.length=y,o=1,y--):(v.length=y+1,o=h(10,7-n),v[y]=i>0?(d/h(10,a-i)%h(10,i)|0)*o:0),c)for(;;){if(0==y){1e7==(v[0]+=o)&&(v[0]=1,++e.e);break}if(v[y]+=o,1e7!=v[y])break;v[y--]=0,o=1}for(n=v.length;0===v[--n];)v.pop();if(u&&(e.e>p||e.e<-p))throw Error(s+x(e));return e}function E(e,t){var r,n,i,o,a,l,c,s,f,h,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),u?_(t,p):t;if(c=e.d,h=t.d,n=t.e,s=e.e,c=c.slice(),a=s-n){for((f=a<0)?(r=c,a=-a,l=h.length):(r=h,n=s,l=c.length),a>(i=Math.max(Math.ceil(p/7),l)+2)&&(a=i,r.length=1),r.reverse(),i=a;i--;)r.push(0);r.reverse()}else{for((f=(i=c.length)<(l=h.length))&&(l=i),i=0;i0;--i)c[l++]=0;for(i=h.length;i>a;){if(c[--i]0?o=o.charAt(0)+"."+o.slice(1)+P(n):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+P(-i-1)+o,r&&(n=r-a)>0&&(o+=P(n))):i>=a?(o+=P(i+1-a),r&&(n=r-i-1)>0&&(o=o+"."+P(n))):((n=i+1)0&&(i+1===a&&(o+="."),o+=P(n))),e.s<0?"-"+o:o}function M(e,t){if(e.length>t)return e.length=t,!0}function k(e){if(!e||"object"!=typeof e)throw Error(l+"Object expected");var t,r,n,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(c+r+": "+n)}if(void 0!==(n=e[r="LN10"])){if(n==Math.LN10)this[r]=new this(n);else throw Error(c+r+": "+n)}return this}(a=function e(t){var r,n,i;function o(e){if(!(this instanceof o))return new o(e);if(this.constructor=o,e instanceof o){this.s=e.s,this.e=e.e,this.d=(e=e.d)?e.slice():e;return}if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)this.s=1;else if(e<0)e=-e,this.s=-1;else{this.s=0,this.e=0,this.d=[0];return}if(e===~~e&&e<1e7){this.e=0,this.d=[e];return}return S(this,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),this.s=-1):this.s=1,d.test(e))S(this,e);else throw Error(c+e)}if(o.prototype=y,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=e,o.config=o.set=k,void 0===t&&(t={}),t)for(r=0,i=["precision","rounding","toExpNeg","toExpPos","LN10"];r{for(let o=0;o{if(e!==t){let i=r(e),o=r(t);if(i===o&&0===i){if(et)return"desc"===n?-1:1}return"desc"===n?o-i:i-o}return 0}},9924:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}},3984:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}},5159:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}},4623:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let r=/^(?:0|[1-9]\d*)$/;t.isIndex=function(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&eString(e));let u=(e,t)=>{let r=e;for(let e=0;enull==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:u(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?u(t,e):"object"==typeof t?t[e]:t,c=t.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||i.isKey(e))?e:{key:e,path:o.toPath(e)});return e.map(e=>({original:e,criteria:c.map(t=>l(t,e))})).slice().sort((e,t)=>{for(let i=0;ie.original)}},6273:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(6688),i=r(949),o=r(4893);t.sortBy=function(e,...t){let r=t.length;return r>1&&o.isIterateeCall(e,t[0],t[1])?t=[]:r>2&&o.isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),n.orderBy(e,i.flatten(t),["asc"])}},2992:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(5745),i=r(3306),o=r(601),a=r(9311),u=r(5586);t.uniqBy=function(e,t=o.identity){return a.isArrayLikeObject(e)?n.uniqBy(Array.from(e),i.ary(u.iteratee(t),1)):[]}},2801:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(7384);t.debounce=function(e,t=0,r={}){let i;"object"!=typeof r&&(r={});let{leading:o=!1,trailing:a=!0,maxWait:u}=r,l=[,,];o&&(l[0]="leading"),a&&(l[1]="trailing");let c=null,s=n.debounce(function(...t){i=e.apply(this,t),c=null},t,{edges:l}),f=function(...t){return null!=u&&(null===c&&(c=Date.now()),Date.now()-c>=u)?(i=e.apply(this,t),c=Date.now(),s.cancel(),s.schedule()):s.apply(this,t),i};return f.cancel=s.cancel,f.flush=()=>(s.flush(),i),f}},9313:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(2801);t.throttle=function(e,t=0,r={}){let{leading:i=!0,trailing:o=!0}=r;return n.debounce(e,t,{leading:i,maxWait:t,trailing:o})}},1480:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(4893),i=r(5810);t.range=function(e,t,r){r&&"number"!=typeof r&&n.isIterateeCall(e,t,r)&&(t=r=void 0),e=i.toFinite(e),void 0===t?(t=e,e=0):t=i.toFinite(t),r=void 0===r?e{let c=t?.(r,a,u,l);if(void 0!==c)return c;if("object"==typeof e){if(i.getTag(e)===o.objectTag&&"function"!=typeof e.constructor){let t={};return l.set(e,t),n.copyProperties(t,e,u,l),t}switch(Object.prototype.toString.call(e)){case o.numberTag:case o.stringTag:case o.booleanTag:{let t=new e.constructor(e?.valueOf());return n.copyProperties(t,e),t}case o.argumentsTag:{let t={};return n.copyProperties(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}},4073:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(5491),i=r(5159),o=r(9670),a=r(9027);t.get=function e(t,r,u){if(null==t)return u;switch(typeof r){case"string":{if(n.isUnsafeProperty(r))return u;let o=t[r];if(void 0===o){if(i.isDeepKey(r))return e(t,a.toPath(r),u);return u}return o}case"number":case"symbol":{"number"==typeof r&&(r=o.toKey(r));let e=t[r];if(void 0===e)return u;return e}default:{if(Array.isArray(r))return function(e,t,r){if(0===t.length)return r;let i=e;for(let e=0;evoid 0)}},757:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(3400),i=r(4526),o=r(8958);function a(e,t,r,c){if(t===e)return!0;switch(typeof t){case"object":return function(e,t,r,n){if(null==t)return!0;if(Array.isArray(t))return u(e,t,r,n);if(t instanceof Map)return function(e,t,r,n){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(let[i,o]of t.entries())if(!1===r(e.get(i),o,i,e,t,n))return!1;return!0}(e,t,r,n);if(t instanceof Set)return l(e,t,r,n);let o=Object.keys(t);if(null==e||i.isPrimitive(e))return 0===o.length;if(0===o.length)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let a=0;a0)return a(e,{...t},r,c);return o.isEqualsSameValueZero(e,t);default:if(!n.isObject(e))return o.isEqualsSameValueZero(e,t);if("string"==typeof t)return""===t;return!0}}function u(e,t,r,n){if(0===t.length)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let o=0;ovoid 0):a(t,r,function e(t,r,i,o,u,l){let c=n(t,r,i,o,u,l);return void 0!==c?!!c:a(t,r,e,l)},new Map)},t.isSetMatch=l},3400:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},7475:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isObjectLike=function(e){return"object"==typeof e&&null!==e}},9483:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPlainObject=function(e){if("object"!=typeof e||null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){let t=e[Symbol.toStringTag];return!!(null!=t&&Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable)&&e.toString()===`[object ${t}]`}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}},4675:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}},6536:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(6643),i=r(631);t.matches=function(e){return e=i.cloneDeep(e),t=>n.isMatch(t,e)}},4308:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(6643),i=r(9670),o=r(9662),a=r(4073),u=r(8825);t.matchesProperty=function(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=i.toKey(e)}return t=o.cloneDeep(t),function(r){let i=a.get(r,e);return void 0===i?u.has(r,e):void 0===t?void 0===i:n.isMatch(i,t)}}},5586:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(601),i=r(3752),o=r(6536),a=r(4308);t.iteratee=function(e){if(null==e)return n.identity;switch(typeof e){case"function":return e;case"object":if(Array.isArray(e)&&2===e.length)return a.matchesProperty(e[0],e[1]);return o.matches(e);case"string":case"symbol":case"number":return i.property(e)}}},5810:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(4201);t.toFinite=function(e){return e?(e=n.toNumber(e))===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e==e?e:0:0===e?e:0}},4201:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(4675);t.toNumber=function(e){return n.isSymbol(e)?NaN:Number(e)}},9027:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(9251),i=r(9670);t.toPath=function(e){if(Array.isArray(e))return e.map(i.toKey);if("symbol"==typeof e)return[e];e=n.toString(e);let t=[],r=e.length;if(0===r)return t;let o=0,a="",u="",l=!1;for(46===e.charCodeAt(0)&&(t.push(""),o++);o{null!==o&&(e.apply(i,o),i=void 0,o=null)},c=()=>{u&&l(),d()},s=null,f=()=>{null!=s&&clearTimeout(s),s=setTimeout(()=>{s=null,c()},t)},h=()=>{null!==s&&(clearTimeout(s),s=null)},d=()=>{h(),i=void 0,o=null},p=function(...e){if(r?.aborted)return;i=this,o=e;let t=null==s;f(),a&&t&&l()};return p.schedule=f,p.cancel=d,p.flush=()=>{l()},r?.addEventListener("abort",d,{once:!0}),p}},601:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.identity=function(e){return e}},631:function(e,t,r){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let n=r(6737);t.cloneDeep=function(e){return n.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}},6737:function(e,t,r){"use strict";var n=r(6434).Buffer;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});let i=r(9924),o=r(3984),a=r(1116),u=r(4526),l=r(3497);function c(e,t,r,i=new Map,f){let h=f?.(e,t,r,i);if(void 0!==h)return h;if(u.isPrimitive(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let t=Array(e.length);i.set(e,t);for(let n=0;n=0}},4526:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}},3497:function(e,t){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}},7625:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,a){if("function"!=typeof n)throw TypeError("The listener must be a function");var u=new i(n,o||e,a),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],u]:e._events[l].push(u):(e._events[l]=u,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function u(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),u.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},u.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=Array(o);i0?a-4:a;for(r=0;r>16&255,c[s++]=t>>8&255,c[s++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[s++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[s++]=t>>8&255,c[s++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,u=n-i;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,a+16383>u?u:a+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=o.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return s(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!u.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(M(e,ArrayBuffer)||e&&M(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(M(e,SharedArrayBuffer)||e&&M(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||M(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return S(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E(e).length;default:if(i)return n?-1:S(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var i,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,a=1,u=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;a=2,u/=2,l/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var s=-1;for(o=r;ou&&(r=u-l),o=r;o>=0;o--){for(var f=!0,h=0;h239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(s=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(s=l);break;case 3:o=e[i+1],a=e[i+2],(192&o)==128&&(192&a)==128&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:o=e[i+1],a=e[i+2],u=e[i+3],(192&o)==128&&(192&a)==128&&(192&u)==128&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&l<1114112&&(s=l)}null===s?(s=65533,f=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,o){if(!u.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function x(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function O(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,o){return t=+t,r>>>=0,o||x(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return(c(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},u.allocUnsafe=function(e){return s(e)},u.allocUnsafeSlow=function(e){return s(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(M(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);ir&&(e+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(M(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,a=r-t,l=Math.min(o,a),c=this.slice(n,i),s=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,a,u,l,c,s,f,h,d,p,y,v=this.length-t;if((void 0===r||r>v)&&(r=v),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var g=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>8,i.push(r%256),i.push(n);return i}(e,this.length-p),this,p,y);default:if(g)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),g=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=r-1,a=1,u=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function _(e){for(var t=[],r=0;r=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var k=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){t.read=function(e,t,r,n,i){var o,a,u=8*i-n-1,l=(1<>1,s=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-s)-1,d>>=-s,s+=u;s>0;o=256*o+e[t+f],f+=h,s-=8);for(a=o&(1<<-s)-1,o>>=-s,s+=n;s>0;a=256*a+e[t+f],f+=h,s-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,u,l,c=8*o-i-1,s=(1<>1,h=23===i?5960464477539062e-23:0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(u=isNaN(t)?1:0,a=s):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=s?(u=0,a=s):a+f>=1?(u=(t*l-1)*Math.pow(2,i),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&u,d+=p,u/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*y}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},a=!0;try{t[e](o,o.exports,n),a=!1}finally{a&&delete r[e]}return o.exports}n.ab="//";var i=n(72);e.exports=i}()},9679:function(e,t){"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition");Symbol.for("react.client.reference"),t.M2=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case o:case s:case f:case p:return e;default:switch(e=e&&e.$$typeof){case l:case c:case d:case h:case u:return e;default:return t}}case n:return t}}}(e)===i}},9775:function(e,t,r){"use strict";r.d(t,{H:function(){return M}});var n=r(2265),i=r(6630),o=r(130),a=r(8266);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;te+(t-e)*r,s=e=>{var{from:t,to:r}=e;return t!==r},f=(e,t,r)=>{var n=(0,a.Xc)((t,r)=>{if(s(r)){var[n,i]=e(r.from,r.to,r.velocity);return l(l({},r),{},{from:n,velocity:i})}return r},t);return r<1?(0,a.Xc)((e,t)=>s(t)&&null!=n[e]?l(l({},t),{},{velocity:c(t.velocity,n[e].velocity,r),from:c(t.from,n[e].from,r)}):t,t):f(e,n,r-1)},h=(e,t,r,n,i,o)=>{var u,h,d,p,y,v,g,m,b,w,x=(0,a.JK)(e,t);return null==r?()=>(i(l(l({},e),t)),()=>{}):!0===r.isStepper?(h=x.reduce((r,n)=>l(l({},r),{},{[n]:{from:e[n],velocity:0,to:t[n]}}),{}),d=()=>(0,a.Xc)((e,t)=>t.from,h),p=()=>!Object.values(h).filter(s).length,y=null,v=n=>{u||(u=n);var a=(n-u)/r.dt;h=f(r,h,a),i(l(l(l({},e),t),d())),u=n,p()||(y=o.setTimeout(v))},()=>(y=o.setTimeout(v),()=>{var e;null===(e=y)||void 0===e||e()})):(m=null,b=x.reduce((r,n)=>{var i=e[n],o=t[n];return null==i||null==o?r:l(l({},r),{},{[n]:[i,o]})},{}),w=u=>{g||(g=u);var s=(u-g)/n,f=(0,a.Xc)((e,t)=>c(...t,r(s)),b);if(i(l(l(l({},e),t),f)),s<1)m=o.setTimeout(w);else{var h=(0,a.Xc)((e,t)=>c(...t,r(1)),b);i(l(l(l({},e),t),h))}},()=>(m=o.setTimeout(w),()=>{var e;null===(e=m)||void 0===e||e()}))},d=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],p=(e,t)=>e.map((e,r)=>e*t**r).reduce((e,t)=>e+t),y=(e,t)=>r=>p(d(e,t),r),v=(e,t)=>r=>p([...d(e,t).map((e,t)=>e*t).slice(1),0],r),g=e=>{var t,r=e.split("(");if(2!==r.length||"cubic-bezier"!==r[0])return null;var n=null===(t=r[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==n||4!==n.length)return null;var i=n.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},m=function(){for(var e=arguments.length,t=Array(e),r=0;r{var i=y(e,r),o=y(t,n),a=v(e,r),u=e=>e>1?1:e<0?0:e,l=e=>{for(var t=e>1?1:e,r=t,n=0;n<8;++n){var l=i(r)-t,c=a(r);if(1e-4>Math.abs(l-t)||c<1e-4)break;r=u(r-l/c)}return o(r)};return l.isStepper=!1,l},w=function(){return b(...m(...arguments))},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:r=8,dt:n=17}=e,i=(e,i,o)=>{var a=o+(-(e-i)*t-o*r)*n/1e3,u=o*n/1e3+e;return 1e-4>Math.abs(u-i)&&1e-4>Math.abs(a)?[i,0]:[u,a]};return i.isStepper=!0,i.dt=n,i},O=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return w(e);case"spring":return x();default:if("cubic-bezier"===e.split("(")[0])return w(e)}return"function"==typeof e?e:null};class P{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=performance.now(),n=null,i=o=>{o-r>=t?e(o):"function"==typeof requestAnimationFrame&&(n=requestAnimationFrame(i))};return n=requestAnimationFrame(i),()=>{null!=n&&cancelAnimationFrame(n)}}}var j=(0,n.createContext)(function(){var e,t,r,n,i;return e=new P,t=()=>null,r=!1,n=null,i=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var[a,...u]=o;if("number"==typeof a){n=e.setTimeout(i.bind(null,u),a);return}i(a),n=e.setTimeout(i.bind(null,u));return}"string"==typeof o&&t(o),"object"==typeof o&&t(o),"function"==typeof o&&o()}},{stop:()=>{r=!0},start:e=>{r=!1,n&&(n(),n=null),i(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}),S=r(4067),_={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},E={t:0},A={t:1};function M(e){var t,r,a,u=(0,o.j)(e,_),{isActive:l,canBegin:c,duration:s,easing:f,begin:d,onAnimationEnd:p,onAnimationStart:y,children:v}=u,g="auto"===l?!S.x.isSsr:l,m=(t=u.animationId,r=u.animationManager,a=(0,n.useContext)(j),(0,n.useMemo)(()=>null!=r?r:a(t),[t,r,a])),[b,w]=(0,n.useState)(g?E:A),x=(0,n.useRef)(null);return(0,n.useEffect)(()=>{g||w(A)},[g]),(0,n.useEffect)(()=>{if(!g||!c)return i.ZT;var e=h(E,A,O(f),s,w,m.getTimeoutController());return m.start([y,d,()=>{x.current=e()},s,p]),()=>{m.stop(),x.current&&x.current(),p()}},[g,c,s,f,d,y,p,m]),v(b.t)}},8266:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),a=(e,t,r)=>e.map(e=>"".concat(o(e)," ").concat(t,"ms ").concat(r)).join(","),u=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((e,t)=>e.filter(e=>t.includes(e))),l=(e,t)=>Object.keys(t).reduce((r,n)=>i(i({},r),{},{[n]:e(n,t[n])}),{})},5224:function(e,t,r){"use strict";r.d(t,{u:function(){return t$}});var n=r(2265),i=r(1057);r(6548);var o={notify(){},get:()=>[]},a=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement),u="undefined"!=typeof navigator&&"ReactNative"===navigator.product,l=a||u?n.useLayoutEffect:n.useEffect;function c(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}var s=Symbol.for("react-redux-context"),f="undefined"!=typeof globalThis?globalThis:{},h=function(){if(!n.createContext)return{};let e=f[s]??=new Map,t=e.get(n.createContext);return t||(t=n.createContext(null),e.set(n.createContext,t)),t}(),d=function(e){let{children:t,context:r,serverState:i,store:a}=e,u=n.useMemo(()=>{let e=function(e,t){let r;let n=o,i=0,a=!1;function u(){s.onStateChange&&s.onStateChange()}function l(){if(i++,!r){let t,i;r=e.subscribe(u),t=null,i=null,n={clear(){t=null,i=null},notify(){(()=>{let e=t;for(;e;)e.callback(),e=e.next})()},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let r=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:t=n,function(){r&&null!==t&&(r=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:t=n.next)}}}}}function c(){i--,r&&0===i&&(r(),r=void 0,n.clear(),n=o)}let s={addNestedSub:function(e){l();let t=n.subscribe(e),r=!1;return()=>{r||(r=!0,t(),c())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:u,isSubscribed:function(){return a},trySubscribe:function(){a||(a=!0,l())},tryUnsubscribe:function(){a&&(a=!1,c())},getListeners:()=>n};return s}(a);return{store:a,subscription:e,getServerState:i?()=>i:void 0}},[a,i]),c=n.useMemo(()=>a.getState(),[a]);return l(()=>{let{subscription:e}=u;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),c!==a.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[u,c]),n.createElement((r||h).Provider,{value:u},t)},p=r(9688),y=r(9129),v=r(4725),g=r(9173),m=r(5293),b=r(2713),w=r(5953),x=r(1944),O=r(9729),P=r(3683),j=r(5995),S=r(4014),_=(0,b.P1)([(e,t)=>t,w.rE,j.HW,S.c,x.PG,x.WQ,P.EM,O.DX],P.Nb),E=r(6302),A=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},M=(0,y.PH)("mouseClick"),k=(0,y.e)();k.startListening({actionCreator:M,effect:(e,t)=>{var r=e.payload,n=_(t.getState(),A(r));(null==n?void 0:n.activeIndex)!=null&&t.dispatch((0,v.eB)({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var T=(0,y.PH)("mouseMove"),C=(0,y.e)(),D=null;function N(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<>":t}C.startListening({actionCreator:T,effect:(e,t)=>{var r=e.payload;null!==D&&cancelAnimationFrame(D);var n=A(r);D=requestAnimationFrame(()=>{var e=t.getState();if("axis"===(0,E.SB)(e,e.tooltip.settings.shared)){var r=_(e,n);(null==r?void 0:r.activeIndex)!=null?t.dispatch((0,v.Rr)({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch((0,v.ne)())}D=null})}});var I=r(418);function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function R(e){for(var t=1;t=Math.abs(n-(null!==(o=a[0])&&void 0!==o?o:0)))return;var u=[...a,n].slice(-3);e.yAxis[r]=R(R({},i),{},{width:n,widthHistory:u})}}}}),{addXAxis:U,replaceXAxis:B,removeXAxis:$,addYAxis:F,replaceYAxis:W,removeYAxis:K,addZAxis:Z,replaceZAxis:q,removeZAxis:H,updateYAxisWidth:V}=L.actions,X=L.reducer,Y=r(9579),G=r(9234),Q=(0,y.oM)({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=(0,G.Vk)(e).dots.findIndex(e=>e===t.payload);-1!==r&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=(0,G.Vk)(e).areas.findIndex(e=>e===t.payload);-1!==r&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push((0,I.cA)(t.payload))},removeLine:(e,t)=>{var r=(0,G.Vk)(e).lines.findIndex(e=>e===t.payload);-1!==r&&e.lines.splice(r,1)}}}),{addDot:J,removeDot:ee,addArea:et,removeArea:er,addLine:en,removeLine:ei}=Q.actions,eo=Q.reducer,ea={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},eu=(0,y.oM)({name:"brush",initialState:ea,reducers:{setBrushSettings:(e,t)=>null==t.payload?ea:t.payload}}),{setBrushSettings:el}=eu.actions,ec=eu.reducer,es=r(2738),ef={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},eh=(0,y.oM)({name:"rootProps",initialState:ef,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(r=t.payload.barGap)&&void 0!==r?r:ef.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),ed=eh.reducer,{updateOptions:ep}=eh.actions,ey=(0,y.oM)({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=(0,I.cA)(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=(0,I.cA)(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:ev,removeRadiusAxis:eg,addAngleAxis:em,removeAngleAxis:eb}=ey.actions,ew=ey.reducer,ex=(0,y.oM)({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:eO}=ex.actions,eP=ex.reducer,ej=r(9064),eS=r(6064),e_=(0,y.PH)("keyDown"),eE=(0,y.PH)("focus"),eA=(0,y.e)();eA.startListening({actionCreator:e_,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var{keyboardInteraction:n}=r.tooltip,i=e.payload;if("ArrowRight"===i||"ArrowLeft"===i||"Enter"===i){var o=(0,eS.p)(n,(0,x.wQ)(r),(0,ej.BD)(r),(0,x.lj)(r)),a=null==o?-1:Number(o);if(Number.isFinite(a)&&!(a<0)){var u=(0,x.WQ)(r);if("Enter"===i){var l=(0,P.hA)(r,"axis","hover",String(n.index));t.dispatch((0,v.KN)({active:!n.active,activeIndex:n.index,activeCoordinate:l}));return}var c=a+("ArrowRight"===i?1:-1)*("left-to-right"===(0,ej.Xv)(r)?1:-1);if(null!=u&&!(c>=u.length)&&!(c<0)){var s=(0,P.hA)(r,"axis","hover",String(c));t.dispatch((0,v.KN)({active:!0,activeIndex:c.toString(),activeCoordinate:s}))}}}}}}),eA.startListening({actionCreator:eE,effect:(e,t)=>{var r=t.getState();if(!1!==r.rootProps.accessibilityLayer){var{keyboardInteraction:n}=r.tooltip;if(!n.active&&null==n.index){var i=(0,P.hA)(r,"axis","hover",String("0"));t.dispatch((0,v.KN)({active:!0,activeIndex:"0",activeCoordinate:i}))}}}});var eM=(0,y.PH)("externalEvent"),ek=(0,y.e)(),eT=new Map;ek.startListening({actionCreator:eM,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(null!=r){n.persist();var i=n.type,o=eT.get(i);void 0!==o&&cancelAnimationFrame(o);var a=requestAnimationFrame(()=>{try{var e=t.getState(),o={activeCoordinate:(0,x.pI)(e),activeDataKey:(0,x.du)(e),activeIndex:(0,x.Ve)(e),activeLabel:(0,x.i)(e),activeTooltipIndex:(0,x.Ve)(e),isTooltipActive:(0,x.oo)(e)};r(o,n)}finally{eT.delete(i)}});eT.set(i,a)}}});var eC=r(8487),eD=r(4803),eN=(0,b.P1)([eD.M],e=>e.tooltipItemPayloads),eI=(0,b.P1)([eN,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(null!=t){var n=e.find(e=>e.settings.graphicalItemId===r);if(null!=n){var{getPosition:i}=n;if(null!=i)return i(t)}}}),ez=(0,y.PH)("touchMove"),eR=(0,y.e)();eR.startListening({actionCreator:ez,effect:(e,t)=>{var r=e.payload;if(null!=r.touches&&0!==r.touches.length){var n=t.getState(),i=(0,E.SB)(n,n.tooltip.settings.shared);if("axis"===i){var o=r.touches[0];if(null==o)return;var a=_(n,A({clientX:o.clientX,clientY:o.clientY,currentTarget:r.currentTarget}));(null==a?void 0:a.activeIndex)!=null&&t.dispatch((0,v.Rr)({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if("item"===i){var u,l=r.touches[0];if(null==document.elementFromPoint||null==l)return;var c=document.elementFromPoint(l.clientX,l.clientY);if(!c||!c.getAttribute)return;var s=c.getAttribute(eC.Gh),f=null!==(u=c.getAttribute(eC.jX))&&void 0!==u?u:void 0,h=(0,x.CG)(n).find(e=>e.id===f);if(null==s||null==h||null==f)return;var{dataKey:d}=h,p=eI(n,s,f);t.dispatch((0,v.M1)({activeDataKey:d,activeIndex:s,activeCoordinate:p,activeGraphicalItemId:f}))}}}});var eL=(0,y.oM)({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(e=>e.dataKey===n.dataKey&&e.direction===n.direction?i:e))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==n.dataKey||e.direction!==n.direction))}}}),{addErrorBar:eU,replaceErrorBar:eB,removeErrorBar:e$}=eL.actions,eF=eL.reducer,eW=r(4067),eK=r(7274),eZ=(0,p.UY)({brush:ec,cartesianAxis:X,chartData:g.Q2,errorBars:eF,graphicalItems:Y.iX,layout:m.EW,legend:es.Ny,options:i.wB,polarAxis:ew,polarOptions:eP,referenceElements:eo,rootProps:ed,tooltip:v.Kw,zIndex:eK.IE}),eq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart";return(0,y.xC)({reducer:eZ,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([k.middleware,C.middleware,eA.middleware,ek.middleware,eR.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat((0,y.bu)({type:"raf"}))},devTools:eW.x.devToolsEnabled&&{serialize:{replacer:N},name:"recharts-".concat(t)}})},eH=r(8735),eV=r(209);function eX(e){var{preloadedState:t,children:r,reduxStoreName:i}=e,o=(0,eH.W)(),a=(0,n.useRef)(null);if(o)return r;null==a.current&&(a.current=eq(t,i));var u=eV.l;return n.createElement(d,{context:u,store:a.current},r)}var eY=r(9040),eG=e=>{var{chartData:t}=e,r=(0,eY.T)(),i=(0,eH.W)();return(0,n.useEffect)(()=>i?()=>{}:(r((0,g.zR)(t)),()=>{r((0,g.zR)(void 0))}),[t,r,i]),null},eQ=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]),eJ=(0,n.memo)(function(e){var{layout:t,margin:r}=e,i=(0,eY.T)(),o=(0,eH.W)();return(0,n.useEffect)(()=>{o||(i((0,m.jx)(t)),i((0,m.Qb)(r)))},[i,o,t,r]),null},function(e,t){for(var r of new Set([...Object.keys(e),...Object.keys(t)]))if(eQ.has(r)){if(null==e[r]&&null==t[r])continue;if(!function(e,t){if(c(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n{t(ep(e))},[t,e]),null}function e1(e){var t=(0,eY.T)();return(0,n.useEffect)(()=>{t(eO(e))},[t,e]),null}var e2=r(4847),e5=r(1994),e3=r(3414),e6=["children","width","height","viewBox","className","style","title","desc"];function e4(){return(e4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,width:i,height:o,viewBox:a,className:u,style:l,title:c,desc:s}=e,f=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n(i.current&&o((0,eK.d1)({zIndex:t,element:i.current,isPanorama:r})),()=>{o((0,eK.cG)({zIndex:t,isPanorama:r}))}),[o,t,r]),n.createElement("g",{tabIndex:-1,ref:i})}function tr(e){var{children:t,isPanorama:r}=e,i=(0,eY.C)(te.k);if(!i||0===i.length)return t;var o=i.filter(e=>e<0),a=i.filter(e=>e>0);return n.createElement(n.Fragment,null,o.map(e=>n.createElement(tt,{key:e,zIndex:e,isPanorama:r})),t,a.map(e=>n.createElement(tt,{key:e,zIndex:e,isPanorama:r})))}var tn=["children"];function ti(){return(ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var r,i,o=(0,w.zn)(),a=(0,w.Mw)(),u=(0,e2.F)();if(!(0,e9.r)(o)||!(0,e9.r)(a))return null;var{children:l,otherAttributes:c,title:s,desc:f}=e;return null!=c&&(r="number"==typeof c.tabIndex?c.tabIndex:u?0:void 0,i="string"==typeof c.role?c.role:u?"application":void 0),n.createElement(e8,ti({},c,{title:s,desc:f,role:i,tabIndex:r,width:o,height:a,style:to,ref:t}),l)}),tu=e=>{var{children:t}=e,r=(0,eY.C)(e7.V);if(!r)return null;var{width:i,height:o,y:a,x:u}=r;return n.createElement(e8,{width:i,height:o,x:u,y:a},t)},tl=(0,n.forwardRef)((e,t)=>{var{children:r}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n((0,tc.W9)(),null);function tg(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var tm=(0,n.forwardRef)((e,t)=>{var r,i,o=(0,n.useRef)(null),[a,u]=(0,n.useState)({containerWidth:tg(null===(r=e.style)||void 0===r?void 0:r.width),containerHeight:tg(null===(i=e.style)||void 0===i?void 0:i.height)}),l=(0,n.useCallback)((e,t)=>{u(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),c=(0,n.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e&&"undefined"!=typeof ResizeObserver){var{width:r,height:n}=e.getBoundingClientRect();l(r,n);var i=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:r,height:n}=t.contentRect;l(r,n)}});i.observe(e),o.current=i}},[t,l]);return(0,n.useEffect)(()=>()=>{var e=o.current;null!=e&&e.disconnect()},[l]),n.createElement(n.Fragment,null,n.createElement(w.Ir,{width:a.containerWidth,height:a.containerHeight}),n.createElement("div",ty({ref:c},e)))}),tb=(0,n.forwardRef)((e,t)=>{var{width:r,height:i}=e,[o,a]=(0,n.useState)({containerWidth:tg(r),containerHeight:tg(i)}),u=(0,n.useCallback)((e,t)=>{a(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]),l=(0,n.useCallback)(e=>{if("function"==typeof t&&t(e),null!=e){var{width:r,height:n}=e.getBoundingClientRect();u(r,n)}},[t,u]);return n.createElement(n.Fragment,null,n.createElement(w.Ir,{width:o.containerWidth,height:o.containerHeight}),n.createElement("div",ty({ref:l},e)))}),tw=(0,n.forwardRef)((e,t)=>{var{width:r,height:i}=e;return n.createElement(n.Fragment,null,n.createElement(w.Ir,{width:r,height:i}),n.createElement("div",ty({ref:t},e)))}),tx=(0,n.forwardRef)((e,t)=>{var{width:r,height:i}=e;return"string"==typeof r||"string"==typeof i?n.createElement(tb,ty({},e,{ref:t})):"number"==typeof r&&"number"==typeof i?n.createElement(tw,ty({},e,{width:r,height:i,ref:t})):n.createElement(n.Fragment,null,n.createElement(w.Ir,{width:r,height:i}),n.createElement("div",ty({ref:t},e)))}),tO=(0,n.forwardRef)((e,t)=>{var{children:r,className:i,height:o,onClick:a,onContextMenu:u,onDoubleClick:l,onMouseDown:c,onMouseEnter:s,onMouseLeave:f,onMouseMove:h,onMouseUp:d,onTouchEnd:p,onTouchMove:y,onTouchStart:g,style:b,width:w,responsive:x,dispatchTouchEvents:O=!0}=e,P=(0,n.useRef)(null),j=(0,eY.T)(),[S,_]=(0,n.useState)(null),[E,A]=(0,n.useState)(null),k=function(){var e=(0,eY.T)(),[t,r]=(0,n.useState)(null),i=(0,eY.C)(ts.K$);return(0,n.useEffect)(()=>{if(null!=t){var r=t.getBoundingClientRect().width/t.offsetWidth;(0,e9.n)(r)&&r!==i&&e((0,m.ZP)(r))}},[t,e,i]),r}(),C=(0,td.$)(),D=(null==C?void 0:C.width)>0?C.width:w,N=(null==C?void 0:C.height)>0?C.height:o,I=(0,n.useCallback)(e=>{k(e),"function"==typeof t&&t(e),_(e),A(e),null!=e&&(P.current=e)},[k,t,_,A]),z=(0,n.useCallback)(e=>{j(M(e)),j(eM({handler:a,reactEvent:e}))},[j,a]),R=(0,n.useCallback)(e=>{j(T(e)),j(eM({handler:s,reactEvent:e}))},[j,s]),L=(0,n.useCallback)(e=>{j((0,v.ne)()),j(eM({handler:f,reactEvent:e}))},[j,f]),U=(0,n.useCallback)(e=>{j(T(e)),j(eM({handler:h,reactEvent:e}))},[j,h]),B=(0,n.useCallback)(()=>{j(eE())},[j]),$=(0,n.useCallback)(e=>{j(e_(e.key))},[j]),F=(0,n.useCallback)(e=>{j(eM({handler:u,reactEvent:e}))},[j,u]),W=(0,n.useCallback)(e=>{j(eM({handler:l,reactEvent:e}))},[j,l]),K=(0,n.useCallback)(e=>{j(eM({handler:c,reactEvent:e}))},[j,c]),Z=(0,n.useCallback)(e=>{j(eM({handler:d,reactEvent:e}))},[j,d]),q=(0,n.useCallback)(e=>{j(eM({handler:g,reactEvent:e}))},[j,g]),H=(0,n.useCallback)(e=>{O&&j(ez(e)),j(eM({handler:y,reactEvent:e}))},[j,O,y]),V=(0,n.useCallback)(e=>{j(eM({handler:p,reactEvent:e}))},[j,p]);return n.createElement(tf.E.Provider,{value:S},n.createElement(th.Provider,{value:E},n.createElement(x?tm:tx,{width:null!=D?D:null==b?void 0:b.width,height:null!=N?N:null==b?void 0:b.height,className:(0,e5.W)("recharts-wrapper",i),style:function(e){for(var t=1;t({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),tS=(0,b.P1)([tj,ts.RD,ts.d_],(e,t,r)=>{if(e&&null!=t&&null!=r)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),t_=()=>(0,eY.C)(tS),tE=(0,n.createContext)(void 0),tA=e=>{var{children:t}=e,[r]=(0,n.useState)("".concat((0,tP.EL)("recharts"),"-clip")),i=t_();if(null==i)return null;var{x:o,y:a,width:u,height:l}=i;return n.createElement(tE.Provider,{value:r},n.createElement("defs",null,n.createElement("clipPath",{id:r},n.createElement("rect",{x:o,y:a,height:l,width:u}))),t)},tM=r(1221),tk=["width","height","responsive","children","className","style","compact","title","desc"],tT=(0,n.forwardRef)((e,t)=>{var{width:r,height:i,responsive:o,children:a,className:u,style:l,compact:c,title:s,desc:f}=e,h=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var r=(0,tC.j)(e,tB);return n.createElement(tz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:tU,tooltipPayloadSearcher:i.NL,categoricalChartProps:r,ref:t})})},407:function(e,t,r){"use strict";r.d(t,{b:function(){return n}});var n=e=>null;n.displayName="Cell"},3056:function(e,t,r){"use strict";r.d(t,{h:function(){return j},$:function(){return O}});var n=r(1994),i=r(2265),o=r(4926),a=r.n(o),u=r(6630),l=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;in[o++]))}}},c={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},s=(e,t,r)=>{var{width:n=c.width,height:i=c.height,aspect:o,maxHeight:a}=r,l=(0,u.hU)(n)?e:Number(n),s=(0,u.hU)(i)?t:Number(i);return o&&o>0&&(l?s=l/o:s&&(l=s*o),a&&null!=s&&s>a&&(s=a)),{calculatedWidth:l,calculatedHeight:s}},f={width:0,height:0,overflow:"visible"},h={width:0,overflowX:"visible"},d={height:0,overflowY:"visible"},p={},y=e=>{var{width:t,height:r}=e,n=(0,u.hU)(t),i=(0,u.hU)(r);return n&&i?f:n?h:i?d:p},v=r(6395);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t({width:r,height:n}),[r,n]);return(0,v.r)(o.width)&&(0,v.r)(o.height)?i.createElement(w.Provider,{value:o},t):null}var O=()=>(0,i.useContext)(w),P=(0,i.forwardRef)((e,t)=>{var{aspect:r,initialDimension:o=c.initialDimension,width:f,height:h,minWidth:d=c.minWidth,minHeight:p,maxHeight:v,children:g,debounce:m=c.debounce,id:w,className:O,onResize:P,style:j={}}=e,S=(0,i.useRef)(null),_=(0,i.useRef)();_.current=P,(0,i.useImperativeHandle)(t,()=>S.current);var[E,A]=(0,i.useState)({containerWidth:o.width,containerHeight:o.height}),M=(0,i.useCallback)((e,t)=>{A(r=>{var n=Math.round(e),i=Math.round(t);return r.containerWidth===n&&r.containerHeight===i?r:{containerWidth:n,containerHeight:i}})},[]);(0,i.useEffect)(()=>{if(null==S.current||"undefined"==typeof ResizeObserver)return u.ZT;var e=e=>{var t,r=e[0];if(null!=r){var{width:n,height:i}=r.contentRect;M(n,i),null===(t=_.current)||void 0===t||t.call(_,n,i)}};m>0&&(e=a()(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:r,height:n}=S.current.getBoundingClientRect();return M(r,n),t.observe(S.current),()=>{t.disconnect()}},[M,m]);var{containerWidth:k,containerHeight:T}=E;l(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:C,calculatedHeight:D}=s(k,T,{width:f,height:h,aspect:r,maxHeight:v});return l(null!=C&&C>0||null!=D&&D>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",C,D,f,h,d,p,r),i.createElement("div",{id:w?"".concat(w):void 0,className:(0,n.W)("recharts-responsive-container",O),style:b(b({},j),{},{width:f,height:h,minWidth:d,minHeight:p,maxHeight:v}),ref:S},i.createElement("div",{style:y({width:f,height:h})},i.createElement(x,{width:C,height:D},g)))}),j=(0,i.forwardRef)((e,t)=>{var r=O();if((0,v.r)(r.width)&&(0,v.r)(r.height))return e.children;var{width:n,height:o}=function(e){var{width:t,height:r,aspect:n}=e,i=t,o=r;return void 0===i&&void 0===o?(i=c.width,o=c.height):void 0===i?i=n&&n>0?void 0:c.width:void 0===o&&(o=n&&n>0?void 0:c.height),{width:i,height:o}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:l}=s(void 0,void 0,{width:n,height:o,aspect:e.aspect,maxHeight:e.maxHeight});return(0,u.hj)(a)&&(0,u.hj)(l)?i.createElement(x,{width:a,height:l},e.children):i.createElement(P,g({},e,{width:n,height:o,ref:t}))})},7719:function(e,t,r){"use strict";r.d(t,{u:function(){return eh}});var n=r(2265),i=r(4887),o=r(1104),a=r.n(o),u=r(1994),l=r(6630);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{separator:t=d.separator,contentStyle:r,itemStyle:i,labelStyle:o=d.labelStyle,payload:s,formatter:p,itemSorter:y,wrapperClassName:v,labelClassName:g,label:m,labelFormatter:b,accessibilityLayer:w=d.accessibilityLayer}=e,x=f(f({},d.contentStyle),r),O=f({margin:0},o),P=!(0,l.Rw)(m),j=P?m:"",S=(0,u.W)("recharts-default-tooltip",v),_=(0,u.W)("recharts-tooltip-label",g);return P&&b&&null!=s&&(j=b(m,s)),n.createElement("div",c({className:S,style:x},w?{role:"status","aria-live":"assertive"}:{}),n.createElement("p",{className:_,style:O},n.isValidElement(j)?j:"".concat(j)),(()=>{if(s&&s.length){var e=(y?a()(s,y):s).map((e,r)=>{if("none"===e.type)return null;var o=e.formatter||p||h,{value:a,name:u}=e,c=a,y=u;if(o){var v=o(a,u,e,r,s);if(Array.isArray(v))[c,y]=v;else{if(null==v)return null;c=v}}var g=f(f({},d.itemStyle),{},{color:e.color||d.itemStyle.color},i);return n.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(r),style:g},(0,l.P2)(y)?n.createElement("span",{className:"recharts-tooltip-item-name"},y):null,(0,l.P2)(y)?n.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,n.createElement("span",{className:"recharts-tooltip-item-value"},c),n.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return n.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null})())},y="recharts-tooltip-wrapper",v={visibility:"hidden"};function g(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:a,tooltipDimension:u,viewBox:c,viewBoxDimension:s}=e;if(o&&(0,l.hj)(o[n]))return o[n];var f=r[n]-u-(i>0?i:0),h=r[n]+i;if(t[n])return a[n]?f:h;var d=c[n];return null==d?0:a[n]?fd+s?Math.max(f,d):Math.max(h,d)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t0&&h.width>0&&o?function(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}({translateX:r=g({allowEscapeViewBox:i,coordinate:o,key:"x",offset:c,position:s,reverseDirection:f,tooltipDimension:h.width,viewBox:p,viewBoxDimension:p.width}),translateY:n=g({allowEscapeViewBox:i,coordinate:o,key:"y",offset:a,position:s,reverseDirection:f,tooltipDimension:h.height,viewBox:p,viewBoxDimension:p.height}),useTranslate3d:d}):v,cssClasses:function(e){var{coordinate:t,translateX:r,translateY:n}=e;return(0,u.W)(y,{["".concat(y,"-right")]:(0,l.hj)(r)&&t&&(0,l.hj)(t.x)&&r>=t.x,["".concat(y,"-left")]:(0,l.hj)(r)&&t&&(0,l.hj)(t.x)&&r=t.y,["".concat(y,"-top")]:(0,l.hj)(n)&&t&&(0,l.hj)(t.y)&&n{if("Escape"===e.key){var t,r,n,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(t=null===(r=this.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==t?t:0,y:null!==(n=null===(i=this.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==n?n:0}})}})}}var O=r(6841),P=r.n(O),j=r(5953),S=r(4847),_=r(1637),E=r(7165),A=r(3414),M=["x","y","top","left","width","height","className"];function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),D=e=>{var{x:t=0,y:r=0,top:i=0,left:o=0,width:a=0,height:c=0,className:s}=e,f=function(e){for(var t=1;t(0,L.C)(B.zv),Z=()=>{var e=K(),t=(0,L.C)($.WQ),r=(0,L.C)($.ri);return e&&r?(0,U.zT)(W(W({},e),{},{scale:r}),t):(0,U.zT)(void 0,t)},q=r(3683),H=r(1221),V=r(8002),X=r(3928);function Y(){return(Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{C((0,en.PD)({shared:E,trigger:A,axisId:T,active:l,defaultIndex:D}))},[C,E,A,T,l,D]);var N=(0,j.d2)(),I=(0,S.F)(),z=(0,eo.Y4)(E),{activeIndex:R,isActive:U}=null!==(o=(0,L.C)(e=>(0,q.oo)(e,z,A,D)))&&void 0!==o?o:{},B=(0,L.C)(e=>(0,q.TT)(e,z,A,D)),$=(0,L.C)(e=>(0,q.i)(e,z,A,D)),F=(0,L.C)(e=>(0,q.ck)(e,z,A,D)),W=(0,er.C)(),K=null!==(a=null!=l?l:U)&&void 0!==a&&a,[Z,H]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t,r]=(0,n.useState)({height:0,left:0,top:0,width:0}),i=(0,n.useCallback)(e=>{if(null!=e){var n=e.getBoundingClientRect(),i={height:n.height,left:n.left,top:n.top,width:n.width};(Math.abs(i.height-t.height)>1||Math.abs(i.left-t.left)>1||Math.abs(i.top-t.top)>1||Math.abs(i.width-t.width)>1)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,i]}([B,K]),V="axis"===z?$:void 0;(0,ei.Fg)(z,A,F,V,R,K);var X=null!=k?k:W;if(null==X||null==N||null==z)return null;var Y=null!=B?B:es;K||(Y=es),d&&Y.length&&(t=Y.filter(e=>null!=e.value&&(!0!==e.hide||u.includeHidden)),Y=!0===g?P()(t,ec):"function"==typeof g?P()(t,g):t);var G=Y.length>0,Q=n.createElement(x,{allowEscapeViewBox:c,animationDuration:s,animationEasing:f,isAnimationActive:y,active:K,coordinate:F,hasPayload:G,offset:v,position:m,reverseDirection:b,useTranslate3d:w,viewBox:N,wrapperStyle:O,lastBoundingBox:Z,innerRef:H,hasPortalFromProps:!!k},(r=el(el({},u),{},{payload:Y,label:V,active:K,activeIndex:R,coordinate:F,accessibilityLayer:I}),n.isValidElement(h)?n.cloneElement(h,r):"function"==typeof h?n.createElement(h,r):n.createElement(p,r)));return n.createElement(n.Fragment,null,(0,i.createPortal)(Q,X),K&&n.createElement(et,{cursor:_,tooltipEventType:z,coordinate:F,payload:Y,index:R}))}},8735:function(e,t,r){"use strict";r.d(t,{W:function(){return o}});var n=r(2265),i=(0,n.createContext)(null),o=()=>null!=(0,n.useContext)(i)},4847:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(9040),i=()=>{var e;return null===(e=(0,n.C)(e=>e.rootProps.accessibilityLayer))||void 0===e||e}},5953:function(e,t,r){"use strict";r.d(t,{Ir:function(){return O},KM:function(){return w},Mw:function(){return g},_M:function(){return h},d2:function(){return d},kz:function(){return x},rE:function(){return m},rh:function(){return y},vn:function(){return b},zn:function(){return v}});var n=r(2265),i=r(9040),o=r(5293),a=r(9729),u=r(152),l=r(8735),c=r(3358),s=r(3056),f=r(6395);function h(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var d=()=>{var e,t=(0,l.W)(),r=(0,i.C)(a.nd),n=(0,i.C)(c.V),o=null===(e=(0,i.C)(c.F))||void 0===e?void 0:e.padding;return t&&n&&o?{width:n.width-o.left-o.right,height:n.height-o.top-o.bottom,x:o.left,y:o.top}:r},p={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},y=()=>{var e;return null!==(e=(0,i.C)(a.DX))&&void 0!==e?e:p},v=()=>(0,i.C)(u.RD),g=()=>(0,i.C)(u.d_),m=e=>e.layout.layoutType,b=()=>(0,i.C)(m),w=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},x=()=>void 0!==b(),O=e=>{var t=(0,i.T)(),r=(0,l.W)(),{width:a,height:u}=e,c=(0,s.$)(),h=a,d=u;return c&&(h=c.width>0?c.width:a,d=c.height>0?c.height:u),(0,n.useEffect)(()=>{!r&&(0,f.r)(h)&&(0,f.r)(d)&&t((0,o.Dx)({width:h,height:d}))},[t,r,h,d]),null}},2321:function(e,t,r){"use strict";r.d(t,{C:function(){return o},E:function(){return i}});var n=r(2265),i=(0,n.createContext)(null),o=()=>(0,n.useContext)(i)},2572:function(e,t,r){"use strict";r.d(t,{by:function(){return rU},wo:function(){return rN}});var n,i,o,a,u,l,c,s,f,h=r(2265),d=r.t(h,2),p=r(5870),y=r.n(p),v=r(1994),g=r(2713),m=r(2932),b=r(9729),w=r(9037),x=r(9064),O=r(5953),P=r(304),j=r(6462),S=r(3968),_=r(7562),E=e=>e.graphicalItems.polarItems,A=(0,g.P1)([P.z,j.l],x.YZ),M=(0,g.P1)([E,x.fW,A],x.$B),k=(0,g.P1)([M],x.bU),T=(0,g.P1)([k,m.RV],x.tZ),C=(0,g.P1)([T,x.fW,M],x.UA);(0,g.P1)([T,x.fW,M],(e,t,r)=>r.length>0?e.flatMap(e=>r.flatMap(r=>{var n;return{value:(0,w.F$)(e,null!==(n=t.dataKey)&&void 0!==n?n:r.dataKey),errorDomain:[]}})).filter(Boolean):(null==t?void 0:t.dataKey)!=null?e.map(e=>({value:(0,w.F$)(e,t.dataKey),errorDomain:[]})):e.map(e=>({value:e,errorDomain:[]})));var D=()=>void 0,N=(0,g.P1)([T,x.fW,M,x.Qt,P.z],x.yN),I=(0,g.P1)([x.fW,x.KB,x.Z2,D,N,D,O.rE,P.z],x.E8),z=(0,g.P1)([x.fW,O.rE,T,C,S.Qw,P.z,I],x.l_),R=(0,g.P1)([z,x.en,x.cV],x.vb),L=(0,g.P1)([x.fW,z,R,P.z],x.kO);function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;tt],(e,t)=>e.filter(e=>"pie"===e.type).find(e=>e.id===t)),F=[],W=(e,t,r)=>(null==r?void 0:r.length)===0?F:r,K=(0,g.P1)([m.RV,$,W],(e,t,r)=>{var n,{chartData:i}=e;if(null!=t&&((n=(null==t?void 0:t.data)!=null&&t.data.length>0?t.data:i)&&n.length||null==r||(n=r.map(e=>B(B({},t.presentationProps),e.props))),null!=n))return n}),Z=(0,g.P1)([K,$,W],(e,t,r)=>{if(null!=e&&null!=t)return e.map((e,n)=>{var i,o,a=(0,w.F$)(e,t.nameKey,t.name);return o=null!=r&&null!==(i=r[n])&&void 0!==i&&null!==(i=i.props)&&void 0!==i&&i.fill?r[n].props.fill:"object"==typeof e&&null!=e&&"fill"in e?e.fill:t.fill,{value:(0,w.hn)(a,t.dataKey),color:o,payload:e,type:t.legendType}})}),q=(0,g.P1)([K,$,W,b.DX],(e,t,r,n)=>{if(null!=t&&null!=e)return rN({offset:n,pieSettings:t,displayedData:e,cells:r})}),H=r(9040),V=r(3414),X=["children","className"];function Y(){return(Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:r,className:n}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=this.maxSize){var r=this.cache.keys().next().value;null!=r&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}constructor(e){var t,r,n;t="cache",r=new Map,(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in this?Object.defineProperty(this,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[t]=r,this.maxSize=e}}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var en=function(e){for(var t=1;t{try{var r=document.getElementById(ea);r||((r=document.createElement("span")).setAttribute("id",ea),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,eo,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch(e){return{width:0,height:0}}},el=function(e){var t,r,n,i,o,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||ee.x.isSsr)return{width:0,height:0};if(!en.enableCache)return eu(e,u);var l=(t=u.fontSize||"",r=u.fontFamily||"",n=u.fontWeight||"",i=u.fontStyle||"",o=u.letterSpacing||"",a=u.textTransform||"","".concat(e,"|").concat(t,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(a)),c=ei.get(l);if(c)return c;var s=eu(e,u);return ei.set(l,s),s},ec=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,es=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ef=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,eh=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,ed={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},ep=["cm","mm","pt","pc","in","Q","px"];class ey{static parse(e){var t,[,r,n]=null!==(t=eh.exec(e))&&void 0!==t?t:[];return null==r?ey.NaN:new ey(parseFloat(r),null!=n?n:"")}add(e){return this.unit!==e.unit?new ey(NaN,""):new ey(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new ey(NaN,""):new ey(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ey(NaN,""):new ey(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new ey(NaN,""):new ey(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return(0,J.In)(this.num)}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,(0,J.In)(e)&&(this.unit=""),""===t||ef.test(t)||(this.num=NaN,this.unit=""),ep.includes(t)&&(this.num=e*ed[t],this.unit="px")}}function ev(e){if(null==e||e.includes("NaN"))return"NaN";for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=null!==(r=ec.exec(t))&&void 0!==r?r:[],a=ey.parse(null!=n?n:""),u=ey.parse(null!=o?o:""),l="*"===i?a.multiply(u):a.divide(u);if(l.isNaN())return"NaN";t=t.replace(ec,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,s,f,h]=null!==(c=es.exec(t))&&void 0!==c?c:[],d=ey.parse(null!=s?s:""),p=ey.parse(null!=h?h:""),y="+"===f?d.add(p):d.subtract(p);if(y.isNaN())return"NaN";t=t.replace(es,y.toString())}return t}i="NaN",o=new ey(NaN,""),(i="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"))?n:n+"")in ey?Object.defineProperty(ey,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):ey[i]=o;var eg=/\(([^()]*)\)/;function em(e){var t=function(e){try{var t;return t=e.replace(/\s+/g,""),t=function(e){for(var t,r=e;null!=(t=eg.exec(r));){var[,n]=t;r=r.replace(eg,ev(n))}return r}(t),t=ev(t)}catch(e){return"NaN"}}(e.slice(5,-1));return"NaN"===t?"":t}var eb=r(130),ew=r(6395),ex=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],eO=["dx","dy","angle","className","breakAll"];function eP(){return(eP=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{children:t,breakAll:r,style:n}=e;try{var i=[];(0,J.Rw)(t)||(i=r?t.toString().split(""):t.toString().split(eS));var o=i.map(e=>({word:e,width:el(e,n).width})),a=r?0:el("\xa0",n).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch(e){return null}},eE=(e,t,r,n)=>e.reduce((e,i)=>{var{word:o,width:a}=i,u=e[e.length-1];return u&&null!=a&&(null==t||n||u.width+a+re.reduce((e,t)=>e.width>t.width?e:t),eM=(e,t,r,n,i,o,a,u)=>{var l=e_({breakAll:r,style:n,children:e.slice(0,t)+"…"});if(!l)return[!1,[]];var c=eE(l.wordsWithComputedWidth,o,a,u);return[c.length>i||eA(c).width>Number(o),c]},ek=(e,t,r,n,i)=>{var o,{maxLines:a,children:u,style:l,breakAll:c}=e,s=(0,J.hj)(a),f=String(u),h=eE(t,n,r,i);if(!s||i||!(h.length>a||eA(h).width>Number(n)))return h;for(var d=0,p=f.length-1,y=0;d<=p&&y<=f.length-1;){var v=Math.floor((d+p)/2),[g,m]=eM(f,v-1,c,l,a,n,r,i),[b]=eM(f,v,c,l,a,n,r,i);if(g||b||(d=v+1),g&&b&&(p=v-1),!g&&b){o=m;break}y++}return o||h},eT=e=>[{words:(0,J.Rw)(e)?[]:e.toString().split(eS),width:void 0}],eC=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:a}=e;if((t||r)&&!ee.x.isSsr){var u=e_({breakAll:o,children:n,style:i});if(!u)return eT(n);var{wordsWithComputedWidth:l,spaceWidth:c}=u;return ek({breakAll:o,children:n,maxLines:a,style:i},l,c,t,!!r)}return eT(n)},eD="#808080",eN={angle:0,breakAll:!1,capHeight:"0.71em",fill:eD,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},eI=(0,h.forwardRef)((e,t)=>{var r,n=(0,eb.j)(e,eN),{x:i,y:o,lineHeight:a,capHeight:u,fill:l,scaleToFit:c,textAnchor:s,verticalAnchor:f}=n,d=ej(n,ex),p=(0,h.useMemo)(()=>eC({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:c,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,c,d.style,d.width]),{dx:y,dy:g,angle:m,className:b,breakAll:w}=d,x=ej(d,eO);if(!(0,J.P2)(i)||!(0,J.P2)(o)||0===p.length)return null;var O=Number(i)+((0,J.hj)(y)?y:0),P=Number(o)+((0,J.hj)(g)?g:0);if(!(0,ew.n)(O)||!(0,ew.n)(P))return null;switch(f){case"start":r=em("calc(".concat(u,")"));break;case"middle":r=em("calc(".concat((p.length-1)/2," * -").concat(a," + (").concat(u," / 2))"));break;default:r=em("calc(".concat(p.length-1," * -").concat(a,")"))}var j=[],S=p[0];if(c&&null!=S){var _=S.width,{width:E}=d;j.push("scale(".concat((0,J.hj)(E)&&(0,J.hj)(_)?E/_:1,")"))}return m&&j.push("rotate(".concat(m,", ").concat(O,", ").concat(P,")")),j.length&&(x.transform=j.join(" ")),h.createElement("text",eP({},(0,V.S)(x),{ref:t,x:O,y:P,className:(0,v.W)("recharts-text",b),textAnchor:s,fill:l.includes("url")?eD:l}),p.map((e,t)=>{var n=e.words.join(w?"":" ");return h.createElement("tspan",{x:O,dy:0===t?r:a,key:"".concat(n,"-").concat(t)},n)}))});eI.displayName="Text";var ez=r(407),eR=r(9679),eL=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",eU=null,eB=null,e$=e=>{if(e===eU&&Array.isArray(eB))return eB;var t=[];return h.Children.forEach(e,e=>{(0,J.Rw)(e)||((0,eR.M2)(e)?t=t.concat(e$(e.props.children)):t.push(e))}),eB=t,eU=e,t};function eF(e,t){var r=[],n=[];return n=Array.isArray(t)?t.map(e=>eL(e)):[eL(t)],e$(e).forEach(e=>{var t=y()(e,"type.displayName")||y()(e,"type.name");t&&-1!==n.indexOf(t)&&r.push(e)}),r}var eW=r(9206),eK=r(1637),eZ=r(6802),eq=r.n(eZ),eH=r(3649),eV=r(9775),eX=r(9087),eY=r(8266),eG=r(4385);function eQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eJ(e){for(var t=1;t{var o=r-n;return(0,eG.N)(a||(a=e1(["M ",",",""])),e,t)+(0,eG.N)(u||(u=e1(["L ",",",""])),e+r,t)+(0,eG.N)(l||(l=e1(["L ",",",""])),e+r-o/2,t+i)+(0,eG.N)(c||(c=e1(["L ",",",""])),e+r-o/2-n,t+i)+(0,eG.N)(s||(s=e1(["L ",","," Z"])),e,t)},e5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},e3=e=>{var t=(0,eb.j)(e,e5),{x:r,y:n,upperWidth:i,lowerWidth:o,height:a,className:u}=t,{animationEasing:l,animationDuration:c,animationBegin:s,isUpdateAnimationActive:f}=t,d=(0,h.useRef)(null),[p,y]=(0,h.useState)(-1),g=(0,h.useRef)(i),m=(0,h.useRef)(o),b=(0,h.useRef)(a),w=(0,h.useRef)(r),x=(0,h.useRef)(n),O=(0,eX.i)(e,"trapezoid-");if((0,h.useEffect)(()=>{if(d.current&&d.current.getTotalLength)try{var e=d.current.getTotalLength();e&&y(e)}catch(e){}},[]),r!==+r||n!==+n||i!==+i||o!==+o||a!==+a||0===i&&0===o||0===a)return null;var P=(0,v.W)("recharts-trapezoid",u);if(!f)return h.createElement("g",null,h.createElement("path",e0({},(0,V.S)(t),{className:P,d:e2(r,n,i,o,a)})));var j=g.current,S=m.current,_=b.current,E=w.current,A=x.current,M="0px ".concat(-1===p?1:p,"px"),k="".concat(p,"px 0px"),T=(0,eY.cS)(["strokeDasharray"],c,l);return h.createElement(eV.H,{animationId:O,key:O,canBegin:p>0,duration:c,easing:l,isActive:f,begin:s},e=>{var u=(0,J.sX)(j,i,e),l=(0,J.sX)(S,o,e),c=(0,J.sX)(_,a,e),s=(0,J.sX)(E,r,e),f=(0,J.sX)(A,n,e);d.current&&(g.current=u,m.current=l,b.current=c,w.current=s,x.current=f);var p=e>0?{transition:T,strokeDasharray:k}:{strokeDasharray:M};return h.createElement("path",e0({},(0,V.S)(t),{className:P,d:e2(s,f,u,l,c),ref:d,style:eJ(eJ({},p),t.style)}))})},e6=r(474);let e4=Math.cos,e8=Math.sin,e7=Math.sqrt,e9=Math.PI,te=2*e9;var tt={draw(e,t){let r=e7(t/e9);e.moveTo(r,0),e.arc(0,0,r,0,te)}};let tr=e7(1/3),tn=2*tr,ti=e8(e9/10)/e8(7*e9/10),to=e8(te/10)*ti,ta=-e4(te/10)*ti,tu=e7(3),tl=e7(3)/2,tc=1/e7(12),ts=(tc/2+1)*3;var tf=r(6115),th=r(7790);e7(3),e7(3);var td=["type","size","sizeType"];function tp(){return(tp=Object.assign?Object.assign.bind():function(e){for(var t=1;ttg["symbol".concat((0,J.jC)(e))]||tt,tw=(e,t,r)=>{if("area"===t)return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var n=18*tm;return 1.25*e*e*(Math.tan(n)-Math.tan(2*n)*Math.tan(n)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},tx=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=tv(tv({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var e=tb(o),t=(function(e,t){let r=null,n=(0,th.d)(i);function i(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return e="function"==typeof e?e:(0,tf.Z)(e||tt),t="function"==typeof t?t:(0,tf.Z)(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:(0,tf.Z)(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:(0,tf.Z)(+e),i):t},i.context=function(e){return arguments.length?(r=null==e?null:e,i):r},i})().type(e).size(tw(r,n,o))();if(null!==t)return t})()})):null};tx.registerSymbol=(e,t)=>{tg["symbol".concat((0,J.jC)(e))]=t};var tO=["option","shapeType","activeClassName"];function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tj(e){for(var t=1;t{var n=(0,H.T)();return(i,o)=>a=>{null==e||e(i,o,a),n((0,tE.M1)({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},tM=e=>{var t=(0,H.T)();return(r,n)=>i=>{null==e||e(r,n,i),t((0,tE.Vg)())}},tk=(e,t,r)=>{var n=(0,H.T)();return(i,o)=>a=>{null==e||e(i,o,a),n((0,tE.O_)({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},tT=r(8735);function tC(e){var{tooltipEntrySettings:t}=e,r=(0,H.T)(),n=(0,tT.W)(),i=(0,h.useRef)(null);return(0,h.useLayoutEffect)(()=>{n||(null===i.current?r((0,tE.KO)(t)):i.current!==t&&r((0,tE.MC)({prev:i.current,next:t})),i.current=t)},[t,r,n]),(0,h.useLayoutEffect)(()=>()=>{i.current&&(r((0,tE.cK)(i.current)),i.current=null)},[r]),null}var tD=r(1944),tN=r(2738);function tI(e){var{legendPayload:t}=e,r=(0,H.T)(),n=(0,H.C)(O.rE),i=(0,h.useRef)(null);return(0,h.useLayoutEffect)(()=>{("centric"===n||"radial"===n)&&(null===i.current?r((0,tN.t8)(t)):i.current!==t&&r((0,tN.vN)({prev:i.current,next:t})),i.current=t)},[r,n,t]),(0,h.useLayoutEffect)(()=>()=>{i.current&&(r((0,tN.ZR)(i.current)),i.current=null)},[r]),null}var tz=r(8487),tR=null!==(f=d["useId".toString()])&&void 0!==f?f:()=>{var[e]=h.useState(()=>(0,J.EL)("uid-"));return e},tL=(0,h.createContext)(void 0),tU=e=>{var t,r,{id:n,type:i,children:o}=e,a=(t="recharts-".concat(i),r=tR(),n||(t?"".concat(t,"-").concat(r):r));return h.createElement(tL.Provider,{value:a},o(a))},tB=r(9579);function t$(e){var t=(0,H.T)();return(0,h.useLayoutEffect)(()=>(t((0,tB.Wz)(e)),()=>{t((0,tB.ot)(e))}),[t,e]),null}var tF=r(1221),tW=r(7618),tK=r.n(tW),tZ=r(5995),tq=r(8002),tH=r(3928);function tV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function tX(e){for(var t=1;t{var{viewBox:t,position:r,offset:n=0,parentViewBox:i,clamp:o}=e,{x:a,y:u,height:l,upperWidth:c,lowerWidth:s}=(0,O._M)(t),f=a+(c-s)/2,h=(a+f)/2,d=(c+s)/2,p=l>=0?1:-1,y=p*n,v=p>0?"end":"start",g=p>0?"start":"end",m=c>=0?1:-1,b=m*n,w=m>0?"end":"start",x=m>0?"start":"end";if("top"===r){var P={x:a+c/2,y:u-y,horizontalAnchor:"middle",verticalAnchor:v};return o&&i&&(P.height=Math.max(u-i.y,0),P.width=c),P}if("bottom"===r){var j={x:f+s/2,y:u+l+y,horizontalAnchor:"middle",verticalAnchor:g};return o&&i&&(j.height=Math.max(i.y+i.height-(u+l),0),j.width=s),j}if("left"===r){var S={x:h-b,y:u+l/2,horizontalAnchor:w,verticalAnchor:"middle"};return o&&i&&(S.width=Math.max(S.x-i.x,0),S.height=l),S}if("right"===r){var _={x:h+d+b,y:u+l/2,horizontalAnchor:x,verticalAnchor:"middle"};return o&&i&&(_.width=Math.max(i.x+i.width-_.x,0),_.height=l),_}var E=o&&i?{width:d,height:l}:{};return"insideLeft"===r?tX({x:h+b,y:u+l/2,horizontalAnchor:x,verticalAnchor:"middle"},E):"insideRight"===r?tX({x:h+d-b,y:u+l/2,horizontalAnchor:w,verticalAnchor:"middle"},E):"insideTop"===r?tX({x:a+c/2,y:u+y,horizontalAnchor:"middle",verticalAnchor:g},E):"insideBottom"===r?tX({x:f+s/2,y:u+l-y,horizontalAnchor:"middle",verticalAnchor:v},E):"insideTopLeft"===r?tX({x:a+b,y:u+y,horizontalAnchor:x,verticalAnchor:g},E):"insideTopRight"===r?tX({x:a+c-b,y:u+y,horizontalAnchor:w,verticalAnchor:g},E):"insideBottomLeft"===r?tX({x:f+b,y:u+l-y,horizontalAnchor:x,verticalAnchor:v},E):"insideBottomRight"===r?tX({x:f+s-b,y:u+l-y,horizontalAnchor:w,verticalAnchor:v},E):r&&"object"==typeof r&&((0,J.hj)(r.x)||(0,J.hU)(r.x))&&((0,J.hj)(r.y)||(0,J.hU)(r.y))?tX({x:a+(0,J.h1)(r.x,d),y:u+(0,J.h1)(r.y,l),horizontalAnchor:"end",verticalAnchor:"end"},E):tX({x:a+c/2,y:u+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},E)},tG=["labelRef"],tQ=["content"];function tJ(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{var e=(0,h.useContext)(t5),t=(0,O.d2)();return e||(t?(0,O._M)(t):void 0)},t6=(0,h.createContext)(null),t4=()=>{var e=(0,h.useContext)(t6),t=(0,H.C)(tZ.HW);return e||t},t8=e=>{var{value:t,formatter:r}=e,n=(0,J.Rw)(e.children)?t:e.children;return"function"==typeof r?r(n):n},t7=e=>null!=e&&"function"==typeof e,t9=(e,t)=>(0,J.uY)(t-e)*Math.min(Math.abs(t-e),360),re=(e,t,r,n,i)=>{var o,a,{offset:u,className:l}=e,{cx:c,cy:s,innerRadius:f,outerRadius:d,startAngle:p,endAngle:y,clockWise:g}=i,m=(f+d)/2,b=t9(p,y),w=b>=0?1:-1;switch(t){case"insideStart":o=p+w*u,a=g;break;case"insideEnd":o=y-w*u,a=!g;break;case"end":o=y+w*u,a=g;break;default:throw Error("Unsupported position ".concat(t))}a=b<=0?a:!a;var x=(0,eW.op)(c,s,m,o),O=(0,eW.op)(c,s,m,o+(a?1:-1)*359),P="M".concat(x.x,",").concat(x.y,"\n A").concat(m,",").concat(m,",0,1,").concat(a?0:1,",\n ").concat(O.x,",").concat(O.y),j=(0,J.Rw)(e.id)?(0,J.EL)("recharts-radial-line-"):e.id;return h.createElement("text",t2({},n,{dominantBaseline:"central",className:(0,v.W)("recharts-radial-bar-label",l)}),h.createElement("defs",null,h.createElement("path",{id:j,d:P})),h.createElement("textPath",{xlinkHref:"#".concat(j)},r))},rt=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:u,endAngle:l}=e,c=(u+l)/2;if("outside"===r){var{x:s,y:f}=(0,eW.op)(n,i,a+t,c);return{x:s,y:f,textAnchor:s>=n?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var{x:h,y:d}=(0,eW.op)(n,i,(o+a)/2,c);return{x:h,y:d,textAnchor:"middle",verticalAnchor:"middle"}},rr=e=>null!=e&&"cx"in e&&(0,J.hj)(e.cx),rn={angle:0,offset:5,zIndex:tH.N.label,position:"middle",textBreakAll:!1};function ri(e){var t,r,n,i,o=(0,eb.j)(e,rn),{viewBox:a,parentViewBox:u,position:l,value:c,children:s,content:f,className:d="",textBreakAll:p,labelRef:y}=o,g=t4(),m=t3(),b=function(e){if(!rr(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=2*n;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}(r=null==a?"center"===l?m:null!=g?g:m:rr(a)?a:(0,O._M)(a));if(!r||(0,J.Rw)(c)&&(0,J.Rw)(s)&&!(0,h.isValidElement)(f)&&"function"!=typeof f)return null;var w=t1(t1({},o),{},{viewBox:r});if((0,h.isValidElement)(f)){var{labelRef:x}=w,P=tJ(w,tG);return(0,h.cloneElement)(f,P)}if("function"==typeof f){var{content:j}=w,S=tJ(w,tQ);if(n=(0,h.createElement)(f,S),(0,h.isValidElement)(n))return n}else n=t8(o);var _=(0,V.S)(o);if(rr(r)){if("insideStart"===l||"insideEnd"===l||"end"===l)return re(o,l,n,_,r);i=rt(r,o.offset,o.position)}else{if(!b)return null;var E=tY({viewBox:b,position:l,offset:o.offset,parentViewBox:rr(u)?void 0:u,clamp:!0});i=t1(t1({x:E.x,y:E.y,textAnchor:E.horizontalAnchor,verticalAnchor:E.verticalAnchor},void 0!==E.width?{width:E.width}:{}),void 0!==E.height?{height:E.height}:{})}return h.createElement(tq.$,{zIndex:o.zIndex},h.createElement(eI,t2({ref:y,className:(0,v.W)("recharts-label",d)},_,i,{textAnchor:"start"===(t=_.textAnchor)||"middle"===t||"end"===t||"inherit"===t?_.textAnchor:i.textAnchor,breakAll:p}),n))}ri.displayName="Label";var ro=["valueAccessor"],ra=["dataKey","clockWise","id","textBreakAll","zIndex"];function ru(){return(ru=Object.assign?Object.assign.bind():function(e){for(var t=1;tArray.isArray(e.value)?tK()(e.value):e.value,rs=(0,h.createContext)(void 0);rs.Provider;var rf=(0,h.createContext)(void 0),rh=rf.Provider;function rd(e){var{valueAccessor:t=rc}=e,r=rl(e,ro),{dataKey:n,clockWise:i,id:o,textBreakAll:a,zIndex:u}=r,l=rl(r,ra),c=(0,h.useContext)(rs),s=(0,h.useContext)(rf),f=c||s;return f&&f.length?h.createElement(tq.$,{zIndex:null!=u?u:tH.N.label},h.createElement(G,{className:"recharts-label-list"},f.map((e,i)=>{var u,c=(0,J.Rw)(n)?t(e,i):(0,w.F$)(e.payload,n),s=(0,J.Rw)(o)?{}:{id:"".concat(o,"-").concat(i)};return h.createElement(ri,ru({key:"label-".concat(i)},(0,V.S)(e),l,s,{fill:null!==(u=r.fill)&&void 0!==u?u:e.fill,parentViewBox:e.parentViewBox,value:c,textBreakAll:a,viewBox:e.viewBox,index:i,zIndex:0}))}))):null}function rp(e){var{label:t}=e;return t?!0===t?h.createElement(rd,{key:"labelList-implicit"}):h.isValidElement(t)||t7(t)?h.createElement(rd,{key:"labelList-implicit",content:t}):"object"==typeof t?h.createElement(rd,ru({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}rd.displayName="LabelList";var ry=["key"],rv=["onMouseEnter","onClick","onMouseLeave"],rg=["id"],rm=["id"];function rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function rw(e){for(var t=1;teF(e.children,ez.b),[e.children]),r=(0,H.C)(r=>Z(r,e.id,t));return null==r?null:h.createElement(tI,{legendPayload:r})}var rj=h.memo(e=>{var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:o,fill:a,name:u,hide:l,tooltipType:c,id:s}=e,f={dataDefinedOnItem:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null===(t=n[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:r,name:(0,w.hn)(u,t),hide:l,type:c,color:a,unit:"",graphicalItemId:s}};return h.createElement(tC,{tooltipEntrySettings:f})}),rS=(e,t)=>e>t?"start":e"function"==typeof t?(0,J.h1)(t(e),r,.8*r):(0,J.h1)(t,r,.8*r),rE=(e,t,r)=>{var{top:n,left:i,width:o,height:a}=t,u=(0,eW.$4)(o,a),l=i+(0,J.h1)(e.cx,o,o/2),c=n+(0,J.h1)(e.cy,a,a/2);return{cx:l,cy:c,innerRadius:(0,J.h1)(e.innerRadius,u,0),outerRadius:r_(r,e.outerRadius,u),maxRadius:e.maxRadius||Math.sqrt(o*o+a*a)/2}},rA=(e,t)=>(0,J.uY)(t-e)*Math.min(Math.abs(t-e),360),rM=(e,t)=>{if(h.isValidElement(e))return h.cloneElement(e,t);if("function"==typeof e)return e(t);var r=(0,v.W)("recharts-pie-label-line","boolean"!=typeof e?e.className:""),{key:n}=t,i=rO(t,ry);return h.createElement(Q.Hy,rx({},i,{type:"linear",className:r}))},rk=(e,t,r)=>{if(h.isValidElement(e))return h.cloneElement(e,t);var n=r;if("function"==typeof e&&(n=e(t),h.isValidElement(n)))return n;var i=(0,v.W)("recharts-pie-label-text",e&&"object"==typeof e&&"className"in e&&"string"==typeof e.className?e.className:"");return h.createElement(eI,rx({},t,{alignmentBaseline:"middle",className:i}),n)};function rT(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:o,dataKey:a}=r;if(!n||!i||!t)return null;var u=(0,tF.qq)(r),l=(0,tF.qM)(i),c=(0,tF.qM)(o),s="object"==typeof i&&"offsetRadius"in i&&"number"==typeof i.offsetRadius&&i.offsetRadius||20,f=t.map((e,t)=>{var r=(e.startAngle+e.endAngle)/2,n=(0,eW.op)(e.cx,e.cy,e.outerRadius+s,r),f=rw(rw(rw(rw({},u),e),{},{stroke:"none"},l),{},{index:t,textAnchor:rS(n.x,e.cx)},n),d=rw(rw(rw(rw({},u),e),{},{fill:"none",stroke:e.fill},c),{},{index:t,points:[(0,eW.op)(e.cx,e.cy,e.outerRadius,r),n],key:"line"});return h.createElement(tq.$,{zIndex:tH.N.label,key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},h.createElement(G,null,o&&rM(o,d),rk(i,f,(0,w.F$)(e,a))))});return h.createElement(G,{className:"recharts-pie-labels"},f)}function rC(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return"object"==typeof i&&null!=i&&"position"in i?h.createElement(rp,{label:i}):h.createElement(rT,{sectors:t,props:r,showLabels:n})}function rD(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i,shape:o,id:a}=e,u=(0,H.C)(tD.Ve),l=(0,H.C)(tD.du),c=(0,H.C)(tD.d8),{onMouseEnter:s,onClick:f,onMouseLeave:d}=i,p=rO(i,rv),y=tA(s,i.dataKey,a),v=tM(d),g=tk(f,i.dataKey,a);return null==t||0===t.length?null:h.createElement(h.Fragment,null,t.map((e,s)=>{if((null==e?void 0:e.startAngle)===0&&(null==e?void 0:e.endAngle)===0&&1!==t.length)return null;var f=null==c||c===a,d=String(s)===u&&(null==l||i.dataKey===l)&&f,m=r&&d?r:u?n:null,b=rw(rw({},e),{},{stroke:e.stroke,tabIndex:-1,[tz.Gh]:s,[tz.jX]:a});return h.createElement(G,rx({key:"sector-".concat(null==e?void 0:e.startAngle,"-").concat(null==e?void 0:e.endAngle,"-").concat(e.midAngle,"-").concat(s),tabIndex:-1,className:"recharts-pie-sector"},(0,eK.bw)(p,e,s),{onMouseEnter:y(e,s),onMouseLeave:v(e,s),onClick:g(e,s)}),h.createElement(t_,rx({option:null!=o?o:m,index:s,shapeType:"sector",isActive:d},b)))}))}function rN(e){var t,r,n,{pieSettings:i,displayedData:o,cells:a,offset:u}=e,{cornerRadius:l,startAngle:c,endAngle:s,dataKey:f,nameKey:h,tooltipType:d}=i,p=Math.abs(i.minAngle),y=rA(c,s),v=Math.abs(y),g=o.length<=1?0:null!==(t=i.paddingAngle)&&void 0!==t?t:0,m=o.filter(e=>0!==(0,w.F$)(e,f,0)).length,b=v-m*p-(v>=360?m:m-1)*g,x=o.reduce((e,t)=>{var r=(0,w.F$)(t,f,0);return e+((0,J.hj)(r)?r:0)},0);return x>0&&(r=o.map((e,t)=>{var r,o=(0,w.F$)(e,f,0),s=(0,w.F$)(e,h,t),v=rE(i,u,e),m=((0,J.hj)(o)?o:0)/x,O=rw(rw({},e),a&&a[t]&&a[t].props),P=(r=t?n.endAngle+(0,J.uY)(y)*g*(0!==o?1:0):c)+(0,J.uY)(y)*((0!==o?p:0)+m*b),j=(r+P)/2,S=(v.innerRadius+v.outerRadius)/2,_=[{name:s,value:o,payload:O,dataKey:f,type:d,graphicalItemId:i.id}],E=(0,eW.op)(v.cx,v.cy,S,j);return n=rw(rw(rw(rw({},i.presentationProps),{},{percent:m,cornerRadius:"string"==typeof l?parseFloat(l):l,name:s,tooltipPayload:_,midAngle:j,middleRadius:S,tooltipPosition:E},O),v),{},{value:o,dataKey:f,startAngle:r,endAngle:P,payload:O,paddingAngle:(0,J.uY)(y)*g})})),r}function rI(e){var{showLabels:t,sectors:r,children:n}=e,i=(0,h.useMemo)(()=>t&&r?r.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})):[],[r,t]);return h.createElement(rh,{value:t?i:void 0},n)}function rz(e){var{props:t,previousSectorsRef:r,id:n}=e,{sectors:i,isAnimationActive:o,animationBegin:a,animationDuration:u,animationEasing:l,activeShape:c,inactiveShape:s,onAnimationStart:f,onAnimationEnd:d}=t,p=(0,eX.i)(t,"recharts-pie-"),v=r.current,[g,m]=(0,h.useState)(!1),b=(0,h.useCallback)(()=>{"function"==typeof d&&d(),m(!1)},[d]),w=(0,h.useCallback)(()=>{"function"==typeof f&&f(),m(!0)},[f]);return h.createElement(rI,{showLabels:!g,sectors:i},h.createElement(eV.H,{animationId:p,begin:a,duration:u,isActive:o,easing:l,onAnimationStart:w,onAnimationEnd:b,key:p},e=>{var o,a=[],u=i&&i[0],l=null!==(o=null==u?void 0:u.startAngle)&&void 0!==o?o:0;return null==i||i.forEach((t,r)=>{var n=v&&v[r],i=r>0?y()(t,"paddingAngle",0):0;if(n){var o=(0,J.sX)(n.endAngle-n.startAngle,t.endAngle-t.startAngle,e),u=rw(rw({},t),{},{startAngle:l+i,endAngle:l+o+i});a.push(u),l=u.endAngle}else{var{endAngle:c,startAngle:s}=t,f=(0,J.sX)(0,c-s,e),h=rw(rw({},t),{},{startAngle:l+i,endAngle:l+f+i});a.push(h),l=h.endAngle}}),r.current=a,h.createElement(G,null,h.createElement(rD,{sectors:a,activeShape:c,inactiveShape:s,allOtherPieProps:t,shape:t.shape,id:n}))}),h.createElement(rC,{showLabels:!g,sectors:i,props:t}),t.children)}var rR={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:tH.N.area};function rL(e){var{id:t}=e,r=rO(e,rg),{hide:n,className:i,rootTabIndex:o}=e,a=(0,h.useMemo)(()=>eF(e.children,ez.b),[e.children]),u=(0,H.C)(e=>q(e,t,a)),l=(0,h.useRef)(null),c=(0,v.W)("recharts-pie",i);return n||null==u?(l.current=null,h.createElement(G,{tabIndex:o,className:c})):h.createElement(tq.$,{zIndex:e.zIndex},h.createElement(rj,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:u,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t}),h.createElement(G,{tabIndex:o,className:c},h.createElement(rz,{props:rw(rw({},r),{},{sectors:u}),previousSectorsRef:l,id:t})))}function rU(e){var t=(0,eb.j)(e,rR),{id:r}=t,n=rO(t,rm),i=(0,tF.qq)(n);return h.createElement(tU,{id:r,type:"pie"},e=>h.createElement(h.Fragment,null,h.createElement(t$,{type:"pie",id:e,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),h.createElement(rP,rx({},n,{id:e})),h.createElement(rL,rx({},n,{id:e}))))}rU.displayName="Pie"},7165:function(e,t,r){"use strict";r.d(t,{Hy:function(){return Z}});var n=r(2265);function i(){}function o(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function a(e){this._context=e}function u(e){this._context=e}function l(e){this._context=e}a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:o(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:o(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},u.prototype={areaStart:i,areaEnd:i,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:o(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:o(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class c{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function s(e){this._context=e}function f(e){this._context=e}function h(e){return new f(e)}function d(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*n)/(n+i)))||0}function p(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function y(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-n)/3;e._context.bezierCurveTo(n+u,i+u*t,o-u,a-u*r,o,a)}function v(e){this._context=e}function g(e){this._context=new m(e)}function m(e){this._context=e}function b(e){this._context=e}function w(e){var t,r,n=e.length-1,i=Array(n),o=Array(n),a=Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(t=0,o[n-1]=(e[n]+i[n-1])/2;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}};var O=r(2516),P=r(6115),j=r(7790);function S(e){return e[0]}function _(e){return e[1]}function E(e,t){var r=(0,P.Z)(!0),n=null,i=h,o=null,a=(0,j.d)(u);function u(u){var l,c,s,f=(u=(0,O.Z)(u)).length,h=!1;for(null==n&&(o=i(s=a())),l=0;l<=f;++l)!(l=f;--h)u.point(g[h],m[h]);u.lineEnd(),u.areaEnd()}}v&&(g[s]=+e(d,s,c),m[s]=+t(d,s,c),u.point(n?+n(d,s,c):g[s],r?+r(d,s,c):m[s]))}if(p)return u=null,p+""||null}function s(){return E().defined(i).curve(a).context(o)}return e="function"==typeof e?e:void 0===e?S:(0,P.Z)(+e),t="function"==typeof t?t:void 0===t?(0,P.Z)(0):(0,P.Z)(+t),r="function"==typeof r?r:void 0===r?_:(0,P.Z)(+r),c.x=function(t){return arguments.length?(e="function"==typeof t?t:(0,P.Z)(+t),n=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:(0,P.Z)(+t),c):e},c.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:(0,P.Z)(+e),c):n},c.y=function(e){return arguments.length?(t="function"==typeof e?e:(0,P.Z)(+e),r=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:(0,P.Z)(+e),c):t},c.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:(0,P.Z)(+e),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:(0,P.Z)(!!e),c):i},c.curve=function(e){return arguments.length?(a=e,null!=o&&(u=a(o)),c):a},c.context=function(e){return arguments.length?(null==e?o=u=null:u=a(o=e),c):o},c}var M=r(1994),k=r(1637),T=r(6630),C=r(6395),D=r(1221),N=r(5953);function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,C.n)(e.x)&&(0,C.n)(e.y),B=e=>null!=e.base&&U(e.base)&&U(e),$=e=>e.x,F=e=>e.y,W=(e,t)=>{if("function"==typeof e)return e;var r="curve".concat((0,T.jC)(e));if(("curveMonotone"===r||"curveBump"===r)&&t){var n=L["".concat(r).concat("vertical"===t?"Y":"X")];if(n)return n}return L[r]||h},K=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:o=!1}=e,a=W(t,i),u=o?r.filter(U):r;if(Array.isArray(n)){var l=r.map((e,t)=>R(R({},e),{},{base:n[t]}));return("vertical"===i?A().y(F).x1($).x0(e=>e.base.x):A().x($).y1(F).y0(e=>e.base.y)).defined(B).curve(a)(o?l.filter(B):l)}return("vertical"===i&&(0,T.hj)(n)?A().y(F).x1($).x0(n):(0,T.hj)(n)?A().x($).y1(F).y0(n):E().x($).y(F)).defined(U).curve(a)(u)},Z=e=>{var{className:t,points:r,path:i,pathRef:o}=e,a=(0,N.vn)();if((!r||!r.length)&&!i)return null;var u={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=r&&r.length?K(u):i;return n.createElement("path",I({},(0,D.qq)(e),(0,k.Ym)(e),{className:(0,M.W)("recharts-curve",t),d:null===l?void 0:l,ref:o}))}},3649:function(e,t,r){"use strict";r.d(t,{A:function(){return T}});var n,i,o,a,u,l,c,s,f,h,d=r(2265),p=r(1994),y=r(130),v=r(9775),g=r(6630),m=r(9087),b=r(8266),w=r(3414),x=r(4385),O=["radius"],P=["radius"];function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t{var y=(0,x.E)(r),v=(0,x.E)(d),g=Math.min(Math.abs(y)/2,Math.abs(v)/2),m=v>=0?1:-1,b=y>=0?1:-1,w=v>=0&&y>=0||v<0&&y<0?1:0;if(g>0&&Array.isArray(p)){for(var O=[0,0,0,0],P=0;P<4;P++){var j,S,_=null!==(S=p[P])&&void 0!==S?S:0;O[P]=_>g?g:_}j=(0,x.N)(n||(n=A(["M",",",""])),e,t+m*O[0]),O[0]>0&&(j+=(0,x.N)(i||(i=A(["A ",",",",0,0,",",",",",""])),O[0],O[0],w,e+b*O[0],t)),j+=(0,x.N)(o||(o=A(["L ",",",""])),e+r-b*O[1],t),O[1]>0&&(j+=(0,x.N)(a||(a=A(["A ",",",",0,0,",",\n ",",",""])),O[1],O[1],w,e+r,t+m*O[1])),j+=(0,x.N)(u||(u=A(["L ",",",""])),e+r,t+d-m*O[2]),O[2]>0&&(j+=(0,x.N)(l||(l=A(["A ",",",",0,0,",",\n ",",",""])),O[2],O[2],w,e+r-b*O[2],t+d)),j+=(0,x.N)(c||(c=A(["L ",",",""])),e+b*O[3],t+d),O[3]>0&&(j+=(0,x.N)(s||(s=A(["A ",",",",0,0,",",\n ",",",""])),O[3],O[3],w,e,t+d-m*O[3])),j+="Z"}else if(g>0&&p===+p&&p>0){var E=Math.min(g,p);j=(0,x.N)(f||(f=A(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+m*E,E,E,w,e+b*E,t,e+r-b*E,t,E,E,w,e+r,t+m*E,e+r,t+d-m*E,E,E,w,e+r-b*E,t+d,e+b*E,t+d,E,E,w,e,t+d-m*E)}else j=(0,x.N)(h||(h=A(["M ",","," h "," v "," h "," Z"])),e,t,r,d,-r);return j},k={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},T=e=>{var t=(0,y.j)(e,k),r=(0,d.useRef)(null),[n,i]=(0,d.useState)(-1);(0,d.useEffect)(()=>{if(r.current&&r.current.getTotalLength)try{var e=r.current.getTotalLength();e&&i(e)}catch(e){}},[]);var{x:o,y:a,width:u,height:l,radius:c,className:s}=t,{animationEasing:f,animationDuration:h,animationBegin:j,isAnimationActive:A,isUpdateAnimationActive:T}=t,C=(0,d.useRef)(u),D=(0,d.useRef)(l),N=(0,d.useRef)(o),I=(0,d.useRef)(a),z=(0,d.useMemo)(()=>({x:o,y:a,width:u,height:l,radius:c}),[o,a,u,l,c]),R=(0,m.i)(z,"rectangle-");if(o!==+o||a!==+a||u!==+u||l!==+l||0===u||0===l)return null;var L=(0,p.W)("recharts-rectangle",s);if(!T){var U=(0,w.S)(t),{radius:B}=U,$=E(U,O);return d.createElement("path",_({},$,{x:(0,x.E)(o),y:(0,x.E)(a),width:(0,x.E)(u),height:(0,x.E)(l),radius:"number"==typeof c?c:void 0,className:L,d:M(o,a,u,l,c)}))}var F=C.current,W=D.current,K=N.current,Z=I.current,q="0px ".concat(-1===n?1:n,"px"),H="".concat(n,"px 0px"),V=(0,b.cS)(["strokeDasharray"],h,"string"==typeof f?f:k.animationEasing);return d.createElement(v.H,{animationId:R,key:R,canBegin:n>0,duration:h,easing:f,isActive:T,begin:j},e=>{var n,i=(0,g.sX)(F,u,e),s=(0,g.sX)(W,l,e),f=(0,g.sX)(K,o,e),h=(0,g.sX)(Z,a,e);r.current&&(C.current=i,D.current=s,N.current=f,I.current=h),n=A?e>0?{transition:V,strokeDasharray:H}:{strokeDasharray:q}:{strokeDasharray:H};var p=(0,w.S)(t),{radius:y}=p,v=E(p,P);return d.createElement("path",_({},v,{radius:"number"==typeof c?c:void 0,className:L,d:M(f,h,i,s,c),ref:r,style:S(S({},n),t.style)}))})}},474:function(e,t,r){"use strict";r.d(t,{L:function(){return j}});var n,i,o,a,u,l,c,s=r(2265),f=r(1994),h=r(9206),d=r(6630),p=r(130),y=r(3414),v=r(4385);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,d.uY)(t-e)*Math.min(Math.abs(t-e),359.999),w=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:a,cornerRadius:u,cornerIsExternal:l}=e,c=u*(a?1:-1)+n,s=Math.asin(u/c)/h.Wk,f=l?i:i+o*s;return{center:(0,h.op)(t,r,c,f),circleTangency:(0,h.op)(t,r,n,f),lineTangency:(0,h.op)(t,r,c*Math.cos(s*h.Wk),l?i-o*s:i),theta:s}},x=e=>{var{cx:t,cy:r,innerRadius:a,outerRadius:u,startAngle:l,endAngle:c}=e,s=b(l,c),f=l+s,d=(0,h.op)(t,r,u,l),p=(0,h.op)(t,r,u,f),y=(0,v.N)(n||(n=m(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),d.x,d.y,u,u,+(Math.abs(s)>180),+(l>f),p.x,p.y);if(a>0){var g=(0,h.op)(t,r,a,l),w=(0,h.op)(t,r,a,f);y+=(0,v.N)(i||(i=m(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),w.x,w.y,a,a,+(Math.abs(s)>180),+(l<=f),g.x,g.y)}else y+=(0,v.N)(o||(o=m(["L ",","," Z"])),t,r);return y},O=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:f,startAngle:h,endAngle:p}=e,y=(0,d.uY)(p-h),{circleTangency:g,lineTangency:b,theta:O}=w({cx:t,cy:r,radius:i,angle:h,sign:y,cornerRadius:o,cornerIsExternal:f}),{circleTangency:P,lineTangency:j,theta:S}=w({cx:t,cy:r,radius:i,angle:p,sign:-y,cornerRadius:o,cornerIsExternal:f}),_=f?Math.abs(h-p):Math.abs(h-p)-O-S;if(_<0)return s?(0,v.N)(a||(a=m(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),b.x,b.y,o,o,2*o,o,o,-(2*o)):x({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:h,endAngle:p});var E=(0,v.N)(u||(u=m(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),b.x,b.y,o,o,+(y<0),g.x,g.y,i,i,+(_>180),+(y<0),P.x,P.y,o,o,+(y<0),j.x,j.y);if(n>0){var{circleTangency:A,lineTangency:M,theta:k}=w({cx:t,cy:r,radius:n,angle:h,sign:y,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),{circleTangency:T,lineTangency:C,theta:D}=w({cx:t,cy:r,radius:n,angle:p,sign:-y,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),N=f?Math.abs(h-p):Math.abs(h-p)-k-D;if(N<0&&0===o)return"".concat(E,"L").concat(t,",").concat(r,"Z");E+=(0,v.N)(l||(l=m(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),C.x,C.y,o,o,+(y<0),T.x,T.y,n,n,+(N>180),+(y>0),A.x,A.y,o,o,+(y<0),M.x,M.y)}else E+=(0,v.N)(c||(c=m(["L",",","Z"])),t,r);return E},P={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},j=e=>{var t,r=(0,p.j)(e,P),{cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:u,forceCornerRadius:l,cornerIsExternal:c,startAngle:h,endAngle:v,className:m}=r;if(a0&&360>Math.abs(h-v)?O({cx:n,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(j,w/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:h,endAngle:v}):x({cx:n,cy:i,innerRadius:o,outerRadius:a,startAngle:h,endAngle:v}),s.createElement("path",g({},(0,y.S)(r),{className:b,d:t}))}},209:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n=(0,r(2265).createContext)(null)},9173:function(e,t,r){"use strict";r.d(t,{Q2:function(){return c},t0:function(){return u},zR:function(){return a}});var n=r(9129),i=r(418),o=(0,n.oM)({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=(0,i.cA)(t.payload),null==t.payload){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;null!=r&&(e.dataStartIndex=r),null!=n&&(e.dataEndIndex=n)}}}),{setChartData:a,setDataStartEndIndexes:u,setComputedData:l}=o.actions,c=o.reducer},9579:function(e,t,r){"use strict";r.d(t,{Wz:function(){return s},iX:function(){return h},ot:function(){return f}});var n=r(9129),i=r(9234),o=r(418),a=(0,n.oM)({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push((0,o.cA)(t.payload))},prepare:(0,n.cw)()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,a=(0,i.Vk)(e).cartesianItems.indexOf((0,o.cA)(r));a>-1&&(e.cartesianItems[a]=(0,o.cA)(n))},prepare:(0,n.cw)()},removeCartesianGraphicalItem:{reducer(e,t){var r=(0,i.Vk)(e).cartesianItems.indexOf((0,o.cA)(t.payload));r>-1&&e.cartesianItems.splice(r,1)},prepare:(0,n.cw)()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push((0,o.cA)(t.payload))},prepare:(0,n.cw)()},removePolarGraphicalItem:{reducer(e,t){var r=(0,i.Vk)(e).polarItems.indexOf((0,o.cA)(t.payload));r>-1&&e.polarItems.splice(r,1)},prepare:(0,n.cw)()}}}),{addCartesianGraphicalItem:u,replaceCartesianGraphicalItem:l,removeCartesianGraphicalItem:c,addPolarGraphicalItem:s,removePolarGraphicalItem:f}=a.actions,h=a.reducer},9040:function(e,t,r){"use strict";r.d(t,{C:function(){return f},T:function(){return u}});var n=r(5195),i=r(2265),o=r(209),a=e=>e,u=()=>{var e=(0,i.useContext)(o.l);return e?e.store.dispatch:a},l=()=>{},c=()=>l,s=(e,t)=>e===t;function f(e){var t=(0,i.useContext)(o.l),r=(0,i.useMemo)(()=>t?t=>{if(null!=t)return e(t)}:l,[t,e]);return(0,n.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:c,t?t.store.getState:l,t?t.store.getState:l,r,s)}},5293:function(e,t,r){"use strict";r.d(t,{Dx:function(){return a},EW:function(){return l},Qb:function(){return i},ZP:function(){return u},jx:function(){return o}});var n=(0,r(9129).oM)({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=null!==(r=t.payload.top)&&void 0!==r?r:0,e.margin.right=null!==(n=t.payload.right)&&void 0!==n?n:0,e.margin.bottom=null!==(i=t.payload.bottom)&&void 0!==i?i:0,e.margin.left=null!==(o=t.payload.left)&&void 0!==o?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:i,setLayout:o,setChartSize:a,setScale:u}=n.actions,l=n.reducer},2738:function(e,t,r){"use strict";r.d(t,{Ny:function(){return h},ZR:function(){return f},t8:function(){return c},vN:function(){return s}});var n=r(9129),i=r(9234),o=r(418),a=(0,n.oM)({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push((0,o.cA)(t.payload))},prepare:(0,n.cw)()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,a=(0,i.Vk)(e).payload.indexOf((0,o.cA)(r));a>-1&&(e.payload[a]=(0,o.cA)(n))},prepare:(0,n.cw)()},removeLegendPayload:{reducer(e,t){var r=(0,i.Vk)(e).payload.indexOf((0,o.cA)(t.payload));r>-1&&e.payload.splice(r,1)},prepare:(0,n.cw)()}}}),{setLegendSize:u,setLegendSettings:l,addLegendPayload:c,replaceLegendPayload:s,removeLegendPayload:f}=a.actions,h=a.reducer},1057:function(e,t,r){"use strict";r.d(t,{IC:function(){return l},NL:function(){return o},wB:function(){return u}});var n=r(9129),i=r(6630),o=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!(0,i.In)(r))return e[r]}},a=(0,n.oM)({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),u=a.reducer,{createEventEmitter:l}=a.actions},3699:function(e,t,r){"use strict";function n(e,t){return!!(Array.isArray(e)&&Array.isArray(t))&&0===e.length&&0===t.length||e===t}function i(e,t){if(e.length===t.length){for(var r=0;reT(t,e()).base(t.base()),p.apply(t,arguments),t}},scaleOrdinal:function(){return w},scalePoint:function(){return O},scalePow:function(){return e8},scaleQuantile:function(){return function e(){var t,r=[],n=[],i=[];function o(){var e=0,t=Math.max(1,n.length);for(i=Array(t-1);++e=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e);return a+(+r(e[o+1],o+1,e)-a)*(i-o)}}(r,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:n[z(i,e)]}return a.invertExtent=function(e){var t=n.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t=i?[o[i-1],n]:[o[t-1],o[t]]},u.unknown=function(e){return arguments.length&&(t=e),u},u.thresholds=function(){return o.slice()},u.copy=function(){return e().domain([r,n]).range(a).unknown(t)},p.apply(eZ(u),arguments)}},scaleRadial:function(){return function e(){var t,r=eD(),n=[0,1],i=!1;function o(e){var n,o=Math.sign(n=r(e))*Math.sqrt(Math.abs(n));return isNaN(o)?t:i?Math.round(o):o}return o.invert=function(e){return r.invert(e9(e))},o.domain=function(e){return arguments.length?(r.domain(e),o):r.domain()},o.range=function(e){return arguments.length?(r.range((n=Array.from(e,eS)).map(e9)),o):n.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(i=!!e,o):i},o.clamp=function(e){return arguments.length?(r.clamp(e),o):r.clamp()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e(r.domain(),n).round(i).clamp(r.clamp()).unknown(t)},p.apply(o,arguments),eZ(o)}},scaleSequential:function(){return function e(){var t=eZ(r2()(eE));return t.copy=function(){return r5(t,e())},y.apply(t,arguments)}},scaleSequentialLog:function(){return function e(){var t=eJ(r2()).domain([1,10]);return t.copy=function(){return r5(t,e()).base(t.base())},y.apply(t,arguments)}},scaleSequentialPow:function(){return r3},scaleSequentialQuantile:function(){return function e(){var t=[],r=eE;function n(e){if(null!=e&&!isNaN(e=+e))return r((z(t,e,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();for(let r of(t=[],e))null==r||isNaN(r=+r)||t.push(r);return t.sort(k),n},n.interpolator=function(e){return arguments.length?(r=e,n):r},n.range=function(){return t.map((e,n)=>r(n/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(r,n)=>(function(e,t,r){if(!(!(n=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let r=-1;for(let n of e)null!=(n=t(n,++r,e))&&(n=+n)>=n&&(yield n)}}(e,void 0))).length)||isNaN(t=+t))){if(t<=0||n<2)return tt(e);if(t>=1)return te(e);var n,i=(n-1)*t,o=Math.floor(i),a=te((function e(t,r,n=0,i=1/0,o){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=r&&r<=i))return t;for(o=void 0===o?tr:function(e=k){if(e===k)return tr;if("function"!=typeof e)throw TypeError("compare is not a function");return(t,r)=>{let n=e(t,r);return n||0===n?n:(0===e(r,r))-(0===e(t,t))}}(o);i>n;){if(i-n>600){let a=i-n+1,u=r-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),s=.5*Math.sqrt(l*c*(a-c)/a)*(u-a/2<0?-1:1),f=Math.max(n,Math.floor(r-u*c/a+s)),h=Math.min(i,Math.floor(r+(a-u)*c/a+s));e(t,r,f,h,o)}let a=t[r],u=n,l=i;for(tn(t,n,r),o(t[i],a)>0&&tn(t,n,i);uo(t[u],a);)++u;for(;o(t[l],a)>0;)--l}0===o(t[n],a)?tn(t,n,l):tn(t,++l,i),l<=r&&(n=l+1),r<=l&&(i=l-1)}return t})(e,o).subarray(0,o+1));return a+(tt(e.subarray(o+1))-a)*(i-o)}})(t,n/e))},n.copy=function(){return e(r).domain(t)},y.apply(n,arguments)}},scaleSequentialSqrt:function(){return r6},scaleSequentialSymlog:function(){return function e(){var t=e2(r2());return t.copy=function(){return r5(t,e()).constant(t.constant())},y.apply(t,arguments)}},scaleSqrt:function(){return e7},scaleSymlog:function(){return function e(){var t=e2(eC());return t.copy=function(){return eT(t,e()).constant(t.constant())},p.apply(t,arguments)}},scaleThreshold:function(){return function e(){var t,r=[.5],n=[0,1],i=1;function o(e){return null!=e&&e<=e?n[z(r,e,0,i)]:t}return o.domain=function(e){return arguments.length?(i=Math.min((r=Array.from(e)).length,n.length-1),o):r.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),i=Math.min(r.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var t=n.indexOf(e);return[r[t-1],r[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(r).range(n).unknown(t)},p.apply(o,arguments)}},scaleTime:function(){return r0},scaleUtc:function(){return r1},tickFormat:function(){return eK}});var f=r(2713),h=r(1664),d=r.n(h);function p(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function y(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class v extends Map{constructor(e,t=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,r]of e)this.set(t,r)}get(e){return super.get(g(this,e))}has(e){return super.has(g(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}(this,e))}}function g({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function m(e){return null!==e&&"object"==typeof e?e.valueOf():e}let b=Symbol("implicit");function w(){var e=new v,t=[],r=[],n=b;function i(i){let o=e.get(i);if(void 0===o){if(n!==b)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();for(let n of(t=[],e=new v,r))e.has(n)||e.set(n,t.push(n)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return w(t,r).unknown(n)},p.apply(i,arguments),i}function x(){var e,t,r=w().unknown(void 0),n=r.domain,i=r.range,o=0,a=1,u=!1,l=0,c=0,s=.5;function f(){var r=n().length,f=a=P?10:l>=j?5:l>=S?2:1;return(u<0?(n=Math.round(e*(o=Math.pow(10,-u)/c)),i=Math.round(t*o),n/ot&&--i,o=-o):(n=Math.round(e/(o=Math.pow(10,u)*c)),i=Math.round(t/o),n*ot&&--i),i0))return[];if(e===t)return[e];let n=t=i))return[];let u=o-i+1,l=Array(u);if(n){if(a<0)for(let e=0;et?1:e>=t?0:NaN}function T(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function C(e){let t,r,n;function i(e,n,i=0,o=e.length){if(i>>1;0>r(e[t],n)?i=t+1:o=t}while(ik(e(t),r),n=(t,r)=>e(t)-r):(t=e===k||e===T?e:D,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){let a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i>>1;0>=r(e[t],n)?i=t+1:o=t}while(i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?et(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?et(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=K.exec(e))?new en(t[1],t[2],t[3],1):(t=Z.exec(e))?new en(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=q.exec(e))?et(t[1],t[2],t[3],t[4]):(t=H.exec(e))?et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=V.exec(e))?ec(t[1],t[2]/100,t[3]/100,1):(t=X.exec(e))?ec(t[1],t[2]/100,t[3]/100,t[4]):Y.hasOwnProperty(e)?ee(Y[e]):"transparent"===e?new en(NaN,NaN,NaN,0):null}function ee(e){return new en(e>>16&255,e>>8&255,255&e,1)}function et(e,t,r,n){return n<=0&&(e=t=r=NaN),new en(e,t,r,n)}function er(e,t,r,n){var i;return 1==arguments.length?((i=e)instanceof U||(i=J(i)),i)?new en((i=i.rgb()).r,i.g,i.b,i.opacity):new en:new en(e,t,r,null==n?1:n)}function en(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ei(){return`#${el(this.r)}${el(this.g)}${el(this.b)}`}function eo(){let e=ea(this.opacity);return`${1===e?"rgb(":"rgba("}${eu(this.r)}, ${eu(this.g)}, ${eu(this.b)}${1===e?")":`, ${e})`}`}function ea(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function el(e){return((e=eu(e))<16?"0":"")+e.toString(16)}function ec(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ef(e,t,r,n)}function es(e){if(e instanceof ef)return new ef(e.h,e.s,e.l,e.opacity);if(e instanceof U||(e=J(e)),!e)return new ef;if(e instanceof ef)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,u=o-i,l=(o+i)/2;return u?(a=t===o?(r-n)/u+(r0&&l<1?0:a,new ef(a,u,l,e.opacity)}function ef(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function eh(e){return(e=(e||0)%360)<0?e+360:e}function ed(e){return Math.max(0,Math.min(1,e||0))}function ep(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function ey(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}R(U,J,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:G,formatHex:G,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return es(this).formatHsl()},formatRgb:Q,toString:Q}),R(en,er,L(U,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new en(eu(this.r),eu(this.g),eu(this.b),ea(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ei,formatHex:ei,formatHex8:function(){return`#${el(this.r)}${el(this.g)}${el(this.b)}${el((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:eo,toString:eo})),R(ef,function(e,t,r,n){return 1==arguments.length?es(e):new ef(e,t,r,null==n?1:n)},L(U,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new ef(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ef(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new en(ep(e>=240?e-240:e+120,i,n),ep(e,i,n),ep(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ef(eh(this.h),ed(this.s),ed(this.l),ea(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ea(this.opacity);return`${1===e?"hsl(":"hsla("}${eh(this.h)}, ${100*ed(this.s)}%, ${100*ed(this.l)}%${1===e?")":`, ${e})`}`}}));var ev=e=>()=>e;function eg(e,t){var r=t-e;return r?function(t){return e+t*r}:ev(isNaN(e)?t:e)}var em=function e(t){var r,n=1==(r=+(r=t))?eg:function(e,t){var n,i,o;return t-e?(n=e,i=t,n=Math.pow(n,o=r),i=Math.pow(i,o)-n,o=1/o,function(e){return Math.pow(n+e*i,o)}):ev(isNaN(e)?t:e)};function i(e,t){var r=n((e=er(e)).r,(t=er(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=eg(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function eb(e){return function(t){var r,n,i=t.length,o=Array(i),a=Array(i),u=Array(i);for(r=0;r=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,u=nu&&(a=t.slice(u,a),c[l]?c[l]+=a:c[++l]=a),(i=i[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,s.push({i:l,x:ew(i,o)})),u=eO.lastIndex;return ut&&(r=e,e=t,t=r),c=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?ek:eM,i=o=null,f}function f(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),u,l)))(e(c(t)))}return f.invert=function(r){return c(t((o||(o=n(u,a.map(e),ew)))(r)))},f.domain=function(e){return arguments.length?(a=Array.from(e,eS),s()):a.slice()},f.range=function(e){return arguments.length?(u=Array.from(e),s()):u.slice()},f.rangeRound=function(e){return u=Array.from(e),l=ej,s()},f.clamp=function(e){return arguments.length?(c=!!e||eE,s()):c!==eE},f.interpolate=function(e){return arguments.length?(l=e,s()):l},f.unknown=function(e){return arguments.length?(r=e,f):r},function(r,n){return e=r,t=n,s()}}function eD(){return eC()(eE,eE)}var eN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function eI(e){var t;if(!(t=eN.exec(e)))throw Error("invalid format: "+e);return new ez({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ez(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function eR(e,t){if(!isFinite(e)||0===e)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function eL(e){return(e=eR(Math.abs(e)))?e[1]:NaN}function eU(e,t){var r=eR(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+Array(i-n.length+2).join("0")}eI.prototype=ez.prototype,ez.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var eB={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>eU(100*e,t),r:eU,s:function(e,t){var r=eR(e,t);if(!r)return n=void 0,e.toPrecision(t);var i=r[0],o=r[1],a=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=i.length;return a===u?i:a>u?i+Array(a-u+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+eR(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function e$(e){return e}var eF=Array.prototype.map,eW=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function eK(e,t,r,n){var i,u,l=M(e,t,r);switch((n=eI(null==n?",f":n)).type){case"s":var c=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(u=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(eL(c)/3)))-eL(Math.abs(l))))||(n.precision=u),a(n,c);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(u=Math.max(0,eL(Math.abs(Math.max(Math.abs(e),Math.abs(t)))-(i=Math.abs(i=l)))-eL(i))+1)||(n.precision=u-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(u=Math.max(0,-eL(Math.abs(l))))||(n.precision=u-("%"===n.type)*2)}return o(n)}function eZ(e){var t=e.domain;return e.ticks=function(e){var r=t();return E(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return eK(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,u=o.length-1,l=o[a],c=o[u],s=10;for(c0;){if((i=A(l,c,r))===n)return o[a]=l,o[u]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else if(i<0)l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i;else break;n=i}return e},e}function eq(e,t){e=e.slice();var r,n=0,i=e.length-1,o=e[n],a=e[i];return a-e(-t,r)}function eJ(e){let t,r;let n=e(eH,eV),i=n.domain,a=10;function u(){var o,u;return t=(o=a)===Math.E?Math.log:10===o&&Math.log10||2===o&&Math.log2||(o=Math.log(o),e=>Math.log(e)/o),r=10===(u=a)?eG:u===Math.E?Math.exp:e=>Math.pow(u,e),i()[0]<0?(t=eQ(t),r=eQ(r),e(eX,eY)):e(eH,eV),n}return n.base=function(e){return arguments.length?(a=+e,u()):a},n.domain=function(e){return arguments.length?(i(e),u()):i()},n.ticks=e=>{let n,o;let u=i(),l=u[0],c=u[u.length-1],s=c0){for(;f<=h;++f)for(n=1;nc)break;p.push(o)}}else for(;f<=h;++f)for(n=a-1;n>=1;--n)if(!((o=f>0?n/r(-f):n*r(f))c)break;p.push(o)}2*p.length{if(null==e&&(e=10),null==i&&(i=10===a?"s":","),"function"!=typeof i&&(a%1||null!=(i=eI(i)).precision||(i.trim=!0),i=o(i)),e===1/0)return i;let u=Math.max(1,a*e/n.ticks().length);return e=>{let n=e/r(Math.round(t(e)));return n*ai(eq(i(),{floor:e=>r(Math.floor(t(e))),ceil:e=>r(Math.ceil(t(e)))})),n}function e0(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function e1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function e2(e){var t=1,r=e(e0(1),e1(t));return r.constant=function(r){return arguments.length?e(e0(t=+r),e1(t)):t},eZ(r)}function e5(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function e3(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function e6(e){return e<0?-e*e:e*e}function e4(e){var t=e(eE,eE),r=1;return t.exponent=function(t){return arguments.length?1==(r=+t)?e(eE,eE):.5===r?e(e3,e6):e(e5(r),e5(1/r)):r},eZ(t)}function e8(){var e=e4(eC());return e.copy=function(){return eT(e,e8()).exponent(e.exponent())},p.apply(e,arguments),e}function e7(){return e8.apply(null,arguments).exponent(.5)}function e9(e){return Math.sign(e)*e*e}function te(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r=i)&&(r=i)}return r}function tt(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let i of e)null!=(i=t(i,++n,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function tr(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function tn(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}o=(i=function(e){var t,r,i,o=void 0===e.grouping||void 0===e.thousands?e$:(t=eF.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,u=t[0],l=0;i>0&&u>0&&(l+u+1>n&&(u=Math.max(1,n-l)),o.push(e.substring(i-=u,i+u)),!((l+=u+1)>n));)u=t[a=(a+1)%t.length];return o.reverse().join(r)}),a=void 0===e.currency?"":e.currency[0]+"",u=void 0===e.currency?"":e.currency[1]+"",l=void 0===e.decimal?".":e.decimal+"",c=void 0===e.numerals?e$:(i=eF.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return i[+e]})}),s=void 0===e.percent?"%":e.percent+"",f=void 0===e.minus?"−":e.minus+"",h=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var r=(e=eI(e)).fill,i=e.align,d=e.sign,p=e.symbol,y=e.zero,v=e.width,g=e.comma,m=e.precision,b=e.trim,w=e.type;"n"===w?(g=!0,w="g"):eB[w]||(void 0===m&&(m=12),b=!0,w="g"),(y||"0"===r&&"="===i)&&(y=!0,r="0",i="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?a:"#"===p&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),O=("$"===p?u:/[%p]/.test(w)?s:"")+(t&&void 0!==t.suffix?t.suffix:""),P=eB[w],j=/[defgprs%]/.test(w);function S(e){var t,a,u,s=x,p=O;if("c"===w)p=P(e)+p,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?h:P(Math.abs(e),m),b&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&"+"!==d&&(S=!1),s=(S?"("===d?d:f:"-"===d||"("===d?"":d)+s,p=("s"!==w||isNaN(e)||void 0===n?"":eW[8+n/3])+p+(S&&"("===d?")":""),j){for(t=-1,a=e.length;++t(u=e.charCodeAt(t))||u>57){p=(46===u?l+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}}g&&!y&&(e=o(e,1/0));var _=s.length+e.length+p.length,E=_>1)+s+e+p+E.slice(_);break;default:e=E+s+e+p}return c(e)}return m=void 0===m?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var r=3*Math.max(-8,Math.min(8,Math.floor(eL(t)/3))),n=Math.pow(10,-r),i=d(((e=eI(e)).type="f",e),{suffix:eW[8+r/3]});return function(e){return i(n*e)}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,a=i.formatPrefix;let ti=new Date,to=new Date;function ta(e,t,r,n){function i(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=r=>(e(r=new Date(r-1)),t(r,1),e(r),r),i.round=e=>{let t=i(e),r=i.ceil(e);return e-t(t(e=new Date(+e),null==r?1:Math.floor(r)),e),i.range=(r,n,o)=>{let a;let u=[];if(r=i.ceil(r),o=null==o?1:Math.floor(o),!(r0))return u;do u.push(a=new Date(+r)),t(r,o),e(r);while(ata(t=>{if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)},(e,n)=>{if(e>=e){if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}}),r&&(i.count=(t,n)=>(ti.setTime(+t),to.setTime(+n),e(ti),e(to),Math.floor(r(ti,to))),i.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?i.filter(n?t=>n(t)%e==0:t=>i.count(0,t)%e==0):i:null),i}let tu=ta(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);tu.every=e=>isFinite(e=Math.floor(e))&&e>0?e>1?ta(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):tu:null,tu.range;let tl=ta(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds());tl.range;let tc=ta(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes());tc.range;let ts=ta(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes());ts.range;let tf=ta(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours());tf.range;let th=ta(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours());th.range;let td=ta(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1);td.range;let tp=ta(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1);tp.range;let ty=ta(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5));function tv(e){return ta(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}ty.range;let tg=tv(0),tm=tv(1),tb=tv(2),tw=tv(3),tx=tv(4),tO=tv(5),tP=tv(6);function tj(e){return ta(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}tg.range,tm.range,tb.range,tw.range,tx.range,tO.range,tP.range;let tS=tj(0),t_=tj(1),tE=tj(2),tA=tj(3),tM=tj(4),tk=tj(5),tT=tj(6);tS.range,t_.range,tE.range,tA.range,tM.range,tk.range,tT.range;let tC=ta(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());tC.range;let tD=ta(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());tD.range;let tN=ta(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());tN.every=e=>isFinite(e=Math.floor(e))&&e>0?ta(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}):null,tN.range;let tI=ta(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function tz(e,t,r,n,i,o){let a=[[tl,1,1e3],[tl,5,5e3],[tl,15,15e3],[tl,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function u(t,r,n){let i=Math.abs(r-t)/n,o=C(([,,e])=>e).right(a,i);if(o===a.length)return e.every(M(t/31536e6,r/31536e6,n));if(0===o)return tu.every(Math.max(M(t,r,n),1));let[u,l]=a[i/a[o-1][2]isFinite(e=Math.floor(e))&&e>0?ta(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null,tI.range;let[tR,tL]=tz(tI,tD,tS,ty,th,ts),[tU,tB]=tz(tN,tC,tg,td,tf,tc);function t$(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function tF(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function tW(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}var tK={"-":"",_:" ",0:"0"},tZ=/^\s*\d+/,tq=/^%/,tH=/[\\^$*+?|[\]().{}]/g;function tV(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o[e.toLowerCase(),t]))}function tQ(e,t,r){var n=tZ.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function tJ(e,t,r){var n=tZ.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function t0(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function t1(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function t2(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function t5(e,t,r){var n=tZ.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function t3(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function t6(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function t4(e,t,r){var n=tZ.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function t8(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function t7(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function t9(e,t,r){var n=tZ.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function re(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function rt(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function rr(e,t,r){var n=tZ.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function rn(e,t,r){var n=tZ.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ri(e,t,r){var n=tZ.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ro(e,t,r){var n=tq.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function ra(e,t,r){var n=tZ.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function ru(e,t,r){var n=tZ.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function rl(e,t){return tV(e.getDate(),t,2)}function rc(e,t){return tV(e.getHours(),t,2)}function rs(e,t){return tV(e.getHours()%12||12,t,2)}function rf(e,t){return tV(1+td.count(tN(e),e),t,3)}function rh(e,t){return tV(e.getMilliseconds(),t,3)}function rd(e,t){return rh(e,t)+"000"}function rp(e,t){return tV(e.getMonth()+1,t,2)}function ry(e,t){return tV(e.getMinutes(),t,2)}function rv(e,t){return tV(e.getSeconds(),t,2)}function rg(e){var t=e.getDay();return 0===t?7:t}function rm(e,t){return tV(tg.count(tN(e)-1,e),t,2)}function rb(e){var t=e.getDay();return t>=4||0===t?tx(e):tx.ceil(e)}function rw(e,t){return e=rb(e),tV(tx.count(tN(e),e)+(4===tN(e).getDay()),t,2)}function rx(e){return e.getDay()}function rO(e,t){return tV(tm.count(tN(e)-1,e),t,2)}function rP(e,t){return tV(e.getFullYear()%100,t,2)}function rj(e,t){return tV((e=rb(e)).getFullYear()%100,t,2)}function rS(e,t){return tV(e.getFullYear()%1e4,t,4)}function r_(e,t){var r=e.getDay();return tV((e=r>=4||0===r?tx(e):tx.ceil(e)).getFullYear()%1e4,t,4)}function rE(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+tV(t/60|0,"0",2)+tV(t%60,"0",2)}function rA(e,t){return tV(e.getUTCDate(),t,2)}function rM(e,t){return tV(e.getUTCHours(),t,2)}function rk(e,t){return tV(e.getUTCHours()%12||12,t,2)}function rT(e,t){return tV(1+tp.count(tI(e),e),t,3)}function rC(e,t){return tV(e.getUTCMilliseconds(),t,3)}function rD(e,t){return rC(e,t)+"000"}function rN(e,t){return tV(e.getUTCMonth()+1,t,2)}function rI(e,t){return tV(e.getUTCMinutes(),t,2)}function rz(e,t){return tV(e.getUTCSeconds(),t,2)}function rR(e){var t=e.getUTCDay();return 0===t?7:t}function rL(e,t){return tV(tS.count(tI(e)-1,e),t,2)}function rU(e){var t=e.getUTCDay();return t>=4||0===t?tM(e):tM.ceil(e)}function rB(e,t){return e=rU(e),tV(tM.count(tI(e),e)+(4===tI(e).getUTCDay()),t,2)}function r$(e){return e.getUTCDay()}function rF(e,t){return tV(t_.count(tI(e)-1,e),t,2)}function rW(e,t){return tV(e.getUTCFullYear()%100,t,2)}function rK(e,t){return tV((e=rU(e)).getUTCFullYear()%100,t,2)}function rZ(e,t){return tV(e.getUTCFullYear()%1e4,t,4)}function rq(e,t){var r=e.getUTCDay();return tV((e=r>=4||0===r?tM(e):tM.ceil(e)).getUTCFullYear()%1e4,t,4)}function rH(){return"+0000"}function rV(){return"%"}function rX(e){return+e}function rY(e){return Math.floor(+e/1e3)}function rG(e){return new Date(e)}function rQ(e){return e instanceof Date?+e:+new Date(+e)}function rJ(e,t,r,n,i,o,a,u,l,c){var s=eD(),f=s.invert,h=s.domain,d=c(".%L"),p=c(":%S"),y=c("%I:%M"),v=c("%I %p"),g=c("%a %d"),m=c("%b %d"),b=c("%B"),w=c("%Y");function x(e){return(l(e)=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:rX,s:rY,S:rv,u:rg,U:rm,V:rw,w:rx,W:rO,x:null,X:null,y:rP,Y:rS,Z:rE,"%":rV},w={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:rA,e:rA,f:rD,g:rK,G:rq,H:rM,I:rk,j:rT,L:rC,m:rN,M:rI,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:rX,s:rY,S:rz,u:rR,U:rL,V:rB,w:r$,W:rF,x:null,X:null,y:rW,Y:rZ,Z:rH,"%":rV},x={a:function(e,t,r){var n=d.exec(t.slice(r));return n?(e.w=p.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){var n=f.exec(t.slice(r));return n?(e.w=h.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){var n=g.exec(t.slice(r));return n?(e.m=m.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.m=v.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,r,n){return j(e,t,r,n)},d:t7,e:t7,f:ri,g:t3,G:t5,H:re,I:re,j:t9,L:rn,m:t8,M:rt,p:function(e,t,r){var n=c.exec(t.slice(r));return n?(e.p=s.get(n[0].toLowerCase()),r+n[0].length):-1},q:t4,Q:ra,s:ru,S:rr,u:tJ,U:t0,V:t1,w:tQ,W:t2,x:function(e,t,n){return j(e,r,t,n)},X:function(e,t,r){return j(e,n,t,r)},y:t3,Y:t5,Z:t6,"%":ro};function O(e,t){return function(r){var n,i,o,a=[],u=-1,l=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++u53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=(n=tF(tW(o.y,0,1))).getUTCDay())>4||0===i?t_.ceil(n):t_(n),n=tp.offset(n,(o.V-1)*7),o.y=n.getUTCFullYear(),o.m=n.getUTCMonth(),o.d=n.getUTCDate()+(o.w+6)%7):(n=(i=(n=t$(tW(o.y,0,1))).getDay())>4||0===i?tm.ceil(n):tm(n),n=td.offset(n,(o.V-1)*7),o.y=n.getFullYear(),o.m=n.getMonth(),o.d=n.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?tF(tW(o.y,0,1)).getUTCDay():t$(tW(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,tF(o)):t$(o)}}function j(e,t,r,n){for(var i,o,a=0,u=t.length,l=r.length;a=l)return -1;if(37===(i=t.charCodeAt(a++))){if(!(o=x[(i=t.charAt(a++))in tK?t.charAt(a++):i])||(n=o(e,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return b.x=O(r,b),b.X=O(n,b),b.c=O(t,b),w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),{format:function(e){var t=O(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=P(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=O(e+="",w);return t.toString=function(){return e},t},utcParse:function(e){var t=P(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,u.parse,c=u.utcFormat,u.utcParse;var r9=r(5953),ne=r(9037),nt=r(2932),nr=r(9599),nn=r(6630),ni=r(6395),no=r(1134),na=r.n(no);function nu(e){return 0===e?1:Math.floor(new(na())(e).abs().log(10).toNumber())+1}function nl(e,t,r){for(var n=new(na())(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}var nc=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},ns=(e,t,r)=>{if(e.lte(0))return new(na())(0);var n=nu(e.toNumber()),i=new(na())(10).pow(n),o=e.div(i),a=1!==n?.05:.1,u=new(na())(Math.ceil(o.div(a).toNumber())).add(r).mul(a).mul(i);return new(na())(t?u.toNumber():Math.ceil(u.toNumber()))},nf=(e,t,r)=>{var n=new(na())(1),i=new(na())(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new(na())(10).pow(nu(e)-1),i=new(na())(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new(na())(Math.floor(e)))}else 0===e?i=new(na())(Math.floor((t-1)/2)):r||(i=new(na())(Math.floor(e)));for(var a=Math.floor((t-1)/2),u=[],l=0;l4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new(na())(0),tickMin:new(na())(0),tickMax:new(na())(0)};var a=ns(new(na())(t).sub(e).div(r-1),n,o),u=Math.ceil((i=e<=0&&t>=0?new(na())(0):(i=new(na())(e).add(t).div(2)).sub(new(na())(i).mod(a))).sub(e).div(a).toNumber()),l=Math.ceil(new(na())(t).sub(i).div(a).toNumber()),c=u+l+1;return c>r?nh(e,t,r,n,o+1):(c0?l+(r-c):l,u=t>0?u:u+(r-c)),{step:a,tickMin:i.sub(new(na())(u).mul(a)),tickMax:i.add(new(na())(l).mul(a))})},nd=function(e){var[t,r]=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=Math.max(n,2),[a,u]=nc([t,r]);if(a===-1/0||u===1/0){var l=u===1/0?[a,...Array(n-1).fill(1/0)]:[...Array(n-1).fill(-1/0),u];return t>r?l.reverse():l}if(a===u)return nf(a,n,i);var{step:c,tickMin:s,tickMax:f}=nh(a,u,o,i,0),h=nl(s,f.add(new(na())(.1).mul(c)),c);return t>r?h.reverse():h},np=function(e,t){var[r,n]=e,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],[o,a]=nc([r,n]);if(o===-1/0||a===1/0)return[r,n];if(o===a)return[o];var u=ns(new(na())(a).sub(o).div(Math.max(t,2)-1),i,0),l=[...nl(new(na())(o),new(na())(a),u),a];return!1===i&&(l=l.map(e=>Math.round(e))),r>n?l.reverse():l},ny=r(152),nv=r(2498),ng=r(9729),nm=r(3358),nb=r(3968),nw=r(5995),nx=r(304),nO=r(6462),nP=r(7367),nj=r(8487),nS=r(6125),n_=r(7962),nE=r(6691),nA=r(5427),nM=r(3699),nk=r(4014),nT=r(3454);function nC(e){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],r=i[1];return t<=r?e>=t&&e<=r:e>=r&&e<=t},bandwidth:r?()=>r.call(e):void 0,ticks:t?r=>t.call(e,r):void 0,map:(t,r)=>{var n=e(t);if(null!=n){if(e.bandwidth&&null!=r&&r.position){var i=e.bandwidth();switch(r.position){case"middle":n+=i/2;break;case"end":n+=i}}return n}}}}function nD(e,t,r){if("function"==typeof e)return nC(e.copy().domain(t).range(r));if(null!=e){var n=function(e){if(e in s)return s[e]();var t="scale".concat((0,nn.jC)(e));if(t in s)return s[t]()}(e);if(null!=n)return n.domain(t).range(r),nC(n)}}var nN=r(7562);function nI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nz(e){for(var t=1;te.cartesianAxis.xAxis[t],nB=(e,t)=>{var r=nU(e,t);return null==r?nL:r},n$={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:nR,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:nj.n9},nF=(e,t)=>e.cartesianAxis.yAxis[t],nW=(e,t)=>{var r=nF(e,t);return null==r?n$:r},nK={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},nZ=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return null==r?nK:r},nq=(e,t,r)=>{switch(t){case"xAxis":return nB(e,r);case"yAxis":return nW(e,r);case"zAxis":return nZ(e,r);case"angleAxis":return(0,nw.dc)(e,r);case"radiusAxis":return(0,nw.Au)(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},nH=(e,t,r)=>{switch(t){case"xAxis":return nB(e,r);case"yAxis":return nW(e,r);case"angleAxis":return(0,nw.dc)(e,r);case"radiusAxis":return(0,nw.Au)(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},nV=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function nX(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var nY=(0,f.P1)([nx.z,nO.l],nX),nG=(e,t,r)=>e.filter(r).filter(e=>(null==t?void 0:t.includeHidden)===!0||!e.hide),nQ=(0,f.P1)([e=>e.graphicalItems.cartesianItems,nq,nY],nG,{memoizeOptions:{resultEqualityCheck:nM.n}}),nJ=(0,f.P1)([nQ],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(nE.b)),n0=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),n1=(0,f.P1)([nQ],n0),n2=e=>e.map(e=>e.data).filter(Boolean).flat(1),n5=(0,f.P1)([nQ],n2,{memoizeOptions:{resultEqualityCheck:nM.n}}),n3=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},n6=(0,f.P1)([n5,nt.Ck],n3),n4=(e,t,r)=>(null==t?void 0:t.dataKey)!=null?e.map(e=>({value:(0,ne.F$)(e,t.dataKey)})):r.length>0?r.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:(0,ne.F$)(e,t)}))):e.map(e=>({value:e})),n8=(0,f.P1)([n6,nq,nQ],n4);function n7(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}function n9(e){if((0,nn.P2)(e)||e instanceof Date){var t=Number(e);if((0,ni.n)(t))return t}}function ie(e){if(Array.isArray(e)){var t=[n9(e[0]),n9(e[1])];return(0,nr.b4)(t)?t:void 0}var r=n9(e);if(null!=r)return[r,r]}function it(e){return e.map(n9).filter(nn.DX)}var ir=e=>{var t=(0,nk.c)(e),r=(0,nT.L)(e);return nH(e,t,r)},ii=(0,f.P1)([ir],e=>null==e?void 0:e.dataKey),io=(0,f.P1)([nJ,nt.Ck,ir],n_.R),ia=(e,t,r,n)=>Object.fromEntries(Object.entries(t.reduce((e,t)=>{if(null==t.stackId)return e;var r=e[t.stackId];return null==r&&(r=[]),r.push(t),e[t.stackId]=r,e},{})).map(t=>{var[i,o]=t,a=n?[...o].reverse():o,u=a.map(nS.H);return[i,{stackedData:(0,ne.uX)(e,u,r),graphicalItems:a}]})),iu=(0,f.P1)([io,nJ,nb.Qw,nb.CI],ia),il=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(null==n&&"zAxis"!==r){var a=(0,ne.EB)(e,i,o);if(null==a||0!==a[0]||0!==a[1])return a}},ic=(0,f.P1)([nq],e=>e.allowDataOverflow),is=e=>{var t;if(null==e||!("domain"in e))return nR;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var r=it(e.ticks);return[Math.min(...r),Math.max(...r)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:nR},ih=(0,f.P1)([nq],is),id=(0,f.P1)([ih,ic],nr.Wd),ip=(0,f.P1)([iu,nt.iP,nx.z,id],il,{memoizeOptions:{resultEqualityCheck:nA.e}}),iy=e=>e.errorBars,iv=function(){for(var e=arguments.length,t=Array(e),r=0;r{var o,a;if(r.length>0&&e.forEach(e=>{r.forEach(r=>{var u,l,c=null===(u=n[r.id])||void 0===u?void 0:u.filter(e=>n7(i,e)),s=(0,ne.F$)(e,null!==(l=t.dataKey)&&void 0!==l?l:r.dataKey),f=!(!c||"number"!=typeof s||(0,nn.In)(s))&&c.length?it(c.flatMap(t=>{var r,n,i=(0,ne.F$)(e,t.dataKey);if(Array.isArray(i)?[r,n]=i:r=n=i,(0,ni.n)(r)&&(0,ni.n)(n))return[s-r,s+n]})):[];if(f.length>=2){var h=Math.min(...f),d=Math.max(...f);(null==o||ha)&&(a=d)}var p=ie(s);null!=p&&(o=null==o?p[0]:Math.min(o,p[0]),a=null==a?p[1]:Math.max(a,p[1]))})}),(null==t?void 0:t.dataKey)!=null&&e.forEach(e=>{var r=ie((0,ne.F$)(e,t.dataKey));null!=r&&(o=null==o?r[0]:Math.min(o,r[0]),a=null==a?r[1]:Math.max(a,r[1]))}),(0,ni.n)(o)&&(0,ni.n)(a))return[o,a]},im=(0,f.P1)([n6,nq,n1,iy,nx.z],ig,{memoizeOptions:{resultEqualityCheck:nA.e}});function ib(e){var{value:t}=e;if((0,nn.P2)(t)||t instanceof Date)return t}var iw=(e,t,r)=>{var n=e.map(ib).filter(e=>null!=e);return r&&(null==t.dataKey||t.allowDuplicatedCategory&&(0,nn.bv)(n))?d()(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},ix=e=>e.referenceElements.dots,iO=(e,t,r)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===r:e.yAxisId===r),iP=(0,f.P1)([ix,nx.z,nO.l],iO),ij=e=>e.referenceElements.areas,iS=(0,f.P1)([ij,nx.z,nO.l],iO),i_=e=>e.referenceElements.lines,iE=(0,f.P1)([i_,nx.z,nO.l],iO),iA=(e,t)=>{if(null!=e){var r=it(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},iM=(0,f.P1)(iP,nx.z,iA),ik=(e,t)=>{if(null!=e){var r=it(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},iT=(0,f.P1)([iS,nx.z],ik),iC=(e,t)=>{if(null!=e){var r=e.flatMap(e=>"xAxis"===t?function(e){if(null!=e.x)return it([e.x]);var t,r=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==r||0===r.length?[]:it(r)}(e):function(e){if(null!=e.y)return it([e.y]);var t,r=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==r||0===r.length?[]:it(r)}(e));if(0!==r.length)return[Math.min(...r),Math.max(...r)]}},iD=(0,f.P1)([iE,nx.z],iC),iN=(0,f.P1)(iM,iD,iT,(e,t,r)=>iv(e,r,t)),iI=(e,t,r,n,i,o,a,u)=>{if(null!=r)return r;var l="vertical"===a&&"xAxis"===u||"horizontal"===a&&"yAxis"===u?iv(n,o,i):iv(o,i);return(0,nr.v7)(t,l,e.allowDataOverflow)},iz=(0,f.P1)([nq,ih,id,ip,im,iN,r9.rE,nx.z],iI,{memoizeOptions:{resultEqualityCheck:nA.e}}),iR=[0,1],iL=(e,t,r,n,i,o,a)=>{if(null!=e&&null!=r&&0!==r.length||void 0!==a){var u,{dataKey:l,type:c}=e,s=(0,ne.NA)(t,o);return s&&null==l?d()(0,null!==(u=null==r?void 0:r.length)&&void 0!==u?u:0):"category"===c?iw(n,e,s):"expand"===i?iR:a}},iU=(0,f.P1)([nq,r9.rE,n6,n8,nb.Qw,nx.z,iz],iL),iB=(e,t,r)=>{if(null!=e){var{scale:n,type:i}=e;if("auto"===n)return"category"===i&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":"category"===i?"band":"linear";if("string"==typeof n){var o="scale".concat((0,nn.jC)(n));return o in s?o:"point"}}},i$=(0,f.P1)([nq,nV,nb.E2],iB);function iF(e,t,r,n){return null==r||null==n?void 0:"function"==typeof e.scale?nD(e.scale,r,n):nD(t,r,n)}var iW=(e,t,r)=>{var n=is(t);return"auto"!==r&&"linear"!==r?void 0:null!=t&&t.tickCount&&Array.isArray(n)&&("auto"===n[0]||"auto"===n[1])&&(0,nr.b4)(e)?nd(e,t.tickCount,t.allowDecimals):null!=t&&t.tickCount&&"number"===t.type&&(0,nr.b4)(e)?np(e,t.tickCount,t.allowDecimals):void 0},iK=(0,f.P1)([iU,nH,i$],iW),iZ=(e,t,r,n)=>{if("angleAxis"!==n&&(null==e?void 0:e.type)==="number"&&(0,nr.b4)(t)&&Array.isArray(r)&&r.length>0){var i,o;return[Math.min(t[0],null!==(i=r[0])&&void 0!==i?i:0),Math.max(t[1],null!==(o=r[r.length-1])&&void 0!==o?o:0)]}return t},iq=(0,f.P1)([nq,iU,iK,nx.z],iZ),iH=(0,f.P1)(n8,nq,(e,t)=>{if(t&&"number"===t.type){var r=1/0,n=Array.from(it(e.map(e=>e.value))).sort((e,t)=>e-t),i=n[0],o=n[n.length-1];if(null==i||null==o)return 1/0;var a=o-i;if(0===a)return 1/0;for(var u=0;ui,(e,t,r,n,i)=>{if(!(0,ni.n)(e))return 0;var o="vertical"===t?n.height:n.width;if("gap"===i)return e*o/2;if("no-gap"===i){var a=(0,nn.h1)(r,e*o),u=e*o/2;return u-a-(u-a)/o*a}return 0}),iX=(0,f.P1)(nB,(e,t,r)=>{var n=nB(e,t);return null==n||"string"!=typeof n.padding?0:iV(e,"xAxis",t,r,n.padding)},(e,t)=>{if(null==e)return{left:0,right:0};var r,n,{padding:i}=e;return"string"==typeof i?{left:t,right:t}:{left:(null!==(r=i.left)&&void 0!==r?r:0)+t,right:(null!==(n=i.right)&&void 0!==n?n:0)+t}}),iY=(0,f.P1)(nW,(e,t,r)=>{var n=nW(e,t);return null==n||"string"!=typeof n.padding?0:iV(e,"yAxis",t,r,n.padding)},(e,t)=>{if(null==e)return{top:0,bottom:0};var r,n,{padding:i}=e;return"string"==typeof i?{top:t,bottom:t}:{top:(null!==(r=i.top)&&void 0!==r?r:0)+t,bottom:(null!==(n=i.bottom)&&void 0!==n?n:0)+t}}),iG=(0,f.P1)([ng.DX,iX,nm.V,nm.F,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:o}=n;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),iQ=(0,f.P1)([ng.DX,r9.rE,iY,nm.V,nm.F,(e,t,r)=>r],(e,t,r,n,i,o)=>{var{padding:a}=i;return o?[n.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),iJ=(e,t,r,n)=>{var i;switch(t){case"xAxis":return iG(e,r,n);case"yAxis":return iQ(e,r,n);case"zAxis":return null===(i=nZ(e,r))||void 0===i?void 0:i.range;case"angleAxis":return(0,nw.bH)(e);case"radiusAxis":return(0,nw.s9)(e,r);default:return}},i0=(0,f.P1)([nq,iJ],nP.$),i1=(0,f.P1)([i$,iq],nN.p),i2=(0,f.P1)([nq,i$,i1,i0],iF);function i5(e,t){return e.idt.id?1:0}(0,f.P1)([nQ,iy,nx.z],(e,t,r)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>n7(r,e)));var i3=(e,t)=>t,i6=(e,t,r)=>r,i4=(0,f.P1)(nv.X,i3,i6,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(i5)),i8=(0,f.P1)(nv.Z,i3,i6,(e,t,r)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===r).sort(i5)),i7=(e,t)=>({width:e.width,height:t.height}),i9=(e,t)=>({width:"number"==typeof t.width?t.width:nj.n9,height:e.height});(0,f.P1)(ng.DX,nB,i7);var oe=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},ot=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},or=(0,f.P1)(ny.d_,ng.DX,i4,i3,i6,(e,t,r,n,i)=>{var o,a={};return r.forEach(r=>{var u=i7(t,r);null==o&&(o=oe(t,n,e));var l="top"===n&&!i||"bottom"===n&&i;a[r.id]=o-Number(l)*u.height,o+=(l?-1:1)*u.height}),a}),on=(0,f.P1)(ny.RD,ng.DX,i8,i3,i6,(e,t,r,n,i)=>{var o,a={};return r.forEach(r=>{var u=i9(t,r);null==o&&(o=ot(t,n,e));var l="left"===n&&!i||"right"===n&&i;a[r.id]=o-Number(l)*u.width,o+=(l?-1:1)*u.width}),a});(0,f.P1)([ng.DX,nB,(e,t)=>{var r=nB(e,t);if(null!=r)return or(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:e.left,y:0}:{x:e.left,y:i}}}),(0,f.P1)([ng.DX,nW,(e,t)=>{var r=nW(e,t);if(null!=r)return on(e,r.orientation,r.mirror)},(e,t)=>t],(e,t,r,n)=>{if(null!=t){var i=null==r?void 0:r[n];return null==i?{x:0,y:e.top}:{x:i,y:e.top}}}),(0,f.P1)(ng.DX,nW,(e,t)=>({width:"number"==typeof t.width?t.width:nj.n9,height:e.height}));var oi=(e,t,r,n)=>{if(null!=r){var{allowDuplicatedCategory:i,type:o,dataKey:a}=r,u=(0,ne.NA)(e,n),l=t.map(e=>e.value);if(a&&u&&"category"===o&&i&&(0,nn.bv)(l))return l}},oo=(0,f.P1)([r9.rE,n8,nq,nx.z],oi),oa=(e,t,r,n)=>{if(null!=r&&null!=r.dataKey){var{type:i,scale:o}=r;if((0,ne.NA)(e,n)&&("number"===i||"auto"!==o))return t.map(e=>e.value)}},ou=(0,f.P1)([r9.rE,n8,nH,nx.z],oa);(0,f.P1)([r9.rE,(e,t,r)=>{switch(t){case"xAxis":return nB(e,r);case"yAxis":return nW(e,r);default:throw Error("Unexpected axis type: ".concat(t))}},i$,i2,oo,ou,iJ,iK,nx.z],(e,t,r,n,i,o,a,u,l)=>{if(null!=t){var c=(0,ne.NA)(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:o,duplicateDomain:i,isCategorical:c,niceTicks:u,range:a,realScaleType:r,scale:n}}}),(0,f.P1)([r9.rE,nH,i$,i2,iK,iJ,oo,ou,nx.z],(e,t,r,n,i,o,a,u,l)=>{if(null!=t&&null!=n){var c=(0,ne.NA)(e,l),{type:s,ticks:f,tickCount:h}=t,d="scaleBand"===r&&"function"==typeof n.bandwidth?n.bandwidth()/2:2,p="category"===s&&n.bandwidth?n.bandwidth()/d:0;p="angleAxis"===l&&null!=o&&o.length>=2?2*(0,nn.uY)(o[0]-o[1])*p:p;var y=f||i;return y?y.map((e,t)=>{var r=a?a.indexOf(e):e,i=n.map(r);return(0,ni.n)(i)?{index:t,coordinate:i+p,value:e,offset:p}:null}).filter(nn.DX):c&&u?u.map((e,t)=>{var r=n.map(e);return(0,ni.n)(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(nn.DX):n.ticks?n.ticks(h).map((e,t)=>{var r=n.map(e);return(0,ni.n)(r)?{coordinate:r+p,value:e,index:t,offset:p}:null}).filter(nn.DX):n.domain().map((e,t)=>{var r=n.map(e);return(0,ni.n)(r)?{coordinate:r+p,value:a?a[e]:e,index:t,offset:p}:null}).filter(nn.DX)}}),(0,f.P1)([r9.rE,nH,i2,iJ,oo,ou,nx.z],(e,t,r,n,i,o,a)=>{if(null!=t&&null!=r&&null!=n&&n[0]!==n[1]){var u=(0,ne.NA)(e,a),{tickCount:l}=t,c=0;return(c="angleAxis"===a&&(null==n?void 0:n.length)>=2?2*(0,nn.uY)(n[0]-n[1])*c:c,u&&o)?o.map((e,t)=>{var n=r.map(e);return(0,ni.n)(n)?{coordinate:n+c,value:e,index:t,offset:c}:null}).filter(nn.DX):r.ticks?r.ticks(l).map((e,t)=>{var n=r.map(e);return(0,ni.n)(n)?{coordinate:n+c,value:e,index:t,offset:c}:null}).filter(nn.DX):r.domain().map((e,t)=>{var n=r.map(e);return(0,ni.n)(n)?{coordinate:n+c,value:i?i[e]:e,index:t,offset:c}:null}).filter(nn.DX)}}),(0,f.P1)(nq,i2,(e,t)=>{if(null!=e&&null!=t)return nz(nz({},e),{},{scale:t})});var ol=(0,f.P1)([nq,i$,iU,i0],iF);(0,f.P1)((e,t,r)=>nZ(e,r),ol,(e,t)=>{if(null!=e&&null!=t)return nz(nz({},e),{},{scale:t})});var oc=(0,f.P1)([r9.rE,nv.X,nv.Z],(e,t,r)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}})},3358:function(e,t,r){"use strict";r.d(t,{F:function(){return u},V:function(){return l}});var n=r(2713),i=r(9729),o=r(152),a=r(6630),u=e=>e.brush,l=(0,n.P1)([u,i.DX,o.lr],(e,t,r)=>({height:e.height,x:(0,a.hj)(e.x)?e.x:t.left,y:(0,a.hj)(e.y)?e.y:t.top+t.height+t.brushBottom-((null==r?void 0:r.bottom)||0),width:(0,a.hj)(e.width)?e.width:t.width}))},3838:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});var n=r(6630),i=(e,t)=>{var r,i=Number(t);if(!(0,n.In)(i)&&null!=t)return i>=0?null==e||null===(r=e[i])||void 0===r?void 0:r.value:void 0}},6064:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var n=r(6395),i=r(9037),o=r(9599),a=(e,t,r,a)=>{var u=null==e?void 0:e.index;if(null==u)return null;var l=Number(u);if(!(0,n.n)(l))return u;var c=Infinity;t.length>0&&(c=t.length-1);var s=Math.max(0,Math.min(l,c)),f=t[s];return null==f?String(s):!function(e,t,r){if(null==r||null==t)return!0;var n,a,u,l=(0,i.F$)(e,t);return!(null!=l&&(0,o.b4)(r))||(n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}(l),a=r[0],u=r[1],void 0!==n&&n>=Math.min(a,u)&&n<=Math.max(a,u))}(f,r,a)?null:String(s)}},7367:function(e,t,r){"use strict";r.d(t,{$:function(){return n}});var n=(e,t)=>e&&t?null!=e&&e.reversed?[t[1],t[0]]:t:void 0},7562:function(e,t,r){"use strict";r.d(t,{p:function(){return o}});var n=r(9599),i=r(6395),o=(e,t)=>{if(null!=t){if("linear"===e&&!(0,n.b4)(t)){for(var r,o,a=0;ao)&&(o=u))}return void 0!==r&&void 0!==o?[r,o]:void 0}return t}}},8656:function(e,t,r){"use strict";r.d(t,{$:function(){return n}});var n=(e,t,r,n,i,o,a)=>{if(null!=o){var u=a[0],l=null==u?void 0:u.getPosition(o);if(null!=l)return l;var c=null==i?void 0:i[Number(o)];if(c)return"horizontal"===r?{x:c.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:c.coordinate}}}},7962:function(e,t,r){"use strict";r.d(t,{R:function(){return o}});var n=r(6125),i=r(9037);function o(e,t,r){var{chartData:o=[]}=t,{allowDuplicatedCategory:a,dataKey:u}=r,l=new Map;return e.forEach(e=>{var t,r=null!==(t=e.data)&&void 0!==t?t:o;if(null!=r&&0!==r.length){var c=(0,n.H)(e);r.forEach((t,r)=>{var n,o=null==u||a?r:String((0,i.F$)(t,u,null)),s=(0,i.F$)(t,e.dataKey,0);Object.assign(n=l.has(o)?l.get(o):{},{[c]:s}),l.set(o,n)})}}),Array.from(l.values())}},4597:function(e,t,r){"use strict";r.d(t,{k:function(){return a}});var n=r(4725);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t{if(null==t)return n.UW;var a="axis"===t?"click"===r?e.axisInteraction.click:e.axisInteraction.hover:"click"===r?e.itemInteraction.click:e.itemInteraction.hover;if(null==a)return n.UW;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var u=!0===e.settings.active;if(null!=a.index){if(u)return o(o({},a),{},{active:!0})}else if(null!=i)return{active:!0,coordinate:void 0,dataKey:void 0,index:i,graphicalItemId:void 0};return o(o({},n.UW),{},{coordinate:a.coordinate})}},240:function(e,t,r){"use strict";r.d(t,{J:function(){return l}});var n=r(6630),i=r(9037),o=r(1543);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t{if(null!=t&&null!=c){var{chartData:f,computedData:h,dataStartIndex:d,dataEndIndex:p}=r;return e.reduce((e,r)=>{var y,v,g,{dataDefinedOnItem:m,settings:b}=r,w=null!=m?m:f,x=Array.isArray(w)?(0,o.p)(w,d,p):w,O=null!==(y=null==b?void 0:b.dataKey)&&void 0!==y?y:a,P=null==b?void 0:b.nameKey;return Array.isArray(v=a&&Array.isArray(x)&&!Array.isArray(x[0])&&"axis"===s?(0,n.Ap)(x,a,l):c(x,t,h,P))?v.forEach(t=>{var r=u(u({},b),{},{name:t.name,unit:t.unit,color:void 0,fill:void 0});e.push((0,i.eV)({tooltipEntrySettings:r,dataKey:t.dataKey,payload:t.payload,value:(0,i.F$)(t.payload,t.dataKey),name:t.name}))}):e.push((0,i.eV)({tooltipEntrySettings:b,dataKey:O,payload:v,value:(0,i.F$)(v,O),name:null!==(g=(0,i.F$)(v,P))&&void 0!==g?g:null==b?void 0:b.name})),e},[])}}},9667:function(e,t,r){"use strict";r.d(t,{k:function(){return n}});var n=(e,t,r,n)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];if(null==(i="hover"===r?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId)&&null!=n){var i,o=e.tooltipItemPayloads[0];return null!=o?[o]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===i})}},152:function(e,t,r){"use strict";r.d(t,{K$:function(){return o},RD:function(){return n},d_:function(){return i},lr:function(){return a}});var n=e=>e.layout.width,i=e=>e.layout.height,o=e=>e.layout.scale,a=e=>e.layout.margin},2932:function(e,t,r){"use strict";r.d(t,{Ck:function(){return a},RV:function(){return o},iP:function(){return i}});var n=r(2713),i=e=>e.chartData,o=(0,n.P1)([i],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),a=(e,t,r,n)=>n?o(e):i(e)},5427:function(e,t,r){"use strict";r.d(t,{e:function(){return n}});var n=(e,t)=>e===t||null!=e&&null!=t&&e[0]===t[0]&&e[1]===t[1]},6462:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n=(e,t,r)=>r},304:function(e,t,r){"use strict";r.d(t,{z:function(){return n}});var n=(e,t)=>t},5995:function(e,t,r){"use strict";r.d(t,{dc:function(){return b},bH:function(){return S},HW:function(){return E},Au:function(){return w},s9:function(){return _}});var n=r(2713),i=r(152),o=r(9729),a=r(9206),u=r(6630),l=r(3928),c={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:"polygon",cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"auto",zIndex:l.N.axis},s={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,label:!1,orientation:"right",radiusAxisId:0,reversed:!1,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,tickLine:!0,type:"auto",zIndex:l.N.axis},f=r(7367),h=r(5953),d=r(9037);function p(e,t,r){return"auto"!==r?r:null!=e?(0,d.NA)(e,t)?"category":"number":void 0}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t{if(null!=t)return e.polarAxis.angleAxis[t]},h.KM],(e,t)=>{if(null!=e)return e;var r,n=null!==(r=p(t,"angleAxis",g.type))&&void 0!==r?r:"category";return v(v({},g),{},{type:n})}),w=(0,n.P1)([(e,t)=>e.polarAxis.radiusAxis[t],h.KM],(e,t)=>{if(null!=e)return e;var r,n=null!==(r=p(t,"radiusAxis",m.type))&&void 0!==r?r:"category";return v(v({},m),{},{type:n})}),x=e=>e.polarOptions,O=(0,n.P1)([i.RD,i.d_,o.DX],a.$4),P=(0,n.P1)([x,O],(e,t)=>{if(null!=e)return(0,u.h1)(e.innerRadius,t,0)}),j=(0,n.P1)([x,O],(e,t)=>{if(null!=e)return(0,u.h1)(e.outerRadius,t,.8*t)}),S=(0,n.P1)([x],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]});(0,n.P1)([b,S],f.$);var _=(0,n.P1)([O,P,j],(e,t,r)=>{if(null!=e&&null!=t&&null!=r)return[t,r]});(0,n.P1)([w,_],f.$);var E=(0,n.P1)([h.rE,x,P,j,i.RD,i.d_],(e,t,r,n,i,o)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=r&&null!=n){var{cx:a,cy:l,startAngle:c,endAngle:s}=t;return{cx:(0,u.h1)(a,i,i/2),cy:(0,u.h1)(l,o,o/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:s,clockWise:!1}}})},3968:function(e,t,r){"use strict";r.d(t,{CI:function(){return o},E2:function(){return a},Qw:function(){return i},Sg:function(){return c},Yd:function(){return u},b2:function(){return l},sd:function(){return n}});var n=e=>e.rootProps.barCategoryGap,i=e=>e.rootProps.stackOffset,o=e=>e.rootProps.reverseStackOrder,a=e=>e.options.chartName,u=e=>e.rootProps.syncId,l=e=>e.rootProps.syncMethod,c=e=>e.options.eventEmitter},2498:function(e,t,r){"use strict";r.d(t,{X:function(){return i},Z:function(){return o}});var n=r(2713),i=(0,n.P1)(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),o=(0,n.P1)(e=>e.cartesianAxis.yAxis,e=>Object.values(e))},9729:function(e,t,r){"use strict";r.d(t,{DX:function(){return d},nd:function(){return p}});var n=r(2713),i=r(1104),o=r.n(i),a=e=>e.legend.settings;(0,n.P1)([e=>e.legend.payload,a],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?o()(n,r):n});var u=r(9037),l=r(152),c=r(2498),s=r(8487);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;te.brush.height,function(e){return(0,c.Z)(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:s.n9),0)},function(e){return(0,c.Z)(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:s.n9),0)},function(e){return(0,c.X)(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return(0,c.X)(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},a,e=>e.legend.size],(e,t,r,n,i,o,a,l,c,s)=>{var f={left:(r.left||0)+i,right:(r.right||0)+o},d=h(h({},{top:(r.top||0)+a,bottom:(r.bottom||0)+l}),f),p=d.bottom;d.bottom+=n;var y=e-(d=(0,u.By)(d,c,s)).left-d.right,v=t-d.top-d.bottom;return h(h({brushBottom:p},d),{},{width:Math.max(y,0),height:Math.max(v,0)})}),p=(0,n.P1)(d,e=>({x:e.left,y:e.top,width:e.width,height:e.height}));(0,n.P1)(l.RD,l.d_,(e,t)=>({x:0,y:0,width:e,height:t}))},3454:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});var n=e=>e.tooltip.settings.axisId},4014:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=r(5953),i=e=>{var t=(0,n.rE)(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"}},6302:function(e,t,r){"use strict";r.d(t,{Nb:function(){return o},SB:function(){return u},Y4:function(){return l},_j:function(){return a},iS:function(){return i}});var n=r(9040),i=e=>e.options.defaultTooltipEventType,o=e=>e.options.validateTooltipEventTypes;function a(e,t,r){if(null==e)return t;var n=e?"axis":"item";return null==r?t:r.includes(n)?n:t}function u(e,t){return a(t,i(e),o(e))}function l(e){return(0,n.C)(t=>u(t,e))}},3535:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n=e=>e.options.tooltipPayloadSearcher},4803:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});var n=e=>e.tooltip},3683:function(e,t,r){"use strict";r.d(t,{Nb:function(){return q},ck:function(){return B},i:function(){return $},hA:function(){return U},oo:function(){return W},EM:function(){return N},wi:function(){return R},TT:function(){return F},AC:function(){return k}});var n=r(2713),i=r(1104),o=r.n(i),a=r(9040),u=r(9037),l=r(2932),c=r(1944),s=r(9064),f=r(3968),h=r(5953),d=r(9729),p=r(152),y=r(3838),v=r(4597),g=r(6064),m=r(8656),b=r(9667),w=r(3535),x=r(4803),O=r(240),P=r(9206),j=r(6630);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _(e){for(var t=1;t{var i=t.find(e=>e&&e.index===r);if(i){if("horizontal"===e)return{x:i.coordinate,y:n.chartY};if("vertical"===e)return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}},A=(e,t,r,n)=>{var i=t.find(e=>e&&e.index===r);if(i){if("centric"===e){var o=i.coordinate,{radius:a}=n;return _(_(_({},n),(0,P.op)(n.cx,n.cy,a,o)),{},{angle:o,radius:a})}var u=i.coordinate,{angle:l}=n;return _(_(_({},n),(0,P.op)(n.cx,n.cy,u,l)),{},{angle:l,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}},M=(e,t,r,n,i)=>{var o=null!==(f=null==t?void 0:t.length)&&void 0!==f?f:0;if(o<=1||null==e)return 0;if("angleAxis"===n&&null!=i&&1e-6>=Math.abs(Math.abs(i[1]-i[0])-360))for(var a=0;a0?null===(h=r[a-1])||void 0===h?void 0:h.coordinate:null===(d=r[o-1])||void 0===d?void 0:d.coordinate,l=null===(p=r[a])||void 0===p?void 0:p.coordinate,c=a>=o-1?null===(y=r[0])||void 0===y?void 0:y.coordinate:null===(v=r[a+1])||void 0===v?void 0:v.coordinate,s=void 0;if(null!=u&&null!=l&&null!=c){if((0,j.uY)(l-u)!==(0,j.uY)(c-l)){var f,h,d,p,y,v,g,m=[];if((0,j.uY)(c-l)===(0,j.uY)(i[1]-i[0])){s=c;var b=l+i[1]-i[0];m[0]=Math.min(b,(b+u)/2),m[1]=Math.max(b,(b+u)/2)}else{s=u;var w=c+i[1]-i[0];m[0]=Math.min(l,(w+l)/2),m[1]=Math.max(l,(w+l)/2)}var x=[Math.min(l,(s+l)/2),Math.max(l,(s+l)/2)];if(e>x[0]&&e<=x[1]||e>=m[0]&&e<=m[1])return null===(g=r[a])||void 0===g?void 0:g.index}else{var O,P=Math.min(u,c),S=Math.max(u,c);if(e>(P+l)/2&&e<=(S+l)/2)return null===(O=r[a])||void 0===O?void 0:O.index}}}else if(t)for(var _=0;_(E.coordinate+M.coordinate)/2||_>0&&_(E.coordinate+M.coordinate)/2&&e<=(E.coordinate+A.coordinate)/2)return E.index}}return -1},k=()=>(0,a.C)(f.E2),T=(e,t)=>t,C=(e,t,r)=>r,D=(e,t,r,n)=>n,N=(0,n.P1)(c.WQ,e=>o()(e,e=>e.coordinate)),I=(0,n.P1)([x.M,T,C,D],v.k),z=(0,n.P1)([I,c.wQ,s.BD,c.lj],g.p),R=(e,t,r)=>{if(null!=t){var n=(0,x.M)(e);return"axis"===t?"hover"===r?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:"hover"===r?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},L=(0,n.P1)([x.M,T,C,D],b.k),U=(0,n.P1)([p.RD,p.d_,h.rE,d.DX,c.WQ,D,L],m.$),B=(0,n.P1)([I,U],(e,t)=>{var r;return null!==(r=e.coordinate)&&void 0!==r?r:t}),$=(0,n.P1)([c.WQ,z],y.b),F=(0,n.P1)([L,z,l.iP,s.BD,$,w.h,T],O.J),W=(0,n.P1)([I,z],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),K=(e,t,r,n,i,o,a)=>{if(e&&r&&n&&i&&function(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}(e,a)){var l=M((0,u.E)(e,t),o,i,r,n),c=E(t,i,l,e);return{activeIndex:String(l),activeCoordinate:c}}},Z=(e,t,r,n,i,o,a)=>{if(e&&n&&i&&o&&r){var l=(0,P.z3)(e,r);if(l){var c=M((0,u.C8)(l,t),a,o,n,i),s=A(t,o,c,l);return{activeIndex:String(c),activeCoordinate:s}}}},q=(e,t,r,n,i,o,a,u)=>e&&t&&n&&i&&o?"horizontal"===t||"vertical"===t?K(e,t,n,i,o,a,u):Z(e,t,r,n,i,o,a):void 0},1944:function(e,t,r){"use strict";r.d(t,{i:function(){return ey},pI:function(){return ew},du:function(){return ev},d8:function(){return eg},Ve:function(){return ep},CG:function(){return D},oo:function(){return ex},lj:function(){return et},PG:function(){return eo},ri:function(){return ea},WQ:function(){return ec},wQ:function(){return z}});var n=r(2713),i=r(9064),o=r(5953),a=r(9037),u=r(2932),l=r(3968),c=r(6630),s=r(7367),f=r(6302),h=r(3838),d=r(4597),p=r(6064),y=r(8656),v=r(152),g=r(9729),m=r(9667),b=r(3535),w=r(4803),x=r(240),O=r(3454),P=r(4014),j=r(7962),S=r(6691),_=r(9599),E=r(5427),A=r(3699),M=r(6395),k=(0,n.P1)([i.zv,i.Q4,l.E2],i.Yf),T=(0,n.P1)([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),C=(0,n.P1)([P.c,O.L],i.YZ),D=(0,n.P1)([T,i.zv,C],i.$B,{memoizeOptions:{resultEqualityCheck:A.n}}),N=(0,n.P1)([D],e=>e.filter(S.b)),I=(0,n.P1)([D],i.bU,{memoizeOptions:{resultEqualityCheck:A.n}}),z=(0,n.P1)([I,u.iP],i.tZ),R=(0,n.P1)([N,u.iP,i.zv],j.R),L=(0,n.P1)([z,i.zv,D],i.UA),U=(0,n.P1)([i.zv],i.c4),B=(0,n.P1)([i.zv],e=>e.allowDataOverflow),$=(0,n.P1)([U,B],_.Wd),F=(0,n.P1)([D],e=>e.filter(S.b)),W=(0,n.P1)([R,F,l.Qw,l.CI],i.CK),K=(0,n.P1)([W,u.iP,P.c,$],i.dz),Z=(0,n.P1)([D],i.Tk),q=(0,n.P1)([z,i.zv,Z,i.Qt,P.c],i.yN,{memoizeOptions:{resultEqualityCheck:E.e}}),H=(0,n.P1)([i.RA,P.c,O.L],i.zW),V=(0,n.P1)([H,P.c],i.zX),X=(0,n.P1)([i.ww,P.c,O.L],i.zW),Y=(0,n.P1)([X,P.c],i.yT),G=(0,n.P1)([i.xz,P.c,O.L],i.zW),Q=(0,n.P1)([G,P.c],i.fY),J=(0,n.P1)([V,Q,Y],i.Eu),ee=(0,n.P1)([i.zv,U,$,K,q,J,o.rE,P.c],i.E8),et=(0,n.P1)([i.zv,o.rE,z,L,l.Qw,P.c,ee],i.l_),er=(0,n.P1)([et,i.zv,k],i.vb),en=(0,n.P1)([i.zv,et,er,P.c],i.kO),ei=e=>{var t=(0,P.c)(e),r=(0,O.L)(e);return(0,i.Fn)(e,t,r,!1)},eo=(0,n.P1)([i.zv,ei],s.$),ea=(0,n.P1)([i.zv,k,en,eo],i.Jw),eu=(0,n.P1)([o.rE,L,i.zv,P.c],i.rC),el=(0,n.P1)([o.rE,L,i.zv,P.c],i.UC),ec=(0,n.P1)([o.rE,i.zv,k,ea,ei,eu,el,P.c],(e,t,r,n,i,o,u,l)=>{if(t){var{type:s}=t,f=(0,a.NA)(e,l);if(n){var h="scaleBand"===r&&n.bandwidth?n.bandwidth()/2:2,d="category"===s&&n.bandwidth?n.bandwidth()/h:0;return(d="angleAxis"===l&&null!=i&&(null==i?void 0:i.length)>=2?2*(0,c.uY)(i[0]-i[1])*d:d,f&&u)?u.map((e,t)=>{var r=n.map(e);return(0,M.n)(r)?{coordinate:r+d,value:e,index:t,offset:d}:null}).filter(c.DX):n.domain().map((e,t)=>{var r=n.map(e);return(0,M.n)(r)?{coordinate:r+d,value:o?o[e]:e,index:t,offset:d}:null}).filter(c.DX)}}}),es=(0,n.P1)([f.iS,f.Nb,e=>e.tooltip.settings],(e,t,r)=>(0,f._j)(r.shared,e,t)),ef=e=>e.tooltip.settings.trigger,eh=e=>e.tooltip.settings.defaultIndex,ed=(0,n.P1)([w.M,es,ef,eh],d.k),ep=(0,n.P1)([ed,z,i.BD,et],p.p),ey=(0,n.P1)([ec,ep],h.b),ev=(0,n.P1)([ed],e=>{if(e)return e.dataKey}),eg=(0,n.P1)([ed],e=>{if(e)return e.graphicalItemId}),em=(0,n.P1)([w.M,es,ef,eh],m.k),eb=(0,n.P1)([v.RD,v.d_,o.rE,g.DX,ec,eh,em],y.$),ew=(0,n.P1)([ed,eb],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),ex=(0,n.P1)([ed],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),eO=(0,n.P1)([em,ep,u.iP,i.BD,ey,b.h,es],x.J);(0,n.P1)([eO],e=>{if(null!=e)return Array.from(new Set(e.map(e=>e.payload).filter(e=>null!=e)))})},4725:function(e,t,r){"use strict";r.d(t,{$A:function(){return m},KN:function(){return b},KO:function(){return l},Kw:function(){return w},M1:function(){return h},MC:function(){return c},O_:function(){return y},PD:function(){return f},Rr:function(){return v},UW:function(){return a},Vg:function(){return d},cK:function(){return s},eB:function(){return g},ne:function(){return p}});var n=r(9129),i=r(9234),o=r(418),a={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},u=(0,n.oM)({name:"tooltip",initialState:{itemInteraction:{click:a,hover:a},axisInteraction:{click:a,hover:a},keyboardInteraction:a,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push((0,o.cA)(t.payload))},prepare:(0,n.cw)()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,a=(0,i.Vk)(e).tooltipItemPayloads.indexOf((0,o.cA)(r));a>-1&&(e.tooltipItemPayloads[a]=(0,o.cA)(n))},prepare:(0,n.cw)()},removeTooltipEntrySettings:{reducer(e,t){var r=(0,i.Vk)(e).tooltipItemPayloads.indexOf((0,o.cA)(t.payload));r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:(0,n.cw)()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:l,replaceTooltipEntrySettings:c,removeTooltipEntrySettings:s,setTooltipSettingsState:f,setActiveMouseOverItemIndex:h,mouseLeaveItem:d,mouseLeaveChart:p,setActiveClickItemIndex:y,setMouseOverAxisIndex:v,setMouseClickAxisIndex:g,setSyncInteraction:m,setKeyboardInteraction:b}=u.actions,w=u.reducer},6691:function(e,t,r){"use strict";function n(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}r.d(t,{b:function(){return n}})},7274:function(e,t,r){"use strict";r.d(t,{G$:function(){return h},IE:function(){return y},cG:function(){return p},d1:function(){return d},hS:function(){return f}});var n=r(9129),i=r(418),o=r(3928);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;tu(u({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},c=new Set(Object.values(o.N)),s=(0,n.oM)({name:"zIndex",initialState:l,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:(0,n.cw)()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!c.has(r)&&delete e.zIndexMap[r])},prepare:(0,n.cw)()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:o}=t.payload;e.zIndexMap[r]?o?e.zIndexMap[r].panoramaElement=(0,i.cA)(n):e.zIndexMap[r].element=(0,i.cA)(n):e.zIndexMap[r]={consumers:0,element:o?void 0:(0,i.cA)(n),panoramaElement:o?(0,i.cA)(n):void 0}},prepare:(0,n.cw)()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:(0,n.cw)()}}}),{registerZIndexPortal:f,unregisterZIndexPortal:h,registerZIndexPortalElement:d,unregisterZIndexPortalElement:p}=s.actions,y=s.reducer},858:function(e,t,r){"use strict";r.d(t,{W9:function(){return w},Fg:function(){return x}});var n=r(2265),i=r(9040),o=r(3968),a=new(r(7625)),u="recharts.syncEvent.tooltip",l="recharts.syncEvent.brush",c=r(1057),s=r(4725),f=r(3683),h=r(1944);function d(e){return e.tooltip.syncInteraction}var p=r(5953),y=r(9173),v=r(6630),g=["x","y"];function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t{S((0,c.IC)())},[S]),e=(0,i.C)(o.Yd),t=(0,i.C)(o.Sg),r=(0,i.T)(),f=(0,i.C)(o.b2),d=(0,i.C)(h.WQ),m=(0,p.vn)(),w=(0,p.d2)(),x=(0,i.C)(e=>e.rootProps.className),(0,n.useEffect)(()=>{if(null==e)return v.ZT;var n=(n,i,o)=>{if(t!==o&&e===n){if("index"===f){if(w&&null!=i&&null!==(a=i.payload)&&void 0!==a&&a.coordinate&&i.payload.sourceViewBox){var a,u,l=i.payload.coordinate,{x:c,y:h}=l,p=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;nString(e.value)===i.payload.label));var{coordinate:S}=i.payload;if(null==u||!1===i.payload.active||null==S||null==w){r((0,s.$A)({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:_,y:E}=S,A=Math.min(_,w.x+w.width),M=Math.min(E,w.y+w.height),k={x:"horizontal"===m?u.coordinate:A,y:"horizontal"===m?M:u.coordinate};r((0,s.$A)({active:i.payload.active,coordinate:k,dataKey:i.payload.dataKey,index:String(u.index),label:i.payload.label,sourceViewBox:i.payload.sourceViewBox,graphicalItemId:i.payload.graphicalItemId}))}}};return a.on(u,n),()=>{a.off(u,n)}},[x,r,t,e,f,d,m,w]),O=(0,i.C)(o.Yd),P=(0,i.C)(o.Sg),j=(0,i.T)(),(0,n.useEffect)(()=>{if(null==O)return v.ZT;var e=(e,t,r)=>{P!==r&&O===e&&j((0,y.t0)(t))};return a.on(l,e),()=>{a.off(l,e)}},[j,P,O])}function x(e,t,r,l,c,h){var y=(0,i.C)(r=>(0,f.wi)(r,e,t)),v=(0,i.C)(o.Sg),g=(0,i.C)(o.Yd),m=(0,i.C)(o.b2),b=(0,i.C)(d),w=null==b?void 0:b.active,x=(0,p.d2)();(0,n.useEffect)(()=>{if(!w&&null!=g&&null!=v){var e=(0,s.$A)({active:h,coordinate:r,dataKey:y,index:c,label:"number"==typeof l?String(l):l,sourceViewBox:x,graphicalItemId:void 0});a.emit(u,g,e,v)}},[w,r,y,c,l,v,g,m,h,x])}},9037:function(e,t,r){"use strict";r.d(t,{Ji:function(){return E},rI:function(){return _},By:function(){return b},E:function(){return T},C8:function(){return C},zT:function(){return A},EB:function(){return S},uX:function(){return O},eV:function(){return M},hn:function(){return k},F$:function(){return m},NA:function(){return w}});var n=r(1104),i=r.n(n),o=r(5870),a=r.n(o);function u(e,t){if((i=e.length)>1)for(var r,n,i,o=1,a=e[t[0]],u=a.length;o=0;)r[t]=t;return r}function f(e,t){return e[t]}function h(e){let t=[];return t.key=e,t}var d=r(6630),p=r(1543),y=r(6395);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){for(var t=1;t{if(t&&r){var{width:n,height:i}=r,{align:o,verticalAlign:a,layout:u}=t;if(("vertical"===u||"horizontal"===u&&"middle"===a)&&"center"!==o&&(0,d.hj)(e[o]))return g(g({},e),{},{[o]:e[o]+(n||0)});if(("horizontal"===u||"vertical"===u&&"center"===o)&&"middle"!==a&&(0,d.hj)(e[a]))return g(g({},e),{},{[a]:e[a]+(i||0)})}return e},w=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,x={sign:e=>{var t,r=e.length;if(!(r<=0)){var n=null===(t=e[0])||void 0===t?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i=0?(c[0]=o,o+=h,c[1]=o):(c[0]=a,a+=h,c[1]=a)}}}},expand:function(e,t){if((n=e.length)>0){for(var r,n,i,o=0,a=e[0].length;o0){for(var r,n=0,i=e[t[0]],o=i.length;n0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,o=0,a=1;a{var t,r=e.length;if(!(r<=0)){var n=null===(t=e[0])||void 0===t?void 0:t.length;if(null!=n&&!(n<=0))for(var i=0;i=0?(l[0]=o,o+=c,l[1]=o):(l[0]=0,l[1]=0)}}}}},O=(e,t,r)=>{var n,i=null!==(n=x[r])&&void 0!==n?n:u,o=(function(){var e=(0,c.Z)([]),t=s,r=u,n=f;function i(i){var o,a,u=Array.from(e.apply(this,arguments),h),c=u.length,s=-1;for(let e of i)for(o=0,++s;oNumber(m(e,t,0))).order(s).offset(i)(e);return o.forEach((r,n)=>{r.forEach((r,i)=>{var o=m(e[i],t[n],0);Array.isArray(o)&&2===o.length&&(0,d.hj)(o[0])&&(0,d.hj)(o[1])&&(r[0]=o[0],r[1]=o[1])})}),o},P=e=>{var t=e.flat(2).filter(d.hj);return[Math.min(...t),Math.max(...t)]},j=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],S=(e,t,r)=>{if(null!=e)return j(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:a}=o,u=a.reduce((e,n)=>{var i=P((0,p.p)(n,t,r));return(0,y.n)(i[0])&&(0,y.n)(i[1])?[Math.min(e[0],i[0]),Math.max(e[1],i[1])]:e},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,E=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,A=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var o=i()(t,e=>e.coordinate),a=1/0,u=1,l=o.length;u"horizontal"===t?e.chartX:"vertical"===t?e.chartY:void 0,C=(e,t)=>"centric"===t?e.angle:e.radius},8487:function(e,t,r){"use strict";r.d(t,{Gh:function(){return n},jX:function(){return i},n9:function(){return o}});var n="data-recharts-item-index",i="data-recharts-item-id",o=60},6630:function(e,t,r){"use strict";r.d(t,{Ap:function(){return v},DX:function(){return b},EL:function(){return h},In:function(){return u},P2:function(){return s},Rw:function(){return g},ZT:function(){return w},bv:function(){return p},h1:function(){return d},hU:function(){return l},hj:function(){return c},jC:function(){return m},sX:function(){return y},uY:function(){return a}});var n=r(5870),i=r.n(n),o=r(4385),a=e=>0===e?0:e>0?1:-1,u=e=>"number"==typeof e&&e!=+e,l=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,c=e=>("number"==typeof e||e instanceof Number)&&!u(e),s=e=>c(e)||"string"==typeof e,f=0,h=e=>{var t=++f;return"".concat(e||"").concat(t)},d=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!c(e)&&"string"!=typeof e)return n;if(l(e)){if(null==t)return n;var o=e.indexOf("%");r=t*parseFloat(e.slice(0,o))/100}else r=+e;return u(r)&&(r=n),i&&null!=t&&r>t&&(r=t),r},p=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;ne&&("function"==typeof t?t(e):i()(e,t))===r)}var g=e=>null==e,m=e=>g(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function b(e){return null!=e}function w(){}},4067:function(e,t,r){"use strict";r.d(t,{x:function(){return n}});var n={devToolsEnabled:!0,isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout)}},9206:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t180*e/Math.PI,u=(e,t,r,n)=>({x:e+Math.cos(-o*n)*r,y:t+Math.sin(-o*n)*r}),l=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(r.left||0)-(r.right||0)),Math.abs(t-(r.top||0)-(r.bottom||0)))/2},c=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},s=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,u=c({x:r,y:n},{x:i,y:o});if(u<=0)return{radius:u,angle:0};var l=Math.acos((r-i)/u);return n>o&&(l=2*Math.PI-l),{radius:u,angle:a(l),angleInRadian:l}},f=e=>{var{startAngle:t,endAngle:r}=e,n=Math.min(Math.floor(t/360),Math.floor(r/360));return{startAngle:t-360*n,endAngle:r-360*n}},h=(e,t)=>{var{startAngle:r,endAngle:n}=t;return e+360*Math.min(Math.floor(r/360),Math.floor(n/360))},d=(e,t)=>{var r,{chartX:n,chartY:o}=e,{radius:a,angle:u}=s({x:n,y:o},t),{innerRadius:l,outerRadius:c}=t;if(ac||0===a)return null;var{startAngle:d,endAngle:p}=f(t),y=u;if(d<=p){for(;y>p;)y-=360;for(;y=d&&y<=p}else{for(;y>d;)y-=360;for(;y=p&&y<=d}return r?i(i({},t),{},{radius:a,angle:h(y,t)}):null}},9720:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function i(e){return"string"==typeof e&&n.includes(e)}},1543:function(e,t,r){"use strict";function n(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}r.d(t,{p:function(){return n}})},9599:function(e,t,r){"use strict";r.d(t,{Wd:function(){return l},b4:function(){return a},v7:function(){return c}});var n=r(9037),i=r(6630),o=r(6395);function a(e){if(Array.isArray(e)&&2===e.length){var[t,r]=e;if((0,o.n)(t)&&(0,o.n)(r))return!0}return!1}function u(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function l(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var r,n,[i,u]=e;if((0,o.n)(i))r=i;else if("function"==typeof i)return;if((0,o.n)(u))n=u;else if("function"==typeof u)return;var l=[r,n];if(a(l))return l}}function c(e,t,r){if(r||null!=t){if("function"==typeof e&&null!=t)try{var o=e(t,r);if(a(o))return u(o,t,r)}catch(e){}if(Array.isArray(e)&&2===e.length){var l,c,[s,f]=e;if("auto"===s)null!=t&&(l=Math.min(...t));else if((0,i.hj)(s))l=s;else if("function"==typeof s)try{null!=t&&(l=s(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof s&&n.rI.test(s)){var h=n.rI.exec(s);if(null==h||null==h[1]||null==t)l=void 0;else{var d=+h[1];l=t[0]-d}}else l=null==t?void 0:t[0];if("auto"===f)null!=t&&(c=Math.max(...t));else if((0,i.hj)(f))c=f;else if("function"==typeof f)try{null!=t&&(c=f(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof f&&n.Ji.test(f)){var p=n.Ji.exec(f);if(null==p||null==p[1]||null==t)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=null==t?void 0:t[1];var v=[l,c];if(a(v))return null==t?v:u(v,t,r)}}}},6395:function(e,t,r){"use strict";function n(e){return Number.isFinite(e)}function i(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}r.d(t,{n:function(){return n},r:function(){return i}})},130:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e,t){var r=function(e){for(var t=1;t(void 0===e[r]&&void 0!==t[r]&&(e[r]=t[r]),e),r)}r.d(t,{j:function(){return i}})},4385:function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i{var o=r[i-1];return"string"==typeof o?e+o+t:void 0!==o?e+n(o)+t:e+t},"")}r.d(t,{E:function(){return n},N:function(){return i}})},6125:function(e,t,r){"use strict";function n(e){return null==e?void 0:e.id}r.d(t,{H:function(){return n}})},3414:function(e,t,r){"use strict";r.d(t,{S:function(){return o}}),r(2265);var n=r(9720),i=r(1221);function o(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&((0,i.CK)(r)||(0,i.a1)(r)||(0,n.W)(r))&&(t[r]=e[r]);return t}},1221:function(e,t,r){"use strict";r.d(t,{CK:function(){return o},a1:function(){return a},qM:function(){return l},qq:function(){return u}});var n=r(2265),i=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function o(e){return"string"==typeof e&&i.has(e)}function a(e){return"string"==typeof e&&e.startsWith("data-")}function u(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(o(r)||a(r))&&(t[r]=e[r]);return t}function l(e){return null==e?null:(0,n.isValidElement)(e)&&"object"==typeof e.props&&null!==e.props?u(e.props):"object"!=typeof e||Array.isArray(e)?null:u(e)}},1637:function(e,t,r){"use strict";r.d(t,{Ym:function(){return a},bw:function(){return l},t9:function(){return o}});var n=r(2265),i=r(9720),o=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,a=(e,t)=>{if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,n.isValidElement)(e)&&(r=e.props),"object"!=typeof r&&"function"!=typeof r)return null;var o={};return Object.keys(r).forEach(e=>{(0,i.W)(e)&&(o[e]=t||(t=>r[e](r,t)))}),o},u=(e,t,r)=>n=>(e(t,r,n),null),l=(e,t,r)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var n=null;return Object.keys(e).forEach(o=>{var a=e[o];(0,i.W)(o)&&"function"==typeof a&&(n||(n={}),n[o]=u(a,t,r))}),n}},9087:function(e,t,r){"use strict";r.d(t,{i:function(){return o}});var n=r(2265),i=r(6630);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=(0,n.useRef)((0,i.EL)(t)),o=(0,n.useRef)(e);return o.current!==e&&(r.current=(0,i.EL)(t),o.current=e),r.current}},3928:function(e,t,r){"use strict";r.d(t,{N:function(){return n}});var n={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3}},8002:function(e,t,r){"use strict";r.d(t,{$:function(){return f}});var n=r(2265),i=r(4887),o=r(6630),a=r(9040),u=r(3543),l=r(7274),c=r(5953),s=r(8735);function f(e){var{zIndex:t,children:r}=e,f=(0,c.kz)()&&void 0!==t&&0!==t,h=(0,s.W)(),d=(0,a.T)();(0,n.useLayoutEffect)(()=>f?(d((0,l.hS)({zIndex:t})),()=>{d((0,l.G$)({zIndex:t}))}):o.ZT,[d,t,f]);var p=(0,a.C)(e=>(0,u.e)(e,t,h));return f?p?(0,i.createPortal)(r,p):null:r}},3543:function(e,t,r){"use strict";r.d(t,{e:function(){return a},k:function(){return u}});var n=r(2713),i=r(3699),o=r(3928),a=(0,n.P1)(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(null!=t){var n=e[t];return null==n?void 0:r?n.panoramaElement:n.element}}),u=(0,n.P1)(e=>e.zIndex.zIndexMap,e=>Array.from(new Set(Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(o.N)))).sort((e,t)=>e-t),{memoizeOptions:{resultEqualityCheck:i.E}})},4369:function(e,t,r){"use strict";var n=r(2265),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,u=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return u(function(){i.value=r,i.getSnapshot=t,c(i)&&s({inst:i})},[e,r,t]),a(function(){return c(i)&&s({inst:i}),e(function(){c(i)&&s({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},2860:function(e,t,r){"use strict";var n=r(2265),i=r(2558),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,u=n.useRef,l=n.useEffect,c=n.useMemo,s=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var f=u(null);if(null===f.current){var h={hasValue:!1,value:null};f.current=h}else h=f.current;var d=a(e,(f=c(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return u=t}return u=e}if(t=u,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(a=e,t):(a=e,u=r)}var a,u,l=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,i]))[0],f[1]);return l(function(){h.hasValue=!0,h.value=d},[d]),s(d),d}},5274:function(e,t,r){"use strict";var n=r(2265);n.useSyncExternalStore,n.useRef,n.useEffect,n.useMemo,n.useDebugValue},2558:function(e,t,r){"use strict";e.exports=r(4369)},5195:function(e,t,r){"use strict";e.exports=r(2860)},6548:function(e,t,r){"use strict";r(5274)},9129:function(e,t,r){"use strict";r.d(t,{bu:function(){return g},xC:function(){return b},PH:function(){return c},e:function(){return ei},oM:function(){return j},cw:function(){return y}});var n,i=r(9234),o=r(9688);function a(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var u=a();r(257);var l="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?o.qC:o.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function c(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(eo(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(0,o.LG)(t)&&t.type===e,r}var s=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function f(e){return(0,i.o$)(e)?(0,i.Uy)(e,()=>{}):e}function h(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var d=()=>function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},o=new s;return t&&("boolean"==typeof t?o.push(u):o.push(a(t.extraArgument))),o},p="RTK_autoBatch",y=()=>e=>({payload:e,meta:{[p]:!0}}),v=e=>t=>{setTimeout(t,e)},g=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,a=!1,u=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:v(10):"callback"===e.type?e.queueNotification:v(e.timeout),c=()=>{a=!1,o&&(o=!1,u.forEach(e=>e()))};return Object.assign({},n,{subscribe(e){let t=n.subscribe(()=>i&&e());return u.add(e),()=>{t(),u.delete(e)}},dispatch(e){try{return(o=!(i=!e?.meta?.[p]))&&!a&&(a=!0,l(c)),n.dispatch(e)}finally{i=!0}}})},m=e=>function(t){let{autoBatch:r=!0}=t??{},n=new s(e);return r&&n.push(g("object"==typeof r?r:void 0)),n};function b(e){let t,r;let n=d(),{reducer:i,middleware:a,devTools:u=!0,duplicateMiddlewareCheck:c=!0,preloadedState:s,enhancers:f}=e||{};if("function"==typeof i)t=i;else if((0,o.PO)(i))t=(0,o.UY)(i);else throw Error(eo(1));r="function"==typeof a?a(n):n();let h=o.qC;u&&(h=l({trace:!1,..."object"==typeof u&&u}));let p=m((0,o.md)(...r)),y=h(..."function"==typeof f?f(p):p());return(0,o.MT)(t,s,y)}function w(e){let t;let r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(eo(28));if(n in r)throw Error(eo(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}var x=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},O=Symbol.for("rtk-slice-createasyncthunk"),P=((n=P||{}).reducer="reducer",n.reducerWithPrepare="reducerWithPrepare",n.asyncThunk="asyncThunk",n),j=function({creators:e}={}){let t=e?.asyncThunk?.[O];return function(e){let r;let{name:n,reducerPath:o=n}=e;if(!n)throw Error(eo(11));let a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},u=Object.keys(a),l={},s={},d={},p=[],y={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(eo(12));if(r in s)throw Error(eo(13));return s[r]=t,y},addMatcher:(e,t)=>(p.push({matcher:e,reducer:t}),y),exposeAction:(e,t)=>(d[e]=t,y),exposeCaseReducer:(e,t)=>(l[e]=t,y)};function v(){let[t={},r=[],n]="function"==typeof e.extraReducers?w(e.extraReducers):[e.extraReducers],o={...t,...s};return function(e,t){let r;let[n,o,a]=w(t);if("function"==typeof e)r=()=>f(e());else{let t=f(e);r=()=>t}function u(e=r(),t){let u=[n[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===u.filter(e=>!!e).length&&(u=[a]),u.reduce((e,r)=>{if(r){if((0,i.mv)(e)){let n=r(e,t);return void 0===n?e:n}if((0,i.o$)(e))return(0,i.Uy)(e,e=>r(e,t));{let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}}return e},e)}return u.getInitialState=r,u}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of p)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}u.forEach(r=>{let i=a[r],o={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(eo(18));let{payloadCreator:o,fulfilled:a,pending:u,rejected:l,settled:c,options:s}=r,f=i(e,o,s);n.exposeAction(t,f),a&&n.addCase(f.fulfilled,a),u&&n.addCase(f.pending,u),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:a||S,pending:u||S,rejected:l||S,settled:c||S})}(o,i,y,t):function({type:e,reducerName:t,createNotation:r},n,i){let o,a;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(eo(17));o=n.reducer,a=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?c(e,a):c(e))}(o,i,y)});let g=e=>e,m=new Map,b=new WeakMap;function x(e,t){return r||(r=v()),r(e,t)}function O(){return r||(r=v()),r.getInitialState()}function P(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=h(b,n,O)),i}function i(t=g){let n=h(m,r,()=>new WeakMap);return h(n,t,()=>{let n={};for(let[i,o]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(o,...a){let u=t(o);return void 0===u&&n&&(u=r()),e(u,...a)}return i.unwrapped=e,i}(o,t,()=>h(b,t,O),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let j={name:n,reducer:x,actions:d,caseReducers:l,getInitialState:O,...P(o),injectInto(e,{reducerPath:t,...r}={}){let n=t??o;return e.inject({reducerPath:n,reducer:x},r),{...j,...P(n,!0)}}};return j}}();function S(){}var _="listener",E="completed",A="cancelled",M=`task-${A}`,k=`task-${E}`,T=`${_}-${A}`,C=`${_}-${E}`,D=class{constructor(e){this.code=e,this.message=`task ${A} (reason: ${e})`}name="TaskAbortError";message},N=(e,t)=>{if("function"!=typeof e)throw TypeError(eo(32))},I=()=>{},z=(e,t=I)=>(e.catch(t),e),R=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),L=e=>{if(e.aborted)throw new D(e.reason)};function U(e,t){let r=I;return new Promise((n,i)=>{let o=()=>i(new D(e.reason));if(e.aborted){o();return}r=R(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=I})}var B=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof D?"cancelled":"rejected",error:e}}finally{t?.()}},$=e=>t=>z(U(e,t).then(t=>(L(e),t))),F=e=>{let t=$(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:W}=Object,K={},Z="listenerMiddleware",q=(e,t)=>{let r=t=>R(e,()=>t.abort(e.reason));return(n,i)=>{N(n,"taskExecutor");let o=new AbortController;r(o);let a=B(async()=>{L(e),L(o.signal);let t=await n({pause:$(o.signal),delay:F(o.signal),signal:o.signal});return L(o.signal),t},()=>o.abort(k));return i?.autoJoin&&t.push(a.catch(I)),{result:$(e)(a),cancel(){o.abort(M)}}}},H=(e,t)=>{let r=async(r,n)=>{L(t);let i=()=>{},o=[new Promise((t,n)=>{let o=e({predicate:r,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});i=()=>{o(),n()}})];null!=n&&o.push(new Promise(e=>setTimeout(e,n,null)));try{let e=await U(t,Promise.race(o));return L(t),e}finally{i()}};return(e,t)=>z(r(e,t))},V=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=c(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(eo(21));return N(o,"options.listener"),{predicate:i,type:t,effect:o}},X=W(e=>{let{type:t,predicate:r,effect:n}=V(e);return{id:x(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(eo(22))}}},{withTypes:()=>X}),Y=(e,t)=>{let{type:r,effect:n,predicate:i}=V(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},G=e=>{e.pending.forEach(e=>{e.abort(T)})},Q=(e,t)=>()=>{for(let e of t.keys())G(e);e.clear()},J=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},ee=W(c(`${Z}/add`),{withTypes:()=>ee}),et=c(`${Z}/removeAll`),er=W(c(`${Z}/remove`),{withTypes:()=>er}),en=(...e)=>{console.error(`${Z}/error`,...e)},ei=(e={})=>{let t=new Map,r=new Map,n=e=>{let t=r.get(e)??0;r.set(e,t+1)},i=e=>{let t=r.get(e)??1;1===t?r.delete(e):r.set(e,t-1)},{extra:a,onError:u=en}=e;N(u,"onError");let l=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&G(e)}),c=e=>l(Y(t,e)??X(e));W(c,{withTypes:()=>c});let s=e=>{let r=Y(t,e);return r&&(r.unsubscribe(),e.cancelActive&&G(r)),!!r};W(s,{withTypes:()=>s});let f=async(e,r,o,l)=>{let s=new AbortController,f=H(c,s.signal),h=[];try{e.pending.add(s),n(e),await Promise.resolve(e.effect(r,W({},o,{getOriginalState:l,condition:(e,t)=>f(e,t).then(Boolean),take:f,delay:F(s.signal),pause:$(s.signal),extra:a,signal:s.signal,fork:q(s.signal,h),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==s&&(e.abort(T),r.delete(e))})},cancel:()=>{s.abort(T),e.pending.delete(s)},throwIfCancelled:()=>{L(s.signal)}})))}catch(e){e instanceof D||J(u,e,{raisedBy:"effect"})}finally{await Promise.all(h),s.abort(C),i(e),e.pending.delete(s)}},h=Q(t,r);return{middleware:e=>r=>n=>{let i;if(!(0,o.LG)(n))return r(n);if(ee.match(n))return c(n.payload);if(et.match(n)){h();return}if(er.match(n))return s(n.payload);let a=e.getState(),l=()=>{if(a===K)throw Error(eo(23));return a};try{if(i=r(n),t.size>0){let r=e.getState();for(let i of Array.from(t.values())){let t=!1;try{t=i.predicate(n,r,a)}catch(e){t=!1,J(u,e,{raisedBy:"predicate"})}t&&f(i,n,e,l)}}}finally{a=K}return i},startListening:c,stopListening:s,clearListeners:h}};function eo(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original")},9234:function(e,t,r){"use strict";r.d(t,{Uy:function(){return ed},Vk:function(){return eh},mv:function(){return v},o$:function(){return g}});var n,i=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function u(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var l=Object,c=l.getPrototypeOf,s="constructor",f="prototype",h="configurable",d="enumerable",p="writable",y="value",v=e=>!!e&&!!e[a];function g(e){return!!e&&(w(e)||_(e)||!!e[o]||!!e[s]?.[o]||E(e)||A(e))}var m=l[f][s].toString(),b=new WeakMap;function w(e){if(!e||!M(e))return!1;let t=c(e);if(null===t||t===l[f])return!0;let r=l.hasOwnProperty.call(t,s)&&t[s];if(r===Object)return!0;if(!k(r))return!1;let n=b.get(r);return void 0===n&&(n=Function.toString.call(r),b.set(r,n)),n===m}function x(e,t,r=!0){0===O(e)?(r?Reflect.ownKeys(e):l.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function O(e){let t=e[a];return t?t.type_:_(e)?1:E(e)?2:A(e)?3:0}var P=(e,t,r=O(e))=>2===r?e.has(t):l[f].hasOwnProperty.call(e,t),j=(e,t,r=O(e))=>2===r?e.get(t):e[t],S=(e,t,r,n=O(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},_=Array.isArray,E=e=>e instanceof Map,A=e=>e instanceof Set,M=e=>"object"==typeof e,k=e=>"function"==typeof e,T=e=>"boolean"==typeof e,C=e=>e.copy_||e.base_,D=e=>e.modified_?e.copy_:e.base_;function N(e,t){if(E(e))return new Map(e);if(A(e))return new Set(e);if(_(e))return Array[f].slice.call(e);let r=w(e);if(!0!==t&&("class_only"!==t||r)){let t=c(e);if(null!==t&&r)return{...e};let n=l.create(t);return l.assign(n,e)}{let t=l.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n1&&l.defineProperties(e,{set:z,add:z,clear:z,delete:z}),l.freeze(e),t&&x(e,(e,t)=>{I(t,!0)},!1)),e}var z={[y]:function(){u(2)}};function R(e){return!(null!==e&&M(e))||l.isFrozen(e)}var L="MapSet",U="Patches",B="ArrayMethods",$={};function F(e){let t=$[e];return t||u(0,e),t}var W=e=>!!$[e],K=()=>n,Z=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:W(L)?F(L):void 0,arrayMethodsPlugin_:W(B)?F(B):void 0});function q(e,t){t&&(e.patchPlugin_=F(U),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function H(e){V(e),e.drafts_.forEach(Y),e.drafts_=null}function V(e){e===n&&(n=e.parent_)}var X=e=>n=Z(n,e);function Y(e){let t=e[a];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function G(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[a].modified_&&(H(t),u(4)),g(e)&&(e=Q(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[a].base_,e,t)}else e=Q(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&I(t,r)}(t,e,!0),H(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i?e:void 0}function Q(e,t){if(R(t))return t;let r=t[a];if(!r)return ei(t,e.handledSet_,e);if(!ee(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);en(r,e)}return r.copy_}function J(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var ee=(e,t)=>e.scope_===t,et=[];function er(e,t,r,n){let i=C(e),o=e.type_;if(void 0!==n&&j(i,n,o)===t){S(i,n,r,o);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;x(i,(e,r)=>{if(v(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??et)S(i,n,r,o)}function en(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}J(e)}}function ei(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||v(e)||t.has(e)||!g(e)||R(e)||(t.add(e),x(e,(n,i)=>{if(v(i)){let t=i[a];ee(t,r)&&(S(e,n,D(t),e.type_),J(t))}else g(i)&&ei(i,t,r)})),e}var eo={get(e,t){if(t===a)return e;let r=e.scope_.arrayMethodsPlugin_,n=1===e.type_&&"string"==typeof t;if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let i=C(e);if(!P(i,t,e.type_))return function(e,t,r){let n=el(t,r);return n?y in n?n[y]:n.get?.call(e.draft_):void 0}(e,i,t);let o=i[t];if(e.finalized_||!g(o)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&function(e){let t=+e;return Number.isInteger(t)&&String(t)===e}(t))return o;if(o===eu(e.base_,t)){es(e);let r=1===e.type_?+t:t,n=ef(e.scope_,o,e,r);return e.copy_[r]=n}return o},has:(e,t)=>t in C(e),ownKeys:e=>Reflect.ownKeys(C(e)),set(e,t,r){let n=el(C(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=eu(C(e),t),i=n?.[a];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||P(e.base_,t,e.type_)))return!0;es(e),ec(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(v(r)){let i=r[a];ee(i,n)&&i.callbacks_.push(function(){es(e),er(e,r,D(i),t)})}else g(r)&&e.callbacks_.push(function(){let i=C(e);3===e.type_?i.has(r)&&ei(r,n.handledSet_,n):j(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ei(j(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(es(e),void 0!==eu(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),ec(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=C(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[p]:!0,[h]:1!==e.type_||"length"!==t,[d]:n[d],[y]:r[t]}:n},defineProperty(){u(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){u(12)}},ea={};for(let e in eo){let t=eo[e];ea[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function eu(e,t){let r=e[a];return(r?C(r):e)[t]}function el(e,t){if(!(t in e))return;let r=c(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=c(r)}}function ec(e){!e.modified_&&(e.modified_=!0,e.parent_&&ec(e.parent_))}function es(e){e.copy_||(e.assigned_=new Map,e.copy_=N(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ef(e,t,r,n){let[i,o]=E(t)?F(L).proxyMap_(t,r):A(t)?F(L).proxySet_(t,r):function(e,t){let r=_(e),n={type_:r?1:0,scope_:t?t.scope_:K(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=n,o=eo;r&&(i=[n],o=ea);let{revoke:a,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=a,[u,n]}(t,r);return(r?.scope_??K()).drafts_.push(i),o.callbacks_=r?.callbacks_??[],o.key_=n,r&&void 0!==n?function(e,t,r){e.callbacks_.push(function(n){if(!t||!ee(t,n))return;n.mapSetPlugin_?.fixSetContents(t);let i=D(t);er(e,t.draft_??t,i,r),en(t,n)})}(r,o,n):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),i}function eh(e){return v(e)||u(10,e),function e(t){let r;if(!g(t)||R(t))return t;let n=t[a],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=N(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=N(t,!0);return x(r,(t,n)=>{S(r,t,e(n))},i),n&&(n.finalized_=!1),r}(e)}ea.deleteProperty=function(e,t){return ea.set.call(this,e,t,void 0)},ea.set=function(e,t,r){return eo.set.call(this,e[0],t,r,e[0])};var ed=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(k(e)&&!k(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(k(t)||u(6),void 0===r||k(r)||u(7),g(e)){let i=X(this),o=ef(i,e,void 0),a=!0;try{n=t(o),a=!1}finally{a?H(i):V(i)}return q(i,r),G(n,i)}if(e&&M(e))u(1,e);else{if(void 0===(n=t(e))&&(n=e),n===i&&(n=void 0),this.autoFreeze_&&I(n,!0),r){let t=[],i=[];F(U).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return k(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},T(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),T(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),T(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){g(e)||u(8),v(e)&&(e=eh(e));let t=X(this),r=ef(t,e,void 0);return r[a].isManual_=!0,V(t),r}finishDraft(e,t){let r=e&&e[a];r&&r.isManual_||u(9);let{scope_:n}=r;return q(n,t),G(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=F(U).applyPatches_;return v(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce},2516:function(e,t,r){"use strict";function n(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}r.d(t,{Z:function(){return n}}),Array.prototype.slice},6115:function(e,t,r){"use strict";function n(e){return function(){return e}}r.d(t,{Z:function(){return n}})},7790:function(e,t,r){"use strict";r.d(t,{d:function(){return l}});let n=Math.PI,i=2*n,o=i-1e-6;function a(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return a;let r=10**t;return function(e){this._+=e[0];for(let t=1,n=e.length;t1e-6){if(Math.abs(f*l-c*s)>1e-6&&o){let d=r-a,p=i-u,y=l*l+c*c,v=Math.sqrt(y),g=Math.sqrt(h),m=o*Math.tan((n-Math.acos((y+h-(d*d+p*p))/(2*v*g)))/2),b=m/g,w=m/v;Math.abs(b-1)>1e-6&&this._append`L${e+b*s},${t+b*f}`,this._append`A${o},${o},0,0,${+(f*d>s*p)},${this._x1=e+w*l},${this._y1=t+w*c}`}else this._append`L${this._x1=e},${this._y1=t}`}}arc(e,t,r,a,u,l){if(e=+e,t=+t,l=!!l,(r=+r)<0)throw Error(`negative radius: ${r}`);let c=r*Math.cos(a),s=r*Math.sin(a),f=e+c,h=t+s,d=1^l,p=l?a-u:u-a;null===this._x1?this._append`M${f},${h}`:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&this._append`L${f},${h}`,r&&(p<0&&(p=p%i+i),p>o?this._append`A${r},${r},0,1,${d},${e-c},${t-s}A${r},${r},0,1,${d},${this._x1=f},${this._y1=h}`:p>1e-6&&this._append`A${r},${r},0,${+(p>=n)},${d},${this._x1=e+r*Math.cos(u)},${this._y1=t+r*Math.sin(u)}`)}rect(e,t,r,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+n}h${-r}Z`}toString(){return this._}}function l(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(null==r)t=null;else{let e=Math.floor(r);if(!(e>=0))throw RangeError(`invalid digits: ${r}`);t=e}return e},()=>new u(t)}u.prototype},418:function(e,t,r){"use strict";r.d(t,{cA:function(){return W}});var n,i=Symbol.for("immer-nothing"),o=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function u(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var l=Object.getPrototypeOf;function c(e){return!!e&&!!e[a]}function s(e){return!!e&&(d(e)||Array.isArray(e)||!!e[o]||!!e.constructor?.[o]||m(e)||b(e))}var f=Object.prototype.constructor.toString(),h=new WeakMap;function d(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if("function"!=typeof r)return!1;let n=h.get(r);return void 0===n&&(n=Function.toString.call(r),h.set(r,n)),n===f}function p(e,t,r=!0){0===y(e)?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function y(e){let t=e[a];return t?t.type_:Array.isArray(e)?1:m(e)?2:b(e)?3:0}function v(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function g(e,t,r){let n=y(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function m(e){return e instanceof Map}function b(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function x(e,t){if(m(e))return new Map(e);if(b(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=d(e);if(!0!==t&&("class_only"!==t||r)){let t=l(e);return null!==t&&r?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[a];let r=Reflect.ownKeys(t);for(let n=0;n1&&Object.defineProperties(e,{set:P,add:P,clear:P,delete:P}),Object.freeze(e),t&&Object.values(e).forEach(e=>O(e,!0))),e}var P={value:function(){u(2)}};function j(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var S={};function _(e){let t=S[e];return t||u(0,e),t}function E(e,t){t&&(_("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function A(e){M(e),e.drafts_.forEach(T),e.drafts_=null}function M(e){e===n&&(n=e.parent_)}function k(e){return n={drafts_:[],parent_:n,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function T(e){let t=e[a];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function C(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return void 0!==e&&e!==r?(r[a].modified_&&(A(t),u(4)),s(e)&&(e=D(t,e),t.parent_||I(t,e)),t.patches_&&_("Patches").generateReplacementPatches_(r[a].base_,e,t.patches_,t.inversePatches_)):e=D(t,r,[]),A(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i?e:void 0}function D(e,t,r){if(j(t))return t;let n=e.immer_.shouldUseStrictIteration(),i=t[a];if(!i)return p(t,(n,o)=>N(e,i,t,n,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return I(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,o=t,a=!1;3===i.type_&&(o=new Set(t),t.clear(),a=!0),p(o,(n,o)=>N(e,i,t,n,o,r,a),n),I(e,t,!1),r&&e.patches_&&_("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function N(e,t,r,n,i,o,a){if(null==i||"object"!=typeof i&&!a)return;let u=j(i);if(!u||a){if(c(i)){let a=D(e,i,o&&t&&3!==t.type_&&!v(t.assigned_,n)?o.concat(n):void 0);if(g(r,n,a),!c(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(s(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&u)return;D(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof n&&(m(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&I(e,i)}}}function I(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&O(t,r)}var z={get(e,t){if(t===a)return e;let r=w(e);if(!v(r,t))return function(e,t,r){let n=U(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,r,t);let n=r[t];return e.finalized_||!s(n)?n:n===L(e.base_,t)?($(e),e.copy_[t]=F(n,e)):n},has:(e,t)=>t in w(e),ownKeys:e=>Reflect.ownKeys(w(e)),set(e,t,r){let n=U(w(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=L(w(e),t),i=n?.[a];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||v(e.base_,t)))return!0;$(e),B(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==L(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,$(e),B(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=w(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){u(11)},getPrototypeOf:e=>l(e.base_),setPrototypeOf(){u(12)}},R={};function L(e,t){let r=e[a];return(r?w(r):e)[t]}function U(e,t){if(!(t in e))return;let r=l(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=l(r)}}function B(e){!e.modified_&&(e.modified_=!0,e.parent_&&B(e.parent_))}function $(e){e.copy_||(e.copy_=x(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function F(e,t){let r=m(e)?_("MapSet").proxyMap_(e,t):b(e)?_("MapSet").proxySet_(e,t):function(e,t){let r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:n,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=i,a=z;r&&(o=[i],a=R);let{revoke:u,proxy:l}=Proxy.revocable(o,a);return i.draft_=l,i.revoke_=u,l}(e,t);return(t?t.scope_:n).drafts_.push(r),r}function W(e){return e}p(z,(e,t)=>{R[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),R.deleteProperty=function(e,t){return R.set.call(this,e,t,void 0)},R.set=function(e,t,r){return z.set.call(this,e[0],t,r,e[0])},new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,r)=>{let n;if("function"==typeof e&&"function"!=typeof t){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&u(6),void 0!==r&&"function"!=typeof r&&u(7),s(e)){let i=k(this),o=F(e,void 0),a=!0;try{n=t(o),a=!1}finally{a?A(i):M(i)}return E(i,r),C(n,i)}if(e&&"object"==typeof e)u(1,e);else{if(void 0===(n=t(e))&&(n=e),n===i&&(n=void 0),this.autoFreeze_&&O(n,!0),r){let t=[],i=[];_("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return"function"==typeof e?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;s(e)||u(8),c(e)&&(c(t=e)||u(10,t),e=function e(t){let r;if(!s(t)||j(t))return t;let n=t[a],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=x(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=x(t,!0);return p(r,(t,n)=>{g(r,t,e(n))},i),n&&(n.finalized_=!1),r}(t));let r=k(this),n=F(e,void 0);return n[a].isManual_=!0,M(r),n}finishDraft(e,t){let r=e&&e[a];r&&r.isManual_||u(9);let{scope_:n}=r;return E(n,t),C(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=_("Patches").applyPatches_;return c(e)?n(e,t):this.produce(e,e=>n(e,t))}}().produce},9688:function(e,t,r){"use strict";function n(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}r.d(t,{LG:function(){return h},MT:function(){return l},PO:function(){return u},UY:function(){return c},md:function(){return f},qC:function(){return s}});var i="function"==typeof Symbol&&Symbol.observable||"@@observable",o=()=>Math.random().toString(36).substring(7).split("").join("."),a={INIT:`@@redux/INIT${o()}`,REPLACE:`@@redux/REPLACE${o()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o()}`};function u(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function l(e,t,r){if("function"!=typeof e)throw Error(n(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(n(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(n(1));return r(l)(e,t)}let o=e,c=t,s=new Map,f=s,h=0,d=!1;function p(){f===s&&(f=new Map,s.forEach((e,t)=>{f.set(t,e)}))}function y(){if(d)throw Error(n(3));return c}function v(e){if("function"!=typeof e)throw Error(n(4));if(d)throw Error(n(5));let t=!0;p();let r=h++;return f.set(r,e),function(){if(t){if(d)throw Error(n(6));t=!1,p(),f.delete(r),s=null}}}function g(e){if(!u(e))throw Error(n(7));if(void 0===e.type)throw Error(n(8));if("string"!=typeof e.type)throw Error(n(17));if(d)throw Error(n(9));try{d=!0,c=o(c,e)}finally{d=!1}return(s=f).forEach(e=>{e()}),e}return g({type:a.INIT}),{dispatch:g,subscribe:v,getState:y,replaceReducer:function(e){if("function"!=typeof e)throw Error(n(10));o=e,g({type:a.REPLACE})},[i]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(n(11));function t(){e.next&&e.next(y())}return t(),{unsubscribe:v(t)}},[i](){return this}}}}}function c(e){let t;let r=Object.keys(e),i={};for(let t=0;t{let r=e[t];if(void 0===r(void 0,{type:a.INIT}))throw Error(n(12));if(void 0===r(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw Error(n(13))})}(i)}catch(e){t=e}return function(e={},r){if(t)throw t;let a=!1,u={};for(let t=0;te:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function f(...e){return t=>(r,i)=>{let o=t(r,i),a=()=>{throw Error(n(15))},u={getState:o.getState,dispatch:(e,...t)=>a(e,...t)};return a=s(...e.map(e=>e(u)))(o.dispatch),{...o,dispatch:a}}}function h(e){return u(e)&&"type"in e&&"string"==typeof e.type}},2713:function(e,t,r){"use strict";r.d(t,{P1:function(){return w}});var n=e=>Array.isArray(e)?e:[e],i=0,o=class{revision=i;_value;_lastValue;_isEqual=a;constructor(e,t=a){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++i)}};function a(e,t){return e===t}function u(e){return e instanceof o||console.warn("Not a valid cell! ",e),e.value}var l=(e,t)=>!1;function c(){return function(e,t=a){return new o(null,t)}(0,l)}var s=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=c()),u(t)};Symbol();var f=0,h=Object.getPrototypeOf({}),d=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,p);tag=c();tags={};children={};collectionTag=null;id=f++},p={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in h)return n;if("object"==typeof n&&null!==n){let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(n)?new y(n):new d(n)),r.tag&&u(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=c()).value=n),u(r),n}})(),ownKeys:e=>(s(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},y=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],v);tag=c();tags={};children={};collectionTag=null;id=f++},v={get:([e],t)=>("length"===t&&s(e),p.get(e,t)),ownKeys:([e])=>p.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>p.getOwnPropertyDescriptor(e,t),has:([e],t)=>p.has(e,t)},g="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function m(){return{s:0,v:void 0,o:null,p:null}}function b(e,t={}){let r,n=m(),{resultEqualityCheck:i}=t,o=0;function a(){let t,a=n,{length:u}=arguments;for(let e=0;e{n=m(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}var w=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,i=(...e)=>{let t,i=0,o=0,a={},u=e.pop();"object"==typeof u&&(a=u,u=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let{memoize:l,memoizeOptions:c=[],argsMemoize:s=b,argsMemoizeOptions:f=[],devModeChecks:h={}}={...r,...a},d=n(c),p=n(f),y=function(e){let t=Array.isArray(e[0])?e[0]:e;return!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),v=l(function(){return i++,u.apply(null,arguments)},...d);return Object.assign(s(function(){o++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;io,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:l,argsMemoize:s})};return Object.assign(i,{withTypes:()=>i}),i}(b),x=Object.assign((e,t=w)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>x})}}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js b/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js new file mode 100644 index 0000000..4c5b984 --- /dev/null +++ b/dist/_next/static/chunks/app/_not-found/page-e30cecccd190b7d4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js b/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js new file mode 100644 index 0000000..e6f5922 --- /dev/null +++ b/dist/_next/static/chunks/app/alerts/page-6f170ee2c75a0961.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[78],{4033:function(e,s,n){Promise.resolve().then(n.bind(n,5949))},5949:function(e,s,n){"use strict";n.r(s),n.d(s,{default:function(){return c}});var l=n(7437),t=n(553),i=n(3263),a=n(9294);let r=(0,n(8755).Z)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function c(){let{isOpen:e,toggle:s,close:n}=(0,a.A)(),{regenerateAlerts:c,dismissAll:o,unreadCount:u}=(0,i.Z7)();return(0,l.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,l.jsx)(t.YE,{isOpen:e,onClose:n,unreadAlertsCount:u}),(0,l.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,l.jsx)(t.h4,{onMenuClick:s,title:"Alertas"}),(0,l.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,l.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,l.jsxs)("div",{className:"flex flex-wrap gap-3 mb-6",children:[(0,l.jsxs)("button",{onClick:()=>{c()},className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500/20",children:[(0,l.jsx)(r,{className:"h-4 w-4"}),"Regenerar Alertas"]}),(0,l.jsx)("button",{onClick:()=>{o()},className:"inline-flex items-center gap-2 px-4 py-2 bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-sm font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-slate-500/20",children:"Limpiar Todas"})]}),(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)(i.KG,{})})]})}),(0,l.jsx)(t.zM,{unreadAlertsCount:u})]})]})}}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=4033)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js b/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js new file mode 100644 index 0000000..a3116f6 --- /dev/null +++ b/dist/_next/static/chunks/app/budget/page-1c1157916eee3b45.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[379],{2257:function(e,s,t){Promise.resolve().then(t.bind(t,7268))},7268:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return k}});var a=t(7437),l=t(553),n=t(2265),r=t(4508);let o=Array.from({length:12},(e,s)=>({value:s+1,label:(0,r.ZY)(s+1)}));function i(e){let{onSubmit:s,onCancel:t,initialData:l}=e,i=new Date,[d,c]=(0,n.useState)({totalIncome:(null==l?void 0:l.totalIncome)||0,savingsGoal:(null==l?void 0:l.savingsGoal)||0,month:(null==l?void 0:l.month)||i.getMonth()+1,year:(null==l?void 0:l.year)||i.getFullYear()}),[x,m]=(0,n.useState)({}),u=()=>{let e={};return d.totalIncome<=0&&(e.totalIncome="Los ingresos deben ser mayores a 0"),d.savingsGoal>=d.totalIncome&&(e.savingsGoal="La meta de ahorro debe ser menor que los ingresos"),(d.month<1||d.month>12)&&(e.month="El mes debe estar entre 1 y 12"),(d.year<2e3||d.year>2100)&&(e.year="El a\xf1o no es v\xe1lido"),m(e),0===Object.keys(e).length},h=(e,s)=>{c(t=>({...t,[e]:s})),x[e]&&m(s=>{let t={...s};return delete t[e],t})};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),u()&&s({month:d.month,year:d.year,totalIncome:d.totalIncome,savingsGoal:d.savingsGoal,fixedExpenses:(null==l?void 0:l.fixedExpenses)||0,variableExpenses:(null==l?void 0:l.variableExpenses)||0})},className:"space-y-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"month",className:"block text-sm font-medium text-slate-300 mb-1",children:["Mes ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("select",{id:"month",value:d.month,onChange:e=>h("month",parseInt(e.target.value)),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.month?"border-red-500":"border-slate-600"),children:o.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),x.month&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.month})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"year",className:"block text-sm font-medium text-slate-300 mb-1",children:["A\xf1o ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"year",min:"2000",max:"2100",value:d.year,onChange:e=>h("year",parseInt(e.target.value)||i.getFullYear()),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.year?"border-red-500":"border-slate-600")}),x.year&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.year})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"totalIncome",className:"block text-sm font-medium text-slate-300 mb-1",children:["Ingresos totales ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"totalIncome",min:"0",step:"0.01",value:d.totalIncome||"",onChange:e=>h("totalIncome",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.totalIncome?"border-red-500":"border-slate-600"),placeholder:"0.00"}),x.totalIncome&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.totalIncome})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"savingsGoal",className:"block text-sm font-medium text-slate-300 mb-1",children:["Meta de ahorro ",(0,a.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,a.jsx)("input",{type:"number",id:"savingsGoal",min:"0",step:"0.01",value:d.savingsGoal||"",onChange:e=>h("savingsGoal",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",x.savingsGoal?"border-red-500":"border-slate-600"),placeholder:"0.00"}),x.savingsGoal&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:x.savingsGoal}),d.totalIncome>0&&(0,a.jsxs)("p",{className:"mt-1 text-sm text-slate-500",children:["Disponible para gastos: ",((d.totalIncome-d.savingsGoal)/d.totalIncome*100).toFixed(0),"%"]})]}),(0,a.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,a.jsx)("button",{type:"button",onClick:t,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,a.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:l?"Guardar cambios":"Crear presupuesto"})]})]})}function d(e){let{spent:s,total:t,label:l}=e,n=t>0?Math.min(s/t*100,100):0,o=n<70?{stroke:"#10b981",bg:"text-emerald-400"}:n<90?{stroke:"#f59e0b",bg:"text-amber-400"}:{stroke:"#ef4444",bg:"text-red-400"},i=148*Math.PI;return(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("svg",{width:160,height:160,className:"transform -rotate-90",children:[(0,a.jsx)("circle",{stroke:"#334155",strokeWidth:12,fill:"transparent",r:74,cx:80,cy:80}),(0,a.jsx)("circle",{stroke:o.stroke,strokeWidth:12,strokeLinecap:"round",fill:"transparent",r:74,cx:80,cy:80,style:{strokeDasharray:"".concat(i," ").concat(i),strokeDashoffset:i-n/100*i,transition:"stroke-dashoffset 0.5s ease-in-out"}})]}),(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,a.jsxs)("span",{className:(0,r.cn)("text-3xl font-bold",o.bg),children:[n.toFixed(0),"%"]}),(0,a.jsx)("span",{className:"text-slate-400 text-sm mt-1",children:"usado"})]})]}),(0,a.jsxs)("div",{className:"mt-4 text-center",children:[(0,a.jsx)("p",{className:"text-slate-400 text-sm",children:l}),(0,a.jsxs)("p",{className:"text-lg font-semibold text-white mt-1",children:[(0,r.xG)(s)," ",(0,a.jsxs)("span",{className:"text-slate-500",children:["/ ",(0,r.xG)(t)]})]}),(0,a.jsxs)("p",{className:"text-sm text-slate-500 mt-1",children:[(0,r.xG)(Math.max(t-s,0))," disponible"]})]})]})}function c(e){let{current:s,max:t,label:l,color:n}=e,o=t>0?Math.min(s/t*100,100):0;return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-300",children:l}),(0,a.jsxs)("span",{className:"text-sm text-slate-400",children:[(0,r.xG)(s)," ",(0,a.jsxs)("span",{className:"text-slate-600",children:["/ ",(0,r.xG)(t)]})]})]}),(0,a.jsx)("div",{className:"h-3 bg-slate-700 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:(0,r.cn)("h-full rounded-full transition-all duration-500 ease-out",n||(o<70?"bg-emerald-500":o<90?"bg-amber-500":"bg-red-500")),style:{width:"".concat(o,"%")}})}),(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:[o.toFixed(0),"% usado"]}),o>=100&&(0,a.jsx)("span",{className:"text-xs text-red-400 font-medium",children:"L\xedmite alcanzado"})]})]})}var x=t(525),m=t(3085),u=t(8755);let h=(0,u.Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);function b(e){let{label:s,amount:t,trend:l="neutral",color:n}=e;return(0,a.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-slate-400 text-sm",children:s}),(()=>{switch(l){case"up":return(0,a.jsx)(x.Z,{className:"w-4 h-4 text-emerald-400"});case"down":return(0,a.jsx)(m.Z,{className:"w-4 h-4 text-red-400"});default:return(0,a.jsx)(h,{className:"w-4 h-4 text-slate-500"})}})()]}),(0,a.jsx)("p",{className:(0,r.cn)("text-2xl font-mono font-semibold mt-2",n||"text-white"),children:(0,r.xG)(t)}),(0,a.jsx)("div",{className:"mt-2",children:(()=>{switch(l){case"up":return(0,a.jsx)("span",{className:"text-emerald-400 text-xs",children:"Positivo"});case"down":return(0,a.jsx)("span",{className:"text-red-400 text-xs",children:"Negativo"});default:return(0,a.jsx)("span",{className:"text-slate-500 text-xs",children:"Neutral"})}})()})]})}var p=t(4835),j=t(1804),f=t(9397);let g=(0,u.Z)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);var v=t(9322);function N(){let[e,s]=(0,n.useState)(!1),[t,l]=(0,n.useState)(!1),{monthlyBudgets:o,fixedDebts:m,variableDebts:u,cardPayments:h,currentMonth:N,currentYear:y,setMonthlyBudget:w}=(0,p.J)(),k=(0,n.useMemo)(()=>o.find(e=>e.month===N&&e.year===y),[o,N,y]),G=(0,n.useMemo)(()=>(0,r.zF)(m),[m]),I=(0,n.useMemo)(()=>(0,r.Q0)(u),[u]),M=(0,n.useMemo)(()=>(0,r.Ic)(h),[h]),C=G+I+M,Z=(null==k?void 0:k.totalIncome)||0,D=(null==k?void 0:k.savingsGoal)||0,E=Z-D,F=E-C,P=new Date(y,N,0).getDate(),z=new Date().getDate(),L=P-z,S=z>0?C/z:0,A=C+S*L,Y=()=>{s(!1),l(!1)},_=e=>{w(e),Y()};return k?(0,a.jsxs)("div",{className:"bg-slate-900 min-h-screen p-6",children:[(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Presupuesto Mensual"}),(0,a.jsxs)("p",{className:"text-slate-400 text-sm mt-1",children:[(0,r.ZY)(N)," ",y]})]}),(0,a.jsxs)("button",{onClick:()=>{l(!0),s(!0)},className:(0,r.cn)("flex items-center gap-2 px-4 py-2 bg-slate-700 text-white rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:[(0,a.jsx)(g,{className:"w-4 h-4"}),"Editar"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[(0,a.jsx)(b,{label:"Ingresos totales",amount:Z,trend:"up",color:"text-emerald-400"}),(0,a.jsx)(b,{label:"Meta de ahorro",amount:D,trend:"neutral",color:"text-blue-400"}),(0,a.jsx)(b,{label:"Gastado",amount:C,trend:C>E?"down":"neutral",color:C>E?"text-red-400":"text-amber-400"}),(0,a.jsx)(b,{label:"Disponible",amount:F,trend:F>0?"up":"down",color:F>0?"text-emerald-400":"text-red-400"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[(0,a.jsx)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6 flex items-center justify-center",children:(0,a.jsx)(d,{spent:C,total:E,label:"Presupuesto mensual"})}),(0,a.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white mb-4",children:"Desglose de gastos"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(c,{current:G,max:E,label:"Deudas fijas pendientes"}),(0,a.jsx)(c,{current:I,max:E,label:"Deudas variables pendientes"}),(0,a.jsx)(c,{current:M,max:E,label:"Pagos de tarjetas"})]})]})]}),(0,a.jsx)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-6",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,r.cn)("p-2 rounded-lg",A>E?"bg-red-500/10":"bg-emerald-500/10"),children:A>E?(0,a.jsx)(v.Z,{className:"w-5 h-5 text-red-400"}):(0,a.jsx)(x.Z,{className:"w-5 h-5 text-emerald-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Proyecci\xf3n"}),(0,a.jsxs)("p",{className:"text-slate-400 mt-1",children:["A tu ritmo actual de gasto (",(0,r.xG)(S),"/d\xeda),",A>E?(0,a.jsxs)("span",{className:"text-red-400",children:[" ","terminar\xe1s el mes con un d\xe9ficit de ",(0,r.xG)(A-E),"."]}):(0,a.jsxs)("span",{className:"text-emerald-400",children:[" ","terminar\xe1s el mes con un super\xe1vit de ",(0,r.xG)(E-A),"."]})]}),(0,a.jsxs)("p",{className:"text-slate-500 text-sm mt-2",children:["Quedan ",L," d\xedas en el mes"]})]})]})})]}),e&&(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:Y}),(0,a.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:t?"Editar presupuesto":"Nuevo presupuesto"}),(0,a.jsx)(i,{onSubmit:_,onCancel:Y,initialData:t?k:void 0})]})})]})]}):(0,a.jsx)("div",{className:"bg-slate-900 min-h-screen p-6",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Presupuesto Mensual"}),(0,a.jsxs)("p",{className:"text-slate-400 text-sm mt-1",children:[(0,r.ZY)(N)," ",y]})]})}),(0,a.jsxs)("div",{className:"text-center py-16 bg-slate-800/50 border border-slate-700/50 rounded-lg",children:[(0,a.jsx)(j.Z,{className:"w-12 h-12 text-slate-600 mx-auto mb-4"}),(0,a.jsx)("h3",{className:"text-lg font-medium text-slate-300",children:"No hay presupuesto para este mes"}),(0,a.jsx)("p",{className:"text-slate-500 mt-2 mb-6",children:"Crea un presupuesto para comenzar a gestionar tus finanzas"}),(0,a.jsxs)("button",{onClick:()=>{l(!1),s(!0)},className:(0,r.cn)("inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:[(0,a.jsx)(f.Z,{className:"w-4 h-4"}),"Crear presupuesto"]})]}),e&&(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:Y}),(0,a.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:"Nuevo presupuesto"}),(0,a.jsx)(i,{onSubmit:_,onCancel:Y})]})})]})]})})}var y=t(9294),w=t(3263);function k(){let{isOpen:e,close:s,toggle:t}=(0,y.A)(),{unreadCount:n}=(0,w.Z7)();return(0,a.jsxs)("div",{className:"flex min-h-screen bg-slate-950",children:[(0,a.jsx)(l.YE,{isOpen:e,onClose:s,unreadAlertsCount:n}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col min-h-screen",children:[(0,a.jsx)(l.h4,{onMenuClick:t,title:"Presupuesto"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20",children:(0,a.jsx)(N,{})}),(0,a.jsx)(l.zM,{unreadAlertsCount:n})]})]})}},9397:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},3085:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]])},525:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});let a=(0,t(8755).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=2257)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js b/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js new file mode 100644 index 0000000..e0a832e --- /dev/null +++ b/dist/_next/static/chunks/app/cards/page-a9843d3be56b680d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[137],{9174:function(e,t,s){Promise.resolve().then(s.bind(s,3234))},3234:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(7437),l=s(553),n=s(4508),i=s(5675),r=s(8930);function o(e){let{card:t,onEdit:s,onDelete:l}=e,o=(0,n.w7)(t.currentBalance,t.creditLimit),d=(0,n.tk)(t.closingDay),c=(0,n.PW)(t.dueDay),m=(0,n.P8)(d),u=(0,n.P8)(c);return(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-2xl p-6 text-white shadow-lg transition-transform hover:scale-[1.02]",style:{aspectRatio:"1.586",background:"linear-gradient(135deg, ".concat(t.color," 0%, ").concat(function(e,t){let s=e.replace("#",""),a=Math.max(0,Math.min(255,parseInt(s.substring(0,2),16)+-30)),l=Math.max(0,Math.min(255,parseInt(s.substring(2,4),16)+-30)),n=Math.max(0,Math.min(255,parseInt(s.substring(4,6),16)+t));return"#".concat(a.toString(16).padStart(2,"0")).concat(l.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0"))}(t.color,-30)," 100%)")},children:[(0,a.jsx)("div",{className:"absolute -right-8 -top-8 h-32 w-32 rounded-full bg-white/10"}),(0,a.jsx)("div",{className:"absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-white/5"}),(0,a.jsxs)("div",{className:"relative flex items-start justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold tracking-wide",children:t.name}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)("button",{onClick:s,className:"rounded-full p-1.5 transition-colors hover:bg-white/20","aria-label":"Editar tarjeta",children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})}),(0,a.jsx)("button",{onClick:l,className:"rounded-full p-1.5 transition-colors hover:bg-white/20","aria-label":"Eliminar tarjeta",children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{className:"relative mt-8",children:(0,a.jsxs)("p",{className:"font-mono text-2xl tracking-widest",children:["**** **** **** ",t.lastFourDigits]})}),(0,a.jsxs)("div",{className:"relative mt-6",children:[(0,a.jsx)("p",{className:"text-sm text-white/70",children:"Balance actual"}),(0,a.jsx)("p",{className:"text-2xl font-bold",children:(0,n.xG)(t.currentBalance)})]}),(0,a.jsxs)("div",{className:"relative mt-4 flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full bg-black/30 px-3 py-1",children:[(0,a.jsx)("div",{className:"h-2 w-2 rounded-full ".concat(o<30?"bg-emerald-500":o<70?"bg-amber-500":"bg-rose-500")}),(0,a.jsxs)("span",{className:"text-sm font-medium ".concat(o<30?"text-emerald-400":o<70?"text-amber-400":"text-rose-400"),children:[o.toFixed(0),"% usado"]})]}),(0,a.jsxs)("span",{className:"text-sm text-white/60",children:["de ",(0,n.xG)(t.creditLimit)]})]}),(0,a.jsxs)("div",{className:"relative mt-4 flex justify-between text-xs text-white/70",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"block",children:"Cierre"}),(0,a.jsxs)("span",{className:"font-medium text-white",children:[t.closingDay," (",0===m?"hoy":m>0?"en ".concat(m," d\xedas"):"hace ".concat(Math.abs(m)," d\xedas"),")"]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("span",{className:"block",children:"Vencimiento"}),(0,a.jsxs)("span",{className:"font-medium text-white",children:[t.dueDay," (",0===u?"hoy":u>0?"en ".concat(u," d\xedas"):"hace ".concat(Math.abs(u)," d\xedas"),")"]})]})]})]})}var d=s(2265),c=s(2489),m=s(401);function u(e){var t,s,l,n,i,r,o;let{initialData:u,onSubmit:x,onCancel:h}=e,[g,b]=(0,d.useState)({name:null!==(t=null==u?void 0:u.name)&&void 0!==t?t:"",lastFourDigits:null!==(s=null==u?void 0:u.lastFourDigits)&&void 0!==s?s:"",closingDay:null!==(l=null==u?void 0:u.closingDay)&&void 0!==l?l:1,dueDay:null!==(n=null==u?void 0:u.dueDay)&&void 0!==n?n:10,currentBalance:null!==(i=null==u?void 0:u.currentBalance)&&void 0!==i?i:0,creditLimit:null!==(r=null==u?void 0:u.creditLimit)&&void 0!==r?r:0,color:null!==(o=null==u?void 0:u.color)&&void 0!==o?o:"#6366f1"}),[p,j]=(0,d.useState)({}),f=()=>{let e={};return g.name.trim()||(e.name="El nombre es requerido"),g.lastFourDigits.trim()?/^\d{4}$/.test(g.lastFourDigits)||(e.lastFourDigits="Debe ser exactamente 4 d\xedgitos num\xe9ricos"):e.lastFourDigits="Los \xfaltimos 4 d\xedgitos son requeridos",(g.closingDay<1||g.closingDay>31)&&(e.closingDay="El d\xeda debe estar entre 1 y 31"),(g.dueDay<1||g.dueDay>31)&&(e.dueDay="El d\xeda debe estar entre 1 y 31"),g.creditLimit<=0&&(e.creditLimit="El l\xedmite de cr\xe9dito debe ser mayor a 0"),g.currentBalance<0&&(e.currentBalance="El balance no puede ser negativo"),j(e),0===Object.keys(e).length},v=(e,t)=>{b(s=>({...s,[e]:t})),p[e]&&j(t=>{let s={...t};return delete s[e],s})},N=e=>{v("lastFourDigits",e.replace(/\D/g,"").slice(0,4))};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f()&&x(g)},className:"space-y-4 rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:u?"Editar Tarjeta":"Nueva Tarjeta"}),(0,a.jsx)("button",{type:"button",onClick:h,className:"rounded-full p-1 text-slate-400 transition-colors hover:bg-slate-700 hover:text-white",children:(0,a.jsx)(c.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"sm:col-span-2",children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Nombre de la tarjeta"}),(0,a.jsx)("input",{type:"text",value:g.name,onChange:e=>v("name",e.target.value),placeholder:"Ej: Visa Banco Galicia",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.name&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"\xdaltimos 4 d\xedgitos"}),(0,a.jsx)("input",{type:"text",inputMode:"numeric",value:g.lastFourDigits,onChange:e=>N(e.target.value),placeholder:"1234",maxLength:4,className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.lastFourDigits&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.lastFourDigits})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Color"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("input",{type:"color",value:g.color,onChange:e=>v("color",e.target.value),className:"h-10 w-20 cursor-pointer rounded-lg border border-slate-600 bg-slate-700"}),(0,a.jsx)("span",{className:"text-sm text-slate-400",children:g.color})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"D\xeda de cierre"}),(0,a.jsx)("input",{type:"number",min:1,max:31,value:g.closingDay,onChange:e=>v("closingDay",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.closingDay&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.closingDay})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"D\xeda de vencimiento"}),(0,a.jsx)("input",{type:"number",min:1,max:31,value:g.dueDay,onChange:e=>v("dueDay",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.dueDay&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.dueDay})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"L\xedmite de cr\xe9dito"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:g.creditLimit||"",onChange:e=>v("creditLimit",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.creditLimit&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.creditLimit})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Balance actual"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:g.currentBalance||"",onChange:e=>v("currentBalance",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),p.currentBalance&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:p.currentBalance})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,a.jsx)("button",{type:"button",onClick:h,className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-300 transition-colors hover:bg-slate-700",children:"Cancelar"}),(0,a.jsxs)("button",{type:"submit",className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),u?"Guardar cambios":"Crear tarjeta"]})]})]})}function x(e){var t,s;let{cardId:l,onSubmit:n,onCancel:i}=e,r=new Date().toISOString().split("T")[0],[o,u]=(0,d.useState)({description:"",amount:0,date:r,installments:void 0}),[x,h]=(0,d.useState)(!1),[g,b]=(0,d.useState)({}),p=()=>{let e={};return o.description.trim()||(e.description="La descripci\xf3n es requerida"),o.amount<=0&&(e.amount="El monto debe ser mayor a 0"),o.date||(e.date="La fecha es requerida"),x&&o.installments&&(o.installments.current<1&&(e.installmentCurrent="La cuota actual debe ser al menos 1"),o.installments.total<2&&(e.installmentTotal="El total de cuotas debe ser al menos 2"),o.installments.current>o.installments.total&&(e.installments="La cuota actual no puede ser mayor al total")),b(e),0===Object.keys(e).length},j=(e,t)=>{u(s=>({...s,[e]:t})),g[e]&&b(t=>{let s={...t};return delete s[e],s})},f=(e,t)=>{u(s=>{var a,l,n,i;return{...s,installments:{current:"current"===e?t:null!==(n=null===(a=s.installments)||void 0===a?void 0:a.current)&&void 0!==n?n:1,total:"total"===e?t:null!==(i=null===(l=s.installments)||void 0===l?void 0:l.total)&&void 0!==i?i:1}}}),b(t=>{let s={...t};return delete s["installment".concat(e.charAt(0).toUpperCase()+e.slice(1))],delete s.installments,s})};return(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p()&&n({...o,installments:x?o.installments:void 0})},className:"space-y-4 rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Registrar Pago"}),(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-full p-1 text-slate-400 transition-colors hover:bg-slate-700 hover:text-white",children:(0,a.jsx)(c.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"grid gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",value:o.description,onChange:e=>j("description",e.target.value),placeholder:"Ej: Supermercado Coto",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.description})]}),(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Monto"}),(0,a.jsx)("input",{type:"number",min:0,step:"0.01",value:o.amount||"",onChange:e=>j("amount",parseFloat(e.target.value)||0),placeholder:"0.00",className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white placeholder-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.amount&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.amount})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Fecha"}),(0,a.jsx)("input",{type:"date",value:o.date,onChange:e=>j("date",e.target.value),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.date&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.date})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-slate-700 bg-slate-700/50 p-3",children:[(0,a.jsx)("input",{type:"checkbox",id:"hasInstallments",checked:x,onChange:e=>{h(e.target.checked),e.target.checked?u(e=>({...e,installments:{current:1,total:1}})):u(e=>({...e,installments:void 0}))},className:"h-4 w-4 rounded border-slate-500 bg-slate-600 text-indigo-600 focus:ring-indigo-500"}),(0,a.jsx)("label",{htmlFor:"hasInstallments",className:"text-sm font-medium text-slate-300",children:"Este pago es en cuotas"})]}),x&&(0,a.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Cuota actual"}),(0,a.jsx)("input",{type:"number",min:1,value:(null===(t=o.installments)||void 0===t?void 0:t.current)||"",onChange:e=>f("current",parseInt(e.target.value)||1),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.installmentCurrent&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.installmentCurrent})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-sm font-medium text-slate-300",children:"Total de cuotas"}),(0,a.jsx)("input",{type:"number",min:2,value:(null===(s=o.installments)||void 0===s?void 0:s.total)||"",onChange:e=>f("total",parseInt(e.target.value)||2),className:"w-full rounded-lg border border-slate-600 bg-slate-700 px-4 py-2 text-white focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/20"}),g.installmentTotal&&(0,a.jsx)("p",{className:"mt-1 text-sm text-rose-400",children:g.installmentTotal})]})]}),g.installments&&(0,a.jsx)("p",{className:"text-sm text-rose-400",children:g.installments})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,a.jsx)("button",{type:"button",onClick:i,className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-300 transition-colors hover:bg-slate-700",children:"Cancelar"}),(0,a.jsxs)("button",{type:"submit",className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),"Registrar pago"]})]})]})}function h(e){let{card:t,selected:s=!1,onClick:l}=e;return(0,a.jsxs)("button",{type:"button",onClick:l,className:"flex w-full items-center gap-3 rounded-lg border p-3 text-left transition-all ".concat(s?"border-indigo-500 bg-indigo-500/20 ring-2 ring-indigo-500/30":"border-slate-600 bg-slate-800 hover:border-slate-500 hover:bg-slate-700"),children:[(0,a.jsx)("div",{className:"h-10 w-10 shrink-0 rounded-lg shadow-inner",style:{backgroundColor:t.color}}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate font-medium text-white",children:t.name}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:["**** ",t.lastFourDigits]})]}),s&&(0,a.jsx)("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-indigo-500",children:(0,a.jsx)(m.Z,{className:"h-4 w-4 text-white"})})]})}var g=s(4835),b=s(8226),p=s(9397);let j=(0,s(8755).Z)("receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);function f(){let{creditCards:e,cardPayments:t,currentMonth:s,currentYear:l,addCreditCard:i,updateCreditCard:c,deleteCreditCard:m,addCardPayment:f,deleteCardPayment:v}=(0,g.J)(),[N,y]=(0,d.useState)(!1),[w,k]=(0,d.useState)(null),[C,D]=(0,d.useState)(""),[S,E]=(0,d.useState)(!1),M=(0,d.useMemo)(()=>t.filter(e=>{let t=new Date(e.date);return t.getMonth()+1===s&&t.getFullYear()===l}),[t,s,l]),F=e=>{k(e),y(!0)},Z=e=>{window.confirm("\xbfEst\xe1s seguro de que deseas eliminar esta tarjeta?")&&(m(e),C===e&&(D(""),E(!1)))},L=e=>{window.confirm("\xbfEst\xe1s seguro de que deseas eliminar este pago?")&&v(e)},I=t=>e.find(e=>e.id===t),B=e=>M.filter(t=>t.cardId===e).reduce((e,t)=>e+t.amount,0);return(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-indigo-500/20",children:(0,a.jsx)(b.Z,{className:"h-5 w-5 text-indigo-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Tarjetas de Cr\xe9dito"}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:[(0,n.ZY)(s)," ",l]})]})]}),(0,a.jsxs)("button",{onClick:()=>{k(null),y(!0)},className:"flex items-center gap-2 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[(0,a.jsx)(p.Z,{className:"h-4 w-4"}),"Agregar tarjeta"]})]}),0===e.length?(0,a.jsxs)("div",{className:"rounded-xl border border-dashed border-slate-600 bg-slate-800/50 p-12 text-center",children:[(0,a.jsx)(b.Z,{className:"mx-auto h-12 w-12 text-slate-500"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-medium text-slate-300",children:"No tienes tarjetas registradas"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Agrega tu primera tarjeta para comenzar a gestionar tus pagos"}),(0,a.jsx)("button",{onClick:()=>{k(null),y(!0)},className:"mt-4 rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:"Agregar tarjeta"})]}):(0,a.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:e.map(e=>(0,a.jsx)(o,{card:e,onEdit:()=>F(e),onDelete:()=>Z(e.id)},e.id))}),N&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",children:(0,a.jsx)("div",{className:"w-full max-w-lg",children:(0,a.jsx)(u,{initialData:null!=w?w:void 0,onSubmit:e=>{w?(c(w.id,e),k(null)):i(e),y(!1)},onCancel:()=>{y(!1),k(null)}})})}),e.length>0&&(0,a.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-emerald-500/20",children:(0,a.jsx)(j,{className:"h-4 w-4 text-emerald-400"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Registrar Pago"})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium text-slate-300",children:"Seleccionar tarjeta"}),(0,a.jsx)("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:e.map(e=>(0,a.jsx)(h,{card:e,selected:C===e.id,onClick:()=>{D(e.id),E(!0)}},e.id))})]}),S&&C&&(0,a.jsx)(x,{cardId:C,onSubmit:e=>{f({cardId:C,...e}),E(!1)},onCancel:()=>{E(!1),D("")}})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-slate-800 p-6",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-amber-500/20",children:(0,a.jsx)(j,{className:"h-4 w-4 text-amber-400"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Pagos del Mes"}),(0,a.jsxs)("p",{className:"text-sm text-slate-400",children:["Total: ",(0,n.xG)(M.reduce((e,t)=>e+t.amount,0))]})]})]}),0===M.length?(0,a.jsx)("div",{className:"rounded-lg border border-dashed border-slate-600 p-8 text-center",children:(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"No hay pagos registrados este mes"})}):(0,a.jsx)("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:M.sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).map(e=>{let t=I(e.cardId);return(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-slate-700 bg-slate-700/50 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[t&&(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 rounded-md",style:{backgroundColor:t.color}}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate font-medium text-white",children:e.description}),(0,a.jsxs)("p",{className:"text-xs text-slate-400",children:[null==t?void 0:t.name," • ",(0,n.iS)(e.date),e.installments&&(0,a.jsxs)("span",{className:"ml-2 text-amber-400",children:["Cuota ",e.installments.current,"/",e.installments.total]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"font-semibold text-white",children:(0,n.xG)(e.amount)}),(0,a.jsx)("button",{onClick:()=>L(e.id),className:"rounded p-1 text-slate-400 transition-colors hover:bg-rose-500/20 hover:text-rose-400","aria-label":"Eliminar pago",children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})]})]},e.id)})}),M.length>0&&(0,a.jsxs)("div",{className:"mt-6 border-t border-slate-700 pt-4",children:[(0,a.jsx)("h4",{className:"mb-3 text-sm font-medium text-slate-300",children:"Resumen por tarjeta"}),(0,a.jsx)("div",{className:"space-y-2",children:e.map(e=>{let t=B(e.id);return 0===t?null:(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsx)("span",{className:"text-slate-300",children:e.name})]}),(0,a.jsx)("span",{className:"font-medium text-white",children:(0,n.xG)(t)})]},e.id)})})]})]})]})]})}var v=s(9294),N=s(3263);function y(){let{isOpen:e,toggle:t,close:s}=(0,v.A)(),{unreadCount:n}=(0,N.Z7)();return(0,a.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,a.jsx)(l.YE,{isOpen:e,onClose:s,unreadAlertsCount:n}),(0,a.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,a.jsx)(l.h4,{onMenuClick:t,title:"Tarjetas de Cr\xe9dito"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20",children:(0,a.jsx)(f,{})})]}),(0,a.jsx)(l.zM,{unreadAlertsCount:n})]})}},5675:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(8755).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},9397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=9174)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js b/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js new file mode 100644 index 0000000..b97d2b3 --- /dev/null +++ b/dist/_next/static/chunks/app/debts/page-28aedff94a342b70.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[273],{2799:function(e,t,a){Promise.resolve().then(a.bind(a,9220))},9220:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return k}});var s=a(7437),l=a(553),r=a(4508),n=a(401),o=a(5675),i=a(8930);let d={housing:"bg-blue-500/20 text-blue-400 border-blue-500/30",services:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",subscription:"bg-purple-500/20 text-purple-400 border-purple-500/30",other:"bg-gray-500/20 text-gray-400 border-gray-500/30"},c={shopping:"bg-pink-500/20 text-pink-400 border-pink-500/30",food:"bg-orange-500/20 text-orange-400 border-orange-500/30",entertainment:"bg-indigo-500/20 text-indigo-400 border-indigo-500/30",health:"bg-red-500/20 text-red-400 border-red-500/30",transport:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",other:"bg-gray-500/20 text-gray-400 border-gray-500/30"},u={housing:"Vivienda",services:"Servicios",subscription:"Suscripci\xf3n",shopping:"Compras",food:"Comida",entertainment:"Entretenimiento",health:"Salud",transport:"Transporte",other:"Otro"};function m(e){let{debt:t,type:a,onTogglePaid:l,onEdit:m,onDelete:x}=e,b="fixed"===a,h=b?d:c,g=h[t.category]||h.other;return(0,s.jsx)("div",{className:(0,r.cn)("group relative bg-slate-800 border border-slate-700/50 rounded-lg p-4","transition-all duration-200 hover:border-slate-600",t.isPaid&&"opacity-60"),children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("button",{onClick:l,className:(0,r.cn)("mt-1 w-5 h-5 rounded border-2 flex items-center justify-center","transition-colors duration-200",t.isPaid?"bg-emerald-500 border-emerald-500":"border-slate-500 hover:border-emerald-400"),"aria-label":t.isPaid?"Marcar como no pagada":"Marcar como pagada",children:t.isPaid&&(0,s.jsx)(n.Z,{className:"w-3 h-3 text-white"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:(0,r.cn)("text-white font-medium truncate",t.isPaid&&"line-through text-slate-400"),children:t.name}),(0,s.jsx)("p",{className:"text-slate-400 text-sm mt-0.5",children:b?"Vence d\xeda ".concat(t.dueDay):(0,r.iS)(t.date)})]}),(0,s.jsx)("span",{className:"font-mono text-emerald-400 font-semibold whitespace-nowrap",children:(0,r.xG)(t.amount)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-3",children:[(0,s.jsx)("span",{className:(0,r.cn)("inline-flex items-center px-2 py-0.5 rounded text-xs font-medium border",g),children:u[t.category]||t.category}),b&&t.isAutoDebit&&(0,s.jsx)("span",{className:"text-xs text-slate-500",children:"D\xe9bito autom\xe1tico"})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:m,className:"p-1.5 text-slate-400 hover:text-blue-400 hover:bg-blue-500/10 rounded transition-colors","aria-label":"Editar",children:(0,s.jsx)(o.Z,{className:"w-4 h-4"})}),(0,s.jsx)("button",{onClick:x,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors","aria-label":"Eliminar",children:(0,s.jsx)(i.Z,{className:"w-4 h-4"})})]})]})})}var x=a(2265),b=a(4835);let h=[{value:"housing",label:"Vivienda"},{value:"services",label:"Servicios"},{value:"subscription",label:"Suscripci\xf3n"},{value:"other",label:"Otro"}];function g(e){let{initialData:t,onSubmit:a,onCancel:l}=e,[n,o]=(0,x.useState)({name:(null==t?void 0:t.name)||"",amount:(null==t?void 0:t.amount)||0,dueDay:(null==t?void 0:t.dueDay)||1,category:(null==t?void 0:t.category)||"other",isAutoDebit:(null==t?void 0:t.isAutoDebit)||!1,notes:(null==t?void 0:t.notes)||""}),[i,d]=(0,x.useState)({}),c=()=>{let e={};return n.name.trim()||(e.name="El nombre es requerido"),n.amount<=0&&(e.amount="El monto debe ser mayor a 0"),(n.dueDay<1||n.dueDay>31)&&(e.dueDay="El d\xeda debe estar entre 1 y 31"),d(e),0===Object.keys(e).length},u=(e,t)=>{o(a=>({...a,[e]:t})),i[e]&&d(t=>{let a={...t};return delete a[e],a})};return(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()&&a(n)},className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-300 mb-1",children:["Nombre ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"name",value:n.name,onChange:e=>u("name",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.name?"border-red-500":"border-slate-600"),placeholder:"Ej: Alquiler, Internet, etc."}),i.name&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.name})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"amount",className:"block text-sm font-medium text-slate-300 mb-1",children:["Monto ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"amount",min:"0",step:"0.01",value:n.amount||"",onChange:e=>u("amount",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.amount?"border-red-500":"border-slate-600"),placeholder:"0.00"}),i.amount&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.amount})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"dueDay",className:"block text-sm font-medium text-slate-300 mb-1",children:["D\xeda de vencimiento ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"dueDay",min:"1",max:"31",value:n.dueDay,onChange:e=>u("dueDay",parseInt(e.target.value)||1),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.dueDay?"border-red-500":"border-slate-600"),placeholder:"1"}),i.dueDay&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.dueDay})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"category",className:"block text-sm font-medium text-slate-300 mb-1",children:"Categor\xeda"}),(0,s.jsx)("select",{id:"category",value:n.category,onChange:e=>u("category",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500"),children:h.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",id:"isAutoDebit",checked:n.isAutoDebit,onChange:e=>u("isAutoDebit",e.target.checked),className:"w-4 h-4 rounded border-slate-600 bg-slate-800 text-blue-500 focus:ring-blue-500/50"}),(0,s.jsx)("label",{htmlFor:"isAutoDebit",className:"text-sm text-slate-300",children:"Tiene d\xe9bito autom\xe1tico"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"notes",className:"block text-sm font-medium text-slate-300 mb-1",children:["Notas ",(0,s.jsx)("span",{className:"text-slate-500",children:"(opcional)"})]}),(0,s.jsx)("textarea",{id:"notes",rows:3,value:n.notes,onChange:e=>u("notes",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500","resize-none"),placeholder:"Notas adicionales..."})]}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,s.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:(null==t?void 0:t.id)?"Guardar cambios":"Agregar deuda"})]})]})}let p=[{value:"shopping",label:"Compras"},{value:"food",label:"Comida"},{value:"entertainment",label:"Entretenimiento"},{value:"health",label:"Salud"},{value:"transport",label:"Transporte"},{value:"other",label:"Otro"}];function f(e){let{initialData:t,onSubmit:a,onCancel:l}=e,[n,o]=(0,x.useState)({name:(null==t?void 0:t.name)||"",amount:(null==t?void 0:t.amount)||0,date:(null==t?void 0:t.date)||new Date().toISOString().split("T")[0],category:(null==t?void 0:t.category)||"other",notes:(null==t?void 0:t.notes)||""}),[i,d]=(0,x.useState)({}),c=()=>{let e={};return n.name.trim()||(e.name="El nombre es requerido"),n.amount<=0&&(e.amount="El monto debe ser mayor a 0"),n.date||(e.date="La fecha es requerida"),d(e),0===Object.keys(e).length},u=(e,t)=>{o(a=>({...a,[e]:t})),i[e]&&d(t=>{let a={...t};return delete a[e],a})};return(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()&&a(n)},className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-300 mb-1",children:["Nombre ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"name",value:n.name,onChange:e=>u("name",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.name?"border-red-500":"border-slate-600"),placeholder:"Ej: Supermercado, Cena, etc."}),i.name&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.name})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"amount",className:"block text-sm font-medium text-slate-300 mb-1",children:["Monto ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"number",id:"amount",min:"0",step:"0.01",value:n.amount||"",onChange:e=>u("amount",parseFloat(e.target.value)||0),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.amount?"border-red-500":"border-slate-600"),placeholder:"0.00"}),i.amount&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.amount})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"date",className:"block text-sm font-medium text-slate-300 mb-1",children:["Fecha ",(0,s.jsx)("span",{className:"text-red-400",children:"*"})]}),(0,s.jsx)("input",{type:"date",id:"date",value:n.date,onChange:e=>u("date",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500",i.date?"border-red-500":"border-slate-600")}),i.date&&(0,s.jsx)("p",{className:"mt-1 text-sm text-red-400",children:i.date})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"category",className:"block text-sm font-medium text-slate-300 mb-1",children:"Categor\xeda"}),(0,s.jsx)("select",{id:"category",value:n.category,onChange:e=>u("category",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500"),children:p.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{htmlFor:"notes",className:"block text-sm font-medium text-slate-300 mb-1",children:["Notas ",(0,s.jsx)("span",{className:"text-slate-500",children:"(opcional)"})]}),(0,s.jsx)("textarea",{id:"notes",rows:3,value:n.notes,onChange:e=>u("notes",e.target.value),className:(0,r.cn)("w-full px-3 py-2 bg-slate-800 border border-slate-600 rounded-lg text-white placeholder-slate-500","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500","resize-none"),placeholder:"Notas adicionales..."})]}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:(0,r.cn)("flex-1 px-4 py-2 bg-slate-700 text-slate-200 rounded-lg font-medium","hover:bg-slate-600 transition-colors"),children:"Cancelar"}),(0,s.jsx)("button",{type:"submit",className:(0,r.cn)("flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:(null==t?void 0:t.id)?"Guardar cambios":"Agregar deuda"})]})]})}var v=a(9397),j=a(1804);function N(){let[e,t]=(0,x.useState)("fixed"),[a,l]=(0,x.useState)(!1),[n,o]=(0,x.useState)(null),{fixedDebts:i,variableDebts:d,addFixedDebt:c,updateFixedDebt:u,deleteFixedDebt:h,toggleFixedDebtPaid:p,addVariableDebt:N,updateVariableDebt:y,deleteVariableDebt:w,toggleVariableDebtPaid:k}=(0,b.J)(),C="fixed"===e?i:d,D="fixed"===e?(0,r.zF)(i):(0,r.Q0)(d),S=e=>{o(e),l(!0)},E=()=>{l(!1),o(null)},F=t=>{confirm("\xbfEst\xe1s seguro de que deseas eliminar esta deuda?")&&("fixed"===e?h(t.id):w(t.id))},A=t=>{"fixed"===e?p(t.id):k(t.id)},P=C.filter(e=>e.isPaid).length,Z=C.filter(e=>!e.isPaid).length;return(0,s.jsxs)("div",{className:"bg-slate-900 min-h-screen p-6",children:[(0,s.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Deudas"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm mt-1",children:"Gestiona tus gastos fijos y variables"})]}),(0,s.jsxs)("button",{onClick:()=>{o(null),l(!0)},className:(0,r.cn)("flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg font-medium","hover:bg-blue-500 transition-colors"),children:[(0,s.jsx)(v.Z,{className:"w-4 h-4"}),"Agregar"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Total pendiente"}),(0,s.jsx)("p",{className:"text-xl font-mono font-semibold text-emerald-400 mt-1",children:(0,r.xG)(D)})]}),(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Pagadas"}),(0,s.jsx)("p",{className:"text-xl font-semibold text-blue-400 mt-1",children:P})]}),(0,s.jsxs)("div",{className:"bg-slate-800 border border-slate-700/50 rounded-lg p-4",children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Pendientes"}),(0,s.jsx)("p",{className:"text-xl font-semibold text-orange-400 mt-1",children:Z})]})]}),(0,s.jsxs)("div",{className:"flex gap-2 mb-6",children:[(0,s.jsxs)("button",{onClick:()=>t("fixed"),className:(0,r.cn)("px-4 py-2 rounded-lg font-medium transition-colors","fixed"===e?"bg-blue-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-white"),children:["Fijas (",i.length,")"]}),(0,s.jsxs)("button",{onClick:()=>t("variable"),className:(0,r.cn)("px-4 py-2 rounded-lg font-medium transition-colors","variable"===e?"bg-blue-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-white"),children:["Variables (",d.length,")"]})]}),(0,s.jsx)("div",{className:"space-y-3",children:0===C.length?(0,s.jsxs)("div",{className:"text-center py-16 bg-slate-800/50 border border-slate-700/50 rounded-lg",children:[(0,s.jsx)(j.Z,{className:"w-12 h-12 text-slate-600 mx-auto mb-4"}),(0,s.jsxs)("h3",{className:"text-lg font-medium text-slate-300",children:["No hay deudas ","fixed"===e?"fijas":"variables"]}),(0,s.jsx)("p",{className:"text-slate-500 mt-2",children:'Haz clic en "Agregar" para crear una nueva deuda'})]}):C.map(t=>(0,s.jsx)(m,{debt:t,type:e,onTogglePaid:()=>A(t),onEdit:()=>S(t),onDelete:()=>F(t)},t.id))})]}),a&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:E}),(0,s.jsx)("div",{className:"relative bg-slate-900 border border-slate-700 rounded-xl shadow-2xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-white mb-4",children:n?"Editar deuda":"fixed"===e?"Nueva deuda fija":"Nueva deuda variable"}),"fixed"===e?(0,s.jsx)(g,{initialData:n,onSubmit:e=>{(null==n?void 0:n.id)?u(n.id,e):c({...e,isPaid:!1}),E()},onCancel:E}):(0,s.jsx)(f,{initialData:n,onSubmit:e=>{(null==n?void 0:n.id)?y(n.id,e):N({...e,isPaid:!1}),E()},onCancel:E})]})})]})]})}var y=a(9294),w=a(3263);function k(){let{isOpen:e,close:t,open:a}=(0,y.A)(),{unreadCount:r}=(0,w.Z7)();return(0,s.jsxs)("div",{className:"min-h-screen bg-slate-950",children:[(0,s.jsx)(l.YE,{isOpen:e,onClose:t,unreadAlertsCount:r}),(0,s.jsxs)("div",{className:"lg:ml-64 min-h-screen flex flex-col",children:[(0,s.jsx)(l.h4,{onMenuClick:a,title:"Deudas"}),(0,s.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,s.jsx)(N,{})})]}),(0,s.jsx)(l.zM,{unreadAlertsCount:r})]})}},5675:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])}},function(e){e.O(0,[697,71,796,489,971,117,744],function(){return e(e.s=2799)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js b/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js new file mode 100644 index 0000000..66f7bd2 --- /dev/null +++ b/dist/_next/static/chunks/app/layout-639440f4d8b9b6b3.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1556:function(e,n,t){Promise.resolve().then(t.bind(t,9294)),Promise.resolve().then(t.t.bind(t,8925,23)),Promise.resolve().then(t.t.bind(t,7960,23))},9294:function(e,n,t){"use strict";t.d(n,{A:function(){return u},Providers:function(){return s}});var r=t(7437),o=t(2265);let i=(0,o.createContext)(void 0);function s(e){let{children:n}=e,[t,s]=(0,o.useState)(!0);return(0,r.jsx)(i.Provider,{value:{isOpen:t,toggle:()=>s(e=>!e),close:()=>s(!1),open:()=>s(!0)},children:n})}function u(){let e=(0,o.useContext)(i);if(void 0===e)throw Error("useSidebar must be used within a Providers");return e}},7960:function(){},8925:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}}},function(e){e.O(0,[832,971,117,744],function(){return e(e.s=1556)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js b/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js new file mode 100644 index 0000000..1c3393f --- /dev/null +++ b/dist/_next/static/chunks/app/login/page-6be400e8521677b4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{225:function(e,t,r){Promise.resolve().then(r.bind(r,6374))},6374:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var n=r(7437),a=r(2265),s=r(9376),i=r(6337),l=r(1817),o=r(4743);function c(){let[e,t]=(0,a.useState)("initial"),[r,c]=(0,a.useState)(""),[d,u]=(0,a.useState)(!1),[h,f]=(0,a.useState)(""),m=(0,s.useRouter)(),x=async()=>{u(!0),f("");try{let e=await fetch("/api/auth/send",{method:"POST"}),r=await e.json();if(!e.ok)throw Error(r.error||"Failed to send code");t("verify")}catch(e){f(e.message)}finally{u(!1)}},g=async()=>{u(!0),f("");try{let e=await fetch("/api/auth/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:r})}),t=await e.json();if(!e.ok)throw Error(t.error||"Invalid code");m.push("/"),m.refresh()}catch(e){f(e.message)}finally{u(!1)}};return(0,n.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-gray-900 text-white p-4",children:(0,n.jsxs)("div",{className:"w-full max-w-md bg-gray-800 rounded-lg shadow-xl p-8 border border-gray-700",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center mb-8",children:[(0,n.jsx)("div",{className:"bg-blue-600 p-3 rounded-full mb-4",children:(0,n.jsx)(i.Z,{className:"w-8 h-8 text-white"})}),(0,n.jsx)("h1",{className:"text-2xl font-bold",children:"Secure Access"}),(0,n.jsx)("p",{className:"text-gray-400 mt-2 text-center",children:"Finanzas Personales"})]}),h&&(0,n.jsx)("div",{className:"bg-red-900/50 border border-red-500 text-red-200 p-3 rounded mb-4 text-sm",children:h}),"initial"===e?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-gray-300 text-center text-sm",children:"Click below to receive a login code via Telegram."}),(0,n.jsxs)("button",{onClick:x,disabled:d,className:"w-full bg-blue-600 hover:bg-blue-500 text-white font-semibold py-3 px-4 rounded-lg transition flex items-center justify-center gap-2 disabled:opacity-50",children:[d?(0,n.jsx)(l.Z,{className:"animate-spin"}):(0,n.jsx)(o.Z,{size:20}),"Send Code to Telegram"]})]}):(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-gray-300 text-center text-sm",children:"Enter the 6-digit code sent to your Telegram."}),(0,n.jsx)("input",{type:"text",value:r,onChange:e=>c(e.target.value),placeholder:"123456",className:"w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-3 text-center text-2xl tracking-widest focus:outline-none focus:ring-2 focus:ring-blue-500",maxLength:6}),(0,n.jsx)("button",{onClick:g,disabled:d||r.length<4,className:"w-full bg-green-600 hover:bg-green-500 text-white font-semibold py-3 px-4 rounded-lg transition flex items-center justify-center gap-2 disabled:opacity-50",children:d?(0,n.jsx)(l.Z,{className:"animate-spin"}):"Verify & Login"}),(0,n.jsx)("button",{onClick:()=>t("initial"),className:"w-full text-gray-400 hover:text-white text-sm",children:"Cancel"})]})]})})}},8755:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(2265);let a=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),l=e=>{let t=i(e);return t.charAt(0).toUpperCase()+t.slice(1)};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},d=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:d="",children:u,iconNode:h,...f}=e;return(0,n.createElement)("svg",{ref:t,...o,width:s,height:s,stroke:r,strokeWidth:l?24*Number(i)/Number(s):i,className:a("lucide",d),...!u&&!c(f)&&{"aria-hidden":"true"},...f},[...h.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let r=(0,n.forwardRef)((r,i)=>{let{className:o,...c}=r;return(0,n.createElement)(d,{ref:i,iconNode:t,className:a("lucide-".concat(s(l(e))),"lucide-".concat(e),o),...c})});return r.displayName=l(e),r}},1817:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6337:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},4743:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(8755).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})}},function(e){e.O(0,[971,117,744],function(){return e(e.s=225)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/page-c63080d1806e3966.js b/dist/_next/static/chunks/app/page-c63080d1806e3966.js new file mode 100644 index 0000000..215253b --- /dev/null +++ b/dist/_next/static/chunks/app/page-c63080d1806e3966.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2422:function(e,t,s){Promise.resolve().then(s.bind(s,291))},291:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return M}});var a=s(7437),l=s(2265),r=s(553),n=s(525),i=s(3085),o=s(4508);function c(e){let{title:t,amount:s,subtitle:l,trend:r,icon:c,color:d="text-emerald-400"}=e;return(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-xl border border-slate-700 bg-slate-800 p-6 shadow-lg",children:[(0,a.jsx)("div",{className:(0,o.cn)("absolute right-4 top-4",d),children:(0,a.jsx)(c,{className:"h-10 w-10 opacity-80"})}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-400",children:t}),(0,a.jsx)("p",{className:"mt-2 font-mono text-3xl font-bold text-emerald-400",children:(0,o.xG)(s)}),l&&(0,a.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:l}),r&&(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-1.5",children:[r.isPositive?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-emerald-500"}),(0,a.jsxs)("span",{className:"text-sm font-medium text-emerald-500",children:["+",r.value,"%"]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-rose-500"}),(0,a.jsxs)("span",{className:"text-sm font-medium text-rose-500",children:["-",r.value,"%"]})]}),(0,a.jsx)("span",{className:"text-sm text-slate-500",children:"vs mes anterior"})]})]})]})}var d=s(3056),x=s(5224),u=s(2572),m=s(407),p=s(7719);let h={housing:"#10b981",services:"#3b82f6",subscription:"#8b5cf6",other:"#64748b",shopping:"#f59e0b",food:"#ef4444",entertainment:"#ec4899",health:"#06b6d4",transport:"#84cc16"},g={housing:"Vivienda",services:"Servicios",subscription:"Suscripciones",other:"Otros",shopping:"Compras",food:"Comida",entertainment:"Entretenimiento",health:"Salud",transport:"Transporte"};function b(e){let{fixedDebts:t,variableDebts:s}=e,l=new Map;t.filter(e=>!e.isPaid).forEach(e=>{let t=l.get(e.category)||0;l.set(e.category,t+e.amount)}),s.filter(e=>!e.isPaid).forEach(e=>{let t=l.get(e.category)||0;l.set(e.category,t+e.amount)});let r=Array.from(l.entries()).map(e=>{let[t,s]=e;return{name:g[t]||t,value:s,color:h[t]||"#64748b",category:t}}).filter(e=>e.value>0).sort((e,t)=>t.value-e.value),n=r.reduce((e,t)=>e+t.value,0);return 0===r.length?(0,a.jsx)("div",{className:"flex h-64 items-center justify-center rounded-xl border border-slate-700 bg-slate-800",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay gastos pendientes"})}):(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Distribuci\xf3n de Gastos"}),(0,a.jsxs)("div",{className:"flex flex-col gap-6 lg:flex-row",children:[(0,a.jsx)("div",{className:"h-64 w-full lg:w-1/2",children:(0,a.jsx)(d.h,{width:"100%",height:"100%",children:(0,a.jsxs)(x.u,{children:[(0,a.jsx)(u.by,{data:r,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",children:r.map((e,t)=>(0,a.jsx)(m.b,{fill:e.color},"cell-".concat(t)))}),(0,a.jsx)(p.u,{formatter:e=>"number"==typeof e?(0,o.xG)(e):e,contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",color:"#fff"}})]})})}),(0,a.jsxs)("div",{className:"flex w-full flex-col justify-center gap-3 lg:w-1/2",children:[r.map(e=>{let t=n>0?e.value/n*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"h-4 w-4 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-300",children:e.name}),(0,a.jsxs)("span",{className:"text-sm text-slate-400",children:[t.toFixed(1),"%"]})]}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:(0,o.xG)(e.value)})]})]},e.category)}),(0,a.jsx)("div",{className:"mt-4 border-t border-slate-700 pt-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-slate-400",children:"Total"}),(0,a.jsx)("span",{className:"font-mono text-lg font-bold text-emerald-400",children:(0,o.xG)(n)})]})})]})]})]})}var f=s(9397),j=s(8226),v=s(1804);function N(e){let{onAddDebt:t,onAddCard:s,onAddPayment:l}=e,r=[{label:"Agregar Deuda",icon:f.Z,onClick:t,color:"bg-emerald-500 hover:bg-emerald-600"},{label:"Nueva Tarjeta",icon:j.Z,onClick:s,color:"bg-blue-500 hover:bg-blue-600"},{label:"Registrar Pago",icon:v.Z,onClick:l,color:"bg-violet-500 hover:bg-violet-600"}];return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:r.map(e=>{let t=e.icon;return(0,a.jsxs)("button",{onClick:e.onClick,className:"\n group flex flex-col items-center gap-3 rounded-xl p-6\n transition-all duration-200 ease-out\n ".concat(e.color,"\n focus:outline-none focus:ring-2 focus:ring-white/50 focus:ring-offset-2 focus:ring-offset-slate-800\n "),children:[(0,a.jsx)("div",{className:"rounded-full bg-white/20 p-4 transition-transform group-hover:scale-110",children:(0,a.jsx)(t,{className:"h-8 w-8 text-white"})}),(0,a.jsx)("span",{className:"font-medium text-white",children:e.label})]},e.label)})})}var y=s(2568),w=s(9322),C=s(4835),k=s(3261);function S(){let{fixedDebts:e,variableDebts:t,creditCards:s,monthlyBudgets:l,alerts:r,currentMonth:n,currentYear:i}=(0,C.J)(),d=(0,o.zF)(e),x=(0,o.Q0)(t),u=s.reduce((e,t)=>e+t.currentBalance,0),m=(0,k.B0)(l,n,i),p=(0,k.FB)(e,t),h=m?m.totalIncome-p:0,g=m?m.totalIncome-p:0,f=(null==m?void 0:m.savingsGoal)||0,N=r.filter(e=>!e.isRead).slice(0,3),S={danger:"border-rose-500 bg-rose-500/10 text-rose-400",warning:"border-amber-500 bg-amber-500/10 text-amber-400",info:"border-blue-500 bg-blue-500/10 text-blue-400"};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsx)(c,{title:"Deudas Pendientes",amount:d+x,subtitle:"".concat(e.filter(e=>!e.isPaid).length+t.filter(e=>!e.isPaid).length," pagos pendientes"),icon:v.Z,color:"text-rose-400"}),(0,a.jsx)(c,{title:"Balance en Tarjetas",amount:u,subtitle:"".concat(s.length," tarjetas activas"),icon:j.Z,color:"text-blue-400"}),(0,a.jsx)(c,{title:"Presupuesto Disponible",amount:h,subtitle:m?"de ".concat(m.totalIncome.toLocaleString("es-AR",{style:"currency",currency:"ARS"})," ingresos"):"Sin presupuesto definido",icon:y.Z,color:"text-emerald-400"}),(0,a.jsx)(c,{title:"Meta de Ahorro",amount:g,subtitle:f>0?"".concat((g/f*100).toFixed(0),"% de la meta"):"Sin meta definida",icon:y.Z,color:"text-violet-400"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,a.jsx)(b,{fixedDebts:e,variableDebts:t}),(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Alertas Destacadas"}),0===N.length?(0,a.jsx)("div",{className:"flex h-48 items-center justify-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay alertas pendientes"})}):(0,a.jsx)("div",{className:"space-y-3",children:N.map(e=>(0,a.jsxs)("div",{className:(0,o.cn)("flex items-start gap-3 rounded-lg border p-4",S[e.severity]),children:[(0,a.jsx)(w.Z,{className:"mt-0.5 h-5 w-5 shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-medium",children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-sm opacity-90",children:e.message})]})]},e.id))})]})]})]})}var D=s(7580);function Z(e){let{limit:t=5}=e,{fixedDebts:s,variableDebts:l,cardPayments:r,creditCards:n}=(0,C.J)(),i=[...s.slice(0,t).map(e=>({id:e.id,type:"fixed_debt",title:e.name,amount:e.amount,date:new Date().toISOString(),description:"Vence el d\xeda ".concat(e.dueDay)})),...l.slice(0,t).map(e=>({id:e.id,type:"variable_debt",title:e.name,amount:e.amount,date:e.date,description:e.notes})),...r.slice(0,t).map(e=>{let t=n.find(t=>t.id===e.cardId);return{id:e.id,type:"card_payment",title:"Pago - ".concat((null==t?void 0:t.name)||"Tarjeta"),amount:e.amount,date:e.date,description:e.description}})].sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).slice(0,t),c={fixed_debt:{icon:v.Z,label:"Deuda Fija",color:"text-amber-400",bgColor:"bg-amber-400/10"},variable_debt:{icon:D.Z,label:"Gasto",color:"text-rose-400",bgColor:"bg-rose-400/10"},card_payment:{icon:j.Z,label:"Pago Tarjeta",color:"text-blue-400",bgColor:"bg-blue-400/10"}};return 0===i.length?(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Actividad Reciente"}),(0,a.jsx)("div",{className:"flex h-32 items-center justify-center",children:(0,a.jsx)("p",{className:"text-slate-500",children:"No hay actividad reciente"})})]}):(0,a.jsxs)("div",{className:"rounded-xl border border-slate-700 bg-slate-800 p-6",children:[(0,a.jsx)("h3",{className:"mb-4 text-lg font-semibold text-white",children:"Actividad Reciente"}),(0,a.jsx)("div",{className:"space-y-3",children:i.map(e=>{let t=c[e.type],s=t.icon;return(0,a.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-slate-700/50 bg-slate-700/30 p-4 transition-colors hover:bg-slate-700/50",children:[(0,a.jsx)("div",{className:(0,o.cn)("flex h-10 w-10 items-center justify-center rounded-full",t.bgColor),children:(0,a.jsx)(s,{className:(0,o.cn)("h-5 w-5",t.color)})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h4",{className:"truncate font-medium text-white",children:e.title}),(0,a.jsxs)("span",{className:(0,o.cn)("shrink-0 font-mono font-medium","card_payment"===e.type?"text-emerald-400":"text-rose-400"),children:["card_payment"===e.type?"+":"-",(0,o.xG)(e.amount)]})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-sm text-slate-400",children:[(0,a.jsx)("span",{className:(0,o.cn)("text-xs",t.color),children:t.label}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:(0,o.iS)(e.date)}),e.description&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{className:"truncate",children:e.description})]})]})]})]},e.id)})})]})}var A=s(9294),F=s(3263),z=s(2489),E=s(2720),P=s(1047),T=s(2934),O=s(8736);function I(e){let{isOpen:t,onClose:s}=e,[r,n]=(0,l.useState)("variable"),[i,c]=(0,l.useState)(""),[d,x]=(0,l.useState)(""),[u,m]=(0,l.useState)(new Date().toISOString().split("T")[0]),[p,h]=(0,l.useState)("1"),[g,b]=(0,l.useState)("housing"),[f,j]=(0,l.useState)("shopping"),[v,N]=(0,l.useState)(!1),[y,w]=(0,l.useState)(""),k=(0,C.J)(e=>e.addFixedDebt),S=(0,C.J)(e=>e.addVariableDebt);return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Agregar Gasto / Deuda"}),(0,a.jsx)("button",{onClick:s,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),(0,a.jsxs)("div",{className:"flex p-1 mx-6 mt-6 bg-slate-800/50 rounded-lg",children:[(0,a.jsx)("button",{onClick:()=>n("variable"),className:(0,o.cn)("flex-1 py-2 text-sm font-medium rounded-md transition-all duration-200","variable"===r?"bg-cyan-500 text-white shadow-lg":"text-slate-400 hover:text-white"),children:"Variable (\xdanico)"}),(0,a.jsx)("button",{onClick:()=>n("fixed"),className:(0,o.cn)("flex-1 py-2 text-sm font-medium rounded-md transition-all duration-200","fixed"===r?"bg-cyan-500 text-white shadow-lg":"text-slate-400 hover:text-white"),children:"Fijo (Recurrente)"})]}),(0,a.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!i||!d)return;let t=parseFloat(d);isNaN(t)||("fixed"===r?k({name:i,amount:t,dueDay:parseInt(p),category:g,isAutoDebit:v,isPaid:!1,notes:y||void 0}):S({name:i,amount:t,date:new Date(u).toISOString(),category:f,isPaid:!1,notes:y||void 0}),c(""),x(""),w(""),s())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:d,onChange:e=>x(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none transition-all placeholder:text-slate-600",required:!0,autoFocus:!0})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Supermercado Coto, Netflix, Alquiler",value:i,onChange:e=>c(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none transition-all placeholder:text-slate-600",required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(E.Z,{size:12})," Categor\xeda"]}),(0,a.jsx)("select",{value:"fixed"===r?g:f,onChange:e=>"fixed"===r?b(e.target.value):j(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none appearance-none cursor-pointer",children:"fixed"===r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("option",{value:"housing",children:"Vivienda"}),(0,a.jsx)("option",{value:"services",children:"Servicios"}),(0,a.jsx)("option",{value:"subscription",children:"Suscripciones"}),(0,a.jsx)("option",{value:"other",children:"Otro"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("option",{value:"food",children:"Comida / Super"}),(0,a.jsx)("option",{value:"shopping",children:"Compras"}),(0,a.jsx)("option",{value:"transport",children:"Transporte"}),(0,a.jsx)("option",{value:"health",children:"Salud"}),(0,a.jsx)("option",{value:"entertainment",children:"Entretenimiento"}),(0,a.jsx)("option",{value:"other",children:"Otro"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(P.Z,{size:12})," ","fixed"===r?"D\xeda Vencimiento":"Fecha"]}),"fixed"===r?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",value:p,onChange:e=>h(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]}):(0,a.jsx)("input",{type:"date",value:u,onChange:e=>m(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]})]}),"fixed"===r&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-slate-800/30 rounded-lg cursor-pointer",onClick:()=>N(!v),children:[(0,a.jsx)("div",{className:(0,o.cn)("w-5 h-5 rounded border flex items-center justify-center transition-colors",v?"bg-cyan-500 border-cyan-500":"border-slate-600 bg-transparent"),children:v&&(0,a.jsx)(T.Z,{size:14,className:"text-white"})}),(0,a.jsx)("span",{className:"text-sm text-slate-300 select-none",children:"D\xe9bito Autom\xe1tico"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(O.Z,{size:12})," Notas (Opcional)"]}),(0,a.jsx)("textarea",{value:y,onChange:e=>w(e.target.value),placeholder:"Detalles adicionales...",className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none min-h-[80px] text-sm resize-none placeholder:text-slate-600"})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsxs)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:["Agregar ","fixed"===r?"Gasto Fijo":"Gasto"]})})]})]})}):null}var R=s(2805);let _=[{name:"Slate",value:"#64748b"},{name:"Blue",value:"#3b82f6"},{name:"Cyan",value:"#06b6d4"},{name:"Emerald",value:"#10b981"},{name:"Violet",value:"#8b5cf6"},{name:"Rose",value:"#f43f5e"},{name:"Amber",value:"#f59e0b"}];function q(e){let{isOpen:t,onClose:s}=e,r=(0,C.J)(e=>e.addCreditCard),[n,i]=(0,l.useState)(""),[c,d]=(0,l.useState)(""),[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(_[1].value);return t?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsxs)("h2",{className:"text-xl font-semibold text-white flex items-center gap-2",children:[(0,a.jsx)(j.Z,{className:"text-cyan-500"})," Nueva Tarjeta"]}),(0,a.jsx)("button",{onClick:s,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n&&x&&m&&h&&(r({name:n,lastFourDigits:c||"****",closingDay:parseInt(m),dueDay:parseInt(h),currentBalance:0,creditLimit:parseFloat(x),color:b}),i(""),d(""),u(""),p(""),g(""),f(_[1].value),s())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{className:"col-span-2 space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Nombre Banco / Tarjeta"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Visa Santander",value:n,onChange:e=>i(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0,autoFocus:!0})]}),(0,a.jsxs)("div",{className:"col-span-1 space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Ult. 4 Dig."}),(0,a.jsx)("input",{type:"text",maxLength:4,placeholder:"1234",value:c,onChange:e=>d(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none text-center tracking-widest"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"L\xedmite de Cr\xe9dito"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:x,onChange:e=>u(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"D\xeda Cierre"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",placeholder:"20",value:m,onChange:e=>p(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"D\xeda Vencimiento"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"number",min:"1",max:"31",placeholder:"5",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0}),(0,a.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm",children:"del mes"})]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,a.jsx)(R.Z,{size:12})," Color de Tarjeta"]}),(0,a.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-2",children:_.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>f(e.value),className:(0,o.cn)("w-8 h-8 rounded-full border-2 transition-all",b===e.value?"border-white scale-110 shadow-lg":"border-transparent opacity-70 hover:opacity-100 hover:scale-105"),style:{backgroundColor:e.value},title:e.name},e.value))})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Crear Tarjeta"})})]})]})}):null}var G=s(8124);function J(e){var t;let{isOpen:s,onClose:r}=e,n=(0,C.J)(e=>e.creditCards),i=(0,C.J)(e=>e.addCardPayment),[c,d]=(0,l.useState)((null===(t=n[0])||void 0===t?void 0:t.id)||""),[x,u]=(0,l.useState)(""),[m,p]=(0,l.useState)(""),[h,g]=(0,l.useState)(new Date().toISOString().split("T")[0]),[b,f]=(0,l.useState)(!1),[v,N]=(0,l.useState)("1"),[y,w]=(0,l.useState)("12");return s?(!c&&n.length>0&&d(n[0].id),(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,a.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Registrar Consumo / Pago"}),(0,a.jsx)("button",{onClick:r,className:"text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(z.Z,{size:20})})]}),0===n.length?(0,a.jsxs)("div",{className:"p-8 text-center space-y-4",children:[(0,a.jsx)(j.Z,{className:"mx-auto text-slate-600 mb-2",size:48}),(0,a.jsx)("h3",{className:"text-lg font-medium text-white",children:"No tienes tarjetas registradas"}),(0,a.jsx)("p",{className:"text-slate-400",children:"Debes agregar una tarjeta antes de registrar pagos."}),(0,a.jsx)("button",{onClick:r,className:"px-4 py-2 bg-slate-800 hover:bg-slate-700 text-white rounded-lg transition",children:"Entendido"})]}):(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),x&&m&&c&&(i({cardId:c,amount:parseFloat(m),date:new Date(h).toISOString(),description:x,installments:b?{current:parseInt(v),total:parseInt(y)}:void 0}),u(""),p(""),f(!1),N("1"),w("12"),r())},className:"p-6 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Tarjeta"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[120px] overflow-y-auto pr-1",children:n.map(e=>(0,a.jsxs)("div",{onClick:()=>d(e.id),className:(0,o.cn)("cursor-pointer p-3 rounded-lg border flex items-center gap-3 transition-all",c===e.id?"border-cyan-500 bg-cyan-500/10 ring-1 ring-cyan-500":"border-slate-800 bg-slate-950 hover:border-slate-700"),children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),(0,a.jsxs)("div",{className:"flex flex-col truncate",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-white truncate",children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:["**** ",e.lastFourDigits]})]})]},e.id))})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,a.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:m,onChange:e=>p(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0,autoFocus:!0})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Descripci\xf3n"}),(0,a.jsx)("input",{type:"text",placeholder:"Ej: Cena McDonalds, Compra ML",value:x,onChange:e=>u(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none",required:!0})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-1",children:[(0,a.jsx)(P.Z,{size:12})," Fecha"]}),(0,a.jsx)("input",{type:"date",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-slate-800/30 rounded-lg cursor-pointer",onClick:()=>f(!b),children:[(0,a.jsx)("div",{className:(0,o.cn)("w-5 h-5 rounded border flex items-center justify-center transition-colors",b?"bg-cyan-500 border-cyan-500":"border-slate-600 bg-transparent"),children:b&&(0,a.jsx)(G.Z,{size:14,className:"text-white"})}),(0,a.jsx)("span",{className:"text-sm text-slate-300 select-none",children:"Es una compra en cuotas"})]}),b&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 animate-in slide-in-from-top-2",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Cuota N\xb0"}),(0,a.jsx)("input",{type:"number",min:"1",value:v,onChange:e=>N(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg text-white"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Total Cuotas"}),(0,a.jsx)("input",{type:"number",min:"1",value:y,onChange:e=>w(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg text-white"})]})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Registrar Pago"})})]})]})})):null}function M(){let e=(0,A.A)(),t=(0,C.J)(e=>e.markAlertAsRead),s=(0,C.J)(e=>e.deleteAlert),{unreadAlerts:n,unreadCount:i,regenerateAlerts:o}=(0,F.Z7)(),[c,d]=(0,l.useState)(!1),[x,u]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{o()},[o]),(0,l.useEffect)(()=>{let t=()=>{window.innerWidth>=1024?e.open():e.close()};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]);let h=n.slice(0,3);return(0,a.jsxs)("div",{className:"flex min-h-screen bg-slate-950",children:[(0,a.jsx)(r.YE,{isOpen:e.isOpen,onClose:e.close,unreadAlertsCount:i}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col lg:ml-0",children:[(0,a.jsx)(r.h4,{onMenuClick:e.toggle,title:"Dashboard"}),(0,a.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8 pb-20 lg:pb-8",children:(0,a.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[h.length>0&&(0,a.jsx)("div",{className:"space-y-3",children:h.map(e=>(0,a.jsx)(F.Y0,{alert:e,onDismiss:()=>s(e.id),onMarkRead:()=>t(e.id)},e.id))}),(0,a.jsx)(S,{}),(0,a.jsx)(N,{onAddDebt:()=>{d(!0)},onAddCard:()=>{u(!0)},onAddPayment:()=>{p(!0)}}),(0,a.jsx)(Z,{limit:5})]})})]}),(0,a.jsx)(r.zM,{unreadAlertsCount:i}),(0,a.jsx)(I,{isOpen:c,onClose:()=>d(!1)}),(0,a.jsx)(q,{isOpen:x,onClose:()=>u(!1)}),(0,a.jsx)(J,{isOpen:m,onClose:()=>p(!1)})]})}}},function(e){e.O(0,[697,71,796,838,489,971,117,744],function(){return e(e.s=2422)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js b/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js new file mode 100644 index 0000000..18a02e7 --- /dev/null +++ b/dist/_next/static/chunks/app/services/page-624950d2fabe2b7b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[469],{4427:function(e,t,a){Promise.resolve().then(a.bind(a,2406))},2406:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return v}});var s=a(7437),r=a(2265),i=a(4835),n=a(4508),l=a(8755);let d=(0,l.Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),c=(0,l.Z)("droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]),o=(0,l.Z)("flame",[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]),u=(0,l.Z)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var m=a(9397),x=a(525),h=a(3085);let g=(0,l.Z)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var f=a(2489);let b=[{id:"electricity",label:"Luz",icon:d,color:"text-yellow-400"},{id:"water",label:"Agua",icon:c,color:"text-blue-400"},{id:"gas",label:"Gas",icon:o,color:"text-orange-400"},{id:"internet",label:"Internet",icon:u,color:"text-cyan-400"}];function p(e){let{isOpen:t,onClose:a}=e,l=(0,i.J)(e=>e.addServiceBill),[d,c]=(0,r.useState)("electricity"),[o,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[h,g]=(0,r.useState)(new Date().toISOString().slice(0,7)),[p,y]=(0,r.useState)(new Date().toISOString().split("T")[0]);if(!t)return null;let v=(e=>{switch(e){case"electricity":return"kW";case"gas":case"water":return"m\xb3";default:return""}})(d),j="internet"!==d;return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4 animate-in fade-in duration-200",children:(0,s.jsxs)("div",{className:"w-full max-w-lg rounded-xl bg-slate-900 border border-slate-800 shadow-2xl overflow-hidden scale-100 animate-in zoom-in-95 duration-200",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-800",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Registrar Factura de Servicio"}),(0,s.jsx)("button",{onClick:a,className:"text-slate-400 hover:text-white transition-colors",children:(0,s.jsx)(f.Z,{size:20})})]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),o&&(l({type:d,amount:parseFloat(o),usage:m?parseFloat(m):void 0,unit:v||void 0,date:new Date(p).toISOString(),period:h,notes:""}),u(""),x(""),a())},className:"p-6 space-y-5",children:[(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:b.map(e=>{let t=e.icon,a=d===e.id;return(0,s.jsxs)("div",{onClick:()=>c(e.id),className:(0,n.cn)("cursor-pointer p-3 rounded-xl border flex flex-col items-center gap-2 transition-all",a?"border-cyan-500 bg-cyan-500/10 ring-1 ring-cyan-500":"border-slate-800 bg-slate-950 hover:border-slate-700 hover:bg-slate-900"),children:[(0,s.jsx)(t,{className:(0,n.cn)("w-6 h-6",e.color)}),(0,s.jsx)("span",{className:(0,n.cn)("text-xs font-medium",a?"text-white":"text-slate-400"),children:e.label})]},e.id)})}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:(0,n.cn)("space-y-2",!j&&"col-span-2"),children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Monto"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-semibold",children:"$"}),(0,s.jsx)("input",{type:"number",step:"0.01",placeholder:"0.00",value:o,onChange:e=>u(e.target.value),className:"w-full pl-8 pr-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none",required:!0,autoFocus:!0})]})]}),j&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:["Consumo (",v,")"]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{type:"number",step:"0.01",placeholder:"0",value:m,onChange:e=>x(e.target.value),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white text-lg font-mono outline-none"}),(0,s.jsx)("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-slate-500 text-sm font-medium",children:v})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Periodo"}),(0,s.jsx)("input",{type:"month",value:h,onChange:e=>g(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Fecha Pago"}),(0,s.jsx)("input",{type:"date",value:p,onChange:e=>y(e.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white outline-none [color-scheme:dark]",required:!0})]})]}),(0,s.jsx)("div",{className:"pt-2",children:(0,s.jsx)("button",{type:"submit",className:"w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-white font-semibold rounded-lg shadow-lg shadow-cyan-500/20 transition-all active:scale-[0.98]",children:"Guardar Factura"})})]})]})})}let y=[{id:"electricity",label:"Luz (Electricidad)",icon:d,color:"text-yellow-400",bg:"bg-yellow-400/10"},{id:"water",label:"Agua",icon:c,color:"text-blue-400",bg:"bg-blue-400/10"},{id:"gas",label:"Gas",icon:o,color:"text-orange-400",bg:"bg-orange-400/10"},{id:"internet",label:"Internet",icon:u,color:"text-cyan-400",bg:"bg-cyan-400/10"}];function v(){let e=(0,i.J)(e=>e.serviceBills),[t,a]=(0,r.useState)(!1);return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Servicios y Predicciones"}),(0,s.jsx)("p",{className:"text-slate-400 text-sm",children:"Gestiona tus consumos de Luz, Agua y Gas."})]}),(0,s.jsxs)("button",{onClick:()=>a(!0),className:"flex items-center gap-2 px-4 py-2 bg-cyan-500 hover:bg-cyan-400 text-white rounded-lg transition shadow-lg shadow-cyan-500/20 font-medium self-start sm:self-auto",children:[(0,s.jsx)(m.Z,{size:18})," Nuevo Pago"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map(t=>{var a;let r=t.icon,i=function(e,t){let a=e.filter(e=>e.type===t).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime());if(0===a.length)return 0;let s=a.slice(0,3),r=0,i=0,n=[.5,.3,.2];return s.forEach((e,t)=>{let a=n[t];i+=e.amount*a,r+=a}),i/r}(e,t.id),l=function(e,t){let a=e.filter(e=>e.type===t).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime());if(a.length<2)return 0;let s=a[0].amount,r=a.slice(1,4);if(0===r.length)return 0;let i=r.reduce((e,t)=>e+t.amount,0)/r.length;return(s-i)/i*100}(e,t.id),d=e.filter(e=>e.type===t.id).sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime())[0];return(0,s.jsxs)("div",{className:"bg-slate-900 border border-slate-800 rounded-xl p-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:(0,n.cn)("p-2 rounded-lg",t.bg),children:(0,s.jsx)(r,{className:(0,n.cn)("w-6 h-6",t.color)})}),0!==l&&(0,s.jsxs)("div",{className:(0,n.cn)("flex items-center gap-1 text-xs font-medium px-2 py-1 rounded-full",l>0?"bg-red-500/10 text-red-400":"bg-emerald-500/10 text-emerald-400"),children:[l>0?(0,s.jsx)(x.Z,{size:12}):(0,s.jsx)(h.Z,{size:12}),Math.abs(l).toFixed(0),"%"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-slate-400 text-sm font-medium",children:t.label}),(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("h3",{className:"text-2xl font-bold text-white mt-1",children:(0,n.xG)(i||(null!==(a=null==d?void 0:d.amount)&&void 0!==a?a:0))}),i>0&&(0,s.jsx)("span",{className:"text-xs text-slate-500 font-mono",children:"(est.)"})]}),(0,s.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:d?"\xdaltimo: ".concat((0,n.xG)(d.amount)):"Sin historial"})]})]},t.id)})}),(0,s.jsxs)("div",{className:"bg-slate-900 border border-slate-800 rounded-xl overflow-hidden",children:[(0,s.jsxs)("div",{className:"p-5 border-b border-slate-800 flex items-center gap-2",children:[(0,s.jsx)(g,{size:18,className:"text-slate-400"}),(0,s.jsx)("h3",{className:"text-lg font-semibold text-white",children:"Historial de Pagos"})]}),(0,s.jsx)("div",{className:"divide-y divide-slate-800",children:0===e.length?(0,s.jsx)("div",{className:"p-8 text-center text-slate-500 text-sm",children:"No hay facturas registradas. Comienza agregando una para ver predicciones."}):e.sort((e,t)=>new Date(t.date).getTime()-new Date(e.date).getTime()).map(e=>{let t=y.find(t=>t.id===e.type),a=(null==t?void 0:t.icon)||d;return(0,s.jsxs)("div",{className:"p-4 flex items-center justify-between hover:bg-slate-800/50 transition-colors",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:(0,n.cn)("p-2 rounded-lg",(null==t?void 0:t.bg)||"bg-slate-800"),children:(0,s.jsx)(a,{className:(0,n.cn)("w-5 h-5",(null==t?void 0:t.color)||"text-slate-400")})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-white font-medium capitalize",children:(null==t?void 0:t.label)||e.type}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-slate-500 capitalize",children:new Date(e.date).toLocaleDateString("es-AR",{dateStyle:"long"})}),e.usage&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"hidden sm:inline text-slate-700",children:"•"}),(0,s.jsxs)("p",{className:"text-xs text-slate-400",children:["Consumo: ",(0,s.jsxs)("span",{className:"text-slate-300 font-medium",children:[e.usage," ",e.unit]})]})]})]})]})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("p",{className:"text-white font-mono font-medium",children:(0,n.xG)(e.amount)}),(0,s.jsxs)("div",{className:"flex flex-col items-end",children:[(0,s.jsx)("p",{className:"text-xs text-slate-500 uppercase",children:e.period}),e.usage&&e.amount&&(0,s.jsxs)("p",{className:"text-[10px] text-cyan-500/80 font-mono",children:[(0,n.xG)(e.amount/e.usage)," / ",e.unit]})]})]})]},e.id)})})]}),(0,s.jsx)(p,{isOpen:t,onClose:()=>a(!1)})]})}},4835:function(e,t,a){"use strict";a.d(t,{J:function(){return m}});var s=a(3011),r=a(6885),i=a(4147);let n=e=>({fixedDebts:[],variableDebts:[],addFixedDebt:t=>e(e=>({fixedDebts:[...e.fixedDebts,{...t,id:(0,i.Z)()}]})),updateFixedDebt:(t,a)=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteFixedDebt:t=>e(e=>({fixedDebts:e.fixedDebts.filter(e=>e.id!==t)})),toggleFixedDebtPaid:t=>e(e=>({fixedDebts:e.fixedDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)})),addVariableDebt:t=>e(e=>({variableDebts:[...e.variableDebts,{...t,id:(0,i.Z)()}]})),updateVariableDebt:(t,a)=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,...a}:e)})),deleteVariableDebt:t=>e(e=>({variableDebts:e.variableDebts.filter(e=>e.id!==t)})),toggleVariableDebtPaid:t=>e(e=>({variableDebts:e.variableDebts.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),l=e=>({creditCards:[],cardPayments:[],addCreditCard:t=>e(e=>({creditCards:[...e.creditCards,{...t,id:(0,i.Z)()}]})),updateCreditCard:(t,a)=>e(e=>({creditCards:e.creditCards.map(e=>e.id===t?{...e,...a}:e)})),deleteCreditCard:t=>e(e=>({creditCards:e.creditCards.filter(e=>e.id!==t)})),addCardPayment:t=>e(e=>({cardPayments:[...e.cardPayments,{...t,id:(0,i.Z)()}]})),deleteCardPayment:t=>e(e=>({cardPayments:e.cardPayments.filter(e=>e.id!==t)}))}),d=new Date,c=e=>({monthlyBudgets:[],currentMonth:d.getMonth()+1,currentYear:d.getFullYear(),setMonthlyBudget:t=>e(e=>{let a=e.monthlyBudgets.findIndex(e=>e.month===t.month&&e.year===t.year);if(a>=0){let s=[...e.monthlyBudgets];return s[a]=t,{monthlyBudgets:s}}return{monthlyBudgets:[...e.monthlyBudgets,t]}}),updateMonthlyBudget:(t,a,s)=>e(e=>({monthlyBudgets:e.monthlyBudgets.map(e=>e.month===t&&e.year===a?{...e,...s}:e)}))}),o=e=>({alerts:[],addAlert:t=>e(e=>({alerts:[...e.alerts,{...t,id:(0,i.Z)(),date:new Date().toISOString()}]})),markAlertAsRead:t=>e(e=>({alerts:e.alerts.map(e=>e.id===t?{...e,isRead:!0}:e)})),deleteAlert:t=>e(e=>({alerts:e.alerts.filter(e=>e.id!==t)})),clearAllAlerts:()=>e(()=>({alerts:[]}))}),u=e=>({serviceBills:[],addServiceBill:t=>e(e=>({serviceBills:[...e.serviceBills,{...t,id:(0,i.Z)(),isPaid:!1}]})),deleteServiceBill:t=>e(e=>({serviceBills:e.serviceBills.filter(e=>e.id!==t)})),toggleServiceBillPaid:t=>e(e=>({serviceBills:e.serviceBills.map(e=>e.id===t?{...e,isPaid:!e.isPaid}:e)}))}),m=(0,s.U)()((0,r.tJ)(function(){for(var e=arguments.length,t=Array(e),a=0;ae&&(n+=1)>11&&(n=0,i+=1);let l=new Date(i,n+1,0).getDate();return new Date(i,n,Math.min(e,l))}function o(e){if(e<1||e>12)throw Error("El mes debe estar entre 1 y 12");return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][e-1]}function u(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function m(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function x(e,t){return(t?e.filter(e=>e.cardId===t):e).reduce((e,t)=>e+t.amount,0)}function h(e){return c(e)}function g(e){return c(e)}function f(e,t){return t<=0?0:Math.min(Math.max(e/t*100,0),100)}},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},3085:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]])},525:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(8755).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])}},function(e){e.O(0,[697,71,971,117,744],function(){return e(e.s=4427)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js b/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js new file mode 100644 index 0000000..e8edcae --- /dev/null +++ b/dist/_next/static/chunks/app/settings/page-88d3fd0faab66996.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{5417:function(e,t,a){Promise.resolve().then(a.bind(a,9879))},9879:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return j}});var r=a(7437),s=a(2265),n=a(8755);let l=(0,n.Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var i=a(2934);let o=(0,n.Z)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),c=(0,n.Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var d=a(1817),u=a(4743);let p=(0,n.Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),m=(0,n.Z)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var x=a(9397);let h=(0,n.Z)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var g=a(8930),y=a(6337);let f=(0,n.Z)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),b=(0,n.Z)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var v=a(4508);function j(){let[e,t]=(0,s.useState)(!0),[a,n]=(0,s.useState)(!1),[j,k]=(0,s.useState)({telegram:{botToken:"",chatId:""},aiProviders:[]}),[w,N]=(0,s.useState)(null),[M,Z]=(0,s.useState)(!1),[z,C]=(0,s.useState)(null),[P,T]=(0,s.useState)(null),[E,D]=(0,s.useState)({});(0,s.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{k(e),t(!1)}).catch(e=>{console.error(e),t(!1),N({text:"Error cargando configuraci\xf3n",type:"error"})})},[]);let S=async()=>{n(!0),N(null);try{if(!(await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})).ok)throw Error("Error saving");N({text:"Configuraci\xf3n guardada correctamente",type:"success"})}catch(e){N({text:"Error al guardar la configuraci\xf3n",type:"error"})}finally{n(!1)}},I=async()=>{Z(!0),N(null);try{let e=await fetch("/api/test/telegram",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j.telegram)}),t=await e.json();t.success?N({text:"Mensaje de prueba enviado con \xe9xito ✅",type:"success"}):N({text:"Error: ".concat(t.error),type:"error"})}catch(e){N({text:"Error de conexi\xf3n al probar Telegram",type:"error"})}finally{Z(!1)}},A=async e=>{C(e.id),N(null);try{let t=await fetch("/api/test/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();a.success?N({text:"Conexi\xf3n exitosa con ".concat(e.model||e.name," (").concat(a.latency,"ms) ✅"),type:"success"}):N({text:"Error con ".concat(e.name,": ").concat(a.error),type:"error"})}catch(e){N({text:"Error al conectar con el proveedor",type:"error"})}finally{C(null)}},F=async e=>{T(e.id),N(null);try{let t=await fetch("/api/proxy/models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:e.endpoint,token:e.token})}),a=await t.json();a.success&&a.models.length>0?(D(t=>({...t,[e.id]:a.models})),e.model||q(e.id,"model",a.models[0]),N({text:"Se detectaron ".concat(a.models.length," modelos ✅"),type:"success"})):N({text:"No se pudieron detectar modelos. Ingr\xe9salo manualmente.",type:"error"})}catch(e){console.error(e),N({text:"Error al consultar modelos",type:"error"})}finally{T(null)}},O=e=>{k(t=>({...t,aiProviders:t.aiProviders.filter(t=>t.id!==e)}))},q=(e,t,a)=>{k(r=>({...r,aiProviders:r.aiProviders.map(r=>r.id===e?{...r,[t]:a}:r)}))};return e?(0,r.jsx)("div",{className:"p-8 text-center text-slate-400",children:"Cargando configuraci\xf3n..."}):(0,r.jsxs)("div",{className:"max-w-4xl mx-auto space-y-8 pb-10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Configuraci\xf3n"}),(0,r.jsx)("p",{className:"text-slate-400 text-sm",children:"Gestiona la integraci\xf3n con Telegram e Inteligencia Artificial."})]}),(0,r.jsxs)("button",{onClick:S,disabled:a,className:"flex items-center gap-2 px-6 py-2 bg-emerald-500 hover:bg-emerald-400 text-white rounded-lg transition shadow-lg shadow-emerald-500/20 font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(l,{size:18}),a?"Guardando...":"Guardar Cambios"]})]}),w&&(0,r.jsxs)("div",{className:(0,v.cn)("p-4 rounded-lg text-sm font-medium border flex items-center gap-2 animate-in fade-in slide-in-from-top-2","success"===w.type?"bg-emerald-500/10 border-emerald-500/20 text-emerald-400":"bg-red-500/10 border-red-500/20 text-red-400"),children:["success"===w.type?(0,r.jsx)(i.Z,{size:18}):(0,r.jsx)(o,{size:18}),w.text]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-white border-b border-slate-800 pb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c,{className:"text-cyan-400"}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Telegram Bot"})]}),(0,r.jsxs)("button",{onClick:I,disabled:M||!j.telegram.botToken||!j.telegram.chatId,className:"text-xs flex items-center gap-1.5 bg-cyan-500/10 hover:bg-cyan-500/20 text-cyan-400 border border-cyan-500/20 px-3 py-1.5 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed",children:[M?(0,r.jsx)(d.Z,{size:14,className:"animate-spin"}):(0,r.jsx)(u.Z,{size:14}),"Probar Env\xedo"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-slate-900 border border-slate-800 rounded-xl",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(p,{size:12})," Bot Token"]}),(0,r.jsx)("input",{type:"text",placeholder:"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",value:j.telegram.botToken,onChange:e=>k({...j,telegram:{...j.telegram,botToken:e.target.value}}),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700"}),(0,r.jsx)("p",{className:"text-[10px] text-slate-500",children:"El token que te da @BotFather."})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(m,{size:12})," Chat ID"]}),(0,r.jsx)("input",{type:"text",placeholder:"123456789",value:j.telegram.chatId,onChange:e=>k({...j,telegram:{...j.telegram,chatId:e.target.value}}),className:"w-full px-4 py-3 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-cyan-500/50 focus:border-cyan-500 text-white font-mono text-sm outline-none transition-all placeholder:text-slate-700"}),(0,r.jsx)("p",{className:"text-[10px] text-slate-500",children:"Tu ID num\xe9rico de Telegram (o el ID del grupo)."})]})]})]}),(0,r.jsxs)("section",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-white border-b border-slate-800 pb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(c,{className:"text-purple-400"}),(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Proveedores de IA"})]}),(0,r.jsxs)("button",{onClick:()=>{j.aiProviders.length>=3||k(e=>({...e,aiProviders:[...e.aiProviders,{id:crypto.randomUUID(),name:"",endpoint:"",token:"",model:""}]}))},disabled:j.aiProviders.length>=3,className:"text-xs flex items-center gap-1 bg-slate-800 hover:bg-slate-700 text-slate-200 px-3 py-1.5 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(x.Z,{size:14})," Agregar Provider (",j.aiProviders.length,"/3)"]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[0===j.aiProviders.length&&(0,r.jsx)("div",{className:"p-8 text-center text-slate-500 border border-dashed border-slate-800 rounded-xl",children:"No hay proveedores de IA configurados. Agrega uno para empezar."}),j.aiProviders.map((e,t)=>(0,r.jsxs)("div",{className:"p-6 bg-slate-900 border border-slate-800 rounded-xl relative group",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,r.jsxs)("h3",{className:"text-sm font-semibold text-slate-300 bg-slate-950 inline-block px-3 py-1 rounded-md border border-slate-800",children:["Provider #",t+1]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{onClick:()=>A(e),disabled:z===e.id||!e.endpoint||!e.token||!e.model,className:(0,v.cn)("text-xs flex items-center gap-1 bg-slate-800 hover:bg-slate-700 text-purple-300 border border-purple-500/20 px-2 py-1.5 rounded-lg transition disabled:opacity-50",!e.model&&"opacity-50"),title:"Verificar conexi\xf3n",children:[z===e.id?(0,r.jsx)(d.Z,{size:12,className:"animate-spin"}):(0,r.jsx)(h,{size:12}),"Test"]}),(0,r.jsx)("button",{onClick:()=>O(e.id),className:"text-slate-500 hover:text-red-400 transition-colors p-1.5 hover:bg-red-500/10 rounded-lg",title:"Eliminar",children:(0,r.jsx)(g.Z,{size:16})})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Nombre"}),(0,r.jsx)("input",{type:"text",placeholder:"Ej: MiniMax, Z.ai",value:e.name,onChange:t=>q(e.id,"name",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(h,{size:12})," Endpoint URL"]}),(0,r.jsx)("input",{type:"text",placeholder:"https://api.example.com/v1",value:e.endpoint,onChange:t=>q(e.id,"endpoint",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(y.Z,{size:12})," API Key / Token"]}),(0,r.jsx)("input",{type:"password",placeholder:"sk-...",value:e.token,onChange:t=>q(e.id,"token",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsxs)("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[(0,r.jsx)(f,{size:12})," Model"]}),(0,r.jsxs)("button",{onClick:()=>F(e),disabled:P===e.id||!e.endpoint||!e.token,className:"text-[10px] flex items-center gap-1 text-cyan-400 hover:text-cyan-300 disabled:opacity-50",children:[P===e.id?(0,r.jsx)(d.Z,{size:10,className:"animate-spin"}):(0,r.jsx)(b,{size:10}),"Auto Detectar"]})]}),E[e.id]?(0,r.jsxs)("select",{value:e.model||"",onChange:t=>q(e.id,"model",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white text-sm outline-none",children:[(0,r.jsx)("option",{value:"",disabled:!0,children:"Selecciona un modelo"}),E[e.id].map(e=>(0,r.jsx)("option",{value:e,children:e},e))]}):(0,r.jsx)("input",{type:"text",placeholder:"Ej: gpt-3.5-turbo, glm-4",value:e.model||"",onChange:t=>q(e.id,"model",t.target.value),className:"w-full px-4 py-2.5 bg-slate-950 border border-slate-800 rounded-lg focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-white font-mono text-sm outline-none"})]})]})]},e.id))]})]})]})}},4508:function(e,t,a){"use strict";a.d(t,{Ic:function(){return m},JG:function(){return c},P8:function(){return o},PW:function(){return h},Q0:function(){return p},ZY:function(){return d},cn:function(){return n},iS:function(){return i},tk:function(){return x},w7:function(){return g},xG:function(){return l},zF:function(){return u}});var r=a(1994),s=a(3335);function n(){for(var e=arguments.length,t=Array(e),a=0;ae&&(l+=1)>11&&(l=0,n+=1);let i=new Date(n,l+1,0).getDate();return new Date(n,l,Math.min(e,i))}function d(e){if(e<1||e>12)throw Error("El mes debe estar entre 1 y 12");return["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"][e-1]}function u(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function p(e){return e.filter(e=>!e.isPaid).reduce((e,t)=>e+t.amount,0)}function m(e,t){return(t?e.filter(e=>e.cardId===t):e).reduce((e,t)=>e+t.amount,0)}function x(e){return c(e)}function h(e){return c(e)}function g(e,t){return t<=0?0:Math.min(Math.max(e/t*100,0),100)}},2934:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1817:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6337:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},9397:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},4743:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},8930:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});let r=(0,a(8755).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])}},function(e){e.O(0,[697,971,117,744],function(){return e(e.s=5417)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js b/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js new file mode 100644 index 0000000..8d43e3f --- /dev/null +++ b/dist/_next/static/chunks/fd9d1056-307a36020502e7d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[971],{4417:function(e,t,n){var r,l=n(2265),a=n(1767),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){var t="https://react.dev/errors/"+e;if(1p||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),B={$$typeof:E,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null};function V(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?s2(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=s3(e=s2(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function Q(){h(D),h(A),h(I)}function $(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=s3(t,e.type);t!==n&&(g(A,e),g(D,n))}function j(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),B._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=a.log,er=a.unstable_setDisableYieldValue,el=null,ea=null;function eo(e){if("function"==typeof en&&er(e),ea&&"function"==typeof ea.setStrictMode)try{ea.setStrictMode(el,e)}catch(e){}}var ei=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eu(e)/es|0)|0},eu=Math.log,es=Math.LN2,ec=128,ef=4194304;function ed(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ep(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=ed(n):0!=(e&=a)&&(r=ed(e)):0!=(n&=~l)?r=ed(n):0!==e&&(r=ed(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function em(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function eh(){var e=ec;return 0==(4194176&(ec<<=1))&&(ec=128),e}function eg(){var e=ef;return 0==(62914560&(ef<<=1))&&(ef=4194304),e}function ey(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ev(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ei(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eb(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ei(n),l=1<l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eG=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eX(n):""}function eJ(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return eX(e.type);case 16:return eX("Lazy");case 13:return eX("Suspense");case 19:return eX("SuspenseList");case 0:case 2:case 15:return e=eZ(e.type,!1);case 11:return e=eZ(e.type.render,!1);case 1:return e=eZ(e.type,!0);default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var e0=Symbol.for("react.client.reference");function e1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e2(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e3(e){e._valueTracker||(e._valueTracker=function(e){var t=e2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e2(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e6(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e8=/[\n"\\]/g;function e5(e){return e.replace(e8,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e7(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e1(t)):e.value!==""+e1(t)&&(e.value=""+e1(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?te(e,o,e1(t)):null!=n?te(e,o,e1(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+e1(i):e.removeAttribute("name")}function e9(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+e1(n):"",t=null!=t?""+e1(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function te(e,t,n){"number"===t&&e6(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var tt=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=iX.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var to=ta;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(to=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return ta(e,t)})});var ti=to;function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ts=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tc(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ts.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function tf(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&tc(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&tc(e,a,t[a])}function td(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tm=null;function th(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tg=null,ty=null;function tv(e){var t=eO(e);if(t&&(e=t.stateNode)){var n=eD(e);switch(e=t.stateNode,t.type){case"input":if(e7(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e5(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,tj=1<<32-ei(t)+l|n<h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tZ&&tH(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tZ&&tH(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tZ&&tH(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tZ&&tH(l,g),c}(s,c,f,h);if("function"==typeof f.then)return u(s,c,nJ(f),h);if(f.$$typeof===E)return u(s,c,ai(s,f,h),h);n1(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(n(s,c.sibling),(c=l(c,f)).return=s):(n(s,c),(c=i_(f,s.mode,h)).return=s),o(s=c)):n(s,c)}(u,s,c,f),nG=null,u}}var n4=n3(!0),n6=n3(!1),n8=m(null),n5=m(0);function n7(e,t){g(n5,e=oz),g(n8,t),oz=e|t.baseLanes}function n9(){g(n5,oz),g(n8,n8.current)}function re(){oz=n5.current,h(n8),h(n5)}var rt=m(null),rn=null;function rr(e){var t=e.alternate;g(ri,1&ri.current),g(rt,e),null===rn&&(null===t||null!==n8.current?rn=e:null!==t.memoizedState&&(rn=e))}function rl(e){if(22===e.tag){if(g(ri,ri.current),g(rt,e),null===rn){var t=e.alternate;null!==t&&null!==t.memoizedState&&(rn=e)}}else ra(e)}function ra(){g(ri,ri.current),g(rt,rt.current)}function ro(e){h(rt),rn===e&&(rn=null),h(ri)}var ri=m(0);function ru(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=s.ReactCurrentDispatcher,rc=s.ReactCurrentBatchConfig,rf=0,rd=null,rp=null,rm=null,rh=!1,rg=!1,ry=!1,rv=0,rb=0,rk=null,rw=0;function rS(){throw Error(i(321))}function rC(e,t){if(null===t)return!1;for(var n=0;na?a:8;var o=rc.transition,i={_callbacks:new Set};rc.transition=i,lf(e,!1,t,n);try{var u=l();if(null!==u&&"object"==typeof u&&"function"==typeof u.then){av(i,u);var s,c,f=(s=[],c={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},u.then(function(){c.status="fulfilled",c.value=r;for(var e=0;e title"))),sG(l,n,r),l[eE]=e,eI(l),n=l;break e;case"link":var a=cE("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[eE]=t,e[ex]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,sG(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&aC(t)}}return aP(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t9(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[eE]=t,(r=e.nodeValue!==n)&&null!==(l=tX))switch(l.tag){case 3:if(l=0!=(1&l.mode),sq(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sq(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&aC(t)}else(e=s1(e).createTextNode(r))[eE]=t,t.stateNode=e}return aP(t),null;case 13:if(ro(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tZ&&null!==tG&&0!=(1&t.mode)&&0==(128&t.flags))ne(),nt(),t.flags|=384,l=!1;else if(l=t9(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[eE]=t}else nt(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;aP(t),l=!1}else null!==tJ&&(o0(tJ),tJ=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ax(t,t.updateQueue),aP(t),null;case 4:return Q(),null===e&&sA(t.stateNode.containerInfo),aP(t),null;case 10:return an(t.type._context),aP(t),null;case 19:if(h(ri),null===(l=t.memoizedState))return aP(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)az(l,!1);else{if(0!==oP||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ru(e))){for(t.flags|=128,az(l,!1),e=a.updateQueue,t.updateQueue=e,ax(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)ix(n,e),n=n.sibling;return g(ri,1&ri.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>oI&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=ru(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ax(t,e),az(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tZ)return aP(t),null}else 2*Y()-l.renderingStartTime>oI&&536870912!==n&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=ri.current,g(ri,r?1&e|2:1&e),t;return aP(t),null;case 22:case 23:return ro(t),re(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(aP(t),6&t.subtreeFlags&&(t.flags|=8192)):aP(t),null!==(n=t.updateQueue)&&ax(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(ab),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(ad),aP(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,oz);if(null!==n){ow=n;return}if(null!==(t=t.sibling)){ow=t;return}ow=t=e}while(null!==t);0===oP&&(oP=5)}function is(e,t,n,r,l){var a=ek,o=ov.transition;try{ov.transition=null,ek=2,function(e,t,n,r,l,a){do id();while(null!==oj);if(0!=(6&ob))throw Error(i(327));var o,u=e.finishedWork,s=e.finishedLanes;if(null!==u){if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=si(n,a);var o=si(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=ov.transition;var l=ek;try{if(ov.transition=null,ek=r,null===oj)var a=!1;else{r=oq,oq=null;var o=oj,u=oW;if(oj=null,oW=0,0!=(6&ob))throw Error(i(331));var s=ob;if(ob|=4,of(o.current),ol(o,o.current,u,r),ob=s,nb(!1),ea&&"function"==typeof ea.onPostCommitFiberRoot)try{ea.onPostCommitFiberRoot(el,o)}catch(e){}a=!0}return a}finally{ek=l,ov.transition=n,ic(e,t)}}return!1}function ip(e,t,n){t=lL(e,t=lP(n,t),2),null!==(e=nO(e,t,2))&&(o2(e,2),nv(e))}function im(e,t,n){if(3===e.tag)ip(e,e,n);else for(;null!==t;){if(3===t.tag){ip(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oQ||!oQ.has(r))){e=lT(t,e=lP(n,e),2),null!==(t=nO(t,e,2))&&(o2(t,2),nv(t));break}}t=t.return}}function ih(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new om;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ox=!0,l.add(n),e=ig.bind(null,e,t,n),t.then(e,e))}function ig(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,2&ob?oR=!0:4&ob&&(oD=!0),ik(),ok===e&&(oS&n)===n&&(4===oP||3===oP&&(62914560&oS)===oS&&300>Y()-oA?0==(2&ob)&&o5(e,0):oT|=n),nv(e)}function iy(e,t){0===t&&(t=0==(1&e.mode)?2:eg()),null!==(e=ns(e,t))&&(o2(e,t),nv(e))}function iv(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iy(e,n)}function ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),iy(e,n)}function ik(){if(50=uH),uY=!1;function uX(e,t){switch(e){case"keyup":return -1!==uj.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uG(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uZ=!1,uJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function u0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uJ[e.type]:"textarea"===t}function u1(e,t,n,r){tb(r),0<(t=sV(t,"onChange")).length&&(n=new i3("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var u2=null,u3=null;function u4(e){sM(e,0)}function u6(e){if(e4(eR(e)))return e}function u8(e,t){if("change"===e)return t}var u5=!1;if(e$){if(e$){var u7="oninput"in document;if(!u7){var u9=document.createElement("div");u9.setAttribute("oninput","return;"),u7="function"==typeof u9.oninput}r=u7}else r=!1;u5=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=so(r)}}function su(){for(var e=window,t=e6();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e6(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sc=e$&&"documentMode"in document&&11>=document.documentMode,sf=null,sd=null,sp=null,sm=!1;function sh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sm||null==sf||sf!==e6(r)||(r="selectionStart"in(r=sf)&&ss(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sp&&nQ(sp,r)||(sp=r,0<(r=sV(sd,"onSelect")).length&&(t=new i3("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sf)))}function sg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sy={animationend:sg("Animation","AnimationEnd"),animationiteration:sg("Animation","AnimationIteration"),animationstart:sg("Animation","AnimationStart"),transitionend:sg("Transition","TransitionEnd")},sv={},sb={};function sk(e){if(sv[e])return sv[e];if(!sy[e])return e;var t,n=sy[e];for(t in n)if(n.hasOwnProperty(t)&&t in sb)return sv[e]=n[t];return e}e$&&(sb=document.createElement("div").style,"AnimationEvent"in window||(delete sy.animationend.animation,delete sy.animationiteration.animation,delete sy.animationstart.animation),"TransitionEvent"in window||delete sy.transitionend.transition);var sw=sk("animationend"),sS=sk("animationiteration"),sC=sk("animationstart"),sE=sk("transitionend"),sx=new Map,sz="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sP(e,t){sx.set(e,t),eV(t,[e])}for(var sN=0;sN title"):null)}var cz=null;function cP(){}function cN(){if(this.count--,0===this.count){if(this.stylesheets)cL(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c_=null;function cL(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c_=new Map,t.forEach(cT,e),c_=null,cN.call(e))}function cT(e,t){if(!(4&t.state.loading)){var n=c_.get(e);if(n)var r=n.get(null);else{n=new Map,c_.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a