diff --git a/dashboard-frontend/src/App.tsx b/dashboard-frontend/src/App.tsx index b313ef7..25efb1d 100644 --- a/dashboard-frontend/src/App.tsx +++ b/dashboard-frontend/src/App.tsx @@ -5,18 +5,21 @@ import Mesh from './pages/Mesh' import Environment from './pages/Environment' import Config from './pages/Config' import Alerts from './pages/Alerts' +import { ToastProvider } from './components/ToastProvider' function App() { return ( - - - } /> - } /> - } /> - } /> - } /> - - + + + + } /> + } /> + } /> + } /> + } /> + + + ) } diff --git a/dashboard-frontend/src/components/Layout.tsx b/dashboard-frontend/src/components/Layout.tsx index c620da8..b61bbe9 100644 --- a/dashboard-frontend/src/components/Layout.tsx +++ b/dashboard-frontend/src/components/Layout.tsx @@ -1,162 +1,176 @@ -import { ReactNode, useEffect, useState } from 'react' -import { Link, useLocation } from 'react-router-dom' -import { - LayoutDashboard, - Radio, - Cloud, - Settings, - Bell, -} from 'lucide-react' -import { fetchStatus, type SystemStatus } from '@/lib/api' -import { useWebSocket } from '@/hooks/useWebSocket' - -interface LayoutProps { - children: ReactNode -} - -const navItems = [ - { path: '/', label: 'Dashboard', icon: LayoutDashboard }, - { path: '/mesh', label: 'Mesh', icon: Radio }, - { path: '/environment', label: 'Environment', icon: Cloud }, - { path: '/config', label: 'Config', icon: Settings }, - { path: '/alerts', label: 'Alerts', icon: Bell }, -] - -function formatUptime(seconds: number): string { - const days = Math.floor(seconds / 86400) - const hours = Math.floor((seconds % 86400) / 3600) - const mins = Math.floor((seconds % 3600) / 60) - - if (days > 0) return `${days}d ${hours}h` - if (hours > 0) return `${hours}h ${mins}m` - return `${mins}m` -} - -function getPageTitle(pathname: string): string { - const item = navItems.find((i) => i.path === pathname) - return item?.label || 'Dashboard' -} - -export default function Layout({ children }: LayoutProps) { - const location = useLocation() - const { connected } = useWebSocket() - const [status, setStatus] = useState(null) - const [currentTime, setCurrentTime] = useState(new Date()) - - useEffect(() => { - fetchStatus().then(setStatus).catch(console.error) - const interval = setInterval(() => { - fetchStatus().then(setStatus).catch(console.error) - }, 30000) - return () => clearInterval(interval) - }, []) - - useEffect(() => { - const interval = setInterval(() => setCurrentTime(new Date()), 1000) - return () => clearInterval(interval) - }, []) - - const timeStr = currentTime.toLocaleTimeString('en-US', { - hour12: false, - hour: '2-digit', - minute: '2-digit', - second: '2-digit', - }) - - return ( -
- {/* Sidebar */} - - - {/* Main content */} -
- {/* Header */} -
-

- {getPageTitle(location.pathname)} -

-
- {/* Live indicator */} -
-
- - {connected ? 'Live' : 'Offline'} - -
- {/* Clock */} -
- {timeStr} MT -
-
-
- - {/* Page content */} -
{children}
-
-
- ) -} +import { ReactNode, useEffect, useState } from 'react' +import { Link, useLocation } from 'react-router-dom' +import { + LayoutDashboard, + Radio, + Cloud, + Settings, + Bell, +} from 'lucide-react' +import { fetchStatus, type SystemStatus } from '@/lib/api' +import { useWebSocket } from '@/hooks/useWebSocket' +import { useToast } from './ToastProvider' + +interface LayoutProps { + children: ReactNode +} + +const navItems = [ + { path: '/', label: 'Dashboard', icon: LayoutDashboard }, + { path: '/mesh', label: 'Mesh', icon: Radio }, + { path: '/environment', label: 'Environment', icon: Cloud }, + { path: '/config', label: 'Config', icon: Settings }, + { path: '/alerts', label: 'Alerts', icon: Bell }, +] + +function formatUptime(seconds: number): string { + const days = Math.floor(seconds / 86400) + const hours = Math.floor((seconds % 86400) / 3600) + const mins = Math.floor((seconds % 3600) / 60) + + if (days > 0) return `${days}d ${hours}h` + if (hours > 0) return `${hours}h ${mins}m` + return `${mins}m` +} + +function getPageTitle(pathname: string): string { + const item = navItems.find((i) => i.path === pathname) + return item?.label || 'Dashboard' +} + +export default function Layout({ children }: LayoutProps) { + const location = useLocation() + const { connected, lastAlert } = useWebSocket() + const { addToast } = useToast() + const [status, setStatus] = useState(null) + const [lastAlertId, setLastAlertId] = useState(null) + + // Trigger toast on new alerts + useEffect(() => { + if (lastAlert) { + const alertId = `${lastAlert.type}-${lastAlert.message}-${lastAlert.timestamp}` + if (alertId !== lastAlertId) { + setLastAlertId(alertId) + addToast(lastAlert) + } + } + }, [lastAlert, lastAlertId, addToast]) + const [currentTime, setCurrentTime] = useState(new Date()) + + useEffect(() => { + fetchStatus().then(setStatus).catch(console.error) + const interval = setInterval(() => { + fetchStatus().then(setStatus).catch(console.error) + }, 30000) + return () => clearInterval(interval) + }, []) + + useEffect(() => { + const interval = setInterval(() => setCurrentTime(new Date()), 1000) + return () => clearInterval(interval) + }, []) + + const timeStr = currentTime.toLocaleTimeString('en-US', { + hour12: false, + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + }) + + return ( +
+ {/* Sidebar */} + + + {/* Main content */} +
+ {/* Header */} +
+

+ {getPageTitle(location.pathname)} +

+
+ {/* Live indicator */} +
+
+ + {connected ? 'Live' : 'Offline'} + +
+ {/* Clock */} +
+ {timeStr} MT +
+
+
+ + {/* Page content */} +
{children}
+
+
+ ) +} diff --git a/dashboard-frontend/src/components/ToastProvider.tsx b/dashboard-frontend/src/components/ToastProvider.tsx new file mode 100644 index 0000000..902b6fc --- /dev/null +++ b/dashboard-frontend/src/components/ToastProvider.tsx @@ -0,0 +1,141 @@ +import { createContext, useContext, useState, useCallback, useEffect, ReactNode } from 'react' +import { useNavigate } from 'react-router-dom' +import { AlertTriangle, AlertCircle, Info, X } from 'lucide-react' +import type { Alert } from '@/lib/api' + +interface Toast { + id: string + alert: Alert + dismissedAt?: number +} + +interface ToastContextValue { + addToast: (alert: Alert) => void +} + +const ToastContext = createContext(null) + +export function useToast() { + const context = useContext(ToastContext) + if (!context) { + throw new Error('useToast must be used within a ToastProvider') + } + return context +} + +function getSeverityStyles(severity: string) { + switch (severity?.toLowerCase()) { + case 'critical': + case 'emergency': + return { + bg: 'bg-red-500/10', + border: 'border-red-500', + icon: AlertCircle, + iconColor: 'text-red-500', + } + case 'warning': + return { + bg: 'bg-amber-500/10', + border: 'border-amber-500', + icon: AlertTriangle, + iconColor: 'text-amber-500', + } + default: + return { + bg: 'bg-blue-500/10', + border: 'border-blue-500', + icon: Info, + iconColor: 'text-blue-500', + } + } +} + +function ToastItem({ + toast, + onDismiss, + onNavigate, +}: { + toast: Toast + onDismiss: () => void + onNavigate: () => void +}) { + const styles = getSeverityStyles(toast.alert.severity) + const Icon = styles.icon + + // Auto-dismiss after 8 seconds + useEffect(() => { + const timer = setTimeout(onDismiss, 8000) + return () => clearTimeout(timer) + }, [onDismiss]) + + return ( +
+
+ {/* Severity bar */} +
+ + + +
+
+ {toast.alert.type.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())} +
+
+ {toast.alert.message} +
+
+ + +
+
+ ) +} + +export function ToastProvider({ children }: { children: ReactNode }) { + const [toasts, setToasts] = useState([]) + const navigate = useNavigate() + + const addToast = useCallback((alert: Alert) => { + const id = `${Date.now()}-${Math.random().toString(36).substr(2, 9)}` + setToasts((prev) => [...prev, { id, alert }]) + }, []) + + const dismissToast = useCallback((id: string) => { + setToasts((prev) => prev.filter((t) => t.id !== id)) + }, []) + + const handleNavigate = useCallback(() => { + navigate('/alerts') + }, [navigate]) + + return ( + + {children} + + {/* Toast container - fixed bottom right */} +
+ {toasts.map((toast) => ( +
+ dismissToast(toast.id)} + onNavigate={handleNavigate} + /> +
+ ))} +
+
+ ) +} diff --git a/dashboard-frontend/src/index.css b/dashboard-frontend/src/index.css index 8e9f519..b578cce 100644 --- a/dashboard-frontend/src/index.css +++ b/dashboard-frontend/src/index.css @@ -47,3 +47,28 @@ body { .animate-pulse-slow { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; } + + +/* Toast slide-in animation */ +@keyframes slide-in { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } +} + +.animate-slide-in { + animation: slide-in 0.3s ease-out; +} + +/* Line clamp utility */ +.line-clamp-2 { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} diff --git a/dashboard-frontend/src/lib/api.ts b/dashboard-frontend/src/lib/api.ts index 7dd7466..c3e08ff 100644 --- a/dashboard-frontend/src/lib/api.ts +++ b/dashboard-frontend/src/lib/api.ts @@ -93,6 +93,34 @@ export interface Alert { scope_value?: string } +export interface AlertHistoryItem { + id?: number + type: string + severity: string + message: string + timestamp: string + duration?: number + scope_type?: string + scope_value?: string + resolved_at?: string +} + +export interface AlertHistoryResponse { + items: AlertHistoryItem[] + total: number +} + +export interface Subscription { + id: number + user_id: string + sub_type: string + schedule_time?: string + schedule_day?: string + scope_type: string + scope_value?: string + enabled: boolean +} + export interface EnvStatus { enabled: boolean feeds: EnvFeedHealth[] @@ -209,6 +237,24 @@ export async function fetchAlerts(): Promise { return fetchJson('/api/alerts/active') } +export async function fetchAlertHistory( + limit: number = 50, + offset: number = 0, + type?: string, + severity?: string +): Promise { + const params = new URLSearchParams() + params.set('limit', limit.toString()) + params.set('offset', offset.toString()) + if (type && type !== 'all') params.set('type', type) + if (severity && severity !== 'all') params.set('severity', severity) + return fetchJson(`/api/alerts/history?${params.toString()}`) +} + +export async function fetchSubscriptions(): Promise { + return fetchJson('/api/subscriptions') +} + export async function fetchEnvStatus(): Promise { return fetchJson('/api/env/status') } diff --git a/dashboard-frontend/src/pages/Alerts.tsx b/dashboard-frontend/src/pages/Alerts.tsx index c096225..d4305f0 100644 --- a/dashboard-frontend/src/pages/Alerts.tsx +++ b/dashboard-frontend/src/pages/Alerts.tsx @@ -1,15 +1,549 @@ -import { Bell } from 'lucide-react' - -export default function Alerts() { - return ( -
-
- -
-

Alerts

-

- Alert history and subscriptions coming in Phase 11 -

-
- ) -} +import { useEffect, useState, useCallback } from 'react' +import { + Bell, + AlertTriangle, + AlertCircle, + + CheckCircle, + Clock, + Filter, + ChevronLeft, + ChevronRight, + Radio, + Zap, + + Cloud, + Wifi, + WifiOff, + Battery, + Users, +} from 'lucide-react' +import { + fetchAlerts, + fetchAlertHistory, + fetchSubscriptions, + type Alert, + type AlertHistoryItem, + type Subscription, +} from '@/lib/api' +import { useWebSocket } from '@/hooks/useWebSocket' + +// Alert type icons mapping +const alertTypeIcons: Record = { + infra_offline: WifiOff, + infra_recovery: Wifi, + battery_warning: Battery, + battery_critical: Battery, + battery_emergency: Battery, + hf_blackout: Zap, + uhf_ducting: Radio, + weather_warning: Cloud, + weather_watch: Cloud, + new_router: Radio, + packet_flood: AlertTriangle, + sustained_high_util: AlertTriangle, + region_blackout: AlertCircle, + default: Bell, +} + +function getAlertIcon(type: string) { + return alertTypeIcons[type] || alertTypeIcons.default +} + +function getSeverityStyles(severity: string) { + switch (severity?.toLowerCase()) { + case 'critical': + case 'emergency': + return { + bg: 'bg-red-500/10', + border: 'border-red-500', + badge: 'bg-red-500/20 text-red-400', + iconColor: 'text-red-500', + } + case 'warning': + return { + bg: 'bg-amber-500/10', + border: 'border-amber-500', + badge: 'bg-amber-500/20 text-amber-400', + iconColor: 'text-amber-500', + } + case 'watch': + return { + bg: 'bg-yellow-500/10', + border: 'border-yellow-500', + badge: 'bg-yellow-500/20 text-yellow-400', + iconColor: 'text-yellow-500', + } + case 'advisory': + case 'info': + default: + return { + bg: 'bg-blue-500/10', + border: 'border-blue-500', + badge: 'bg-blue-500/20 text-blue-400', + iconColor: 'text-blue-500', + } + } +} + +function formatTimeAgo(timestamp: string | number): string { + const date = typeof timestamp === 'number' ? new Date(timestamp * 1000) : new Date(timestamp) + const now = new Date() + const diffMs = now.getTime() - date.getTime() + const diffSec = Math.floor(diffMs / 1000) + const diffMin = Math.floor(diffSec / 60) + const diffHour = Math.floor(diffMin / 60) + const diffDay = Math.floor(diffHour / 24) + + if (diffSec < 60) return 'Just now' + if (diffMin < 60) return `${diffMin}m ago` + if (diffHour < 24) return `${diffHour}h ago` + return `${diffDay}d ago` +} + +function formatDateTime(timestamp: string | number): string { + const date = typeof timestamp === 'number' ? new Date(timestamp * 1000) : new Date(timestamp) + return date.toLocaleString('en-US', { + month: 'short', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + hour12: false, + }) +} + +function formatDuration(seconds: number): string { + if (seconds < 60) return `${seconds}s` + if (seconds < 3600) return `${Math.floor(seconds / 60)}m` + if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ${Math.floor((seconds % 3600) / 60)}m` + return `${Math.floor(seconds / 86400)}d` +} + +// Active Alert Card Component +function ActiveAlertCard({ + alert, + onAcknowledge, +}: { + alert: Alert + onAcknowledge: (alert: Alert) => void +}) { + const styles = getSeverityStyles(alert.severity) + const Icon = getAlertIcon(alert.type) + + return ( +
+
+ +
+
+ + {alert.severity?.toUpperCase()} + + {alert.type} +
+
{alert.message}
+
+ + + {alert.timestamp ? formatTimeAgo(alert.timestamp) : 'Just now'} + + {alert.scope_value && ( + {alert.scope_type}: {alert.scope_value} + )} +
+
+ +
+
+ ) +} + +// Alert History Table Component +function AlertHistoryTable({ + history, + typeFilter, + severityFilter, + onTypeFilterChange, + onSeverityFilterChange, + page, + totalPages, + onPageChange, +}: { + history: AlertHistoryItem[] + typeFilter: string + severityFilter: string + onTypeFilterChange: (v: string) => void + onSeverityFilterChange: (v: string) => void + page: number + totalPages: number + onPageChange: (p: number) => void +}) { + const alertTypes = [ + 'all', + 'infra_offline', + 'infra_recovery', + 'battery_warning', + 'battery_critical', + 'hf_blackout', + 'uhf_ducting', + 'weather_warning', + 'new_router', + 'packet_flood', + ] + + const severities = ['all', 'critical', 'warning', 'watch', 'info'] + + return ( +
+ {/* Filters */} +
+
+ + Filter: +
+ + +
+ + {/* Table */} +
+ + + + + + + + + + + + {history.length > 0 ? ( + history.map((item, i) => { + const styles = getSeverityStyles(item.severity) + return ( + + + + + + + + ) + }) + ) : ( + + + + )} + +
TimeTypeSeverityMessageDuration
+ {formatDateTime(item.timestamp)} + + {item.type.replace(/_/g, ' ')} + + + {item.severity} + + + {item.message} + + {item.duration ? formatDuration(item.duration) : '-'} +
+ No alert history available +
+
+ + {/* Pagination */} + {totalPages > 1 && ( +
+ + Page {page} of {totalPages} + +
+ + +
+
+ )} +
+ ) +} + +// Subscription Card Component +function SubscriptionCard({ subscription }: { subscription: Subscription }) { + const formatSchedule = () => { + if (subscription.sub_type === 'alerts') { + return 'Real-time' + } + const time = subscription.schedule_time || '0000' + const hours = parseInt(time.slice(0, 2)) + const minutes = time.slice(2) + const period = hours >= 12 ? 'PM' : 'AM' + const displayHour = hours % 12 || 12 + let schedule = `${displayHour}:${minutes} ${period}` + if (subscription.sub_type === 'weekly' && subscription.schedule_day) { + schedule += ` ${subscription.schedule_day.charAt(0).toUpperCase()}${subscription.schedule_day.slice(1)}` + } + return schedule + } + + const getTypeIcon = () => { + switch (subscription.sub_type) { + case 'alerts': + return Bell + case 'daily': + return Clock + case 'weekly': + return Clock + default: + return Bell + } + } + + const Icon = getTypeIcon() + + return ( +
+
+
+ +
+
+
+ {subscription.sub_type.charAt(0).toUpperCase() + subscription.sub_type.slice(1)} + {subscription.scope_type !== 'mesh' && subscription.scope_value && ( + + ({subscription.scope_type}: {subscription.scope_value}) + + )} +
+
+ {formatSchedule()} • Node {subscription.user_id} +
+
+
+
+
+ ) +} + +export default function Alerts() { + const [activeAlerts, setActiveAlerts] = useState([]) + const [history, setHistory] = useState([]) + const [subscriptions, setSubscriptions] = useState([]) + const [loading, setLoading] = useState(true) + const [error, setError] = useState(null) + + // Filters and pagination + const [typeFilter, setTypeFilter] = useState('all') + const [severityFilter, setSeverityFilter] = useState('all') + const [page, setPage] = useState(1) + const [totalPages, setTotalPages] = useState(1) + const pageSize = 20 + + // Acknowledged alerts (local state only) + const [acknowledged, setAcknowledged] = useState>(new Set()) + + const { lastAlert } = useWebSocket() + + // Set page title + useEffect(() => { + document.title = 'Alerts — MeshAI' + }, []) + + // Load data + useEffect(() => { + Promise.all([ + fetchAlerts().catch(() => []), + fetchAlertHistory(pageSize, 0).catch(() => ({ items: [], total: 0 })), + fetchSubscriptions().catch(() => []), + ]) + .then(([alerts, historyData, subs]) => { + setActiveAlerts(alerts) + if (Array.isArray(historyData)) { + setHistory(historyData) + setTotalPages(1) + } else { + setHistory(historyData.items || []) + setTotalPages(Math.ceil((historyData.total || 0) / pageSize)) + } + setSubscriptions(subs) + setLoading(false) + }) + .catch((err) => { + setError(err.message) + setLoading(false) + }) + }, []) + + // Handle new alerts from WebSocket + useEffect(() => { + if (lastAlert) { + setActiveAlerts((prev) => { + // Avoid duplicates + const exists = prev.some( + (a) => a.type === lastAlert.type && a.message === lastAlert.message + ) + if (exists) return prev + return [lastAlert, ...prev] + }) + } + }, [lastAlert]) + + // Reload history when filters or page change + useEffect(() => { + const offset = (page - 1) * pageSize + fetchAlertHistory(pageSize, offset, typeFilter, severityFilter) + .then((data) => { + if (Array.isArray(data)) { + setHistory(data) + setTotalPages(1) + } else { + setHistory(data.items || []) + setTotalPages(Math.ceil((data.total || 0) / pageSize)) + } + }) + .catch(() => { + // Keep current data on error + }) + }, [page, typeFilter, severityFilter]) + + const handleAcknowledge = useCallback((alert: Alert) => { + const key = `${alert.type}-${alert.message}-${alert.timestamp}` + setAcknowledged((prev) => new Set([...prev, key])) + }, []) + + // Filter out acknowledged alerts + const visibleAlerts = activeAlerts.filter((alert) => { + const key = `${alert.type}-${alert.message}-${alert.timestamp}` + return !acknowledged.has(key) + }) + + if (loading) { + return ( +
+
Loading alerts...
+
+ ) + } + + if (error) { + return ( +
+
Error: {error}
+
+ ) + } + + return ( +
+ {/* Active Alerts */} +
+

+ + Active Alerts ({visibleAlerts.length}) +

+ {visibleAlerts.length > 0 ? ( +
+ {visibleAlerts.map((alert, i) => ( + + ))} +
+ ) : ( +
+ + No active alerts — all systems nominal +
+ )} +
+ + {/* Alert History */} +
+

+ + Alert History +

+ { + setTypeFilter(v) + setPage(1) + }} + onSeverityFilterChange={(v) => { + setSeverityFilter(v) + setPage(1) + }} + page={page} + totalPages={totalPages} + onPageChange={setPage} + /> +
+ + {/* Subscriptions */} +
+

+ + Mesh Subscriptions ({subscriptions.length}) +

+ {subscriptions.length > 0 ? ( +
+ {subscriptions.map((sub) => ( + + ))} +
+ ) : ( +
+

No active subscriptions.

+

+ Manage subscriptions via !subscribe on mesh +

+
+ )} +
+
+ ) +} diff --git a/dashboard-frontend/src/pages/Config.tsx b/dashboard-frontend/src/pages/Config.tsx index 11c6ea4..7c58905 100644 --- a/dashboard-frontend/src/pages/Config.tsx +++ b/dashboard-frontend/src/pages/Config.tsx @@ -383,6 +383,7 @@ function ListInput({ label, value, onChange, helper = '' }: { const [text, setText] = useState(value.join(', ')) useEffect(() => { + document.title = 'Config — MeshAI' setText(value.join(', ')) }, [value]) diff --git a/dashboard-frontend/src/pages/Dashboard.tsx b/dashboard-frontend/src/pages/Dashboard.tsx index 8927103..d462855 100644 --- a/dashboard-frontend/src/pages/Dashboard.tsx +++ b/dashboard-frontend/src/pages/Dashboard.tsx @@ -325,11 +325,13 @@ export default function Dashboard() { setAlerts(a) setEnvStatus(e) setRFProp(rf) - setLoading(false) + setLoading(false) + document.title = 'Dashboard — MeshAI' }) .catch((err) => { setError(err.message) - setLoading(false) + setLoading(false) + document.title = 'Dashboard — MeshAI' }) }, []) diff --git a/dashboard-frontend/src/pages/Environment.tsx b/dashboard-frontend/src/pages/Environment.tsx index 1a6199e..7ce2f35 100644 --- a/dashboard-frontend/src/pages/Environment.tsx +++ b/dashboard-frontend/src/pages/Environment.tsx @@ -369,6 +369,7 @@ export default function Environment() { const [error, setError] = useState(null) useEffect(() => { + document.title = 'Environment — MeshAI' Promise.all([ fetchEnvStatus().catch(() => null), fetchEnvActive().catch(() => []), diff --git a/dashboard-frontend/src/pages/Mesh.tsx b/dashboard-frontend/src/pages/Mesh.tsx index 1404cfb..69b0aae 100644 --- a/dashboard-frontend/src/pages/Mesh.tsx +++ b/dashboard-frontend/src/pages/Mesh.tsx @@ -26,6 +26,7 @@ export default function Mesh() { // Fetch data on mount useEffect(() => { + document.title = 'Mesh — MeshAI' Promise.all([fetchNodes(), fetchEdges(), fetchRegions()]) .then(([n, e, r]) => { setNodes(n) diff --git a/meshai/dashboard/api/alert_routes.py b/meshai/dashboard/api/alert_routes.py index af61352..77cc6d0 100644 --- a/meshai/dashboard/api/alert_routes.py +++ b/meshai/dashboard/api/alert_routes.py @@ -1,85 +1,99 @@ -"""Alert API routes.""" - -from fastapi import APIRouter, Request - -router = APIRouter(tags=["alerts"]) - - -@router.get("/alerts/active") -async def get_active_alerts(request: Request): - """Get currently active alerts.""" - alert_engine = request.app.state.alert_engine - - if not alert_engine: - return [] - - # Get recent alerts from alert engine if it has internal state - alerts = [] - - # Check for AlertState or similar if available - if hasattr(alert_engine, "get_active_alerts"): - try: - raw_alerts = alert_engine.get_active_alerts() - for alert in raw_alerts: - alerts.append({ - "type": alert.get("type", "unknown"), - "severity": alert.get("severity", "info"), - "message": alert.get("message", ""), - "timestamp": alert.get("timestamp"), - "scope_type": alert.get("scope_type"), - "scope_value": alert.get("scope_value"), - }) - except Exception: - pass - elif hasattr(alert_engine, "_recent_alerts"): - try: - for alert in alert_engine._recent_alerts: - alerts.append({ - "type": alert.get("type", "unknown"), - "severity": alert.get("severity", "info"), - "message": alert.get("message", ""), - "timestamp": alert.get("timestamp"), - }) - except Exception: - pass - - return alerts - - -@router.get("/alerts/history") -async def get_alert_history( - request: Request, - limit: int = 50, - offset: int = 0, -): - """Get historical alerts with pagination.""" - # Historical alert data would come from SQLite - # For now, return empty list - return [] - - -@router.get("/subscriptions") -async def get_subscriptions(request: Request): - """Get all alert subscriptions.""" - subscription_manager = request.app.state.subscription_manager - - if not subscription_manager: - return [] - - try: - subs = subscription_manager.get_all_subs() - return [ - { - "id": sub["id"], - "user_id": sub["user_id"], - "sub_type": sub["sub_type"], - "schedule_time": sub.get("schedule_time"), - "schedule_day": sub.get("schedule_day"), - "scope_type": sub.get("scope_type", "mesh"), - "scope_value": sub.get("scope_value"), - "enabled": sub.get("enabled", 1) == 1, - } - for sub in subs - ] - except Exception: - return [] +"""Alert API routes.""" + +from fastapi import APIRouter, Request, Query +from typing import Optional + +router = APIRouter(tags=["alerts"]) + + +@router.get("/alerts/active") +async def get_active_alerts(request: Request): + """Get currently active alerts.""" + alert_engine = getattr(request.app.state, "alert_engine", None) + + if not alert_engine: + return [] + + alerts = [] + + # Try get_pending_alerts first (our method) + if hasattr(alert_engine, "get_pending_alerts"): + try: + raw_alerts = alert_engine.get_pending_alerts() + for alert in raw_alerts: + alerts.append({ + "type": alert.get("type", "unknown"), + "severity": _map_severity(alert), + "message": alert.get("message", ""), + "timestamp": alert.get("timestamp"), + "scope_type": alert.get("scope_type"), + "scope_value": alert.get("scope_value"), + }) + except Exception: + pass + + return alerts + + +@router.get("/alerts/history") +async def get_alert_history( + request: Request, + limit: int = Query(50, ge=1, le=200), + offset: int = Query(0, ge=0), + type: Optional[str] = Query(None), + severity: Optional[str] = Query(None), +): + """Get historical alerts with pagination and filtering. + + Note: Alert history persistence is not yet implemented. + Returns empty array for now. + """ + # Future: Query SQLite for historical alerts + # For now, return empty with proper structure + return { + "items": [], + "total": 0, + } + + +@router.get("/subscriptions") +async def get_subscriptions(request: Request): + """Get all alert subscriptions.""" + subscription_manager = getattr(request.app.state, "subscription_manager", None) + + if not subscription_manager: + return [] + + try: + subs = subscription_manager.get_all_subs() + return [ + { + "id": sub["id"], + "user_id": sub["user_id"], + "sub_type": sub["sub_type"], + "schedule_time": sub.get("schedule_time"), + "schedule_day": sub.get("schedule_day"), + "scope_type": sub.get("scope_type", "mesh"), + "scope_value": sub.get("scope_value"), + "enabled": sub.get("enabled", 1) == 1, + } + for sub in subs + ] + except Exception: + return [] + + +def _map_severity(alert: dict) -> str: + """Map alert properties to severity level.""" + if alert.get("is_critical"): + return "critical" + alert_type = alert.get("type", "") + if "emergency" in alert_type: + return "emergency" + if "critical" in alert_type: + return "critical" + if "warning" in alert_type: + return "warning" + if "watch" in alert_type: + return "watch" + return "info" diff --git a/meshai/dashboard/static/assets/index-TnqHKPY8.css b/meshai/dashboard/static/assets/index-J-795l7V.css similarity index 52% rename from meshai/dashboard/static/assets/index-TnqHKPY8.css rename to meshai/dashboard/static/assets/index-J-795l7V.css index c1ccc63..fdd4aed 100644 --- a/meshai/dashboard/static/assets/index-TnqHKPY8.css +++ b/meshai/dashboard/static/assets/index-J-795l7V.css @@ -1 +1 @@ -.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.z-0{z-index:0}.col-span-2{grid-column:span 2 / span 2}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-8{width:2rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} +.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.z-0{z-index:0}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.-ml-4{margin-left:-1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-8{width:2rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.animate-slide-in{animation:slide-in .3s ease-out}.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/meshai/dashboard/static/assets/index-DyCs3R4y.js b/meshai/dashboard/static/assets/index-yktnPGHK.js similarity index 56% rename from meshai/dashboard/static/assets/index-DyCs3R4y.js rename to meshai/dashboard/static/assets/index-yktnPGHK.js index 7baec05..cc6736e 100644 --- a/meshai/dashboard/static/assets/index-DyCs3R4y.js +++ b/meshai/dashboard/static/assets/index-yktnPGHK.js @@ -1,4 +1,4 @@ -function OW(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var zW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e5={exports:{}},n0={},t5={exports:{}},ot={};/** +function ZW(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var $W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c5={exports:{}},u0={},f5={exports:{}},ot={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function OW(t,e){for(var r=0;r>>1,K=V[Y];if(0>>1;Yi(ue,H))dei(je,ue)?(V[Y]=je,V[de]=H,Y=de):(V[Y]=ue,V[ie]=H,Y=ie);else if(dei(je,H))V[Y]=je,V[de]=H,Y=de;else break e}}return W}function i(V,W){var H=V.sortIndex-W.sortIndex;return H!==0?H:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,v=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(V){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function b(V){if(g=!1,S(V),!p)if(r(l)!==null)p=!0,j(T);else{var W=r(u);W!==null&&U(b,W.startTime-V)}}function T(V,W){p=!1,g&&(g=!1,y(D),D=-1),v=!0;var H=h;try{for(S(W),f=r(l);f!==null&&(!(f.expirationTime>W)||V&&!I());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,h=f.priorityLevel;var K=Y(f.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?f.callback=K:f===r(l)&&n(l),S(W)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ie=r(u);ie!==null&&U(b,ie.startTime-W),ne=!1}return ne}finally{f=null,h=H,v=!1}}var C=!1,A=null,D=-1,E=5,k=-1;function I(){return!(t.unstable_now()-kV||125Y?(V.sortIndex=H,e(u,V),r(l)===null&&V===r(u)&&(g?(y(D),D=-1):g=!0,U(b,H-Y))):(V.sortIndex=K,e(l,V),p||v||(p=!0,j(T))),V},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(V){var W=h;return function(){var H=h;h=W;try{return V.apply(this,arguments)}finally{h=H}}}})(v5);h5.exports=v5;var oU=h5.exports;/** + */(function(t){function e(V,W){var H=V.length;V.push(W);e:for(;0>>1,K=V[X];if(0>>1;Xi(ue,H))dei(Ge,ue)?(V[X]=Ge,V[de]=H,X=de):(V[X]=ue,V[ie]=H,X=ie);else if(dei(Ge,H))V[X]=Ge,V[de]=H,X=de;else break e}}return W}function i(V,W){var H=V.sortIndex-W.sortIndex;return H!==0?H:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,v=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(V){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function b(V){if(g=!1,S(V),!p)if(r(l)!==null)p=!0,j(C);else{var W=r(u);W!==null&&U(b,W.startTime-V)}}function C(V,W){p=!1,g&&(g=!1,y(D),D=-1),v=!0;var H=h;try{for(S(W),f=r(l);f!==null&&(!(f.expirationTime>W)||V&&!I());){var X=f.callback;if(typeof X=="function"){f.callback=null,h=f.priorityLevel;var K=X(f.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?f.callback=K:f===r(l)&&n(l),S(W)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ie=r(u);ie!==null&&U(b,ie.startTime-W),ne=!1}return ne}finally{f=null,h=H,v=!1}}var M=!1,A=null,D=-1,E=5,k=-1;function I(){return!(t.unstable_now()-kV||125X?(V.sortIndex=H,e(u,V),r(l)===null&&V===r(u)&&(g?(y(D),D=-1):g=!0,U(b,H-X))):(V.sortIndex=K,e(l,V),p||v||(p=!0,j(C))),V},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(V){var W=h;return function(){var H=h;h=W;try{return V.apply(this,arguments)}finally{h=H}}}})(b5);w5.exports=b5;var gU=w5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function OW(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HS=Object.prototype.hasOwnProperty,lU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qA={},KA={};function uU(t){return HS.call(KA,t)?!0:HS.call(qA,t)?!1:lU.test(t)?KA[t]=!0:(qA[t]=!0,!1)}function cU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function fU(t,e,r,n){if(e===null||typeof e>"u"||cU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function on(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ir[t]=new on(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ir[e]=new on(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ir[t]=new on(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ir[t]=new on(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ir[t]=new on(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ir[t]=new on(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ir[t]=new on(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ir[t]=new on(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ir[t]=new on(t,5,!1,t.toLowerCase(),null,!1,!1)});var aC=/[\-:]([a-z])/g;function oC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(aC,oC);Ir[e]=new on(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(aC,oC);Ir[e]=new on(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(aC,oC);Ir[e]=new on(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ir[t]=new on(t,1,!1,t.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ir[t]=new on(t,1,!1,t.toLowerCase(),null,!0,!0)});function sC(t,e,r,n){var i=Ir.hasOwnProperty(e)?Ir[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),XS=Object.prototype.hasOwnProperty,yU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iP={},aP={};function _U(t){return XS.call(aP,t)?!0:XS.call(iP,t)?!1:yU.test(t)?aP[t]=!0:(iP[t]=!0,!1)}function xU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function SU(t,e,r,n){if(e===null||typeof e>"u"||xU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function on(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ir[t]=new on(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ir[e]=new on(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ir[t]=new on(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ir[t]=new on(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ir[t]=new on(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ir[t]=new on(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ir[t]=new on(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ir[t]=new on(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ir[t]=new on(t,5,!1,t.toLowerCase(),null,!1,!1)});var cC=/[\-:]([a-z])/g;function fC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(cC,fC);Ir[e]=new on(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(cC,fC);Ir[e]=new on(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(cC,fC);Ir[e]=new on(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ir[t]=new on(t,1,!1,t.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ir[t]=new on(t,1,!1,t.toLowerCase(),null,!0,!0)});function hC(t,e,r,n){var i=Ir.hasOwnProperty(e)?Ir[e]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{H_=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Ph(t):""}function hU(t){switch(t.tag){case 5:return Ph(t.type);case 16:return Ph("Lazy");case 13:return Ph("Suspense");case 19:return Ph("SuspenseList");case 0:case 2:case 15:return t=W_(t.type,!1),t;case 11:return t=W_(t.type.render,!1),t;case 1:return t=W_(t.type,!0),t;default:return""}}function $S(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case nc:return"Fragment";case rc:return"Portal";case WS:return"Profiler";case lC:return"StrictMode";case US:return"Suspense";case ZS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case g5:return(t.displayName||"Context")+".Consumer";case p5:return(t._context.displayName||"Context")+".Provider";case uC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cC:return e=t.displayName||null,e!==null?e:$S(t.type)||"Memo";case ko:e=t._payload,t=t._init;try{return $S(t(e))}catch{}}return null}function vU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $S(e);case 8:return e===lC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function fs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function y5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function dU(t){var e=y5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function cp(t){t._valueTracker||(t._valueTracker=dU(t))}function _5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=y5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Sm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function YS(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function JA(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=fs(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function x5(t,e){e=e.checked,e!=null&&sC(t,"checked",e,!1)}function XS(t,e){x5(t,e);var r=fs(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?qS(t,e.type,r):e.hasOwnProperty("defaultValue")&&qS(t,e.type,fs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function eP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function qS(t,e,r){(e!=="number"||Sm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Dh=Array.isArray;function Sc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=fp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function _v(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Zh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pU=["Webkit","ms","Moz","O"];Object.keys(Zh).forEach(function(t){pU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Zh[e]=Zh[t]})});function T5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Zh.hasOwnProperty(t)&&Zh[t]?(""+e).trim():e+"px"}function C5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=T5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var gU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function JS(t,e){if(e){if(gU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function ew(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 tw=null;function fC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var rw=null,wc=null,bc=null;function nP(t){if(t=yd(t)){if(typeof rw!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=l0(e),rw(t.stateNode,t.type,e))}}function M5(t){wc?bc?bc.push(t):bc=[t]:wc=t}function L5(){if(wc){var t=wc,e=bc;if(bc=wc=null,nP(t),e)for(t=0;t>>=0,t===0?32:31-(LU(t)/AU|0)|0}var hp=64,vp=4194304;function kh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Cm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=kh(s):(a&=o,a!==0&&(n=kh(a)))}else o=r&~i,o!==0?n=kh(o):a!==0&&(n=kh(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function gd(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ci(e),t[e]=r}function IU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=Yh),hP=" ",vP=!1;function $5(t,e){switch(t){case"keyup":return o7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ic=!1;function l7(t,e){switch(t){case"compositionend":return Y5(e);case"keypress":return e.which!==32?null:(vP=!0,hP);case"textInput":return t=e.data,t===hP&&vP?null:t;default:return null}}function u7(t,e){if(ic)return t==="compositionend"||!_C&&$5(t,e)?(t=U5(),Wg=gC=zo=null,ic=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mP(r)}}function Q5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Q5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function J5(){for(var t=window,e=Sm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Sm(t.document)}return e}function xC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function y7(t){var e=J5(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Q5(r.ownerDocument.documentElement,r)){if(n!==null&&xC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=yP(r,a);var o=yP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ac=null,lw=null,qh=null,uw=!1;function _P(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;uw||ac==null||ac!==Sm(n)||(n=ac,"selectionStart"in n&&xC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),qh&&Cv(qh,n)||(qh=n,n=Am(lw,"onSelect"),0lc||(t.current=pw[lc],pw[lc]=null,lc--)}function Mt(t,e){lc++,pw[lc]=t.current,t.current=e}var hs={},$r=xs(hs),dn=xs(!1),zl=hs;function Nc(t,e){var r=t.type.contextTypes;if(!r)return hs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function pn(t){return t=t.childContextTypes,t!=null}function Dm(){At(dn),At($r)}function MP(t,e,r){if($r.current!==hs)throw Error(ce(168));Mt($r,e),Mt(dn,r)}function lB(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,vU(t)||"Unknown",i));return zt({},r,n)}function km(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||hs,zl=$r.current,Mt($r,t),Mt(dn,dn.current),!0}function LP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=lB(t,e,zl),n.__reactInternalMemoizedMergedChildContext=t,At(dn),At($r),Mt($r,t)):At(dn),Mt(dn,r)}var za=null,u0=!1,ix=!1;function uB(t){za===null?za=[t]:za.push(t)}function D7(t){u0=!0,uB(t)}function Ss(){if(!ix&&za!==null){ix=!0;var t=0,e=xt;try{var r=za;for(xt=1;t>=o,i-=o,Va=1<<32-Ci(e)+i|r<D?(E=A,A=null):E=A.sibling;var k=h(y,A,S[D],b);if(k===null){A===null&&(A=E);break}t&&A&&k.alternate===null&&e(y,A),_=a(k,_,D),C===null?T=k:C.sibling=k,C=k,A=E}if(D===S.length)return r(y,A),Pt&&al(y,D),T;if(A===null){for(;DD?(E=A,A=null):E=A.sibling;var I=h(y,A,k.value,b);if(I===null){A===null&&(A=E);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,D),C===null?T=I:C.sibling=I,C=I,A=E}if(k.done)return r(y,A),Pt&&al(y,D),T;if(A===null){for(;!k.done;D++,k=S.next())k=f(y,k.value,b),k!==null&&(_=a(k,_,D),C===null?T=k:C.sibling=k,C=k);return Pt&&al(y,D),T}for(A=n(y,A);!k.done;D++,k=S.next())k=v(A,y,D,k.value,b),k!==null&&(t&&k.alternate!==null&&A.delete(k.key===null?D:k.key),_=a(k,_,D),C===null?T=k:C.sibling=k,C=k);return t&&A.forEach(function(z){return e(y,z)}),Pt&&al(y,D),T}function m(y,_,S,b){if(typeof S=="object"&&S!==null&&S.type===nc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case up:e:{for(var T=S.key,C=_;C!==null;){if(C.key===T){if(T=S.type,T===nc){if(C.tag===7){r(y,C.sibling),_=i(C,S.props.children),_.return=y,y=_;break e}}else if(C.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===ko&&DP(T)===C.type){r(y,C.sibling),_=i(C,S.props),_.ref=Yf(y,C,S),_.return=y,y=_;break e}r(y,C);break}else e(y,C);C=C.sibling}S.type===nc?(_=Al(S.props.children,y.mode,b,S.key),_.return=y,y=_):(b=Qg(S.type,S.key,S.props,null,y.mode,b),b.ref=Yf(y,_,S),b.return=y,y=b)}return o(y);case rc:e:{for(C=S.key;_!==null;){if(_.key===C)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){r(y,_.sibling),_=i(_,S.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=hx(S,y.mode,b),_.return=y,y=_}return o(y);case ko:return C=S._init,m(y,_,C(S._payload),b)}if(Dh(S))return p(y,_,S,b);if(Hf(S))return g(y,_,S,b);xp(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,S),_.return=y,y=_):(r(y,_),_=fx(S,y.mode,b),_.return=y,y=_),o(y)):r(y,_)}return m}var zc=vB(!0),dB=vB(!1),Rm=xs(null),Nm=null,fc=null,TC=null;function CC(){TC=fc=Nm=null}function MC(t){var e=Rm.current;At(Rm),t._currentValue=e}function yw(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Cc(t,e){Nm=t,TC=fc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(vn=!0),t.firstContext=null)}function ni(t){var e=t._currentValue;if(TC!==t)if(t={context:t,memoizedValue:e,next:null},fc===null){if(Nm===null)throw Error(ce(308));fc=t,Nm.dependencies={lanes:0,firstContext:t}}else fc=fc.next=t;return e}var yl=null;function LC(t){yl===null?yl=[t]:yl.push(t)}function pB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,LC(e)):(r.next=i.next,i.next=r),e.interleaved=r,no(t,n)}function no(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Io=!1;function AC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function $a(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ko(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,no(t,r)}return i=n.interleaved,i===null?(e.next=e,LC(n)):(e.next=i.next,i.next=e),n.interleaved=e,no(t,r)}function Zg(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}function kP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Om(t,e,r,n){var i=t.updateQueue;Io=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,v=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(h=e,v=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(v,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(v,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:Io=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else v={eventTime:v,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=v,l=f):c=c.next=v,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);Fl|=o,t.lanes=o,t.memoizedState=f}}function IP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=ox.transition;ox.transition={};try{t(!1),e()}finally{xt=r,ox.transition=n}}function EB(){return ii().memoizedState}function R7(t,e,r){var n=Jo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},RB(t))NB(e,r);else if(r=pB(t,e,r,n),r!==null){var i=en();Mi(r,t,n,i),OB(r,e,n)}}function N7(t,e,r){var n=Jo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(RB(t))NB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,ki(s,o)){var l=e.interleaved;l===null?(i.next=i,LC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=pB(t,e,i,n),r!==null&&(i=en(),Mi(r,t,n,i),OB(r,e,n))}}function RB(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function NB(t,e){Kh=Bm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function OB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,vC(t,r)}}var Vm={readContext:ni,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},O7={readContext:ni,useCallback:function(t,e){return Ji().memoizedState=[t,e===void 0?null:e],t},useContext:ni,useEffect:RP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Yg(4194308,4,AB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Yg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Yg(4,2,t,e)},useMemo:function(t,e){var r=Ji();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ji();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=R7.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=Ji();return t={current:t},e.memoizedState=t},useState:EP,useDebugValue:OC,useDeferredValue:function(t){return Ji().memoizedState=t},useTransition:function(){var t=EP(!1),e=t[0];return t=E7.bind(null,t[1]),Ji().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=Ji();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Vl&30||xB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,RP(wB.bind(null,n,a,t),[t]),n.flags|=2048,Ev(9,SB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=Ji(),e=wr.identifierPrefix;if(Pt){var r=Fa,n=Va;r=(n&~(1<<32-Ci(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=kv++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{Y_=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?kh(t):""}function wU(t){switch(t.tag){case 5:return kh(t.type);case 16:return kh("Lazy");case 13:return kh("Suspense");case 19:return kh("SuspenseList");case 0:case 2:case 15:return t=X_(t.type,!1),t;case 11:return t=X_(t.type.render,!1),t;case 1:return t=X_(t.type,!0),t;default:return""}}function JS(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ic:return"Fragment";case nc:return"Portal";case qS:return"Profiler";case vC:return"StrictMode";case KS:return"Suspense";case QS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case M5:return(t.displayName||"Context")+".Consumer";case C5:return(t._context.displayName||"Context")+".Provider";case dC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case pC:return e=t.displayName||null,e!==null?e:JS(t.type)||"Memo";case ko:e=t._payload,t=t._init;try{return JS(t(e))}catch{}}return null}function bU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return JS(e);case 8:return e===vC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function fs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function A5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function TU(t){var e=A5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function dp(t){t._valueTracker||(t._valueTracker=TU(t))}function P5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=A5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Tm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ew(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function sP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=fs(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function D5(t,e){e=e.checked,e!=null&&hC(t,"checked",e,!1)}function tw(t,e){D5(t,e);var r=fs(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?rw(t,e.type,r):e.hasOwnProperty("defaultValue")&&rw(t,e.type,fs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function lP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function rw(t,e,r){(e!=="number"||Tm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Ih=Array.isArray;function wc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=pp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function wv(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Yh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CU=["Webkit","ms","Moz","O"];Object.keys(Yh).forEach(function(t){CU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Yh[e]=Yh[t]})});function N5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Yh.hasOwnProperty(t)&&Yh[t]?(""+e).trim():e+"px"}function R5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=N5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var MU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function aw(t,e){if(e){if(MU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function ow(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 sw=null;function gC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var lw=null,bc=null,Tc=null;function fP(t){if(t=wd(t)){if(typeof lw!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=d0(e),lw(t.stateNode,t.type,e))}}function O5(t){bc?Tc?Tc.push(t):Tc=[t]:bc=t}function z5(){if(bc){var t=bc,e=Tc;if(Tc=bc=null,fP(t),e)for(t=0;t>>=0,t===0?32:31-(zU(t)/BU|0)|0}var gp=64,mp=4194304;function Eh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Am(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Eh(s):(a&=o,a!==0&&(n=Eh(a)))}else o=r&~i,o!==0?n=Eh(o):a!==0&&(n=Eh(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function xd(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ci(e),t[e]=r}function GU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=qh),xP=" ",SP=!1;function nB(t,e){switch(t){case"keyup":return g7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ac=!1;function y7(t,e){switch(t){case"compositionend":return iB(e);case"keypress":return e.which!==32?null:(SP=!0,xP);case"textInput":return t=e.data,t===xP&&SP?null:t;default:return null}}function _7(t,e){if(ac)return t==="compositionend"||!TC&&nB(t,e)?(t=tB(),Yg=SC=zo=null,ac=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=CP(r)}}function lB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?lB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function uB(){for(var t=window,e=Tm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Tm(t.document)}return e}function CC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function A7(t){var e=uB(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&lB(r.ownerDocument.documentElement,r)){if(n!==null&&CC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=MP(r,a);var o=MP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,oc=null,dw=null,Qh=null,pw=!1;function LP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;pw||oc==null||oc!==Tm(n)||(n=oc,"selectionStart"in n&&CC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Qh&&Av(Qh,n)||(Qh=n,n=km(dw,"onSelect"),0uc||(t.current=Sw[uc],Sw[uc]=null,uc--)}function Mt(t,e){uc++,Sw[uc]=t.current,t.current=e}var hs={},$r=Ss(hs),dn=Ss(!1),Bl=hs;function Oc(t,e){var r=t.type.contextTypes;if(!r)return hs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function pn(t){return t=t.childContextTypes,t!=null}function Em(){At(dn),At($r)}function NP(t,e,r){if($r.current!==hs)throw Error(ce(168));Mt($r,e),Mt(dn,r)}function yB(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,bU(t)||"Unknown",i));return zt({},r,n)}function Nm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||hs,Bl=$r.current,Mt($r,t),Mt(dn,dn.current),!0}function RP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=yB(t,e,Bl),n.__reactInternalMemoizedMergedChildContext=t,At(dn),At($r),Mt($r,t)):At(dn),Mt(dn,r)}var za=null,p0=!1,ux=!1;function _B(t){za===null?za=[t]:za.push(t)}function F7(t){p0=!0,_B(t)}function ws(){if(!ux&&za!==null){ux=!0;var t=0,e=xt;try{var r=za;for(xt=1;t>=o,i-=o,Va=1<<32-Ci(e)+i|r<D?(E=A,A=null):E=A.sibling;var k=h(y,A,S[D],b);if(k===null){A===null&&(A=E);break}t&&A&&k.alternate===null&&e(y,A),_=a(k,_,D),M===null?C=k:M.sibling=k,M=k,A=E}if(D===S.length)return r(y,A),Pt&&ol(y,D),C;if(A===null){for(;DD?(E=A,A=null):E=A.sibling;var I=h(y,A,k.value,b);if(I===null){A===null&&(A=E);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,D),M===null?C=I:M.sibling=I,M=I,A=E}if(k.done)return r(y,A),Pt&&ol(y,D),C;if(A===null){for(;!k.done;D++,k=S.next())k=f(y,k.value,b),k!==null&&(_=a(k,_,D),M===null?C=k:M.sibling=k,M=k);return Pt&&ol(y,D),C}for(A=n(y,A);!k.done;D++,k=S.next())k=v(A,y,D,k.value,b),k!==null&&(t&&k.alternate!==null&&A.delete(k.key===null?D:k.key),_=a(k,_,D),M===null?C=k:M.sibling=k,M=k);return t&&A.forEach(function(z){return e(y,z)}),Pt&&ol(y,D),C}function m(y,_,S,b){if(typeof S=="object"&&S!==null&&S.type===ic&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case vp:e:{for(var C=S.key,M=_;M!==null;){if(M.key===C){if(C=S.type,C===ic){if(M.tag===7){r(y,M.sibling),_=i(M,S.props.children),_.return=y,y=_;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===ko&&BP(C)===M.type){r(y,M.sibling),_=i(M,S.props),_.ref=qf(y,M,S),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}S.type===ic?(_=Pl(S.props.children,y.mode,b,S.key),_.return=y,y=_):(b=rm(S.type,S.key,S.props,null,y.mode,b),b.ref=qf(y,_,S),b.return=y,y=b)}return o(y);case nc:e:{for(M=S.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){r(y,_.sibling),_=i(_,S.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=mx(S,y.mode,b),_.return=y,y=_}return o(y);case ko:return M=S._init,m(y,_,M(S._payload),b)}if(Ih(S))return p(y,_,S,b);if(Uf(S))return g(y,_,S,b);Tp(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,S),_.return=y,y=_):(r(y,_),_=gx(S,y.mode,b),_.return=y,y=_),o(y)):r(y,_)}return m}var Bc=bB(!0),TB=bB(!1),zm=Ss(null),Bm=null,hc=null,PC=null;function DC(){PC=hc=Bm=null}function kC(t){var e=zm.current;At(zm),t._currentValue=e}function Tw(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Mc(t,e){Bm=t,PC=hc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(vn=!0),t.firstContext=null)}function ni(t){var e=t._currentValue;if(PC!==t)if(t={context:t,memoizedValue:e,next:null},hc===null){if(Bm===null)throw Error(ce(308));hc=t,Bm.dependencies={lanes:0,firstContext:t}}else hc=hc.next=t;return e}var _l=null;function IC(t){_l===null?_l=[t]:_l.push(t)}function CB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,IC(e)):(r.next=i.next,i.next=r),e.interleaved=r,no(t,n)}function no(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Io=!1;function EC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function MB(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function $a(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Ko(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,no(t,r)}return i=n.interleaved,i===null?(e.next=e,IC(n)):(e.next=i.next,i.next=e),n.interleaved=e,no(t,r)}function qg(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,yC(t,r)}}function VP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Vm(t,e,r,n){var i=t.updateQueue;Io=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,v=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(h=e,v=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(v,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(v,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:Io=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else v={eventTime:v,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=v,l=f):c=c.next=v,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);jl|=o,t.lanes=o,t.memoizedState=f}}function FP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=fx.transition;fx.transition={};try{t(!1),e()}finally{xt=r,fx.transition=n}}function HB(){return ii().memoizedState}function W7(t,e,r){var n=Jo(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},WB(t))UB(e,r);else if(r=CB(t,e,r,n),r!==null){var i=en();Mi(r,t,n,i),ZB(r,e,n)}}function U7(t,e,r){var n=Jo(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(WB(t))UB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,ki(s,o)){var l=e.interleaved;l===null?(i.next=i,IC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=CB(t,e,i,n),r!==null&&(i=en(),Mi(r,t,n,i),ZB(r,e,n))}}function WB(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function UB(t,e){Jh=jm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function ZB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,yC(t,r)}}var Gm={readContext:ni,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},Z7={readContext:ni,useCallback:function(t,e){return Ji().memoizedState=[t,e===void 0?null:e],t},useContext:ni,useEffect:GP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Qg(4194308,4,BB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Qg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Qg(4,2,t,e)},useMemo:function(t,e){var r=Ji();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ji();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=W7.bind(null,Nt,t),[n.memoizedState,t]},useRef:function(t){var e=Ji();return t={current:t},e.memoizedState=t},useState:jP,useDebugValue:jC,useDeferredValue:function(t){return Ji().memoizedState=t},useTransition:function(){var t=jP(!1),e=t[0];return t=H7.bind(null,t[1]),Ji().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Nt,i=Ji();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),br===null)throw Error(ce(349));Fl&30||DB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,GP(IB.bind(null,n,a,t),[t]),n.flags|=2048,Ov(9,kB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=Ji(),e=br.identifierPrefix;if(Pt){var r=Fa,n=Va;r=(n&~(1<<32-Ci(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Nv++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ta]=e,t[Av]=n,ZB(t,e,!1,!1),e.stateNode=t;e:{switch(o=ew(r,n),r){case"dialog":Lt("cancel",t),Lt("close",t),i=n;break;case"iframe":case"object":case"embed":Lt("load",t),i=n;break;case"video":case"audio":for(i=0;iFc&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304)}else{if(!n)if(t=zm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Xf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Fc&&r!==1073741824&&(e.flags|=128,n=!0,Xf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(Vr(e),null);case 22:case 23:return GC(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function W7(t,e){switch(wC(e),e.tag){case 1:return pn(e.type)&&Dm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bc(),At(dn),At($r),kC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return DC(e),null;case 13:if(At(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Oc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(Et),null;case 4:return Bc(),null;case 10:return MC(e.type._context),null;case 22:case 23:return GC(),null;case 24:return null;default:return null}}var wp=!1,Hr=!1,U7=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function hc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ft(t,e,n)}else r.current=null}function Lw(t,e,r){try{r()}catch(n){Ft(t,e,n)}}var UP=!1;function Z7(t,e){if(cw=Mm,t=J5(),xC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===t)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(fw={focusedElem:t,selectionRange:r},Mm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,_=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:_i(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(b){Ft(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=UP,UP=!1,p}function Qh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Lw(e,r,a)}i=i.next}while(i!==n)}}function h0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Aw(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function XB(t){var e=t.alternate;e!==null&&(t.alternate=null,XB(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ta],delete e[Av],delete e[dw],delete e[A7],delete e[P7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qB(t){return t.tag===5||t.tag===3||t.tag===4}function ZP(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Pw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Pm));else if(n!==4&&(t=t.child,t!==null))for(Pw(t,e,r),t=t.sibling;t!==null;)Pw(t,e,r),t=t.sibling}function Dw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Dw(t,e,r),t=t.sibling;t!==null;)Dw(t,e,r),t=t.sibling}var Lr=null,Si=!1;function xo(t,e,r){for(r=r.child;r!==null;)KB(t,e,r),r=r.sibling}function KB(t,e,r){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(i0,r)}catch{}switch(r.tag){case 5:Hr||hc(r,e);case 6:var n=Lr,i=Si;Lr=null,xo(t,e,r),Lr=n,Si=i,Lr!==null&&(Si?(t=Lr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Lr.removeChild(r.stateNode));break;case 18:Lr!==null&&(Si?(t=Lr,r=r.stateNode,t.nodeType===8?nx(t.parentNode,r):t.nodeType===1&&nx(t,r),bv(t)):nx(Lr,r.stateNode));break;case 4:n=Lr,i=Si,Lr=r.stateNode.containerInfo,Si=!0,xo(t,e,r),Lr=n,Si=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Lw(r,e,o),i=i.next}while(i!==n)}xo(t,e,r);break;case 1:if(!Hr&&(hc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ft(r,e,s)}xo(t,e,r);break;case 21:xo(t,e,r);break;case 22:r.mode&1?(Hr=(n=Hr)||r.memoizedState!==null,xo(t,e,r),Hr=n):xo(t,e,r);break;default:xo(t,e,r)}}function $P(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new U7),e.forEach(function(n){var i=t9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function di(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Y7(n/1960))-n,10t?16:t,Bo===null)var n=!1;else{if(t=Bo,Bo=null,Gm=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-FC?Ll(t,0):VC|=r),gn(t,e)}function a3(t,e){e===0&&(t.mode&1?(e=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):e=1);var r=en();t=no(t,e),t!==null&&(gd(t,e,r),gn(t,r))}function e9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),a3(t,r)}function t9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),a3(t,r)}var o3;o3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||dn.current)vn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return vn=!1,G7(t,e,r);vn=!!(t.flags&131072)}else vn=!1,Pt&&e.flags&1048576&&cB(e,Em,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Xg(t,e),t=e.pendingProps;var i=Nc(e,$r.current);Cc(e,r),i=EC(null,e,n,t,i,r);var a=RC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,pn(n)?(a=!0,km(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,AC(e),i.updater=f0,e.stateNode=i,i._reactInternals=e,xw(e,n,t,r),e=bw(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&SC(e),qr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Xg(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=n9(n),t=_i(n,t),i){case 0:e=ww(null,e,n,t,r);break e;case 1:e=GP(null,e,n,t,r);break e;case 11:e=FP(null,e,n,t,r);break e;case 14:e=jP(null,e,n,_i(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),ww(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),GP(t,e,n,i,r);case 3:e:{if(HB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,gB(t,e),Om(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Vc(Error(ce(423)),e),e=HP(t,e,n,r,i);break e}else if(n!==i){i=Vc(Error(ce(424)),e),e=HP(t,e,n,r,i);break e}else for(Cn=qo(e.stateNode.containerInfo.firstChild),Dn=e,Pt=!0,wi=null,r=dB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Oc(),n===i){e=io(t,e,r);break e}qr(t,e,n,r)}e=e.child}return e;case 5:return mB(e),t===null&&mw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,hw(n,i)?o=null:a!==null&&hw(n,a)&&(e.flags|=32),GB(t,e),qr(t,e,o,r),e.child;case 6:return t===null&&mw(e),null;case 13:return WB(t,e,r);case 4:return PC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=zc(e,null,n,r):qr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),FP(t,e,n,i,r);case 7:return qr(t,e,e.pendingProps,r),e.child;case 8:return qr(t,e,e.pendingProps.children,r),e.child;case 12:return qr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(Rm,n._currentValue),n._currentValue=o,a!==null)if(ki(a.value,o)){if(a.children===i.children&&!dn.current){e=io(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=$a(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),yw(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),yw(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}qr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Cc(e,r),i=ni(i),n=n(i),e.flags|=1,qr(t,e,n,r),e.child;case 14:return n=e.type,i=_i(n,e.pendingProps),i=_i(n.type,i),jP(t,e,n,i,r);case 15:return FB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),Xg(t,e),e.tag=1,pn(n)?(t=!0,km(e)):t=!1,Cc(e,r),zB(e,n,i),xw(e,n,i,r),bw(null,e,n,!0,t,r);case 19:return UB(t,e,r);case 22:return jB(t,e,r)}throw Error(ce(156,e.tag))};function s3(t,e){return R5(t,e)}function r9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(t,e,r,n){return new r9(t,e,r,n)}function WC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function n9(t){if(typeof t=="function")return WC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===uC)return 11;if(t===cC)return 14}return 2}function es(t,e){var r=t.alternate;return r===null?(r=Jn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Qg(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")WC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case nc:return Al(r.children,i,a,e);case lC:o=8,i|=8;break;case WS:return t=Jn(12,r,e,i|2),t.elementType=WS,t.lanes=a,t;case US:return t=Jn(13,r,e,i),t.elementType=US,t.lanes=a,t;case ZS:return t=Jn(19,r,e,i),t.elementType=ZS,t.lanes=a,t;case m5:return d0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case p5:o=10;break e;case g5:o=9;break e;case uC:o=11;break e;case cC:o=14;break e;case ko:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=Jn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Al(t,e,r,n){return t=Jn(7,t,n,e),t.lanes=r,t}function d0(t,e,r,n){return t=Jn(22,t,n,e),t.elementType=m5,t.lanes=r,t.stateNode={isHidden:!1},t}function fx(t,e,r){return t=Jn(6,t,null,e),t.lanes=r,t}function hx(t,e,r){return e=Jn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function i9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Z_(0),this.expirationTimes=Z_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z_(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function UC(t,e,r,n,i,a,o,s,l){return t=new i9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=Jn(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},AC(a),t}function a9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f3)}catch(t){console.error(t)}}f3(),f5.exports=En;var h3=f5.exports,tD=h3;GS.createRoot=tD.createRoot,GS.hydrateRoot=tD.hydrateRoot;/** +`+a.stack}return{value:t,source:e,stack:i,digest:null}}function dx(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Lw(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var X7=typeof WeakMap=="function"?WeakMap:Map;function YB(t,e,r){r=$a(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Wm||(Wm=!0,zw=n),Lw(t,e)},r}function XB(t,e,r){r=$a(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Lw(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Lw(t,e),typeof n!="function"&&(Qo===null?Qo=new Set([this]):Qo.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function UP(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new X7;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=u9.bind(null,t,e,r),e.then(t,t))}function ZP(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function $P(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=$a(-1,1),e.tag=2,Ko(r,e,1))),r.lanes|=1),t)}var q7=vo.ReactCurrentOwner,vn=!1;function qr(t,e,r,n){e.child=t===null?TB(e,null,r,n):Bc(e,t.child,r,n)}function YP(t,e,r,n,i){r=r.render;var a=e.ref;return Mc(e,i),n=BC(t,e,r,n,a,i),r=VC(),t!==null&&!vn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,io(t,e,i)):(Pt&&r&&MC(e),e.flags|=1,qr(t,e,n,i),e.child)}function XP(t,e,r,n,i){if(t===null){var a=r.type;return typeof a=="function"&&!XC(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,qB(t,e,a,n,i)):(t=rm(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(a=t.child,!(t.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Av,r(o,n)&&t.ref===e.ref)return io(t,e,i)}return e.flags|=1,t=es(a,n),t.ref=e.ref,t.return=e,e.child=t}function qB(t,e,r,n,i){if(t!==null){var a=t.memoizedProps;if(Av(a,n)&&t.ref===e.ref)if(vn=!1,e.pendingProps=n=a,(t.lanes&i)!==0)t.flags&131072&&(vn=!0);else return e.lanes=t.lanes,io(t,e,i)}return Aw(t,e,r,n,i)}function KB(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(dc,xn),xn|=r;else{if(!(r&1073741824))return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Mt(dc,xn),xn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Mt(dc,xn),xn|=n}else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Mt(dc,xn),xn|=n;return qr(t,e,i,r),e.child}function QB(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Aw(t,e,r,n,i){var a=pn(r)?Bl:$r.current;return a=Oc(e,a),Mc(e,i),r=BC(t,e,r,n,a,i),n=VC(),t!==null&&!vn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,io(t,e,i)):(Pt&&n&&MC(e),e.flags|=1,qr(t,e,r,i),e.child)}function qP(t,e,r,n,i){if(pn(r)){var a=!0;Nm(e)}else a=!1;if(Mc(e,i),e.stateNode===null)Jg(t,e),$B(e,r,n),Mw(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=ni(u):(u=pn(r)?Bl:$r.current,u=Oc(e,u));var c=r.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&WP(e,o,n,u),Io=!1;var h=e.memoizedState;o.state=h,Vm(e,n,o,i),l=e.memoizedState,s!==n||h!==l||dn.current||Io?(typeof c=="function"&&(Cw(e,r,c,n),l=e.memoizedState),(s=Io||HP(e,r,s,n,h,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,MB(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:_i(e.type,s),o.props=u,f=e.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=ni(l):(l=pn(r)?Bl:$r.current,l=Oc(e,l));var v=r.getDerivedStateFromProps;(c=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||h!==l)&&WP(e,o,n,l),Io=!1,h=e.memoizedState,o.state=h,Vm(e,n,o,i);var p=e.memoizedState;s!==f||h!==p||dn.current||Io?(typeof v=="function"&&(Cw(e,r,v,n),p=e.memoizedState),(u=Io||HP(e,r,u,n,h,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return Pw(t,e,r,n,a,i)}function Pw(t,e,r,n,i,a){QB(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&RP(e,r,!1),io(t,e,a);n=e.stateNode,q7.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Bc(e,t.child,null,a),e.child=Bc(e,null,s,a)):qr(t,e,s,a),e.memoizedState=n.state,i&&RP(e,r,!0),e.child}function JB(t){var e=t.stateNode;e.pendingContext?NP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&NP(t,e.context,!1),NC(t,e.containerInfo)}function KP(t,e,r,n,i){return zc(),AC(i),e.flags|=256,qr(t,e,r,n),e.child}var Dw={dehydrated:null,treeContext:null,retryLane:0};function kw(t){return{baseLanes:t,cachePool:null,transitions:null}}function e3(t,e,r){var n=e.pendingProps,i=Et.current,a=!1,o=(e.flags&128)!==0,s;if((s=o)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(a=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Mt(Et,i&1),t===null)return bw(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,a?(n=e.mode,a=e.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=x0(o,n,0,null),t=Pl(t,n,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=kw(r),e.memoizedState=Dw,t):GC(e,o));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return K7(t,e,o,n,s,i,r);if(a){a=n.fallback,o=e.mode,i=t.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=es(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=es(s,a):(a=Pl(a,o,r,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,n=a,a=e.child,o=t.child.memoizedState,o=o===null?kw(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=t.childLanes&~r,e.memoizedState=Dw,n}return a=t.child,t=a.sibling,n=es(a,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function GC(t,e){return e=x0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Cp(t,e,r,n){return n!==null&&AC(n),Bc(e,t.child,null,r),t=GC(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function K7(t,e,r,n,i,a,o){if(r)return e.flags&256?(e.flags&=-257,n=dx(Error(ce(422))),Cp(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=n.fallback,i=e.mode,n=x0({mode:"visible",children:n.children},i,0,null),a=Pl(a,i,o,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,e.mode&1&&Bc(e,t.child,null,o),e.child.memoizedState=kw(o),e.memoizedState=Dw,a);if(!(e.mode&1))return Cp(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(ce(419)),n=dx(a,n,void 0),Cp(t,e,o,n)}if(s=(o&t.childLanes)!==0,vn||s){if(n=br,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,no(t,i),Mi(n,t,i,-1))}return YC(),n=dx(Error(ce(421))),Cp(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=c9.bind(null,t),i._reactRetry=e,null):(t=a.treeContext,Cn=qo(i.nextSibling),Dn=e,Pt=!0,wi=null,t!==null&&(Yn[Xn++]=Va,Yn[Xn++]=Fa,Yn[Xn++]=Vl,Va=t.id,Fa=t.overflow,Vl=e),e=GC(e,n.children),e.flags|=4096,e)}function QP(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Tw(t.return,e,r)}function px(t,e,r,n,i){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function t3(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(qr(t,e,n.children,r),n=Et.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&QP(t,r,e);else if(t.tag===19)QP(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Mt(Et,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Fm(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),px(e,!1,i,r,a);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Fm(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}px(e,!0,r,null,a);break;case"together":px(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Jg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function io(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),jl|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ce(153));if(e.child!==null){for(t=e.child,r=es(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=es(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function Q7(t,e,r){switch(e.tag){case 3:JB(e),zc();break;case 5:LB(e);break;case 1:pn(e.type)&&Nm(e);break;case 4:NC(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Mt(zm,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Mt(Et,Et.current&1),e.flags|=128,null):r&e.child.childLanes?e3(t,e,r):(Mt(Et,Et.current&1),t=io(t,e,r),t!==null?t.sibling:null);Mt(Et,Et.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return t3(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Et,Et.current),n)break;return null;case 22:case 23:return e.lanes=0,KB(t,e,r)}return io(t,e,r)}var r3,Iw,n3,i3;r3=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Iw=function(){};n3=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,xl(fa.current);var a=null;switch(r){case"input":i=ew(t,i),n=ew(t,n),a=[];break;case"select":i=zt({},i,{value:void 0}),n=zt({},n,{value:void 0}),a=[];break;case"textarea":i=nw(t,i),n=nw(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Im)}aw(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Sv.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Sv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Lt("scroll",t),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};i3=function(t,e,r,n){r!==n&&(e.flags|=4)};function Kf(t,e){if(!Pt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Vr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function J7(t,e,r){var n=e.pendingProps;switch(LC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(e),null;case 1:return pn(e.type)&&Em(),Vr(e),null;case 3:return n=e.stateNode,Vc(),At(dn),At($r),OC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(bp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,wi!==null&&(Fw(wi),wi=null))),Iw(t,e),Vr(e),null;case 5:RC(e);var i=xl(Ev.current);if(r=e.type,t!==null&&e.stateNode!=null)n3(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ce(166));return Vr(e),null}if(t=xl(fa.current),bp(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[ta]=e,n[kv]=a,t=(e.mode&1)!==0,r){case"dialog":Lt("cancel",n),Lt("close",n);break;case"iframe":case"object":case"embed":Lt("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ta]=e,t[kv]=n,r3(t,e,!1,!1),e.stateNode=t;e:{switch(o=ow(r,n),r){case"dialog":Lt("cancel",t),Lt("close",t),i=n;break;case"iframe":case"object":case"embed":Lt("load",t),i=n;break;case"video":case"audio":for(i=0;ijc&&(e.flags|=128,n=!0,Kf(a,!1),e.lanes=4194304)}else{if(!n)if(t=Fm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Kf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>jc&&r!==1073741824&&(e.flags|=128,n=!0,Kf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(Vr(e),null);case 22:case 23:return $C(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?xn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function e9(t,e){switch(LC(e),e.tag){case 1:return pn(e.type)&&Em(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vc(),At(dn),At($r),OC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return RC(e),null;case 13:if(At(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));zc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(Et),null;case 4:return Vc(),null;case 10:return kC(e.type._context),null;case 22:case 23:return $C(),null;case 24:return null;default:return null}}var Mp=!1,Hr=!1,t9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function vc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ft(t,e,n)}else r.current=null}function Ew(t,e,r){try{r()}catch(n){Ft(t,e,n)}}var JP=!1;function r9(t,e){if(gw=Pm,t=uB(),CC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=t,h=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===t)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(mw={focusedElem:t,selectionRange:r},Pm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,_=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:_i(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(b){Ft(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=JP,JP=!1,p}function ev(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Ew(e,r,a)}i=i.next}while(i!==n)}}function y0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Nw(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function a3(t){var e=t.alternate;e!==null&&(t.alternate=null,a3(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ta],delete e[kv],delete e[xw],delete e[B7],delete e[V7])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function o3(t){return t.tag===5||t.tag===3||t.tag===4}function eD(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||o3(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Rw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Im));else if(n!==4&&(t=t.child,t!==null))for(Rw(t,e,r),t=t.sibling;t!==null;)Rw(t,e,r),t=t.sibling}function Ow(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Ow(t,e,r),t=t.sibling;t!==null;)Ow(t,e,r),t=t.sibling}var Lr=null,Si=!1;function xo(t,e,r){for(r=r.child;r!==null;)s3(t,e,r),r=r.sibling}function s3(t,e,r){if(ca&&typeof ca.onCommitFiberUnmount=="function")try{ca.onCommitFiberUnmount(c0,r)}catch{}switch(r.tag){case 5:Hr||vc(r,e);case 6:var n=Lr,i=Si;Lr=null,xo(t,e,r),Lr=n,Si=i,Lr!==null&&(Si?(t=Lr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Lr.removeChild(r.stateNode));break;case 18:Lr!==null&&(Si?(t=Lr,r=r.stateNode,t.nodeType===8?lx(t.parentNode,r):t.nodeType===1&&lx(t,r),Mv(t)):lx(Lr,r.stateNode));break;case 4:n=Lr,i=Si,Lr=r.stateNode.containerInfo,Si=!0,xo(t,e,r),Lr=n,Si=i;break;case 0:case 11:case 14:case 15:if(!Hr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Ew(r,e,o),i=i.next}while(i!==n)}xo(t,e,r);break;case 1:if(!Hr&&(vc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ft(r,e,s)}xo(t,e,r);break;case 21:xo(t,e,r);break;case 22:r.mode&1?(Hr=(n=Hr)||r.memoizedState!==null,xo(t,e,r),Hr=n):xo(t,e,r);break;default:xo(t,e,r)}}function tD(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new t9),e.forEach(function(n){var i=f9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function di(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*i9(n/1960))-n,10t?16:t,Bo===null)var n=!1;else{if(t=Bo,Bo=null,Um=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-UC?Al(t,0):WC|=r),gn(t,e)}function p3(t,e){e===0&&(t.mode&1?(e=mp,mp<<=1,!(mp&130023424)&&(mp=4194304)):e=1);var r=en();t=no(t,e),t!==null&&(xd(t,e,r),gn(t,r))}function c9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),p3(t,r)}function f9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),p3(t,r)}var g3;g3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||dn.current)vn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return vn=!1,Q7(t,e,r);vn=!!(t.flags&131072)}else vn=!1,Pt&&e.flags&1048576&&xB(e,Om,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Jg(t,e),t=e.pendingProps;var i=Oc(e,$r.current);Mc(e,r),i=BC(null,e,n,t,i,r);var a=VC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,pn(n)?(a=!0,Nm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,EC(e),i.updater=m0,e.stateNode=i,i._reactInternals=e,Mw(e,n,t,r),e=Pw(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&MC(e),qr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Jg(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=v9(n),t=_i(n,t),i){case 0:e=Aw(null,e,n,t,r);break e;case 1:e=qP(null,e,n,t,r);break e;case 11:e=YP(null,e,n,t,r);break e;case 14:e=XP(null,e,n,_i(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),Aw(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),qP(t,e,n,i,r);case 3:e:{if(JB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,MB(t,e),Vm(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Fc(Error(ce(423)),e),e=KP(t,e,n,r,i);break e}else if(n!==i){i=Fc(Error(ce(424)),e),e=KP(t,e,n,r,i);break e}else for(Cn=qo(e.stateNode.containerInfo.firstChild),Dn=e,Pt=!0,wi=null,r=TB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(zc(),n===i){e=io(t,e,r);break e}qr(t,e,n,r)}e=e.child}return e;case 5:return LB(e),t===null&&bw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,yw(n,i)?o=null:a!==null&&yw(n,a)&&(e.flags|=32),QB(t,e),qr(t,e,o,r),e.child;case 6:return t===null&&bw(e),null;case 13:return e3(t,e,r);case 4:return NC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Bc(e,null,n,r):qr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),YP(t,e,n,i,r);case 7:return qr(t,e,e.pendingProps,r),e.child;case 8:return qr(t,e,e.pendingProps.children,r),e.child;case 12:return qr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(zm,n._currentValue),n._currentValue=o,a!==null)if(ki(a.value,o)){if(a.children===i.children&&!dn.current){e=io(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=$a(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Tw(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Tw(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}qr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Mc(e,r),i=ni(i),n=n(i),e.flags|=1,qr(t,e,n,r),e.child;case 14:return n=e.type,i=_i(n,e.pendingProps),i=_i(n.type,i),XP(t,e,n,i,r);case 15:return qB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:_i(n,i),Jg(t,e),e.tag=1,pn(n)?(t=!0,Nm(e)):t=!1,Mc(e,r),$B(e,n,i),Mw(e,n,i,r),Pw(null,e,n,!0,t,r);case 19:return t3(t,e,r);case 22:return KB(t,e,r)}throw Error(ce(156,e.tag))};function m3(t,e){return W5(t,e)}function h9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(t,e,r,n){return new h9(t,e,r,n)}function XC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function v9(t){if(typeof t=="function")return XC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===dC)return 11;if(t===pC)return 14}return 2}function es(t,e){var r=t.alternate;return r===null?(r=Jn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function rm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")XC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ic:return Pl(r.children,i,a,e);case vC:o=8,i|=8;break;case qS:return t=Jn(12,r,e,i|2),t.elementType=qS,t.lanes=a,t;case KS:return t=Jn(13,r,e,i),t.elementType=KS,t.lanes=a,t;case QS:return t=Jn(19,r,e,i),t.elementType=QS,t.lanes=a,t;case L5:return x0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case C5:o=10;break e;case M5:o=9;break e;case dC:o=11;break e;case pC:o=14;break e;case ko:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=Jn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Pl(t,e,r,n){return t=Jn(7,t,n,e),t.lanes=r,t}function x0(t,e,r,n){return t=Jn(22,t,n,e),t.elementType=L5,t.lanes=r,t.stateNode={isHidden:!1},t}function gx(t,e,r){return t=Jn(6,t,null,e),t.lanes=r,t}function mx(t,e,r){return e=Jn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function d9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=K_(0),this.expirationTimes=K_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=K_(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qC(t,e,r,n,i,a,o,s,l){return t=new d9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=Jn(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},EC(a),t}function p9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S3)}catch(t){console.error(t)}}S3(),S5.exports=En;var w3=S5.exports,uD=w3;YS.createRoot=uD.createRoot,YS.hydrateRoot=uD.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Nv(){return Nv=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function XC(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function f9(){return Math.random().toString(36).substr(2,8)}function nD(t,e){return{usr:t.state,key:t.key,idx:e}}function Nw(t,e,r,n){return r===void 0&&(r=null),Nv({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?lf(e):e,{state:r,key:e&&e.key||n||f9()})}function Um(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function lf(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function h9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Vo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Nv({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Vo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=Vo.Push;let _=Nw(g.location,m,y);u=c()+1;let S=nD(_,u),b=g.createHref(_);try{o.pushState(S,"",b)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(b)}a&&l&&l({action:s,location:g.location,delta:1})}function v(m,y){s=Vo.Replace;let _=Nw(g.location,m,y);u=c();let S=nD(_,u),b=g.createHref(_);o.replaceState(S,"",b),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:Um(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(rD,f),l=m,()=>{i.removeEventListener(rD,f),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:v,go(m){return o.go(m)}};return g}var iD;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(iD||(iD={}));function v9(t,e,r){return r===void 0&&(r="/"),d9(t,e,r)}function d9(t,e,r,n){let i=typeof e=="string"?lf(e):e,a=qC(i.pathname||"/",r);if(a==null)return null;let o=v3(t);p9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=ts([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),v3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:w9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of d3(a.path))i(a,o,l)}),e}function d3(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=d3(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function p9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:b9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const g9=/^:[\w-]+$/,m9=3,y9=2,_9=1,x9=10,S9=-2,aD=t=>t==="*";function w9(t,e){let r=t.split("/"),n=r.length;return r.some(aD)&&(n+=S9),e&&(n+=y9),r.filter(i=>!aD(i)).reduce((i,a)=>i+(g9.test(a)?m9:a===""?_9:x9),n)}function b9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function T9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:v}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return v&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function M9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),XC(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function L9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return XC(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function qC(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const A9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P9=t=>A9.test(t);function D9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?lf(t):t,a;if(r)if(P9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),XC(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=oD(r.substring(1),"/"):a=oD(r,e)}else a=e;return{pathname:a,search:E9(n),hash:R9(i)}}function oD(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function vx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function k9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function p3(t,e){let r=k9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function g3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=lf(t):(i=Nv({},t),nr(!i.pathname||!i.pathname.includes("?"),vx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),vx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),vx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=D9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ts=t=>t.join("/").replace(/\/\/+/g,"/"),I9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),E9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,R9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function N9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const m3=["post","put","patch","delete"];new Set(m3);const O9=["get",...m3];new Set(O9);/** + */function Bv(){return Bv=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function e2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function S9(){return Math.random().toString(36).substr(2,8)}function fD(t,e){return{usr:t.state,key:t.key,idx:e}}function jw(t,e,r,n){return r===void 0&&(r=null),Bv({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?cf(e):e,{state:r,key:e&&e.key||n||S9()})}function Ym(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function cf(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function w9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Vo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Bv({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Vo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=Vo.Push;let _=jw(g.location,m,y);u=c()+1;let S=fD(_,u),b=g.createHref(_);try{o.pushState(S,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(b)}a&&l&&l({action:s,location:g.location,delta:1})}function v(m,y){s=Vo.Replace;let _=jw(g.location,m,y);u=c();let S=fD(_,u),b=g.createHref(_);o.replaceState(S,"",b),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:Ym(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(cD,f),l=m,()=>{i.removeEventListener(cD,f),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:v,go(m){return o.go(m)}};return g}var hD;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(hD||(hD={}));function b9(t,e,r){return r===void 0&&(r="/"),T9(t,e,r)}function T9(t,e,r,n){let i=typeof e=="string"?cf(e):e,a=t2(i.pathname||"/",r);if(a==null)return null;let o=b3(t);C9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=ts([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),b3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:I9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of T3(a.path))i(a,o,l)}),e}function T3(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=T3(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function C9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:E9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const M9=/^:[\w-]+$/,L9=3,A9=2,P9=1,D9=10,k9=-2,vD=t=>t==="*";function I9(t,e){let r=t.split("/"),n=r.length;return r.some(vD)&&(n+=k9),e&&(n+=A9),r.filter(i=>!vD(i)).reduce((i,a)=>i+(M9.test(a)?L9:a===""?P9:D9),n)}function E9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function N9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:v}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return v&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function O9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),e2(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function z9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return e2(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function t2(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const B9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V9=t=>B9.test(t);function F9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?cf(t):t,a;if(r)if(V9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),e2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=dD(r.substring(1),"/"):a=dD(r,e)}else a=e;return{pathname:a,search:H9(n),hash:W9(i)}}function dD(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function yx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function j9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function C3(t,e){let r=j9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function M3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=cf(t):(i=Bv({},t),nr(!i.pathname||!i.pathname.includes("?"),yx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),yx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),yx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=F9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ts=t=>t.join("/").replace(/\/\/+/g,"/"),G9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),H9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,W9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function U9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const L3=["post","put","patch","delete"];new Set(L3);const Z9=["get",...L3];new Set(Z9);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ov(){return Ov=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),q.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=g3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:ts([e,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[e,n,o,a,t])}function x3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=q.useContext(tu),{matches:i}=q.useContext(ru),{pathname:a}=Sd(),o=JSON.stringify(p3(i,n.v7_relativeSplatPath));return q.useMemo(()=>g3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function j9(t,e){return G9(t,e)}function G9(t,e,r,n){xd()||nr(!1);let{navigator:i}=q.useContext(tu),{matches:a}=q.useContext(ru),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Sd(),c;if(e){var f;let m=typeof e=="string"?lf(e):e;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||nr(!1),c=m}else c=u;let h=c.pathname||"/",v=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");v="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=v9(t,{pathname:v}),g=$9(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:ts([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:ts([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?q.createElement(_0.Provider,{value:{location:Ov({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vo.Pop}},g):g}function H9(){let t=K9(),e=N9(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return q.createElement(q.Fragment,null,q.createElement("h2",null,"Unexpected Application Error!"),q.createElement("h3",{style:{fontStyle:"italic"}},e),r?q.createElement("pre",{style:i},r):null,null)}const W9=q.createElement(H9,null);class U9 extends q.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?q.createElement(ru.Provider,{value:this.props.routeContext},q.createElement(y3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z9(t){let{routeContext:e,match:r,children:n}=t,i=q.useContext(KC);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),q.createElement(ru.Provider,{value:e},n)}function $9(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let v,p=!1,g=null,m=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||W9,l&&(u<0&&h===0?(J9("route-fallback"),p=!0,m=null):u===h&&(p=!0,m=f.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,h+1)),_=()=>{let S;return v?S=g:p?S=m:f.route.Component?S=q.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,q.createElement(Z9,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?q.createElement(U9,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var S3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(S3||{}),w3=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(w3||{});function Y9(t){let e=q.useContext(KC);return e||nr(!1),e}function X9(t){let e=q.useContext(z9);return e||nr(!1),e}function q9(t){let e=q.useContext(ru);return e||nr(!1),e}function b3(t){let e=q9(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function K9(){var t;let e=q.useContext(y3),r=X9(),n=b3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function Q9(){let{router:t}=Y9(S3.UseNavigateStable),e=b3(w3.UseNavigateStable),r=q.useRef(!1);return _3(()=>{r.current=!0}),q.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ov({fromRouteId:e},a)))},[t,e])}const sD={};function J9(t,e,r){sD[t]||(sD[t]=!0)}function eZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Ku(t){nr(!1)}function tZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Vo.Pop,navigator:a,static:o=!1,future:s}=t;xd()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=q.useMemo(()=>({basename:l,navigator:a,static:o,future:Ov({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=lf(n));let{pathname:c="/",search:f="",hash:h="",state:v=null,key:p="default"}=n,g=q.useMemo(()=>{let m=qC(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:v,key:p},navigationType:i}},[l,c,f,h,v,p,i]);return g==null?null:q.createElement(tu.Provider,{value:u},q.createElement(_0.Provider,{children:r,value:g}))}function rZ(t){let{children:e,location:r}=t;return j9(Ow(e),r)}new Promise(()=>{});function Ow(t,e){e===void 0&&(e=[]);let r=[];return q.Children.forEach(t,(n,i)=>{if(!q.isValidElement(n))return;let a=[...e,i];if(n.type===q.Fragment){r.push.apply(r,Ow(n.props.children,a));return}n.type!==Ku&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Ow(n.props.children,a)),r.push(o)}),r}/** + */function Vv(){return Vv=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),Y.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=M3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:ts([e,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[e,n,o,a,t])}function k3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=Y.useContext(ru),{matches:i}=Y.useContext(nu),{pathname:a}=Cd(),o=JSON.stringify(C3(i,n.v7_relativeSplatPath));return Y.useMemo(()=>M3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function q9(t,e){return K9(t,e)}function K9(t,e,r,n){Td()||nr(!1);let{navigator:i}=Y.useContext(ru),{matches:a}=Y.useContext(nu),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Cd(),c;if(e){var f;let m=typeof e=="string"?cf(e):e;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||nr(!1),c=m}else c=u;let h=c.pathname||"/",v=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");v="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=b9(t,{pathname:v}),g=rZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:ts([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:ts([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?Y.createElement(C0.Provider,{value:{location:Vv({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vo.Pop}},g):g}function Q9(){let t=oZ(),e=U9(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Y.createElement(Y.Fragment,null,Y.createElement("h2",null,"Unexpected Application Error!"),Y.createElement("h3",{style:{fontStyle:"italic"}},e),r?Y.createElement("pre",{style:i},r):null,null)}const J9=Y.createElement(Q9,null);class eZ extends Y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?Y.createElement(nu.Provider,{value:this.props.routeContext},Y.createElement(A3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tZ(t){let{routeContext:e,match:r,children:n}=t,i=Y.useContext(r2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Y.createElement(nu.Provider,{value:e},n)}function rZ(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let v,p=!1,g=null,m=null;r&&(v=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||J9,l&&(u<0&&h===0?(lZ("route-fallback"),p=!0,m=null):u===h&&(p=!0,m=f.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,h+1)),_=()=>{let S;return v?S=g:p?S=m:f.route.Component?S=Y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,Y.createElement(tZ,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?Y.createElement(eZ,{location:r.location,revalidation:r.revalidation,component:g,error:v,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var I3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(I3||{}),E3=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(E3||{});function nZ(t){let e=Y.useContext(r2);return e||nr(!1),e}function iZ(t){let e=Y.useContext($9);return e||nr(!1),e}function aZ(t){let e=Y.useContext(nu);return e||nr(!1),e}function N3(t){let e=aZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function oZ(){var t;let e=Y.useContext(A3),r=iZ(),n=N3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function sZ(){let{router:t}=nZ(I3.UseNavigateStable),e=N3(E3.UseNavigateStable),r=Y.useRef(!1);return P3(()=>{r.current=!0}),Y.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Vv({fromRouteId:e},a)))},[t,e])}const pD={};function lZ(t,e,r){pD[t]||(pD[t]=!0)}function uZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Qu(t){nr(!1)}function cZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Vo.Pop,navigator:a,static:o=!1,future:s}=t;Td()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=Y.useMemo(()=>({basename:l,navigator:a,static:o,future:Vv({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=cf(n));let{pathname:c="/",search:f="",hash:h="",state:v=null,key:p="default"}=n,g=Y.useMemo(()=>{let m=t2(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:v,key:p},navigationType:i}},[l,c,f,h,v,p,i]);return g==null?null:Y.createElement(ru.Provider,{value:u},Y.createElement(C0.Provider,{children:r,value:g}))}function fZ(t){let{children:e,location:r}=t;return q9(Gw(e),r)}new Promise(()=>{});function Gw(t,e){e===void 0&&(e=[]);let r=[];return Y.Children.forEach(t,(n,i)=>{if(!Y.isValidElement(n))return;let a=[...e,i];if(n.type===Y.Fragment){r.push.apply(r,Gw(n.props.children,a));return}n.type!==Qu&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Gw(n.props.children,a)),r.push(o)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -64,257 +64,282 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zw(){return zw=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function iZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function aZ(t,e){return t.button===0&&(!e||e==="_self")&&!iZ(t)}const oZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],sZ="6";try{window.__reactRouterVersion=sZ}catch{}const lZ="startTransition",lD=JW[lZ];function uZ(t){let{basename:e,children:r,future:n,window:i}=t,a=q.useRef();a.current==null&&(a.current=c9({window:i,v5Compat:!0}));let o=a.current,[s,l]=q.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=q.useCallback(f=>{u&&lD?lD(()=>l(f)):l(f)},[l,u]);return q.useLayoutEffect(()=>o.listen(c),[o,c]),q.useEffect(()=>eZ(n),[n]),q.createElement(tZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const cZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hZ=q.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=e,h=nZ(e,oZ),{basename:v}=q.useContext(tu),p,g=!1;if(typeof u=="string"&&fZ.test(u)&&(p=u,cZ))try{let S=new URL(window.location.href),b=u.startsWith("//")?new URL(S.protocol+u):new URL(u),T=qC(b.pathname,v);b.origin===S.origin&&T!=null?u=T+b.search+b.hash:g=!0}catch{}let m=B9(u,{relative:i}),y=vZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(S){n&&n(S),S.defaultPrevented||y(S)}return q.createElement("a",zw({},h,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var uD;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uD||(uD={}));var cD;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(cD||(cD={}));function vZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=V9(),u=Sd(),c=x3(t,{relative:o});return q.useCallback(f=>{if(aZ(f,r)){f.preventDefault();let h=n!==void 0?n:Um(u)===Um(c);l(t,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/** + */function Hw(){return Hw=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function vZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function dZ(t,e){return t.button===0&&(!e||e==="_self")&&!vZ(t)}const pZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gZ="6";try{window.__reactRouterVersion=gZ}catch{}const mZ="startTransition",gD=uU[mZ];function yZ(t){let{basename:e,children:r,future:n,window:i}=t,a=Y.useRef();a.current==null&&(a.current=x9({window:i,v5Compat:!0}));let o=a.current,[s,l]=Y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=Y.useCallback(f=>{u&&gD?gD(()=>l(f)):l(f)},[l,u]);return Y.useLayoutEffect(()=>o.listen(c),[o,c]),Y.useEffect(()=>uZ(n),[n]),Y.createElement(cZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const _Z=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,SZ=Y.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=e,h=hZ(e,pZ),{basename:v}=Y.useContext(ru),p,g=!1;if(typeof u=="string"&&xZ.test(u)&&(p=u,_Z))try{let S=new URL(window.location.href),b=u.startsWith("//")?new URL(S.protocol+u):new URL(u),C=t2(b.pathname,v);b.origin===S.origin&&C!=null?u=C+b.search+b.hash:g=!0}catch{}let m=Y9(u,{relative:i}),y=wZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(S){n&&n(S),S.defaultPrevented||y(S)}return Y.createElement("a",Hw({},h,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var mD;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(mD||(mD={}));var yD;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(yD||(yD={}));function wZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=D3(),u=Cd(),c=k3(t,{relative:o});return Y.useCallback(f=>{if(dZ(f,r)){f.preventDefault();let h=n!==void 0?n:Ym(u)===Ym(c);l(t,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T3=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/** + */const bZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R3=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var pZ={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"};/** + */var TZ={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"};/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gZ=q.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>q.createElement("svg",{ref:l,...pZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:T3("lucide",i),...s},[...o.map(([u,c])=>q.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + */const CZ=Y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>Y.createElement("svg",{ref:l,...TZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:R3("lucide",i),...s},[...o.map(([u,c])=>Y.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $e=(t,e)=>{const r=q.forwardRef(({className:n,...i},a)=>q.createElement(gZ,{ref:a,iconNode:e,className:T3(`lucide-${dZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/** + */const Ve=(t,e)=>{const r=Y.forwardRef(({className:n,...i},a)=>Y.createElement(CZ,{ref:a,iconNode:e,className:R3(`lucide-${bZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QC=$e("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const n2=Ve("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C3=$e("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const _x=Ve("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mZ=$e("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + */const Xm=Ve("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yZ=$e("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"}]]);/** + */const MZ=Ve("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _Z=$e("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + */const LZ=Ve("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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xZ=$e("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** + */const AZ=Ve("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SZ=$e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const PZ=Ve("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JC=$e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const DZ=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M3=$e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const i2=Ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wZ=$e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const kZ=Ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L3=$e("CircleAlert",[["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"}]]);/** + */const a2=Ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Jg=$e("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** + */const IZ=Ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e2=$e("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** + */const M0=Ve("CircleAlert",[["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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A3=$e("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + */const nv=Ve("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bZ=$e("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + */const qm=Ve("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TZ=$e("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"}]]);/** + */const Fv=Ve("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zm=$e("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const O3=Ve("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CZ=$e("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** + */const EZ=Ve("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const P3=$e("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const NZ=Ve("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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const D3=$e("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + */const Km=Ve("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MZ=$e("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** + */const RZ=Ve("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Bw=$e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + */const z3=Ve("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LZ=$e("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + */const o2=Ve("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k3=$e("LayoutDashboard",[["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"}]]);/** + */const OZ=Ve("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I3=$e("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + */const Qm=Ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AZ=$e("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** + */const zZ=Ve("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PZ=$e("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + */const B3=Ve("LayoutDashboard",[["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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DZ=$e("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** + */const V3=Ve("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kZ=$e("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const BZ=Ve("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IZ=$e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const VZ=Ve("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x0=$e("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + */const FZ=Ve("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EZ=$e("RefreshCw",[["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"}]]);/** + */const jZ=Ve("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RZ=$e("RotateCcw",[["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"}]]);/** + */const GZ=Ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NZ=$e("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** + */const Gc=Ve("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OZ=$e("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"}]]);/** + */const HZ=Ve("RefreshCw",[["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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zZ=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const WZ=Ve("RotateCcw",[["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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E3=$e("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const UZ=Ve("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fD=$e("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + */const ZZ=Ve("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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BZ=$e("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + */const $Z=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VZ=$e("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** + */const F3=Ve("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FZ=$e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const _D=Ve("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const S0=$e("TriangleAlert",[["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"}]]);/** + */const YZ=Ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jZ=$e("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"}]]);/** + */const XZ=Ve("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hD=$e("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** + */const qZ=Ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GZ=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + */const vs=Ve("TriangleAlert",[["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"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const R3=$e("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"}]]);async function Cr(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function vD(){return Cr("/api/status")}async function HZ(){return Cr("/api/health")}async function WZ(){return Cr("/api/nodes")}async function UZ(){return Cr("/api/edges")}async function ZZ(){return Cr("/api/sources")}async function $Z(){return Cr("/api/alerts/active")}async function N3(){return Cr("/api/env/status")}async function YZ(){return Cr("/api/env/active")}async function XZ(){return Cr("/api/env/propagation")}async function qZ(){return Cr("/api/env/swpc")}async function KZ(){return Cr("/api/env/ducting")}async function QZ(){return Cr("/api/env/fires")}async function JZ(){return Cr("/api/env/avalanche")}async function e$(){return Cr("/api/env/streams")}async function t$(){return Cr("/api/env/traffic")}async function r$(){return Cr("/api/env/roads")}async function n$(){return Cr("/api/env/hotspots")}async function i$(){return Cr("/api/regions")}function O3(){const[t,e]=q.useState(!1),[r,n]=q.useState(null),[i,a]=q.useState(null),o=q.useRef(null),s=q.useRef(null),l=q.useRef(1e3),u=q.useCallback(()=>{var h;if(((h=o.current)==null?void 0:h.readyState)===WebSocket.OPEN)return;const f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const v=new WebSocket(f);o.current=v,v.onopen=()=>{e(!0),l.current=1e3},v.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},v.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},v.onerror=()=>{v.close()};const p=setInterval(()=>{v.readyState===WebSocket.OPEN&&v.send("ping")},3e4);v.addEventListener("close",()=>{clearInterval(p)})}catch(v){console.error("Failed to create WebSocket:",v)}},[]);return q.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const z3=[{path:"/",label:"Dashboard",icon:k3},{path:"/mesh",label:"Mesh",icon:x0},{path:"/environment",label:"Environment",icon:e2},{path:"/config",label:"Config",icon:E3},{path:"/alerts",label:"Alerts",icon:C3}];function a$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function o$(t){const e=z3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function s$({children:t}){var l;const e=Sd(),{connected:r}=O3(),[n,i]=q.useState(null),[a,o]=q.useState(new Date);q.useEffect(()=>{vD().then(i).catch(console.error);const u=setInterval(()=>{vD().then(i).catch(console.error)},3e4);return()=>clearInterval(u)},[]),q.useEffect(()=>{const u=setInterval(()=>o(new Date),1e3);return()=>clearInterval(u)},[]);const s=a.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return M.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[M.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[M.jsx("div",{className:"p-5 border-b border-border",children:M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),M.jsxs("div",{children:[M.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),M.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(n==null?void 0:n.version)||"..."]})]})]})}),M.jsx("nav",{className:"flex-1 py-4",children:z3.map(u=>{const c=e.pathname===u.path,f=u.icon;return M.jsxs(hZ,{to:u.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${c?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[c&&M.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),M.jsx(f,{size:18}),u.label]},u.path)})}),M.jsxs("div",{className:"p-5 border-t border-border",children:[M.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[M.jsx("div",{className:`w-2 h-2 rounded-full ${n!=null&&n.connected?"bg-green-500":"bg-red-500"}`}),M.jsx("span",{className:"text-xs text-slate-400",children:n!=null&&n.connected?"Connected":"Disconnected"})]}),M.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(l=n==null?void 0:n.connection_type)==null?void 0:l.toUpperCase(),": ",n==null?void 0:n.connection_target]}),M.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",n?a$(n.uptime_seconds):"..."]})]})]}),M.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[M.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[M.jsx("h1",{className:"text-lg font-semibold",children:o$(e.pathname)}),M.jsxs("div",{className:"flex items-center gap-6",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),M.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),M.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[s," MT"]})]})]}),M.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function l$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return M.jsx("div",{className:"flex flex-col items-center",children:M.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[M.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),M.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),M.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),M.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Cp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),M.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:M.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),M.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function u$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:Bw,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return M.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[M.jsx(n,{size:16,className:r.iconColor}),M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("div",{className:"text-sm text-slate-200",children:t.message}),M.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function c$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return M.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[M.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),M.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Mp({icon:t,label:e,value:r,subvalue:n}){return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[M.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[M.jsx(t,{size:14}),M.jsx("span",{className:"text-xs",children:e})]}),M.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&M.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function f$({propagation:t}){var o,s,l;if(!t)return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),M.jsx("div",{className:"text-slate-500",children:M.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(R3,{size:14}),"RF Propagation"]}),M.jsxs("div",{className:"mb-4",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?M.jsxs("div",{className:"space-y-1",children:[M.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),M.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&M.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):M.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?M.jsxs("div",{className:"space-y-1",children:[M.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),M.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&M.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):M.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function h$(){var g,m,y,_,S;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState(null),[c,f]=q.useState(!0),[h,v]=q.useState(null),{lastHealth:p}=O3();return q.useEffect(()=>{Promise.all([HZ(),ZZ(),$Z(),N3(),XZ().catch(()=>null)]).then(([b,T,C,A,D])=>{e(b),n(T),a(C),s(A),u(D),f(!1)}).catch(b=>{v(b.message),f(!1)})},[]),q.useEffect(()=>{p&&e(p)},[p]),c?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsx("div",{className:"text-slate-400",children:"Loading..."})}):h?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):M.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&M.jsxs(M.Fragment,{children:[M.jsx(l$,{health:t}),M.jsxs("div",{className:"mt-6 space-y-3",children:[M.jsx(Cp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),M.jsx(Cp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),M.jsx(Cp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),M.jsx(Cp,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),M.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?M.jsx("div",{className:"space-y-3",children:i.map((b,T)=>M.jsx(u$,{alert:b},T))}):M.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[M.jsx(Jg,{size:16,className:"text-green-500"}),M.jsx("span",{children:"No active alerts"})]})]}),M.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[M.jsx(Mp,{icon:x0,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),M.jsx(Mp,{icon:A3,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),M.jsx(Mp,{icon:QC,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),M.jsx(Mp,{icon:I3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?M.jsx("div",{className:"space-y-2",children:r.map((b,T)=>M.jsx(c$,{source:b},T))}):M.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?M.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):M.jsxs("div",{className:"text-slate-500",children:[M.jsx("p",{children:"Environmental feeds not enabled."}),M.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),M.jsx(f$,{propagation:l})]})}/*! ***************************************************************************** + */const KZ=Ve("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QZ=Ve("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j3=Ve("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"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xD=Ve("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G3=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + * @license lucide-react v0.383.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s2=Ve("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"}]]);async function or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function SD(){return or("/api/status")}async function JZ(){return or("/api/health")}async function e$(){return or("/api/nodes")}async function t$(){return or("/api/edges")}async function r$(){return or("/api/sources")}async function H3(){return or("/api/alerts/active")}async function wD(t=50,e=0,r,n){const i=new URLSearchParams;return i.set("limit",t.toString()),i.set("offset",e.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),or(`/api/alerts/history?${i.toString()}`)}async function n$(){return or("/api/subscriptions")}async function W3(){return or("/api/env/status")}async function i$(){return or("/api/env/active")}async function a$(){return or("/api/env/propagation")}async function o$(){return or("/api/env/swpc")}async function s$(){return or("/api/env/ducting")}async function l$(){return or("/api/env/fires")}async function u$(){return or("/api/env/avalanche")}async function c$(){return or("/api/env/streams")}async function f$(){return or("/api/env/traffic")}async function h$(){return or("/api/env/roads")}async function v$(){return or("/api/env/hotspots")}async function d$(){return or("/api/regions")}function l2(){const[t,e]=Y.useState(!1),[r,n]=Y.useState(null),[i,a]=Y.useState(null),o=Y.useRef(null),s=Y.useRef(null),l=Y.useRef(1e3),u=Y.useCallback(()=>{var h;if(((h=o.current)==null?void 0:h.readyState)===WebSocket.OPEN)return;const f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const v=new WebSocket(f);o.current=v,v.onopen=()=>{e(!0),l.current=1e3},v.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},v.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},v.onerror=()=>{v.close()};const p=setInterval(()=>{v.readyState===WebSocket.OPEN&&v.send("ping")},3e4);v.addEventListener("close",()=>{clearInterval(p)})}catch(v){console.error("Failed to create WebSocket:",v)}},[]);return Y.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const U3=Y.createContext(null);function p$(){const t=Y.useContext(U3);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function g$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:M0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:vs,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:Qm,iconColor:"text-blue-500"}}}function m$({toast:t,onDismiss:e,onNavigate:r}){const n=g$(t.alert.severity),i=n.icon;return Y.useEffect(()=>{const a=setTimeout(e,8e3);return()=>clearTimeout(a)},[e]),T.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:T.jsxs("div",{className:"flex items-start gap-3 p-4",children:[T.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),T.jsx(i,{size:18,className:n.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[T.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:t.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),T.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:t.alert.message})]}),T.jsx("button",{onClick:a=>{a.stopPropagation(),e()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:T.jsx(G3,{size:16})})]})})}function y$({children:t}){const[e,r]=Y.useState([]),n=D3(),i=Y.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=Y.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=Y.useCallback(()=>{n("/alerts")},[n]);return T.jsxs(U3.Provider,{value:{addToast:i},children:[t,T.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:e.map(s=>T.jsx("div",{className:"pointer-events-auto",children:T.jsx(m$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const Z3=[{path:"/",label:"Dashboard",icon:B3},{path:"/mesh",label:"Mesh",icon:Gc},{path:"/environment",label:"Environment",icon:Fv},{path:"/config",label:"Config",icon:F3},{path:"/alerts",label:"Alerts",icon:Xm}];function _$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function x$(t){const e=Z3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function S$({children:t}){var h;const e=Cd(),{connected:r,lastAlert:n}=l2(),{addToast:i}=p$(),[a,o]=Y.useState(null),[s,l]=Y.useState(null);Y.useEffect(()=>{if(n){const v=`${n.type}-${n.message}-${n.timestamp}`;v!==s&&(l(v),i(n))}},[n,s,i]);const[u,c]=Y.useState(new Date);Y.useEffect(()=>{SD().then(o).catch(console.error);const v=setInterval(()=>{SD().then(o).catch(console.error)},3e4);return()=>clearInterval(v)},[]),Y.useEffect(()=>{const v=setInterval(()=>c(new Date),1e3);return()=>clearInterval(v)},[]);const f=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return T.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[T.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[T.jsx("div",{className:"p-5 border-b border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),T.jsxs("div",{children:[T.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),T.jsx("nav",{className:"flex-1 py-4",children:Z3.map(v=>{const p=e.pathname===v.path,g=v.icon;return T.jsxs(SZ,{to:v.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${p?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p&&T.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),T.jsx(g,{size:18}),v.label]},v.path)})}),T.jsxs("div",{className:"p-5 border-t border-border",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(h=a==null?void 0:a.connection_type)==null?void 0:h.toUpperCase(),": ",a==null?void 0:a.connection_target]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?_$(a.uptime_seconds):"..."]})]})]}),T.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[T.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[T.jsx("h1",{className:"text-lg font-semibold",children:x$(e.pathname)}),T.jsxs("div",{className:"flex items-center gap-6",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),T.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[f," MT"]})]})]}),T.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function w$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return T.jsx("div",{className:"flex flex-col items-center",children:T.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[T.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),T.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),T.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),T.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Pp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),T.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:T.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),T.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function b$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:M0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:vs,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:Qm,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return T.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[T.jsx(n,{size:16,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200",children:t.message}),T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function T$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),T.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Dp({icon:t,label:e,value:r,subvalue:n}){return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[T.jsx(t,{size:14}),T.jsx("span",{className:"text-xs",children:e})]}),T.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function C$({propagation:t}){var o,s,l;if(!t)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),T.jsx("div",{className:"text-slate-500",children:T.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(s2,{size:14}),"RF Propagation"]}),T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?T.jsxs("div",{className:"space-y-1",children:[T.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),T.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&T.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):T.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),T.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&T.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):T.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function M$(){var g,m,y,_,S;const[t,e]=Y.useState(null),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(null),[l,u]=Y.useState(null),[c,f]=Y.useState(!0),[h,v]=Y.useState(null),{lastHealth:p}=l2();return Y.useEffect(()=>{Promise.all([JZ(),r$(),H3(),W3(),a$().catch(()=>null)]).then(([b,C,M,A,D])=>{e(b),n(C),a(M),s(A),u(D),f(!1),document.title="Dashboard — MeshAI"}).catch(b=>{v(b.message),f(!1),document.title="Dashboard — MeshAI"})},[]),Y.useEffect(()=>{p&&e(p)},[p]),c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading..."})}):h?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&T.jsxs(T.Fragment,{children:[T.jsx(w$,{health:t}),T.jsxs("div",{className:"mt-6 space-y-3",children:[T.jsx(Pp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),T.jsx(Pp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),T.jsx(Pp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),T.jsx(Pp,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),T.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?T.jsx("div",{className:"space-y-3",children:i.map((b,C)=>T.jsx(b$,{alert:b},C))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(nv,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active alerts"})]})]}),T.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[T.jsx(Dp,{icon:Gc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),T.jsx(Dp,{icon:O3,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),T.jsx(Dp,{icon:n2,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),T.jsx(Dp,{icon:V3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-2",children:r.map((b,C)=>T.jsx(T$,{source:b},C))}):T.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?T.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):T.jsxs("div",{className:"text-slate-500",children:[T.jsx("p",{children:"Environmental feeds not enabled."}),T.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),T.jsx(C$,{propagation:l})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -327,8 +352,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Vw=function(t,e){return Vw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Vw(t,e)};function $(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Vw(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var tv=function(){return tv=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?Ue.worker=!0:!Ue.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ue.node=!0,Ue.svgSupported=!0):g$(navigator.userAgent,Ue);function g$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var t2=12,B3="sans-serif",ao=t2+"px "+B3,m$=20,y$=100,_$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function x$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){N(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function W$(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&a&&h===a[f]&&v===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?mD(s,o):mD(o,s))}function Y3(t){return t.nodeName.toUpperCase()==="CANVAS"}var U$=/([&<>"'])/g,Z$={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wr(t){return t==null?"":(t+"").replace(U$,function(e,r){return Z$[r]})}var $$=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,px=[],Y$=Ue.browser.firefox&&+Ue.browser.version.split(".")[0]<39;function Ww(t,e,r,n){return r=r||{},n?yD(t,e,r):Y$&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):yD(t,e,r),r}function yD(t,e,r){if(Ue.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(Y3(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Hw(px,t,n,i)){r.zrX=px[0],r.zrY=px[1];return}}r.zrX=r.zrY=0}function l2(t){return t||window.event}function Wn(t,e,r){if(e=l2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Ww(t,o,e,r)}else{Ww(t,e,e,r);var a=X$(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&$$.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function X$(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function Uw(t,e,r,n){t.addEventListener(e,r,n)}function q$(t,e,r,n){t.removeEventListener(e,r,n)}var oo=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function _D(t){return t.which===2||t.which===3}var K$=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=xD(n)/xD(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Q$(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function Cd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Md(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Li(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Ii(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function po(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function L0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function oi(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function X3(t){var e=fr();return Md(e,t),e}const J$=Object.freeze(Object.defineProperty({__proto__:null,clone:X3,copy:Md,create:fr,identity:Cd,invert:oi,mul:Li,rotate:po,scale:L0,translate:Ii},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),xl=Math.min,dc=Math.max,Zw=Math.abs,SD=["x","y"],eY=["width","height"],Es=new Te,Rs=new Te,Ns=new Te,Os=new Te,wn=q3(),Eh=wn.minTv,$w=wn.maxTv,av=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=xl(e.x,this.x),n=xl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=dc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=dc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return Ii(a,a,[-r.x,-r.y]),L0(a,a,[n,i]),Ii(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(tY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(rY,r.x,r.y,r.width,r.height));var s=!!n;wn.reset(i,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,h=e.y+e.height-l,v=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||v>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Es.x=Ns.x=r.x,Es.y=Os.y=r.y,Rs.x=Os.x=r.x+r.width,Rs.y=Ns.y=r.y+r.height,Es.transform(n),Os.transform(n),Rs.transform(n),Ns.transform(n),e.x=xl(Es.x,Rs.x,Ns.x,Os.x),e.y=xl(Es.y,Rs.y,Ns.y,Os.y);var l=dc(Es.x,Rs.x,Ns.x,Os.x),u=dc(Es.y,Rs.y,Ns.y,Os.y);e.width=l-e.x,e.height=u-e.y},t}(),tY=new Ce(0,0,0,0),rY=new Ce(0,0,0,0);function wD(t,e,r,n,i,a,o,s){var l=Zw(e-r),u=Zw(n-t),c=xl(l,u),f=SD[i],h=SD[1-i],v=eY[i];e=u||!wn.bidirectional)&&(Eh[f]=-u,Eh[h]=0,wn.useDir&&wn.calcDirMTV())))}function q3(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=dc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(mx.copy(h.getBoundingRect()),h.transform&&mx.applyTransform(h.transform),mx.intersect(c)&&s.push(h))}if(s.length)for(var v=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function sY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?K3:!0}return!1}function bD(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=sY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==K3)){e.target=o;break}}}function J3(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var e4=32,Qf=7;function lY(t){for(var e=0;t>=e4;)e|=t&1,t>>=1;return t+e}function TD(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function uY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function yx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function _x(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function cY(t,e){var r=Qf,n,i,a=0,o=[];n=[],i=[];function s(v,p){n[a]=v,i[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;c(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]=Qf||A>=Qf);if(D)break;T<0&&(T=0),T+=2}if(r=T,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[C+y]=t[T+y];t[b]=o[S];return}for(var A=r;;){var D=0,E=0,k=!1;do if(e(o[S],t[_])<0){if(t[b--]=t[_--],D++,E=0,--p===0){k=!0;break}}else if(t[b--]=o[S--],E++,D=0,--m===1){k=!0;break}while((D|E)=0;y--)t[C+y]=t[T+y];if(p===0){k=!0;break}}if(t[b--]=o[S--],--m===1){k=!0;break}if(E=m-yx(t[_],o,0,m,m-1,e),E!==0){for(b-=E,S-=E,m-=E,C=b+1,T=S+1,y=0;y=Qf||E>=Qf);if(k)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(b-=p,_-=p,C=b+1,T=_+1,y=p-1;y>=0;y--)t[C+y]=t[T+y];t[b]=o[S]}else{if(m===0)throw new Error;for(T=b-(m-1),y=0;ys&&(l=s),CD(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var bn=1,Rh=2,Qu=4,MD=!1;function xx(){MD||(MD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function LD(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var fY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=LD}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Km;Km=Ue.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var ov={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-ov.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?ov.bounceIn(t*2)*.5:ov.bounceOut(t*2-1)*.5+.5}},Ap=Math.pow,ns=Math.sqrt,Qm=1e-8,t4=1e-4,AD=ns(3),Pp=1/3,ra=bs(),qn=bs(),Ac=bs();function jo(t){return t>-Qm&&tQm||t<-Qm}function lr(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function PD(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function Jm(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,v=0;if(jo(c)&&jo(f))if(jo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var g=f*f-4*c*h;if(jo(g)){var m=f/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var _=ns(g),S=c*s+1.5*o*(-f+_),b=c*s+1.5*o*(-f-_);S<0?S=-Ap(-S,Pp):S=Ap(S,Pp),b<0?b=-Ap(-b,Pp):b=Ap(b,Pp);var p=(-s-(S+b))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var T=(2*c*s-3*o*f)/(2*ns(c*c*c)),C=Math.acos(T)/3,A=ns(c),D=Math.cos(C),p=(-s-2*A*D)/(3*o),y=(-s+A*(D+AD*Math.sin(C)))/(3*o),E=(-s+A*(D-AD*Math.sin(C)))/(3*o);p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y),E>=0&&E<=1&&(a[v++]=E)}}return v}function n4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(jo(o)){if(r4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(jo(c))i[0]=-a/(2*o);else if(c>0){var f=ns(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function vs(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function i4(t,e,r,n,i,a,o,s,l,u,c){var f,h=.005,v=1/0,p,g,m,y;ra[0]=l,ra[1]=u;for(var _=0;_<1;_+=.05)qn[0]=lr(t,r,i,o,_),qn[1]=lr(e,n,a,s,_),m=rs(ra,qn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(jo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=ns(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function a4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Vv(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function o4(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;ra[0]=o,ra[1]=s;for(var h=0;h<1;h+=.05){qn[0]=xr(t,r,i,h),qn[1]=xr(e,n,a,h);var v=rs(ra,qn);v=0&&v=1?1:Jm(0,n,a,1,l,s)&&lr(0,i,o,1,s[0])}}}var gY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Nt,this.ondestroy=e.ondestroy||Nt,this.onrestart=e.onrestart||Nt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ov[e]||u2(e)},t}(),s4=function(){function t(e){this.value=e}return t}(),mY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new s4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Gc=function(){function t(e){this._list=new mY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new s4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),DD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ai(t){return t=Math.round(t),t<0?0:t>255?255:t}function yY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Fv(t){return t<0?0:t>1?1:t}function tm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ai(parseFloat(e)/100*255):Ai(parseInt(e,10))}function Ya(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Fv(parseFloat(e)/100):Fv(parseFloat(e))}function Sx(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Go(t,e,r){return t+(e-t)*r}function Hn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function Xw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var l4=new Gc(20),Dp=null;function Cu(t,e){Dp&&Xw(Dp,e),Dp=l4.put(t,Dp||e.slice())}function Ur(t,e){if(t){e=e||[];var r=l4.get(t);if(r)return Xw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in DD)return Xw(e,DD[n]),Cu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Hn(e,0,0,0,1);return}return Hn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Cu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hn(e,0,0,0,1);return}return Hn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Cu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Hn(e,+u[0],+u[1],+u[2],1):Hn(e,0,0,0,1);c=Ya(u.pop());case"rgb":if(u.length>=3)return Hn(e,tm(u[0]),tm(u[1]),tm(u[2]),u.length===3?c:Ya(u[3])),Cu(t,e),e;Hn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Hn(e,0,0,0,1);return}return u[3]=Ya(u[3]),qw(u,e),Cu(t,e),e;case"hsl":if(u.length!==3){Hn(e,0,0,0,1);return}return qw(u,e),Cu(t,e),e;default:return}}Hn(e,0,0,0,1)}}function qw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ya(t[1]),i=Ya(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Hn(e,Ai(Sx(o,a,r+1/3)*255),Ai(Sx(o,a,r)*255),Ai(Sx(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function _Y(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function ey(t,e){var r=Ur(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ti(r,r.length===4?"rgba":"rgb")}}function xY(t){var e=Ur(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function sv(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ai(Go(o[0],s[0],l)),r[1]=Ai(Go(o[1],s[1],l)),r[2]=Ai(Go(o[2],s[2],l)),r[3]=Fv(Go(o[3],s[3],l)),r}}var SY=sv;function c2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ur(e[i]),s=Ur(e[a]),l=n-i,u=ti([Ai(Go(o[0],s[0],l)),Ai(Go(o[1],s[1],l)),Ai(Go(o[2],s[2],l)),Fv(Go(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var wY=c2;function Xa(t,e,r,n){var i=Ur(t);if(t)return i=_Y(i),e!=null&&(i[0]=yY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Ya(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ya(me(n)?n(i[2]):n)),ti(qw(i),"rgba")}function jv(t,e){var r=Ur(t);if(r&&e!=null)return r[3]=Fv(e),ti(r,"rgba")}function ti(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Gv(t,e){var r=Ur(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function bY(){return ti([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var kD=new Gc(100);function ty(t){if(se(t)){var e=kD.get(t);return e||(e=ey(t,-.1),kD.put(t,e)),e}else if(wd(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:ey(n.color,-.1)}}),r}return t}const TY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:sv,fastMapToColor:SY,lerp:c2,lift:ey,liftColor:ty,lum:Gv,mapToColor:wY,modifyAlpha:jv,modifyHSL:Xa,parse:Ur,parseCssFloat:Ya,parseCssInt:tm,random:bY,stringify:ti,toHex:xY},Symbol.toStringTag,{value:"Module"}));var ry=Math.round;function Hv(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Ur(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var ID=1e-4;function Ho(t){return t-ID}function kp(t){return ry(t*1e3)/1e3}function Kw(t){return ry(t*1e4)/1e4}function CY(t){return"matrix("+kp(t[0])+","+kp(t[1])+","+kp(t[2])+","+kp(t[3])+","+Kw(t[4])+","+Kw(t[5])+")"}var MY={left:"start",right:"end",center:"middle",middle:"middle"};function LY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function AY(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function PY(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function u4(t){return t&&!!t.image}function DY(t){return t&&!!t.svgElement}function f2(t){return u4(t)||DY(t)}function c4(t){return t.type==="linear"}function f4(t){return t.type==="radial"}function h4(t){return t&&(t.type==="linear"||t.type==="radial")}function A0(t){return"url(#"+t+")"}function v4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function d4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*rv,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+ry(o*rv)+"deg, "+ry(s*rv)+"deg)"),l.join(" ")}var kY=function(){return Ue.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),Qw=Array.prototype.slice;function Na(t,e,r){return(e-t)*r+t}function bx(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=RD,l=r;if(Er(r)){var u=NY(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!kr(r))s=Ep;else if(se(r))if(!isNaN(+r))s=Ep;else{var c=Ur(r);c&&(l=c,s=Nh)}else if(wd(r)){var f=J({},l);f.colorStops=re(r.colorStops,function(v){return{offset:v.offset,color:Ur(v.color)}}),c4(r)?s=Jw:f4(r)&&(s=eb),l=f}a===0?this.valType=s:(s!==this.valType||s===RD)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=me(n)?n:ov[n]||u2(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Rp(i),u=ND(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(c-1,s-2)}p=o[c+1],v=o[c]}if(v&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-v.percent,y=m===0?1:h((r-v.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?Jf:e[l];if((Rp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(Rp(a))a===nm?bx(_,v[i],p[i],y):IY(_,v[i],p[i],y);else if(ND(a)){var S=v[i],b=p[i],T=a===Jw;e[l]={type:T?"linear":"radial",x:Na(S.x,b.x,y),y:Na(S.y,b.y,y),colorStops:re(S.colorStops,function(A,D){var E=b.colorStops[D];return{offset:Na(A.offset,E.offset,y),color:rm(bx([],A.color,E.color,y))}}),global:b.global},T?(e[l].x2=Na(S.x2,b.x2,y),e[l].y2=Na(S.y2,b.y2,y)):e[l].r=Na(S.r,b.r,y)}else if(u)bx(_,v[i],p[i],y),n||(e[l]=rm(_));else{var C=Na(v[i],p[i],y);n?this._additiveValue=C:e[l]=C}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Ep?e[n]=e[n]+i:r===Nh?(Ur(e[n],Jf),Ip(Jf,Jf,i,1),e[n]=rm(Jf)):r===nm?Ip(e[n],e[n],i,1):r===p4&&ED(e[n],e[n],i,1)},t}(),h2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){b0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Ze(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,lv(u),i),this._trackKeys.push(s)}l.addKeyframe(e,lv(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function pc(){return new Date().getTime()}var zY=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=pc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Km(n),!r._paused&&r.update())}Km(n)},e.prototype.start=function(){this._running||(this._time=pc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=pc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=pc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new h2(r,n.loop);return this.addAnimator(i),i},e}(ui),BY=300,Tx=Ue.domSupported,Cx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),OD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},zD=!1;function tb(t){var e=t.pointerType;return e==="pen"||e==="touch"}function VY(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Mx(t){t&&(t.zrByTouch=!0)}function FY(t,e){return Wn(t.dom,new jY(t,e),!0)}function g4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var jY=function(){function t(e,r){this.stopPropagation=Nt,this.stopImmediatePropagation=Nt,this.preventDefault=Nt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),mi={mousedown:function(t){t=Wn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Wn(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Wn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Wn(this.dom,t);var e=t.toElement||t.relatedTarget;g4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){zD=!0,t=Wn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){zD||(t=Wn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Wn(this.dom,t),Mx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),mi.mousemove.call(this,t),mi.mousedown.call(this,t)},touchmove:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"change"),mi.mousemove.call(this,t)},touchend:function(t){t=Wn(this.dom,t),Mx(t),this.handler.processGesture(t,"end"),mi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentFD||t<-FD}var Bs=[],Mu=[],Ax=fr(),Px=Math.abs,Wa=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return zs(this.rotation)||zs(this.x)||zs(this.y)||zs(this.scaleX-1)||zs(this.scaleY-1)||zs(this.skewX)||zs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(VD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):VD(n),e&&(r?Li(n,e,n):Md(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Bs);var n=Bs[0]<0?-1:1,i=Bs[1]<0?-1:1,a=((Bs[0]-n)*r+n)/Bs[0]||0,o=((Bs[1]-i)*r+i)/Bs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),oi(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Li(Mu,e.invTransform,r),r=Mu);var n=this.originX,i=this.originY;(n||i)&&(Ax[4]=n,Ax[5]=i,Li(Mu,r,Ax),Mu[4]-=n,Mu[5]-=i,r=Mu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Px(e[0]-1)>1e-10&&Px(e[3]-1)>1e-10?Math.sqrt(Px(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){iy(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-h*g*o,r[5]=-g*o-v*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=h*o,u&&po(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ga=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function iy(t,e){for(var r=0;r=jD)){t=t||ao;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=yn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Dx=jD:i>2&&Dx++,e}}var Dx=0,jD=5;function y4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=ZY(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function da(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=yn.measureText(e,t.font).width,r.put(e,n)),n}function GD(t,e,r,n){var i=da(va(e),t),a=Ld(e),o=Hc(0,i,r),s=Pl(0,a,n),l=new Ce(o,s,i,a);return l}function P0(t,e,r,n){var i=((t||"")+"").split(` -`),a=i.length;if(a===1)return GD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function ay(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Ei(n[0],r.width),u+=Ei(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var kx="__zr_normal__",Ix=ga.concat(["ignore"]),$Y=ai(ga,function(t,e){return t[e]=!0,t},{ignore:!1}),Lu={},YY=new Ce(0,0,0,0),Op=[],D0=function(){function t(e){this.id=i2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=YY,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Lu,n,h):ay(Lu,n,h),a.x=Lu.x,a.y=Lu.y,o=Lu.align,s=Lu.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,g=void 0;v==="center"?(p=h.width*.5,g=h.height*.5):(p=Ei(v[0],h.width),g=Ei(v[1],h.height)),u=!0,a.originX=-a.x+p+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Op),oi(Op,Op),Ce.copy(_,h),_.applyTransform(Op)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,T=void 0,C=void 0;S&&this.canBeInsideText()?(b=n.insideFill,T=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(b),C=!0)):(b=n.outsideFill,T=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(b),C=!0)),b=b||"#000",(b!==y.fill||T!==y.stroke||C!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=b,y.stroke=T,y.autoStroke=C,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=bn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ab:ib},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Ur(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ti(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(we(e))for(var n=e,i=Ze(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(kx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===kx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){b0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,r,n,c),h&&h.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,h),m&&m.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var h=0;h0||i.force&&!o.length){var D=void 0,E=void 0,k=void 0;if(s){E={},h&&(D={});for(var b=0;b=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ze.node=!0,Ze.svgSupported=!0):D$(navigator.userAgent,Ze);function D$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var u2=12,$3="sans-serif",ao=u2+"px "+$3,k$=20,I$=100,E$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function N$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function iY(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),f=2*u,h=c.left,v=c.top;o.push(h,v),l=l&&a&&h===a[f]&&v===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?MD(s,o):MD(o,s))}function n4(t){return t.nodeName.toUpperCase()==="CANVAS"}var aY=/([&<>"'])/g,oY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wr(t){return t==null?"":(t+"").replace(aY,function(e,r){return oY[r]})}var sY=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Sx=[],lY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function Xw(t,e,r,n){return r=r||{},n?LD(t,e,r):lY&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):LD(t,e,r),r}function LD(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(n4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Yw(Sx,t,n,i)){r.zrX=Sx[0],r.zrY=Sx[1];return}}r.zrX=r.zrY=0}function g2(t){return t||window.event}function Wn(t,e,r){if(e=g2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Xw(t,o,e,r)}else{Xw(t,e,e,r);var a=uY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&sY.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function uY(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function qw(t,e,r,n){t.addEventListener(e,r,n)}function cY(t,e,r,n){t.removeEventListener(e,r,n)}var oo=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function AD(t){return t.which===2||t.which===3}var fY=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=PD(n)/PD(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=hY(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function hr(){return[1,0,0,1,0,0]}function Pd(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Dd(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Li(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Ii(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function po(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function I0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function oi(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function i4(t){var e=hr();return Dd(e,t),e}const vY=Object.freeze(Object.defineProperty({__proto__:null,clone:i4,copy:Dd,create:hr,identity:Pd,invert:oi,mul:Li,rotate:po,scale:I0,translate:Ii},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),Sl=Math.min,pc=Math.max,Kw=Math.abs,DD=["x","y"],dY=["width","height"],Ns=new Te,Rs=new Te,Os=new Te,zs=new Te,wn=a4(),Rh=wn.minTv,Qw=wn.maxTv,lv=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Sl(e.x,this.x),n=Sl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=pc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=pc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=hr();return Ii(a,a,[-r.x,-r.y]),I0(a,a,[n,i]),Ii(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(pY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(gY,r.x,r.y,r.width,r.height));var s=!!n;wn.reset(i,s);var l=wn.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,h=e.y+e.height-l,v=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||f>h||v>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Ns.x=Os.x=r.x,Ns.y=zs.y=r.y,Rs.x=zs.x=r.x+r.width,Rs.y=Os.y=r.y+r.height,Ns.transform(n),zs.transform(n),Rs.transform(n),Os.transform(n),e.x=Sl(Ns.x,Rs.x,Os.x,zs.x),e.y=Sl(Ns.y,Rs.y,Os.y,zs.y);var l=pc(Ns.x,Rs.x,Os.x,zs.x),u=pc(Ns.y,Rs.y,Os.y,zs.y);e.width=l-e.x,e.height=u-e.y},t}(),pY=new Ce(0,0,0,0),gY=new Ce(0,0,0,0);function kD(t,e,r,n,i,a,o,s){var l=Kw(e-r),u=Kw(n-t),c=Sl(l,u),f=DD[i],h=DD[1-i],v=dY[i];e=u||!wn.bidirectional)&&(Rh[f]=-u,Rh[h]=0,wn.useDir&&wn.calcDirMTV())))}function a4(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=pc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Tx.copy(h.getBoundingRect()),h.transform&&Tx.applyTransform(h.transform),Tx.intersect(c)&&s.push(h))}if(s.length)for(var v=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function SY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?o4:!0}return!1}function ID(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=SY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==o4)){e.target=o;break}}}function l4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var u4=32,eh=7;function wY(t){for(var e=0;t>=u4;)e|=t&1,t>>=1;return t+e}function ED(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function bY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function Cx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function Mx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function TY(t,e){var r=eh,n,i,a=0,o=[];n=[],i=[];function s(v,p){n[a]=v,i[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;c(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]=eh||A>=eh);if(D)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[M+y]=t[C+y];t[b]=o[S];return}for(var A=r;;){var D=0,E=0,k=!1;do if(e(o[S],t[_])<0){if(t[b--]=t[_--],D++,E=0,--p===0){k=!0;break}}else if(t[b--]=o[S--],E++,D=0,--m===1){k=!0;break}while((D|E)=0;y--)t[M+y]=t[C+y];if(p===0){k=!0;break}}if(t[b--]=o[S--],--m===1){k=!0;break}if(E=m-Cx(t[_],o,0,m,m-1,e),E!==0){for(b-=E,S-=E,m-=E,M=b+1,C=S+1,y=0;y=eh||E>=eh);if(k)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(b-=p,_-=p,M=b+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[b]=o[S]}else{if(m===0)throw new Error;for(C=b-(m-1),y=0;ys&&(l=s),ND(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var bn=1,Oh=2,Ju=4,RD=!1;function Lx(){RD||(RD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function OD(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var CY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=OD}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),ny;ny=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var uv={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-uv.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?uv.bounceIn(t*2)*.5:uv.bounceOut(t*2-1)*.5+.5}},Ip=Math.pow,ns=Math.sqrt,iy=1e-8,c4=1e-4,zD=ns(3),Ep=1/3,ra=Ts(),qn=Ts(),Pc=Ts();function jo(t){return t>-iy&&tiy||t<-iy}function ur(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function BD(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function ay(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,v=0;if(jo(c)&&jo(f))if(jo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var g=f*f-4*c*h;if(jo(g)){var m=f/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var _=ns(g),S=c*s+1.5*o*(-f+_),b=c*s+1.5*o*(-f-_);S<0?S=-Ip(-S,Ep):S=Ip(S,Ep),b<0?b=-Ip(-b,Ep):b=Ip(b,Ep);var p=(-s-(S+b))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var C=(2*c*s-3*o*f)/(2*ns(c*c*c)),M=Math.acos(C)/3,A=ns(c),D=Math.cos(M),p=(-s-2*A*D)/(3*o),y=(-s+A*(D+zD*Math.sin(M)))/(3*o),E=(-s+A*(D-zD*Math.sin(M)))/(3*o);p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y),E>=0&&E<=1&&(a[v++]=E)}}return v}function h4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(jo(o)){if(f4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(jo(c))i[0]=-a/(2*o);else if(c>0){var f=ns(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function ds(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function v4(t,e,r,n,i,a,o,s,l,u,c){var f,h=.005,v=1/0,p,g,m,y;ra[0]=l,ra[1]=u;for(var _=0;_<1;_+=.05)qn[0]=ur(t,r,i,o,_),qn[1]=ur(e,n,a,s,_),m=rs(ra,qn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(jo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=ns(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function d4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Hv(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function p4(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;ra[0]=o,ra[1]=s;for(var h=0;h<1;h+=.05){qn[0]=Sr(t,r,i,h),qn[1]=Sr(e,n,a,h);var v=rs(ra,qn);v=0&&v=1?1:ay(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var DY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Rt,this.ondestroy=e.ondestroy||Rt,this.onrestart=e.onrestart||Rt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:uv[e]||m2(e)},t}(),g4=function(){function t(e){this.value=e}return t}(),kY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new g4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Wc=function(){function t(e){this._list=new kY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new g4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),VD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ai(t){return t=Math.round(t),t<0?0:t>255?255:t}function IY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Wv(t){return t<0?0:t>1?1:t}function im(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ai(parseFloat(e)/100*255):Ai(parseInt(e,10))}function Ya(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Wv(parseFloat(e)/100):Wv(parseFloat(e))}function Ax(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Go(t,e,r){return t+(e-t)*r}function Hn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function eb(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var m4=new Wc(20),Np=null;function Mu(t,e){Np&&eb(Np,e),Np=m4.put(t,Np||e.slice())}function Ur(t,e){if(t){e=e||[];var r=m4.get(t);if(r)return eb(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in VD)return eb(e,VD[n]),Mu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Hn(e,0,0,0,1);return}return Hn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Mu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Hn(e,0,0,0,1);return}return Hn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Mu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Hn(e,+u[0],+u[1],+u[2],1):Hn(e,0,0,0,1);c=Ya(u.pop());case"rgb":if(u.length>=3)return Hn(e,im(u[0]),im(u[1]),im(u[2]),u.length===3?c:Ya(u[3])),Mu(t,e),e;Hn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Hn(e,0,0,0,1);return}return u[3]=Ya(u[3]),tb(u,e),Mu(t,e),e;case"hsl":if(u.length!==3){Hn(e,0,0,0,1);return}return tb(u,e),Mu(t,e),e;default:return}}Hn(e,0,0,0,1)}}function tb(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ya(t[1]),i=Ya(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Hn(e,Ai(Ax(o,a,r+1/3)*255),Ai(Ax(o,a,r)*255),Ai(Ax(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function EY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function oy(t,e){var r=Ur(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ti(r,r.length===4?"rgba":"rgb")}}function NY(t){var e=Ur(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function cv(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ai(Go(o[0],s[0],l)),r[1]=Ai(Go(o[1],s[1],l)),r[2]=Ai(Go(o[2],s[2],l)),r[3]=Wv(Go(o[3],s[3],l)),r}}var RY=cv;function y2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Ur(e[i]),s=Ur(e[a]),l=n-i,u=ti([Ai(Go(o[0],s[0],l)),Ai(Go(o[1],s[1],l)),Ai(Go(o[2],s[2],l)),Wv(Go(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var OY=y2;function Xa(t,e,r,n){var i=Ur(t);if(t)return i=EY(i),e!=null&&(i[0]=IY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Ya(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ya(me(n)?n(i[2]):n)),ti(tb(i),"rgba")}function Uv(t,e){var r=Ur(t);if(r&&e!=null)return r[3]=Wv(e),ti(r,"rgba")}function ti(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function Zv(t,e){var r=Ur(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function zY(){return ti([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var FD=new Wc(100);function sy(t){if(se(t)){var e=FD.get(t);return e||(e=oy(t,-.1),FD.put(t,e)),e}else if(Md(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:oy(n.color,-.1)}}),r}return t}const BY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:cv,fastMapToColor:RY,lerp:y2,lift:oy,liftColor:sy,lum:Zv,mapToColor:OY,modifyAlpha:Uv,modifyHSL:Xa,parse:Ur,parseCssFloat:Ya,parseCssInt:im,random:zY,stringify:ti,toHex:NY},Symbol.toStringTag,{value:"Module"}));var ly=Math.round;function $v(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Ur(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var jD=1e-4;function Ho(t){return t-jD}function Rp(t){return ly(t*1e3)/1e3}function rb(t){return ly(t*1e4)/1e4}function VY(t){return"matrix("+Rp(t[0])+","+Rp(t[1])+","+Rp(t[2])+","+Rp(t[3])+","+rb(t[4])+","+rb(t[5])+")"}var FY={left:"start",right:"end",center:"middle",middle:"middle"};function jY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function GY(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function HY(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function y4(t){return t&&!!t.image}function WY(t){return t&&!!t.svgElement}function _2(t){return y4(t)||WY(t)}function _4(t){return t.type==="linear"}function x4(t){return t.type==="radial"}function S4(t){return t&&(t.type==="linear"||t.type==="radial")}function E0(t){return"url(#"+t+")"}function w4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function b4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*av,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+ly(o*av)+"deg, "+ly(s*av)+"deg)"),l.join(" ")}var UY=function(){return Ze.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),nb=Array.prototype.slice;function Ra(t,e,r){return(e-t)*r+t}function Px(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=HD,l=r;if(Er(r)){var u=XY(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!kr(r))s=zp;else if(se(r))if(!isNaN(+r))s=zp;else{var c=Ur(r);c&&(l=c,s=zh)}else if(Md(r)){var f=J({},l);f.colorStops=re(r.colorStops,function(v){return{offset:v.offset,color:Ur(v.color)}}),_4(r)?s=ib:x4(r)&&(s=ab),l=f}a===0?this.valType=s:(s!==this.valType||s===HD)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=me(n)?n:uv[n]||m2(n)),i.push(h),h},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Bp(i),u=WD(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(c-1,s-2)}p=o[c+1],v=o[c]}if(v&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-v.percent,y=m===0?1:h((r-v.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?th:e[l];if((Bp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?v.rawValue:p.rawValue;else if(Bp(a))a===om?Px(_,v[i],p[i],y):ZY(_,v[i],p[i],y);else if(WD(a)){var S=v[i],b=p[i],C=a===ib;e[l]={type:C?"linear":"radial",x:Ra(S.x,b.x,y),y:Ra(S.y,b.y,y),colorStops:re(S.colorStops,function(A,D){var E=b.colorStops[D];return{offset:Ra(A.offset,E.offset,y),color:am(Px([],A.color,E.color,y))}}),global:b.global},C?(e[l].x2=Ra(S.x2,b.x2,y),e[l].y2=Ra(S.y2,b.y2,y)):e[l].r=Ra(S.r,b.r,y)}else if(u)Px(_,v[i],p[i],y),n||(e[l]=am(_));else{var M=Ra(v[i],p[i],y);n?this._additiveValue=M:e[l]=M}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===zp?e[n]=e[n]+i:r===zh?(Ur(e[n],th),Op(th,th,i,1),e[n]=am(th)):r===om?Op(e[n],e[n],i,1):r===T4&&GD(e[n],e[n],i,1)},t}(),x2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){A0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,$e(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,fv(u),i),this._trackKeys.push(s)}l.addKeyframe(e,fv(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function gc(){return new Date().getTime()}var KY=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=gc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(ny(n),!r._paused&&r.update())}ny(n)},e.prototype.start=function(){this._running||(this._time=gc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=gc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=gc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new x2(r,n.loop);return this.addAnimator(i),i},e}(ui),QY=300,Dx=Ze.domSupported,kx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),UD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},ZD=!1;function ob(t){var e=t.pointerType;return e==="pen"||e==="touch"}function JY(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Ix(t){t&&(t.zrByTouch=!0)}function eX(t,e){return Wn(t.dom,new tX(t,e),!0)}function C4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var tX=function(){function t(e,r){this.stopPropagation=Rt,this.stopImmediatePropagation=Rt,this.preventDefault=Rt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),mi={mousedown:function(t){t=Wn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Wn(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Wn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Wn(this.dom,t);var e=t.toElement||t.relatedTarget;C4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){ZD=!0,t=Wn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){ZD||(t=Wn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Wn(this.dom,t),Ix(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),mi.mousemove.call(this,t),mi.mousedown.call(this,t)},touchmove:function(t){t=Wn(this.dom,t),Ix(t),this.handler.processGesture(t,"change"),mi.mousemove.call(this,t)},touchend:function(t){t=Wn(this.dom,t),Ix(t),this.handler.processGesture(t,"end"),mi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentXD||t<-XD}var Vs=[],Lu=[],Nx=hr(),Rx=Math.abs,Wa=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Bs(this.rotation)||Bs(this.x)||Bs(this.y)||Bs(this.scaleX-1)||Bs(this.scaleY-1)||Bs(this.skewX)||Bs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(YD(n),this.invTransform=null);return}n=n||hr(),r?this.getLocalTransform(n):YD(n),e&&(r?Li(n,e,n):Dd(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Vs);var n=Vs[0]<0?-1:1,i=Vs[1]<0?-1:1,a=((Vs[0]-n)*r+n)/Vs[0]||0,o=((Vs[1]-i)*r+i)/Vs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||hr(),oi(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||hr(),Li(Lu,e.invTransform,r),r=Lu);var n=this.originX,i=this.originY;(n||i)&&(Nx[4]=n,Nx[5]=i,Li(Lu,r,Nx),Lu[4]-=n,Lu[5]-=i,r=Lu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Rx(e[0]-1)>1e-10&&Rx(e[3]-1)>1e-10?Math.sqrt(Rx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){cy(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,v=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-h*g*o,r[5]=-g*o-v*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=v*a,r[2]=h*o,u&&po(r,r,u),r[4]+=n+c,r[5]+=i+f,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ga=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function cy(t,e){for(var r=0;r=qD)){t=t||ao;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=yn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Ox=qD:i>2&&Ox++,e}}var Ox=0,qD=5;function L4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=oX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function da(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=yn.measureText(e,t.font).width,r.put(e,n)),n}function KD(t,e,r,n){var i=da(va(e),t),a=kd(e),o=Uc(0,i,r),s=Dl(0,a,n),l=new Ce(o,s,i,a);return l}function N0(t,e,r,n){var i=((t||"")+"").split(` +`),a=i.length;if(a===1)return KD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function fy(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",f="top";if(n instanceof Array)l+=Ei(n[0],r.width),u+=Ei(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var zx="__zr_normal__",Bx=ga.concat(["ignore"]),sX=ai(ga,function(t,e){return t[e]=!0,t},{ignore:!1}),Au={},lX=new Ce(0,0,0,0),Fp=[],R0=function(){function t(e){this.id=h2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=lX,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Au,n,h):fy(Au,n,h),a.x=Au.x,a.y=Au.y,o=Au.align,s=Au.verticalAlign;var v=n.origin;if(v&&n.rotation!=null){var p=void 0,g=void 0;v==="center"?(p=h.width*.5,g=h.height*.5):(p=Ei(v[0],h.width),g=Ei(v[1],h.height)),u=!0,a.originX=-a.x+p+(i?0:h.x),a.originY=-a.y+g+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Fp),oi(Fp,Fp),Ce.copy(_,h),_.applyTransform(Fp)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,C=void 0,M=void 0;S&&this.canBeInsideText()?(b=n.insideFill,C=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(b),M=!0)):(b=n.outsideFill,C=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(b),M=!0)),b=b||"#000",(b!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=b,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=bn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?cb:ub},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Ur(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ti(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(we(e))for(var n=e,i=$e(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(zx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===zx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){A0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,r,n,c),h&&h.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,h),m&&m.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~bn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var h=0;h0||i.force&&!o.length){var D=void 0,E=void 0,k=void 0;if(s){E={},h&&(D={});for(var b=0;b=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=lX;function lX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return oy(t,e,r)}function oy(t,e,r){return se(t)?sX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),b4),t=(+t).toFixed(e),r?t:+t}function Ln(t){return t.sort(function(e,r){return e-r}),t}function bi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return T4(t)}function T4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function v2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(aa(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function uX(t,e,r){if(!t[e])return 0;var n=C4(t,r);return n[e]||0}function C4(t,e){var r=ai(t,function(v,p){return v+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=re(i,function(v){return Math.floor(v)}),s=ai(o,function(v,p){return v+p},0),l=re(i,function(v,p){return v-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return re(o,function(v){return v/n})}function cX(t,e){var r=Math.max(bi(t),bi(e)),n=t+e;return r>b4?n:Ht(n,r)}var lb=9007199254740991;function d2(t){var e=Math.PI*2;return(t%e+e)%e}function Wc(t){return t>-HD&&t=10&&e++,e}function p2(t,e){var r=k0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function om(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function ub(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function Nx(t){t.option=t.parentModel=t.ecModel=null}var DX=".",Vs="___EC__COMPONENT__CONTAINER___",O4="___EC__EXTENDED_CLASS___";function oa(t){var e={main:"",sub:""};if(t){var r=t.split(DX);e.main=r[0]||"",e.sub=r[1]||""}return e}function kX(t){Rr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function IX(t){return!!(t&&t[O4])}function _2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return EX(n)?i=function(a){$(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},a2(i,this)),J(i.prototype,r),i[O4]=!0,i.extend=this.extend,i.superCall=OX,i.superApply=zX,i.superClass=n,i}}function EX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function z4(t,e){t.extend=e.extend}var RX=Math.round(Math.random()*10);function NX(t){var e=["__\0is_clz",RX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function OX(t,e){for(var r=[],n=2;n=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var BX=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],VX=Ul(BX),FX=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return VX(this,e,r)},t}(),fb=new Gc(50);function jX(t){if(typeof t=="string"){var e=fb.get(t);return e&&e.image}else return t}function x2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=fb.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!E0(e)&&a.pending.push(o)):(e=yn.loadImage(t,$D,$D),e.__zrImageSrc=t,fb.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function $D(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=da(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function F4(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=da(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?HX(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=da(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function HX(t,e,r){for(var n=0,i=0,a=t.length;im&&v){var S=Math.floor(m/h);p=p||y.length>S,y=y.slice(0,S),_=y.length*h}if(i&&c&&g!=null)for(var b=V4(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),T={},C=0;Cp&&zx(a,o.substring(p,m),e,v),zx(a,g[2],e,v,g[1]),p=Ox.lastIndex}pf){var W=a.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),A(E,I,k),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` -`),u=!0),n.accumWidth=p}else{var g=j4(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,f=g.linesWidths,c=g.lines}}c||(c=e.split(` -`));for(var m=va(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var XX=ai(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function qX(t){return YX(t)?!!XX[t]:!0}function j4(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=va(e),h=0;hr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=v,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=v,c=p)):g?(a.push(l),o.push(u),l=v,u=p):(a.push(v),o.push(p));continue}c+=p,g?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function XD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(qD,Hc(r,o,i),Pl(n,s,a),o,s),Ce.intersect(e,qD,null,KD);var l=KD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Hc(l.x,l.width,i,!0),t.baseY=Pl(l.y,l.height,a,!0)}}var qD=new Ce(0,0,0,0),KD={outIntersectRect:{},clamp:!0};function S2(t){return t!=null?t+="":t=""}function KX(t){var e=S2(t.text),r=t.font,n=da(va(r),e),i=Ld(r);return hb(t,n,i,null)}function hb(t,e,r,n){var i=new Ce(Hc(t.x||0,e,t.textAlign),Pl(t.y||0,r,t.textBaseline),e,r),a=n??(G4(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function G4(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var vb="__zr_style_"+Math.round(Math.random()*10),Dl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},R0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Dl[vb]=!0;var QD=["z","z2","invisible"],QX=["invisible"],si=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Ze(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(zp[0]=jx(i)*r+t,zp[1]=Fx(i)*n+e,Bp[0]=jx(a)*r+t,Bp[1]=Fx(a)*n+e,u(s,zp,Bp),c(l,zp,Bp),i=i%Fs,i<0&&(i=i+Fs),a=a%Fs,a<0&&(a=a+Fs),i>a&&!o?a+=Fs:ii&&(Vp[0]=jx(v)*r+t,Vp[1]=Fx(v)*n+e,u(s,Vp,s),c(l,Vp,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},js=[],Gs=[],Wi=[],So=[],Ui=[],Zi=[],Gx=Math.min,Hx=Math.max,Hs=Math.cos,Ws=Math.sin,Pa=Math.abs,db=Math.PI,Po=db*2,Wx=typeof Float32Array<"u",eh=[];function Ux(t){var e=Math.round(t/db*1e8)/1e8;return e%2*db}function O0(t,e){var r=Ux(t[0]);r<0&&(r+=Po);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Po?i=r+Po:e&&r-i>=Po?i=r-Po:!e&&r>i?i=r+(Po-Ux(r-i)):e&&r0&&(this._ux=Pa(n/ny/e)||0,this._uy=Pa(n/ny/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(yt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Pa(e-this._xi),i=Pa(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(yt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(yt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(yt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),eh[0]=i,eh[1]=a,O0(eh,o),i=eh[0],a=eh[1];var s=a-i;return this.addData(yt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Hs(a)*n+e,this._yi=Ws(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(yt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&Wx&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Wi[0]=Wi[1]=Ui[0]=Ui[1]=Number.MAX_VALUE,So[0]=So[1]=Zi[0]=Zi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Pa(S)>i||h===r-1)&&(g=Math.sqrt(_*_+S*S),a=m,o=y);break}case yt.C:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++],C=e[h++],A=e[h++];g=hY(a,o,b,T,m,y,C,A,10),a=C,o=A;break}case yt.Q:{var b=e[h++],T=e[h++],m=e[h++],y=e[h++];g=dY(a,o,b,T,m,y,10),a=m,o=y;break}case yt.A:var D=e[h++],E=e[h++],k=e[h++],I=e[h++],z=e[h++],O=e[h++],F=O+z;h+=1,p&&(s=Hs(z)*k+D,l=Ws(z)*I+E),g=Hx(k,I)*Gx(Po,Math.abs(O)),a=Hs(F)*k+D,o=Ws(F)*I+E;break;case yt.R:{s=a=e[h++],l=o=e[h++];var G=e[h++],j=e[h++];g=G*2+j*2;break}case yt.Z:{var _=s-a,S=l-o;g=Math.sqrt(_*_+S*S),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,v=r<1,p,g,m=0,y=0,_,S=0,b,T;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var C=0;C0&&(e.lineTo(b,T),S=0),A){case yt.M:s=u=n[C++],l=c=n[C++],e.moveTo(u,c);break;case yt.L:{f=n[C++],h=n[C++];var E=Pa(f-u),k=Pa(h-c);if(E>i||k>a){if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+f*z,c*(1-z)+h*z);break e}m+=I}e.lineTo(f,h),u=f,c=h,S=0}else{var O=E*E+k*k;O>S&&(b=f,T=h,S=O)}break}case yt.C:{var F=n[C++],G=n[C++],j=n[C++],U=n[C++],V=n[C++],W=n[C++];if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;vs(u,F,j,V,z,js),vs(c,G,U,W,z,Gs),e.bezierCurveTo(js[1],Gs[1],js[2],Gs[2],js[3],Gs[3]);break e}m+=I}e.bezierCurveTo(F,G,j,U,V,W),u=V,c=W;break}case yt.Q:{var F=n[C++],G=n[C++],j=n[C++],U=n[C++];if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;Vv(u,F,j,z,js),Vv(c,G,U,z,Gs),e.quadraticCurveTo(js[1],Gs[1],js[2],Gs[2]);break e}m+=I}e.quadraticCurveTo(F,G,j,U),u=j,c=U;break}case yt.A:var H=n[C++],Y=n[C++],K=n[C++],ne=n[C++],ie=n[C++],ue=n[C++],de=n[C++],je=!n[C++],xe=K>ne?K:ne,ge=Pa(K-ne)>.001,De=ie+ue,he=!1;if(v){var I=p[y++];m+I>_&&(De=ie+ue*(_-m)/I,he=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,Y,K,ne,de,ie,De,je):e.arc(H,Y,xe,ie,De,je),he)break e;D&&(s=Hs(ie)*K+H,l=Ws(ie)*ne+Y),u=Hs(De)*K+H,c=Ws(De)*ne+Y;break;case yt.R:s=u=n[C],l=c=n[C+1],f=n[C++],h=n[C++];var Me=n[C++],st=n[C++];if(v){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(f,h),e.lineTo(f+Gx(Ye,Me),h),Ye-=Me,Ye>0&&e.lineTo(f+Me,h+Gx(Ye,st)),Ye-=st,Ye>0&&e.lineTo(f+Hx(Me-Ye,0),h+st),Ye-=Me,Ye>0&&e.lineTo(f,h+Hx(st-Ye,0));break e}m+=I}e.rect(f,h,Me,st);break;case yt.Z:if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=yt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Eo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>n+f&&c>a+f&&c>s+f||ct+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=th);var h=Math.atan2(l,s);return h<0&&(h+=th),h>=n&&h<=i||h+th>=n&&h+th<=i}function Oa(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var wo=ya.CMD,Us=Math.PI*2,aq=1e-4;function oq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&sq(),v=lr(e,n,a,s,Zn[0]),h>1&&(p=lr(e,n,a,s,Zn[1]))),h===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=xr(e,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Us-1e-4){n=0,i=Us;var c=a?1:-1;return o>=Kr[0]+t&&o<=Kr[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Us,i+=Us);for(var h=0,v=0;v<2;v++){var p=Kr[v];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Us+g),(g>=n&&g<=i||g+Us>=n&&g+Us<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Oa(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),g){case wo.M:c=a[p++],f=a[p++],l=c,u=f;break;case wo.L:if(r){if(Eo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Oa(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.C:if(r){if(nq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=lq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.Q:if(r){if(H4(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=uq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.A:var y=a[p++],_=a[p++],S=a[p++],b=a[p++],T=a[p++],C=a[p++];p+=1;var A=!!(1-a[p++]);h=Math.cos(T)*S+y,v=Math.sin(T)*b+_,m?(c=h,f=v):s+=Oa(l,u,h,v,n,i);var D=(n-y)*b/S+y;if(r){if(iq(y,_,b,T,T+C,A,e,D,i))return!0}else s+=cq(y,_,b,T,T+C,A,D,i);l=Math.cos(T+C)*S+y,u=Math.sin(T+C)*b+_;break;case wo.R:c=l=a[p++],f=u=a[p++];var E=a[p++],k=a[p++];if(h=c+E,v=f+k,r){if(Eo(c,f,h,f,e,n,i)||Eo(h,f,h,v,e,n,i)||Eo(h,v,c,v,e,n,i)||Eo(c,v,c,f,e,n,i))return!0}else s+=Oa(h,f,h,v,n,i),s+=Oa(c,v,c,f,n,i);break;case wo.Z:if(r){if(Eo(l,u,c,f,e,n,i))return!0}else s+=Oa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!oq(u,f)&&(s+=Oa(l,u,c,f,n,i)||0),s!==0}function fq(t,e,r){return W4(t,0,!1,e,r)}function hq(t,e,r,n){return W4(t,e,!0,r,n)}var sy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Dl),vq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},R0.style)},Zx=ga.concat(["invisible","culling","z","z2","zlevel","parent"]),We=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?ib:n>.2?UY:ab}else if(r)return ab}return ib},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Gv(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Qu)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),hq(s,l/u,r,n)))return!0}if(this.hasFill())return fq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Qu,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Qu)},e.prototype.createStyle=function(r){return Td(sy,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},f=Ze(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var gc=Math.round;function z0(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(gc(n*2)===gc(i*2)&&(t.x1=t.x2=Pn(n,s,!0)),gc(a*2)===gc(o*2)&&(t.y1=t.y2=Pn(a,s,!0))),t}}function U4(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Pn(n,s,!0),t.y=Pn(i,s,!0),t.width=Math.max(Pn(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Pn(i+o,s,!1)-t.y,o===0?0:1)),t}}function Pn(t,e,r){if(!e)return t;var n=gc(t*2);return(n+gc(e))%2===0?n/2:(n+(r?1:-1))/2}var _q=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),xq={},ze=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new _q},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=U4(xq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?yq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(We);ze.prototype.type="rect";var nk={fill:"#000"},ik=2,$i={},Sq={style:Se({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},R0.style)},Xe=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=nk,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(F=C[O],F.align==="right");)this._placeToken(F,r,D,y,z,"right",S),E-=F.width,z-=F.width,O--;for(I+=(c-(I-m)-(_-z)-E)/2;k<=O;)F=C[k],this._placeToken(F,r,D,y,I+F.width/2,"center",S),I+=F.width,k++;y+=D}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&$x(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var v=!!u.backgroundColor,p=r.textPadding;p&&(o=ck(o,s,p),f-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Uc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,b=!1,T=uk("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),C=lk("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||_)?(S=ik,b=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||ao,m.opacity=mn(u.opacity,n.opacity,1),ok(m,u),C&&(m.lineWidth=mn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=C),T&&(m.fill=T),g.setBoundingRect(hb(m,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,v=r.borderRadius,p=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(ze),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(h){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(dr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var b=(g||m).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=mn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return $4(r)&&(n=[r.fontStyle,r.fontWeight,Z4(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||r.textFont||r.font},e}(si),wq={left:!0,right:1,center:1},bq={top:1,bottom:1,middle:1},ak=["fontStyle","fontWeight","fontSize","fontFamily"];function Z4(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?t2+"px":t+"px"}function ok(t,e){for(var r=0;r=0,a=!1;if(t instanceof We){var o=Y4(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Au(s)||Au(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Au(u.fill)&&Au(s)?(a=!0,n=J({},n),u=J({},u),u.fill=ty(s)):!Au(u.stroke)&&Au(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=ty(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??hf)}return n}function Dq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Cq)}return r}function kq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Aq(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function Yx(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Pq(this,t,e,r);if(t==="blur")return kq(this,t,r);if(t==="select")return Dq(this,t,r)}return r}function Zl(t){t.stateProxy=Yx;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=Yx),r&&(r.stateProxy=Yx)}function pk(t,e){!tV(t,e)&&!t.__highByOuter&&go(t,X4)}function gk(t,e){!tV(t,e)&&!t.__highByOuter&&go(t,q4)}function so(t,e){t.__highByOuter|=1<<(e||0),go(t,X4)}function lo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&go(t,q4)}function Q4(t){go(t,C2)}function M2(t){go(t,K4)}function J4(t){go(t,Mq)}function eV(t){go(t,Lq)}function tV(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function rV(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=w2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){K4(u)}),s&&r.push(a)),o.isBlured=!1}),N(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function mb(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function as(t,e,r){wl(t,!0),go(t,Zl),_b(t,e,r)}function zq(t){wl(t,!1)}function bt(t,e,r,n){n?zq(t):as(t,e,r)}function _b(t,e,r){var n=Ae(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var yk=["emphasis","blur","select"],Bq={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Xx(p),s*=Xx(p));var g=(i===a?-1:1)*Xx((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,m=g*o*v/s,y=g*-s*h/o,_=(t+r)/2+jp(f)*m-Fp(f)*y,S=(e+n)/2+Fp(f)*m+jp(f)*y,b=wk([1,0],[(h-m)/o,(v-y)/s]),T=[(h-m)/o,(v-y)/s],C=[(-1*h-m)/o,(-1*v-y)/s],A=wk(T,C);if(Sb(T,C)<=-1&&(A=rh),Sb(T,C)>=1&&(A=0),A<0){var D=Math.round(A/rh*1e6)/1e6;A=rh*2+D%2*rh}c.addData(u,_,S,o,s,b,A,f,a)}var Wq=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Uq=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Zq(t){var e=new ya;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ya.CMD,l=t.match(Wq);if(!l)return e;for(var u=0;uF*F+G*G&&(D=k,E=I),{cx:D,cy:E,x0:-c,y0:-f,x1:D*(i/T-1),y1:E*(i/T-1)}}function Jq(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function eK(t,e){var r,n=Oh(e.r,0),i=Oh(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,v=Tk(u-l),p=v>qx&&v%qx;if(p>gi&&(v=p),!(n>gi))t.moveTo(c,f);else if(v>qx-gi)t.moveTo(c+n*Du(l),f+n*Zs(l)),t.arc(c,f,n,l,u,!h),i>gi&&(t.moveTo(c+i*Du(u),f+i*Zs(u)),t.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,_=void 0,S=void 0,b=void 0,T=void 0,C=void 0,A=void 0,D=void 0,E=void 0,k=void 0,I=void 0,z=void 0,O=void 0,F=void 0,G=n*Du(l),j=n*Zs(l),U=i*Du(u),V=i*Zs(u),W=v>gi;if(W){var H=e.cornerRadius;H&&(r=Jq(H),g=r[0],m=r[1],y=r[2],_=r[3]);var Y=Tk(n-i)/2;if(S=Yi(Y,y),b=Yi(Y,_),T=Yi(Y,g),C=Yi(Y,m),E=A=Oh(S,b),k=D=Oh(T,C),(A>gi||D>gi)&&(I=n*Du(u),z=n*Zs(u),O=i*Du(l),F=i*Zs(l),vgi){var ge=Yi(y,E),De=Yi(_,E),he=Gp(O,F,G,j,n,ge,h),Me=Gp(I,z,U,V,n,De,h);t.moveTo(c+he.cx+he.x0,f+he.cy+he.y0),E0&&t.arc(c+he.cx,f+he.cy,ge,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,n,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!h),De>0&&t.arc(c+Me.cx,f+Me.cy,De,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.moveTo(c+G,f+j),t.arc(c,f,n,l,u,!h);if(!(i>gi)||!W)t.lineTo(c+U,f+V);else if(k>gi){var ge=Yi(g,k),De=Yi(m,k),he=Gp(U,V,I,z,i,-De,h),Me=Gp(G,j,O,F,i,-ge,h);t.lineTo(c+he.cx+he.x0,f+he.cy+he.y0),k0&&t.arc(c+he.cx,f+he.cy,De,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,i,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),h),ge>0&&t.arc(c+Me.cx,f+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.lineTo(c+U,f+V),t.arc(c,f,i,u,l,h)}t.closePath()}}}var tK=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Nr=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new tK},e.prototype.buildPath=function(r,n){eK(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(We);Nr.prototype.type="sector";var rK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),vf=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new rK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(We);vf.prototype.type="ring";function nK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,v=t.length;h=2){if(n){var a=nK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sYs[1]){if(a=!1,yr.negativeSize||n)return a;var l=Hp(Ys[0]-$s[1]),u=Hp($s[0]-Ys[1]);Kx(l,u)>Up.len()&&(l=u||!yr.bidirectional)&&(Te.scale(Wp,s,-u*i),yr.useDir&&yr.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var f=c.duration,h=c.delay,v=c.easing,p={duration:f,delay:h||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){D2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){D2("enter",t,e,r,n,i,a)}function Dc(t){if(!t.__zr)return!0;for(var e=0;eaa(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lk(t){return!t.isGroup}function pK(t){return t.shape!=null}function Id(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){Lk(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return pK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(Lk(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Ae(o).dataIndex)}}})}function E2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=kn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=kn(i,e.y+e.height),[n,i]})}function mV(t,e){var r=Gt(t.x,e.x),n=kn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=kn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function gf(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new dr(n)):Zc(t.replace("path://",""),n,r,"center")}function zh(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=Qx(v,p,c,f)/h;return!(m<0||m>1)}function Qx(t,e,r,n){return t*n-r*e}function gK(t){return t<=1e-6&&t>=-1e-6}function $l(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),Ak(t,Ct,"x","width",3,1,i&&i[0]||0),Ak(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function Ak(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,kn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:aa(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function mo(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&N(Ze(l),function(c){fe(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ae(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function bb(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ts(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function j0(t,e,r){xV(t,e,r,-1/0)}function xV(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Cs(t,e){return Re(Re({},t,!0),e,!0)}const AK={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},PK={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var hy="ZH",z2="EN",kc=z2,um={},B2={},MV=Ue.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||kc).toUpperCase();return t.indexOf(hy)>-1?hy:kc}():kc;function V2(t,e){t=t.toUpperCase(),B2[t]=new He(e),um[t]=e}function DK(t){if(se(t)){var e=um[t.toUpperCase()]||{};return t===hy||t===z2?ye(e):Re(ye(e),ye(um[kc]),!1)}else return Re(ye(t),ye(um[kc]),!1)}function Cb(t){return B2[t]}function kK(){return B2[kc]}V2(z2,AK);V2(hy,PK);var Mb=null;function IK(t){Mb||(Mb=t)}function Xt(){return Mb}var F2=1e3,j2=F2*60,fv=j2*60,Qn=fv*24,Ek=Qn*365,EK={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},cm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},RK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",$p="{yyyy}-{MM}-{dd}",Rk={year:"{yyyy}",month:"{yyyy}-{MM}",day:$p,hour:$p+" "+cm.hour,minute:$p+" "+cm.minute,second:$p+" "+cm.second,millisecond:RK},Sn=["year","month","day","hour","minute","second","millisecond"],NK=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function OK(t){return!se(t)&&!me(t)?zK(t):t}function zK(t){t=t||{};var e={},r=!0;return N(Sn,function(n){r&&(r=t[n]==null)}),N(Sn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Sn[s],u=we(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=cm[n]:EK[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Qr(t,e){return t+="","0000".substr(0,e-t.length)+t}function hv(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function BK(t){return t===hv(t)}function VK(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ed(t,e,r,n){var i=wa(t),a=i[LV(r)](),o=i[G2(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[H2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[W2(r)](),f=(c-1)%12+1,h=i[U2(r)](),v=i[Z2(r)](),p=i[$2(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof He?n:Cb(n||MV)||kK(),_=y.getModel("time"),S=_.get("month"),b=_.get("monthAbbr"),T=_.get("dayOfWeek"),C=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Qr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,T[u]).replace(/{ee}/g,C[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Qr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Qr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Qr(p,3)).replace(/{S}/g,p+"")}function FK(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=yc(t.value,i);a=r[c][c][0]}}return Ed(new Date(t.value),a,i,n)}function yc(t,e){var r=wa(t),n=r[G2(e)]()+1,i=r[H2(e)](),a=r[W2(e)](),o=r[U2(e)](),s=r[Z2(e)](),l=r[$2(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,v=h&&i===1,p=v&&n===1;return p?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function vy(t,e,r){switch(e){case"year":t[AV(r)](0);case"month":t[PV(r)](1);case"day":t[DV(r)](0);case"hour":t[kV(r)](0);case"minute":t[IV(r)](0);case"second":t[EV(r)](0)}return t}function LV(t){return t?"getUTCFullYear":"getFullYear"}function G2(t){return t?"getUTCMonth":"getMonth"}function H2(t){return t?"getUTCDate":"getDate"}function W2(t){return t?"getUTCHours":"getHours"}function U2(t){return t?"getUTCMinutes":"getMinutes"}function Z2(t){return t?"getUTCSeconds":"getSeconds"}function $2(t){return t?"getUTCMilliseconds":"getMilliseconds"}function jK(t){return t?"setUTCFullYear":"setFullYear"}function AV(t){return t?"setUTCMonth":"setMonth"}function PV(t){return t?"setUTCDate":"setDate"}function DV(t){return t?"setUTCHours":"setHours"}function kV(t){return t?"setUTCMinutes":"setMinutes"}function IV(t){return t?"setUTCSeconds":"setSeconds"}function EV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function GK(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function Y2(t){if(!g2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function X2(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var _f=bd;function Lb(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Mn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?wa(t):t;if(isNaN(+l)){if(s)return"-"}else return Ed(l,n,r)}if(e==="ordinal")return $m(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=ma(t);return a(u)?Y2(u):$m(t)?i(t):typeof t=="boolean"?t+"":"-"}var Nk=["a","b","c","d","e","f","g"],t1=function(t,e){return"{"+t+(e??"")+"}"};function q2(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function WK(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd -yyyy`);var n=wa(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return t=t.replace("MM",Qr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Qr(a%100+"",2)).replace("dd",Qr(s,2)).replace("d",s).replace("hh",Qr(l,2)).replace("h",l).replace("mm",Qr(u,2)).replace("m",u).replace("ss",Qr(c,2)).replace("s",c).replace("SSS",Qr(f,3)),t}function UK(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function Xl(t,e){return e=e||"transparent",se(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function dy(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var fm={},r1={},xf=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(fm),this._normalMasterList=n(r1);function n(i,a){var o=[];return N(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){N(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){fm[e]=r;return}r1[e]=r},t.get=function(e){return r1[e]||fm[e]},t}();function ZK(t){return!!fm[t]}var Ab={coord:1,coord2:2};function $K(t){NV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var NV=ve();function YK(t){var e=t.getShallow("coord",!0),r=Ab.coord;if(e==null){var n=NV.get(t.type);n&&n.getCoord2&&(r=Ab.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var na={none:0,dataCoordSys:1,boxCoordSys:2};function OV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=na.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=na.dataCoordSys,a||(i=na.none)):n==="box"&&(i=na.boxCoordSys,!a&&!ZK(r)&&(i=na.none))}return{coordSysType:r,kind:i}}function Rd(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=OV(e),o=a.kind,s=a.coordSysType;if(i&&o!==na.dataCoordSys&&(o=na.dataCoordSys,s=r),o===na.none||s!==r)return!1;var l=n(r,e);return l?(o===na.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var zV=function(t,e){var r=e.getReferringComponents(t,Dt).models[0];return r&&r.coordinateSystem},hm=N,BV=["left","right","top","bottom","width","height"],bl=[["width","left","right"],["height","top","bottom"]];function K2(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,p;if(t==="horizontal"){var g=c.width+(h?-h.x+c.x:0);v=a+g,v>n||l.newline?(a=0,v=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=v+r:o=p+r)})}var Il=K2;Ie(K2,"vertical");Ie(K2,"horizontal");function VV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function XK(t,e){var r=or(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Bh.point)a=r.refPoint,i=wt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=wt(n,r.refContainer),a=r.boxCoordFrom===Ab.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function FV(t,e){var r=XK(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function wt(t,e,r){r=_f(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),f=r[2]+r[0],h=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function jV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return f;for(var m=0;m=0;l--)s=Re(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return ff(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return VV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(He);z4(Ve,He);I0(Ve);MK(Ve);LK(Ve,QK);function QK(t){var e=[];return N(Ve.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return oa(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var X={color:{},darkColor:{},size:{}},Vt=X.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(Vt,{primary:Vt.neutral80,secondary:Vt.neutral70,tertiary:Vt.neutral60,quaternary:Vt.neutral50,disabled:Vt.neutral20,border:Vt.neutral30,borderTint:Vt.neutral20,borderShade:Vt.neutral40,background:Vt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Vt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Vt.neutral70,axisLineTint:Vt.neutral40,axisTick:Vt.neutral70,axisTickMinor:Vt.neutral60,axisLabel:Vt.neutral70,axisSplitLine:Vt.neutral15,axisMinorSplitLine:Vt.neutral05});for(var Xs in Vt)if(Vt.hasOwnProperty(Xs)){var Ok=Vt[Xs];Xs==="theme"?X.darkColor.theme=Vt.theme.slice():Xs==="highlight"?X.darkColor.highlight="rgba(255,231,130,0.4)":Xs.indexOf("accent")===0?X.darkColor[Xs]=Xa(Ok,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):X.darkColor[Xs]=Xa(Ok,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}X.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var HV="";typeof navigator<"u"&&(HV=navigator.platform||"");var ku="rgba(0, 0, 0, 0.2)",WV=X.color.theme[0],JK=Xa(WV,null,null,.9);const eQ={darkMode:"auto",colorBy:"series",color:X.color.theme,gradientColor:[JK,WV],aria:{decal:{decals:[{color:ku,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ku,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ku,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ku,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ku,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ku,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:HV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var UV=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Nn="original",Tr="arrayRows",On="objectRows",Ni="keyedColumns",ss="typedArray",ZV="unknown",Di="column",su="row",Ar={Must:1,Might:2,Not:3},$V=Fe();function tQ(t){$V(t).datasetMap=ve()}function YV(t,e,r){var n={},i=J2(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=$V(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),N(t,function(g,m){var y=we(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});N(t,function(g,m){var y=g.name,_=p(g);if(c==null){var S=h.valueWayDim;v(n[y],S,_),v(o,S,_),h.valueWayDim+=_}else if(c===m)v(n[y],0,_),v(a,0,_);else{var S=h.categoryWayDim;v(n[y],S,_),v(o,S,_),h.categoryWayDim+=_}});function v(g,m,y){for(var _=0;_e)return t[n];return t[r-1]}function KV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:oQ(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function sQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Yp,nh,Bk,Vk="\0_ec_inner",lQ=1,tM=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new He(a),this._locale=new He(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=Gk(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Gk(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?Bk(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&N(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=n&&n.replaceMergeMainTypeMap;tQ(this),N(r,function(f,h){f!=null&&(Ve.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ye(f):Re(i[h],f,!0))}),u&&u.each(function(f,h){Ve.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Ve.topologicalTravel(s,Ve.getAllClassMainTypes(),c,this);function c(f){var h=iQ(this,f,gt(r[f])),v=a.get(f),p=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=I4(v,h,p);bX(g,f,Ve),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],_=0,S;N(g,function(b,T){var C=b.existing,A=b.newOption;if(!A)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var D=f==="series",E=Ve.getClass(f,b.keyInfo.subType,!D);if(!E)return;if(f==="tooltip"){if(S)return;S=!0}if(C&&C.constructor===E)C.name=b.keyInfo.name,C.mergeOption(A,this),C.optionUpdated(A,!1);else{var k=J({componentIndex:T},b.keyInfo);C=new E(A,this,this,k),J(C,k),b.brandNew&&(C.__requireNewView=!0),C.init(A,this,this),C.optionUpdated(null,!0)}}C?(m.push(C.option),y.push(C),_++):(m.push(void 0),y.push(void 0))},this),i[f]=m,a.set(f,y),o.set(f,_),f==="series"&&Yp(this)}this._seriesIndices||Yp(this)},e.prototype.getOption=function(){var r=ye(this.option);return N(r,function(n,i){if(Ve.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Wv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Vk],r},e.prototype.setTheme=function(r){this._theme=new He(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function mQ(t,e){return t.join(",")===e.join(",")}var pi=N,qv=we,Hk=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function n1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Hk.length;r0?r[o-1].seriesModel:null)}),MQ(r)}})}function MQ(t){N(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var v,p;s?p=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=cX(h,_),g=_;break}}}return n[0]=h,n[1]=g,n})})}var W0=function(){function t(e){this.data=e.data||(e.sourceFormat===Ni?{}:[]),this.sourceFormat=e.sourceFormat||ZV,this.seriesLayoutBy=e.seriesLayoutBy||Di,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=S)}v[0]=p,v[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};qk=(e={},e[Tr+"_"+Di]={pure:!0,appendData:a},e[Tr+"_"+su]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[On]={pure:!0,appendData:a},e[Ni]={pure:!0,appendData:function(o){var s=this._data;N(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Nn]={appendData:a},e[ss]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return Yc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function eI(t){var e,r;return we(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function vv(t){return new RQ(t)}var RQ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},OQ=function(){function t(e,r){if(!qe(r)){var n="";at(n)}this._opFn=lF[e],this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(ma(e),this._rvalFloat)},t}(),uF=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:ma(e),i=qe(r)?r:ma(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),zQ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=ma(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function BQ(t,e){return t==="eq"||t==="ne"?new zQ(t==="eq",e):fe(lF,t)?new OQ(t,e):null}var VQ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return ls(e,r)},t}();function FQ(t,e){var r=new VQ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Di&&at(o);var s=[],l={},u=t.dimensionsDefine;if(u)N(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var S="";fe(l,y)&&at(S),l[y]=_}});else for(var c=0;c65535?YQ:XQ}function Eu(){return[1/0,-1/0]}function qQ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function nI(t,e,r,n,i){var a=hF[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=v[i[0]],S=v[i[1]],b=e[i[1]][0],T=e[i[1]][1],y=0;y=f&&_<=h||isNaN(_))&&(C>=b&&C<=T||isNaN(C))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=f&&_<=h||isNaN(_))&&(l[u++]=A)}else for(var y=0;ye[k][1])&&(D=!1)}D&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,v=new(Iu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pc&&(c=f,h=b)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,v=c+m)}var S=this.getRawIndex(f),b=this.getRawIndex(v);fc-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[v++]=_}return a._count=v,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return ls(r[a],this._dimensions[a])}o1={arrayRows:e,objectRows:function(r,n,i,a){return ls(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ls(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),vF=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(qp(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rn(s)?ss:Nn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),g=pe(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=m?[kb(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var S=y.get("source",!0);i=[kb(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&aI(a)}var o,s=[],l=[];return N(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&aI(f),s.push(c),l.push(u._getVersionSign())}),n?o=ZQ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[LQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=wX;function wX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return hy(t,e,r)}function hy(t,e,r){return se(t)?SX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),I4),t=(+t).toFixed(e),r?t:+t}function Ln(t){return t.sort(function(e,r){return e-r}),t}function bi(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return E4(t)}function E4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function S2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(aa(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function bX(t,e,r){if(!t[e])return 0;var n=N4(t,r);return n[e]||0}function N4(t,e){var r=ai(t,function(v,p){return v+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(v){return(isNaN(v)?0:v)/r*n*100}),a=n*100,o=re(i,function(v){return Math.floor(v)}),s=ai(o,function(v,p){return v+p},0),l=re(i,function(v,p){return v-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return re(o,function(v){return v/n})}function TX(t,e){var r=Math.max(bi(t),bi(e)),n=t+e;return r>I4?n:Ht(n,r)}var vb=9007199254740991;function w2(t){var e=Math.PI*2;return(t%e+e)%e}function Zc(t){return t>-QD&&t=10&&e++,e}function b2(t,e){var r=O0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function um(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function db(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function jx(t){t.option=t.parentModel=t.ecModel=null}var WX=".",Fs="___EC__COMPONENT__CONTAINER___",U4="___EC__EXTENDED_CLASS___";function oa(t){var e={main:"",sub:""};if(t){var r=t.split(WX);e.main=r[0]||"",e.sub=r[1]||""}return e}function UX(t){Nr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ZX(t){return!!(t&&t[U4])}function L2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return $X(n)?i=function(a){$(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},v2(i,this)),J(i.prototype,r),i[U4]=!0,i.extend=this.extend,i.superCall=qX,i.superApply=KX,i.superClass=n,i}}function $X(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function Z4(t,e){t.extend=e.extend}var YX=Math.round(Math.random()*10);function XX(t){var e=["__\0is_clz",YX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function qX(t,e){for(var r=[],n=2;n=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var QX=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],JX=Zl(QX),eq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return JX(this,e,r)},t}(),gb=new Wc(50);function tq(t){if(typeof t=="string"){var e=gb.get(t);return e&&e.image}else return t}function A2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=gb.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!B0(e)&&a.pending.push(o)):(e=yn.loadImage(t,rk,rk),e.__zrImageSrc=t,gb.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function rk(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=da(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function X4(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=da(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?nq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=da(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function nq(t,e,r){for(var n=0,i=0,a=t.length;im&&v){var S=Math.floor(m/h);p=p||y.length>S,y=y.slice(0,S),_=y.length*h}if(i&&c&&g!=null)for(var b=Y4(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;Mp&&Hx(a,o.substring(p,m),e,v),Hx(a,g[2],e,v,g[1]),p=Gx.lastIndex}pf){var W=a.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),A(E,I,k),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` +`),u=!0),n.accumWidth=p}else{var g=q4(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,f=g.linesWidths,c=g.lines}}c||(c=e.split(` +`));for(var m=va(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var uq=ai(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function cq(t){return lq(t)?!!uq[t]:!0}function q4(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=va(e),h=0;hr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=v,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=v,c=p)):g?(a.push(l),o.push(u),l=v,u=p):(a.push(v),o.push(p));continue}c+=p,g?(l+=v,u+=p):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function ik(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(ak,Uc(r,o,i),Dl(n,s,a),o,s),Ce.intersect(e,ak,null,ok);var l=ok.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Uc(l.x,l.width,i,!0),t.baseY=Dl(l.y,l.height,a,!0)}}var ak=new Ce(0,0,0,0),ok={outIntersectRect:{},clamp:!0};function P2(t){return t!=null?t+="":t=""}function fq(t){var e=P2(t.text),r=t.font,n=da(va(r),e),i=kd(r);return mb(t,n,i,null)}function mb(t,e,r,n){var i=new Ce(Uc(t.x||0,e,t.textAlign),Dl(t.y||0,r,t.textBaseline),e,r),a=n??(K4(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function K4(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var yb="__zr_style_"+Math.round(Math.random()*10),kl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},V0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};kl[yb]=!0;var sk=["z","z2","invisible"],hq=["invisible"],si=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=$e(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(jp[0]=$x(i)*r+t,jp[1]=Zx(i)*n+e,Gp[0]=$x(a)*r+t,Gp[1]=Zx(a)*n+e,u(s,jp,Gp),c(l,jp,Gp),i=i%js,i<0&&(i=i+js),a=a%js,a<0&&(a=a+js),i>a&&!o?a+=js:ii&&(Hp[0]=$x(v)*r+t,Hp[1]=Zx(v)*n+e,u(s,Hp,s),c(l,Hp,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Gs=[],Hs=[],Wi=[],So=[],Ui=[],Zi=[],Yx=Math.min,Xx=Math.max,Ws=Math.cos,Us=Math.sin,Pa=Math.abs,_b=Math.PI,Po=_b*2,qx=typeof Float32Array<"u",rh=[];function Kx(t){var e=Math.round(t/_b*1e8)/1e8;return e%2*_b}function j0(t,e){var r=Kx(t[0]);r<0&&(r+=Po);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Po?i=r+Po:e&&r-i>=Po?i=r-Po:!e&&r>i?i=r+(Po-Kx(r-i)):e&&r0&&(this._ux=Pa(n/uy/e)||0,this._uy=Pa(n/uy/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(yt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Pa(e-this._xi),i=Pa(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(yt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(yt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(yt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),rh[0]=i,rh[1]=a,j0(rh,o),i=rh[0],a=rh[1];var s=a-i;return this.addData(yt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ws(a)*n+e,this._yi=Us(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(yt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&qx&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Wi[0]=Wi[1]=Ui[0]=Ui[1]=Number.MAX_VALUE,So[0]=So[1]=Zi[0]=Zi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Pa(S)>i||h===r-1)&&(g=Math.sqrt(_*_+S*S),a=m,o=y);break}case yt.C:{var b=e[h++],C=e[h++],m=e[h++],y=e[h++],M=e[h++],A=e[h++];g=MY(a,o,b,C,m,y,M,A,10),a=M,o=A;break}case yt.Q:{var b=e[h++],C=e[h++],m=e[h++],y=e[h++];g=AY(a,o,b,C,m,y,10),a=m,o=y;break}case yt.A:var D=e[h++],E=e[h++],k=e[h++],I=e[h++],z=e[h++],O=e[h++],F=O+z;h+=1,p&&(s=Ws(z)*k+D,l=Us(z)*I+E),g=Xx(k,I)*Yx(Po,Math.abs(O)),a=Ws(F)*k+D,o=Us(F)*I+E;break;case yt.R:{s=a=e[h++],l=o=e[h++];var G=e[h++],j=e[h++];g=G*2+j*2;break}case yt.Z:{var _=s-a,S=l-o;g=Math.sqrt(_*_+S*S),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,v=r<1,p,g,m=0,y=0,_,S=0,b,C;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(e.lineTo(b,C),S=0),A){case yt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case yt.L:{f=n[M++],h=n[M++];var E=Pa(f-u),k=Pa(h-c);if(E>i||k>a){if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+f*z,c*(1-z)+h*z);break e}m+=I}e.lineTo(f,h),u=f,c=h,S=0}else{var O=E*E+k*k;O>S&&(b=f,C=h,S=O)}break}case yt.C:{var F=n[M++],G=n[M++],j=n[M++],U=n[M++],V=n[M++],W=n[M++];if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;ds(u,F,j,V,z,Gs),ds(c,G,U,W,z,Hs),e.bezierCurveTo(Gs[1],Hs[1],Gs[2],Hs[2],Gs[3],Hs[3]);break e}m+=I}e.bezierCurveTo(F,G,j,U,V,W),u=V,c=W;break}case yt.Q:{var F=n[M++],G=n[M++],j=n[M++],U=n[M++];if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;Hv(u,F,j,z,Gs),Hv(c,G,U,z,Hs),e.quadraticCurveTo(Gs[1],Hs[1],Gs[2],Hs[2]);break e}m+=I}e.quadraticCurveTo(F,G,j,U),u=j,c=U;break}case yt.A:var H=n[M++],X=n[M++],K=n[M++],ne=n[M++],ie=n[M++],ue=n[M++],de=n[M++],Ge=!n[M++],xe=K>ne?K:ne,ge=Pa(K-ne)>.001,De=ie+ue,he=!1;if(v){var I=p[y++];m+I>_&&(De=ie+ue*(_-m)/I,he=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,X,K,ne,de,ie,De,Ge):e.arc(H,X,xe,ie,De,Ge),he)break e;D&&(s=Ws(ie)*K+H,l=Us(ie)*ne+X),u=Ws(De)*K+H,c=Us(De)*ne+X;break;case yt.R:s=u=n[M],l=c=n[M+1],f=n[M++],h=n[M++];var Me=n[M++],st=n[M++];if(v){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(f,h),e.lineTo(f+Yx(Ye,Me),h),Ye-=Me,Ye>0&&e.lineTo(f+Me,h+Yx(Ye,st)),Ye-=st,Ye>0&&e.lineTo(f+Xx(Me-Ye,0),h+st),Ye-=Me,Ye>0&&e.lineTo(f,h+Xx(st-Ye,0));break e}m+=I}e.rect(f,h,Me,st);break;case yt.Z:if(v){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=yt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Eo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>n+f&&c>a+f&&c>s+f||ct+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=nh);var h=Math.atan2(l,s);return h<0&&(h+=nh),h>=n&&h<=i||h+nh>=n&&h+nh<=i}function Oa(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var wo=ya.CMD,Zs=Math.PI*2,_q=1e-4;function xq(t,e){return Math.abs(t-e)<_q}var Kr=[-1,-1,-1],Zn=[-1,-1];function Sq(){var t=Zn[0];Zn[0]=Zn[1],Zn[1]=t}function wq(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u1&&Sq(),v=ur(e,n,a,s,Zn[0]),h>1&&(p=ur(e,n,a,s,Zn[1]))),h===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Sr(e,n,a,u),h=0;hr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Kr[0]=-l,Kr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Zs-1e-4){n=0,i=Zs;var c=a?1:-1;return o>=Kr[0]+t&&o<=Kr[1]+t?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=Zs,i+=Zs);for(var h=0,v=0;v<2;v++){var p=Kr[v];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Zs+g),(g>=n&&g<=i||g+Zs>=n&&g+Zs<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Oa(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),g){case wo.M:c=a[p++],f=a[p++],l=c,u=f;break;case wo.L:if(r){if(Eo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Oa(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.C:if(r){if(mq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=wq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.Q:if(r){if(Q4(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=bq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case wo.A:var y=a[p++],_=a[p++],S=a[p++],b=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);h=Math.cos(C)*S+y,v=Math.sin(C)*b+_,m?(c=h,f=v):s+=Oa(l,u,h,v,n,i);var D=(n-y)*b/S+y;if(r){if(yq(y,_,b,C,C+M,A,e,D,i))return!0}else s+=Tq(y,_,b,C,C+M,A,D,i);l=Math.cos(C+M)*S+y,u=Math.sin(C+M)*b+_;break;case wo.R:c=l=a[p++],f=u=a[p++];var E=a[p++],k=a[p++];if(h=c+E,v=f+k,r){if(Eo(c,f,h,f,e,n,i)||Eo(h,f,h,v,e,n,i)||Eo(h,v,c,v,e,n,i)||Eo(c,v,c,f,e,n,i))return!0}else s+=Oa(h,f,h,v,n,i),s+=Oa(c,v,c,f,n,i);break;case wo.Z:if(r){if(Eo(l,u,c,f,e,n,i))return!0}else s+=Oa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!xq(u,f)&&(s+=Oa(l,u,c,f,n,i)||0),s!==0}function Cq(t,e,r){return J4(t,0,!1,e,r)}function Mq(t,e,r,n){return J4(t,e,!0,r,n)}var vy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},kl),Lq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},V0.style)},Qx=ga.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?ub:n>.2?aX:cb}else if(r)return cb}return ub},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Zv(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Ju)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Mq(s,l/u,r,n)))return!0}if(this.hasFill())return Cq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ju,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ju)},e.prototype.createStyle=function(r){return Ad(vy,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},f=$e(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var mc=Math.round;function G0(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(mc(n*2)===mc(i*2)&&(t.x1=t.x2=Pn(n,s,!0)),mc(a*2)===mc(o*2)&&(t.y1=t.y2=Pn(a,s,!0))),t}}function eV(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Pn(n,s,!0),t.y=Pn(i,s,!0),t.width=Math.max(Pn(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Pn(i+o,s,!1)-t.y,o===0?0:1)),t}}function Pn(t,e,r){if(!e)return t;var n=mc(t*2);return(n+mc(e))%2===0?n/2:(n+(r?1:-1))/2}var Eq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Nq={},ze=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Eq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=eV(Nq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Iq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ue);ze.prototype.type="rect";var hk={fill:"#000"},vk=2,$i={},Rq={style:Se({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},V0.style)},Xe=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=hk,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(F=M[O],F.align==="right");)this._placeToken(F,r,D,y,z,"right",S),E-=F.width,z-=F.width,O--;for(I+=(c-(I-m)-(_-z)-E)/2;k<=O;)F=M[k],this._placeToken(F,r,D,y,I+F.width/2,"center",S),I+=F.width,k++;y+=D}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&Jx(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var v=!!u.backgroundColor,p=r.textPadding;p&&(o=_k(o,s,p),f-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild($c),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,b=!1,C=yk("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=mk("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!y.autoStroke||_)?(S=vk,b=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||ao,m.opacity=mn(u.opacity,n.opacity,1),pk(m,u),M&&(m.lineWidth=mn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),C&&(m.fill=C),g.setBoundingRect(mb(m,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,v=r.borderRadius,p=this,g,m;if(h||r.lineHeight||u&&c){g=this._getOrCreateChild(ze),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(h){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(f){m=this._getOrCreateChild(pr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var b=(g||m).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=mn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return rV(r)&&(n=[r.fontStyle,r.fontWeight,tV(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Mn(n)||r.textFont||r.font},e}(si),Oq={left:!0,right:1,center:1},zq={top:1,bottom:1,middle:1},dk=["fontStyle","fontWeight","fontSize","fontFamily"];function tV(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?u2+"px":t+"px"}function pk(t,e){for(var r=0;r=0,a=!1;if(t instanceof Ue){var o=nV(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Pu(s)||Pu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Pu(u.fill)&&Pu(s)?(a=!0,n=J({},n),u=J({},u),u.fill=sy(s)):!Pu(u.stroke)&&Pu(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=sy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??df)}return n}function Wq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Vq)}return r}function Uq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Gq(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function e1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Hq(this,t,e,r);if(t==="blur")return Uq(this,t,r);if(t==="select")return Wq(this,t,r)}return r}function $l(t){t.stateProxy=e1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=e1),r&&(r.stateProxy=e1)}function Tk(t,e){!cV(t,e)&&!t.__highByOuter&&go(t,iV)}function Ck(t,e){!cV(t,e)&&!t.__highByOuter&&go(t,aV)}function so(t,e){t.__highByOuter|=1<<(e||0),go(t,iV)}function lo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&go(t,aV)}function sV(t){go(t,E2)}function N2(t){go(t,oV)}function lV(t){go(t,Fq)}function uV(t){go(t,jq)}function cV(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function fV(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=D2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){oV(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function wb(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function as(t,e,r){bl(t,!0),go(t,$l),Tb(t,e,r)}function Kq(t){bl(t,!1)}function bt(t,e,r,n){n?Kq(t):as(t,e,r)}function Tb(t,e,r){var n=Ae(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var Lk=["emphasis","blur","select"],Qq={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=t1(p),s*=t1(p));var g=(i===a?-1:1)*t1((o*o*(s*s)-o*o*(v*v)-s*s*(h*h))/(o*o*(v*v)+s*s*(h*h)))||0,m=g*o*v/s,y=g*-s*h/o,_=(t+r)/2+Up(f)*m-Wp(f)*y,S=(e+n)/2+Wp(f)*m+Up(f)*y,b=kk([1,0],[(h-m)/o,(v-y)/s]),C=[(h-m)/o,(v-y)/s],M=[(-1*h-m)/o,(-1*v-y)/s],A=kk(C,M);if(Mb(C,M)<=-1&&(A=ih),Mb(C,M)>=1&&(A=0),A<0){var D=Math.round(A/ih*1e6)/1e6;A=ih*2+D%2*ih}c.addData(u,_,S,o,s,b,A,f,a)}var iK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,aK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function oK(t){var e=new ya;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=ya.CMD,l=t.match(iK);if(!l)return e;for(var u=0;uF*F+G*G&&(D=k,E=I),{cx:D,cy:E,x0:-c,y0:-f,x1:D*(i/C-1),y1:E*(i/C-1)}}function vK(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function dK(t,e){var r,n=Bh(e.r,0),i=Bh(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,v=Ek(u-l),p=v>r1&&v%r1;if(p>gi&&(v=p),!(n>gi))t.moveTo(c,f);else if(v>r1-gi)t.moveTo(c+n*ku(l),f+n*$s(l)),t.arc(c,f,n,l,u,!h),i>gi&&(t.moveTo(c+i*ku(u),f+i*$s(u)),t.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,_=void 0,S=void 0,b=void 0,C=void 0,M=void 0,A=void 0,D=void 0,E=void 0,k=void 0,I=void 0,z=void 0,O=void 0,F=void 0,G=n*ku(l),j=n*$s(l),U=i*ku(u),V=i*$s(u),W=v>gi;if(W){var H=e.cornerRadius;H&&(r=vK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=Ek(n-i)/2;if(S=Yi(X,y),b=Yi(X,_),C=Yi(X,g),M=Yi(X,m),E=A=Bh(S,b),k=D=Bh(C,M),(A>gi||D>gi)&&(I=n*ku(u),z=n*$s(u),O=i*ku(l),F=i*$s(l),vgi){var ge=Yi(y,E),De=Yi(_,E),he=Zp(O,F,G,j,n,ge,h),Me=Zp(I,z,U,V,n,De,h);t.moveTo(c+he.cx+he.x0,f+he.cy+he.y0),E0&&t.arc(c+he.cx,f+he.cy,ge,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,n,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!h),De>0&&t.arc(c+Me.cx,f+Me.cy,De,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.moveTo(c+G,f+j),t.arc(c,f,n,l,u,!h);if(!(i>gi)||!W)t.lineTo(c+U,f+V);else if(k>gi){var ge=Yi(g,k),De=Yi(m,k),he=Zp(U,V,I,z,i,-De,h),Me=Zp(G,j,O,F,i,-ge,h);t.lineTo(c+he.cx+he.x0,f+he.cy+he.y0),k0&&t.arc(c+he.cx,f+he.cy,De,Fr(he.y0,he.x0),Fr(he.y1,he.x1),!h),t.arc(c,f,i,Fr(he.cy+he.y1,he.cx+he.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),h),ge>0&&t.arc(c+Me.cx,f+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!h))}else t.lineTo(c+U,f+V),t.arc(c,f,i,u,l,h)}t.closePath()}}}var pK=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Rr=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new pK},e.prototype.buildPath=function(r,n){dK(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ue);Rr.prototype.type="sector";var gK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),pf=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new gK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Ue);pf.prototype.type="ring";function mK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,v=t.length;h=2){if(n){var a=mK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sXs[1]){if(a=!1,_r.negativeSize||n)return a;var l=$p(Xs[0]-Ys[1]),u=$p(Ys[0]-Xs[1]);n1(l,u)>Xp.len()&&(l=u||!_r.bidirectional)&&(Te.scale(Yp,s,-u*i),_r.useDir&&_r.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var f=c.duration,h=c.delay,v=c.easing,p={duration:f,delay:h||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){B2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){B2("enter",t,e,r,n,i,a)}function kc(t){if(!t.__zr)return!0;for(var e=0;eaa(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Ok(t){return!t.isGroup}function PK(t){return t.shape!=null}function Od(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){Ok(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return PK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(Ok(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Ae(o).dataIndex)}}})}function j2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=kn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=kn(i,e.y+e.height),[n,i]})}function MV(t,e){var r=Gt(t.x,e.x),n=kn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=kn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function yf(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new pr(n)):Yc(t.replace("path://",""),n,r,"center")}function Vh(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=i1(v,p,c,f)/h;return!(m<0||m>1)}function i1(t,e,r,n){return t*n-r*e}function DK(t){return t<=1e-6&&t>=-1e-6}function Yl(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),zk(t,Ct,"x","width",3,1,i&&i[0]||0),zk(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function zk(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,kn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:aa(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function mo(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&R($e(l),function(c){fe(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Ae(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Ab(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Cs(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function Z0(t,e,r){PV(t,e,r,-1/0)}function PV(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Ms(t,e){return Ne(Ne({},t,!0),e,!0)}const GK={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},HK={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var yy="ZH",U2="EN",Ic=U2,hm={},Z2={},RV=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Ic).toUpperCase();return t.indexOf(yy)>-1?yy:Ic}():Ic;function $2(t,e){t=t.toUpperCase(),Z2[t]=new We(e),hm[t]=e}function WK(t){if(se(t)){var e=hm[t.toUpperCase()]||{};return t===yy||t===U2?ye(e):Ne(ye(e),ye(hm[Ic]),!1)}else return Ne(ye(t),ye(hm[Ic]),!1)}function Db(t){return Z2[t]}function UK(){return Z2[Ic]}$2(U2,GK);$2(yy,HK);var kb=null;function ZK(t){kb||(kb=t)}function Xt(){return kb}var Y2=1e3,X2=Y2*60,dv=X2*60,Qn=dv*24,Gk=Qn*365,$K={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},vm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},YK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Kp="{yyyy}-{MM}-{dd}",Hk={year:"{yyyy}",month:"{yyyy}-{MM}",day:Kp,hour:Kp+" "+vm.hour,minute:Kp+" "+vm.minute,second:Kp+" "+vm.second,millisecond:YK},Sn=["year","month","day","hour","minute","second","millisecond"],XK=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function qK(t){return!se(t)&&!me(t)?KK(t):t}function KK(t){t=t||{};var e={},r=!0;return R(Sn,function(n){r&&(r=t[n]==null)}),R(Sn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Sn[s],u=we(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=vm[n]:$K[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Qr(t,e){return t+="","0000".substr(0,e-t.length)+t}function pv(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function QK(t){return t===pv(t)}function JK(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function zd(t,e,r,n){var i=wa(t),a=i[OV(r)](),o=i[q2(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[K2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[Q2(r)](),f=(c-1)%12+1,h=i[J2(r)](),v=i[eM(r)](),p=i[tM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Db(n||RV)||UK(),_=y.getModel("time"),S=_.get("month"),b=_.get("monthAbbr"),C=_.get("dayOfWeek"),M=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Qr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Qr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Qr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Qr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Qr(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Qr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Qr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Qr(p,3)).replace(/{S}/g,p+"")}function eQ(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=_c(t.value,i);a=r[c][c][0]}}return zd(new Date(t.value),a,i,n)}function _c(t,e){var r=wa(t),n=r[q2(e)]()+1,i=r[K2(e)](),a=r[Q2(e)](),o=r[J2(e)](),s=r[eM(e)](),l=r[tM(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,v=h&&i===1,p=v&&n===1;return p?"year":v?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function _y(t,e,r){switch(e){case"year":t[zV(r)](0);case"month":t[BV(r)](1);case"day":t[VV(r)](0);case"hour":t[FV(r)](0);case"minute":t[jV(r)](0);case"second":t[GV(r)](0)}return t}function OV(t){return t?"getUTCFullYear":"getFullYear"}function q2(t){return t?"getUTCMonth":"getMonth"}function K2(t){return t?"getUTCDate":"getDate"}function Q2(t){return t?"getUTCHours":"getHours"}function J2(t){return t?"getUTCMinutes":"getMinutes"}function eM(t){return t?"getUTCSeconds":"getSeconds"}function tM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function tQ(t){return t?"setUTCFullYear":"setFullYear"}function zV(t){return t?"setUTCMonth":"setMonth"}function BV(t){return t?"setUTCDate":"setDate"}function VV(t){return t?"setUTCHours":"setHours"}function FV(t){return t?"setUTCMinutes":"setMinutes"}function jV(t){return t?"setUTCSeconds":"setSeconds"}function GV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function rQ(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function rM(t){if(!T2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function nM(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Sf=Ld;function Ib(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Mn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?wa(t):t;if(isNaN(+l)){if(s)return"-"}else return zd(l,n,r)}if(e==="ordinal")return Jm(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=ma(t);return a(u)?rM(u):Jm(t)?i(t):typeof t=="boolean"?t+"":"-"}var Wk=["a","b","c","d","e","f","g"],s1=function(t,e){return"{"+t+(e??"")+"}"};function iM(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function iQ(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd +yyyy`);var n=wa(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),f=n[i+"Milliseconds"]();return t=t.replace("MM",Qr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Qr(a%100+"",2)).replace("dd",Qr(s,2)).replace("d",s).replace("hh",Qr(l,2)).replace("h",l).replace("mm",Qr(u,2)).replace("m",u).replace("ss",Qr(c,2)).replace("s",c).replace("SSS",Qr(f,3)),t}function aQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function ql(t,e){return e=e||"transparent",se(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function xy(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var dm={},l1={},wf=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(dm),this._normalMasterList=n(l1);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){R(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){dm[e]=r;return}l1[e]=r},t.get=function(e){return l1[e]||dm[e]},t}();function oQ(t){return!!dm[t]}var Eb={coord:1,coord2:2};function sQ(t){WV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var WV=ve();function lQ(t){var e=t.getShallow("coord",!0),r=Eb.coord;if(e==null){var n=WV.get(t.type);n&&n.getCoord2&&(r=Eb.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var na={none:0,dataCoordSys:1,boxCoordSys:2};function UV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=na.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=na.dataCoordSys,a||(i=na.none)):n==="box"&&(i=na.boxCoordSys,!a&&!oQ(r)&&(i=na.none))}return{coordSysType:r,kind:i}}function Bd(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=UV(e),o=a.kind,s=a.coordSysType;if(i&&o!==na.dataCoordSys&&(o=na.dataCoordSys,s=r),o===na.none||s!==r)return!1;var l=n(r,e);return l?(o===na.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var ZV=function(t,e){var r=e.getReferringComponents(t,Dt).models[0];return r&&r.coordinateSystem},pm=R,$V=["left","right","top","bottom","width","height"],Tl=[["width","left","right"],["height","top","bottom"]];function aM(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),v,p;if(t==="horizontal"){var g=c.width+(h?-h.x+c.x:0);v=a+g,v>n||l.newline?(a=0,v=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(h?-h.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=v+r:o=p+r)})}var El=aM;Ie(aM,"vertical");Ie(aM,"horizontal");function YV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function uQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Fh.point)a=r.refPoint,i=wt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=wt(n,r.refContainer),a=r.boxCoordFrom===Eb.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function XV(t,e){var r=uQ(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function wt(t,e,r){r=Sf(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),f=r[2]+r[0],h=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(c)&&(v>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=v*c),isNaN(c)&&(c=u/v)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function qV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return f;for(var m=0;m=0;l--)s=Ne(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return vf(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return YV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(We);Z4(Fe,We);z0(Fe);FK(Fe);jK(Fe,hQ);function hQ(t){var e=[];return R(Fe.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return oa(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var q={color:{},darkColor:{},size:{}},Vt=q.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(Vt,{primary:Vt.neutral80,secondary:Vt.neutral70,tertiary:Vt.neutral60,quaternary:Vt.neutral50,disabled:Vt.neutral20,border:Vt.neutral30,borderTint:Vt.neutral20,borderShade:Vt.neutral40,background:Vt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Vt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Vt.neutral70,axisLineTint:Vt.neutral40,axisTick:Vt.neutral70,axisTickMinor:Vt.neutral60,axisLabel:Vt.neutral70,axisSplitLine:Vt.neutral15,axisMinorSplitLine:Vt.neutral05});for(var qs in Vt)if(Vt.hasOwnProperty(qs)){var Uk=Vt[qs];qs==="theme"?q.darkColor.theme=Vt.theme.slice():qs==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":qs.indexOf("accent")===0?q.darkColor[qs]=Xa(Uk,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[qs]=Xa(Uk,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var QV="";typeof navigator<"u"&&(QV=navigator.platform||"");var Iu="rgba(0, 0, 0, 0.2)",JV=q.color.theme[0],vQ=Xa(JV,null,null,.9);const dQ={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[vQ,JV],aria:{decal:{decals:[{color:Iu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Iu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Iu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Iu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Iu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Iu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:QV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var eF=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Rn="original",Cr="arrayRows",On="objectRows",Ri="keyedColumns",ss="typedArray",tF="unknown",Di="column",lu="row",Ar={Must:1,Might:2,Not:3},rF=je();function pQ(t){rF(t).datasetMap=ve()}function nF(t,e,r){var n={},i=sM(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=rF(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),R(t,function(g,m){var y=we(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});R(t,function(g,m){var y=g.name,_=p(g);if(c==null){var S=h.valueWayDim;v(n[y],S,_),v(o,S,_),h.valueWayDim+=_}else if(c===m)v(n[y],0,_),v(a,0,_);else{var S=h.categoryWayDim;v(n[y],S,_),v(o,S,_),h.categoryWayDim+=_}});function v(g,m,y){for(var _=0;_e)return t[n];return t[r-1]}function oF(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:xQ(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function SQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Qp,ah,$k,Yk="\0_ec_inner",wQ=1,uM=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new We(a),this._locale=new We(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=Kk(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,Kk(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?$k(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=n&&n.replaceMergeMainTypeMap;pQ(this),R(r,function(f,h){f!=null&&(Fe.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ye(f):Ne(i[h],f,!0))}),u&&u.each(function(f,h){Fe.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),Fe.topologicalTravel(s,Fe.getAllClassMainTypes(),c,this);function c(f){var h=yQ(this,f,gt(r[f])),v=a.get(f),p=v?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=j4(v,h,p);zX(g,f,Fe),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],_=0,S;R(g,function(b,C){var M=b.existing,A=b.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var D=f==="series",E=Fe.getClass(f,b.keyInfo.subType,!D);if(!E)return;if(f==="tooltip"){if(S)return;S=!0}if(M&&M.constructor===E)M.name=b.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var k=J({componentIndex:C},b.keyInfo);M=new E(A,this,this,k),J(M,k),b.brandNew&&(M.__requireNewView=!0),M.init(A,this,this),M.optionUpdated(null,!0)}}M?(m.push(M.option),y.push(M),_++):(m.push(void 0),y.push(void 0))},this),i[f]=m,a.set(f,y),o.set(f,_),f==="series"&&Qp(this)}this._seriesIndices||Qp(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Fe.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Yv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Yk],r},e.prototype.setTheme=function(r){this._theme=new We(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function kQ(t,e){return t.join(",")===e.join(",")}var pi=R,ed=we,Qk=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function u1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=Qk.length;r0?r[o-1].seriesModel:null)}),FQ(r)}})}function FQ(t){R(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var v,p;s?p=o.getRawIndex(f):v=o.get(e.stackedByDimension,f);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,v)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=TX(h,_),g=_;break}}}return n[0]=h,n[1]=g,n})})}var X0=function(){function t(e){this.data=e.data||(e.sourceFormat===Ri?{}:[]),this.sourceFormat=e.sourceFormat||tF,this.seriesLayoutBy=e.seriesLayoutBy||Di,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=S)}v[0]=p,v[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};aI=(e={},e[Cr+"_"+Di]={pure:!0,appendData:a},e[Cr+"_"+lu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[On]={pure:!0,appendData:a},e[Ri]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[Rn]={appendData:a},e[ss]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return qc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function uI(t){var e,r;return we(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function gv(t){return new YQ(t)}var YQ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||v1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},qQ=function(){function t(e,r){if(!qe(r)){var n="";at(n)}this._opFn=mF[e],this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(ma(e),this._rvalFloat)},t}(),yF=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:ma(e),i=qe(r)?r:ma(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),KQ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=ma(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=ma(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function QQ(t,e){return t==="eq"||t==="ne"?new KQ(t==="eq",e):fe(mF,t)?new qQ(t,e):null}var JQ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return ls(e,r)},t}();function eJ(t,e){var r=new JQ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Di&&at(o);var s=[],l={},u=t.dimensionsDefine;if(u)R(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var S="";fe(l,y)&&at(S),l[y]=_}});else for(var c=0;c65535?lJ:uJ}function Nu(){return[1/0,-1/0]}function cJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function hI(t,e,r,n,i){var a=SF[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=v[i[0]],S=v[i[1]],b=e[i[1]][0],C=e[i[1]][1],y=0;y=f&&_<=h||isNaN(_))&&(M>=b&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=f&&_<=h||isNaN(_))&&(l[u++]=A)}else for(var y=0;ye[k][1])&&(D=!1)}D&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,f,h,v=new(Eu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var p=1;pc&&(c=f,h=b)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,v=c+m)}var S=this.getRawIndex(f),b=this.getRawIndex(v);fc-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[v++]=_}return a._count=v,a._indices=h,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return ls(r[a],this._dimensions[a])}h1={arrayRows:e,objectRows:function(r,n,i,a){return ls(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ls(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),wF=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(eg(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=rn(s)?ss:Rn,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),g=pe(f.dimensions,h.dimensions),m=v!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=m?[Ob(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var S=y.get("source",!0);i=[Ob(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&dI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&dI(f),s.push(c),l.push(u._getVersionSign())}),n?o=oJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[jQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!t.noHeader;return N(t.blocks,function(i){var a=mF(i);a>=e&&(e=a+ +(n&&(!a||Eb(i)&&!i.noHeader)))}),e}return 0}function eJ(t,e,r,n){var i=e.noHeader,a=rJ(mF(e)),o=[],s=e.blocks||[];Rr(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(fe(u,l)){var c=new uF(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}N(s,function(g,m){var y=e.valueFormatter,_=gF(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var f=t.renderMode==="richText"?o.join(a.richText):Rb(n,o.join(""),i?r:a.html);if(i)return f;var h=Lb(e.header,"ordinal",t.useUTC),v=pF(n,t.renderMode).nameStyle,p=dF(n);return t.renderMode==="richText"?yF(t,h,v)+a.richText+f:Rb(n,'
'+Wr(h)+"
"+f,r)}function tJ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(b){return b=ee(b)?b:[b],re(b,function(T,C){return Lb(T,ee(v)?v[C]:v,u)})};if(!(a&&o)){var f=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||X.color.secondary,i),h=a?"":Lb(l,"ordinal",u),v=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=pF(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":yF(t,h,_))+(o?"":aJ(t,p,g,m,S)):Rb(n,(s?"":f)+(a?"":nJ(h,!s,_))+(o?"":iJ(p,g,m,S)),r)}}function oI(t,e,r,n,i,a){if(t){var o=gF(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function rJ(t){return{html:QQ[t],richText:JQ[t]}}function Rb(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=dF(t);return'
'+e+n+"
"}function nJ(t,e,r){var n=e?"margin-left:2px":"";return''+Wr(t)+""}function iJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Wr(o)}).join("  ")+""}function yF(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function aJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function _F(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Xl(n)}function xF(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var s1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=L4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=RV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?N(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function SF(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=_F(e,r),c,f,h,v;if(o>1||l&&!o){var p=oJ(s,e,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,v=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=c=Yc(i,r,a[0]),f=g.type}else v=c=l?s[0]:s;var m=m2(e),y=m&&e.name||"",_=i.getName(r),S=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:v,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Mn(S),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function oJ(t,e,r,n,i){var a=e.getData(),o=ai(t,function(f,h,v){var p=a.getDimensionInfo(v);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?N(n,function(f){c(Yc(a,r,f),f)}):N(t,c);function c(f,h){var v=a.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var bo=Fe();function Kp(t,e){return t.getName(e)||t.getId(e)}var vm="__universalTransitionEnabled",ht=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=vv({count:lJ,reset:uJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=bo(this).sourceManager=new vF(this);a.prepareSource();var o=this.getInitialData(r,i);lI(o,this),this.dataTask.context.data=o,bo(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Xv(this),a=i?ou(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Re(r,n.getTheme().get(this.subType)),Re(r,this.getDefaultOption()),Hl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&_a(r,a,i)},e.prototype.mergeOption=function(r,n){r=Re(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Xv(this);i&&_a(this.option,r,i);var a=bo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);lI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,bo(this).dataBeforeProcessed=o,sI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=_,h=y,v=0),y===h&&(c[v++]=g))}),c.length=v,c},e.prototype.formatTooltip=function(r,n,i){return SF({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ue.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=eM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Kp(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[vm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ve.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ve);Bt(ht,U0);Bt(ht,eM);z4(ht,Ve);function sI(t){var e=t.name;m2(t)||(t.name=sJ(t)||e)}function sJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return N(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function lJ(t){return t.model.getRawData().count()}function uJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cJ}function cJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function lI(t,e){N(jc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(fJ,e))})}function fJ(t,e){var r=Nb(t);return r&&r.setOutputEnd((e||this).count()),e}function Nb(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var mt=function(){function t(){this.group=new _e,this.uid=yf("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();_2(mt);I0(mt);function Sf(){var t=Fe();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var wF=Fe(),hJ=Sf(),lt=function(){function t(){this.group=new _e,this.uid=yf("viewChart"),this.renderTask=vv({plan:vJ,reset:dJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&cI(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Ts(this.group,e)},t.markUpdateMethod=function(e,r){wF(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function uI(t,e,r){t&&Zv(t)&&(e==="emphasis"?so:lo)(t,r)}function cI(t,e,r){var n=Wl(t,e),i=e&&e.highlightKey!=null?Fq(e.highlightKey):null;n!=null?N(gt(n),function(a){uI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){uI(a,r,i)})}_2(lt);I0(lt);function vJ(t){return hJ(t.model)}function dJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&wF(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),pJ[l]}var pJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},py="\0__throttleOriginMethod",fI="\0__throttleRate",hI="\0__throttleType";function $0(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var v=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function wf(t,e,r,n){var i=t[e];if(i){var a=i[py]||i,o=i[hI],s=i[fI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=$0(a,r,n==="debounce"),i[py]=a,i[hI]=n,i[fI]=r}return i}}function Kv(t,e){var r=t[e];r&&r[py]&&(r.clear&&r.clear(),t[e]=r[py])}var vI=Fe(),dI={itemStyle:Ul(CV,!0),lineStyle:Ul(TV,!0)},gJ={lineStyle:"stroke",itemStyle:"fill"};function bF(t,e){var r=t.visualStyleMapper||dI[e];return r||(console.warn("Unknown style type '"+e+"'."),dI.itemStyle)}function TF(t,e){var r=t.visualDrawType||gJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var mJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=bF(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=TF(t,n),u=o[l],c=me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),v.setItemVisual(p,"style",m)}}}},ah=new He,yJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=bF(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){ah.option=l[n];var u=i(ah),c=o.ensureUniqueItemVisual(s,"style");J(c,u),ah.option.decal&&(o.setItemVisual(s,"decal",ah.option.decal),ah.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},_J={performRawSeries:!0,overallReset:function(t){var e=ve();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),vI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=vI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=TF(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",p=n.count();h[l]=r.getColorFromPalette(v,o,p)}})}})}},Qp=Math.PI;function xJ(t,e){e=e||{},Se(e,{text:"loading",textColor:X.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:X.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new ze({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ze({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Dd({shape:{startAngle:-Qp/2,endAngle:-Qp/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Qp*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Qp*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var CF=function(){function t(e,r,n,i){this._stageTaskMap=ve(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=ve();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;N(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Rr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;N(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=ve(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||vv({plan:CJ,reset:MJ,count:AJ}));v.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,v)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||vv({reset:SJ});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Rr(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,N(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,vv({reset:wJ,onDirty:TJ})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:PJ(e)}),e.uid=yf("stageHandler"),r&&(e.visualType=r),e},t}();function SJ(t){t.overallReset(t.ecModel,t.api,t.payload)}function wJ(t){return t.overallProgress&&bJ}function bJ(){this.agent.dirty(),this.getDownstream().dirty()}function TJ(){this.agent&&this.agent.dirty()}function CJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function MJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return MF(n)}):LJ}var LJ=MF(0);function MF(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&v===u.length-h.length){var p=u.slice(0,v);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,h,v,p){return f[v]==null||h[p||v]===f[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Ob=["symbol","symbolSize","symbolRotate","symbolOffset"],gI=Ob.concat(["symbolKeepAspect"]),IJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Cl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function zb(t,e,r){for(var n=e.type==="radial"?$J(t,e,r):ZJ(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function sM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&XJ(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var qJ=new ya(!0);function yy(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function mI(t){return typeof t=="string"&&t!=="none"}function _y(t){var e=t.fill;return e!=null&&e!=="none"}function yI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function _I(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Bb(t,e,r){var n=x2(e.image,e.__image,r);if(E0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*rv),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function KJ(t,e,r,n){var i,a=yy(r),o=_y(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||qJ,f=e.__dirty;if(!n){var h=r.fill,v=r.stroke,p=o&&!!h.colorStops,g=a&&!!v.colorStops,m=o&&!!h.image,y=a&&!!v.image,_=void 0,S=void 0,b=void 0,T=void 0,C=void 0;(p||g)&&(C=e.getBoundingRect()),p&&(_=f?zb(t,h,C):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=f?zb(t,v,C):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(b=f||!e.__canvasFillPattern?Bb(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(T=f||!e.__canvasStrokePattern?Bb(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=T),p?t.fillStyle=_:m&&(b?t.fillStyle=b:o=!1),g?t.strokeStyle=S:y&&(T?t.strokeStyle=T:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var D,E;t.setLineDash&&r.lineDash&&(i=sM(e),D=i[0],E=i[1]);var k=!0;(u||f&Qu)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),D&&(t.setLineDash(D),t.lineDashOffset=E),n||(r.strokeFirst?(a&&_I(t,r),o&&yI(t,r)):(o&&yI(t,r),a&&_I(t,r))),D&&t.setLineDash([])}function QJ(t,e,r){var n=e.__image=x2(r.image,e.__image,e,e.onload);if(!(!n||!E0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;t.drawImage(n,u,c,f,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function JJ(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||ao,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=sM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(yy(r)&&t.strokeText(i,r.x,r.y),_y(r)&&t.fillText(i,r.x,r.y)):(_y(r)&&t.fillText(i,r.x,r.y),yy(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var xI=["shadowBlur","shadowOffsetX","shadowOffsetY"],SI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function IF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){hn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Dl.opacity:o}(n||e.blend!==r.blend)&&(a||(hn(t,i),a=!0),t.globalCompositeOperation=e.blend||Dl.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,zu(this),!this._model||n){var l=new vQ(this._api),u=this._theme,c=this._model=new tM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},Gb);var f={seriesTransition:s,optionChanged:!0};if(i)this[mr]={silent:a,updateParams:f},this[er]=!1,this.getZr().wakeUp();else{try{el(this),ka.update.call(this,null,f)}catch(h){throw this[mr]=null,this[er]=!1,h}this._ssr||this._zr.flush(),this[mr]=null,this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[mr]&&(a==null&&(a=this[mr].silent),o=this[mr].updateParams,this[mr]=null),this[er]=!0,zu(this);try{this._updateTheme(r),i.setTheme(this._theme),el(this),ka.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=KF[r]),r&&(r=ye(r),r&&eF(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ue.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return N(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;N(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return N(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(by[i]){var l=s,u=s,c=-s,f=-s,h=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();N(El,function(S,b){if(S.group===i){var T=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),C=S.getDom().getBoundingClientRect();l=a(C.left,l),u=a(C.top,u),c=o(C.right,c),f=o(C.bottom,f),h.push({dom:T,left:C.left,top:C.top})}}),l*=v,u*=v,c*=v,f*=v;var p=c-l,g=f-u,m=yn.createCanvas(),y=ob(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return N(h,function(S){var b=S.left-l,T=S.top-u;_+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new ze({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),N(h,function(S){var b=new dr({style:{x:S.left*v-l,y:S.top*v-u,image:S.dom}});y.add(b)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return rg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return rg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return rg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Pc(i,r);return N(o,function(s,l){l.indexOf("Models")>=0&&N(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Pc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?oM(s,l,n):Nd(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;N(Cee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Tl(l,function(g){var m=Ae(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),p=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;N(Fb,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),RJ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&R4(this.getDom(),fM,"");var n=this,i=n._api,a=n._model;N(n._componentsViews,function(o){o.dispose(a,i)}),N(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete El[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[mr]&&(a==null&&(a=this[mr].silent),i=!0,this[mr]=null),this[er]=!0,zu(this);try{i&&el(this),ka.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Nu.call(this,a),Ou.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Hb[r]){var i=Hb[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=Vb[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(we(n)||(n={silent:!!n}),!!Sy[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;v1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ue.browser.weChat&&this._throttledZrFlush(),Nu.call(this,i),Ou.call(this,i)}},e.prototype.updateLabelLayout=function(){yi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){el=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),f1(f,!0),f1(f,!1),h.plan()},f1=function(f,h){for(var v=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,_=f._api,S=0;Sh.get("hoverLayerThreshold")&&!Ue.node&&!Ue.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=Yl(f);h.eachRendered(function(p){return j0(p,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!Dc(v)){var p=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),g=v.get("duration"),m=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Dc(y))return;if(y instanceof We&&jq(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),b=y.getTextGuideLine();S&&(S.stateTransition=m),b&&(b.stateTransition=m)}y.__dirty&&a(y)}})}RI=function(f){return new(function(h){$(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},v.prototype.enterEmphasis=function(p,g){so(p,g),Fn(f)},v.prototype.leaveEmphasis=function(p,g){lo(p,g),Fn(f)},v.prototype.enterBlur=function(p){Q4(p),Fn(f)},v.prototype.leaveBlur=function(p){M2(p),Fn(f)},v.prototype.enterSelect=function(p){J4(p),Fn(f)},v.prototype.leaveSelect=function(p){eV(p),Fn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return f[eg]},v}(QV))(f)},qF=function(f){function h(v,p){for(var g=0;g=0)){OI.push(r);var a=CF.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function mM(t,e){Hb[t]=e}function Nee(t){V3({createCanvas:t})}function nj(t,e,r){var n=BF("registerMap");n&&n(t,e,r)}function Oee(t){var e=BF("getMap");return e&&e(t)}var ij=UQ;Ms(uM,mJ);Ms(Y0,yJ);Ms(Y0,_J);Ms(uM,IJ);Ms(Y0,EJ);Ms(HF,see);dM(eF);pM(dee,CQ);mM("default",xJ);Oi({type:kl,event:kl,update:kl},Nt);Oi({type:sm,event:sm,update:sm},Nt);Oi({type:ly,event:T2,update:ly,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:gb,event:T2,update:gb,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});Oi({type:uy,event:T2,update:uy,action:Nt,refineEvent:yM,publishNonRefinedEvent:!0});function yM(t,e,r,n){return{eventContent:{selected:Oq(r),isFromClick:e.isFromClick||!1}}}vM("default",{});vM("dark",PF);var zee={},zI=[],Bee={registerPreprocessor:dM,registerProcessor:pM,registerPostInit:JF,registerPostUpdate:ej,registerUpdateLifecycle:X0,registerAction:Oi,registerCoordinateSystem:tj,registerLayout:rj,registerVisual:Ms,registerTransform:ij,registerLoading:mM,registerMap:nj,registerImpl:lee,PRIORITY:WF,ComponentModel:Ve,ComponentView:mt,SeriesModel:ht,ChartView:lt,registerComponentModel:function(t){Ve.registerClass(t)},registerComponentView:function(t){mt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){FF(t,e)},registerSubTypeDefaulter:function(t,e){Ve.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){x4(t,e)}};function Oe(t){if(ee(t)){N(t,function(e){Oe(e)});return}Ee(zI,t)>=0||(zI.push(t),me(t)&&(t={install:t}),t.install(Bee))}function sh(t){return t==null?0:t.length||1}function BI(t){return t}var uo=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||BI,this._newKeyGetter=i||BI,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;s30}var lh=we,To=re,Wee=typeof Int32Array>"u"?Array:Int32Array,Uee="e\0\0",VI=-1,Zee=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],$ee=["_approximateExtent"],FI,ig,uh,ch,g1,fh,m1,Zr=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;oj(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Nn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():lh(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,lh(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){lh(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;pb(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){N(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:To(this.dimensions,this._getDimInfo,this),this.hostModel)),g1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(C0(arguments)))})},t.internalField=function(){FI=function(e){var r=e._invertedIndicesMap;N(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new Wee(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function Yee(t,e){return Tf(t,e).dimensions}function Tf(t,e){rM(t)||(t=nM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=ve(),a=[],o=qee(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&uj(o),l=n===t.dimensionsDefine,u=l?lj(t):sj(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=ve(c),h=new fF(o),v=0;v0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function qee(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return N(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Kee(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Qee=function(){function t(e){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=e}return t}();function Jee(t){var e=t.get("coordinateSystem"),r=new Qee(e),n=ete[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var ete={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Dt).models[0],a=t.getReferringComponents("yAxis",Dt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Bu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Bu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Dt).models[0];e.coordSysDims=["single"],r.set("single",i),Bu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Dt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Bu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Bu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();N(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Bu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",Dt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Bu(t){return t.get("type")==="category"}function cj(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;tte(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,h;if(N(a,function(_,S){se(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,p=c.type,g=0;N(a,function(_){_.coordDim===v&&g++});var m={name:f,coordDim:v,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function tte(t){return!oj(t.schema)}function co(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function _M(t,e){return co(t,e)?t.getCalculationInfo("stackResultDimension"):e}function rte(t,e){var r=t.get("coordinateSystem"),n=xf.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Ty(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function nte(t,e,r){var n,i;return r&&N(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Ta(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=nM(t)):(i=n.getSource(),a=i.sourceFormat===Nn);var o=Jee(e),s=rte(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(YV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Tf(i,c),h=nte(f.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(f),p=cj(e,{schema:f,store:v}),g=new Zr(f,e);g.setCalculationInfo(p);var m=h!=null&&ite(i)?function(y,_,S,b){return b===h?S:this.defaultDimValueGetter(y,_,S,b)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,m),g}function ite(t){if(t.sourceFormat===Nn){var e=ate(t.data||[]);return!ee(cf(e))}}function ate(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=ed(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return ste(l,t),a}function y1(t){var e=Math.pow(10,k0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function ed(t){return bi(t)+2}function jI(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function ste(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),jI(t,0,e),jI(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xM(t,e){return t>=e[0]&&t<=e[1]}var lte=function(){function t(){this.normalize=GI,this.scale=HI}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=GI,this.scale=HI)},t}();function GI(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function HI(t,e){return t*(e[1]-e[0])+e[0]}function Ub(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Ls=function(){function t(e){this._calculator=new lte,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();I0(Ls);var ute=0,td=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ute,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,cte);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},t}();function cte(t){return we(t)&&t.value!=null?t.value:t+""}var qc=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new td({})),ee(i)&&(i=new td({categories:re(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return xM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ls);Ls.registerClass(qc);var Co=Ht,fo=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=ed(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=Co(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return i[1]>v&&(r.expandToNicedExtent?l.push({value:Co(v+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function dj(t){var e=vte(t),r=[];return N(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(_j(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:S,axisKey:SM(a),stackId:hj(n)})}),pj(r)}function pj(t){var e={};N(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ze(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),N(a,function(y){var _=y.maxWidth,S=y.minWidth;if(y.width){var b=y.width;_&&(b=Math.min(b,_)),S&&(b=Math.max(b,S)),y.width=b,f-=b+c*b,h--}else{var b=v;_&&_b&&(b=S),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var p=0,g;N(a,function(y,_){y.width||(y.width=v),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;N(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function dte(t,e,r){if(t&&e){var n=t[SM(e)];return n}}function gj(t,e){var r=vj(t,e),n=dj(r);N(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=hj(i),u=n[SM(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function mj(t){return{seriesType:t,plan:Sf(),reset:function(e){if(yj(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=co(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),v=pte(i,a),p=_j(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,b){for(var T=S.count,C=p&&sa(T*3),A=p&&l&&sa(T*3),D=p&&sa(T),E=n.master.getRect(),k=h?E.width:E.height,I,z=b.getStore(),O=0;(I=S.next())!=null;){var F=z.get(f?m:o,I),G=z.get(s,I),j=v,U=void 0;f&&(U=+F-z.get(o,I));var V=void 0,W=void 0,H=void 0,Y=void 0;if(h){var K=n.dataToPoint([F,G]);if(f){var ne=n.dataToPoint([U,G]);j=ne[0]}V=j,W=K[1]+_,H=K[0]-j,Y=y,Math.abs(H)0?r:1:r))}var gte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=ag.length,s=Math.min(gte(ag,this._approxInterval,0,o),o-1);this._interval=ag[s][1],this._intervalPrecision=ed(this._interval),this._minLevelUnit=ag[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+wa(r)},e.prototype.contain=function(r){return xM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(fo),ag=[["second",F2],["minute",j2],["hour",fv],["quarter-day",fv*6],["half-day",fv*12],["day",Qn*1.2],["half-week",Qn*3.5],["week",Qn*7],["month",Qn*31],["quarter",Qn*95],["half-year",Ek/2],["year",Ek]];function xj(t,e,r,n){return vy(new Date(e),t,n).getTime()===vy(new Date(r),t,n).getTime()}function mte(t,e){return t/=Qn,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function yte(t){var e=30*Qn;return t/=e,t>6?6:t>3?3:t>2?2:1}function _te(t){return t/=fv,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function WI(t,e){return t/=e?j2:F2,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function xte(t){return p2(t,!0)}function Ste(t,e,r){var n=Math.max(0,Ee(Sn,e)-1);return vy(new Date(t),Sn[n],r).getTime()}function wte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function bte(t,e,r,n,i,a){var o=1e4,s=NK,l=0;function u(O,F,G,j,U,V,W){for(var H=wte(U,O),Y=F,K=new Date(Y);Yo));)if(K[U](K[j]()+O),Y=K.getTime(),a){var ne=a.calcNiceTickMultiple(Y,H);ne>0&&(K[U](K[j]()+ne*O),Y=K.getTime())}W.push({value:Y,notAdd:!0})}function c(O,F,G){var j=[],U=!F.length;if(!xj(hv(O),n[0],n[1],r)){U&&(F=[{value:Ste(n[0],O,r)},{value:n[1]}]);for(var V=0;V=n[0]&&W<=n[1]&&u(Y,W,H,K,ne,ie,j),O==="year"&&G.length>1&&V===0&&G.unshift({value:G[0].value-Y})}}for(var V=0;V=n[0]&&b<=n[1]&&v++)}var T=i/e;if(v>T*1.5&&p>T/1.5||(f.push(_),v>T||t===s[g]))break}h=[]}}}for(var C=tt(re(f,function(O){return tt(O,function(F){return F.value>=n[0]&&F.value<=n[1]&&!F.notAdd})}),function(O){return O.length>0}),A=[],D=C.length-1,g=0;g0;)a*=10;var s=[$b(Cte(n[0]/a)*a),$b(Tte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=ed(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=sg(r)/sg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=sg(r)/sg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),og(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(fo);function lg(t,e){return $b(t,bi(e))}Ls.registerClass(Sj);var Mte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},t.prototype.modifyDataMinMax=function(e,r){this[Ate[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Lte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Lte={min:"_determinedMin",max:"_determinedMax"},Ate={min:"_dataMin",max:"_dataMax"};function wj(t,e,r){var n=t.rawExtentInfo;return n||(n=new Mte(t,e,r),t.rawExtentInfo=n,n)}function ug(t,e){return e==null?null:kr(e)?NaN:t.parse(e)}function bj(t,e){var r=t.type,n=wj(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=vj("bar",o),l=!1;if(N(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=dj(s),c=Pte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Pte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=dte(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;N(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;N(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function ql(t,e){var r=e,n=bj(t,r),i=n.extent,a=r.get("splitNumber");t instanceof Sj&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(Cj(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Od(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new qc({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new wM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Ls.getClass(e)||fo)}}function Dte(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Cf(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=OK(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(Cy(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Cy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Cy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function bM(t){var e=t.get("interval");return e??"auto"}function Tj(t){return t.type==="category"&&bM(t.getLabelModel())===0}function My(t,e){var r={};return N(t.mapDimensionsAll(e),function(n){r[_M(t,n)]=!0}),Ze(r)}function kte(t,e,r){e&&N(My(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function Kc(t){return t==="middle"||t==="center"}function rd(t){return t.getShallow("show")}function Cj(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Ite(t.axis)?void 0:e}function Ite(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Mf=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function Ete(t){return Ta(null,t)}var Rte={isDimensionStacked:co,enableDataStack:cj,getStackedDimension:_M};function Nte(t,e){var r=e;e instanceof He||(r=new He(e));var n=Od(r);return n.setExtent(t[0],t[1]),ql(n,r),n}function Ote(t){Bt(t,Mf)}function zte(t,e){return e=e||{},pt(t,null,null,e.state!=="normal")}const Bte=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:Yee,createList:Ete,createScale:Nte,createSymbol:Ut,createTextStyle:zte,dataStack:Rte,enableHoverEmphasis:as,getECData:Ae,getLayoutRect:wt,mixinAxisModelCommonMethods:Ote},Symbol.toStringTag,{value:"Module"}));var Vte=1e-8;function UI(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return jte(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return N(o,function(s){s.type==="polygon"?ZI(s.exterior,i,a,r):N(s.points,function(l){ZI(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Yb(t,e){return t=Hte(t),re(tt(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new $I(o[0],o.slice(1)));break;case"MultiPolygon":N(i.coordinates,function(l){l[0]&&a.push(new $I(l[0],l.slice(1)))});break;case"LineString":a.push(new YI([i.coordinates]));break;case"MultiLineString":a.push(new YI(i.coordinates))}var s=new Lj(n[e||"name"],a,n.cp);return s.properties=n,s})}const Wte=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:lb,asc:Ln,getPercentWithPrecision:uX,getPixelPrecision:v2,getPrecision:bi,getPrecisionSafe:T4,isNumeric:g2,isRadianAroundZero:Wc,linearMap:it,nice:p2,numericToNumber:ma,parseDate:wa,parsePercent:oe,quantile:om,quantity:M4,quantityExponent:k0,reformIntervals:ub,remRadian:d2,round:Ht},Symbol.toStringTag,{value:"Module"})),Ute=Object.freeze(Object.defineProperty({__proto__:null,format:Ed,parse:wa,roundTime:vy},Symbol.toStringTag,{value:"Module"})),Zte=Object.freeze(Object.defineProperty({__proto__:null,Arc:Dd,BezierCurve:df,BoundingRect:Ce,Circle:ba,CompoundPath:kd,Ellipse:Pd,Group:_e,Image:dr,IncrementalDisplayable:hV,Line:Wt,LinearGradient:iu,Polygon:Or,Polyline:br,RadialGradient:P2,Rect:ze,Ring:vf,Sector:Nr,Text:Xe,clipPointsByRect:E2,clipRectByRect:mV,createIcon:gf,extendPath:pV,extendShape:dV,getShapeClass:$v,getTransform:os,initProps:St,makeImage:k2,makePath:Zc,mergePath:Tn,registerShape:ci,resizePath:I2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),$te=Object.freeze(Object.defineProperty({__proto__:null,addCommas:Y2,capitalFirst:UK,encodeHTML:Wr,formatTime:WK,formatTpl:q2,getTextRect:GK,getTooltipMarker:RV,normalizeCssArray:_f,toCamelCase:X2,truncateText:GX},Symbol.toStringTag,{value:"Module"})),Yte=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:N,extend:J,filter:tt,indexOf:Ee,inherits:a2,isArray:ee,isFunction:me,isObject:we,isString:se,map:re,merge:Re,reduce:ai},Symbol.toStringTag,{value:"Module"}));var Xte=Fe(),dv=Fe(),Ri={estimate:1,determine:2};function Ly(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Pj(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function qte(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Cf(t),i=t.scale.getExtent(),a=Pj(t,r),o=tt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?Qte(t,e):ere(t)}function Kte(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=Pj(t,n);return{ticks:tt(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?Jte(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function Qte(t,e){var r=t.getLabelModel(),n=Dj(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function Dj(t,e,r){var n=rre(t),i=bM(e),a=r.kind===Ri.estimate;if(!a){var o=Ij(n,i);if(o)return o}var s,l;me(i)?s=Nj(t,i):(l=i==="auto"?nre(t,r):i,s=Rj(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return Xb(n,i,u),!0}):Xb(n,i,u),u}function Jte(t,e){var r=tre(t),n=bM(e),i=Ij(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=Nj(t,n,!0);else if(n==="auto"){var s=Dj(t,t.getLabelModel(),Ly(Ri.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=Rj(t,o,!0);return Xb(r,n,{ticks:a,tickCategoryInterval:o})}function ere(t){var e=t.scale.getTicks(),r=Cf(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var tre=kj("axisTick"),rre=kj("axisLabel");function kj(t){return function(r){return dv(r)[t]||(dv(r)[t]={list:[]})}}function Ij(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=t.dataToCoord(f+1)-t.dataToCoord(f),v=Math.abs(h*Math.cos(a)),p=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,_=0,S=P0(i({value:f}),n.font,"center","top");y=S.width*1.3,_=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var b=g/v,T=m/p;isNaN(b)&&(b=1/0),isNaN(T)&&(T=1/0);var C=Math.max(0,Math.floor(Math.min(b,T)));if(r===Ri.estimate)return e.out.noPxChangeTryDetermine.push(le(are,null,t,C,l)),C;var A=Ej(t,C,l);return A??C}function are(t,e,r){return Ej(t,e,r)==null}function Ej(t,e,r){var n=Xte(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function ore(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Rj(t,e,r){var n=Cf(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Tj(t),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);v&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function Nj(t,e,r){var n=t.scale,i=Cf(t),a=[];return N(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var XI=[0,1],fi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return v2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count())),it(e,XI,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),qI(n,i.count()));var a=it(e,n,XI,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=Kte(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return sre(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Ly(Ri.determine),qte(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Ly(Ri.determine),ire(this,e)},t}();function qI(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function sre(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;N(e,function(v){v.coord-=u/2,v.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function h(v,p){return v=Ht(v),p=Ht(p),f?v>p:vi&&(i+=hh);var v=Math.atan2(s,o);if(v<0&&(v+=hh),v>=n&&v<=i||v+hh>=n&&v+hh<=i)return l[0]=c,l[1]=f,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,_=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return _0){e=e/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,Ti,_t),Te.sub(ia,jt,_t);var r=la.len(),n=ia.len();if(!(r<.001||n<.001)){la.scale(1/r),ia.scale(1/n);var i=la.dot(ia),a=Math.cos(e);if(a1&&Te.copy(Jr,jt),Jr.toArray(t[1])}}}}function mre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,_t,Ti),Te.sub(ia,jt,_t);var n=la.len(),i=ia.len();if(!(n<.001||i<.001)){la.scale(1/n),ia.scale(1/i);var a=la.dot(e),o=Math.cos(r);if(a=l)Te.copy(Jr,jt);else{Jr.scaleAndAdd(ia,s/Math.tan(Math.PI/2-c));var f=jt.x!==_t.x?(Jr.x-_t.x)/(jt.x-_t.x):(Jr.y-_t.y)/(jt.y-_t.y);if(isNaN(f))return;f<0?Te.copy(Jr,_t):f>1&&Te.copy(Jr,jt)}Jr.toArray(t[1])}}}}function S1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function yre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=ja(n[0],n[1]),a=ja(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=iv([],n[1],n[0],o/i),l=iv([],n[1],n[2],o/a),u=iv([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){b(k*E,0,a);var I=k+A;I<0&&T(-I*E,1)}else T(-A*E,1)}}function b(A,D,E){A!==0&&(c=!0);for(var k=D;k0)for(var I=0;I0;I--){var G=E[I-1]*F;b(-G,I,a)}}}function C(A){var D=A<0?-1:1;A=Math.abs(A);for(var E=Math.ceil(A/(a-1)),k=0;k0?b(E,0,k+1):b(-E,a-k-1,a),A-=E,A<=0)return}return c}function Sre(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!mf(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var v=a.oldLayoutSelect={};cg(v,u,fg),cg(v,n.states.select,fg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};cg(p,u,fg),cg(p,n.states.emphasis,fg)}bV(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Tre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,St(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),T1=Fe();function Mre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=T1(r).labelManager;i||(i=T1(r).labelManager=new Cre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=T1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var C1=Math.sin,M1=Math.cos,Gj=Math.PI,rl=Math.PI*2,Lre=180/Gj,Hj=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Ho(f-rl)||(c?u>=rl:-u>=rl),v=u>0?u%rl:u%rl+rl,p=!1;h?p=!0:Ho(f)?p=!1:p=v>=Gj==!!c;var g=e+n*M1(o),m=r+i*C1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Lre);if(h){var _=1/this._p,S=(c?1:-1)*(rl-_);this._add("A",n,i,y,1,+c,e+n*M1(o+S),r+i*C1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var b=e+n*M1(s),T=r+i*C1(s);this._add("A",n,i,y,+p,+c,b,T)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function Ore(t){return""}function LM(t,e){e=e||{};var r=e.newline?` -`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return Nre(o,s)+(o!=="style"?Wr(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+Ore(o)}return n(t)}function zre(t,e,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=re(Ze(t),function(l){return l+i+re(Ze(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=re(Ze(e),function(l){return"@keyframes "+l+i+re(Ze(e[l]),function(u){return u+i+re(Ze(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function eT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function rE(t,e,r,n){return cr("svg","root",{width:t,height:e,xmlns:Wj,"xmlns:xlink":Uj,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var Bre=0;function $j(){return Bre++}var nE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},sl="transform-origin";function Vre(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new Hj;return i.reset(v4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function Fre(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[sl]=r+"px "+n+"px")}var jre={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Yj(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function Gre(t,e,r){var n=t.shape.paths,i={},a,o;if(N(n,function(l){var u=eT(r.zrId);u.animation=!0,K0(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=Ze(c),v=h.length;if(v){o=h[v-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in f){var _=f[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=Yj(i,r);return a.replace(o,s)}}function iE(t){return se(t)?nE[t]?"cubic-bezier("+nE[t]+")":u2(t)?t:"":""}function K0(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof kd){var s=Gre(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var je=Yj(A,r);return je+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+$j();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function Hre(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};aE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=ty(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),aE(n,e,r)}}function aE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+$j(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var nd=Math.round;function Xj(t){return t&&se(t.src)}function qj(t){return t&&me(t.toDataURL)}function AM(t,e,r,n){Ire(function(i,a){var o=i==="fill"||i==="stroke";o&&h4(a)?Qj(e,t,i,n):o&&f2(a)?Jj(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),qre(r,t,n)}function PM(t,e){var r=S4(e);r&&(r.each(function(n,i){n!=null&&(t[(tE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[tE+"silent"]="true"))}function oE(t){return Ho(t[0]-1)&&Ho(t[1])&&Ho(t[2])&&Ho(t[3]-1)}function Wre(t){return Ho(t[4])&&Ho(t[5])}function DM(t,e,r){if(e&&!(Wre(e)&&oE(e))){var n=1e4;t.transform=oE(e)?"translate("+nd(e[4]*n)/n+" "+nd(e[5]*n)/n+")":CY(e)}}function sE(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Rr(h,m),Rr(v,m)}else if(h==null||v==null){var y=function(k,I){if(k){var z=k.elm,O=h||I.width,F=v||I.height;k.tag==="pattern"&&(u?(F=1,O/=a.width):c&&(O=1,F/=a.height)),k.attrs.width=O,k.attrs.height=F,z&&(z.setAttribute("width",O),z.setAttribute("height",F))}},_=x2(p,null,t,function(k){l||y(C,k),y(f,k)});_&&_.width&&_.height&&(h=h||_.width,v=v||_.height)}f=cr("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else i.svgElement&&(f=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var S,b;l?S=b=1:u?(b=1,S=o.width/a.width):c?(S=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),b!=null&&!isNaN(b)&&(o.height=b);var T=d4(i);T&&(o.patternTransform=T);var C=cr("pattern","",o,[f]),A=LM(C),D=n.patternCache,E=D[A];E||(E=n.zrId+"-p"+n.patternIdx++,D[A]=E,o.id=E,C=n.defs[E]=cr("pattern",E,o,[f])),e[r]=A0(E)}}function Kre(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=cr("clipPath",a,o,[Kj(t,r)])}e["clip-path"]=A0(a)}function cE(t){return document.createTextNode(t)}function dl(t,e,r){t.insertBefore(e,r)}function fE(t,e){t.removeChild(e)}function hE(t,e){t.appendChild(e)}function eG(t){return t.parentNode}function tG(t){return t.nextSibling}function L1(t,e){t.textContent=e}var vE=58,Qre=120,Jre=cr("","");function tT(t){return t===void 0}function ea(t){return t!==void 0}function ene(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Fh(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function id(t){var e,r=t.children,n=t.tag;if(ea(n)){var i=t.elm=Zj(n);if(kM(Jre,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,rG(t,p,r,i,l)):Iy(t,e,n,a))}function Ju(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(kM(t,e),tT(e.text)?ea(n)&&ea(i)?n!==i&&tne(r,n,i):ea(i)?(ea(t.text)&&L1(r,""),rG(r,null,i,0,i.length-1)):ea(n)?Iy(r,n,0,n.length-1):ea(t.text)&&L1(r,""):t.text!==e.text&&(ea(n)&&Iy(r,n,0,n.length-1),L1(r,e.text)))}function rne(t,e){if(Fh(t,e))Ju(t,e);else{var r=t.elm,n=eG(r);id(e),n!==null&&(dl(n,e.elm,tG(r)),Iy(n,[t],0,0))}return e}var nne=0,ine=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=dE(),this.configLayer=dE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+nne++,this._oldVNode=rE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=Zj("svg");kM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",rne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return uE(e,eT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=eT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=ane(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=cr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re(Ze(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(cr("defs","defs",{},u)),e.animation){var c=zre(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=cr("style","stl",{},[],c);o.push(f)}}return rE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},LM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var f=this.__startIndex;f15)break}}F.prevElClipPaths&&y.restore()};if(_)if(_.length===0)D=m.__endIndex;else for(var k=v.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*k,z.y*k,z.width*k,z.height*k),y.clip(),E(z),y.restore()}else y.save(),E(),y.restore();m.__drawIndex=D,m.__drawIndex0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?hg:0),this._needsManuallyCompositing),c.__builtin__||b0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&bn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,N(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Re(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=X.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function Qc(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Yc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var zd=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=vne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){so(this.childAt(0))},e.prototype.downplay=function(){lo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(p):Qe(v,p,s,n),li(v)}if(this._updateCommon(r,n,l,i,a),c){var v=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,St(v,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,v,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,v=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),v=S.get("blurScope"),p=S.get("disabled"),g=ar(_),m=S.getShallow("scale"),y=_.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var T=lu(r.getItemVisual(n,"symbolOffset"),i);T&&(s.x=T[0],s.y=T[1]),y&&s.attr("cursor",y);var C=r.getItemVisual(n,"style"),A=C.fill;if(s instanceof dr){var D=s.style;s.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},C))}else s.__isEmptyBrush?s.useStyle(J({},C)):s.useStyle(C),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=r.getItemVisual(n,"liftZ"),k=this._z2;E!=null?k==null&&(this._z2=s.z2,s.z2+=E):k!=null&&(s.z2=k,this._z2=null);var I=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:C.opacity});function z(G){return I?r.getName(G):Qc(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var F=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*F,O.scaleY=this._sizeY*F,this.setSymbolScale(1),bt(this,h,v,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Ae(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ds(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ds(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return bf(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function vne(t,e){this.parent.drift(t,e)}function P1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function mE(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function yE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var Bd=function(){function t(e){this.group=new _e,this._SymbolCtor=e||zd}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=mE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=yE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(P1(e,h,f,r)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=a.getItemGraphicEl(h),p=c(f);if(!P1(e,p,f,r)){n.remove(v);return}var g=e.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==g)n.remove(v),v=new o(e,f,l,u),v.setPosition(p);else{v.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Qe(v,y,i)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=mE(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function aG(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function pne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function gne(t,e,r,n,i,a,o,s){for(var l=pne(t,e),u=[],c=[],f=[],h=[],v=[],p=[],g=[],m=iG(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=i||g<0)break;if(Rl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),f=y,h=_;else{var S=y-u,b=_-c;if(S*S+b*b<.5){g+=a;continue}if(o>0){for(var T=g+a,C=e[T*2],A=e[T*2+1];C===y&&A===_&&m=n||Rl(C,A))v=y,p=_;else{k=C-u,I=A-c;var F=y-u,G=C-y,j=_-c,U=A-_,V=void 0,W=void 0;if(s==="x"){V=Math.abs(F),W=Math.abs(G);var H=k>0?1:-1;v=y-H*V*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){V=Math.abs(j),W=Math.abs(U);var Y=I>0?1:-1;v=y,p=_-Y*V*o,z=y,O=_+Y*W*o}else V=Math.sqrt(F*F+j*j),W=Math.sqrt(G*G+U*U),E=W/(W+V),v=y-k*o*(1-E),p=_-I*o*(1-E),z=y+k*o*E,O=_+I*o*E,z=Mo(z,Lo(C,y)),O=Mo(O,Lo(A,_)),z=Lo(z,Mo(C,y)),O=Lo(O,Mo(A,_)),k=z-y,I=O-_,v=y-k*V/W,p=_-I*V/W,v=Mo(v,Lo(u,y)),p=Mo(p,Lo(c,_)),v=Lo(v,Mo(u,y)),p=Lo(p,Mo(c,_)),k=y-v,I=_-p,z=y+k*W/V,O=_+I*W/V}t.bezierCurveTo(f,h,v,p,y,_),f=z,h=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var oG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),mne=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new oG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Rl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var b=u?(p-l)*S+l:(v-s)*S+s;return u?[r,b]:[b,r]}s=v,l=p;break;case o.C:v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++],_=a[f++];var T=u?Jm(s,v,g,y,r,c):Jm(l,p,m,_,r,c);if(T>0)for(var C=0;C=0){var b=u?lr(l,p,m,_,A):lr(s,v,g,y,A);return u?[r,b]:[b,r]}}s=y,l=_;break}}},e}(We),yne=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(oG),sG=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new yne},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Rl(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Sne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=xne(u,i==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,m=h[v-1].coord+p,y=m-g;if(y<.001)return"transparent";N(h,function(S){S.offset=(S.coord-g)/y}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var _=new iu(0,0,0,0,h,!0);return _[i]=g,_[i+"2"]=m,_}}}function wne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&bne(a,e))){var o=e.mapDimension(a.dim),s={};return N(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function bne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function Tne(t,e){return isNaN(t)||isNaN(e)}function Cne(t){for(var e=t.length/2;e>0&&Tne(t[e*2-2],t[e*2-1]);e--);return e-1}function bE(t,e){return[t[e*2],t[e*2+1]]}function Mne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function cG(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Ae(p).seriesIndex=r.seriesIndex,bt(p,j,U,V);var H=wE(r.get("smooth")),Y=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:Y,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=wE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:Y,connectNulls:A}),ir(g,r,"areaStyle"),Ae(g).seriesIndex=r.seriesIndex,bt(g,j,U,V)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=T,this._points=c,this._step=k,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Ae(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Wl(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,v=r.get("z")||0;u=new zd(o,s),u.x=c,u.y=f,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Wl(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;cy(this._polyline,r),n&&cy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new mne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new sG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=me(f)?f(null):f;r.eachItemGraphicEl(function(v,p){var g=v;if(g){var m=[v.x,v.y],y=void 0,_=void 0,S=void 0;if(i)if(o){var b=i,T=n.pointToCoord(m);a?(y=b.startAngle,_=b.endAngle,S=-T[1]/180*Math.PI):(y=b.r0,_=b.r,S=T[0])}else{var C=i;a?(y=C.x,_=C.x+C.width,S=v.x):(y=C.y+C.height,_=C.y,S=v.y)}var A=_===y?0:(S-y)/(_-y);l&&(A=1-A);var D=me(f)?f(p):c*A+h,E=g.getSymbolPath(),k=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:D}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(cG(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Cne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?nG(o,v):Qc(o,f)},enableTextSetter:!0},Lne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,v=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,S=n.shape,b=_?y?S.x:S.y+S.height:y?S.x+S.width:S.y,T=(y?g:0)*(_?-1:1),C=(y?0:-g)*(_?-1:1),A=y?"x":"y",D=Mne(f,b,A),E=D.range,k=E[1]-E[0],I=void 0;if(k>=1){if(k>1&&!v){var z=bE(f,E[0]);u.attr({x:z[0]+T,y:z[1]+C}),o&&(I=h.getRawValue(E[0]))}else{var z=c.getPointOn(b,A);z&&u.attr({x:z[0]+T,y:z[1]+C});var O=h.getRawValue(E[0]),F=h.getRawValue(E[1]);o&&(I=N4(i,p,O,F,D.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=bE(f,G);o&&(I=h.getRawValue(G)),u.attr({x:z[0]+T,y:z[1]+C})}if(o){var j=mf(u);typeof j.setLabelText=="function"&&j.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=gne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=Ao(h.stackedOnCurrent,h.current,i,o,l),v=Ao(h.current,null,i,o,l),m=Ao(h.stackedOnNext,h.next,i,o,l),g=Ao(h.next,null,i,o,l)),SE(v,g)>3e3||c&&SE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:g}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Qe(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=h.status,b=0;be&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var p=void 0;se(a)?p=Pne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,p,Dne))}}}}}function kne(t){t.registerChartView(Ane),t.registerSeriesModel(hne),t.registerLayout(Fd("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fG("line"))}var ad=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)N(a.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var _=void 0,S=void 0,b=1,T=0;Tm){S=(C+_)/2;break}T===1&&(b=A-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[v]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(ad);var Ine=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Ta(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Cs(ad.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:X.color.primary,borderWidth:2}},realtimeSort:!1}),e}(ad),Ene=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Ey=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Ene},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){qa(a,r,Ae(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(lt),TE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=k1(e.x,t.x),s=I1(e.x+e.width,i),l=k1(e.y,t.y),u=I1(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=I1(e.r,t.r),a=k1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},CE={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new ze({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Ey:Nr,c=new u({shape:n,z2:1});c.name="item";var f=hG(i);if(c.calculateTextPosition=Rne(f,{isRoundCap:u===Ey}),a){var h=c.shape,v=i?"r":"endAngle",p={};h[v]=i?n.r0:n.startAngle,p[v]=n[v],(s?Qe:St)(c,{shape:p},a)}return c}};function Bne(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function ME(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:St)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:St)(r,{shape:u},c,i)}function LE(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function jne(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function hG(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function PE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ua(n.getModel("itemStyle"),c,!0);J(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:Qc(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,Nne(t,m==="outside"?v:m,hG(o),n.get(["label","rotate"]))}wV(g,p,a.getRawValue(r),function(_){return nG(e,_)});var y=n.getModel(["emphasis"]);bt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),jne(i)&&(t.style.fill="none",t.style.stroke="none",N(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function Gne(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var Hne=function(){function t(){}return t}(),DE=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Hne},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function Wne(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function vG(t,e,r){if(ps(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function Une(t,e,r){var n=t.type==="polar"?Nr:ze;return new n({shape:vG(e,r,t),silent:!0,z2:0})}function Zne(t){t.registerChartView(zne),t.registerSeriesModel(Ine),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gj,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mj("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,fG("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var EE=Math.PI*2,gg=Math.PI/180;function $ne(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=FV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*gg,v=n.get("endAngle"),p=n.get("padAngle")*gg;v=v==="auto"?h-EE:-v*gg;var g=n.get("minAngle")*gg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,b=n.get("clockwise"),T=n.get("roseType"),C=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var D=b?1:-1,E=[h,v],k=D*p/2;O0(E,!b),h=E[0],v=E[1];var I=dG(n);I.startAngle=h,I.endAngle=v,I.clockwise=b,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(v-h),O=z,F=0,G=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(U,V){var W;if(isNaN(U)){i.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:T?NaN:u});return}T!=="area"?W=_===0&&C?S:U*S:W=z/y,WW?(Y=G+D*W/2,K=Y):(Y=G+k,K=H-k),i.setItemLayout(V,{angle:W,startAngle:Y,endAngle:K,clockwise:b,cx:s,cy:l,r0:c,r:T?it(U,A,[c,u]):u}),G=H}),Or?y:m,T=Math.abs(S.label.y-r);if(T>=b.maxY){var C=S.label.x-e-S.len2*i,A=n+S.len,D=Math.abs(C)t.unconstrainedWidth?null:h:null;n.setStyle("width",v)}gG(a,n)}}}function gG(t,e){NE.rect=t,Fj(NE,e,qne)}var qne={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},NE={};function E1(t){return t.position==="center"}function Kne(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*Yne,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(C){C.ignore=!0}function p(C){if(!C.ignore)return!0;for(var A in C.states)if(C.states[A].ignore===!1)return!0;return!1}e.each(function(C){var A=e.getItemGraphicEl(C),D=A.shape,E=A.getTextContent(),k=A.getTextGuideLine(),I=e.getItemModel(C),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),F=z.get("distanceToLabelLine"),G=z.get("alignTo"),j=oe(z.get("edgeDistance"),u),U=z.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var V=I.getModel("labelLine"),W=V.get("length");W=oe(W,u);var H=V.get("length2");if(H=oe(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":K>0?"left":"right"}var rt=Math.PI,ut=0,kt=z.get("rotate");if(qe(kt))ut=kt*(rt/180);else if(O==="center")ut=0;else if(kt==="radial"||kt===!0){var pr=K<0?-Y+rt:-Y;ut=pr}else if(kt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=rt*2+zr);var zi=ne>0;zi&&(zr=rt+zr),ut=zr-rt}if(a=!!ut,E.x=ie,E.y=ue,E.rotation=ut,E.setStyle({verticalAlign:"middle"}),xe){E.setStyle({align:je});var vu=E.states.select;vu&&(vu.x+=E.x,vu.y+=E.y)}else{var Bi=new Ce(0,0,0,0);gG(Bi,E),r.push({label:E,labelLine:k,position:O,len:W,len2:H,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:de,textAlign:je,labelDistance:F,labelAlignTo:G,edgeDistance:j,bleedMargin:U,rect:Bi,unconstrainedWidth:Bi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&Xne(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(lt);function Af(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Tf(n,e).dimensions,a=new Zr(i,t);return a.initData(n,r),a}var Pf=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),eie=Fe(),mG=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=eie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=C4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Hl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);$K({fullType:mG.type,getCoord2:function(t){return t.getShallow("center")}});function tie(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function rie(t){t.registerChartView(Jne),t.registerSeriesModel(mG),kF("pie",t.registerAction),t.registerLayout(Ie($ne,"pie")),t.registerProcessor(Lf("pie")),t.registerProcessor(tie("pie"))}var nie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:X.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),yG=4,iie=function(){function t(){}return t}(),aie=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new iie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),sie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Fd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new oie:new Bd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(lt),_G={left:0,right:0,top:0,bottom:0},Ry=["25%","25%"],lie=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=ou(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&_a(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&_a(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:_G,outerBoundsContain:"all",outerBoundsClampWidth:Ry[0],outerBoundsClampHeight:Ry[1],backgroundColor:X.color.transparent,borderWidth:1,borderColor:X.color.neutral30},e}(Ve),nT=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},e.type="cartesian2dAxis",e}(Ve);Bt(nT,Mf);var xG={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:X.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:X.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:X.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[X.color.backgroundTint,X.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:X.color.neutral00,borderColor:X.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},uie=Re({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},xG),IM=Re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:X.color.axisMinorSplitLine,width:1}}},xG),cie=Re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},IM),fie=Se({logBase:10},IM);const SG={category:uie,value:IM,time:cie,log:fie};var hie={value:1,category:1,time:1,log:1},iT=null;function vie(t){iT||(iT=t)}function jd(){return iT}function Jc(t,e,r,n){N(hie,function(i,a){var o=Re(Re({},SG[a],!0),n,!0),s=function(l){$(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Xv(this),v=h?ou(c):{},p=f.getTheme();Re(c,p.get(a+"Axis")),Re(c,this.getDefaultOption()),c.type=OE(c),h&&_a(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=td.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=jd();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",OE)}function OE(t){return t.type||(t.data?"category":"value")}var die=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),tt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),aT=["x","y"];function zE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var pie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=aT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!zE(r)||!zE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,v=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,v];this._invTransform=oi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(die),wG=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(fi),Q0="expandAxisBreak",bG="collapseAxisBreak",TG="toggleAxisBreak",EM="axisbreakchanged",gie={type:Q0,event:EM,update:"update",refineEvent:RM},mie={type:bG,event:EM,update:"update",refineEvent:RM},yie={type:TG,event:EM,update:"update",refineEvent:RM};function RM(t,e,r,n){var i=[];return N(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function _ie(t){t.registerAction(gie,e),t.registerAction(mie,e),t.registerAction(yie,e);function e(r,n){var i=[],a=Pc(n,r);function o(s,l){N(a[s],function(u){var c=u.updateAxisBreaks(r);N(c.breaks,function(f){var h;i.push(Se((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Wo=Math.PI,xie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Sie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ef=Fe(),CG=Fe(),MG=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function wie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=NM(t.axisName)&&Kc(t.nameLocation);N(n,function(p){var g=xa(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?oi(vh,m.transform):Cd(vh),g.transform&&Li(vh,vh,g.transform),Ce.copy(mg,g.localRect),mg.applyTransform(vh),s?s.union(mg):Ce.copy(s=new Ce(0,0,0,0),mg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ce(h,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var vh=fr(),mg=new Ce(0,0,0,0),LG=function(t,e,r,n,i,a){if(Kc(t.nameLocation)){var o=a.stOccupiedRect;o&&AG(xre({},o,a.transGroup.transform),n,i)}else PG(a.labelInfoList,a.dirVec,n,i)};function AG(t,e,r){var n=new Te;q0(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&qb(e,n)}function PG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Wc(i-Wo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),bie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Tie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(Ot(c,c,u),Ot(f,f,u));var v=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())jd().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},p));$c(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=lu(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=y[1];N([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(T,C){if(m[C]!=="none"&&m[C]!=null){var A=Ut(m[C],-S/2,-b/2,S,b,v.stroke,!0),D=T.r+T.offset,E=h?f:c;A.attr({rotation:T.rotate,x:E[0]+D*Math.cos(t.rotation),y:E[1]-D*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=VE(e,i,s);l&&BE(t,e,r,n,i,a,o,Ri.determine);var u=Aie(t,i,a,n);Lie(t,e.labelLayoutList,u),Pie(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(NM(u)){var c=t.nameLocation,f=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*v,y.x=-g):c==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+f*v,y.y=f);var _=fr();y.transform(po(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Wo/180);var b,T;Kc(c)?b=tn.innerTextLayout(t.rotation,S??t.rotation,f):(b=Cie(t.rotation,c,S||0,p),T=t.raw.axisNameAvailableWidth,T!=null&&(T=Math.abs(T/Math.sin(b.rotation)),!isFinite(T)&&(T=null)));var C=h.getFont(),A=n.get("nameTruncate",!0)||{},D=A.ellipsis,E=Sr(t.raw.nameTruncateMaxWidth,A.maxWidth,T),k=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:b.rotation,silent:tn.isLabelSilent(n),style:pt(h,{text:u,font:C,overflow:"truncate",width:E,ellipsis:D,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(mo({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=tn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Ae(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=xa({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:Kc(c)?xie[k]:Sie[k]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var F=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,F)}}}};function BE(t,e,r,n,i,a,o,s){kG(e)||Die(t,e,i,s,n,o);var l=e.labelLayoutList;kie(t,n,l,a),Rie(n,t.rotation,l);var u=t.optionHideOverlap;Mie(n,l,u),u&&jj(tt(l,function(c){return c&&!c.label.ignore})),wie(t,r,n,l)}function Cie(t,e,r,n){var i=d2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Wc(i-Wo/2)?(o=l?"bottom":"top",a="center"):Wc(i-Wo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iWo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Mie(t,e,r){if(Tj(t.axis))return;function n(s,l,u){var c=xa(e[l]),f=xa(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){jh(c.label);return}if(f.suggestIgnore){jh(f.label);return}var h=.1;if(!r){var v=[0,0,0,0];c=Kb({marginForce:v},c),f=Kb({marginForce:v},f)}q0(c,f,null,{touchThreshold:h})&&jh(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Lie(t,e,r){t.showMinorTicks||N(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)v=y1(v),p=u[1]-v*o;else{var m=t.getTicks().length-1;m>o&&(v=y1(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+v*_,g+v*S),n.setInterval.call(t,v),(_||S)&&n.setNiceExtent.call(t,p+v,g-v)}var jE=[[3,1],[0,2]],Bie=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=aT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Ze(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],p=v.model,g=v.scale;Wb(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(v):(ql(g,p),Wb(g)&&(s=v))}c.length&&(s||(s=c.pop(),ql(s.scale,s.model)),N(c,function(m){IG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};N(n.x,function(o){GE(n,"y",o,a)}),N(n.y,function(o){GE(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=or(e,r),a=this._rect=wt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(sT(o,a),!n){var u=jie(a,s,o,l,r),c=void 0;if(l)lT?(lT(this._axesList,a),sT(o,a)):c=UE(a.clone(),"axisLabel",null,a,o,u,i);else{var f=Gie(e,a,i),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;h&&(c=UE(h,v,p,a,o,u,i))}EG(a,o,Ri.determine,null,c,i)}N(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return $l(n,s,!0,!0,r),sT(i,n),l;function u(h){N(i[ke[h]],function(v){if(rd(v.model)){var p=a.ensureRecord(v.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!kr(v)&&v>1e-4&&(h/=v),h}}function jie(t,e,r,n,i){var a=new MG(Hie);return N(r,function(o){return N(o,function(s){if(rd(s.model)){var l=!n;s.axisBuilder=Oie(t,e,s.model,i,a,l)}})}),a}function EG(t,e,r,n,i,a){var o=r===Ri.determine;N(e,function(u){return N(u,function(c){rd(c.model)&&(zie(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ke[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}N(e,function(u,c){return N(u,function(f){rd(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function Gie(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=wt(t.get("outerBounds",!0)||_G,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[oy(pe(t.get("outerBoundsClampWidth",!0),Ry[0]),e.width),oy(pe(t.get("outerBoundsClampHeight",!0),Ry[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var Hie=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";LG(t,e,r,n,i,a),Kc(t.nameLocation)||N(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&PG(s.labelInfoList,s.dirVec,n,i)})};function Wie(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Uie(r,t,e),r.seriesInvolved&&$ie(r,t),r}function Uie(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];N(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=od(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(N(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&N(p.baseAxes,Ie(g,v?"cross":!0,h)),v&&N(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var S=_.model.getModel("axisPointer",i),b=S.get("show");if(!(!b||b==="auto"&&!m&&!uT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?Zie(_,f,i,e,m,y):S;var T=S.get("snap"),C=S.get("triggerEmphasis"),A=od(_.model),D=y||T||_.type==="category",E=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:C,involveSeries:D,snap:T,useHandle:uT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||D;var k=Yie(a,_);if(k!=null){var I=o[k]||(o[k]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[k].mapper,E.linkGroup=I}}}})}function Zie(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};N(s,function(h){l[h]=ye(o.get(h))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Se(u,f.textStyle)}}return t.model.getModel("axisPointer",new He(l,r,n))}function $ie(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||N(t.coordSysAxesInfo[od(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function Yie(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function Xie(t){var e=OM(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=uT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var rae=Fe();function YE(t,e,r,n){if(t instanceof wG){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?VG(r,o,u,n):nae(t,e,r,n,o,l):r}function VG(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function nae(t,e,r,n,i,a){var o=rae(t);o.items||(o.items=[]);var s=o.items,l=XE(s,e,r,n,i,a,1),u=XE(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?VG(r,i,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function XE(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Re(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new He(m,null,this.ecModel);return Bt(_,Mf.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:X.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Re({lineStyle:{color:X.color.neutral20}},dh.axisLine),axisLabel:yg(dh.axisLabel,!1),axisTick:yg(dh.axisTick,!1),splitLine:yg(dh.splitLine,!0),splitArea:yg(dh.splitArea,!0),indicator:[]},e}(Ve),hae=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new tn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});N(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),v=u.get("color"),p=ee(h)?h:[h],g=ee(v)?v:[v],m=[],y=[];function _(G,j,U){var V=U%j.length;return G[V]=G[V]||[],V}if(a==="circle")for(var S=i[0].getTicksCoords(),b=n.cx,T=n.cy,C=0;C3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(QE(this._zr,"globalPan")||ph(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(oo(a.event),a.__ecRoamConsumed=!0,JE(r,n,i,a,o))},e}(ui);function ph(t){return t.__ecRoamConsumed}var xae=Fe();function J0(t){var e=xae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function gh(t,e,r,n){for(var i=J0(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=UG(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=i;i=new _e,i.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ze({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=O1[s];if(c&&fe(O1,s)){l=c.call(this,e,r);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var v=nR[s];if(v&&fe(nR,s)){var p=v.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new Uc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});jn(r,n),_n(e,n,this._defsUsePending,!1,!1),Tae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){O1={g:function(e,r){var n=new _e;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new ze;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new ba;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Pd;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new Or({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=oR(n));var a=new br({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new dr;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=sV(n);return jn(r,i),_n(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),nR={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new iu(e,r,n,i);return iR(t,a),aR(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new P2(e,r,n);return iR(t,i),aR(t,i),i}};function iR(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function aR(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};WG(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Ur(o),u=l&&l[3];u&&(l[3]*=Ya(s),o=ti(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function jn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function oR(t){for(var e=t_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=t_(o);switch(i=i||fr(),s){case"translate":Ii(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":L0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":po(i,i,-parseFloat(l[0])*z1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*z1);Li(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*z1);Li(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var lR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function WG(t,e,r){var n=t.getAttribute("style");if(n){lR.lastIndex=0;for(var i;(i=lR.exec(n))!=null;){var a=i[1],o=fe(Oy,a)?Oy[a]:null;o&&(e[o]=i[2]);var s=fe(zy,a)?zy[a]:null;s&&(r[s]=i[2])}}}function Dae(t,e,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=ve(),n=ve(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,p){return p&&(v=p(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function f(v){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},v);var p=e.getTextContent();if(p&&(ZG(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function vR(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Ae(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function dR(t,e,r,n,i){t.data||mo({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function pR(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return bt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&Vq(e,i,r),o}function gR(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),N(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=X.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:X.color.tertiary},itemStyle:{borderWidth:.5,borderColor:X.color.border,areaColor:X.color.background},emphasis:{label:{show:!0,color:X.color.primary},itemStyle:{areaColor:X.color.highlight}},select:{label:{show:!0,color:X.color.primary},itemStyle:{color:X.color.highlight}},nameProperty:"name"},e}(ht);function qae(t,e){var r={};return N(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var b=t.getBoxLayoutParams();b.aspect=g,S=wt(b,p),S=jV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function eoe(t,e){N(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var toe=function(){function t(){this.dimensions=YG}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new hT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=xR,u.resize(o,r)}),e.eachSeries(function(o){Rd({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Dt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),N(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new hT(s,s,J({nameMap:T0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=Sr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=xR,u.resize(o[0],r),N(o,function(c){c.coordinateSystem=u,eoe(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=ve(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function soe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){uoe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=coe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function loe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function SR(t){return arguments.length?t:voe}function Gh(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function uoe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function coe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=B1(s),a=V1(a),s&&a;){i=B1(i),o=V1(o),i.hierNode.ancestor=t;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(hoe(foe(s,t,r),t,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!B1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!V1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function B1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function V1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function foe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function hoe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function voe(t,e){return t.parentNode===e.parentNode?1:2}var doe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),poe=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new doe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=oe(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[c]=s[c],r.lineTo(v[0],v[1]),v[c]=l[c],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var p=1;p_.x,T||(b=b-Math.PI));var A=T?"left":"right",D=s.getModel("label"),E=D.get("rotate"),k=E*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:D.get("position")||A,rotation:E==null?-b:k,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?jc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Ae(r).focus=O),moe(i,o,c,r,p,v,g,n),r.__edge&&(r.onHoverStateChange=function(F){if(F!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Ad||cy(r.__edge,F)}})}function moe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),f=t.getOrient(),h=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new df({shape:vT(c,f,h,i,i)})),Qe(g,{shape:vT(c,f,h,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function e6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function WM(t,e){var r=e6(t);return Ee(r,e)>=0}function r_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Moe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new He(i,this,this.ecModel),o=HM.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:X.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function Loe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function Aoe(t,e){t.eachSeriesByType("tree",function(r){Poe(r,e)})}function Poe(t,e){var r=or(t,e).refContainer,n=wt(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=SR(function(b,T){return(b.parentNode===T.parentNode?1:2)/b.depth})):(a=n.width,o=n.height,s=SR());var l=t.getData().tree.root,u=l.children[0];if(u){ooe(l),Loe(u,soe,s),l.hierNode.modifier=-u.hierNode.prelim,_h(u,loe);var c=u,f=u,h=u;_h(u,function(b){var T=b.getLayout().x;Tf.getLayout().x&&(f=b),b.depth>h.depth&&(h=b)});var v=c===f?1:s(c,f)/2,p=v-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,_=(b.depth-1)*m;var T=Gh(y,_);b.setLayout({x:T.x,y:T.y,rawX:y,rawY:_},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(f.getLayout().x+v+p),g=a/(h.depth-1||1),_h(u,function(b){_=(b.getLayout().x+p)*m,y=S==="LR"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),_h(u,function(b){y=(b.getLayout().x+p)*g,_=S==="TB"?(b.depth-1)*m:o-(b.depth-1)*m,b.setLayout({x:y,y:_},!0)}))}}}function Doe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function koe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Ioe(t){t.registerChartView(goe),t.registerSeriesModel(Moe),t.registerLayout(Aoe),t.registerVisual(Doe),koe(t)}var MR=["treemapZoomToNode","treemapRender","treemapMove"];function Eoe(t){for(var e=0;e1;)a=a.parentNode;var o=Db(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Roe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};r6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new He({itemStyle:o},this,n);a=r.levels=Noe(a,n);var l=re(a||[],function(f){return new He(f,s,n)},this),u=HM.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=r_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:X.size.l,top:X.size.xxxl,right:X.size.l,bottom:X.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:X.size.m,emptyItemWidth:25,itemStyle:{color:X.color.backgroundShade,textStyle:{color:X.color.secondary}},emphasis:{itemStyle:{color:X.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:X.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:X.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function r6(t){var e=0;N(t.children,function(n){r6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function Noe(t,e){var r=gt(e.get("color")),n=gt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;N(t,function(s){var l=new He(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var Ooe=8,LR=8,F1=5,zoe=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=or(e,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},v={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=wt(h,f);this._prepare(n,v,u),this._renderContent(e,v,p,s,l,u,c,i),H0(o,h,f)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+Ooe*2,r.emptyItemWidth);r.totalWidth+=s+LR,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=r.totalWidth,v=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=v.length-1;g>=0;g--){var m=v[g],y=m.node,_=m.width,S=m.text;h>n.width&&(h-=_-c,_=c,S=null);var b=new Or({shape:{points:Boe(u,0,_,f,g===v.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:pt(o,{text:S})}),textConfig:{position:"inside"},z2:hf*1e4,onclick:Ie(l,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=pt(s,{text:S}),b.ensureState("emphasis").style=p,bt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),Voe(b,e,y),u+=_+LR}},t.prototype.remove=function(){this.group.removeAll()},t}();function Boe(t,e,r,n,i,a){var o=[[i?t:t-F1,e],[t+r,e],[t+r,e+n],[i?t:t-F1,e+n]];return!a&&o.splice(2,0,[t+r+F1,e+n/2]),!i&&o.push([t,e+n/2]),o}function Voe(t,e,r){Ae(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&r_(r,e)}}var Foe=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iPR||Math.abs(r.dy)>PR)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Ii(m,m,[-n,-i]),L0(m,m,[p,p]),Ii(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&dy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new zoe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(WM(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=xh(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(lt);function xh(){return{nodeGroup:[],background:[],content:[]}}function Zoe(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=t.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,b=c.upperHeight,T=S&&S.length,C=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),D=h.getModel(["blur","itemStyle"]),E=h.getModel(["select","itemStyle"]),k=C.get("borderRadius")||0,I=ue("nodeGroup",dT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),By(I).nodeWidth=v,By(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",AR,u,Hoe);z&&H(I,z,T&&c.upperLabelHeight);var O=h.getModel("emphasis"),F=O.get("focus"),G=O.get("blurScope"),j=O.get("disabled"),U=F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():F;if(T)Zv(I)&&wl(I,!1),z&&(wl(z,!j),f.setItemGraphicEl(o.dataIndex,z),_b(z,U,G));else{var V=ue("content",AR,u,Woe);V&&Y(I,V),z.disableMorphing=!0,z&&Zv(z)&&wl(z,!1),wl(I,!j),f.setItemGraphicEl(o.dataIndex,I);var W=h.getShallow("cursor");W&&V.attr("cursor",W),_b(I,U,G)}return I;function H(xe,ge,De){var he=Ae(ge);if(he.dataIndex=o.dataIndex,he.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:v,height:p,r:k}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),st=Me.stroke,Ye=IR(C);Ye.fill=st;var rt=ul(A);rt.fill=A.get("borderColor");var ut=ul(D);ut.fill=D.get("borderColor");var kt=ul(E);if(kt.fill=E.get("borderColor"),De){var pr=v-2*g;ne(ge,st,Me.opacity,{x:g,y:0,width:pr,height:b})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=rt,ge.ensureState("blur").style=ut,ge.ensureState("select").style=kt,Zl(ge)}xe.add(ge)}function Y(xe,ge){var De=Ae(ge);De.dataIndex=o.dataIndex,De.seriesIndex=t.seriesIndex;var he=Math.max(v-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:he,height:Me,r:k}),m)K(ge);else{ge.invisible=!1;var st=o.getVisual("style"),Ye=st.fill,rt=IR(C);rt.fill=Ye,rt.decal=st.decal;var ut=ul(A),kt=ul(D),pr=ul(E);ne(ge,Ye,st.opacity,null),ge.setStyle(rt),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=kt,ge.ensureState("select").style=pr,Zl(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,De,he){var Me=h.getModel(he?kR:DR),st=rr(h.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(h,he?kR:DR),{defaultText:Ye?st:null,inheritColor:ge,defaultOpacity:De,labelFetcher:t,labelDataIndex:o.dataIndex});var rt=xe.getTextContent();if(rt){var ut=rt.style,kt=bd(ut.padding||0);he&&(xe.setTextConfig({layoutRect:he}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var zr=Math.max((he?he.width:xe.shape.width)-kt[1]-kt[3],0),zi=Math.max((he?he.height:xe.shape.height)-kt[0]-kt[2],0);(ut.width!==zr||ut.height!==zi)&&rt.setStyle({width:zr,height:zi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,he,c);var pr=rt.getState("emphasis");ie(pr?pr.style:null,he,c)}}function ie(xe,ge,De){var he=xe?xe.text:null;if(!ge&&De.isLeafRoot&&he!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+he:he}}function ue(xe,ge,De,he){var Me=_!=null&&r[xe][_],st=i[xe];return Me?(r[xe][_]=null,de(st,Me)):m||(Me=new ge,Me instanceof si&&(Me.z2=$oe(De,he)),je(st,Me)),e[xe][y]=Me}function de(xe,ge){var De=xe[y]={};ge instanceof dT?(De.oldX=ge.x,De.oldY=ge.y):De.oldShape=J({},ge.shape)}function je(xe,ge){var De=xe[y]={},he=o.parentNode,Me=ge instanceof _e;if(he&&(!n||n.direction==="drillDown")){var st=0,Ye=0,rt=i.background[he.getRawIndex()];!n&&rt&&rt.oldShape&&(st=rt.oldShape.width,Ye=rt.oldShape.height),Me?(De.oldX=0,De.oldY=Ye):De.oldShape={x:st,y:Ye,width:0,height:0}}De.fadein=!Me}}function $oe(t,e){return t*Goe+e}var ld=N,Yoe=we,Vy=-1,hr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=Koe[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(j1(i),Xoe(i)):r==="category"?i.categories?qoe(i):j1(i,!0):(Rr(r!=="linear"||i.dataExtent),j1(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return Ze(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){we(e)?N(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:we(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&ld(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(Yoe(e)){var r=[];ld(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function j1(t,e){var r=t.visual,n=[];we(r)?ld(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),n6(t,n)}function xg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:pT([0,1])}}function ER(t){var e=this.option.visual;return e[Math.round(it(t,[0,1],[0,e.length-1],!0))]||{}}function Sh(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Hh(t){var e=this.option.visual;return e[this.option.loop&&t!==Vy?t%e.length:t]}function cl(){return this.option.visual[0]}function pT(t){return{linear:function(e){return it(e,t,this.option.visual,!0)},category:Hh,piecewise:function(e,r){var n=gT.call(this,r);return n==null&&(n=it(e,t,this.option.visual,!0)),n},fixed:cl}}function gT(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=hr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function n6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Ur(r);return n||[0,0,0,1]})),e}var Koe={linear:function(t){return it(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=hr.findPieceIndex(t,e,!0);if(r!=null)return it(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Vy},fixed:Nt};function Sg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=nse(i,l,g,m,p,n);a6(g,y,r,n)}})}}}function ese(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return N(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function RR(t){var e=G1(t,"color");if(e){var r=G1(t,"colorAlpha"),n=G1(t,"colorSaturation");return n&&(e=Xa(e,null,null,n)),r&&(e=jv(e,r)),e}}function tse(t,e){return e!=null?Xa(e,null,null,t):null}function G1(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function rse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=H1(e,"color")||i.color!=null&&i.color!=="none"&&(H1(e,"colorAlpha")||H1(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new hr(f);return i6(h).drColorMappingBy=c,h}}}function H1(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function nse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&i6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var ud=Math.max,Fy=Math.min,NR=Sr,UM=N,o6=["itemStyle","borderWidth"],ise=["itemStyle","gapWidth"],ase=["upperLabel","show"],ose=["upperLabel","height"];const sse={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=or(t,r).refContainer,o=wt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(NR(o.width,s[0]),a.width),u=oe(NR(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=sd(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=e6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?vse(t,h,p,l,u):v?[v.width,v.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),s6(p,_,!1,0),S=p.getLayout(),UM(g,function(T,C){var A=(g[C+1]||p).getValue();T.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var b=t.getData().tree.root;b.setLayout(dse(o,v,h),!0),t.setLayoutInfo(o),l6(b,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function s6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(o6),u=s.get(ise)/2,c=u6(s),f=Math.max(l,c),h=l-u,v=f-u;t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=ud(i-2*h,0),a=ud(a-h-v,0);var p=i*a,g=lse(t,s,p,e,r,n);if(g.length){var m={x:h,y:v,width:i,height:a},y=Fy(i,a),_=1/0,S=[];S.area=0;for(var b=0,T=g.length;b=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function hse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?ud(u*n/l,l/(u*i)):1/0}function OR(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=t.length;flb&&(u=lb),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(T[0]=-T[0],T[1]=-T[1]);var A=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*_+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+E,p=b[0]<0?"right":"left",a.originX=-y*A,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=C[0],a.y=C[1]+E,p="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+f[0],a.y=f[1]+E,p=b[0]>=0?"right":"left",a.originX=y*A,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),qM=function(){function t(e){this.group=new _e,this._LineCtor=e||XM}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=GR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=GR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!kse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function GR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function HR(t){return isNaN(t[0])||isNaN(t[1])}function Y1(t){return t&&!HR(t[0])&&!HR(t[1])}var X1=[],q1=[],K1=[],ju=xr,Q1=rs,WR=Math.abs;function UR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){X1[0]=ju(n[0],i[0],a[0],c),X1[1]=ju(n[1],i[1],a[1],c);var f=WR(Q1(X1,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function J1(t,e){var r=[],n=Vv,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ha(u[0]),ha(u[1])],u[2]&&u.__original.push(ha(u[2])));var h=u.__original;if(u[2]!=null){if(jr(i[0],h[0]),jr(i[1],h[2]),jr(i[2],h[1]),c&&c!=="none"){var v=Uh(s.node1),p=UR(i,h[0],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=Uh(s.node2),p=UR(i,h[1],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}jr(u[0],i[0]),jr(u[1],i[2]),jr(u[2],i[1])}else{if(jr(a[0],h[0]),jr(a[1],h[1]),Fo(o,a[1],a[0]),nu(o,o),c&&c!=="none"){var v=Uh(s.node1);Ym(a[0],a[0],o,v*e)}if(f&&f!=="none"){var v=Uh(s.node2);Ym(a[1],a[1],o,-v*e)}jr(u[0],a[0]),jr(u[1],a[1])}})}var g6=Fe();function Ise(t){if(t)return g6(t).bridge}function ZR(t,e){t&&(g6(t).bridge=e)}function $R(t){return t.type==="view"}var Ese=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Bd,a=new qM,o=this.group,s=new _e;this._controller=new cu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if($R(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Qe(this._mainGroup,f,r)}J1(r.getGraph(),Wh(r));var h=r.getData();u.updateData(h);var v=r.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");h.graph.eachNode(function(b){var T=b.dataIndex,C=b.getGraphicEl(),A=b.getModel();if(C){C.off("drag").off("dragend");var D=A.get("draggable");D&&C.on("drag",function(k){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(T),h.setItemLayout(T,[C.x,C.y]);break;case"circular":h.setItemLayout(T,[C.x,C.y]),b.setLayout({fixed:!0},!0),YM(r,"symbolSize",b,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(T,[C.x,C.y]),$M(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(T)}),C.setDraggable(D,!!A.get("cursor"));var E=A.get(["emphasis","focus"]);E==="adjacency"&&(Ae(C).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var T=b.getGraphicEl(),C=b.getModel().get(["emphasis","focus"]);T&&C==="adjacency"&&(Ae(T).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){v6(b,y,_,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!$R(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(BM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(VM(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),J1(r.getGraph(),Wh(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Wh(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(J1(r.getGraph(),Wh(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=Ise(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,f=new _e;s.add(f),s.add(c);for(var h=0;h=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof fl||(r=this._nodesMap[Gu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(v.node1))}for(l=0;l=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),m6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=ve(),r=ve();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function y6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(fl,y6("hostGraph","data"));Bt(m6,y6("hostGraph","edgeData"));function KM(t,e,r,n,i){for(var a=new Rse(n),o=0;o "+h)),u++)}var v=r.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar"||v==="matrix")p=Ta(t,r);else{var g=xf.get(v),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Tf(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Zr(y,r),p.initData(t)}var _=new Zr(["value"],r);return _.initData(l,s),i&&i(p,_),QG({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Nse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Pf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Hl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){Sse(this);var s=KM(a,i,this,!0,l);return N(s.edges,function(u){wse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var f=He.prototype.getModel;function h(p,g){var m=f.call(this,p,g);return m.resolveParentPath=v,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=SF({series:this,dataIndex:r,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new Zr(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:X.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function Ose(t){t.registerChartView(Ese),t.registerSeriesModel(Nse),t.registerProcessor(gse),t.registerVisual(mse),t.registerVisual(yse),t.registerLayout(bse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Cse),t.registerLayout(Lse),t.registerCoordinateSystem("graphView",{dimensions:fu.dimensions,create:Pse}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Nt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Nt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=e_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var YR=function(t){$(e,t);function e(r,n,i){var a=t.call(this)||this;Ae(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=J(ua(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}a?v.setShape(h):Qe(v,{shape:h},l,n);var p=J(ua(u.getModel("itemStyle"),f,!0),f);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,v),ir(v,u,"itemStyle");var g=c.get("focus");bt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=ar(n),h=i.getVisual("style");vr(a,f,{labelFetcher:{getFormattedLabel:function(_,S,b,T,C,A){return r.getFormattedLabel(_,S,"node",T,mn(C,f.normal&&f.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",p=c.get("distance")||0,g;v==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var m=v!=="outside"?c.get("align")||"center":l>0?"left":"right",y=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Nr),zse=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Ae(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),v=f.getModel("emphasis"),p=v.get("focus"),g=J(ua(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),XR(m,l,r,h)):(li(m),XR(m,l,r,h),Qe(m,{shape:g},s,i)),bt(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled")),ir(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(We);function XR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new iu(f,h,v,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Bse=Math.PI/180,Vse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*Bse;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new YR(a,c,l);Ae(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),v=a.getItemLayout(c);if(!v){h&&qa(h,r,f);return}h?h.updateData(a,c,l):h=new YR(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&qa(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),St(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new zse(i,a,l,n);Ae(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&qa(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),Fse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=KM(a,i,this,!0,s);return o.data}function s(l,u){var c=He.prototype.getModel;function f(v,p){var g=c.call(this,v,p);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=f,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),eS=Math.PI/180;function jse(t,e){t.eachSeriesByType("chord",function(r){Gse(r,e)})}function Gse(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=FV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((t.get("padAngle")||0)*eS,0),h=Math.max((t.get("minAngle")||0)*eS,0),v=-t.get("startAngle")*eS,p=v+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[v,p];O0(y,!g);var _=y[0],S=y[1],b=S-_,T=r.getSum("value")===0&&i.getSum("value")===0,C=[],A=0;n.eachEdge(function(V){var W=T?1:V.getValue("value");T&&(W>0||h)&&(A+=2);var H=V.node1.dataIndex,Y=V.node2.dataIndex;C[H]=(C[H]||0)+W,C[Y]=(C[Y]||0)+W});var D=0;if(n.eachNode(function(V){var W=V.getValue("value");isNaN(W)||(C[V.dataIndex]=Math.max(W,C[V.dataIndex]||0)),!T&&(C[V.dataIndex]>0||h)&&A++,D+=C[V.dataIndex]||0}),!(A===0||D===0)){f*A>=Math.abs(b)&&(f=Math.max(0,(Math.abs(b)-h*A)/A)),(f+h)*A>=Math.abs(b)&&(h=(Math.abs(b)-f*A)/A);var E=(b-f*A*m)/D,k=0,I=0,z=0;n.eachNode(function(V){var W=C[V.dataIndex]||0,H=E*(D?W:1)*m;Math.abs(H)I){var F=k/I;n.eachNode(function(V){var W=V.getLayout().angle;Math.abs(W)>=h?V.setLayout({angle:W*F,ratio:F},!0):V.setLayout({angle:h,ratio:h===0?1:W/h},!0)})}else n.eachNode(function(V){if(!O){var W=V.getLayout().angle,H=Math.min(W/z,1),Y=H*k;W-Yh&&h>0){var H=O?1:Math.min(W/z,1),Y=W-h,K=Math.min(Y,Math.min(G,k*H));G-=K,V.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else h>0&&V.setLayout({angle:h,ratio:W===0?1:h/W},!0)}});var j=_,U=[];n.eachNode(function(V){var W=Math.max(V.getLayout().angle,h);V.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:j,endAngle:j+W*m,clockwise:g},!0),U[V.dataIndex]=j,j+=(W+f)*m}),n.eachEdge(function(V){var W=T?1:V.getValue("value"),H=E*(D?W:1)*m,Y=V.node1.dataIndex,K=U[Y]||0,ne=Math.abs((V.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],de=[s+c*Math.cos(ie),l+c*Math.sin(ie)],je=V.node2.dataIndex,xe=U[je]||0,ge=Math.abs((V.node2.getLayout().ratio||1)*H),De=xe+ge*m,he=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(De),l+c*Math.sin(De)];V.setLayout({s1:ue,s2:de,sStartAngle:K,sEndAngle:ie,t1:he,t2:Me,tStartAngle:xe,tEndAngle:De,cx:s,cy:l,r:c,value:W,clockwise:g}),U[Y]=ie,U[je]=De})}}}function Hse(t){t.registerChartView(Vse),t.registerSeriesModel(Fse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,jse),t.registerProcessor(Lf("chord"))}var Wse=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),Use=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new Wse},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(We);function Zse(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function bg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var $se=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Zse(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),v=h?Ey:Nr,p=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];O0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,b=[],T=0;p&&T=E&&(k===0?0:a[k-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-D-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?f.add(new Xe({style:pt(S,{text:W,x:Y,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:F<-.4?"left":F>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Xe({style:pt(S,{text:W,x:Y,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:Y,originY:K,rotation:ie}))}if(_.get("show")&&j!==b){var U=_.get("distance");U=U?U+c:c;for(var ue=0;ue<=T;ue++){F=Math.cos(D),G=Math.sin(D);var de=new Wt({shape:{x1:F*(p-U)+h,y1:G*(p-U)+v,x2:F*(p-A-U)+h,y2:G*(p-A-U)+v},silent:!0,style:z});z.stroke==="auto"&&de.setStyle({stroke:a((j+ue/T)/b)}),f.add(de),D+=k}D-=k}else D+=E}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),S=_.mapDimension("value"),b=+r.get("min"),T=+r.get("max"),C=[b,T],A=[s,l];function D(k,I){var z=_.getItemModel(k),O=z.getModel("pointer"),F=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),j=r.get(["pointer","icon"]),U=O.get("offsetCenter"),V=oe(U[0],o.r),W=oe(U[1],o.r),H=O.get("keepAspect"),Y;return j?Y=Ut(j,V-F/2,W-G,F,G,null,H):Y=new Use({shape:{angle:-Math.PI/2,width:F,r:G,x:V,y:W}}),Y.rotation=-(I+Math.PI/2),Y.x=o.cx,Y.y=o.cy,Y}function E(k,I){var z=m.get("roundCap"),O=z?Ey:Nr,F=m.get("overlap"),G=F?m.get("width"):c/_.count(),j=F?o.r-G:o.r-(k+1)*G,U=F?o.r:o.r-k*G,V=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:j,r:U}});return F&&(V.z2=it(_.get(S,k),[b,T],[100,0],!0)),V}(y||g)&&(_.diff(h).add(function(k){var I=_.get(S,k);if(g){var z=D(k,s);St(z,{rotation:-((isNaN(+I)?A[0]:it(I,C,A,!0))+Math.PI/2)},r),f.add(z),_.setItemGraphicEl(k,z)}if(y){var O=E(k,s),F=m.get("clip");St(O,{shape:{endAngle:it(I,C,A,F)}},r),f.add(O),pb(r.seriesIndex,_.dataType,k,O),p[k]=O}}).update(function(k,I){var z=_.get(S,k);if(g){var O=h.getItemGraphicEl(I),F=O?O.rotation:s,G=D(k,F);G.rotation=F,Qe(G,{rotation:-((isNaN(+z)?A[0]:it(z,C,A,!0))+Math.PI/2)},r),f.add(G),_.setItemGraphicEl(k,G)}if(y){var j=v[I],U=j?j.shape.endAngle:s,V=E(k,U),W=m.get("clip");Qe(V,{shape:{endAngle:it(z,C,A,W)}},r),f.add(V),pb(r.seriesIndex,_.dataType,k,V),p[k]=V}}).execute(),_.each(function(k){var I=_.getItemModel(k),z=I.getModel("emphasis"),O=z.get("focus"),F=z.get("blurScope"),G=z.get("disabled");if(g){var j=_.getItemGraphicEl(k),U=_.getItemVisual(k,"style"),V=U.fill;if(j instanceof dr){var W=j.style;j.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},U))}else j.useStyle(U),j.type!=="pointer"&&j.setColor(V);j.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),j.style.fill==="auto"&&j.setStyle("fill",a(it(_.get(S,k),C,[0,1],!0))),j.z2EmphasisLift=0,ir(j,I),bt(j,O,F,G)}if(y){var H=p[k];H.useStyle(_.getItemVisual(k,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),bt(H,O,F,G)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new _e,v=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){v[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),S=l.get(u,y),b=new _e,T=a(it(S,[c,f],[0,1],!0)),C=_.getModel("title");if(C.get("show")){var A=C.get("offsetCenter"),D=o.cx+oe(A[0],o.r),E=o.cy+oe(A[1],o.r),k=v[y];k.attr({z2:m?0:2,style:pt(C,{x:D,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:T})}),b.add(k)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),F=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),j=oe(I.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:T,k=p[y],V=I.get("formatter");k.attr({z2:m?0:2,style:pt(I,{x:O,y:F,text:bg(S,V),width:isNaN(G)?null:G,height:isNaN(j)?null:j,align:"center",verticalAlign:"middle"},{inheritColor:U})}),wV(k,{normal:I},S,function(H){return bg(H,V)}),g&&bV(k,y,l,r,{getFormattedLabel:function(H,Y,K,ne,ie,ue){return bg(ue?ue.interpolatedValue:S,V)}}),b.add(k)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(lt),Yse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Af(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,X.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:X.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:X.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:X.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:X.color.neutral00,borderWidth:0,borderColor:X.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:X.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:X.color.transparent,borderWidth:0,borderColor:X.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:X.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function Xse(t){t.registerChartView($se),t.registerSeriesModel(Yse)}var qse=["itemStyle","opacity"],Kse=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new br,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(qse);c=c??1,i||li(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,St(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),p=v.get("color"),g=p==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),TM(i,CM(l),{stroke:h})},e}(Or),Qse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Kse(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);qa(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(lt),Jse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Af(this,{coordDimensions:["value"],encodeDefaulter:Ie(Q2,this)})},e.prototype._defaultLabelLine=function(r){Hl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:X.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function ele(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();ogle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!rS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function rS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var _le=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Re(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){N(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=tt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);N(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ve),xle=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(fi);function gs(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Hu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Hu(s,[0,o]),i=a=Hu(s,[i,a]),n=0}e[0]=Hu(e[0],r),e[1]=Hu(e[1],r);var l=nS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Hu(e[n],c);var f;return f=nS(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function nS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Hu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var iS=N,x6=Math.min,S6=Math.max,QR=Math.floor,Sle=Math.ceil,JR=Ht,wle=Math.PI,ble=function(){function t(e,r,n){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;iS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new xle(o,Od(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();iS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),ql(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=or(e,r).refContainer;this._rect=wt(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Tg(e.get("axisExpandWidth"),l),f=Tg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=Tg(v[1]-v[0],l),v[1]=v[0]+p;else{p=Tg(c*(f-1),l);var g=e.get("axisExpandCenter")||QR(u/2);v=[c*g-p/2],v[1]=v[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var y=[QR(JR(v[0]/c,1))+1,Sle(JR(v[1]/c,1))-1],_=m/c*v[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),iS(n,function(o,s){var l=(i.axisExpandable?Cle:Tle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:wle/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],v=fr();po(v,v,h),Ii(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];N(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?gs(l,i,o,"all"):u="none";else{var v=i[1]-i[0],p=o[1]*s/v;i=[S6(0,p-v/2)],i[1]=x6(o[1],i[0]+v),i[0]=i[1]-v}return{axisExpandWindow:i,behavior:u}},t}();function Tg(t,e){return x6(S6(t,e[0]),e[1])}function Tle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Cle(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)Ln(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aDle}function L6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function A6(t,e,r,n){var i=new _e;return i.add(new ze({name:"main",style:rL(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(rN,t,e,i,["n","s","w","e"]),ondragend:Ie(Ql,e,{isEnd:!0})})),N(n,function(a){i.add(new ze({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(rN,t,e,i,a),ondragend:Ie(Ql,e,{isEnd:!0})}))}),i}function P6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=tf(i,kle),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,v=f-a+i/2,p=c-o,g=f-s,m=p+i,y=g+i;Ea(t,e,"main",o,s,p,g),n.transformable&&(Ea(t,e,"w",l,u,a,y),Ea(t,e,"e",h,u,a,y),Ea(t,e,"n",l,u,m,a),Ea(t,e,"s",l,v,m,a),Ea(t,e,"nw",l,u,a,a),Ea(t,e,"ne",h,u,a,a),Ea(t,e,"sw",l,v,a,a),Ea(t,e,"se",h,v,a,a))}function wT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(rL(r)),i.attr({silent:!n,cursor:n?"move":"default"}),N([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?bT(t,a[0]):zle(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Ele[s]+"-resize":null})})}function Ea(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(Vle(nL(t,e,[[n,i],[n+a,i+o]])))}function rL(t){return Se({strokeNoScale:!0},t.brushStyle)}function D6(t,e,r,n){var i=[fd(t,r),fd(e,n)],a=[tf(t,r),tf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Ole(t){return os(t.group)}function bT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=F0(r[e],Ole(t));return n[i]}function zle(t,e){var r=[bT(t,e[0]),bT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function rN(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=k6(e,i,a);N(n,function(u){var c=Ile[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(D6(s[0][0],s[1][0],s[0][1],s[1][1])),JM(e,r),Ql(e,{isEnd:!1})}function Ble(t,e,r,n){var i=e.__brushOption.range,a=k6(t,r,n);N(i,function(o){o[0]+=a[0],o[1]+=a[1]}),JM(t,e),Ql(t,{isEnd:!1})}function k6(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function nL(t,e,r){var n=M6(t,e);return n&&n!==Kl?n.clipPath(r,t._transform):ye(r)}function Vle(t){var e=fd(t[0][0],t[1][0]),r=fd(t[0][1],t[1][1]),n=tf(t[0][0],t[1][0]),i=tf(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function Fle(t,e,r){if(!(!t._brushType||Gle(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=tL(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var i_={lineX:aN(0),lineY:aN(1),rect:{createCover:function(t,e){function r(n){return n}return A6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=L6(t);return D6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){P6(t,e,r,n)},updateCommon:wT,contain:CT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new br({name:"main",style:rL(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Or({name:"main",draggable:!0,drift:Ie(Ble,t,e),ondragend:Ie(Ql,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:nL(t,e,r)})},updateCommon:wT,contain:CT}};function aN(t){return{createCover:function(e,r){return A6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=L6(e),n=fd(r[0][t],r[1][t]),i=tf(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=M6(e,r);if(o!==Kl&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),P6(e,r,l,i)},updateCommon:wT,contain:CT}}function E6(t){return t=iL(t),function(e){return E2(e,t)}}function R6(t,e){return t=iL(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function N6(t,e,r){var n=iL(t);return function(i,a){return n.contain(a[0],a[1])&&!FG(i,e,r)}}function iL(t){return Ce.create(t)}var Hle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!Wle(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=Zle(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),v=J({strokeContainThreshold:c},h),p=new tn(r,i,v);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(v,u,r,s,c,i),Id(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:E6(f),isTargetByCursor:N6(f,s,a),getLinearBrushOtherExtent:R6(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Ule(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(mt);function Wle(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function Ule(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function Zle(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var $le={type:"axisAreaSelect",event:"axisAreaSelected"};function Yle(t){t.registerAction($le,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Xle={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function O6(t){t.registerComponentView(mle),t.registerComponentModel(_le),t.registerCoordinateSystem("parallel",Lle),t.registerPreprocessor(vle),t.registerComponentModel(xT),t.registerComponentView(Hle),Jc(t,"parallel",xT,Xle),Yle(t)}function qle(t){Oe(O6),t.registerChartView(ale),t.registerSeriesModel(lle),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,hle)}var Kle=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),Qle=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Kle},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){so(this)},e.prototype.downplay=function(){lo(this)},e}(We),Jle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new cu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),jG(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new Qle,m=Ae(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),b=p.node1.getLayout(),T=p.node1.getModel(),C=T.get("localX"),A=T.get("localY"),D=p.node2.getLayout(),E=p.node2.getModel(),k=E.get("localX"),I=E.get("localY"),z=p.getLayout(),O,F,G,j,U,V,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=v,v==="vertical"?(O=(C!=null?C*u:b.x)+z.sy,F=(A!=null?A*c:b.y)+b.dy,G=(k!=null?k*u:D.x)+z.ty,j=I!=null?I*c:D.y,U=O,V=F*(1-S)+j*S,W=G,H=F*S+j*(1-S)):(O=(C!=null?C*u:b.x)+b.dx,F=(A!=null?A*c:b.y)+z.sy,G=k!=null?k*u:D.x,j=(I!=null?I*c:D.y)+z.ty,U=O*(1-S)+G*S,V=F,W=O*S+G*(1-S),H=j),g.setShape({x1:O,y1:F,x2:G,y2:j,cpx1:U,cpy1:V,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),oN(g.style,v,p);var Y=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,de,je,xe,ge,De){return r.getFormattedLabel(ue,de,"edge",xe,mn(ge,K.normal&&K.normal.get("formatter"),Y),De)}},labelDataIndex:p.dataIndex,defaultText:Y}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var de=ue.getItemStyle();return oN(de,v,p),de}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");bt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),S=m.getModel("emphasis"),b=m.get(["itemStyle","borderRadius"])||0,T=new ze({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:b},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(T,ar(m),{labelFetcher:{getFormattedLabel:function(A,D){return r.getFormattedLabel(A,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),T.disableLabelAnimation=!0,T.setStyle("fill",p.getVisual("color")),T.setStyle("decal",p.getVisual("style").decal),ir(T,m),s.add(T),f.setItemGraphicEl(p.dataIndex,T),Ae(T).dataType="node";var C=S.get("focus");bt(T,C==="adjacency"?p.getAdjacentDataIndices():C==="trajectory"?p.getTrajectoryDataIndices():C,S.get("blurScope"),S.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var m=f.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(eue(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new fu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(lt);function oN(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new iu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function eue(t,e,r){var n=new ze({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{width:t.width+20}},e,r),n}var tue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new He(o[l],this,n));var u=KM(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(v.parentModel=_)}return v}),h.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,S=g.levelModels[_];S&&(v.parentModel=S)}return v})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(v){return isNaN(v)||v==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:X.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:X.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function rue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=or(r,e).refContainer,o=wt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;iue(c);var h=tt(c,function(m){return m.getLayout().value===0}),v=h.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");nue(c,f,n,i,s,l,v,p,g)})}function nue(t,e,r,n,i,a,o,s,l){aue(t,e,r,i,a,s,l),uue(t,e,a,i,n,o,s),yue(t,s)}function iue(t){N(t,function(e){var r=us(e.outEdges,jy),n=us(e.inEdges,jy),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function aue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>v&&(v=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_f-1?v:f-1;o&&o!=="left"&&oue(t,o,a,A);var D=a==="vertical"?(i-r)/A:(n-r)/A;lue(t,D,a)}function z6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function oue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,hue(s,l,o),aS(s,i,r,n,o),mue(s,l,o),aS(s,i,r,n,o)}function cue(t,e){var r=[],n=e==="vertical"?"y":"x",i=cb(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),N(i.keys,function(a){r.push(i.buckets.get(a))}),r}function fue(t,e,r,n,i,a){var o=1/0;N(t,function(s){var l=s.length,u=0;N(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function hue(t,e,r){N(t.slice().reverse(),function(n){N(n,function(i){if(i.outEdges.length){var a=us(i.outEdges,vue,r)/us(i.outEdges,jy);if(isNaN(a)){var o=i.outEdges.length;a=o?us(i.outEdges,due,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-ms(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-ms(i,r))*e;i.setLayout({y:l},!0)}}})})}function vue(t,e){return ms(t.node2,e)*t.getValue()}function due(t,e){return ms(t.node2,e)}function pue(t,e){return ms(t.node1,e)*t.getValue()}function gue(t,e){return ms(t.node1,e)}function ms(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function jy(t){return t.getValue()}function us(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),N(n,function(s){var l=new hr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&N(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function xue(t){t.registerChartView(Jle),t.registerSeriesModel(tue),t.registerLayout(rue),t.registerVisual(_ue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=e_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var B6=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[i,a],p=v[c].get("type"),g=v[1-c].get("type"),m=e.data;if(m&&l){var y=[];N(m,function(b,T){var C;ee(b)?(C=b.slice(),b.unshift(T)):ee(b.value)?(C=J({},b),C.value=C.value.slice(),b.value.unshift(T)):C=b,y.push(C)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:f,type:Ty(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ty(g),dimsDef:_.slice()}];return Af(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(YV,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),V6=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:X.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:X.color.shadow}},animationDuration:800},e}(ht);Bt(V6,B6,!0);var Sue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=sN(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(li(f),F6(h,f,a,u)):f=sN(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(lt),wue=function(){function t(){}return t}(),bue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new wue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var b=[y,S];n.push(b)}}}return{boxData:r,outliers:n}}var Due={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Tr){var n="";at(n)}var i=Pue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function kue(t){t.registerSeriesModel(V6),t.registerChartView(Sue),t.registerLayout(Cue),t.registerTransform(Due)}var Iue=["itemStyle","borderColor"],Eue=["itemStyle","borderColor0"],Rue=["itemStyle","borderColorDoji"],Nue=["itemStyle","color"],Oue=["itemStyle","color0"];function aL(t,e){return e.get(t>0?Nue:Oue)}function oL(t,e){return e.get(t===0?Rue:t>0?Iue:Eue)}var zue={seriesType:"candlestick",plan:Sf(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=aL(s,o),l.stroke=oL(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},Bue=["color","borderColor"],Vue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){Ts(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&lN(u,f))return;var h=oS(f,c,!0);St(h,{shape:{points:f.ends}},r,c),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var v=n.getItemLayout(c);if(s&&lN(u,v)){a.remove(h);return}h?(Qe(h,{shape:{points:v.ends}},r,c),li(h)):h=oS(v),sS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),uN(r,this.group);var n=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=oS(s);sS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){uN(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(lt),Fue=function(){function t(){}return t}(),jue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Fue},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(We);function oS(t,e,r){var n=t.ends;return new jue({shape:{points:r?Gue(n,t):n},z2:100})}function lN(t,e){for(var r=!0,n=0;nT?I[a]:k[a],ends:F,brushRect:W(C,A,S)})}function U(Y,K){var ne=[];return ne[i]=K,ne[a]=Y,isNaN(K)||isNaN(Y)?[NaN,NaN]:e.dataToPoint(ne)}function V(Y,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=lm(ie[i]+n/2,1,!1),ue[i]=lm(ue[i]-n/2,1,!0),ne?Y.push(ie,ue):Y.push(ue,ie)}function W(Y,K,ne){var ie=U(Y,ne),ue=U(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(Y){return Y[i]=lm(Y[i],1),Y}}function p(g,m){for(var y=sa(g.count*4),_=0,S,b=[],T=[],C,A=m.getStore(),D=!!t.get(["itemStyle","borderColorDoji"]);(C=g.next())!=null;){var E=A.get(s,C),k=A.get(u,C),I=A.get(c,C),z=A.get(f,C),O=A.get(h,C);if(isNaN(E)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=cN(A,C,k,I,c,D),b[i]=E,b[a]=z,S=e.dataToPoint(b,null,T),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,b[a]=O,S=e.dataToPoint(b,null,T),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function cN(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function Zue(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function $ue(t){t.registerChartView(Vue),t.registerSeriesModel(j6),t.registerPreprocessor(Wue),t.registerVisual(zue),t.registerLayout(Uue)}function fN(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var Yue=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=new zd(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;me(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return ja(r.__p1,r.__cp1)+ja(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=xr,c=Yw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var v=r.__t<1?h[0]-f[0]:f[0]-h[0],p=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(G6),Jue=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),ece=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:X.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Jue},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var v=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;r.quadraticCurveTo(v,p,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],v=1;v0){var m=(f+p)/2-(h-g)*o,y=(h+g)/2-(p-f)*o;if(H4(f,h,m,y,p,g,s,r,n))return l}else if(Eo(f,h,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),W6={seriesType:"lines",plan:Sf(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&Vd(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=W6.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new tce:new qM(o?a?Que:H6:a?G6:XM),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(lt),nce=typeof Uint32Array>"u"?Array:Uint32Array,ice=typeof Float64Array>"u"?Array:Float64Array;function hN(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),T0([i,r[0],r[1]])}))}var ace=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],hN(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(hN(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=jc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=jc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function Cg(t){return t instanceof Array||(t=[t,t]),t}var oce={seriesType:"lines",reset:function(t){var e=Cg(t.get("symbol")),r=Cg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Cg(s.getShallow("symbol",!0)),u=Cg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function sce(t){t.registerChartView(rce),t.registerSeriesModel(ace),t.registerLayout(W6),t.registerVisual(oce)}var lce=256,uce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=yn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=r,f.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*k+D),T[C++]=z[I],T[C++]=z[I+1],T[C++]=z[I+2],T[C++]=z[I+3]*S*256}else C+=4}return h.putImageData(b,0,0),f},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=yn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=X.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function cce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function vN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var hce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):vN(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(vN(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ts(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=ps(s,"cartesian2d"),u=ps(s,"matrix"),c,f,h,v;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,f=g.getBandWidth()+.5,h=p.scale.getExtent(),v=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),b=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),C=ar(r),A=r.getModel("emphasis"),D=A.get("focus"),E=A.get("blurScope"),k=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zh[1]||jv[1])continue;var U=s.dataToPoint([G,j]);O=new ze({shape:{x:U[0]-c/2,y:U[1]-f/2,width:c,height:f},style:F})}else if(u){var V=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(kr(V.x))continue;O=new ze({z2:1,shape:V,style:F})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),V=W.contentRect||W.rect;if(kr(V.x)||kr(V.y))continue;O=new ze({z2:1,shape:V,style:F})}if(y.hasItemOption){var H=y.getItemModel(z),Y=H.getModel("emphasis");_=Y.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),b=H.getModel(["select","itemStyle"]).getItemStyle(),T=H.get(["itemStyle","borderRadius"]),D=Y.get("focus"),E=Y.get("blurScope"),k=Y.get("disabled"),C=ar(H)}O.shape.r=T;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,C,{labelFetcher:r,labelDataIndex:z,defaultOpacity:F.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=S,O.ensureState("select").style=b,bt(O,D,E,k),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new uce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-h,y=g-v,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(A,D,E){var k=r.dataToPoint([A,D]);return k[0]-=h,k[1]-=v,k.push(E),k}),b=i.getExtent(),T=i.type==="visualMap.continuous"?fce(b,i.option.range):cce(b,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},T);var C=new dr({style:{width:m,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(C)},e.type="heatmap",e}(lt),vce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=xf.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:X.color.primary}}},e}(ht);function dce(t){t.registerChartView(hce),t.registerSeriesModel(vce)}var pce=["itemStyle","borderWidth"],dN=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],cS=new ba,gce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:dN[+c],categoryDim:dN[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=gN(o,p),m=pN(o,p,g,h),y=mN(o,h,m);o.setItemGraphicEl(p,y),a.add(y),_N(y,h,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=gN(o,p),_=pN(o,p,y,h),S=q6(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?bce(m,h,_):m=mN(o,h,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),_N(m,h,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&yN(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var v=r.get("clip",!0)?Vd(r.coordinateSystem,!1,r):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){yN(a,Ae(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function pN(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};mce(r,a,i,n,h),yce(t,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),_ce(r,h.symbolScale,u,n,h);var v=h.symbolSize,p=lu(r.get("symbolOffset"),v);return xce(r,v,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function mce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var f=[fS(s,o[0])-l,fS(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function fS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function yce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize"),p;ee(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[f.index]=oe(p[f.index],h),p[c.index]=oe(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function _ce(t,e,r,n,i){var a=t.get(pce)||0;a&&(cS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),cS.updateTransform(),a/=cS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function xce(t,e,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,p=f.pxSign,g=Math.max(e[v.index]+s,0),m=g;if(n){var y=Math.abs(l),_=Sr(t.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var b=oe(_,e[v.index]),T=Math.max(g+b*2,0),C=S?0:b*2,A=g2(n),D=A?n:xN((y+C)/T),E=y-D*g;b=E/2/(S?D:Math.max(D-1,1)),T=g+b*2,C=S?0:b*2,!A&&n!=="fixed"&&(D=u?xN((Math.abs(u)+C)/T):0),m=D*T-C,f.repeatTimes=D,f.symbolMargin=b}var k=p*(m/2),I=f.pathPosition=[];I[h.index]=r[h.wh]/2,I[v.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=f.bundlePosition=[];z[h.index]=r[h.xy],z[v.index]=r[v.xy];var O=f.barRectShape=J({},r);O[v.wh]=p*Math.max(Math.abs(r[v.wh]),Math.abs(I[v.index]+k)),O[h.wh]=r[h.wh];var F=f.clipShape={};F[h.xy]=-r[h.xy],F[h.wh]=c.ecSize[h.wh],F[v.xy]=0,F[v.wh]=r[v.wh]}function U6(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Z6(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+r.symbolMargin*2;for(sL(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function $6(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Ic(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=U6(r),i.add(a),Ic(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function Y6(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?Ic(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new ze({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function X6(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new ze({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],au[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function gN(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Sce,r.isAnimationEnabled=wce,r}function Sce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function wce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function mN(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?Z6(i,e,r):$6(i,e,r),Y6(i,r,n),X6(i,e,r,n),i.__pictorialShapeStr=q6(t,r),i.__pictorialSymbolMeta=r,i}function bce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?Z6(t,e,r,!0):$6(t,e,r,!0),Y6(t,r,!0),X6(t,e,r,!0)}function yN(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];sL(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),N(a,function(o){ds(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function q6(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function sL(t,e,r){N(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Ic(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&au[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function _N(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");sL(t,function(g){if(g instanceof dr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,h&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Qc(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),bt(t,c,f,a.get("disabled"))}function xN(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Tce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Cs(ad.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:X.color.primary}}}),e}(ad);function Cce(t){t.registerChartView(gce),t.registerSeriesModel(Tce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(gj,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,mj("pictorialBar"))}var Mce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var v=new uo(this._layersSeries||[],l,h,h),p=[];v.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var b=[],T=[],C,A=l[y].indices,D=0;Da&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function kce(t){t.registerChartView(Mce),t.registerSeriesModel(Ace),t.registerLayout(Pce),t.registerProcessor(Lf("themeRiver"))}var Ice=2,Ece=4,wN=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Ice,o.textConfig={inside:!0},Ae(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:Ece,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ae(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=J({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=Xc(v,o));var p=ua(l.getModel("itemStyle"),f,!0);J(f,p),N(nn,function(_){var S=s.ensureState(_),b=l.getModel([_,"itemStyle"]);S.style=b.getItemStyle();var T=ua(b,f);T&&(S.shape=T)}),r?(s.setShape(f),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:f},i),li(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?jc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;bt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)F&&!Wc(j-F)&&j0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new wN(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";dy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:MT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(lt),zce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};K6(i);var a=this._levelModels=re(r.levels||[],function(l){return new He(l,this,n)},this),o=HM.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=r_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){t6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function K6(t){var e=0;N(t.children,function(n){K6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var TN=Math.PI/180;function Bce(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),f=oe(a[0],l/2),h=oe(a[1],l/2),v=-n.get("startAngle")*TN,p=n.get("minAngle")*TN,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&Q6(m,_);var S=0;N(m.children,function(j){!isNaN(j.getValue())&&S++});var b=m.getValue(),T=Math.PI/(b||S)*2,C=m.depth>0,A=m.height-(C?-1:1),D=(h-f)/(A||1),E=n.get("clockwise"),k=n.get("stillShowZeroSum"),I=E?1:-1,z=function(j,U){if(j){var V=U;if(j!==g){var W=j.getValue(),H=b===0&&k?T:W*T;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=ey(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function jce(t){t.registerChartView(Oce),t.registerSeriesModel(zce),t.registerLayout(Ie(Bce,"sunburst")),t.registerProcessor(Ie(Lf,"sunburst")),t.registerVisual(Fce),Nce(t)}var CN={color:"fill",borderColor:"stroke"},Gce={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ka=Fe(),Hce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return Ta(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=Ka(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function Wce(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function Uce(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(Wce,t)}}}function Zce(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function $ce(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(Zce,t)}}}function Yce(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function Xce(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(Yce,t)}}}function qce(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Kce(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(qce,t)}}}function Qce(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function Jce(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function J6(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||fe(t,"text")))}function eH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return MN(o,t),N(o.rich,function(l){MN(l,l)}),{textConfig:i,textContent:a}}function MN(t,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(t.align=e.textAlign),fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(t.width=e.textWidth),fe(e,"textHeight")&&(t.height=e.textHeight),fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(t.padding=e.textPadding),fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function LN(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||X.color.neutral99;AN(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||X.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||X.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,N(e.rich,function(s){AN(s,s)}),n}function AN(t,e){e&&(fe(e,"fill")&&(t.textFill=e.fill),fe(e,"stroke")&&(t.textStroke=e.fill),fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fe(e,"font")&&(t.font=e.font),fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fe(e,"fontSize")&&(t.fontSize=e.fontSize),fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fe(e,"align")&&(t.textAlign=e.align),fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fe(e,"width")&&(t.textWidth=e.width),fe(e,"height")&&(t.textHeight=e.height),fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(t.textPadding=e.padding),fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var tH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},PN=Ze(tH);ai(ga,function(t,e){return t[e]=1,t},{});ga.join(", ");var Gy=["","style","shape","extra"],rf=Fe();function lL(t,e,r,n,i){var a=t+"Animation",o=pf(t,n,i)||{},s=rf(e).userDuring;return o.duration>0&&(o.during=s?le(ife,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function gm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=rf(t),u=e.style;l.userDuring=e.during;var c={},f={};if(ofe(t,e,f),t.type==="compound")for(var h=t.shape.paths,v=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else tfe(t,e,i||0,r,c);rH(t,e),u?t.dirty():t.markRedraw()}function rH(t,e){for(var r=rf(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function rfe(t,e){fe(e,"silent")&&(t.silent=e.silent),fe(e,"ignore")&&(t.ignore=e.ignore),t instanceof si&&fe(e,"invisible")&&(t.invisible=e.invisible),t instanceof We&&fe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Ki={},nfe={setTransform:function(t,e){return Ki.el[t]=e,this},getTransform:function(t){return Ki.el[t]},setShape:function(t,e){var r=Ki.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Ki.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Ki.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Ki.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Ki.el.extra||(Ki.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Ki.el.extra;if(e)return e[t]}};function ife(){var t=this,e=t.el;if(e){var r=rf(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Ki.el=e,n(nfe)}}function DN(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Nl(l))J(o,a);else for(var u=gt(l),c=0;c=0){!o&&(o=n[t]={});for(var v=Ze(a),c=0;c=0)){var h=t.getAnimationStyleProps(),v=h?h.style:null;if(v){!a&&(a=n.style={});for(var p=Ze(r),u=0;u=0?e.getStore().get(V,j):void 0}var W=e.get(U.name,j),H=U&&U.ordinalMeta;return H?H.categories[W]:W}function A(G,j){j==null&&(j=c);var U=e.getItemVisual(j,"style"),V=U&&U.fill,W=U&&U.opacity,H=S(j,Uo).getItemStyle();V!=null&&(H.fill=V),W!=null&&(H.opacity=W);var Y={inheritColor:se(V)?V:X.color.neutral99},K=b(j,Uo),ne=pt(K,null,Y,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(j,Uo),Qc(e,j)):null;var ie=fy(K,Y,!1);return k(G,H),H=LN(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function D(G,j){j==null&&(j=c);var U=S(j,Qa).getItemStyle(),V=b(j,Qa),W=pt(V,null,null,!0,!0);W.text=V.getShallow("show")?mn(t.getFormattedLabel(j,Qa),t.getFormattedLabel(j,Uo),Qc(e,j)):null;var H=fy(V,null,!0);return k(G,U),U=LN(U,W,H),G&&E(U,G),U.legacy=!0,U}function E(G,j){for(var U in j)fe(j,U)&&(G[U]=j[U])}function k(G,j){G&&(G.textFill&&(j.textFill=G.textFill),G.textPosition&&(j.textPosition=G.textPosition))}function I(G,j){if(j==null&&(j=c),fe(CN,G)){var U=e.getItemVisual(j,"style");return U?U[CN[G]]:null}if(fe(Gce,G))return e.getItemVisual(j,G)}function z(G){if(o.type==="cartesian2d"){var j=o.getBaseAxis();return hte(Se({axis:j},G))}}function O(){return r.getCurrentSeriesIndices()}function F(G){return O2(G,r)}}function mfe(t){var e={};return N(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function gS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=vL(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&bt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function vL(t,e,r,n,i,a){var o=-1,s=e;e&&oH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=fL(n),s&&vfe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Gn.normal.cfg=Gn.normal.conOpt=Gn.emphasis.cfg=Gn.emphasis.conOpt=Gn.blur.cfg=Gn.blur.conOpt=Gn.select.cfg=Gn.select.conOpt=null,Gn.isLegacy=!1,_fe(u,r,n,i,l,Gn),yfe(u,r,n,i,l),hL(t,u,r,n,Gn,i,l),fe(n,"info")&&(Ka(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function oH(t,e,r){var n=Ka(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Tfe(a)&&sH(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function yfe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&oH(o,a,n)&&(o=null),o||(o=fL(a),t.setClipPath(o)),hL(null,o,e,a,null,n,i)}}function _fe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){IN(r,null,a),IN(r,Qa,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=fL(o),t.setTextContent(c)),hL(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;v--){var p=e.childAt(v);Sfe(e,p,i)}}}function Sfe(t,e,r){e&&a_(e,Ka(t).option,r)}function wfe(t){new uo(t.oldChildren,t.newChildren,EN,EN,t).add(RN).update(RN).remove(bfe).execute()}function EN(t,e){var r=t&&t.name;return r??ffe+e}function RN(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;vL(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function bfe(t){var e=this.context,r=e.oldChildren[t];r&&a_(r,Ka(r).option,e.seriesModel)}function sH(t){return t&&(t.pathData||t.d)}function Tfe(t){return t&&(fe(t,"pathData")||fe(t,"d"))}function Cfe(t){t.registerChartView(dfe),t.registerSeriesModel(Hce)}var pl=Fe(),NN=ye,mS=le,pL=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var h=Ie(ON,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}BN(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=OM(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=pl(e).pointerEl=new au[a.type](NN(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=pl(e).labelEl=new Xe(NN(r.label));e.add(a),zN(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=pl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=pl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),zN(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=gf(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oo(u.event)},onmousedown:mS(this._onHandleDragMove,this,0,0),drift:mS(this._onHandleDragMove,this),ondragend:mS(this._onHandleDragEnd,this)}),n.add(i)),BN(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,wf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){ON(this._axisPointerModel,!r&&this._moveAnimation,this._handle,yS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(yS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(yS(i)),pl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Kv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function ON(t,e,r,n){lH(pl(r).lastProp,n)||(pl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function lH(t,e){if(we(t)&&we(e)){var r=!0;return N(e,function(n,i){r=r&&lH(t[i],n)}),!!r}else return t===e}function zN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function yS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function BN(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function gL(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function uH(t,e,r,n,i){var a=r.get("value"),o=cH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=_f(s.get("padding")||0),u=s.getFont(),c=P0(o,u),f=i.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),Mfe(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:pt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Mfe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function cH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:Cy(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};N(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function mL(t,e,r){var n=fr();return po(n,n,r.rotation),Ii(n,n,r.position),Pi([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function fH(t,e,r,n,i,a){var o=tn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),uH(e,n,i,a,{position:mL(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function yL(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function hH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function VN(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Lfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=FN(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=gL(a),v=Afe[u](s,f,c);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=Ny(l.getRect(),i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Ny(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=FN(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:v,tooltipOption:p[c]}},e}(pL);function FN(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var Afe={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],jN(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],jN(t))}}};function jN(t){return t.dim==="x"?0:1}var Pfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:X.color.border,width:1,type:"dashed"},shadowStyle:{color:X.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:X.color.neutral00,padding:[5,7,5,7],backgroundColor:X.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:X.color.accent40,throttle:40}},e}(Ve),Ua=Fe(),Dfe=N;function vH(t,e,r){if(!Ue.node){var n=e.getZr();Ua(n).records||(Ua(n).records={}),kfe(n,e);var i=Ua(n).records[t]||(Ua(n).records[t]={});i.handler=r}}function kfe(t,e){if(Ua(t).initialized)return;Ua(t).initialized=!0,r("click",Ie(GN,"click")),r("mousemove",Ie(GN,"mousemove")),r("globalout",Efe);function r(n,i){t.on(n,function(a){var o=Rfe(e);Dfe(Ua(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Ife(o.pendings,e)})}}function Ife(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function Efe(t,e,r){t.handler("leave",null,r)}function GN(t,e,r,n){e.handler(t,r,n)}function Rfe(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function PT(t,e){if(!Ue.node){var r=e.getZr(),n=(Ua(r).records||{})[t];n&&(Ua(r).records[t]=null)}}var Nfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";vH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){PT("axisPointer",n)},e.prototype.dispose=function(r,n){PT("axisPointer",n)},e.type="axisPointer",e}(mt);function dH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Wl(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[v]=a.get(p,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var HN=Fe();function Ofe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){mm(i)&&(i=dH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=mm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||mm(i),h={},v={},p={list:[],map:{}},g={showPointer:Ie(Bfe,v),showTooltip:Ie(Vfe,p)};N(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);N(s.coordSysAxesInfo[_],function(b,T){var C=b.axis,A=Hfe(u,b);if(!f&&S&&(!u||A)){var D=A&&A.value;D==null&&!l&&(D=C.pointToData(i)),D!=null&&WN(b,D,g,!1,h)}})});var m={};return N(c,function(y,_){var S=y.linkGroup;S&&!v[_]&&N(S.axesInfo,function(b,T){var C=v[T];if(b!==y&&C){var A=C.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,UN(b),UN(y)))),m[y.key]=A}})}),N(m,function(y,_){WN(c[_],y,g,!0,h)}),Ffe(v,c,h),jfe(p,i,t,o),Gfe(c,o,r),h}}function WN(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=zfe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function zfe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return N(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,t,r);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=t-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),N(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function Bfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function Vfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=od(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function Ffe(t,e,r){var n=r.axesInfo=[];N(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function jfe(t,e,r,n){if(mm(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function Gfe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=HN(n)[i]||{},o=HN(n)[i]={};N(t,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&N(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];N(a,function(u,c){!o[c]&&l.push(u)}),N(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Hfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function UN(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function mm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Gd(t){uu.registerAxisPointerClass("CartesianAxisPointer",Lfe),t.registerComponentModel(Pfe),t.registerComponentView(Nfe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=Wie(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Ofe)}function Wfe(t){Oe(BG),Oe(Gd)}var Ufe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var v=gL(a),p=$fe[h](s,l,f,c);p.style=v,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=Zfe(n,i,a,l,g);uH(r,i,a,o,m)},e}(pL);function Zfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=fr();po(h,h,s),Ii(h,h,[n.cx,n.cy]),u=Pi([o,-i],h);var v=e.getModel("axisLabel").get("rotate")||0,p=tn.innerTextLayout(s,v*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var $fe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:yL(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:VN(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:VN(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},Yfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ve),_L=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Dt).models[0]},e.type="polarAxis",e}(Ve);Bt(_L,Mf);var Xfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(_L),qfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(_L),xL=function(t){$(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(fi);xL.prototype.dataToRadius=fi.prototype.dataToCoord;xL.prototype.radiusToData=fi.prototype.coordToData;var Kfe=Fe(),SL=function(t){$(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=P0(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),p=Kfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-v)<=1&&Math.abs(m-o)<=1&&g>v?v=g:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(fi);SL.prototype.dataToAngle=fi.prototype.dataToCoord;SL.prototype.angleToData=fi.prototype.coordToData;var pH=["radius","angle"],Qfe=function(){function t(e){this.dimensions=pH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new xL,this._angleAxis=new SL,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,v=this.r0;return h!==v&&f-o<=h*h&&f+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=ZN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=ZN(r);return i===this?this.pointToData(n):null},t}();function ZN(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Jfe(t,e,r){var n=e.get("center"),i=or(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function ehe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();N(My(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),N(My(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),ql(n.scale,n.model),ql(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function the(t){return t.mainType==="angleAxis"}function $N(t,e){var r;if(t.type=e.get("type"),t.scale=Od(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),the(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var rhe={dimensions:pH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new Qfe(i+"");a.update=ehe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");$N(o,l),$N(s,u),Jfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Dt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},nhe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Mg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Lg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function YN(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var ihe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});YN(u),YN(s),N(nhe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&ahe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(uu),ahe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Lg(r),f=c?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new au[v]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new vf({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Lg(r)],u=re(n,function(c){return new Wt({shape:Mg(r,[l,l+s],c.coord)})});t.add(Tn(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Lg(r)],c=[],f=0;fy?"left":"right",b=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var T=s[p];we(T)&&T.textStyle&&(v=new He(T.textStyle,l,l.ecModel))}var C=new Xe({silent:tn.isLabelSilent(e),style:pt(v,{x:m[0],y:m[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:S,verticalAlign:b})});if(t.add(C),mo({el:C,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var A=tn.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=f.rawLabel,Ae(C).eventData=A}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",G=E;T&&(n[c][O]||(n[c][O]={p:E,n:E}),G=n[c][O][F]);var j=void 0,U=void 0,V=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-E,Y=l.dataToCoord(O);Math.abs(H)=W})}}})}function fhe(t){var e={};N(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=mH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=gH(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!h[v].width&&(p=Math.min(f.remainedWidth,p),h[v].width=p,f.remainedWidth-=p),g&&(h[v].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.categoryGap=y)});var r={};return N(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),N(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=XN(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=XN(r);return i===this?this.pointToData(n):null},t}();function XN(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function She(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new xhe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Dt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var whe={create:She,dimensions:yH},qN=["x","y"],bhe=["width","height"],The=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=_S(l,1-Uy(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=gL(a),v=Che[f](s,c,u);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=DT(i);fH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=DT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=mL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Uy(o),u=_S(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=_S(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(pL),Che={line:function(t,e,r){var n=yL([e,r[0]],[e,r[1]],Uy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:hH([e-n/2,r[0]],[n,i],Uy(t))}}};function Uy(t){return t.isHorizontal()?0:1}function _S(t,e){var r=t.getRect();return[r[qN[e]],r[qN[e]]+r[bhe[e]]]}var Mhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(mt);function Lhe(t){Oe(Gd),uu.registerAxisPointerClass("SingleAxisPointer",The),t.registerComponentView(Mhe),t.registerComponentView(mhe),t.registerComponentModel(ym),Jc(t,"single",ym,ym.defaultOption),t.registerCoordinateSystem("single",whe)}var Ahe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=ou(r);t.prototype.init.apply(this,arguments),KN(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),KN(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:X.color.axisLine,width:1,type:"solid"}},itemStyle:{color:X.color.neutral00,borderWidth:1,borderColor:X.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:X.size.s,color:X.color.secondary},monthLabel:{show:!0,position:"start",margin:X.size.s,align:"center",formatter:null,color:X.color.secondary},yearLabel:{show:!0,position:null,margin:X.size.xl,formatter:null,color:X.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ve);function KN(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return qK(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});_a(t,e,{type:"box",ignoreSize:i})}var Phe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new ze({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new br({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?HK(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:pt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,v[l],i,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Cb(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/xS)-Math.floor(r[0].time/xS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Rd({targetModel:a,coordSysType:"calendar",coordSysProvider:zV})}),n},t.dimensions=["time","value"],t}();function SS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function khe(t){t.registerComponentModel(Ahe),t.registerComponentView(Phe),t.registerCoordinateSystem("calendar",Dhe)}var Ba={level:1,leaf:2,nonLeaf:3},Ja={none:0,all:1,body:2,corner:3};function kT(t,e,r){var n=e[ke[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[ke[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function _H(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function xH(t,e,r,n,i){QN(t[0],e,i,r,n,0),QN(t[1],e,i,r,n,1)}function QN(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(JN(t,e,s,u,i,a,0),l>1&&JN(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[ke[1-a]].getLocatorCount(a),f=i[ke[a]].getLocatorCount(a)-1;r===Ja.body?c=Gt(0,c):r===Ja.corner&&(f=kn(-1,f)),f=e[0]&&t[0]<=e[1]}function rO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Rhe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function nO(t,e,r,n){var i=kT(e[n][0],r,n),a=kT(e[n][1],r,n);t[ke[n]]=t[qt[n]]=NaN,i&&a&&(t[ke[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function wh(t,e,r,n){return t[ke[e]]=r,t[ke[1-e]]=n,t}function Nhe(t){return t&&(t.type===Ba.leaf||t.type===Ba.nonLeaf)?t:null}function Zy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var iO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=Ohe(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,f){var h=0;return u&&N(u,function(v,p){var g;se(v)?g={value:v}:we(v)?(g=v,v.value!=null&&!se(v.value)&&(g={value:null})):g={value:null};var m={type:Ba.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Te,span:wh(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Zy()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:Ba.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,f+1),_=Math.max(1,y);m.span[ke[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length=1,S=r[ke[n]],b=a.getLocatorCount(n)-1,T=new is;for(o.resetLayoutIterator(T,n);T.next();)C(T.item);for(a.resetLayoutIterator(T,n);T.next();)C(T.item);function C(A){kr(A.wh)&&(A.wh=y),A.xy=S,A.id[ke[n]]===b&&!_&&(A.wh=r[ke[n]]+r[qt[n]]-A.xy),S+=A.wh}}function fO(t,e){for(var r=e[ke[t]].resetCellIterator();r.next();){var n=r.item;$y(n.rect,t,n.id,n.span,e),$y(n.rect,1-t,n.id,n.span,e),n.type===Ba.nonLeaf&&(n.xy=n.rect[ke[t]],n.wh=n.rect[qt[t]])}}function hO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;$y(i,0,a,n,e),$y(i,1,a,n,e)}})}function $y(t,e,r,n,i){t[qt[e]]=0;var a=r[ke[e]],o=a<0?i[ke[1-e]]:i[ke[e]],s=o.getUnitLayoutInfo(e,r[ke[e]]);if(t[ke[e]]=s.xy,t[qt[e]]=s.wh,n[ke[e]]>1){var l=o.getUnitLayoutInfo(e,r[ke[e]]+n[ke[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function Xhe(t,e,r){var n=oy(t,r[qt[e]]);return ET(n,r[qt[e]])}function ET(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function TS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Pr={inBody:1,inCorner:2,outside:3},Xi={x:null,y:null,point:[]};function vO(t,e,r,n,i){var a=r[ke[e]],o=r[ke[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=t.point[e]=n[e];if(!l&&!c){t[ke[e]]=Pr.outside;return}if(i===Ja.body){l?(t[ke[e]]=Pr.inBody,f=kn(s.xy+s.wh,Gt(l.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}else if(i===Ja.corner){c?(t[ke[e]]=Pr.inCorner,f=kn(c.xy+c.wh,Gt(u.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:h,p=s?s.xy+s.wh:h;if(fp){if(!i){t[ke[e]]=Pr.outside;return}f=p}t.point[e]=f,t[ke[e]]=h<=f&&f<=p?Pr.inBody:v<=f&&f<=h?Pr.inCorner:Pr.outside}function dO(t,e,r,n){var i=1-r;if(t[ke[r]]!==Pr.outside)for(n[ke[r]].resetCellIterator(bS);bS.next();){var a=bS.item;if(gO(t.point[r],a.rect,r)&&gO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[ke[i]];return}}}function pO(t,e,r,n){if(t[ke[r]]!==Pr.outside){var i=t[ke[r]]===Pr.inCorner?n[ke[1-r]]:n[ke[r]];for(i.resetLayoutIterator(Ig,r);Ig.next();)if(qhe(t.point[r],Ig.item)){e[r]=Ig.item.id[ke[r]];return}}}function qhe(t,e){return e.xy<=t&&t<=e.xy+e.wh}function gO(t,e,r){return e[ke[r]]<=t&&t<=e[ke[r]]+e[qt[r]]}function Khe(t){t.registerComponentModel(Fhe),t.registerComponentView(Uhe),t.registerCoordinateSystem("matrix",Yhe)}function Qhe(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function mO(t,e){var r;return N(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function Jhe(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Re(i,n,!0),_a(i,n,{ignoreSize:!0}),GV(r,i),Eg(r,i),Eg(r,i,"shape"),Eg(r,i,"style"),Eg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var wH=["transition","enterFrom","leaveTo"],eve=wH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Eg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?wH:eve,i=0;i=0;c--){var f=i[c],h=rr(f.id,null),v=h!=null?o.get(h):null;if(v){var p=v.parent,y=$n(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},b=H0(v,f,_,null,{hv:f.hv,boundingMode:f.bounding},S);if(!$n(v).isNew&&b){for(var T=f.transition,C={},A=0;A=0)?C[D]=E:v[D]=E}Qe(v,C,r,0)}else v.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){_m(i,$n(i).option,n,r._lastGraphicModel)}),this._elMap=ve()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(mt);function RT(t){var e=fe(yO,t)?yO[t]:$v(t),r=new e({});return $n(r).type=t,r}function _O(t,e,r,n){var i=RT(r);return e.add(i),n.set(t,i),$n(i).id=t,$n(i).isNew=!0,i}function _m(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){_m(a,e,r,n)}),a_(t,e,n),r.removeKey($n(t).id))}function xO(t,e,r,n){t.isGroup||N([["cursor",si.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];fe(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),N(Ze(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),fe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function ive(t){return t=J({},t),N(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(BV),function(e){delete t[e]}),t}function ave(t,e,r){var n=Ae(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Ae(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function ove(t){t.registerComponentModel(rve),t.registerComponentView(nve),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var SO=["x","y","radius","angle","single"],sve=["cartesian2d","polar","singleAxis"];function lve(t){var e=t.get("coordinateSystem");return Ee(sve,e)>=0}function Zo(t){return t+"Axis"}function uve(t,e){var r=ve(),n=[],i=ve();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var p=r.get(h);p&&p[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function bH(t){var e=t.ecModel,r={infoList:[],infoMap:ve()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Zo(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var CS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),hd=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=wO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=wO(r);Re(this.option,r,!0),Re(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=ve(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return N(SO,function(i){var a=this.getReferringComponents(Zo(i),LX);if(a.specified){n=!0;var o=new CS;N(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new CS;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Dt).models[0];v&&N(u,function(p){f.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",Dt).models[0]&&h.add(p.componentIndex)})}}}a&&N(SO,function(u){if(a){var c=i.findComponents({mainType:Zo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new CS;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");N([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Zo(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){N(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Zo(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;N([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;N(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!b&&!T)return!0;S&&(m=!0),b&&(p=!0),T&&(g=!0)}return m&&p&&g})}else ec(c,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});ec(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;ec(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=it(n[0]+o,n,[0,100],!0):a!=null&&(o=it(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=v2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function vve(t,e,r){var n=[1/0,-1/0];ec(r,function(o){kte(n,o.getData(),e)});var i=t.getAxisModel(),a=wj(i.axis.scale,i,n).calculate();return[a.min,a.max]}var dve={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Zo(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new hve(i,a,s,t),r.push(o.__dzAxisProxy))});var n=ve();return N(r,function(i){N(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function pve(t){t.registerAction("dataZoom",function(e,r){var n=uve(r,e);N(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var TO=!1;function CL(t){TO||(TO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,dve),pve(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function gve(t){t.registerComponentModel(cve),t.registerComponentView(fve),CL(t)}var Kn=function(){function t(){}return t}(),TH={};function tc(t,e){TH[t]=e}function CH(t){return TH[t]}var mve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;N(this.option.feature,function(n,i){var a=CH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Re(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:X.size.m,itemSize:15,itemGap:X.size.s,showTitle:!0,iconStyle:{borderColor:X.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:X.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Ve);function MH(t,e){var r=_f(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new ze({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var yve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];N(u,function(_,S){f.push(S)}),new uo(this._featureNames||[],f).add(h).update(h).remove(Ie(h,null)).execute(),this._featureNames=f;function h(_,S){var b=f[_],T=f[S],C=u[b],A=new He(C,r,r.ecModel),D;if(a&&a.newTitle!=null&&a.featureName===b&&(C.title=a.newTitle),b&&!T){if(_ve(b))D={onclick:A.option.onclick,featureName:b};else{var E=CH(b);if(!E)return;D=new E}c[b]=D}else if(D=c[T],!D)return;D.uid=yf("toolbox-feature"),D.model=A,D.ecModel=n,D.api=i;var k=D instanceof Kn;if(!b&&T){k&&D.dispose&&D.dispose(n,i);return}if(!A.get("show")||k&&D.unusable){k&&D.remove&&D.remove(n,i);return}v(A,D,b),A.setIconStatus=function(I,z){var O=this.option,F=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,F[I]&&(z==="emphasis"?so:lo)(F[I])},D instanceof Kn&&D.render&&D.render(A,n,i,a)}function v(_,S,b){var T=_.getModel("iconStyle"),C=_.getModel(["emphasis","iconStyle"]),A=S instanceof Kn&&S.getIcons?S.getIcons():_.get("icon"),D=_.get("title")||{},E,k;se(A)?(E={},E[b]=A):E=A,se(D)?(k={},k[b]=D):k=D;var I=_.iconPaths={};N(E,function(z,O){var F=gf(z,{},{x:-s/2,y:-s/2,width:s,height:s});F.setStyle(T.getItemStyle());var G=F.ensureState("emphasis");G.style=C.getItemStyle();var j=new Xe({style:{text:k[O],align:C.get("textAlign"),borderRadius:C.get("textBorderRadius"),padding:C.get("textPadding"),fill:null,font:O2({fontStyle:C.get("textFontStyle"),fontFamily:C.get("textFontFamily"),fontSize:C.get("textFontSize"),fontWeight:C.get("textFontWeight")},n)},ignore:!0});F.setTextContent(j),mo({el:F,componentModel:r,itemName:O,formatterParamsExtra:{title:k[O]}}),F.__title=k[O],F.on("mouseover",function(){var U=C.getItemStyle(),V=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";j.setStyle({fill:C.get("textFill")||U.fill||U.stroke||X.color.neutral99,backgroundColor:C.get("textBackgroundColor")}),F.setTextConfig({position:C.get("textPosition")||V}),j.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),j.hide()}),(_.get(["iconStatus",O])==="emphasis"?so:lo)(F),o.add(F),F.on("click",le(S.onclick,S,n,i,O)),I[O]=F})}var p=or(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=wt(g,p,m);Il(r.get("orient"),o,r.get("itemGap"),y.width,y.height),H0(o,g,p,m),o.add(MH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,b=_.ensureState("emphasis"),T=b.textConfig||(b.textConfig={}),C=_.getTextContent(),A=C&&C.ensureState("emphasis");if(A&&!me(A)&&S){var D=A.style||(A.style={}),E=P0(S,Xe.makeFont(D)),k=_.x+o.x,I=_.y+o.y+s,z=!1;I+E.height>i.getHeight()&&(T.position="top",z=!0);var O=z?-5-E.height:s+10;k+E.width/2>i.getWidth()?(T.position=["100%",O],D.align="right"):k-E.width/2<0&&(T.position=[0,O],D.align="left")}})},e.prototype.updateView=function(r,n,i,a){N(this._features,function(o){o instanceof Kn&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){N(this._features,function(i){i instanceof Kn&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){N(this._features,function(i){i instanceof Kn&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(mt);function _ve(t){return t.indexOf("my")===0}var xve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||X.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ue.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];v&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var b=S.contentWindow,T=b.document;T.open("image/svg+xml","replace"),T.write(p),T.close(),b.focus(),T.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var C=i.get("lang"),A='',D=window.open();D.document.write(A),D.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:X.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Kn),CO="__ec_magicType_stack__",Sve=[["line","bar"],["stack"]],wve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return N(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(MO[i]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,p=MO[i](h,v,f,a);p&&(Se(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",S=f.getReferringComponents(_,Dt).models[0],b=S.componentIndex;s[_]=s[_]||[];for(var T=0;T<=b;T++)s[_][b]=s[_][b]||{};s[_][b].boundaryGap=i==="bar"}}};N(Sve,function(f){Ee(f,i)>=0&&N(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Re({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Kn),MO={line:function(t,e,r,n){if(t==="bar")return Re({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Re({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===CO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Re({id:e,stack:i?"":CO},n.get(["option","stack"])||{},!0)}};Oi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var o_=new Array(60).join("-"),nf=" ";function bve(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function Tve(t){var e=[];return N(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(v){return v.name})),l=[i.model.getCategories()];N(r.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(nf)],c=0;c1||r>0&&!t.noHeader;return R(t.blocks,function(i){var a=MF(i);a>=e&&(e=a+ +(n&&(!a||Bb(i)&&!i.noHeader)))}),e}return 0}function dJ(t,e,r,n){var i=e.noHeader,a=gJ(MF(e)),o=[],s=e.blocks||[];Nr(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(fe(u,l)){var c=new yF(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(g,m){var y=e.valueFormatter,_=CF(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var f=t.renderMode==="richText"?o.join(a.richText):Vb(n,o.join(""),i?r:a.html);if(i)return f;var h=Ib(e.header,"ordinal",t.useUTC),v=TF(n,t.renderMode).nameStyle,p=bF(n);return t.renderMode==="richText"?LF(t,h,v)+a.richText+f:Vb(n,'
'+Wr(h)+"
"+f,r)}function pJ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(b){return b=ee(b)?b:[b],re(b,function(C,M){return Ib(C,ee(v)?v[M]:v,u)})};if(!(a&&o)){var f=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||q.color.secondary,i),h=a?"":Ib(l,"ordinal",u),v=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=TF(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":LF(t,h,_))+(o?"":_J(t,p,g,m,S)):Vb(n,(s?"":f)+(a?"":mJ(h,!s,_))+(o?"":yJ(p,g,m,S)),r)}}function pI(t,e,r,n,i,a){if(t){var o=CF(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function gJ(t){return{html:hJ[t],richText:vJ[t]}}function Vb(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=bF(t);return'
'+e+n+"
"}function mJ(t,e,r){var n=e?"margin-left:2px":"";return''+Wr(t)+""}function yJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Wr(o)}).join("  ")+""}function LF(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function _J(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function AF(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return ql(n)}function PF(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var v1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=O4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=HV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?R(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function DF(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=AF(e,r),c,f,h,v;if(o>1||l&&!o){var p=xJ(s,e,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,v=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);v=c=qc(i,r,a[0]),f=g.type}else v=c=l?s[0]:s;var m=C2(e),y=m&&e.name||"",_=i.getName(r),S=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:v,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Mn(S),value:c,valueType:f,dataIndex:r})].concat(h||[])})}function xJ(t,e,r,n,i){var a=e.getData(),o=ai(t,function(f,h,v){var p=a.getDimensionInfo(v);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(f){c(qc(a,r,f),f)}):R(t,c);function c(f,h){var v=a.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:f,valueType:v.type})):(s.push(f),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var bo=je();function tg(t,e){return t.getName(e)||t.getId(e)}var gm="__universalTransitionEnabled",ht=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=gv({count:wJ,reset:bJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=bo(this).sourceManager=new wF(this);a.prepareSource();var o=this.getInitialData(r,i);mI(o,this),this.dataTask.context.data=o,bo(this).dataBeforeProcessed=o,gI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Jv(this),a=i?su(r):{},o=this.subType;Fe.hasClass(o)&&(o+="Series"),Ne(r,n.getTheme().get(this.subType)),Ne(r,this.getDefaultOption()),Wl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&_a(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ne(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Jv(this);i&&_a(this.option,r,i);var a=bo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);mI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,bo(this).dataBeforeProcessed=o,gI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!rn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=_,h=y,v=0),y===h&&(c[v++]=g))}),c.length=v,c},e.prototype.formatTooltip=function(r,n,i){return DF({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ze.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=lM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[tg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[gm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){we(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Fe.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Fe);Bt(ht,q0);Bt(ht,lM);Z4(ht,Fe);function gI(t){var e=t.name;C2(t)||(t.name=SJ(t)||e)}function SJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function wJ(t){return t.model.getRawData().count()}function bJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),TJ}function TJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function mI(t,e){R(Hc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(CJ,e))})}function CJ(t,e){var r=Fb(t);return r&&r.setOutputEnd((e||this).count()),e}function Fb(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var mt=function(){function t(){this.group=new _e,this.uid=xf("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();L2(mt);z0(mt);function bf(){var t=je();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var kF=je(),MJ=bf(),lt=function(){function t(){this.group=new _e,this.uid=xf("viewChart"),this.renderTask=gv({plan:LJ,reset:AJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&_I(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&_I(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Cs(this.group,e)},t.markUpdateMethod=function(e,r){kF(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function yI(t,e,r){t&&qv(t)&&(e==="emphasis"?so:lo)(t,r)}function _I(t,e,r){var n=Ul(t,e),i=e&&e.highlightKey!=null?eK(e.highlightKey):null;n!=null?R(gt(n),function(a){yI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){yI(a,r,i)})}L2(lt);z0(lt);function LJ(t){return MJ(t.model)}function AJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&kF(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),PJ[l]}var PJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Sy="\0__throttleOriginMethod",xI="\0__throttleRate",SI="\0__throttleType";function Q0(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var v=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){c=v},h}function Tf(t,e,r,n){var i=t[e];if(i){var a=i[Sy]||i,o=i[SI],s=i[xI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=Q0(a,r,n==="debounce"),i[Sy]=a,i[SI]=n,i[xI]=r}return i}}function td(t,e){var r=t[e];r&&r[Sy]&&(r.clear&&r.clear(),t[e]=r[Sy])}var wI=je(),bI={itemStyle:Zl(NV,!0),lineStyle:Zl(EV,!0)},DJ={lineStyle:"stroke",itemStyle:"fill"};function IF(t,e){var r=t.visualStyleMapper||bI[e];return r||(console.warn("Unknown style type '"+e+"'."),bI.itemStyle)}function EF(t,e){var r=t.visualDrawType||DJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var kJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=IF(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=EF(t,n),u=o[l],c=me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?h:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),v.setItemVisual(p,"style",m)}}}},sh=new We,IJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=IF(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){sh.option=l[n];var u=i(sh),c=o.ensureUniqueItemVisual(s,"style");J(c,u),sh.option.decal&&(o.setItemVisual(s,"decal",sh.option.decal),sh.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},EJ={performRawSeries:!0,overallReset:function(t){var e=ve();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),wI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=wI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=EF(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),v=n.getName(u)||u+"",p=n.count();h[l]=r.getColorFromPalette(v,o,p)}})}})}},rg=Math.PI;function NJ(t,e){e=e||{},Se(e,{text:"loading",textColor:q.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new ze({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ze({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Nd({shape:{startAngle:-rg/2,endAngle:-rg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:rg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:rg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var NF=function(){function t(e,r,n,i){this._stageTaskMap=ve(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=ve();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Nr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;R(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var v,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=ve(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,v=s.set(h,o&&o.get(h)||gv({plan:VJ,reset:FJ,count:GJ}));v.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,v)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||gv({reset:RJ});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,v="";Nr(!e.createOnAllSeries,v),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,gv({reset:OJ,onDirty:BJ})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:HJ(e)}),e.uid=xf("stageHandler"),r&&(e.visualType=r),e},t}();function RJ(t){t.overallReset(t.ecModel,t.api,t.payload)}function OJ(t){return t.overallProgress&&zJ}function zJ(){this.agent.dirty(),this.getDownstream().dirty()}function BJ(){this.agent&&this.agent.dirty()}function VJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function FJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return RF(n)}):jJ}var jJ=RF(0);function RF(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&v===u.length-h.length){var p=u.slice(0,v);p!=="data"&&(r.mainType=p,r[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(f,h,v,p){return f[v]==null||h[p||v]===f[v]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),jb=["symbol","symbolSize","symbolRotate","symbolOffset"],CI=jb.concat(["symbolKeepAspect"]),ZJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Ml(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Gb(t,e,r){for(var n=e.type==="radial"?see(t,e,r):oee(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function pM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&uee(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var cee=new ya(!0);function Ty(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function MI(t){return typeof t=="string"&&t!=="none"}function Cy(t){var e=t.fill;return e!=null&&e!=="none"}function LI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function AI(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function Hb(t,e,r){var n=A2(e.image,e.__image,r);if(B0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*av),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function fee(t,e,r,n){var i,a=Ty(r),o=Cy(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||cee,f=e.__dirty;if(!n){var h=r.fill,v=r.stroke,p=o&&!!h.colorStops,g=a&&!!v.colorStops,m=o&&!!h.image,y=a&&!!v.image,_=void 0,S=void 0,b=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=f?Gb(t,h,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=f?Gb(t,v,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(b=f||!e.__canvasFillPattern?Hb(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(C=f||!e.__canvasStrokePattern?Hb(t,v,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(b?t.fillStyle=b:o=!1),g?t.strokeStyle=S:y&&(C?t.strokeStyle=C:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var D,E;t.setLineDash&&r.lineDash&&(i=pM(e),D=i[0],E=i[1]);var k=!0;(u||f&Ju)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),D&&(t.setLineDash(D),t.lineDashOffset=E),n||(r.strokeFirst?(a&&AI(t,r),o&&LI(t,r)):(o&&LI(t,r),a&&AI(t,r))),D&&t.setLineDash([])}function hee(t,e,r){var n=e.__image=A2(r.image,e.__image,e,e.onload);if(!(!n||!B0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,f=o-u,h=s-c;t.drawImage(n,u,c,f,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function vee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||ao,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=pM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Ty(r)&&t.strokeText(i,r.x,r.y),Cy(r)&&t.fillText(i,r.x,r.y)):(Cy(r)&&t.fillText(i,r.x,r.y),Ty(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var PI=["shadowBlur","shadowOffsetX","shadowOffsetY"],DI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function jF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){hn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?kl.opacity:o}(n||e.blend!==r.blend)&&(a||(hn(t,i),a=!0),t.globalCompositeOperation=e.blend||kl.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Bu(this),!this._model||n){var l=new LQ(this._api),u=this._theme,c=this._model=new uM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},$b);var f={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:f},this[er]=!1,this.getZr().wakeUp();else{try{tl(this),ka.update.call(this,null,f)}catch(h){throw this[yr]=null,this[er]=!1,h}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,Ou.call(this,a),zu.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[yr]&&(a==null&&(a=this[yr].silent),o=this[yr].updateParams,this[yr]=null),this[er]=!0,Bu(this);try{this._updateTheme(r),i.setTheme(this._theme),tl(this),ka.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Ou.call(this,a),zu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=oj[r]),r&&(r=ye(r),r&&uF(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Py[i]){var l=s,u=s,c=-s,f=-s,h=[],v=r&&r.pixelRatio||this.getDevicePixelRatio();R(Nl,function(S,b){if(S.group===i){var C=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),M=S.getDom().getBoundingClientRect();l=a(M.left,l),u=a(M.top,u),c=o(M.right,c),f=o(M.bottom,f),h.push({dom:C,left:M.left,top:M.top})}}),l*=v,u*=v,c*=v,f*=v;var p=c-l,g=f-u,m=yn.createCanvas(),y=fb(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(h,function(S){var b=S.left-l,C=S.top-u;_+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new ze({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(h,function(S){var b=new pr({style:{x:S.left*v-l,y:S.top*v-u,image:S.dom}});y.add(b)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return og(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return og(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return og(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Dc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Dc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?dM(s,l,n):Vd(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;R(Vee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Cl(l,function(g){var m=Ae(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var v=f&&h!=null&&s.getComponent(f,h),p=v&&r[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(Ub,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),YJ(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&H4(this.getDom(),_M,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Nl[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[yr]&&(a==null&&(a=this[yr].silent),i=!0,this[yr]=null),this[er]=!0,Bu(this);try{i&&tl(this),ka.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Ou.call(this,a),zu.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Yb[r]){var i=Yb[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=Wb[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(we(n)||(n={silent:!!n}),!!Ly[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;_1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Ou.call(this,i),zu.call(this,i)}},e.prototype.updateLabelLayout=function(){yi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){tl=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),m1(f,!0),m1(f,!1),h.plan()},m1=function(f,h){for(var v=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,_=f._api,S=0;Sh.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var v=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=v)})}function l(f,h){if(!f.preventAutoZ){var v=Xl(f);h.eachRendered(function(p){return Z0(p,v.z,v.zlevel),!0})}}function u(f,h){h.eachRendered(function(v){if(!kc(v)){var p=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function c(f,h){var v=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),g=v.get("duration"),m=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(kc(y))return;if(y instanceof Ue&&tK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),b=y.getTextGuideLine();S&&(S.stateTransition=m),b&&(b.stateTransition=m)}y.__dirty&&a(y)}})}HI=function(f){return new(function(h){$(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},v.prototype.enterEmphasis=function(p,g){so(p,g),Fn(f)},v.prototype.leaveEmphasis=function(p,g){lo(p,g),Fn(f)},v.prototype.enterBlur=function(p){sV(p),Fn(f)},v.prototype.leaveBlur=function(p){N2(p),Fn(f)},v.prototype.enterSelect=function(p){lV(p),Fn(f)},v.prototype.leaveSelect=function(p){uV(p),Fn(f)},v.prototype.getModel=function(){return f.getModel()},v.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},v.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},v.prototype.getMainProcessVersion=function(){return f[ig]},v}(sF))(f)},aj=function(f){function h(v,p){for(var g=0;g=0)){UI.push(r);var a=NF.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function CM(t,e){Yb[t]=e}function Xee(t){Y3({createCanvas:t})}function hj(t,e,r){var n=$F("registerMap");n&&n(t,e,r)}function qee(t){var e=$F("getMap");return e&&e(t)}var vj=aJ;Ls(mM,kJ);Ls(J0,IJ);Ls(J0,EJ);Ls(mM,ZJ);Ls(J0,$J);Ls(QF,See);wM(uF);bM(Aee,VQ);CM("default",NJ);Oi({type:Il,event:Il,update:Il},Rt);Oi({type:cm,event:cm,update:cm},Rt);Oi({type:dy,event:I2,update:dy,action:Rt,refineEvent:MM,publishNonRefinedEvent:!0});Oi({type:Sb,event:I2,update:Sb,action:Rt,refineEvent:MM,publishNonRefinedEvent:!0});Oi({type:py,event:I2,update:py,action:Rt,refineEvent:MM,publishNonRefinedEvent:!0});function MM(t,e,r,n){return{eventContent:{selected:qq(r),isFromClick:e.isFromClick||!1}}}SM("default",{});SM("dark",BF);var Kee={},ZI=[],Qee={registerPreprocessor:wM,registerProcessor:bM,registerPostInit:lj,registerPostUpdate:uj,registerUpdateLifecycle:e_,registerAction:Oi,registerCoordinateSystem:cj,registerLayout:fj,registerVisual:Ls,registerTransform:vj,registerLoading:CM,registerMap:hj,registerImpl:wee,PRIORITY:JF,ComponentModel:Fe,ComponentView:mt,SeriesModel:ht,ChartView:lt,registerComponentModel:function(t){Fe.registerClass(t)},registerComponentView:function(t){mt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){XF(t,e)},registerSubTypeDefaulter:function(t,e){Fe.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){P4(t,e)}};function Oe(t){if(ee(t)){R(t,function(e){Oe(e)});return}Ee(ZI,t)>=0||(ZI.push(t),me(t)&&(t={install:t}),t.install(Qee))}function uh(t){return t==null?0:t.length||1}function $I(t){return t}var uo=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||$I,this._newKeyGetter=i||$I,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var v=0;v1)for(var s=0;s30}var ch=we,To=re,ite=typeof Int32Array>"u"?Array:Int32Array,ate="e\0\0",YI=-1,ote=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ste=["_approximateExtent"],XI,lg,fh,hh,w1,vh,b1,Zr=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;pj(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Rn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():ch(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,ch(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){ch(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;xb(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){R(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:To(this.dimensions,this._getDimInfo,this),this.hostModel)),w1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(D0(arguments)))})},t.internalField=function(){XI=function(e){var r=e._invertedIndicesMap;R(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new ite(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function lte(t,e){return Mf(t,e).dimensions}function Mf(t,e){cM(t)||(t=fM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=ve(),a=[],o=cte(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&yj(o),l=n===t.dimensionsDefine,u=l?mj(t):gj(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=ve(c),h=new xF(o),v=0;v0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function cte(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return R(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function fte(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var hte=function(){function t(e){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=e}return t}();function vte(t){var e=t.get("coordinateSystem"),r=new hte(e),n=dte[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var dte={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Dt).models[0],a=t.getReferringComponents("yAxis",Dt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Vu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Vu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Dt).models[0];e.coordSysDims=["single"],r.set("single",i),Vu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Dt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Vu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Vu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Vu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",Dt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Vu(t){return t.get("type")==="category"}function _j(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;pte(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,h;if(R(a,function(_,S){se(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var v=c.coordDim,p=c.type,g=0;R(a,function(_){_.coordDim===v&&g++});var m={name:f,coordDim:v,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function pte(t){return!pj(t.schema)}function co(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function LM(t,e){return co(t,e)?t.getCalculationInfo("stackResultDimension"):e}function gte(t,e){var r=t.get("coordinateSystem"),n=wf.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Dy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function mte(t,e,r){var n,i;return r&&R(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function Ta(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=fM(t)):(i=n.getSource(),a=i.sourceFormat===Rn);var o=vte(e),s=gte(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(nF,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Mf(i,c),h=mte(f.dimensions,r.createInvertedIndices,o),v=a?null:n.getSharedDataStore(f),p=_j(e,{schema:f,store:v}),g=new Zr(f,e);g.setCalculationInfo(p);var m=h!=null&&yte(i)?function(y,_,S,b){return b===h?S:this.defaultDimValueGetter(y,_,S,b)}:null;return g.hasItemOption=!1,g.initData(a?i:v,null,m),g}function yte(t){if(t.sourceFormat===Rn){var e=_te(t.data||[]);return!ee(hf(e))}}function _te(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=id(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Ste(l,t),a}function T1(t){var e=Math.pow(10,O0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function id(t){return bi(t)+2}function qI(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Ste(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),qI(t,0,e),qI(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function AM(t,e){return t>=e[0]&&t<=e[1]}var wte=function(){function t(){this.normalize=KI,this.scale=QI}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=KI,this.scale=QI)},t}();function KI(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function QI(t,e){return t*(e[1]-e[0])+e[0]}function qb(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var As=function(){function t(e){this._calculator=new wte,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();z0(As);var bte=0,ad=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++bte,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Tte);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},t}();function Tte(t){return we(t)&&t.value!=null?t.value:t+""}var Qc=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new ad({})),ee(i)&&(i=new ad({categories:re(i,function(a){return we(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return AM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(As);As.registerClass(Qc);var Co=Ht,fo=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return AM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=id(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(f=Co(f+h*n,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return i[1]>v&&(r.expandToNicedExtent?l.push({value:Co(v+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function bj(t){var e=Lte(t),r=[];return R(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(Aj(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:S,axisKey:PM(a),stackId:Sj(n)})}),Tj(r)}function Tj(t){var e={};R(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=$e(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,v=(f-u)/(h+(h-1)*c);v=Math.max(v,0),R(a,function(y){var _=y.maxWidth,S=y.minWidth;if(y.width){var b=y.width;_&&(b=Math.min(b,_)),S&&(b=Math.max(b,S)),y.width=b,f-=b+c*b,h--}else{var b=v;_&&_b&&(b=S),b!==v&&(y.width=b,f-=b+c*b,h--)}}),v=(f-u)/(h+(h-1)*c),v=Math.max(v,0);var p=0,g;R(a,function(y,_){y.width||(y.width=v),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;R(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Ate(t,e,r){if(t&&e){var n=t[PM(e)];return n}}function Cj(t,e){var r=wj(t,e),n=bj(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=Sj(i),u=n[PM(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Mj(t){return{seriesType:t,plan:bf(),reset:function(e){if(Lj(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),f=co(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),v=Pte(i,a),p=Aj(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,b){for(var C=S.count,M=p&&sa(C*3),A=p&&l&&sa(C*3),D=p&&sa(C),E=n.master.getRect(),k=h?E.width:E.height,I,z=b.getStore(),O=0;(I=S.next())!=null;){var F=z.get(f?m:o,I),G=z.get(s,I),j=v,U=void 0;f&&(U=+F-z.get(o,I));var V=void 0,W=void 0,H=void 0,X=void 0;if(h){var K=n.dataToPoint([F,G]);if(f){var ne=n.dataToPoint([U,G]);j=ne[0]}V=j,W=K[1]+_,H=K[0]-j,X=y,Math.abs(H)0?r:1:r))}var Dte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=ug.length,s=Math.min(Dte(ug,this._approxInterval,0,o),o-1);this._interval=ug[s][1],this._intervalPrecision=id(this._interval),this._minLevelUnit=ug[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+wa(r)},e.prototype.contain=function(r){return AM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(fo),ug=[["second",Y2],["minute",X2],["hour",dv],["quarter-day",dv*6],["half-day",dv*12],["day",Qn*1.2],["half-week",Qn*3.5],["week",Qn*7],["month",Qn*31],["quarter",Qn*95],["half-year",Gk/2],["year",Gk]];function Pj(t,e,r,n){return _y(new Date(e),t,n).getTime()===_y(new Date(r),t,n).getTime()}function kte(t,e){return t/=Qn,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Ite(t){var e=30*Qn;return t/=e,t>6?6:t>3?3:t>2?2:1}function Ete(t){return t/=dv,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function JI(t,e){return t/=e?X2:Y2,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Nte(t){return b2(t,!0)}function Rte(t,e,r){var n=Math.max(0,Ee(Sn,e)-1);return _y(new Date(t),Sn[n],r).getTime()}function Ote(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function zte(t,e,r,n,i,a){var o=1e4,s=XK,l=0;function u(O,F,G,j,U,V,W){for(var H=Ote(U,O),X=F,K=new Date(X);Xo));)if(K[U](K[j]()+O),X=K.getTime(),a){var ne=a.calcNiceTickMultiple(X,H);ne>0&&(K[U](K[j]()+ne*O),X=K.getTime())}W.push({value:X,notAdd:!0})}function c(O,F,G){var j=[],U=!F.length;if(!Pj(pv(O),n[0],n[1],r)){U&&(F=[{value:Rte(n[0],O,r)},{value:n[1]}]);for(var V=0;V=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,j),O==="year"&&G.length>1&&V===0&&G.unshift({value:G[0].value-X})}}for(var V=0;V=n[0]&&b<=n[1]&&v++)}var C=i/e;if(v>C*1.5&&p>C/1.5||(f.push(_),v>C||t===s[g]))break}h=[]}}}for(var M=tt(re(f,function(O){return tt(O,function(F){return F.value>=n[0]&&F.value<=n[1]&&!F.notAdd})}),function(O){return O.length>0}),A=[],D=M.length-1,g=0;g0;)a*=10;var s=[Qb(Vte(n[0]/a)*a),Qb(Bte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=id(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=fg(r)/fg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=fg(r)/fg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),cg(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(fo);function hg(t,e){return Qb(t,bi(e))}As.registerClass(Dj);var Fte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},t.prototype.modifyDataMinMax=function(e,r){this[Gte[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=jte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),jte={min:"_determinedMin",max:"_determinedMax"},Gte={min:"_dataMin",max:"_dataMax"};function kj(t,e,r){var n=t.rawExtentInfo;return n||(n=new Fte(t,e,r),t.rawExtentInfo=n,n)}function vg(t,e){return e==null?null:kr(e)?NaN:t.parse(e)}function Ij(t,e){var r=t.type,n=kj(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=wj("bar",o),l=!1;if(R(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=bj(s),c=Hte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Hte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Ate(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;R(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;R(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function Kl(t,e){var r=e,n=Ij(t,r),i=n.extent,a=r.get("splitNumber");t instanceof Dj&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(Nj(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Fd(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Qc({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new DM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(As.getClass(e)||fo)}}function Wte(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Lf(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=qK(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(ky(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(ky(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function ky(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function kM(t){var e=t.get("interval");return e??"auto"}function Ej(t){return t.type==="category"&&kM(t.getLabelModel())===0}function Iy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[LM(t,n)]=!0}),$e(r)}function Ute(t,e,r){e&&R(Iy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function Jc(t){return t==="middle"||t==="center"}function od(t){return t.getShallow("show")}function Nj(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Zte(t.axis)?void 0:e}function Zte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Af=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function $te(t){return Ta(null,t)}var Yte={isDimensionStacked:co,enableDataStack:_j,getStackedDimension:LM};function Xte(t,e){var r=e;e instanceof We||(r=new We(e));var n=Fd(r);return n.setExtent(t[0],t[1]),Kl(n,r),n}function qte(t){Bt(t,Af)}function Kte(t,e){return e=e||{},pt(t,null,null,e.state!=="normal")}const Qte=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:lte,createList:$te,createScale:Xte,createSymbol:Ut,createTextStyle:Kte,dataStack:Yte,enableHoverEmphasis:as,getECData:Ae,getLayoutRect:wt,mixinAxisModelCommonMethods:qte},Symbol.toStringTag,{value:"Module"}));var Jte=1e-8;function eE(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return tre(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?tE(s.exterior,i,a,r):R(s.points,function(l){tE(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Jb(t,e){return t=nre(t),re(tt(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new rE(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new rE(l[0],l.slice(1)))});break;case"LineString":a.push(new nE([i.coordinates]));break;case"MultiLineString":a.push(new nE(i.coordinates))}var s=new Oj(n[e||"name"],a,n.cp);return s.properties=n,s})}const ire=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:vb,asc:Ln,getPercentWithPrecision:bX,getPixelPrecision:S2,getPrecision:bi,getPrecisionSafe:E4,isNumeric:T2,isRadianAroundZero:Zc,linearMap:it,nice:b2,numericToNumber:ma,parseDate:wa,parsePercent:oe,quantile:um,quantity:R4,quantityExponent:O0,reformIntervals:db,remRadian:w2,round:Ht},Symbol.toStringTag,{value:"Module"})),are=Object.freeze(Object.defineProperty({__proto__:null,format:zd,parse:wa,roundTime:_y},Symbol.toStringTag,{value:"Module"})),ore=Object.freeze(Object.defineProperty({__proto__:null,Arc:Nd,BezierCurve:gf,BoundingRect:Ce,Circle:ba,CompoundPath:Rd,Ellipse:Ed,Group:_e,Image:pr,IncrementalDisplayable:SV,Line:Wt,LinearGradient:au,Polygon:Or,Polyline:Tr,RadialGradient:z2,Rect:ze,Ring:pf,Sector:Rr,Text:Xe,clipPointsByRect:j2,clipRectByRect:MV,createIcon:yf,extendPath:TV,extendShape:bV,getShapeClass:Kv,getTransform:os,initProps:St,makeImage:V2,makePath:Yc,mergePath:Tn,registerShape:ci,resizePath:F2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),sre=Object.freeze(Object.defineProperty({__proto__:null,addCommas:rM,capitalFirst:aQ,encodeHTML:Wr,formatTime:iQ,formatTpl:iM,getTextRect:rQ,getTooltipMarker:HV,normalizeCssArray:Sf,toCamelCase:nM,truncateText:rq},Symbol.toStringTag,{value:"Module"})),lre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:R,extend:J,filter:tt,indexOf:Ee,inherits:v2,isArray:ee,isFunction:me,isObject:we,isString:se,map:re,merge:Ne,reduce:ai},Symbol.toStringTag,{value:"Module"}));var ure=je(),mv=je(),Ni={estimate:1,determine:2};function Ey(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Bj(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function cre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Lf(t),i=t.scale.getExtent(),a=Bj(t,r),o=tt(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?hre(t,e):dre(t)}function fre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=Bj(t,n);return{ticks:tt(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?vre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function hre(t,e){var r=t.getLabelModel(),n=Vj(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function Vj(t,e,r){var n=gre(t),i=kM(e),a=r.kind===Ni.estimate;if(!a){var o=jj(n,i);if(o)return o}var s,l;me(i)?s=Wj(t,i):(l=i==="auto"?mre(t,r):i,s=Hj(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return eT(n,i,u),!0}):eT(n,i,u),u}function vre(t,e){var r=pre(t),n=kM(e),i=jj(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=Wj(t,n,!0);else if(n==="auto"){var s=Vj(t,t.getLabelModel(),Ey(Ni.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=Hj(t,o,!0);return eT(r,n,{ticks:a,tickCategoryInterval:o})}function dre(t){var e=t.scale.getTicks(),r=Lf(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var pre=Fj("axisTick"),gre=Fj("axisLabel");function Fj(t){return function(r){return mv(r)[t]||(mv(r)[t]={list:[]})}}function jj(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=t.dataToCoord(f+1)-t.dataToCoord(f),v=Math.abs(h*Math.cos(a)),p=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,_=0,S=N0(i({value:f}),n.font,"center","top");y=S.width*1.3,_=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var b=g/v,C=m/p;isNaN(b)&&(b=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(b,C)));if(r===Ni.estimate)return e.out.noPxChangeTryDetermine.push(le(_re,null,t,M,l)),M;var A=Gj(t,M,l);return A??M}function _re(t,e,r){return Gj(t,e,r)==null}function Gj(t,e,r){var n=ure(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function xre(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function Hj(t,e,r){var n=Lf(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Ej(t),h=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);v&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function Wj(t,e,r){var n=t.scale,i=Lf(t),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var iE=[0,1],fi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return S2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),aE(n,i.count())),it(e,iE,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),aE(n,i.count()));var a=it(e,n,iE,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=fre(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Sre(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Ey(Ni.determine),cre(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Ey(Ni.determine),yre(this,e)},t}();function aE(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Sre(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;R(e,function(v){v.coord-=u/2,v.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function h(v,p){return v=Ht(v),p=Ht(p),f?v>p:vi&&(i+=dh);var v=Math.atan2(s,o);if(v<0&&(v+=dh),v>=n&&v<=i||v+dh>=n&&v+dh<=i)return l[0]=c,l[1]=f,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,_=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return _0){e=e/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,Ti,_t),Te.sub(ia,jt,_t);var r=la.len(),n=ia.len();if(!(r<.001||n<.001)){la.scale(1/r),ia.scale(1/n);var i=la.dot(ia),a=Math.cos(e);if(a1&&Te.copy(Jr,jt),Jr.toArray(t[1])}}}}function kre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Ti.fromArray(t[0]),_t.fromArray(t[1]),jt.fromArray(t[2]),Te.sub(la,_t,Ti),Te.sub(ia,jt,_t);var n=la.len(),i=ia.len();if(!(n<.001||i<.001)){la.scale(1/n),ia.scale(1/i);var a=la.dot(e),o=Math.cos(r);if(a=l)Te.copy(Jr,jt);else{Jr.scaleAndAdd(ia,s/Math.tan(Math.PI/2-c));var f=jt.x!==_t.x?(Jr.x-_t.x)/(jt.x-_t.x):(Jr.y-_t.y)/(jt.y-_t.y);if(isNaN(f))return;f<0?Te.copy(Jr,_t):f>1&&Te.copy(Jr,jt)}Jr.toArray(t[1])}}}}function L1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function Ire(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=ja(n[0],n[1]),a=ja(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=sv([],n[1],n[0],o/i),l=sv([],n[1],n[2],o/a),u=sv([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){b(k*E,0,a);var I=k+A;I<0&&C(-I*E,1)}else C(-A*E,1)}}function b(A,D,E){A!==0&&(c=!0);for(var k=D;k0)for(var I=0;I0;I--){var G=E[I-1]*F;b(-G,I,a)}}}function M(A){var D=A<0?-1:1;A=Math.abs(A);for(var E=Math.ceil(A/(a-1)),k=0;k0?b(E,0,k+1):b(-E,a-k-1,a),A-=E,A<=0)return}return c}function Rre(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!_f(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var v=a.oldLayoutSelect={};dg(v,u,pg),dg(v,n.states.select,pg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};dg(p,u,pg),dg(p,n.states.emphasis,pg)}IV(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Bre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,St(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),D1=je();function Fre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=D1(r).labelManager;i||(i=D1(r).labelManager=new Vre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=D1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var k1=Math.sin,I1=Math.cos,Kj=Math.PI,nl=Math.PI*2,jre=180/Kj,Qj=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Ho(f-nl)||(c?u>=nl:-u>=nl),v=u>0?u%nl:u%nl+nl,p=!1;h?p=!0:Ho(f)?p=!1:p=v>=Kj==!!c;var g=e+n*I1(o),m=r+i*k1(o);this._start&&this._add("M",g,m);var y=Math.round(a*jre);if(h){var _=1/this._p,S=(c?1:-1)*(nl-_);this._add("A",n,i,y,1,+c,e+n*I1(o+S),r+i*k1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var b=e+n*I1(s),C=r+i*k1(s);this._add("A",n,i,y,+p,+c,b,C)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function qre(t){return""}function RM(t,e){e=e||{};var r=e.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return Xre(o,s)+(o!=="style"?Wr(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+qre(o)}return n(t)}function Kre(t,e,r){r=r||{};var n=r.newline?` +`:"",i=" {"+n,a=n+"}",o=re($e(t),function(l){return l+i+re($e(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=re($e(e),function(l){return"@keyframes "+l+i+re($e(e[l]),function(u){return u+i+re($e(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function aT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fE(t,e,r,n){return fr("svg","root",{width:t,height:e,xmlns:Jj,"xmlns:xlink":eG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var Qre=0;function rG(){return Qre++}var hE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},ll="transform-origin";function Jre(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new Qj;return i.reset(w4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function ene(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[ll]=r+"px "+n+"px")}var tne={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function nG(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function rne(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=aT(r.zrId);u.animation=!0,r_(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=$e(c),v=h.length;if(v){o=h[v-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in f){var _=f[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=nG(i,r);return a.replace(o,s)}}function vE(t){return se(t)?hE[t]?"cubic-bezier("+hE[t]+")":m2(t)?t:"":""}function r_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof Rd){var s=rne(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Ge=nG(A,r);return Ge+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+rG();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function nne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};dE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=sy(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),dE(n,e,r)}}function dE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+rG(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var sd=Math.round;function iG(t){return t&&se(t.src)}function aG(t){return t&&me(t.toDataURL)}function OM(t,e,r,n){Zre(function(i,a){var o=i==="fill"||i==="stroke";o&&S4(a)?sG(e,t,i,n):o&&_2(a)?lG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),cne(r,t,n)}function zM(t,e){var r=D4(e);r&&(r.each(function(n,i){n!=null&&(t[(cE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[cE+"silent"]="true"))}function pE(t){return Ho(t[0]-1)&&Ho(t[1])&&Ho(t[2])&&Ho(t[3]-1)}function ine(t){return Ho(t[4])&&Ho(t[5])}function BM(t,e,r){if(e&&!(ine(e)&&pE(e))){var n=1e4;t.transform=pE(e)?"translate("+sd(e[4]*n)/n+" "+sd(e[5]*n)/n+")":VY(e)}}function gE(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Nr(h,m),Nr(v,m)}else if(h==null||v==null){var y=function(k,I){if(k){var z=k.elm,O=h||I.width,F=v||I.height;k.tag==="pattern"&&(u?(F=1,O/=a.width):c&&(O=1,F/=a.height)),k.attrs.width=O,k.attrs.height=F,z&&(z.setAttribute("width",O),z.setAttribute("height",F))}},_=A2(p,null,t,function(k){l||y(M,k),y(f,k)});_&&_.width&&_.height&&(h=h||_.width,v=v||_.height)}f=fr("image","img",{href:p,width:h,height:v}),o.width=h,o.height=v}else i.svgElement&&(f=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var S,b;l?S=b=1:u?(b=1,S=o.width/a.width):c?(S=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),b!=null&&!isNaN(b)&&(o.height=b);var C=b4(i);C&&(o.patternTransform=C);var M=fr("pattern","",o,[f]),A=RM(M),D=n.patternCache,E=D[A];E||(E=n.zrId+"-p"+n.patternIdx++,D[A]=E,o.id=E,M=n.defs[E]=fr("pattern",E,o,[f])),e[r]=E0(E)}}function fne(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=fr("clipPath",a,o,[oG(t,r)])}e["clip-path"]=E0(a)}function _E(t){return document.createTextNode(t)}function pl(t,e,r){t.insertBefore(e,r)}function xE(t,e){t.removeChild(e)}function SE(t,e){t.appendChild(e)}function uG(t){return t.parentNode}function cG(t){return t.nextSibling}function E1(t,e){t.textContent=e}var wE=58,hne=120,vne=fr("","");function oT(t){return t===void 0}function ea(t){return t!==void 0}function dne(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Gh(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function ld(t){var e,r=t.children,n=t.tag;if(ea(n)){var i=t.elm=tG(n);if(VM(vne,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,fG(t,p,r,i,l)):By(t,e,n,a))}function ec(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(VM(t,e),oT(e.text)?ea(n)&&ea(i)?n!==i&&pne(r,n,i):ea(i)?(ea(t.text)&&E1(r,""),fG(r,null,i,0,i.length-1)):ea(n)?By(r,n,0,n.length-1):ea(t.text)&&E1(r,""):t.text!==e.text&&(ea(n)&&By(r,n,0,n.length-1),E1(r,e.text)))}function gne(t,e){if(Gh(t,e))ec(t,e);else{var r=t.elm,n=uG(r);ld(e),n!==null&&(pl(n,e.elm,cG(r)),By(n,[t],0,0))}return e}var mne=0,yne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=bE(),this.configLayer=bE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+mne++,this._oldVNode=fE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=tG("svg");VM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",gne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return yE(e,aT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=aT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=_ne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=fr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(fr("defs","defs",{},u)),e.animation){var c=Kre(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=fr("style","stl",{},[],c);o.push(f)}}return fE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},RM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var f=this.__startIndex;f15)break}}F.prevElClipPaths&&y.restore()};if(_)if(_.length===0)D=m.__endIndex;else for(var k=v.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*k,z.y*k,z.width*k,z.height*k),y.clip(),E(z),y.restore()}else y.save(),E(),y.restore();m.__drawIndex=D,m.__drawIndex0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?gg:0),this._needsManuallyCompositing),c.__builtin__||A0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&bn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Ne(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=q.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function ef(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=qc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var jd=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=Lne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){so(this.childAt(0))},e.prototype.downplay=function(){lo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var v=this.childAt(0);v.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(p):Qe(v,p,s,n),li(v)}if(this._updateCommon(r,n,l,i,a),c){var v=this.childAt(0);if(!f){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,St(v,p,s,n)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,v,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,v=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),v=S.get("blurScope"),p=S.get("disabled"),g=ar(_),m=S.getShallow("scale"),y=_.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var C=uu(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),y&&s.attr("cursor",y);var M=r.getItemVisual(n,"style"),A=M.fill;if(s instanceof pr){var D=s.style;s.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.height},M))}else s.__isEmptyBrush?s.useStyle(J({},M)):s.useStyle(M),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=r.getItemVisual(n,"liftZ"),k=this._z2;E!=null?k==null&&(this._z2=s.z2,s.z2+=E):k!=null&&(s.z2=k,this._z2=null);var I=o&&o.useNameLabel;dr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:M.opacity});function z(G){return I?r.getName(G):ef(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var F=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*F,O.scaleY=this._sizeY*F,this.setSymbolScale(1),bt(this,h,v,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Ae(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ps(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ps(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Cf(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function Lne(t,e){this.parent.drift(t,e)}function R1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function ME(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function LE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var Gd=function(){function t(e){this.group=new _e,this._SymbolCtor=e||jd}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=ME(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=LE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(R1(e,h,f,r)){var v=new o(e,f,l,u);v.setPosition(h),e.setItemGraphicEl(f,v),n.add(v)}}).update(function(f,h){var v=a.getItemGraphicEl(h),p=c(f);if(!R1(e,p,f,r)){n.remove(v);return}var g=e.getItemVisual(f,"symbol")||"circle",m=v&&v.getSymbolType&&v.getSymbolType();if(!v||m&&m!==g)n.remove(v),v=new o(e,f,l,u),v.setPosition(p);else{v.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):Qe(v,y,i)}n.add(v),e.setItemGraphicEl(f,v)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=LE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=ME(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function dG(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Pne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Dne(t,e,r,n,i,a,o,s){for(var l=Pne(t,e),u=[],c=[],f=[],h=[],v=[],p=[],g=[],m=vG(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=i||g<0)break;if(Rl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),f=y,h=_;else{var S=y-u,b=_-c;if(S*S+b*b<.5){g+=a;continue}if(o>0){for(var C=g+a,M=e[C*2],A=e[C*2+1];M===y&&A===_&&m=n||Rl(M,A))v=y,p=_;else{k=M-u,I=A-c;var F=y-u,G=M-y,j=_-c,U=A-_,V=void 0,W=void 0;if(s==="x"){V=Math.abs(F),W=Math.abs(G);var H=k>0?1:-1;v=y-H*V*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){V=Math.abs(j),W=Math.abs(U);var X=I>0?1:-1;v=y,p=_-X*V*o,z=y,O=_+X*W*o}else V=Math.sqrt(F*F+j*j),W=Math.sqrt(G*G+U*U),E=W/(W+V),v=y-k*o*(1-E),p=_-I*o*(1-E),z=y+k*o*E,O=_+I*o*E,z=Mo(z,Lo(M,y)),O=Mo(O,Lo(A,_)),z=Lo(z,Mo(M,y)),O=Lo(O,Mo(A,_)),k=z-y,I=O-_,v=y-k*V/W,p=_-I*V/W,v=Mo(v,Lo(u,y)),p=Mo(p,Lo(c,_)),v=Lo(v,Mo(u,y)),p=Lo(p,Mo(c,_)),k=y-v,I=_-p,z=y+k*W/V,O=_+I*W/V}t.bezierCurveTo(f,h,v,p,y,_),f=z,h=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var pG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),kne=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new pG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Rl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var b=u?(p-l)*S+l:(v-s)*S+s;return u?[r,b]:[b,r]}s=v,l=p;break;case o.C:v=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++],_=a[f++];var C=u?ay(s,v,g,y,r,c):ay(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var b=u?ur(l,p,m,_,A):ur(s,v,g,y,A);return u?[r,b]:[b,r]}}s=y,l=_;break}}},e}(Ue),Ine=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(pG),gG=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new Ine},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Rl(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Rne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=Nne(u,i==="x"?r.getWidth():r.getHeight()),v=h.length;if(!v&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,m=h[v-1].coord+p,y=m-g;if(y<.001)return"transparent";R(h,function(S){S.offset=(S.coord-g)/y}),h.push({offset:v?h[v-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:f[0]||"transparent"});var _=new au(0,0,0,0,h,!0);return _[i]=g,_[i+"2"]=m,_}}}function One(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&zne(a,e))){var o=e.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function zne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function Bne(t,e){return isNaN(t)||isNaN(e)}function Vne(t){for(var e=t.length/2;e>0&&Bne(t[e*2-2],t[e*2-1]);e--);return e-1}function IE(t,e){return[t[e*2],t[e*2+1]]}function Fne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function _G(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Ae(p).seriesIndex=r.seriesIndex,bt(p,j,U,V);var H=kE(r.get("smooth")),X=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:X,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=kE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Ae(g).seriesIndex=r.seriesIndex,bt(g,j,U,V)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=c,this._step=k,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Ae(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Ul(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,v=r.get("z")||0;u=new jd(o,s),u.x=c,u.y=f,u.setZ(h,v);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=v,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Ul(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;gy(this._polyline,r),n&&gy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new kne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new gG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=me(f)?f(null):f;r.eachItemGraphicEl(function(v,p){var g=v;if(g){var m=[v.x,v.y],y=void 0,_=void 0,S=void 0;if(i)if(o){var b=i,C=n.pointToCoord(m);a?(y=b.startAngle,_=b.endAngle,S=-C[1]/180*Math.PI):(y=b.r0,_=b.r,S=C[0])}else{var M=i;a?(y=M.x,_=M.x+M.width,S=v.x):(y=M.y+M.height,_=M.y,S=v.y)}var A=_===y?0:(S-y)/(_-y);l&&(A=1-A);var D=me(f)?f(p):c*A+h,E=g.getSymbolPath(),k=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:D}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(_G(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Vne(l);c>=0&&(dr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,v){return v!=null?hG(o,v):ef(o,f)},enableTextSetter:!0},jne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,v=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,S=n.shape,b=_?y?S.x:S.y+S.height:y?S.x+S.width:S.y,C=(y?g:0)*(_?-1:1),M=(y?0:-g)*(_?-1:1),A=y?"x":"y",D=Fne(f,b,A),E=D.range,k=E[1]-E[0],I=void 0;if(k>=1){if(k>1&&!v){var z=IE(f,E[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=h.getRawValue(E[0]))}else{var z=c.getPointOn(b,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=h.getRawValue(E[0]),F=h.getRawValue(E[1]);o&&(I=W4(i,p,O,F,D.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=IE(f,G);o&&(I=h.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var j=_f(u);typeof j.setLabelText=="function"&&j.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=r.hostModel,h=Dne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=h.current,p=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=Ao(h.stackedOnCurrent,h.current,i,o,l),v=Ao(h.current,null,i,o,l),m=Ao(h.stackedOnNext,h.next,i,o,l),g=Ao(h.next,null,i,o,l)),DE(v,g)>3e3||c&&DE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=v;var y={shape:{points:g}};h.current!==v&&(y.shape.__points=h.next),u.stopAnimation(),Qe(u,y,f),c&&(c.setShape({points:v,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=h.status,b=0;be&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),v=Math.round(s/h);if(isFinite(v)&&v>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var p=void 0;se(a)?p=Hne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/v,p,Wne))}}}}}function Une(t){t.registerChartView(Gne),t.registerSeriesModel(Mne),t.registerLayout(Wd("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,xG("line"))}var ud=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),m=o[v],y=n[v]==="x1"||n[v]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[v]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var _=void 0,S=void 0,b=1,C=0;Cm){S=(M+_)/2;break}C===1&&(b=A-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[v]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(ud);var Zne=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return Ta(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ms(ud.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:q.color.primary,borderWidth:2}},realtimeSort:!1}),e}(ud),$ne=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Vy=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new $ne},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,v=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){qa(a,r,Ae(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(lt),EE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=z1(e.x,t.x),s=B1(e.x+e.width,i),l=z1(e.y,t.y),u=B1(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=B1(e.r,t.r),a=z1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},NE={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new ze({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Vy:Rr,c=new u({shape:n,z2:1});c.name="item";var f=SG(i);if(c.calculateTextPosition=Yne(f,{isRoundCap:u===Vy}),a){var h=c.shape,v=i?"r":"endAngle",p={};h[v]=i?n.r0:n.startAngle,p[v]=n[v],(s?Qe:St)(c,{shape:p},a)}return c}};function Qne(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function RE(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:St)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:St)(r,{shape:u},c,i)}function OE(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function tie(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function SG(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function BE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ua(n.getModel("itemStyle"),c,!0);J(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);dr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:ef(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,Xne(t,m==="outside"?v:m,SG(o),n.get(["label","rotate"]))}kV(g,p,a.getRawValue(r),function(_){return hG(e,_)});var y=n.getModel(["emphasis"]);bt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),tie(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function rie(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var nie=function(){function t(){}return t}(),VE=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new nie},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function iie(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function wG(t,e,r){if(gs(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function aie(t,e,r){var n=t.type==="polar"?Rr:ze;return new n({shape:wG(e,r,t),silent:!0,z2:0})}function oie(t){t.registerChartView(Kne),t.registerSeriesModel(Zne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(Cj,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Mj("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,xG("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var GE=Math.PI*2,xg=Math.PI/180;function sie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=XV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*xg,v=n.get("endAngle"),p=n.get("padAngle")*xg;v=v==="auto"?h-GE:-v*xg;var g=n.get("minAngle")*xg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,b=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var D=b?1:-1,E=[h,v],k=D*p/2;j0(E,!b),h=E[0],v=E[1];var I=bG(n);I.startAngle=h,I.endAngle=v,I.clockwise=b,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(v-h),O=z,F=0,G=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(U,V){var W;if(isNaN(U)){i.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:s,cy:l,r0:c,r:C?NaN:u});return}C!=="area"?W=_===0&&M?S:U*S:W=z/y,WW?(X=G+D*W/2,K=X):(X=G+k,K=H-k),i.setItemLayout(V,{angle:W,startAngle:X,endAngle:K,clockwise:b,cx:s,cy:l,r0:c,r:C?it(U,A,[c,u]):u}),G=H}),Or?y:m,C=Math.abs(S.label.y-r);if(C>=b.maxY){var M=S.label.x-e-S.len2*i,A=n+S.len,D=Math.abs(M)t.unconstrainedWidth?null:h:null;n.setStyle("width",v)}CG(a,n)}}}function CG(t,e){WE.rect=t,Xj(WE,e,cie)}var cie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},WE={};function V1(t){return t.position==="center"}function fie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*lie,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function v(M){M.ignore=!0}function p(M){if(!M.ignore)return!0;for(var A in M.states)if(M.states[A].ignore===!1)return!0;return!1}e.each(function(M){var A=e.getItemGraphicEl(M),D=A.shape,E=A.getTextContent(),k=A.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),F=z.get("distanceToLabelLine"),G=z.get("alignTo"),j=oe(z.get("edgeDistance"),u),U=z.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var V=I.getModel("labelLine"),W=V.get("length");W=oe(W,u);var H=V.get("length2");if(H=oe(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":K>0?"left":"right"}var rt=Math.PI,ut=0,kt=z.get("rotate");if(qe(kt))ut=kt*(rt/180);else if(O==="center")ut=0;else if(kt==="radial"||kt===!0){var gr=K<0?-X+rt:-X;ut=gr}else if(kt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=rt*2+zr);var zi=ne>0;zi&&(zr=rt+zr),ut=zr-rt}if(a=!!ut,E.x=ie,E.y=ue,E.rotation=ut,E.setStyle({verticalAlign:"middle"}),xe){E.setStyle({align:Ge});var du=E.states.select;du&&(du.x+=E.x,du.y+=E.y)}else{var Bi=new Ce(0,0,0,0);CG(Bi,E),r.push({label:E,labelLine:k,position:O,len:W,len2:H,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:de,textAlign:Ge,labelDistance:F,labelAlignTo:G,edgeDistance:j,bleedMargin:U,rect:Bi,unconstrainedWidth:Bi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&uie(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(lt);function Df(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Mf(n,e).dimensions,a=new Zr(i,t);return a.initData(n,r),a}var kf=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),die=je(),MG=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new kf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Df(this,{coordDimensions:["value"],encodeDefaulter:Ie(oM,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=die(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=N4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Wl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);sQ({fullType:MG.type,getCoord2:function(t){return t.getShallow("center")}});function pie(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function gie(t){t.registerChartView(vie),t.registerSeriesModel(MG),FF("pie",t.registerAction),t.registerLayout(Ie(sie,"pie")),t.registerProcessor(Pf("pie")),t.registerProcessor(pie("pie"))}var mie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:q.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),LG=4,yie=function(){function t(){}return t}(),_ie=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new yie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Sie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Wd("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new xie:new Gd,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(lt),AG={left:0,right:0,top:0,bottom:0},Fy=["25%","25%"],wie=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=su(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&_a(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&_a(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:AG,outerBoundsContain:"all",outerBoundsClampWidth:Fy[0],outerBoundsClampHeight:Fy[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(Fe),lT=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},e.type="cartesian2dAxis",e}(Fe);Bt(lT,Af);var PG={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:q.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:q.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[q.color.backgroundTint,q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:q.color.neutral00,borderColor:q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},bie=Ne({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},PG),FM=Ne({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:q.color.axisMinorSplitLine,width:1}}},PG),Tie=Ne({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},FM),Cie=Se({logBase:10},FM);const DG={category:bie,value:FM,time:Tie,log:Cie};var Mie={value:1,category:1,time:1,log:1},uT=null;function Lie(t){uT||(uT=t)}function Ud(){return uT}function tf(t,e,r,n){R(Mie,function(i,a){var o=Ne(Ne({},DG[a],!0),n,!0),s=function(l){$(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Jv(this),v=h?su(c):{},p=f.getTheme();Ne(c,p.get(a+"Axis")),Ne(c,this.getDefaultOption()),c.type=UE(c),h&&_a(c,v,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=ad.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=Ud();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",UE)}function UE(t){return t.type||(t.data?"category":"value")}var Aie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),tt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),cT=["x","y"];function ZE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Pie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=cT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!ZE(r)||!ZE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,v=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,v];this._invTransform=oi([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(Aie),kG=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(fi),n_="expandAxisBreak",IG="collapseAxisBreak",EG="toggleAxisBreak",jM="axisbreakchanged",Die={type:n_,event:jM,update:"update",refineEvent:GM},kie={type:IG,event:jM,update:"update",refineEvent:GM},Iie={type:EG,event:jM,update:"update",refineEvent:GM};function GM(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Eie(t){t.registerAction(Die,e),t.registerAction(kie,e),t.registerAction(Iie,e);function e(r,n){var i=[],a=Dc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(f){var h;i.push(Se((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Wo=Math.PI,Nie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Rie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],rf=je(),NG=je(),RG=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function Oie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=HM(t.axisName)&&Jc(t.nameLocation);R(n,function(p){var g=xa(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?oi(ph,m.transform):Pd(ph),g.transform&&Li(ph,ph,g.transform),Ce.copy(Sg,g.localRect),Sg.applyTransform(ph),s?s.union(Sg):Ce.copy(s=new Ce(0,0,0,0),Sg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var f=i.getExtent(),h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1])-h;s.union(new Ce(h,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ph=hr(),Sg=new Ce(0,0,0,0),OG=function(t,e,r,n,i,a){if(Jc(t.nameLocation)){var o=a.stOccupiedRect;o&&zG(Nre({},o,a.transGroup.transform),n,i)}else BG(a.labelInfoList,a.dirVec,n,i)};function zG(t,e,r){var n=new Te;t_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&tT(e,n)}function BG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Zc(i-Wo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),zie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Bie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],f=[l[1],0],h=c[0]>f[0];u&&(Ot(c,c,u),Ot(f,f,u));var v=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Ud().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},p));Xc(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=uu(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=y[1];R([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-S/2,-b/2,S,b,v.stroke,!0),D=C.r+C.offset,E=h?f:c;A.attr({rotation:C.rotate,x:E[0]+D*Math.cos(t.rotation),y:E[1]-D*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=YE(e,i,s);l&&$E(t,e,r,n,i,a,o,Ni.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=YE(e,i,s);l&&$E(t,e,r,n,i,a,o,Ni.determine);var u=Gie(t,i,a,n);jie(t,e.labelLayoutList,u),Hie(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(HM(u)){var c=t.nameLocation,f=t.nameDirection,h=n.getModel("nameTextStyle"),v=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*v,y.x=-g):c==="end"?(m.x=p[1]+g*v,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+f*v,y.y=f);var _=hr();y.transform(po(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Wo/180);var b,C;Jc(c)?b=tn.innerTextLayout(t.rotation,S??t.rotation,f):(b=Vie(t.rotation,c,S||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(b.rotation)),!isFinite(C)&&(C=null)));var M=h.getFont(),A=n.get("nameTruncate",!0)||{},D=A.ellipsis,E=wr(t.raw.nameTruncateMaxWidth,A.maxWidth,C),k=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:b.rotation,silent:tn.isLabelSilent(n),style:pt(h,{text:u,font:M,overflow:"truncate",width:E,ellipsis:D,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(mo({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=tn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Ae(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=xa({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:Jc(c)?Nie[k]:Rie[k]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var F=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,F)}}}};function $E(t,e,r,n,i,a,o,s){FG(e)||Wie(t,e,i,s,n,o);var l=e.labelLayoutList;Uie(t,n,l,a),Yie(n,t.rotation,l);var u=t.optionHideOverlap;Fie(n,l,u),u&&qj(tt(l,function(c){return c&&!c.label.ignore})),Oie(t,r,n,l)}function Vie(t,e,r,n){var i=w2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Zc(i-Wo/2)?(o=l?"bottom":"top",a="center"):Zc(i-Wo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iWo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Fie(t,e,r){if(Ej(t.axis))return;function n(s,l,u){var c=xa(e[l]),f=xa(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){Hh(c.label);return}if(f.suggestIgnore){Hh(f.label);return}var h=.1;if(!r){var v=[0,0,0,0];c=rT({marginForce:v},c),f=rT({marginForce:v},f)}t_(c,f,null,{touchThreshold:h})&&Hh(s?f.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function jie(t,e,r){t.showMinorTicks||R(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)v=T1(v),p=u[1]-v*o;else{var m=t.getTicks().length-1;m>o&&(v=T1(v));var y=v*o;g=Math.ceil(u[1]/v)*v,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+v*_,g+v*S),n.setInterval.call(t,v),(_||S)&&n.setNiceExtent.call(t,p+v,g-v)}var qE=[[3,1],[0,2]],Qie=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=$e(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],v=o[h],p=v.model,g=v.scale;Xb(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(v):(Kl(g,p),Xb(g)&&(s=v))}c.length&&(s||(s=c.pop(),Kl(s.scale,s.model)),R(c,function(m){jG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){KE(n,"y",o,a)}),R(n.y,function(o){KE(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=sr(e,r),a=this._rect=wt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(hT(o,a),!n){var u=tae(a,s,o,l,r),c=void 0;if(l)vT?(vT(this._axesList,a),hT(o,a)):c=eN(a.clone(),"axisLabel",null,a,o,u,i);else{var f=rae(e,a,i),h=f.outerBoundsRect,v=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;h&&(c=eN(h,v,p,a,o,u,i))}GG(a,o,Ni.determine,null,c,i)}R(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Yl(n,s,!0,!0,r),hT(i,n),l;function u(h){R(i[ke[h]],function(v){if(od(v.model)){var p=a.ensureRecord(v.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!kr(v)&&v>1e-4&&(h/=v),h}}function tae(t,e,r,n,i){var a=new RG(nae);return R(r,function(o){return R(o,function(s){if(od(s.model)){var l=!n;s.axisBuilder=qie(t,e,s.model,i,a,l)}})}),a}function GG(t,e,r,n,i,a){var o=r===Ni.determine;R(e,function(u){return R(u,function(c){od(c.model)&&(Kie(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[ke[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}R(e,function(u,c){return R(u,function(f){od(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function rae(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=wt(t.get("outerBounds",!0)||AG,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[hy(pe(t.get("outerBoundsClampWidth",!0),Fy[0]),e.width),hy(pe(t.get("outerBoundsClampHeight",!0),Fy[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var nae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";OG(t,e,r,n,i,a),Jc(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&BG(s.labelInfoList,s.dirVec,n,i)})};function iae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return aae(r,t,e),r.seriesInvolved&&sae(r,t),r}function aae(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=cd(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",v=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||v)&&R(p.baseAxes,Ie(g,v?"cross":!0,h)),v&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var S=_.model.getModel("axisPointer",i),b=S.get("show");if(!(!b||b==="auto"&&!m&&!dT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?oae(_,f,i,e,m,y):S;var C=S.get("snap"),M=S.get("triggerEmphasis"),A=cd(_.model),D=y||C||_.type==="category",E=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:M,involveSeries:D,snap:C,useHandle:dT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||D;var k=lae(a,_);if(k!=null){var I=o[k]||(o[k]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[k].mapper,E.linkGroup=I}}}})}function oae(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(h){l[h]=ye(o.get(h))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var f=l.lineStyle=o.get("crossStyle");f&&Se(u,f.textStyle)}}return t.model.getModel("axisPointer",new We(l,r,n))}function sae(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(t.coordSysAxesInfo[cd(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function lae(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function uae(t){var e=WM(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=dT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var gae=je();function nN(t,e,r,n){if(t instanceof kG){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?YG(r,o,u,n):mae(t,e,r,n,o,l):r}function YG(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function mae(t,e,r,n,i,a){var o=gae(t);o.items||(o.items=[]);var s=o.items,l=iN(s,e,r,n,i,a,1),u=iN(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?YG(r,i,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function iN(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Ne(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new We(m,null,this.ecModel);return Bt(_,Af.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ne({lineStyle:{color:q.color.neutral20}},gh.axisLine),axisLabel:wg(gh.axisLabel,!1),axisTick:wg(gh.axisTick,!1),splitLine:wg(gh.splitLine,!0),splitArea:wg(gh.splitArea,!0),indicator:[]},e}(Fe),Mae=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new tn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),v=u.get("color"),p=ee(h)?h:[h],g=ee(v)?v:[v],m=[],y=[];function _(G,j,U){var V=U%j.length;return G[V]=G[V]||[],V}if(a==="circle")for(var S=i[0].getTicksCoords(),b=n.cx,C=n.cy,M=0;M3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(sN(this._zr,"globalPan")||mh(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(oo(a.event),a.__ecRoamConsumed=!0,lN(r,n,i,a,o))},e}(ui);function mh(t){return t.__ecRoamConsumed}var Nae=je();function i_(t){var e=Nae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function yh(t,e,r,n){for(var i=i_(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=e6(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var v=i;i=new _e,i.add(v),v.scaleX=v.scaleY=f.scale,v.x=f.x,v.y=f.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new ze({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=G1[s];if(c&&fe(G1,s)){l=c.call(this,e,r);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var v=hN[s];if(v&&fe(hN,s)){var p=v.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new $c({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});jn(r,n),_n(e,n,this._defsUsePending,!1,!1),Bae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){G1={g:function(e,r){var n=new _e;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new ze;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new ba;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Ed;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=pN(n));var a=new Or({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=pN(n));var a=new Tr({shape:{points:i||[]},silent:!0});return jn(r,a),_n(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return jn(r,n),_n(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return jn(r,s),_n(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=gV(n);return jn(r,i),_n(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),hN={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new au(e,r,n,i);return vN(t,a),dN(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new z2(e,r,n);return vN(t,i),dN(t,i),i}};function vN(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function dN(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};JG(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Ur(o),u=l&&l[3];u&&(l[3]*=Ya(s),o=ti(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function jn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function pN(t){for(var e=o_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=o_(o);switch(i=i||hr(),s){case"translate":Ii(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":I0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":po(i,i,-parseFloat(l[0])*H1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*H1);Li(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*H1);Li(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var mN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function JG(t,e,r){var n=t.getAttribute("style");if(n){mN.lastIndex=0;for(var i;(i=mN.exec(n))!=null;){var a=i[1],o=fe(Gy,a)?Gy[a]:null;o&&(e[o]=i[2]);var s=fe(Hy,a)?Hy[a]:null;s&&(r[s]=i[2])}}}function Wae(t,e,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=ve(),n=ve(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(v,p){return p&&(v=p(v)),v&&[v[0]*a.scaleX+a.x,v[1]*a.scaleY+a.y]}function f(v){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var v=o?{normal:{align:"center",verticalAlign:"middle"}}:null;dr(e,ar(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},v);var p=e.getTextContent();if(p&&(t6(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function wN(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Ae(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function bN(t,e,r,n,i){t.data||mo({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function TN(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return bt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&Jq(e,i,r),o}function CN(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=q.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border,areaColor:q.color.background},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{areaColor:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},nameProperty:"name"},e}(ht);function coe(t,e){var r={};return R(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var b=t.getBoxLayoutParams();b.aspect=g,S=wt(b,p),S=qV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function doe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var poe=function(){function t(){this.dimensions=n6}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new mT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=PN,u.resize(o,r)}),e.eachSeries(function(o){Bd({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Dt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new mT(s,s,J({nameMap:P0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=wr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=PN,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,doe(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=ve(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Soe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){boe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=Toe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function woe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function DN(t){return arguments.length?t:Loe}function Wh(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function boe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Toe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=W1(s),a=U1(a),s&&a;){i=W1(i),o=U1(o),i.hierNode.ancestor=t;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(Moe(Coe(s,t,r),t,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!W1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!U1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function W1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function U1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Coe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Moe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function Loe(t,e){return t.parentNode===e.parentNode?1:2}var Aoe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Poe=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Aoe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=oe(n.forkPosition,1),v=[];v[c]=o[c],v[f]=o[f]+(l[f]-o[f])*h,r.moveTo(o[0],o[1]),r.lineTo(v[0],v[1]),r.moveTo(s[0],s[1]),v[c]=s[c],r.lineTo(v[0],v[1]),v[c]=l[c],r.lineTo(v[0],v[1]),r.lineTo(l[0],l[1]);for(var p=1;p_.x,C||(b=b-Math.PI));var A=C?"left":"right",D=s.getModel("label"),E=D.get("rotate"),k=E*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:D.get("position")||A,rotation:E==null?-b:k,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?Hc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Ae(r).focus=O),koe(i,o,c,r,p,v,g,n),r.__edge&&(r.onHoverStateChange=function(F){if(F!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Id||gy(r.__edge,F)}})}function koe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),f=t.getOrient(),h=t.get(["lineStyle","curveness"]),v=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new gf({shape:yT(c,f,h,i,i)})),Qe(g,{shape:yT(c,f,h,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function u6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function QM(t,e){var r=u6(t);return Ee(r,e)>=0}function s_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Foe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new We(i,this,this.ecModel),o=KM.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,v){var p=o.getNodeByDataIndex(v);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=s_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function joe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function Goe(t,e){t.eachSeriesByType("tree",function(r){Hoe(r,e)})}function Hoe(t,e){var r=sr(t,e).refContainer,n=wt(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=DN(function(b,C){return(b.parentNode===C.parentNode?1:2)/b.depth})):(a=n.width,o=n.height,s=DN());var l=t.getData().tree.root,u=l.children[0];if(u){xoe(l),joe(u,Soe,s),l.hierNode.modifier=-u.hierNode.prelim,Sh(u,woe);var c=u,f=u,h=u;Sh(u,function(b){var C=b.getLayout().x;Cf.getLayout().x&&(f=b),b.depth>h.depth&&(h=b)});var v=c===f?1:s(c,f)/2,p=v-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),Sh(u,function(b){y=(b.getLayout().x+p)*g,_=(b.depth-1)*m;var C=Wh(y,_);b.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(f.getLayout().x+v+p),g=a/(h.depth-1||1),Sh(u,function(b){_=(b.getLayout().x+p)*m,y=S==="LR"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(f.getLayout().x+v+p),m=o/(h.depth-1||1),Sh(u,function(b){y=(b.getLayout().x+p)*g,_=S==="TB"?(b.depth-1)*m:o-(b.depth-1)*m,b.setLayout({x:y,y:_},!0)}))}}}function Woe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function Uoe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=a_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Zoe(t){t.registerChartView(Doe),t.registerSeriesModel(Foe),t.registerLayout(Goe),t.registerVisual(Woe),Uoe(t)}var RN=["treemapZoomToNode","treemapRender","treemapMove"];function $oe(t){for(var e=0;e1;)a=a.parentNode;var o=Rb(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Yoe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};f6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=Xoe(a,n);var l=re(a||[],function(f){return new We(f,s,n)},this),u=KM.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,v){var p=u.getNodeByDataIndex(v),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=s_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=ve(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){c6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:q.size.l,top:q.size.xxxl,right:q.size.l,bottom:q.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:q.size.m,emptyItemWidth:25,itemStyle:{color:q.color.backgroundShade,textStyle:{color:q.color.secondary}},emphasis:{itemStyle:{color:q.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:q.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function f6(t){var e=0;R(t.children,function(n){f6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function Xoe(t,e){var r=gt(e.get("color")),n=gt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;R(t,function(s){var l=new We(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var qoe=8,ON=8,Z1=5,Koe=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f=sr(e,r).refContainer,h={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},v={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=wt(h,f);this._prepare(n,v,u),this._renderContent(e,v,p,s,l,u,c,i),Y0(o,h,f)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+qoe*2,r.emptyItemWidth);r.totalWidth+=s+ON,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=r.totalWidth,v=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=v.length-1;g>=0;g--){var m=v[g],y=m.node,_=m.width,S=m.text;h>n.width&&(h-=_-c,_=c,S=null);var b=new Or({shape:{points:Qoe(u,0,_,f,g===v.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:pt(o,{text:S})}),textConfig:{position:"inside"},z2:df*1e4,onclick:Ie(l,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=pt(s,{text:S}),b.ensureState("emphasis").style=p,bt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),Joe(b,e,y),u+=_+ON}},t.prototype.remove=function(){this.group.removeAll()},t}();function Qoe(t,e,r,n,i,a){var o=[[i?t:t-Z1,e],[t+r,e],[t+r,e+n],[i?t:t-Z1,e+n]];return!a&&o.splice(2,0,[t+r+Z1,e+n/2]),!i&&o.push([t,e+n/2]),o}function Joe(t,e,r){Ae(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&s_(r,e)}}var ese=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iBN||Math.abs(r.dy)>BN)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,v=u.max||1/0;f=Math.max(Math.min(v,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=hr();Ii(m,m,[-n,-i]),I0(m,m,[p,p]),Ii(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&xy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Koe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(QM(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=wh(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(lt);function wh(){return{nodeGroup:[],background:[],content:[]}}function ose(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=t.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var v=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,b=c.upperHeight,C=S&&S.length,M=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),D=h.getModel(["blur","itemStyle"]),E=h.getModel(["select","itemStyle"]),k=M.get("borderRadius")||0,I=ue("nodeGroup",_T);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),Wy(I).nodeWidth=v,Wy(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",zN,u,nse);z&&H(I,z,C&&c.upperLabelHeight);var O=h.getModel("emphasis"),F=O.get("focus"),G=O.get("blurScope"),j=O.get("disabled"),U=F==="ancestor"?o.getAncestorsIndices():F==="descendant"?o.getDescendantIndices():F;if(C)qv(I)&&bl(I,!1),z&&(bl(z,!j),f.setItemGraphicEl(o.dataIndex,z),Tb(z,U,G));else{var V=ue("content",zN,u,ise);V&&X(I,V),z.disableMorphing=!0,z&&qv(z)&&bl(z,!1),bl(I,!j),f.setItemGraphicEl(o.dataIndex,I);var W=h.getShallow("cursor");W&&V.attr("cursor",W),Tb(I,U,G)}return I;function H(xe,ge,De){var he=Ae(ge);if(he.dataIndex=o.dataIndex,he.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:v,height:p,r:k}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),st=Me.stroke,Ye=jN(M);Ye.fill=st;var rt=cl(A);rt.fill=A.get("borderColor");var ut=cl(D);ut.fill=D.get("borderColor");var kt=cl(E);if(kt.fill=E.get("borderColor"),De){var gr=v-2*g;ne(ge,st,Me.opacity,{x:g,y:0,width:gr,height:b})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=rt,ge.ensureState("blur").style=ut,ge.ensureState("select").style=kt,$l(ge)}xe.add(ge)}function X(xe,ge){var De=Ae(ge);De.dataIndex=o.dataIndex,De.seriesIndex=t.seriesIndex;var he=Math.max(v-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:he,height:Me,r:k}),m)K(ge);else{ge.invisible=!1;var st=o.getVisual("style"),Ye=st.fill,rt=jN(M);rt.fill=Ye,rt.decal=st.decal;var ut=cl(A),kt=cl(D),gr=cl(E);ne(ge,Ye,st.opacity,null),ge.setStyle(rt),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=kt,ge.ensureState("select").style=gr,$l(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,De,he){var Me=h.getModel(he?FN:VN),st=rr(h.get("name"),null),Ye=Me.getShallow("show");dr(xe,ar(h,he?FN:VN),{defaultText:Ye?st:null,inheritColor:ge,defaultOpacity:De,labelFetcher:t,labelDataIndex:o.dataIndex});var rt=xe.getTextContent();if(rt){var ut=rt.style,kt=Ld(ut.padding||0);he&&(xe.setTextConfig({layoutRect:he}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var zr=Math.max((he?he.width:xe.shape.width)-kt[1]-kt[3],0),zi=Math.max((he?he.height:xe.shape.height)-kt[0]-kt[2],0);(ut.width!==zr||ut.height!==zi)&&rt.setStyle({width:zr,height:zi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,he,c);var gr=rt.getState("emphasis");ie(gr?gr.style:null,he,c)}}function ie(xe,ge,De){var he=xe?xe.text:null;if(!ge&&De.isLeafRoot&&he!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+he:he}}function ue(xe,ge,De,he){var Me=_!=null&&r[xe][_],st=i[xe];return Me?(r[xe][_]=null,de(st,Me)):m||(Me=new ge,Me instanceof si&&(Me.z2=sse(De,he)),Ge(st,Me)),e[xe][y]=Me}function de(xe,ge){var De=xe[y]={};ge instanceof _T?(De.oldX=ge.x,De.oldY=ge.y):De.oldShape=J({},ge.shape)}function Ge(xe,ge){var De=xe[y]={},he=o.parentNode,Me=ge instanceof _e;if(he&&(!n||n.direction==="drillDown")){var st=0,Ye=0,rt=i.background[he.getRawIndex()];!n&&rt&&rt.oldShape&&(st=rt.oldShape.width,Ye=rt.oldShape.height),Me?(De.oldX=0,De.oldY=Ye):De.oldShape={x:st,y:Ye,width:0,height:0}}De.fadein=!Me}}function sse(t,e){return t*rse+e}var hd=R,lse=we,Uy=-1,vr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=fse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?($1(i),use(i)):r==="category"?i.categories?cse(i):$1(i,!0):(Nr(r!=="linear"||i.dataExtent),$1(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return $e(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){we(e)?R(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:we(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&hd(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(lse(e)){var r=[];hd(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function $1(t,e){var r=t.visual,n=[];we(r)?hd(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),h6(t,n)}function Tg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:xT([0,1])}}function GN(t){var e=this.option.visual;return e[Math.round(it(t,[0,1],[0,e.length-1],!0))]||{}}function bh(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Uh(t){var e=this.option.visual;return e[this.option.loop&&t!==Uy?t%e.length:t]}function fl(){return this.option.visual[0]}function xT(t){return{linear:function(e){return it(e,t,this.option.visual,!0)},category:Uh,piecewise:function(e,r){var n=ST.call(this,r);return n==null&&(n=it(e,t,this.option.visual,!0)),n},fixed:fl}}function ST(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=vr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function h6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Ur(r);return n||[0,0,0,1]})),e}var fse={linear:function(t){return it(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=vr.findPieceIndex(t,e,!0);if(r!=null)return it(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Uy},fixed:Rt};function Cg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=mse(i,l,g,m,p,n);d6(g,y,r,n)}})}}}function dse(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function HN(t){var e=Y1(t,"color");if(e){var r=Y1(t,"colorAlpha"),n=Y1(t,"colorSaturation");return n&&(e=Xa(e,null,null,n)),r&&(e=Uv(e,r)),e}}function pse(t,e){return e!=null?Xa(e,null,null,t):null}function Y1(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function gse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=X1(e,"color")||i.color!=null&&i.color!=="none"&&(X1(e,"colorAlpha")||X1(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new vr(f);return v6(h).drColorMappingBy=c,h}}}function X1(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function mse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&v6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var vd=Math.max,Zy=Math.min,WN=wr,JM=R,p6=["itemStyle","borderWidth"],yse=["itemStyle","gapWidth"],_se=["upperLabel","show"],xse=["upperLabel","height"];const Sse={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=sr(t,r).refContainer,o=wt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(WN(o.width,s[0]),a.width),u=oe(WN(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=fd(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=u6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Lse(t,h,p,l,u):v?[v.width,v.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),g6(p,_,!1,0),S=p.getLayout(),JM(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var b=t.getData().tree.root;b.setLayout(Ase(o,v,h),!0),t.setLayoutInfo(o),m6(b,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function g6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(p6),u=s.get(yse)/2,c=y6(s),f=Math.max(l,c),h=l-u,v=f-u;t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=vd(i-2*h,0),a=vd(a-h-v,0);var p=i*a,g=wse(t,s,p,e,r,n);if(g.length){var m={x:h,y:v,width:i,height:a},y=Zy(i,a),_=1/0,S=[];S.area=0;for(var b=0,C=g.length;b=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Mse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?vd(u*n/l,l/(u*i)):1/0}function UN(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var f=0,h=t.length;fvb&&(u=vb),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(C[0]=-C[0],C[1]=-C[1]);var A=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*_+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+E,p=b[0]<0?"right":"left",a.originX=-y*A,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=M[0],a.y=M[1]+E,p="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+f[0],a.y=f[1]+E,p=b[0]>=0?"right":"left",a.originX=y*A,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),iL=function(){function t(e){this.group=new _e,this._LineCtor=e||nL}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=KN(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=KN(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!Use(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function KN(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function QN(t){return isNaN(t[0])||isNaN(t[1])}function eS(t){return t&&!QN(t[0])&&!QN(t[1])}var tS=[],rS=[],nS=[],Gu=Sr,iS=rs,JN=Math.abs;function eR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){tS[0]=Gu(n[0],i[0],a[0],c),tS[1]=Gu(n[1],i[1],a[1],c);var f=JN(iS(tS,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function aS(t,e){var r=[],n=Hv,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ha(u[0]),ha(u[1])],u[2]&&u.__original.push(ha(u[2])));var h=u.__original;if(u[2]!=null){if(jr(i[0],h[0]),jr(i[1],h[2]),jr(i[2],h[1]),c&&c!=="none"){var v=$h(s.node1),p=eR(i,h[0],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=$h(s.node2),p=eR(i,h[1],v*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}jr(u[0],i[0]),jr(u[1],i[2]),jr(u[2],i[1])}else{if(jr(a[0],h[0]),jr(a[1],h[1]),Fo(o,a[1],a[0]),iu(o,o),c&&c!=="none"){var v=$h(s.node1);ey(a[0],a[0],o,v*e)}if(f&&f!=="none"){var v=$h(s.node2);ey(a[1],a[1],o,-v*e)}jr(u[0],a[0]),jr(u[1],a[1])}})}var C6=je();function Zse(t){if(t)return C6(t).bridge}function tR(t,e){t&&(C6(t).bridge=e)}function rR(t){return t.type==="view"}var $se=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Gd,a=new iL,o=this.group,s=new _e;this._controller=new fu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(rR(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Qe(this._mainGroup,f,r)}aS(r.getGraph(),Zh(r));var h=r.getData();u.updateData(h);var v=r.getEdgeData();c.updateData(v),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");h.graph.eachNode(function(b){var C=b.dataIndex,M=b.getGraphicEl(),A=b.getModel();if(M){M.off("drag").off("dragend");var D=A.get("draggable");D&&M.on("drag",function(k){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),h.setItemLayout(C,[M.x,M.y]);break;case"circular":h.setItemLayout(C,[M.x,M.y]),b.setLayout({fixed:!0},!0),rL(r,"symbolSize",b,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(C,[M.x,M.y]),tL(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(D,!!A.get("cursor"));var E=A.get(["emphasis","focus"]);E==="adjacency"&&(Ae(M).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var C=b.getGraphicEl(),M=b.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Ae(C).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){w6(b,y,_,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!rR(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(ZM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&($M(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),aS(r.getGraph(),Zh(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Zh(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(aS(r.getGraph(),Zh(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=Zse(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,f=new _e;s.add(f),s.add(c);for(var h=0;h=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof hl||(r=this._nodesMap[Hu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(v.node1))}for(l=0;l=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),M6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=ve(),r=ve();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(f)&&(e.set(f,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function L6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(hl,L6("hostGraph","data"));Bt(M6,L6("hostGraph","edgeData"));function aL(t,e,r,n,i){for(var a=new Yse(n),o=0;o "+h)),u++)}var v=r.get("coordinateSystem"),p;if(v==="cartesian2d"||v==="polar"||v==="matrix")p=Ta(t,r);else{var g=wf.get(v),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Mf(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Zr(y,r),p.initData(t)}var _=new Zr(["value"],r);return _.initData(l,s),i&&i(p,_),s6({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Xse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new kf(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Wl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){Rse(this);var s=aL(a,i,this,!0,l);return R(s.edges,function(u){Ose(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var f=We.prototype.getModel;function h(p,g){var m=f.call(this,p,g);return m.resolveParentPath=v,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=v,p.getModel=h,p});function v(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=DF({series:this,dataIndex:r,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new Zr(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function qse(t){t.registerChartView($se),t.registerSeriesModel(Xse),t.registerProcessor(Dse),t.registerVisual(kse),t.registerVisual(Ise),t.registerLayout(zse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Vse),t.registerLayout(jse),t.registerCoordinateSystem("graphView",{dimensions:hu.dimensions,create:Hse}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Rt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Rt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=a_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var nR=function(t){$(e,t);function e(r,n,i){var a=t.call(this)||this;Ae(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=r.getItemLayout(n),h=J(ua(u.getModel("itemStyle"),f,!0),f),v=this;if(isNaN(h.startAngle)){v.setShape(h);return}a?v.setShape(h):Qe(v,{shape:h},l,n);var p=J(ua(u.getModel("itemStyle"),f,!0),f);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,v),ir(v,u,"itemStyle");var g=c.get("focus");bt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var f=ar(n),h=i.getVisual("style");dr(a,f,{labelFetcher:{getFormattedLabel:function(_,S,b,C,M,A){return r.getFormattedLabel(_,S,"node",C,mn(M,f.normal&&f.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var v=c.get("position")||"outside",p=c.get("distance")||0,g;v==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:v!=="outside"};var m=v!=="outside"?c.get("align")||"center":l>0?"left":"right",y=v!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Rr),Kse=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Ae(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),v=f.getModel("emphasis"),p=v.get("focus"),g=J(ua(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),iR(m,l,r,h)):(li(m),iR(m,l,r,h),Qe(m,{shape:g},s,i)),bt(this,p==="adjacency"?l.getAdjacentDataIndices():p,v.get("blurScope"),v.get("disabled")),ir(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(Ue);function iR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,f=(c.s1[0]+c.s2[0])/2,h=(c.s1[1]+c.s2[1])/2,v=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new au(f,h,v,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var Qse=Math.PI/180,Jse=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*Qse;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new nR(a,c,l);Ae(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),v=a.getItemLayout(c);if(!v){h&&qa(h,r,f);return}h?h.updateData(a,c,l):h=new nR(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&qa(f,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),St(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new Kse(i,a,l,n);Ae(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&qa(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),ele=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new kf(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=aL(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function f(v,p){var g=c.call(this,v,p);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(v){return v.resolveParentPath=h,v.getModel=f,v});function h(v){if(v&&(v[0]==="label"||v[1]==="label")){var p=v.slice();return v[0]==="label"?p[0]="edgeLabel":v[1]==="label"&&(p[1]="edgeLabel"),p}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),oS=Math.PI/180;function tle(t,e){t.eachSeriesByType("chord",function(r){rle(r,e)})}function rle(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=XV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((t.get("padAngle")||0)*oS,0),h=Math.max((t.get("minAngle")||0)*oS,0),v=-t.get("startAngle")*oS,p=v+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[v,p];j0(y,!g);var _=y[0],S=y[1],b=S-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(V){var W=C?1:V.getValue("value");C&&(W>0||h)&&(A+=2);var H=V.node1.dataIndex,X=V.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var D=0;if(n.eachNode(function(V){var W=V.getValue("value");isNaN(W)||(M[V.dataIndex]=Math.max(W,M[V.dataIndex]||0)),!C&&(M[V.dataIndex]>0||h)&&A++,D+=M[V.dataIndex]||0}),!(A===0||D===0)){f*A>=Math.abs(b)&&(f=Math.max(0,(Math.abs(b)-h*A)/A)),(f+h)*A>=Math.abs(b)&&(h=(Math.abs(b)-f*A)/A);var E=(b-f*A*m)/D,k=0,I=0,z=0;n.eachNode(function(V){var W=M[V.dataIndex]||0,H=E*(D?W:1)*m;Math.abs(H)I){var F=k/I;n.eachNode(function(V){var W=V.getLayout().angle;Math.abs(W)>=h?V.setLayout({angle:W*F,ratio:F},!0):V.setLayout({angle:h,ratio:h===0?1:W/h},!0)})}else n.eachNode(function(V){if(!O){var W=V.getLayout().angle,H=Math.min(W/z,1),X=H*k;W-Xh&&h>0){var H=O?1:Math.min(W/z,1),X=W-h,K=Math.min(X,Math.min(G,k*H));G-=K,V.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else h>0&&V.setLayout({angle:h,ratio:W===0?1:h/W},!0)}});var j=_,U=[];n.eachNode(function(V){var W=Math.max(V.getLayout().angle,h);V.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:j,endAngle:j+W*m,clockwise:g},!0),U[V.dataIndex]=j,j+=(W+f)*m}),n.eachEdge(function(V){var W=C?1:V.getValue("value"),H=E*(D?W:1)*m,X=V.node1.dataIndex,K=U[X]||0,ne=Math.abs((V.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],de=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Ge=V.node2.dataIndex,xe=U[Ge]||0,ge=Math.abs((V.node2.getLayout().ratio||1)*H),De=xe+ge*m,he=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(De),l+c*Math.sin(De)];V.setLayout({s1:ue,s2:de,sStartAngle:K,sEndAngle:ie,t1:he,t2:Me,tStartAngle:xe,tEndAngle:De,cx:s,cy:l,r:c,value:W,clockwise:g}),U[X]=ie,U[Ge]=De})}}}function nle(t){t.registerChartView(Jse),t.registerSeriesModel(ele),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,tle),t.registerProcessor(Pf("chord"))}var ile=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),ale=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new ile},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(Ue);function ole(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Lg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var sle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=ole(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,f=r.getModel("axisLine"),h=f.get("roundCap"),v=h?Vy:Rr,p=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];j0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,b=[],C=0;p&&C=E&&(k===0?0:a[k-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-D-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?f.add(new Xe({style:pt(S,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:F<-.4?"left":F>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Xe({style:pt(S,{text:W,x:X,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:K,rotation:ie}))}if(_.get("show")&&j!==b){var U=_.get("distance");U=U?U+c:c;for(var ue=0;ue<=C;ue++){F=Math.cos(D),G=Math.sin(D);var de=new Wt({shape:{x1:F*(p-U)+h,y1:G*(p-U)+v,x2:F*(p-A-U)+h,y2:G*(p-A-U)+v},silent:!0,style:z});z.stroke==="auto"&&de.setStyle({stroke:a((j+ue/C)/b)}),f.add(de),D+=k}D-=k}else D+=E}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,v=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),S=_.mapDimension("value"),b=+r.get("min"),C=+r.get("max"),M=[b,C],A=[s,l];function D(k,I){var z=_.getItemModel(k),O=z.getModel("pointer"),F=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),j=r.get(["pointer","icon"]),U=O.get("offsetCenter"),V=oe(U[0],o.r),W=oe(U[1],o.r),H=O.get("keepAspect"),X;return j?X=Ut(j,V-F/2,W-G,F,G,null,H):X=new ale({shape:{angle:-Math.PI/2,width:F,r:G,x:V,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function E(k,I){var z=m.get("roundCap"),O=z?Vy:Rr,F=m.get("overlap"),G=F?m.get("width"):c/_.count(),j=F?o.r-G:o.r-(k+1)*G,U=F?o.r:o.r-k*G,V=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:j,r:U}});return F&&(V.z2=it(_.get(S,k),[b,C],[100,0],!0)),V}(y||g)&&(_.diff(h).add(function(k){var I=_.get(S,k);if(g){var z=D(k,s);St(z,{rotation:-((isNaN(+I)?A[0]:it(I,M,A,!0))+Math.PI/2)},r),f.add(z),_.setItemGraphicEl(k,z)}if(y){var O=E(k,s),F=m.get("clip");St(O,{shape:{endAngle:it(I,M,A,F)}},r),f.add(O),xb(r.seriesIndex,_.dataType,k,O),p[k]=O}}).update(function(k,I){var z=_.get(S,k);if(g){var O=h.getItemGraphicEl(I),F=O?O.rotation:s,G=D(k,F);G.rotation=F,Qe(G,{rotation:-((isNaN(+z)?A[0]:it(z,M,A,!0))+Math.PI/2)},r),f.add(G),_.setItemGraphicEl(k,G)}if(y){var j=v[I],U=j?j.shape.endAngle:s,V=E(k,U),W=m.get("clip");Qe(V,{shape:{endAngle:it(z,M,A,W)}},r),f.add(V),xb(r.seriesIndex,_.dataType,k,V),p[k]=V}}).execute(),_.each(function(k){var I=_.getItemModel(k),z=I.getModel("emphasis"),O=z.get("focus"),F=z.get("blurScope"),G=z.get("disabled");if(g){var j=_.getItemGraphicEl(k),U=_.getItemVisual(k,"style"),V=U.fill;if(j instanceof pr){var W=j.style;j.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},U))}else j.useStyle(U),j.type!=="pointer"&&j.setColor(V);j.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),j.style.fill==="auto"&&j.setStyle("fill",a(it(_.get(S,k),M,[0,1],!0))),j.z2EmphasisLift=0,ir(j,I),bt(j,O,F,G)}if(y){var H=p[k];H.useStyle(_.getItemVisual(k,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),bt(H,O,F,G)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),f=+r.get("max"),h=new _e,v=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){v[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),S=l.get(u,y),b=new _e,C=a(it(S,[c,f],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),D=o.cx+oe(A[0],o.r),E=o.cy+oe(A[1],o.r),k=v[y];k.attr({z2:m?0:2,style:pt(M,{x:D,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),b.add(k)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),F=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),j=oe(I.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:C,k=p[y],V=I.get("formatter");k.attr({z2:m?0:2,style:pt(I,{x:O,y:F,text:Lg(S,V),width:isNaN(G)?null:G,height:isNaN(j)?null:j,align:"center",verticalAlign:"middle"},{inheritColor:U})}),kV(k,{normal:I},S,function(H){return Lg(H,V)}),g&&IV(k,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return Lg(ue?ue.interpolatedValue:S,V)}}),b.add(k)}h.add(b)}),this.group.add(h),this._titleEls=v,this._detailEls=p},e.type="gauge",e}(lt),lle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Df(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:q.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:q.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:q.color.neutral00,borderWidth:0,borderColor:q.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:q.color.transparent,borderWidth:0,borderColor:q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:q.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function ule(t){t.registerChartView(sle),t.registerSeriesModel(lle)}var cle=["itemStyle","opacity"],fle=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new Tr,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(cle);c=c??1,i||li(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,St(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),bt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,f=r.getItemVisual(n,"style"),h=f.fill;dr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var v=l.getModel("label"),p=v.get("color"),g=p==="inherit"?h:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),IM(i,EM(l),{stroke:h})},e}(Or),hle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new fle(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);qa(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(lt),vle=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new kf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Df(this,{coordDimensions:["value"],encodeDefaulter:Ie(oM,this)})},e.prototype._defaultLabelLine=function(r){Wl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function dle(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();oDle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!lS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function lS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var Ele=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Ne(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=tt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Fe),Nle=function(t){$(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(fi);function ms(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Wu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Wu(s,[0,o]),i=a=Wu(s,[i,a]),n=0}e[0]=Wu(e[0],r),e[1]=Wu(e[1],r);var l=uS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Wu(e[n],c);var f;return f=uS(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function uS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Wu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var cS=R,P6=Math.min,D6=Math.max,sR=Math.floor,Rle=Math.ceil,lR=Ht,Ole=Math.PI,zle=function(){function t(e,r,n){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;cS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Nle(o,Fd(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();cS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Kl(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=wt(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Ag(e.get("axisExpandWidth"),l),f=Ag(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,v=e.get("axisExpandWindow"),p;if(v)p=Ag(v[1]-v[0],l),v[1]=v[0]+p;else{p=Ag(c*(f-1),l);var g=e.get("axisExpandCenter")||sR(u/2);v=[c*g-p/2],v[1]=v[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var y=[sR(lR(v[0]/c,1))+1,Rle(lR(v[1]/c,1))-1],_=m/c*v[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:v,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),cS(n,function(o,s){var l=(i.axisExpandable?Vle:Ble)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Ole/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],v=hr();po(v,v,h),Ii(v,v,f),this._axesLayout[o]={position:f,rotation:h,transform:v,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ms(l,i,o,"all"):u="none";else{var v=i[1]-i[0],p=o[1]*s/v;i=[D6(0,p-v/2)],i[1]=P6(o[1],i[0]+v),i[0]=i[1]-v}return{axisExpandWindow:i,behavior:u}},t}();function Ag(t,e){return P6(D6(t,e[0]),e[1])}function Ble(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Vle(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)Ln(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aWle}function O6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function z6(t,e,r,n){var i=new _e;return i.add(new ze({name:"main",style:cL(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(fR,t,e,i,["n","s","w","e"]),ondragend:Ie(Jl,e,{isEnd:!0})})),R(n,function(a){i.add(new ze({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(fR,t,e,i,a),ondragend:Ie(Jl,e,{isEnd:!0})}))}),i}function B6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=nf(i,Ule),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,v=f-a+i/2,p=c-o,g=f-s,m=p+i,y=g+i;Ea(t,e,"main",o,s,p,g),n.transformable&&(Ea(t,e,"w",l,u,a,y),Ea(t,e,"e",h,u,a,y),Ea(t,e,"n",l,u,m,a),Ea(t,e,"s",l,v,m,a),Ea(t,e,"nw",l,u,a,a),Ea(t,e,"ne",h,u,a,a),Ea(t,e,"sw",l,v,a,a),Ea(t,e,"se",h,v,a,a))}function LT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(cL(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?AT(t,a[0]):Kle(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?$le[s]+"-resize":null})})}function Ea(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(Jle(fL(t,e,[[n,i],[n+a,i+o]])))}function cL(t){return Se({strokeNoScale:!0},t.brushStyle)}function V6(t,e,r,n){var i=[pd(t,r),pd(e,n)],a=[nf(t,r),nf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function qle(t){return os(t.group)}function AT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=U0(r[e],qle(t));return n[i]}function Kle(t,e){var r=[AT(t,e[0]),AT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function fR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=F6(e,i,a);R(n,function(u){var c=Zle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(V6(s[0][0],s[1][0],s[0][1],s[1][1])),sL(e,r),Jl(e,{isEnd:!1})}function Qle(t,e,r,n){var i=e.__brushOption.range,a=F6(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),sL(t,e),Jl(t,{isEnd:!1})}function F6(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function fL(t,e,r){var n=R6(t,e);return n&&n!==Ql?n.clipPath(r,t._transform):ye(r)}function Jle(t){var e=pd(t[0][0],t[1][0]),r=pd(t[0][1],t[1][1]),n=nf(t[0][0],t[1][0]),i=nf(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function eue(t,e,r){if(!(!t._brushType||rue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=uL(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var u_={lineX:dR(0),lineY:dR(1),rect:{createCover:function(t,e){function r(n){return n}return z6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=O6(t);return V6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){B6(t,e,r,n)},updateCommon:LT,contain:DT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:cL(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Or({name:"main",draggable:!0,drift:Ie(Qle,t,e),ondragend:Ie(Jl,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:fL(t,e,r)})},updateCommon:LT,contain:DT}};function dR(t){return{createCover:function(e,r){return z6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=O6(e),n=pd(r[0][t],r[1][t]),i=nf(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=R6(e,r);if(o!==Ql&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),B6(e,r,l,i)},updateCommon:LT,contain:DT}}function G6(t){return t=hL(t),function(e){return j2(e,t)}}function H6(t,e){return t=hL(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function W6(t,e,r){var n=hL(t);return function(i,a){return n.contain(a[0],a[1])&&!XG(i,e,r)}}function hL(t){return Ce.create(t)}var nue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new oL(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!iue(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=oue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),v=J({strokeContainThreshold:c},h),p=new tn(r,i,v);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(v,u,r,s,c,i),Od(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:G6(f),isTargetByCursor:W6(f,s,a),getLinearBrushOtherExtent:H6(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(aue(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(mt);function iue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function aue(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function oue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var sue={type:"axisAreaSelect",event:"axisAreaSelected"};function lue(t){t.registerAction(sue,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var uue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function U6(t){t.registerComponentView(kle),t.registerComponentModel(Ele),t.registerCoordinateSystem("parallel",jle),t.registerPreprocessor(Lle),t.registerComponentModel(CT),t.registerComponentView(nue),tf(t,"parallel",CT,uue),lue(t)}function cue(t){Oe(U6),t.registerChartView(_le),t.registerSeriesModel(wle),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Mle)}var fue=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),hue=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new fue},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){so(this)},e.prototype.downplay=function(){lo(this)},e}(Ue),vue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new fu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,f=r.getData(),h=r.getData("edge"),v=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),qG(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new hue,m=Ae(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),b=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),D=p.node2.getLayout(),E=p.node2.getModel(),k=E.get("localX"),I=E.get("localY"),z=p.getLayout(),O,F,G,j,U,V,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=v,v==="vertical"?(O=(M!=null?M*u:b.x)+z.sy,F=(A!=null?A*c:b.y)+b.dy,G=(k!=null?k*u:D.x)+z.ty,j=I!=null?I*c:D.y,U=O,V=F*(1-S)+j*S,W=G,H=F*S+j*(1-S)):(O=(M!=null?M*u:b.x)+b.dx,F=(A!=null?A*c:b.y)+z.sy,G=k!=null?k*u:D.x,j=(I!=null?I*c:D.y)+z.ty,U=O*(1-S)+G*S,V=F,W=O*S+G*(1-S),H=j),g.setShape({x1:O,y1:F,x2:G,y2:j,cpx1:U,cpy1:V,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),pR(g.style,v,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");dr(g,K,{labelFetcher:{getFormattedLabel:function(ue,de,Ge,xe,ge,De){return r.getFormattedLabel(ue,de,"edge",xe,mn(ge,K.normal&&K.normal.get("formatter"),X),De)}},labelDataIndex:p.dataIndex,defaultText:X}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var de=ue.getItemStyle();return pR(de,v,p),de}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");bt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),S=m.getModel("emphasis"),b=m.get(["itemStyle","borderRadius"])||0,C=new ze({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:b},style:m.getModel("itemStyle").getItemStyle(),z2:10});dr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,D){return r.getFormattedLabel(A,D,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),C.disableLabelAnimation=!0,C.setStyle("fill",p.getVisual("color")),C.setStyle("decal",p.getVisual("style").decal),ir(C,m),s.add(C),f.setItemGraphicEl(p.dataIndex,C),Ae(C).dataType="node";var M=S.get("focus");bt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,S.get("blurScope"),S.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var m=f.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(due(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new hu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(lt);function pR(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new au(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function due(t,e,r){var n=new ze({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{width:t.width+20}},e,r),n}var pue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new We(o[l],this,n));var u=aL(a,i,this,!0,c);return u.data;function c(f,h){f.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(v.parentModel=_)}return v}),h.wrapMethod("getItemModel",function(v,p){var g=v.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,S=g.levelModels[_];S&&(v.parentModel=S)}return v})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(v){return isNaN(v)||v==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:q.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function gue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,e).refContainer,o=wt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;yue(c);var h=tt(c,function(m){return m.getLayout().value===0}),v=h.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");mue(c,f,n,i,s,l,v,p,g)})}function mue(t,e,r,n,i,a,o,s,l){_ue(t,e,r,i,a,s,l),bue(t,e,a,i,n,o,s),Iue(t,s)}function yue(t){R(t,function(e){var r=us(e.outEdges,$y),n=us(e.inEdges,$y),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function _ue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>v&&(v=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_f-1?v:f-1;o&&o!=="left"&&xue(t,o,a,A);var D=a==="vertical"?(i-r)/A:(n-r)/A;wue(t,D,a)}function Z6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function xue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Mue(s,l,o),fS(s,i,r,n,o),kue(s,l,o),fS(s,i,r,n,o)}function Tue(t,e){var r=[],n=e==="vertical"?"y":"x",i=pb(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function Cue(t,e,r,n,i,a){var o=1/0;R(t,function(s){var l=s.length,u=0;R(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function Mue(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=us(i.outEdges,Lue,r)/us(i.outEdges,$y);if(isNaN(a)){var o=i.outEdges.length;a=o?us(i.outEdges,Aue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-ys(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-ys(i,r))*e;i.setLayout({y:l},!0)}}})})}function Lue(t,e){return ys(t.node2,e)*t.getValue()}function Aue(t,e){return ys(t.node2,e)}function Pue(t,e){return ys(t.node1,e)*t.getValue()}function Due(t,e){return ys(t.node1,e)}function ys(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function $y(t){return t.getValue()}function us(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),R(n,function(s){var l=new vr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Nue(t){t.registerChartView(vue),t.registerSeriesModel(pue),t.registerLayout(gue),t.registerVisual(Eue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=a_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var $6=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],v=[i,a],p=v[c].get("type"),g=v[1-c].get("type"),m=e.data;if(m&&l){var y=[];R(m,function(b,C){var M;ee(b)?(M=b.slice(),b.unshift(C)):ee(b.value)?(M=J({},b),M.value=M.value.slice(),b.value.unshift(C)):M=b,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:f,type:Dy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Dy(g),dimsDef:_.slice()}];return Df(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(nF,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),Y6=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}},animationDuration:800},e}(ht);Bt(Y6,$6,!0);var Rue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=gR(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(li(f),X6(h,f,a,u)):f=gR(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(lt),Oue=function(){function t(){}return t}(),zue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Oue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var b=[y,S];n.push(b)}}}return{boxData:r,outliers:n}}var Wue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";at(n)}var i=Hue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Uue(t){t.registerSeriesModel(Y6),t.registerChartView(Rue),t.registerLayout(Vue),t.registerTransform(Wue)}var Zue=["itemStyle","borderColor"],$ue=["itemStyle","borderColor0"],Yue=["itemStyle","borderColorDoji"],Xue=["itemStyle","color"],que=["itemStyle","color0"];function vL(t,e){return e.get(t>0?Xue:que)}function dL(t,e){return e.get(t===0?Yue:t>0?Zue:$ue)}var Kue={seriesType:"candlestick",plan:bf(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=vL(s,o),l.stroke=dL(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},Que=["color","borderColor"],Jue=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){Cs(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&mR(u,f))return;var h=hS(f,c,!0);St(h,{shape:{points:f.ends}},r,c),vS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var v=n.getItemLayout(c);if(s&&mR(u,v)){a.remove(h);return}h?(Qe(h,{shape:{points:v.ends}},r,c),li(h)):h=hS(v),vS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),yR(r,this.group);var n=r.get("clip",!0)?Hd(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=hS(s);vS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){yR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(lt),ece=function(){function t(){}return t}(),tce=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ece},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(Ue);function hS(t,e,r){var n=t.ends;return new tce({shape:{points:r?rce(n,t):n},z2:100})}function mR(t,e){for(var r=!0,n=0;nC?I[a]:k[a],ends:F,brushRect:W(M,A,S)})}function U(X,K){var ne=[];return ne[i]=K,ne[a]=X,isNaN(K)||isNaN(X)?[NaN,NaN]:e.dataToPoint(ne)}function V(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=fm(ie[i]+n/2,1,!1),ue[i]=fm(ue[i]-n/2,1,!0),ne?X.push(ie,ue):X.push(ue,ie)}function W(X,K,ne){var ie=U(X,ne),ue=U(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(X){return X[i]=fm(X[i],1),X}}function p(g,m){for(var y=sa(g.count*4),_=0,S,b=[],C=[],M,A=m.getStore(),D=!!t.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var E=A.get(s,M),k=A.get(u,M),I=A.get(c,M),z=A.get(f,M),O=A.get(h,M);if(isNaN(E)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=_R(A,M,k,I,c,D),b[i]=E,b[a]=z,S=e.dataToPoint(b,null,C),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,b[a]=O,S=e.dataToPoint(b,null,C),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function _R(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function oce(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function sce(t){t.registerChartView(Jue),t.registerSeriesModel(q6),t.registerPreprocessor(ice),t.registerVisual(Kue),t.registerLayout(ace)}function xR(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var lce=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=new jd(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;me(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return ja(r.__p1,r.__cp1)+ja(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Sr,c=Jw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var v=r.__t<1?h[0]-f[0]:f[0]-h[0],p=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(p,v)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(K6),vce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),dce=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new vce},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var v=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;r.quadraticCurveTo(v,p,f,h)}else r.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],v=1;v0){var m=(f+p)/2-(h-g)*o,y=(h+g)/2-(p-f)*o;if(Q4(f,h,m,y,p,g,s,r,n))return l}else if(Eo(f,h,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),J6={seriesType:"lines",plan:bf(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=r.get("clip",!0)&&Hd(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=J6.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new pce:new iL(o?a?hce:Q6:a?K6:nL),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(lt),mce=typeof Uint32Array>"u"?Array:Uint32Array,yce=typeof Float64Array>"u"?Array:Float64Array;function SR(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),P0([i,r[0],r[1]])}))}var _ce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],SR(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(SR(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=Hc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Hc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function Pg(t){return t instanceof Array||(t=[t,t]),t}var xce={seriesType:"lines",reset:function(t){var e=Pg(t.get("symbol")),r=Pg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Pg(s.getShallow("symbol",!0)),u=Pg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function Sce(t){t.registerChartView(gce),t.registerSeriesModel(_ce),t.registerLayout(J6),t.registerVisual(xce)}var wce=256,bce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=yn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),v=e.length;f.width=r,f.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*k+D),C[M++]=z[I],C[M++]=z[I+1],C[M++]=z[I+2],C[M++]=z[I+3]*S*256}else M+=4}return h.putImageData(b,0,0),f},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=yn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=q.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function Tce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function wR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Mce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):wR(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(wR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Cs(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=gs(s,"cartesian2d"),u=gs(s,"matrix"),c,f,h,v;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,f=g.getBandWidth()+.5,h=p.scale.getExtent(),v=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),b=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),D=A.get("focus"),E=A.get("blurScope"),k=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zh[1]||jv[1])continue;var U=s.dataToPoint([G,j]);O=new ze({shape:{x:U[0]-c/2,y:U[1]-f/2,width:c,height:f},style:F})}else if(u){var V=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(kr(V.x))continue;O=new ze({z2:1,shape:V,style:F})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),V=W.contentRect||W.rect;if(kr(V.x)||kr(V.y))continue;O=new ze({z2:1,shape:V,style:F})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),b=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),D=X.get("focus"),E=X.get("blurScope"),k=X.get("disabled"),M=ar(H)}O.shape.r=C;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),dr(O,M,{labelFetcher:r,labelDataIndex:z,defaultOpacity:F.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=S,O.ensureState("select").style=b,bt(O,D,E,k),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new bce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),f=r.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),v=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-h,y=g-v,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(A,D,E){var k=r.dataToPoint([A,D]);return k[0]-=h,k[1]-=v,k.push(E),k}),b=i.getExtent(),C=i.type==="visualMap.continuous"?Cce(b,i.option.range):Tce(b,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},C);var M=new pr({style:{width:m,height:y,x:h,y:v,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e}(lt),Lce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return Ta(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=wf.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function Ace(t){t.registerChartView(Mce),t.registerSeriesModel(Lce)}var Pce=["itemStyle","borderWidth"],bR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],gS=new ba,Dce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:bR[+c],categoryDim:bR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=CR(o,p),m=TR(o,p,g,h),y=MR(o,h,m);o.setItemGraphicEl(p,y),a.add(y),AR(y,h,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=CR(o,p),_=TR(o,p,y,h),S=aH(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?zce(m,h,_):m=MR(o,h,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),AR(m,h,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&LR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var v=r.get("clip",!0)?Hd(r.coordinateSystem,!1,r):null;return v?a.setClipPath(v):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){LR(a,Ae(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function TR(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,f=r.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};kce(r,a,i,n,h),Ice(t,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),Ece(r,h.symbolScale,u,n,h);var v=h.symbolSize,p=uu(r.get("symbolOffset"),v);return Nce(r,v,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function kce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var f=[mS(s,o[0])-l,mS(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function mS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Ice(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize"),p;ee(v)?p=v.slice():v==null?p=["100%","100%"]:p=[v,v],p[f.index]=oe(p[f.index],h),p[c.index]=oe(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Ece(t,e,r,n,i){var a=t.get(Pce)||0;a&&(gS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),gS.updateTransform(),a/=gS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Nce(t,e,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,v=c.valueDim,p=f.pxSign,g=Math.max(e[v.index]+s,0),m=g;if(n){var y=Math.abs(l),_=wr(t.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var b=oe(_,e[v.index]),C=Math.max(g+b*2,0),M=S?0:b*2,A=T2(n),D=A?n:PR((y+M)/C),E=y-D*g;b=E/2/(S?D:Math.max(D-1,1)),C=g+b*2,M=S?0:b*2,!A&&n!=="fixed"&&(D=u?PR((Math.abs(u)+M)/C):0),m=D*C-M,f.repeatTimes=D,f.symbolMargin=b}var k=p*(m/2),I=f.pathPosition=[];I[h.index]=r[h.wh]/2,I[v.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=f.bundlePosition=[];z[h.index]=r[h.xy],z[v.index]=r[v.xy];var O=f.barRectShape=J({},r);O[v.wh]=p*Math.max(Math.abs(r[v.wh]),Math.abs(I[v.index]+k)),O[h.wh]=r[h.wh];var F=f.clipShape={};F[h.xy]=-r[h.xy],F[h.wh]=c.ecSize[h.wh],F[v.xy]=0,F[v.wh]=r[v.wh]}function eH(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function tH(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+r.symbolMargin*2;for(pL(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function rH(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Ec(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=eH(r),i.add(a),Ec(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function nH(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?Ec(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new ze({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function iH(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new ze({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],ou[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function CR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Rce,r.isAnimationEnabled=Oce,r}function Rce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Oce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function MR(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?tH(i,e,r):rH(i,e,r),nH(i,r,n),iH(i,e,r,n),i.__pictorialShapeStr=aH(t,r),i.__pictorialSymbolMeta=r,i}function zce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?tH(t,e,r,!0):rH(t,e,r,!0),nH(t,r,!0),iH(t,e,r,!0)}function LR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];pL(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){ps(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function aH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function pL(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Ec(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&ou[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function AR(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");pL(t,function(g){if(g instanceof pr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,h&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var v=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,dr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:ef(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:v}),bt(t,c,f,a.get("disabled"))}function PR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Bce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Ms(ud.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:q.color.primary}}}),e}(ud);function Vce(t){t.registerChartView(Dce),t.registerSeriesModel(Bce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(Cj,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Mj("pictorialBar"))}var Fce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var v=new uo(this._layersSeries||[],l,h,h),p=[];v.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var b=[],C=[],M,A=l[y].indices,D=0;Da&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function Uce(t){t.registerChartView(Fce),t.registerSeriesModel(Gce),t.registerLayout(Hce),t.registerProcessor(Pf("themeRiver"))}var Zce=2,$ce=4,kR=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Zce,o.textConfig={inside:!0},Ae(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:$ce,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Ae(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=J({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var v=n.getVisual("decal");v&&(h.decal=Kc(v,o));var p=ua(l.getModel("itemStyle"),f,!0);J(f,p),R(nn,function(_){var S=s.ensureState(_),b=l.getModel([_,"itemStyle"]);S.style=b.getItemStyle();var C=ua(b,f);C&&(S.shape=C)}),r?(s.setShape(f),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:f},i),li(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?Hc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;bt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),v=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)F&&!Zc(j-F)&&j0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new kR(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";xy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:kT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(lt),Kce=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};oH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=KM.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=s_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){c6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function oH(t){var e=0;R(t.children,function(n){oH(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var ER=Math.PI/180;function Qce(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),f=oe(a[0],l/2),h=oe(a[1],l/2),v=-n.get("startAngle")*ER,p=n.get("minAngle")*ER,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&sH(m,_);var S=0;R(m.children,function(j){!isNaN(j.getValue())&&S++});var b=m.getValue(),C=Math.PI/(b||S)*2,M=m.depth>0,A=m.height-(M?-1:1),D=(h-f)/(A||1),E=n.get("clockwise"),k=n.get("stillShowZeroSum"),I=E?1:-1,z=function(j,U){if(j){var V=U;if(j!==g){var W=j.getValue(),H=b===0&&k?C:W*C;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=oy(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function tfe(t){t.registerChartView(qce),t.registerSeriesModel(Kce),t.registerLayout(Ie(Qce,"sunburst")),t.registerProcessor(Ie(Pf,"sunburst")),t.registerVisual(efe),Xce(t)}var NR={color:"fill",borderColor:"stroke"},rfe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ka=je(),nfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return Ta(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=Ka(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function ife(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function afe(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(ife,t)}}}function ofe(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function sfe(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(ofe,t)}}}function lfe(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function ufe(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(lfe,t)}}}function cfe(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function ffe(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(cfe,t)}}}function hfe(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function vfe(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function lH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||fe(t,"text")))}function uH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return RR(o,t),R(o.rich,function(l){RR(l,l)}),{textConfig:i,textContent:a}}function RR(t,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(t.align=e.textAlign),fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(t.width=e.textWidth),fe(e,"textHeight")&&(t.height=e.textHeight),fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(t.padding=e.textPadding),fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function OR(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||q.color.neutral99;zR(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||q.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||q.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,R(e.rich,function(s){zR(s,s)}),n}function zR(t,e){e&&(fe(e,"fill")&&(t.textFill=e.fill),fe(e,"stroke")&&(t.textStroke=e.fill),fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fe(e,"font")&&(t.font=e.font),fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fe(e,"fontSize")&&(t.fontSize=e.fontSize),fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fe(e,"align")&&(t.textAlign=e.align),fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fe(e,"width")&&(t.textWidth=e.width),fe(e,"height")&&(t.textHeight=e.height),fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(t.textPadding=e.padding),fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var cH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},BR=$e(cH);ai(ga,function(t,e){return t[e]=1,t},{});ga.join(", ");var Yy=["","style","shape","extra"],af=je();function gL(t,e,r,n,i){var a=t+"Animation",o=mf(t,n,i)||{},s=af(e).userDuring;return o.duration>0&&(o.during=s?le(yfe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function _m(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=af(t),u=e.style;l.userDuring=e.during;var c={},f={};if(xfe(t,e,f),t.type==="compound")for(var h=t.shape.paths,v=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else pfe(t,e,i||0,r,c);fH(t,e),u?t.dirty():t.markRedraw()}function fH(t,e){for(var r=af(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function gfe(t,e){fe(e,"silent")&&(t.silent=e.silent),fe(e,"ignore")&&(t.ignore=e.ignore),t instanceof si&&fe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&fe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Ki={},mfe={setTransform:function(t,e){return Ki.el[t]=e,this},getTransform:function(t){return Ki.el[t]},setShape:function(t,e){var r=Ki.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Ki.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Ki.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Ki.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Ki.el.extra||(Ki.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Ki.el.extra;if(e)return e[t]}};function yfe(){var t=this,e=t.el;if(e){var r=af(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Ki.el=e,n(mfe)}}function VR(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Ol(l))J(o,a);else for(var u=gt(l),c=0;c=0){!o&&(o=n[t]={});for(var v=$e(a),c=0;c=0)){var h=t.getAnimationStyleProps(),v=h?h.style:null;if(v){!a&&(a=n.style={});for(var p=$e(r),u=0;u=0?e.getStore().get(V,j):void 0}var W=e.get(U.name,j),H=U&&U.ordinalMeta;return H?H.categories[W]:W}function A(G,j){j==null&&(j=c);var U=e.getItemVisual(j,"style"),V=U&&U.fill,W=U&&U.opacity,H=S(j,Uo).getItemStyle();V!=null&&(H.fill=V),W!=null&&(H.opacity=W);var X={inheritColor:se(V)?V:q.color.neutral99},K=b(j,Uo),ne=pt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(j,Uo),ef(e,j)):null;var ie=my(K,X,!1);return k(G,H),H=OR(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function D(G,j){j==null&&(j=c);var U=S(j,Qa).getItemStyle(),V=b(j,Qa),W=pt(V,null,null,!0,!0);W.text=V.getShallow("show")?mn(t.getFormattedLabel(j,Qa),t.getFormattedLabel(j,Uo),ef(e,j)):null;var H=my(V,null,!0);return k(G,U),U=OR(U,W,H),G&&E(U,G),U.legacy=!0,U}function E(G,j){for(var U in j)fe(j,U)&&(G[U]=j[U])}function k(G,j){G&&(G.textFill&&(j.textFill=G.textFill),G.textPosition&&(j.textPosition=G.textPosition))}function I(G,j){if(j==null&&(j=c),fe(NR,G)){var U=e.getItemVisual(j,"style");return U?U[NR[G]]:null}if(fe(rfe,G))return e.getItemVisual(j,G)}function z(G){if(o.type==="cartesian2d"){var j=o.getBaseAxis();return Mte(Se({axis:j},G))}}function O(){return r.getCurrentSeriesIndices()}function F(G){return W2(G,r)}}function kfe(t){var e={};return R(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function wS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=SL(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&bt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function SL(t,e,r,n,i,a){var o=-1,s=e;e&&pH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=_L(n),s&&Lfe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Gn.normal.cfg=Gn.normal.conOpt=Gn.emphasis.cfg=Gn.emphasis.conOpt=Gn.blur.cfg=Gn.blur.conOpt=Gn.select.cfg=Gn.select.conOpt=null,Gn.isLegacy=!1,Efe(u,r,n,i,l,Gn),Ife(u,r,n,i,l),xL(t,u,r,n,Gn,i,l),fe(n,"info")&&(Ka(u).info=n.info);for(var c=0;c<_s.length;c++){var f=_s[c];if(f!==Uo){var h=qy(n,f),v=wL(n,h,f);dH(f,u,h,v,Gn)}}return Pfe(u,n,i),n.type==="group"&&Nfe(t,u,r,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function pH(t,e,r){var n=Ka(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Bfe(a)&&gH(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function Ife(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&pH(o,a,n)&&(o=null),o||(o=_L(a),t.setClipPath(o)),xL(null,o,e,a,null,n,i)}}function Efe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){jR(r,null,a),jR(r,Qa,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=_L(o),t.setTextContent(c)),xL(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h<_s.length;h++){var v=_s[h];if(v!==Uo){var p=a[v].conOpt;dH(v,c,p,wL(o,p,v),null)}}f?c.dirty():c.markRedraw()}}}}function jR(t,e,r){var n=e?qy(t,e):t,i=e?wL(t,n,Qa):t.style,a=t.type,o=n?n.textConfig:null,s=t.textContent,l=s?e?qy(s,e):s:null;if(i&&(r.isLegacy||lH(i,a,!!o,!!l))){r.isLegacy=!0;var u=uH(i,a,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var f=e?r[e]:r.normal;f.cfg=o,f.conOpt=l}function qy(t,e){return e?t?t[e]:null:t}function wL(t,e,r){var n=e&&e.style;return n==null&&r===Qa&&t&&(n=t.styleEmphasis),n}function Nfe(t,e,r,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){Ofe({api:t,oldChildren:e.children()||[],newChildren:a||[],dataIndex:r,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c=c;v--){var p=e.childAt(v);Rfe(e,p,i)}}}function Rfe(t,e,r){e&&c_(e,Ka(t).option,r)}function Ofe(t){new uo(t.oldChildren,t.newChildren,GR,GR,t).add(HR).update(HR).remove(zfe).execute()}function GR(t,e){var r=t&&t.name;return r??Cfe+e}function HR(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;SL(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function zfe(t){var e=this.context,r=e.oldChildren[t];r&&c_(r,Ka(r).option,e.seriesModel)}function gH(t){return t&&(t.pathData||t.d)}function Bfe(t){return t&&(fe(t,"pathData")||fe(t,"d"))}function Vfe(t){t.registerChartView(Afe),t.registerSeriesModel(nfe)}var gl=je(),WR=ye,bS=le,bL=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var h=Ie(UR,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}$R(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=WM(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=gl(e).pointerEl=new ou[a.type](WR(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=gl(e).labelEl=new Xe(WR(r.label));e.add(a),ZR(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=gl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=gl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),ZR(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=yf(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oo(u.event)},onmousedown:bS(this._onHandleDragMove,this,0,0),drift:bS(this._onHandleDragMove,this),ondragend:bS(this._onHandleDragEnd,this)}),n.add(i)),$R(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Tf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){UR(this._axisPointerModel,!r&&this._moveAnimation,this._handle,TS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(TS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(TS(i)),gl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),td(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function UR(t,e,r,n){mH(gl(r).lastProp,n)||(gl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function mH(t,e){if(we(t)&&we(e)){var r=!0;return R(e,function(n,i){r=r&&mH(t[i],n)}),!!r}else return t===e}function ZR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function TS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function $R(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function TL(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function yH(t,e,r,n,i){var a=r.get("value"),o=_H(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Sf(s.get("padding")||0),u=s.getFont(),c=N0(o,u),f=i.position,h=c.width+l[1]+l[3],v=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),Ffe(f,h,v,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:pt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Ffe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function _H(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:ky(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function CL(t,e,r){var n=hr();return po(n,n,r.rotation),Ii(n,n,r.position),Pi([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function xH(t,e,r,n,i,a){var o=tn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),yH(e,n,i,a,{position:CL(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ML(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function SH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function YR(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var jfe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=XR(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=TL(a),v=Gfe[u](s,f,c);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=jy(l.getRect(),i);xH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=jy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=CL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=XR(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,v=[h,h];v[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:v,tooltipOption:p[c]}},e}(bL);function XR(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var Gfe={line:function(t,e,r){var n=ML([e,r[0]],[e,r[1]],qR(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:SH([e-n/2,r[0]],[n,i],qR(t))}}};function qR(t){return t.dim==="x"?0:1}var Hfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:q.color.border,width:1,type:"dashed"},shadowStyle:{color:q.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:q.color.neutral00,padding:[5,7,5,7],backgroundColor:q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:q.color.accent40,throttle:40}},e}(Fe),Ua=je(),Wfe=R;function wH(t,e,r){if(!Ze.node){var n=e.getZr();Ua(n).records||(Ua(n).records={}),Ufe(n,e);var i=Ua(n).records[t]||(Ua(n).records[t]={});i.handler=r}}function Ufe(t,e){if(Ua(t).initialized)return;Ua(t).initialized=!0,r("click",Ie(KR,"click")),r("mousemove",Ie(KR,"mousemove")),r("globalout",$fe);function r(n,i){t.on(n,function(a){var o=Yfe(e);Wfe(Ua(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Zfe(o.pendings,e)})}}function Zfe(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function $fe(t,e,r){t.handler("leave",null,r)}function KR(t,e,r,n){e.handler(t,r,n)}function Yfe(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function NT(t,e){if(!Ze.node){var r=e.getZr(),n=(Ua(r).records||{})[t];n&&(Ua(r).records[t]=null)}}var Xfe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";wH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){NT("axisPointer",n)},e.prototype.dispose=function(r,n){NT("axisPointer",n)},e.type="axisPointer",e}(mt);function bH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Ul(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,v=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[v]=a.get(p,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var QR=je();function qfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){xm(i)&&(i=bH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=xm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||xm(i),h={},v={},p={list:[],map:{}},g={showPointer:Ie(Qfe,v),showTooltip:Ie(Jfe,p)};R(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(b,C){var M=b.axis,A=nhe(u,b);if(!f&&S&&(!u||A)){var D=A&&A.value;D==null&&!l&&(D=M.pointToData(i)),D!=null&&JR(b,D,g,!1,h)}})});var m={};return R(c,function(y,_){var S=y.linkGroup;S&&!v[_]&&R(S.axesInfo,function(b,C){var M=v[C];if(b!==y&&M){var A=M.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,eO(b),eO(y)))),m[y.key]=A}})}),R(m,function(y,_){JR(c[_],y,g,!0,h)}),ehe(v,c,h),the(p,i,t,o),rhe(c,o,r),h}}function JR(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=Kfe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function Kfe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(c,t,r);h=v.dataIndices,f=v.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=t-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),R(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function Qfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function Jfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=cd(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ehe(t,e,r){var n=r.axesInfo=[];R(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function the(t,e,r,n){if(xm(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function rhe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=QR(n)[i]||{},o=QR(n)[i]={};R(t,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&R(f.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function nhe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function eO(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function xm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Zd(t){cu.registerAxisPointerClass("CartesianAxisPointer",jfe),t.registerComponentModel(Hfe),t.registerComponentView(Xfe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=iae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},qfe)}function ihe(t){Oe($G),Oe(Zd)}var ahe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var v=TL(a),p=she[h](s,l,f,c);p.style=v,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=ohe(n,i,a,l,g);yH(r,i,a,o,m)},e}(bL);function ohe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=hr();po(h,h,s),Ii(h,h,[n.cx,n.cy]),u=Pi([o,-i],h);var v=e.getModel("axisLabel").get("rotate")||0,p=tn.innerTextLayout(s,v*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var she={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:ML(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:YR(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:YR(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},lhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Fe),LL=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Dt).models[0]},e.type="polarAxis",e}(Fe);Bt(LL,Af);var uhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(LL),che=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(LL),AL=function(t){$(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(fi);AL.prototype.dataToRadius=fi.prototype.dataToCoord;AL.prototype.radiusToData=fi.prototype.coordToData;var fhe=je(),PL=function(t){$(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=N0(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var v=Math.max(0,Math.floor(h)),p=fhe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-v)<=1&&Math.abs(m-o)<=1&&g>v?v=g:(p.lastTickCount=o,p.lastAutoInterval=v),v},e}(fi);PL.prototype.dataToAngle=fi.prototype.dataToCoord;PL.prototype.angleToData=fi.prototype.coordToData;var TH=["radius","angle"],hhe=function(){function t(e){this.dimensions=TH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new AL,this._angleAxis=new PL,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,h=this.r,v=this.r0;return h!==v&&f-o<=h*h&&f+o>=v*v},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=tO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=tO(r);return i===this?this.pointToData(n):null},t}();function tO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function vhe(t,e,r){var n=e.get("center"),i=sr(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function dhe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(Iy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Iy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Kl(n.scale,n.model),Kl(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function phe(t){return t.mainType==="angleAxis"}function rO(t,e){var r;if(t.type=e.get("type"),t.scale=Fd(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),phe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var ghe={dimensions:TH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new hhe(i+"");a.update=dhe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");rO(o,l),rO(s,u),vhe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Dt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},mhe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Dg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function kg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function nO(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var yhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});nO(u),nO(s),R(mhe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&_he[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(cu),_he={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=kg(r),f=c?0:1,h,v=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new ou[v]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new pf({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[kg(r)],u=re(n,function(c){return new Wt({shape:Dg(r,[l,l+s],c.coord)})});t.add(Tn(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[kg(r)],c=[],f=0;fy?"left":"right",b=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];we(C)&&C.textStyle&&(v=new We(C.textStyle,l,l.ecModel))}var M=new Xe({silent:tn.isLabelSilent(e),style:pt(v,{x:m[0],y:m[1],fill:v.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:S,verticalAlign:b})});if(t.add(M),mo({el:M,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var A=tn.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=f.rawLabel,Ae(M).eventData=A}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",G=E;C&&(n[c][O]||(n[c][O]={p:E,n:E}),G=n[c][O][F]);var j=void 0,U=void 0,V=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-E,X=l.dataToCoord(O);Math.abs(H)=W})}}})}function Che(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=MH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var v=CH(n);h[v]||f.autoWidthCount++,h[v]=h[v]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!h[v].width&&(p=Math.min(f.remainedWidth,p),h[v].width=p,f.remainedWidth-=p),g&&(h[v].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.categoryGap=y)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),R(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=iO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=iO(r);return i===this?this.pointToData(n):null},t}();function iO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Rhe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new Nhe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Dt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Ohe={create:Rhe,dimensions:LH},aO=["x","y"],zhe=["width","height"],Bhe=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=CS(l,1-Ky(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=TL(a),v=Vhe[f](s,c,u);v.style=h,r.graphicKey=v.type,r.pointer=v}var p=RT(i);xH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=RT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=CL(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=Ky(o),u=CS(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=CS(s,1-l),h=(f[1]+f[0])/2,v=[h,h];return v[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(bL),Vhe={line:function(t,e,r){var n=ML([e,r[0]],[e,r[1]],Ky(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:SH([e-n/2,r[0]],[n,i],Ky(t))}}};function Ky(t){return t.isHorizontal()?0:1}function CS(t,e){var r=t.getRect();return[r[aO[e]],r[aO[e]]+r[zhe[e]]]}var Fhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(mt);function jhe(t){Oe(Zd),cu.registerAxisPointerClass("SingleAxisPointer",Bhe),t.registerComponentView(Fhe),t.registerComponentView(khe),t.registerComponentModel(Sm),tf(t,"single",Sm,Sm.defaultOption),t.registerCoordinateSystem("single",Ohe)}var Ghe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=su(r);t.prototype.init.apply(this,arguments),oO(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),oO(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:q.color.axisLine,width:1,type:"solid"}},itemStyle:{color:q.color.neutral00,borderWidth:1,borderColor:q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:q.size.s,color:q.color.secondary},monthLabel:{show:!0,position:"start",margin:q.size.s,align:"center",formatter:null,color:q.color.secondary},yearLabel:{show:!0,position:null,margin:q.size.xl,formatter:null,color:q.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Fe);function oO(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return cQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});_a(t,e,{type:"box",ignoreSize:i})}var Hhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,f=new ze({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var v=f.date;v.setMonth(v.getMonth()+1),f=s.getDateInfo(v)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new Tr({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?nQ(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,v={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:pt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,v[l],i,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Db(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,v=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/MS)-Math.floor(r[0].time/MS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),f=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:f,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Bd({targetModel:a,coordSysType:"calendar",coordSysProvider:ZV})}),n},t.dimensions=["time","value"],t}();function LS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function Uhe(t){t.registerComponentModel(Ghe),t.registerComponentView(Hhe),t.registerCoordinateSystem("calendar",Whe)}var Ba={level:1,leaf:2,nonLeaf:3},Ja={none:0,all:1,body:2,corner:3};function OT(t,e,r){var n=e[ke[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[ke[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function AH(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function PH(t,e,r,n,i){sO(t[0],e,i,r,n,0),sO(t[1],e,i,r,n,1)}function sO(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(lO(t,e,s,u,i,a,0),l>1&&lO(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[ke[1-a]].getLocatorCount(a),f=i[ke[a]].getLocatorCount(a)-1;r===Ja.body?c=Gt(0,c):r===Ja.corner&&(f=kn(-1,f)),f=e[0]&&t[0]<=e[1]}function fO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function Yhe(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function hO(t,e,r,n){var i=OT(e[n][0],r,n),a=OT(e[n][1],r,n);t[ke[n]]=t[qt[n]]=NaN,i&&a&&(t[ke[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function Th(t,e,r,n){return t[ke[e]]=r,t[ke[1-e]]=n,t}function Xhe(t){return t&&(t.type===Ba.leaf||t.type===Ba.nonLeaf)?t:null}function Qy(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var vO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=qhe(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,f){var h=0;return u&&R(u,function(v,p){var g;se(v)?g={value:v}:we(v)?(g=v,v.value!=null&&!se(v.value)&&(g={value:null})):g={value:null};var m={type:Ba.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Te,span:Th(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:Qy()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:Ba.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,f+1),_=Math.max(1,y);m.span[ke[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length=1,S=r[ke[n]],b=a.getLocatorCount(n)-1,C=new is;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){kr(A.wh)&&(A.wh=y),A.xy=S,A.id[ke[n]]===b&&!_&&(A.wh=r[ke[n]]+r[qt[n]]-A.xy),S+=A.wh}}function xO(t,e){for(var r=e[ke[t]].resetCellIterator();r.next();){var n=r.item;Jy(n.rect,t,n.id,n.span,e),Jy(n.rect,1-t,n.id,n.span,e),n.type===Ba.nonLeaf&&(n.xy=n.rect[ke[t]],n.wh=n.rect[qt[t]])}}function SO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;Jy(i,0,a,n,e),Jy(i,1,a,n,e)}})}function Jy(t,e,r,n,i){t[qt[e]]=0;var a=r[ke[e]],o=a<0?i[ke[1-e]]:i[ke[e]],s=o.getUnitLayoutInfo(e,r[ke[e]]);if(t[ke[e]]=s.xy,t[qt[e]]=s.wh,n[ke[e]]>1){var l=o.getUnitLayoutInfo(e,r[ke[e]]+n[ke[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function uve(t,e,r){var n=hy(t,r[qt[e]]);return BT(n,r[qt[e]])}function BT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function DS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Pr={inBody:1,inCorner:2,outside:3},Xi={x:null,y:null,point:[]};function wO(t,e,r,n,i){var a=r[ke[e]],o=r[ke[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,f=t.point[e]=n[e];if(!l&&!c){t[ke[e]]=Pr.outside;return}if(i===Ja.body){l?(t[ke[e]]=Pr.inBody,f=kn(s.xy+s.wh,Gt(l.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}else if(i===Ja.corner){c?(t[ke[e]]=Pr.inCorner,f=kn(c.xy+c.wh,Gt(u.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,v=u?u.xy:h,p=s?s.xy+s.wh:h;if(fp){if(!i){t[ke[e]]=Pr.outside;return}f=p}t.point[e]=f,t[ke[e]]=h<=f&&f<=p?Pr.inBody:v<=f&&f<=h?Pr.inCorner:Pr.outside}function bO(t,e,r,n){var i=1-r;if(t[ke[r]]!==Pr.outside)for(n[ke[r]].resetCellIterator(PS);PS.next();){var a=PS.item;if(CO(t.point[r],a.rect,r)&&CO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[ke[i]];return}}}function TO(t,e,r,n){if(t[ke[r]]!==Pr.outside){var i=t[ke[r]]===Pr.inCorner?n[ke[1-r]]:n[ke[r]];for(i.resetLayoutIterator(Og,r);Og.next();)if(cve(t.point[r],Og.item)){e[r]=Og.item.id[ke[r]];return}}}function cve(t,e){return e.xy<=t&&t<=e.xy+e.wh}function CO(t,e,r){return e[ke[r]]<=t&&t<=e[ke[r]]+e[qt[r]]}function fve(t){t.registerComponentModel(eve),t.registerComponentView(ave),t.registerCoordinateSystem("matrix",lve)}function hve(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function MO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function vve(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ne(i,n,!0),_a(i,n,{ignoreSize:!0}),KV(r,i),zg(r,i),zg(r,i,"shape"),zg(r,i,"style"),zg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var kH=["transition","enterFrom","leaveTo"],dve=kH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function zg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?kH:dve,i=0;i=0;c--){var f=i[c],h=rr(f.id,null),v=h!=null?o.get(h):null;if(v){var p=v.parent,y=$n(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},b=Y0(v,f,_,null,{hv:f.hv,boundingMode:f.bounding},S);if(!$n(v).isNew&&b){for(var C=f.transition,M={},A=0;A=0)?M[D]=E:v[D]=E}Qe(v,M,r,0)}else v.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){wm(i,$n(i).option,n,r._lastGraphicModel)}),this._elMap=ve()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(mt);function VT(t){var e=fe(LO,t)?LO[t]:Kv(t),r=new e({});return $n(r).type=t,r}function AO(t,e,r,n){var i=VT(r);return e.add(i),n.set(t,i),$n(i).id=t,$n(i).isNew=!0,i}function wm(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){wm(a,e,r,n)}),c_(t,e,n),r.removeKey($n(t).id))}function PO(t,e,r,n){t.isGroup||R([["cursor",si.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];fe(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),R($e(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),fe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function yve(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat($V),function(e){delete t[e]}),t}function _ve(t,e,r){var n=Ae(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Ae(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function xve(t){t.registerComponentModel(gve),t.registerComponentView(mve),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var DO=["x","y","radius","angle","single"],Sve=["cartesian2d","polar","singleAxis"];function wve(t){var e=t.get("coordinateSystem");return Ee(Sve,e)>=0}function Zo(t){return t+"Axis"}function bve(t,e){var r=ve(),n=[],i=ve();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,v){var p=r.get(h);p&&p[v]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function IH(t){var e=t.ecModel,r={infoList:[],infoMap:ve()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Zo(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var kS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),gd=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=kO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=kO(r);Ne(this.option,r,!0),Ne(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=ve(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(DO,function(i){var a=this.getReferringComponents(Zo(i),jX);if(a.specified){n=!0;var o=new kS;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new kS;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var v=f.getReferringComponents("grid",Dt).models[0];v&&R(u,function(p){f.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",Dt).models[0]&&h.add(p.componentIndex)})}}}a&&R(DO,function(u){if(a){var c=i.findComponents({mainType:Zo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new kS;f.add(c[0].componentIndex),r.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Zo(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Zo(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!b&&!C)return!0;S&&(m=!0),b&&(p=!0),C&&(g=!0)}return m&&p&&g})}else tc(c,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});tc(c,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;tc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=it(n[0]+o,n,[0,100],!0):a!=null&&(o=it(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=S2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function Lve(t,e,r){var n=[1/0,-1/0];tc(r,function(o){Ute(n,o.getData(),e)});var i=t.getAxisModel(),a=kj(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Ave={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Zo(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Mve(i,a,s,t),r.push(o.__dzAxisProxy))});var n=ve();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Pve(t){t.registerAction("dataZoom",function(e,r){var n=bve(r,e);R(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var EO=!1;function EL(t){EO||(EO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Ave),Pve(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Dve(t){t.registerComponentModel(Tve),t.registerComponentView(Cve),EL(t)}var Kn=function(){function t(){}return t}(),EH={};function rc(t,e){EH[t]=e}function NH(t){return EH[t]}var kve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=NH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ne(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:q.size.m,itemSize:15,itemGap:q.size.s,showTitle:!0,iconStyle:{borderColor:q.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:q.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Fe);function RH(t,e){var r=Sf(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new ze({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var Ive=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),f=[];R(u,function(_,S){f.push(S)}),new uo(this._featureNames||[],f).add(h).update(h).remove(Ie(h,null)).execute(),this._featureNames=f;function h(_,S){var b=f[_],C=f[S],M=u[b],A=new We(M,r,r.ecModel),D;if(a&&a.newTitle!=null&&a.featureName===b&&(M.title=a.newTitle),b&&!C){if(Eve(b))D={onclick:A.option.onclick,featureName:b};else{var E=NH(b);if(!E)return;D=new E}c[b]=D}else if(D=c[C],!D)return;D.uid=xf("toolbox-feature"),D.model=A,D.ecModel=n,D.api=i;var k=D instanceof Kn;if(!b&&C){k&&D.dispose&&D.dispose(n,i);return}if(!A.get("show")||k&&D.unusable){k&&D.remove&&D.remove(n,i);return}v(A,D,b),A.setIconStatus=function(I,z){var O=this.option,F=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,F[I]&&(z==="emphasis"?so:lo)(F[I])},D instanceof Kn&&D.render&&D.render(A,n,i,a)}function v(_,S,b){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=S instanceof Kn&&S.getIcons?S.getIcons():_.get("icon"),D=_.get("title")||{},E,k;se(A)?(E={},E[b]=A):E=A,se(D)?(k={},k[b]=D):k=D;var I=_.iconPaths={};R(E,function(z,O){var F=yf(z,{},{x:-s/2,y:-s/2,width:s,height:s});F.setStyle(C.getItemStyle());var G=F.ensureState("emphasis");G.style=M.getItemStyle();var j=new Xe({style:{text:k[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:W2({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});F.setTextContent(j),mo({el:F,componentModel:r,itemName:O,formatterParamsExtra:{title:k[O]}}),F.__title=k[O],F.on("mouseover",function(){var U=M.getItemStyle(),V=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";j.setStyle({fill:M.get("textFill")||U.fill||U.stroke||q.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),F.setTextConfig({position:M.get("textPosition")||V}),j.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),j.hide()}),(_.get(["iconStatus",O])==="emphasis"?so:lo)(F),o.add(F),F.on("click",le(S.onclick,S,n,i,O)),I[O]=F})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=wt(g,p,m);El(r.get("orient"),o,r.get("itemGap"),y.width,y.height),Y0(o,g,p,m),o.add(RH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,b=_.ensureState("emphasis"),C=b.textConfig||(b.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&S){var D=A.style||(A.style={}),E=N0(S,Xe.makeFont(D)),k=_.x+o.x,I=_.y+o.y+s,z=!1;I+E.height>i.getHeight()&&(C.position="top",z=!0);var O=z?-5-E.height:s+10;k+E.width/2>i.getWidth()?(C.position=["100%",O],D.align="right"):k-E.width/2<0&&(C.position=[0,O],D.align="left")}})},e.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof Kn&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){R(this._features,function(i){i instanceof Kn&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof Kn&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(mt);function Eve(t){return t.indexOf("my")===0}var Nve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||q.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];v&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var b=S.contentWindow,C=b.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),b.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var M=i.get("lang"),A='',D=window.open();D.document.write(A),D.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:q.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Kn),NO="__ec_magicType_stack__",Rve=[["line","bar"],["stack"]],Ove=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(RO[i]){var s={series:[]},l=function(f){var h=f.subType,v=f.id,p=RO[i](h,v,f,a);p&&(Se(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",S=f.getReferringComponents(_,Dt).models[0],b=S.componentIndex;s[_]=s[_]||[];for(var C=0;C<=b;C++)s[_][b]=s[_][b]||{};s[_][b].boundaryGap=i==="bar"}}};R(Rve,function(f){Ee(f,i)>=0&&R(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ne({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Kn),RO={line:function(t,e,r,n){if(t==="bar")return Ne({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Ne({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===NO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ne({id:e,stack:i?"":NO},n.get(["option","stack"])||{},!0)}};Oi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var f_=new Array(60).join("-"),of=" ";function zve(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function Bve(t){var e=[];return R(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(v){return v.name})),l=[i.model.getCategories()];R(r.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(of)],c=0;c=0)return!0}var NT=new RegExp("["+nf+"]+","g");function Ave(t){for(var e=t.split(/\n+/g),r=Yy(e.shift()).split(NT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Rve(t){var e=ML(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return LH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Nve(t){AH(t).snapshots=null}function Ove(t){return ML(t).length}function ML(t){var e=AH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var zve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Nve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Kn);Oi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var Bve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LL=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=LO(r,e);N(Vve,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=MS[n.brushType](0,a,i);n.__rangeOffset={offset:kO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){N(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&N(a.coordSyses,function(o){var s=MS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){N(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=MS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?kO[n.brushType](a.values,o.offset,Fve(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:E6(i),isTargetByCursor:N6(i,e,n.coordSysModel),getLinearBrushOtherExtent:R6(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=LO(r,e),a=0;at[1]&&t.reverse(),t}function LO(t,e){return Pc(t,e,{includeMainTypes:Bve})}var Vve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=ve(),o={},s={};!r&&!n&&!i||(N(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),N(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),N(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];N(u.getCartesians(),function(f,h){(Ee(r,f.getAxis("x").model)>=0||Ee(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:PO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){N(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:PO.geo})})}},AO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],PO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(os(t)),e}},MS={lineX:Ie(DO,0),lineY:Ie(DO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[OT([i[0],a[0]]),OT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function DO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=OT(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var kO={lineX:Ie(IO,0),lineY:Ie(IO,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function IO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function Fve(t,e){var r=EO(t),n=EO(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function EO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var zT=N,jve=wX("toolbox-dataZoom_"),Gve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new QM(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),Uve(r,n,this,a,i),Wve(r,n)},e.prototype.onclick=function(r,n,i){Hve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new LL(AL(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),Eve(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),v=h.model,p=l(u,v,a),g=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=gs(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,c.componentIndex);p&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(r){var n=[];zT(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:X.color.backgroundTint}};return n},e}(Kn),Hve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Rve(this.ecModel))}};function AL(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Wve(t,e){t.setIconStatus("back",Ove(e)>1?"emphasis":"normal")}function Uve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new LL(AL(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}nQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=AL(n),o=Pc(t,a);zT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),zT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:jve+u+f};h[c]=f,i.push(h)}return i});function Zve(t){t.registerComponentModel(mve),t.registerComponentView(yve),tc("saveAsImage",xve),tc("magicType",wve),tc("dataView",kve),tc("dataZoom",Gve),tc("restore",zve),Oe(gve)}var $ve=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:X.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:X.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:X.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:X.color.tertiary,fontSize:14}},e}(Ve);function PH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function DH(t){if(Ue.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function ede(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(Ue.transformSupported?""+PL+i:",left"+i+",top"+i)),qve+":"+a}function RO(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ue.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ue.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+PL+":"+o+";":[["top",0],["left",0],[kH,o]]}function tde(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),N(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function rde(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),f=t.getModel("textStyle"),h=xF(t,"html"),v=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+v),e&&a>0&&i.push(ede(a,r,n)),o&&i.push("background-color:"+o),N(["width","color","radius"],function(p){var g="border-"+p,m=X2(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(tde(f)),h!=null&&i.push("padding:"+_f(h).join("px ")+"px"),i.join(";")+";"}function NO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&j$(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var nde=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ue.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):Gl(a)?a:me(a)&&a(e.getDom()));NO(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=Xve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Kve+rde(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+RO(a[0],a[1],!0)+("border-color:"+Xl(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!PH(n)&&(s=Jve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ue.node||!i.getDom())){var o=BO(a,i);this._ticket="";var s=a.dataByCoordSys,l=cde(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=ade;c.x=a.x,c.y=a.y,c.update(),Ae(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=dH(a,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(BO(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Th([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Ae(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Tl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ae(c).dataIndex!=null?l=c:Ae(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Th([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),f=[],h=new s1;N(r,function(_){N(_.dataByAxis,function(S){var b=i.getComponent(S.axisDim+"Axis",S.axisIndex),T=S.value;if(!(!b||T==null)){var C=cH(T,b.axis,i,S.seriesDataIndices,S.valueLabelOpt),A=Kt("section",{header:C,noHeader:!Mn(C),sortBlocks:!0,blocks:[]});c.blocks.push(A),N(S.seriesDataIndices,function(D){var E=i.getSeriesByIndex(D.seriesIndex),k=D.dataIndexInside,I=E.getDataParams(k);if(!(I.dataIndex<0)){I.axisDim=S.axisDim,I.axisIndex=S.axisIndex,I.axisType=S.axisType,I.axisId=S.axisId,I.axisValue=Cy(b.axis,{value:T}),I.axisValueLabel=C,I.marker=h.makeTooltipMarker("item",Xl(I.color),l);var z=eI(E.formatTooltip(k,!0,null)),O=z.frag;if(O){var F=Th([E],a).get("valueFormatter");A.blocks.push(F?J({valueFormatter:F},O):O)}z.text&&f.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,p=s.get("order"),g=oI(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` +`),meta:e.meta}}function e0(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jve(t){var e=t.slice(0,t.indexOf(` +`));if(e.indexOf(of)>=0)return!0}var FT=new RegExp("["+of+"]+","g");function Gve(t){for(var e=t.split(/\n+/g),r=e0(e.shift()).split(FT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Yve(t){var e=NL(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return OH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Xve(t){zH(t).snapshots=null}function qve(t){return NL(t).length}function NL(t){var e=zH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Kve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Xve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Kn);Oi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var Qve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],RL=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=OO(r,e);R(Jve,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=IS[n.brushType](0,a,i);n.__rangeOffset={offset:FO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){R(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=IS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){R(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=IS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?FO[n.brushType](a.values,o.offset,ede(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:G6(i),isTargetByCursor:W6(i,e,n.coordSysModel),getLinearBrushOtherExtent:H6(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=OO(r,e),a=0;at[1]&&t.reverse(),t}function OO(t,e){return Dc(t,e,{includeMainTypes:Qve})}var Jve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=ve(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(f,h){(Ee(r,f.getAxis("x").model)>=0||Ee(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:BO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){R(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:BO.geo})})}},zO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],BO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(os(t)),e}},IS={lineX:Ie(VO,0),lineY:Ie(VO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[jT([i[0],a[0]]),jT([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function VO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=jT(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var FO={lineX:Ie(jO,0),lineY:Ie(jO,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function jO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function ede(t,e){var r=GO(t),n=GO(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function GO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var GT=R,tde=OX("toolbox-dataZoom_"),rde=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new oL(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),ade(r,n,this,a,i),ide(r,n)},e.prototype.onclick=function(r,n,i){nde[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new RL(OL(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),$ve(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),v=h.model,p=l(u,v,a),g=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=ms(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var p=v.getAxisModel(u,c.componentIndex);p&&(h=v)}),h}},e.prototype._dispatchZoomAction=function(r){var n=[];GT(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:q.color.backgroundTint}};return n},e}(Kn),nde={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Yve(this.ecModel))}};function OL(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function ide(t,e){t.setIconStatus("back",qve(e)>1?"emphasis":"normal")}function ade(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new RL(OL(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}mQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=OL(n),o=Dc(t,a);GT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),GT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:tde+u+f};h[c]=f,i.push(h)}return i});function ode(t){t.registerComponentModel(kve),t.registerComponentView(Ive),rc("saveAsImage",Nve),rc("magicType",Ove),rc("dataView",Uve),rc("dataZoom",rde),rc("restore",Kve),Oe(Dve)}var sde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:q.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:q.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:q.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:q.color.tertiary,fontSize:14}},e}(Fe);function BH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function VH(t){if(Ze.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),v=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function dde(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(Ze.transformSupported?""+zL+i:",left"+i+",top"+i)),cde+":"+a}function HO(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ze.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+zL+":"+o+";":[["top",0],["left",0],[FH,o]]}function pde(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function gde(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),f=t.getModel("textStyle"),h=PF(t,"html"),v=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+v),e&&a>0&&i.push(dde(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=nM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(pde(f)),h!=null&&i.push("padding:"+Sf(h).join("px ")+"px"),i.join(";")+";"}function WO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&tY(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var mde=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):Hl(a)?a:me(a)&&a(e.getDom()));WO(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Wn(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=ude(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=fde+gde(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+HO(a[0],a[1],!0)+("border-color:"+ql(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!BH(n)&&(s=vde(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=$O(a,i);this._ticket="";var s=a.dataByCoordSys,l=Tde(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=_de;c.x=a.x,c.y=a.y,c.update(),Ae(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var f=bH(a,n),h=f.point[0],v=f.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide($O(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Mh([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Ae(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Cl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Ae(c).dataIndex!=null?l=c:Ae(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Mh([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),f=[],h=new v1;R(r,function(_){R(_.dataByAxis,function(S){var b=i.getComponent(S.axisDim+"Axis",S.axisIndex),C=S.value;if(!(!b||C==null)){var M=_H(C,b.axis,i,S.seriesDataIndices,S.valueLabelOpt),A=Kt("section",{header:M,noHeader:!Mn(M),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(S.seriesDataIndices,function(D){var E=i.getSeriesByIndex(D.seriesIndex),k=D.dataIndexInside,I=E.getDataParams(k);if(!(I.dataIndex<0)){I.axisDim=S.axisDim,I.axisIndex=S.axisIndex,I.axisType=S.axisType,I.axisId=S.axisId,I.axisValue=ky(b.axis,{value:C}),I.axisValueLabel=M,I.marker=h.makeTooltipMarker("item",ql(I.color),l);var z=uI(E.formatTooltip(k,!0,null)),O=z.frag;if(O){var F=Mh([E],a).get("valueFormatter");A.blocks.push(F?J({valueFormatter:F},O):O)}z.text&&f.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var v=n.position,p=s.get("order"),g=pI(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` -`:"
",y=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ae(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,p=r.positionDefault,g=Th([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,f),_=new s1;y.marker=_.makeTooltipMarker("item",Xl(y.color),v);var S=eI(u.formatTooltip(c,!1,f)),b=g.get("order"),T=g.get("valueFormatter"),C=S.frag,A=C?oI(T?J({valueFormatter:T},C):C,_,v,b,a.get("useUTC"),g.get("textStyle")):S.text,D="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,D,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ae(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Wr(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=r.positionDefault,p=Th(f,this._tooltipModel,v?{position:v}:null),g=p.get("content"),m=Math.random()+"",y=new s1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var v=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(h)if(se(h)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,_&&(v=Ed(y.axisValue,v,m)),v=q2(v,i,!0)}else if(me(h)){var S=le(function(b,T){b===this._ticket&&(f.setContent(T,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,v=h(i,a,S)}else v=h;f.setContent(v,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(we(n)){var g=n;g.width=f[0],g.height=f[1];var m=wt(g,{width:u,height:c});i=m.x,a=m.y,h=null,v=null}else if(se(n)&&l){var y=ude(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=sde(i,a,o,u,c,h?null:20,v?null:20);i=y[0],a=y[1]}if(h&&(i-=VO(h)?f[0]/2:h==="right"?f[0]:0),v&&(a-=VO(v)?f[1]/2:v==="bottom"?f[1]:0),PH(r)){var y=lde(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&N(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&N(u,function(h,v){var p=f[v]||{},g=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===m.length,o&&N(g,function(y,_){var S=m[_];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&N(h.seriesDataIndices,function(y){var _=y.seriesIndex,S=n[_],b=a[_];S&&b&&b.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Ue.node||!n.getDom()||(Kv(this,"_updatePosition"),this._tooltipContent.dispose(),PT("itemTooltip",n))},e.type="tooltip",e}(mt);function Th(t,e,r){var n=e.ecModel,i;r?(i=new He(r,n,n),i=new He(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof He&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new He(o,i,n)))}return i}function BO(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function sde(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function lde(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function ude(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function VO(t){return t==="center"||t==="middle"}function cde(t,e,r){var n=y2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=ff(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ae(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function fde(t){Oe(Gd),t.registerComponentModel($ve),t.registerComponentView(ode),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Nt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Nt)}var hde=["rect","polygon","keep","clear"];function vde(t,e){var r=gt(t?t.brush:[]);if(r.length){var n=[];N(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),dde(s),e&&!s.length&&s.push.apply(s,hde)}}function dde(t){var e={};N(t,function(r){e[r]=1}),t.length=0,N(e,function(r,n){t.push(n)})}var FO=N;function jO(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function BT(t,e,r){var n={};return FO(e,function(a){var o=n[a]=i();FO(t[a],function(s,l){if(hr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new hr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new hr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function EH(t,e,r){var n;N(r,function(i){e.hasOwnProperty(i)&&jO(e[i])&&(n=!0)}),n&&N(r,function(i){e.hasOwnProperty(i)&&jO(e[i])?t[i]=ye(e[i]):delete t[i]})}function pde(t,e,r,n,i,a){var o={};N(t,function(f){var h=hr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return oM(r,s,f)}function u(f,h){DF(r,s,f,h)}r.each(c);function c(f,h){s=f;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(i,f),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var S=m[y];g[S]&&g[S].applyVisual(f,l,u)}}}function gde(t,e,r,n){var i={};return N(t,function(a){var o=hr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(T){return oM(s,f,T)}function c(T,C){DF(s,f,T,C)}for(var f,h=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var p=n!=null?h.get(l,f):f,g=r(p),m=e[g],y=i[g],_=0,S=y.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&ZO(e)}};function ZO(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var bde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new QM(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){RH(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(mt),Tde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return $O(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=$O(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:X.color.backgroundTint,borderColor:X.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:X.color.disabled},e}(Ve);function $O(t,e){return Re({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new He(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Cde=["rect","polygon","lineX","lineY","keep","clear"],Mde=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,N(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return N(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:Cde.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Kn);function Lde(t){t.registerComponentView(bde),t.registerComponentModel(Tde),t.registerPreprocessor(vde),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,yde),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Nt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Nt),tc("brush",Mde)}var Ade=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:X.size.m,backgroundColor:X.color.transparent,borderColor:X.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:X.color.primary},subtextStyle:{fontSize:12,color:X.color.quaternary}},e}(Ve),Pde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:pt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),v=new Xe({style:pt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,v.silent=!g&&!m,p&&c.on("click",function(){dy(p,"_"+r.get("target"))}),g&&v.on("click",function(){dy(g,"_"+r.get("subtarget"))}),Ae(c).eventData=Ae(v).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(v);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var S=or(r,i),b=wt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var T={align:l,verticalAlign:u};c.setStyle(T),v.setStyle(T),y=a.getBoundingRect();var C=b.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var D=new ze({shape:{x:y.x-C[3],y:y.y-C[0],width:y.width+C[1]+C[3],height:y.height+C[0]+C[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(mt);function Dde(t){t.registerComponentModel(Ade),t.registerComponentView(Pde)}var YO=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],N(n,function(u,c){var f=rr(cf(u),""),h;we(u)?(h=ye(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Zr([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:X.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:X.color.secondary},data:[]},e}(Ve),NH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=Cs(YO.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:X.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:X.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:X.color.tertiary},itemStyle:{color:X.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:X.color.accent50,borderColor:X.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:X.color.accent60},itemStyle:{color:X.color.accent60,borderColor:X.color.accent60},controlStyle:{color:X.color.accent70,borderColor:X.color.accent70}},progress:{lineStyle:{color:X.color.accent30},itemStyle:{color:X.color.accent40}},data:[]}),e}(YO);Bt(NH,U0.prototype);var kde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(mt),Ide=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(fi),AS=Math.PI,XO=Fe(),Ede=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},N(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Nde(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:AS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),v=h.get("show",!0),p=v?h.get("itemSize"):0,g=v?h.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*AS/180;var _,S,b,T=h.get("position",!0),C=v&&h.get("showPlayBtn",!0),A=v&&h.get("showPrevBtn",!0),D=v&&h.get("showNextBtn",!0),E=0,k=f;T==="left"||T==="bottom"?(C&&(_=[0,0],E+=m),A&&(S=[E,0],E+=m),D&&(b=[k-p,0],k-=m)):(C&&(_=[k-p,0],k-=m),A&&(S=[0,0],E+=m),D&&(b=[k-p,0],k-=m));var I=[E,k];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:b,axisExtent:I,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Ii(s,s,[-l,-u]),po(s,s,-AS/2),Ii(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(a.getBoundingRect()),v=[i.x,i.y],p=[a.x,a.y];p[0]=v[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(v,f,c,1,m),S(p,h,c,1,1-m)}else{var m=g>=0?0:1;S(v,f,c,1,m),p[1]=v[1]+g}i.setPosition(v),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function _(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function S(b,T,C,A,D){b[A]+=C[A][D]-T[A][D]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Rde(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Ide("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],N(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=qO(f,h,n,g);m.ensureState("emphasis").style=v.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),as(m);var y=Ae(m);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],N(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,f),silent:!1,style:pt(v,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=pt(p),y.ensureState("progress").style=pt(g),n.add(y),as(y),XO(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",le(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",le(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function h(v,p,g,m){if(v){var y=Ei(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=Ode(a,p+"Icon",_,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),as(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=le(u._handlePointerDrag,u),f.ondragend=le(u._handlePointerDragend,u),KO(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){KO(f,u._progressLine,s,i,a)}};this._currentPointer=qO(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Ln(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,v]}var zg={min:Ie(Og,"min"),max:Ie(Og,"max"),average:Ie(Og,"average"),median:Ie(Og,"median")};function vd(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!Gde(e)&&!ee(e.coord)&&ee(i)){var a=OH(e,r,n,t);if(e=ye(e),e.type&&zg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=zg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&zg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=Xy(r,r.mapDimension(c.dim),e.type))}}else for(var f=e.coord,h=0;h<2;h++)zg[f[h]]&&(f[h]=Xy(r,r.mapDimension(i[h]),f[h]));return e}}function OH(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(Hde(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Hde(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function dd(t,e){return t&&t.containData&&e.coord&&!FT(e)?t.containData(e.coord):!0}function Wde(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!FT(e)&&!FT(r)?t.containZone(e.coord,r.coord):!0}function zH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ls(o,e[a])}:function(r,n,i,a){return ls(r.value,e[a])}}function Xy(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var PS=Fe(),kL=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=ve()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){PS(s).keep=!1}),n.eachSeries(function(s){var l=Sa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!PS(s).keep&&a.group.remove(s.group)}),Ude(n,o,this.type)},e.prototype.markKeep=function(r){PS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;N(r,function(a){var o=Sa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Q4(l):M2(l))})}})},e.type="marker",e}(mt);function Ude(t,e,r){t.eachSeries(function(n){var i=Sa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=Yl(i),s=o.z,l=o.zlevel;j0(a.group,s,l)}})}function JO(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,v=u&&o?o.y:0,p,g=oe(l.get("x"),c)+h,m=oe(l.get("y"),f)+v;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),_=t.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var Zde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markPoint");o&&(JO(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Bd),f=$de(o,r,n);n.setData(f),JO(n.getData(),r,a),f.each(function(h){var v=f.getItemModel(h),p=v.getShallow("symbol"),g=v.getShallow("symbolSize"),m=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),_=v.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(h),b=n.getDataParams(h);me(p)&&(p=p(S,b)),me(g)&&(g=g(S,b)),me(m)&&(m=m(S,b)),me(y)&&(y=y(S,b))}var T=v.getModel("itemStyle").getItemStyle(),C=v.get("z2"),A=Nd(l,"color");T.fill||(T.fill=A),f.setItemVisual(h,{z2:pe(C,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:T})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Ae(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(kL);function $de(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=re(r.get("data"),Ie(vd,e));t&&(a=tt(a,Ie(dd,t)));var o=zH(!!t,n);return i.initData(a,null,o),i}function Yde(t){t.registerComponentModel(jde),t.registerComponentView(Zde),t.registerPreprocessor(function(e){DL(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Xde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Sa),Bg=Fe(),qde=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Sr(n.yAxis,n.xAxis);else{var u=OH(n,i,e,t);s=u.valueAxis;var c=_M(i,u.valueDataDim);l=Xy(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=ye(n),p={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,p.coord[h]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[f]=p.coord[f]=l,a=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[vd(t,a[0]),vd(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Re(m[2],m[0]),Re(m[2],m[1]),m};function qy(t){return!isNaN(t)&&!isFinite(t)}function ez(t,e,r,n){var i=1-t,a=n.dimensions[t];return qy(e[i])&&qy(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function Kde(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(ez(1,r,n,t)||ez(0,r,n,t)))return!0}return dd(t,e[0])&&dd(t,e[1])}function DS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,f=t.get(c[0],e),h=t.get(c[1],e);s=a.dataToPoint([f,h])}if(ps(a,"cartesian2d")){var v=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;qy(t.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):qy(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var Qde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Bg(o).from,u=Bg(o).to;l.each(function(c){DS(l,c,!0,a,i),DS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new qM);this.group.add(c.group);var f=Jde(o,r,n),h=f.from,v=f.to,p=f.line;Bg(n).from=h,Bg(n).to=v,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),f.from.each(function(b){S(h,b,!0),S(v,b,!1)}),p.each(function(b){var T=p.getItemModel(b),C=T.getModel("lineStyle").getLineStyle();p.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]);var A=T.get("z2");C.stroke==null&&(C.stroke=h.getItemVisual(b,"style").fill),p.setItemVisual(b,{z2:pe(A,0),fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:C})}),c.updateData(p),f.line.eachItemGraphicEl(function(b){Ae(b).dataModel=n,b.traverse(function(T){Ae(T).dataModel=n})});function S(b,T,C){var A=b.getItemModel(T);DS(b,T,C,r,a);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Nd(l,"color")),b.setItemVisual(T,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[C?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[C?0:1]),symbolSize:pe(A.get("symbolSize"),m[C?0:1]),symbol:pe(A.get("symbol",!0),g[C?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(kL);function Jde(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=new Zr(n,r),o=new Zr([],r),s=re(r.get("data"),Ie(qde,e,t,r));t&&(s=tt(s,Ie(Kde,t)));var l=zH(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function epe(t){t.registerComponentModel(Xde),t.registerComponentView(Qde),t.registerPreprocessor(function(e){DL(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var tpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Sa),Vg=Fe(),rpe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=vd(t,i),s=vd(t,a),l=o.coord,u=s.coord;l[0]=Sr(l[0],-1/0),l[1]=Sr(l[1],-1/0),u[0]=Sr(u[0],1/0),u[1]=Sr(u[1],1/0);var c=T0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Ky(t){return!isNaN(t)&&!isFinite(t)}function tz(t,e,r,n){var i=1-t;return Ky(e[i])&&Ky(r[i])}function npe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return ps(t,"cartesian2d")?r&&n&&(tz(1,r,n)||tz(0,r,n))?!0:Wde(t,i,a):dd(t,i)||dd(t,a)}function rz(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),f=t.getValues(["x1","y1"],e),h=a.clampData(c),v=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>v[0]?f[0]:c[0]:p[0]=h[0]>v[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>v[1]?f[1]:c[1]:p[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(ps(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);Ky(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):Ky(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var nz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ipe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(nz,function(f){return rz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var f=ape(o,r,n);n.setData(f),f.each(function(h){var v=re(nz,function(k){return rz(f,h,k,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],S=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Ln(_),Ln(S);var b=!(m[0]>_[1]||m[1]<_[0]||y[0]>S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:X.size.m,align:"auto",backgroundColor:X.color.transparent,borderColor:X.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:X.color.disabled,inactiveBorderColor:X.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:X.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:X.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:X.color.tertiary,borderWidth:1,borderColor:X.color.border},emphasis:{selectorLabel:{show:!0,color:X.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Ve),Zu=Ie,GT=N,Fg=_e,BH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Fg),this.group.add(this._selectorGroup=new Fg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=or(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),v=wt(f,c,h),p=this.layoutInner(r,o,v,a,l,u),g=wt(Se({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=MH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),GT(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var _=new Fg;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var b=S.getData(),T=b.getVisual("legendLineStyle")||{},C=b.getVisual("legendIcon"),A=b.getVisual("style"),D=this._createItem(S,y,g,p,n,r,T,A,C,f,a);D.on("click",Zu(iz,y,null,a,v)).on("mouseover",Zu(HT,S.name,null,a,v)).on("mouseout",Zu(WT,S.name,null,a,v)),i.ssr&&D.eachChild(function(E){var k=Ae(E);k.seriesIndex=S.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&D.eachChild(function(E){m.packEventData(E,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(E){var k=this;if(!c.get(y)&&E.legendVisualProvider){var I=E.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),F=I.getItemVisual(z,"legendIcon"),G=Ur(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ti(G,"rgba")}));var j=this._createItem(E,y,g,p,n,r,{},O,F,f,a);j.on("click",Zu(iz,null,y,a,v)).on("mouseover",Zu(HT,null,y,a,v)).on("mouseout",Zu(WT,null,y,a,v)),i.ssr&&j.eachChild(function(U){var V=Ae(U);V.seriesIndex=E.seriesIndex,V.dataIndex=g,V.ssrType="legend"}),h&&j.eachChild(function(U){k.packEventData(U,n,E,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Ae(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();GT(r,function(u){var c=u.type,f=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:h,emphasis:v},{defaultText:u.title}),as(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var v=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var b=lpe(c,a,l,u,v,m,h),T=new Fg,C=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))T.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;T.add(upe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:b.itemStyle,symbolKeepAspect:_}))}var D=s==="left"?p+5:-5,E=s,k=o.get("formatter"),I=n;se(k)&&k?I=k.replace("{name}",n??""):me(k)&&(I=k(n));var z=m?C.getTextColor():a.get("inactiveColor");T.add(new Xe({style:pt(C,{text:I,x:D,y:g/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var O=new ze({shape:T.getBoundingRect(),style:{fill:"transparent"}}),F=a.getModel("tooltip");return F.get("show")&&mo({el:O,componentModel:o,itemName:n,itemTooltipOption:F.option}),T.add(O),T.eachChild(function(G){G.silent=!0}),O.silent=!f,this.getContentGroup().add(T),as(T),T.__legendDataIndex=i,T},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Il(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Il("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?v[g]+=c[m]+p:f[g]+=h[m]+p,v[1-g]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var S={x:0,y:0};return S[m]=c[m]+p+h[m],S[y]=Math.max(c[y],h[y]),S[_]=Math.min(0,h[_]+v[1-g]),S}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(mt);function lpe(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),GT(m,function(_,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Xc(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function upe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=X.color.neutral00,r.style.lineWidth=2),r}function iz(t,e,r,n){WT(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),HT(t,e,r,n)}function VH(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-v.x,-v.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var b=r.get("pageButtonPosition",!0);b==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+S}_[1-a]+=v[s]/2-p[s]/2,c.setPosition(m),f.setPosition(y),h.setPosition(_);var T={x:0,y:0};if(T[o]=g?i[o]:v[o],T[s]=Math.max(v[s],p[s]),T[l]=Math.min(0,p[l]+_[1-a]),f.__rectSize=i[o],g){var C={x:0,y:0};C[o]=Math.max(i[o]-p[o]-S,0),C[s]=T[s],f.setClipPath(new ze({shape:C})),f.__rectSize=C[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),T},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;N(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=i.childOfName(c);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=kS[o],l=IS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,v=h?1:0,p={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=b(f);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=h;++m)S=b(c[m]),(!S&&_.e>y.s+a||S&&!T(S,y.s))&&(_.i>y.i?y=_:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=S;for(var m=u-1,y=g,_=g,S=null;m>=-1;--m)S=b(c[m]),(!S||!T(_,S.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=S;return p;function b(C){if(C){var A=C.getBoundingRect(),D=A[l]+C[l];return{s:D,e:D+A[s],i:C.__legendDataIndex}}}function T(C,A){return C.e>=A&&C.s<=A+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(BH);function dpe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function ppe(t){Oe(FH),t.registerComponentModel(hpe),t.registerComponentView(vpe),dpe(t)}function gpe(t){Oe(FH),Oe(ppe)}var mpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=Cs(hd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(hd),IL=Fe();function ype(t,e,r){IL(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function _pe(t,e){for(var r=IL(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Tpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=IL(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=bH(a);N(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,xpe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){jH(i,a);return}var c=bpe(l,a,r);o.enable(c.controlType,c.opt),wf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Cpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),ype(i,r,{pan:le(ES.pan,this),zoom:le(ES.zoom,this),scrollMove:le(ES.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){_pe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(TL),ES={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=RS[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(gs(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:lz(function(t,e,r,n,i,a){var o=RS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:lz(function(t,e,r,n,i,a){var o=RS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function lz(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(gs(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var RS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function GH(t){CL(t),t.registerComponentModel(mpe),t.registerComponentView(Cpe),Tpe(t)}var Mpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Cs(hd.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:X.color.accent10,borderRadius:0,backgroundColor:X.color.transparent,dataBackground:{lineStyle:{color:X.color.accent30,width:.5},areaStyle:{color:X.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:X.color.accent40,width:.5},areaStyle:{color:X.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:X.color.neutral00,borderColor:X.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:X.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:X.color.tertiary},brushSelect:!0,brushStyle:{color:X.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:X.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(hd),Lh=ze,Lpe=1,NS=30,Ape=7,Ah="horizontal",uz="vertical",Ppe=5,Dpe=["line","bar","candlestick","scatter"],kpe={easing:"cubicOut",duration:100,delay:0},Ipe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),wf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Ape:0,o=or(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Ah?{right:o.width-s.x-s.width,top:o.height-NS-l-a,width:s.width,height:NS}:{right:l,top:s.y,width:NS,height:s.height},c=ou(r.option);N(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=wt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===uz&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Ah&&!o?{scaleY:l?1:-1,scaleX:1}:i===Ah&&o?{scaleY:l?1:-1,scaleX:-1}:i===uz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Lh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Lh({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),S=n[0]/(f[1]-f[0]),b=r.thisAxis.type==="time",T=-_,C=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,F){if(C>0&&F%C){b||(T+=_);return}T=b?(+z-f[0])*S:T+_;var G=O==null||isNaN(O)||O==="",j=G?0:it(O,h,p,!0);G&&!A&&F?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([T,0]),y.push([T,0])),G||(m.push([T,j]),y.push([T,j])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function E(z){var O=D.getModel(z?"selectedDataBackground":"dataBackground"),F=new _e,G=new Or({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),j=new br({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return F.add(G),F.add(j),F}for(var k=0;k<3;k++){var I=E(k===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();N(l,function(u){if(!i&&!(n!==!0&&Ee(Dpe,u.get("type"))<0)){var c=a.getComponent(Zo(o),s).axis,f=Epe(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Lh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Lh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Lpe,fill:X.color.transparent}})),N([0,1],function(S){var b=l.get("handleIcon");!my[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var T=Ut(b,-1,0,2,2,null,!0);T.attr({cursor:Rpe(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var C=T.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,T.setStyle(l.getModel("handleStyle").getItemStyle()),T.style.strokeNoScale=!0,T.rectHover=!0,T.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),as(T);var D=l.get("handleColor");D!=null&&(T.style.fill=D),o.add(i[S]=T);var E=l.getModel("textStyle"),k=l.get("handleLabel")||{},I=k.show||!1;r.add(a[S]=new Xe({silent:!0,invisible:!I,style:pt(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var v=h;if(f){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,X.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-_,height:p+_}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[it(r[0],[0,100],n,!0),it(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];gs(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ln([it(a[0],o,l,!0),it(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ln(i.slice()),o=this._size;N([0,1],function(v){var p=n.handles[v],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();gs(0,l,o,0,u.minSpan!=null?it(u.minSpan,s,o,!0):null,u.maxSpan!=null?it(u.maxSpan,s,o,!0):null),this._range=Ln([it(l[0],o,s,!0),it(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(oo(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Lh({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?kpe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=bH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(TL);function Epe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Rpe(t){return t==="vertical"?"ns-resize":"ew-resize"}function HH(t){t.registerComponentModel(Mpe),t.registerComponentView(Ipe),CL(t)}function Npe(t){Oe(GH),Oe(HH)}var WH={get:function(t,e,r){var n=ye((Ope[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},Ope={color:{active:["#006edd","#e0ffff"],inactive:[X.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},cz=hr.mapVisual,zpe=hr.eachVisual,Bpe=ee,fz=N,Vpe=Ln,Fpe=it,Qy=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&EH(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=BT(this.option.controller,n,r),this.targetVisuals=BT(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=ff(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){N(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=Vpe([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Re(a,i),Re(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Bpe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,v){var p=f[h],g=f[v];p&&!g&&(g=f[v]={},fz(p,function(m,y){if(hr.isValidType(y)){var _=WH.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";fz(this.stateList,function(y){var _=this.itemSize,S=f[y];S||(S=f[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&ye(h)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=v&&ye(v)||(s?_[0]:[_[0],_[0]])),S.symbol=cz(S.symbol,function(C){return C==="none"?m:C});var b=S.symbolSize;if(b!=null){var T=-1/0;zpe(b,function(C){C>T&&(T=C)}),S.symbolSize=cz(b,function(C){return Fpe(C,[0,T],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:X.color.transparent,borderColor:X.color.borderTint,contentColor:X.color.theme[0],inactiveColor:X.color.disabled,borderWidth:0,padding:X.size.m,textGap:10,precision:0,textStyle:{color:X.color.secondary}},e}(Ve),hz=[20,140],jpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=hz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=hz[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),N(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Ln((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=vz(this,"outOfRange",this.getExtent()),i=vz(this,"inRange",this.option.range.slice()),a=[];function o(v,p){a.push({value:v,color:r(v,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);Gpe([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var v=Qi(r[f],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var g=Pi(i.handleLabelPoints[f],os(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),g=Qi(r,s,u,!0),m=l[0]-p/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var _=Pi(c.indicatorLabelPoint,os(f,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),T=this._orient,C=T==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:C?b:"middle",align:C?"center":b});var A={x:m,y:g,style:{fill:v}},D={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(A,E),S.animateTo(D,E)}else f.attr(A),S.attr(D);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var I=0;Io[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(n||mz(i))&&(v=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=CX(h,v);this._dispatchHighDown("downplay",xm(p[0],i)),this._dispatchHighDown("highlight",xm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Tl(r.target,function(l){var u=Ae(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function qpe(t,e,r,n){for(var i=e.targetVisuals[n],a=hr.prepareVisualTypes(i),o={color:Nd(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction($pe,Ype),N(Xpe,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(Kpe))}function YH(t){t.registerComponentModel(jpe),t.registerComponentView(Upe),$H(t)}var Qpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Jpe[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=hr.listVisualTypes(),a=this.isCategory();N(r.pieces,function(s){N(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),N(n,function(s,l){var u=!1;N(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&N(this.stateList,function(c){(r[c]||(r[c]={}))[l]=WH.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,N(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;N(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=hr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=hr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var v=r(h,f);c[0]===-1/0?i[0]=v:c[1]===1/0?i[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return N(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Cs(Qy.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Qy),Jpe={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function Sz(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var ege=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Sr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),N(l.viewPieceList,function(h){var v=h.piece,p=new _e;p.onclick=le(this._onItemClick,this,v),this._enableHoverLink(p,h.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:pt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:v.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),Il(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:xm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return ZH(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:pt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,N(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(UH);function XH(t){t.registerComponentModel(Qpe),t.registerComponentView(ege),$H(t)}function tge(t){Oe(YH),Oe(XH)}var rge=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:_V(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),nge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new rge(this);if(this._target=null,this.ecModel.eachSeries(function(i){ZR(i,null)}),this.shouldShow()){var n=this.getTarget();ZR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:X.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:X.color.neutral30,borderColor:X.color.neutral40,opacity:.3},z:10},e}(Ve),ige=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new fu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||X.color.neutral00);var l=or(r,i).refContainer,u=wt(VV(r,!0),l),c=s.lineWidth||0,f=this._contentRect=$l(u.clone(),c/2,!0,!0),h=new _e;a.add(h),h.setClipPath(new ze({shape:f.plain()}));var v=this._targetGroup=new _e;h.add(v);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new ze({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new ze({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),bz(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),bz(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=wt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=oi([],r.targetTrans),i=Li([],this._coordSys.transform,n);this._transThisToTarget=oi([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new cu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(wz(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(mt);function wz(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function bz(t,e){var r=Yl(t);j0(e.group,r.z,r.zlevel)}function age(t){t.registerComponentModel(nge),t.registerComponentView(ige)}var oge={label:{enabled:!0},decal:{show:!1}},Tz=Fe(),sge={};function lge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(oge);Re(n.label,t.getLocaleModel().get("aria"),!1),Re(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();t.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),Tz(h).scope=v}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(me(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var _=Db(h.ecModel,h.name,sge,t.getSeriesCount()),S=v.getVisual("decal");v.setVisual("decal",b(S,_))}else{var p=h.getRawData(),g={},m=Tz(h).scope;v.each(function(T){var C=v.getRawIndex(T);g[C]=T});var y=p.count();p.each(function(T){var C=g[T],A=p.getName(T)||T+"",D=Db(h.ecModel,A,m,y),E=v.getItemVisual(C,"decal");v.setItemVisual(C,"decal",b(E,D))})}function b(T,C){var A=T?J(J({},C),T):C;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Se(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=t.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),m;if(!(h<1)){var y=s();if(y){var _=f.get(["general","withTitle"]);m=o(_,{title:y})}else m=f.get(["general","withoutTitle"]);var S=[],b=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(b,{seriesCount:h}),t.eachSeries(function(D,E){if(E1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>v){var F=f.get(["data","partialData"]);k+=o(F,{displayCnt:v})}else k+=f.get(["data","allData"]);for(var G=f.get(["data","separator","middle"]),j=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),V=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},fge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):H3(e)?e:null;if(r==null){var n="";at(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),hge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),vge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,F]}function c(O,F,G,j){xc(O,G)&&xc(F,j)||i.push(O,F,G,j,G,j)}function f(O,F,G,j,U,V){var W=Math.abs(F-O),H=Math.tan(W/4)*4/3,Y=FD:I2&&n.push(i),n}function ZT(t,e,r,n,i,a,o,s,l,u){if(xc(t,r)&&xc(e,n)&&xc(i,o)&&xc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-t,v=s-e,p=Math.sqrt(h*h+v*v);h/=p,v/=p;var g=r-t,m=n-e,y=i-o,_=a-s,S=g*g+m*m,b=y*y+_*_;if(S=0&&D=0){l.push(o,s);return}var E=[],k=[];vs(t,r,i,o,.5,E),vs(e,n,a,s,.5,k),ZT(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,u),ZT(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,u)}function Lge(t,e){var r=UT(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=KH([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;vi,o=KH([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=t[s]/o.length,h=0;h1?null:new Te(g*l+t,g*u+e)}function Dge(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function Yu(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function kge(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),kge(e,u,c)}function Jy(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);Jy(t,a[0],i,n),Jy(t,a[1],r-i,n)}return n}function Ige(t,e){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(t&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function r0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=re(a,function(s,l){return{cp:s,z:jge(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function e8(t){return Nge(t.path,t.count)}function $T(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Gge(t,e,r){var n=[];function i(T){for(var C=0;C=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var Wge={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Ez(t)&&(u=t,c=e),Ez(e)&&(u=e,c=t);function f(y,_,S,b,T){var C=y.many,A=y.one;if(C.length===1&&!T){var D=_?C[0]:A,E=_?A:C[0];if(e0(D))f({many:[D],one:E},!0,S,b,!0);else{var k=s?Se({delay:s(S,b)},l):l;RL(D,E,k),a(D,E,D,E,k)}}else for(var I=Se({dividePath:Wge[r],individualDelay:s&&function(U,V,W,H){return s(U+S,b)}},l),z=_?Gge(C,A,I):Hge(A,C,I),O=z.fromIndividuals,F=z.toIndividuals,G=O.length,j=0;je.length,v=u?Rz(c,u):Rz(h?e:t,[h?t:e]),p=0,g=0;gt8))for(var a=n.getIndices(),o=0;o0&&C.group.traverse(function(D){D instanceof We&&!D.animators.length&&D.animateFrom({style:{opacity:0}},A)})})}function Vz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Fz(t){return ee(t)?t.sort().join(","):t}function Ro(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function Kge(t,e){var r=ve(),n=ve(),i=ve();return N(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=Vz(a),c=Fz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&N(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),N(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Vz(a),u=Fz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Ro(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Ro(s),data:s}]});else if(ee(l)){var f=[];N(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:Ro(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Ro(s)}]})}else{var h=i.get(l);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Ro(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Ro(s)})}}}}),r}function jz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ro(e.oldData[s]),groupIdDim:o.dimension})}),N(gt(t.to),function(o){var s=jz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ro(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&r8(i,a,n)}function Jge(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){N(gt(n.seriesTransition),function(i){N(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=Gz,n=Hz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function tme(){return new eme}var Gz=0,Hz=0;function rme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=NL(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var v=c?"S":"E";a[v][l.type].has=!0,a[v][l.type].span=h,a[v][l.type].inExtFrac=h/(s.vmax-s.vmin),a[v][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));N(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function nme(t,e,r,n,i,a){t!=="no"&&N(r,function(o){var s=NL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=i*3/4;c>s.vmin-f&&ce[0]&&r=0&&o<1-1e-5}N(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&N(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return N(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function OL(t,e){return XT(e)===XT(t)}function XT(t){return t.start+"_\0_"+t.end}function ame(t,e,r){var n=[];N(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),N(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=ws(n,function(u){return OL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return N(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function ome(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=ws(r,function(f){return OL(f.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function sme(t,e,r){var n={noNegative:!0},i=YT(t,r,n),a=YT(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var lme={vmin:"start",vmax:"end"};function ume(t,e){return e&&(t=t||{},t.break={type:lme[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function cme(){IK({createScaleBreakContext:tme,pruneTicksByBreak:nme,addBreaksToTicks:ime,parseAxisBreakOption:YT,identifyAxisBreak:OL,serializeAxisBreakIdentifier:XT,retrieveAxisBreakPairs:ame,getTicksLogTransformBreak:ome,logarithmicParseBreaksFromOption:sme,makeAxisLabelFormatterParamBreak:ume})}var Wz=Fe();function fme(t,e){var r=ws(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function hme(t){N(t,function(e){return e.shouldRemove=!0})}function vme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function dme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(E){return E.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),p=v.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,S=new _e({ignoreModelZ:!0}),b=a.isHorizontal(),T=Wz(e).visualList||(Wz(e).visualList=[]);hme(T);for(var C=function(E){var k=o[E][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),I[1]=V;de&&(ne=V);var je=[],xe=[];je[j]=I,xe[j]=z,!ue&&!de&&(je[j]+=K?-l:l,xe[j]-=K?l:-l),je[U]=ne,xe[U]=ne,H.push(je),Y.push(xe);var ge=void 0;if(ie_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,v=Math.min(h,h-c.x),p=Math.max(h,h-c.x),g=p<0?p:v>0?v:0;s=(h-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),qb(r[0],m),qb(r[1],y)}function mme(t,e){var r={breaks:[]};return N(e.breaks,function(n){if(n){var i=ws(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===Q0?!0:a===bG?!1:a===TG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function yme(){vie({adjustBreakLabelPair:gme,buildAxisBreakLine:pme,rectCoordBuildBreakAxis:dme,updateModelAxisBreak:mme})}function _me(t){_ie(t),cme(),yme()}function xme(){Fie(Sme)}function Sme(t,e){N(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=wme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function wme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof qc?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Cf(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Vme(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Fme(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function jme({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useRef(null),[a,o]=q.useState("connected"),s=q.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=q.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>$z.includes(y.role))),m},[t,a,s]),u=q.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=q.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),f=q.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),h=q.useMemo(()=>{const m=l.map(_=>{const S=Vme(_.latitude),b=Zz[S%Zz.length],T=$z.includes(_.role),C=_.node_num===r,A=f.has(_.node_num),D=r===null||C||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:Fme(_.role),itemStyle:{color:T?b:"#111827",borderColor:b,borderWidth:T?0:2,opacity:D?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:D?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const S=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:Bme(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),v=q.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),p=q.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=q.useMemo(()=>({click:p}),[p]);return q.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(v,{notMerge:!1,lazyUpdate:!0})},[v]),M.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[M.jsx(zme,{ref:i,option:v,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),M.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[M.jsx(D3,{size:14,className:"text-slate-500"}),M.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>M.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),M.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),M.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[M.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),M.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),M.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),M.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[M.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),M.jsxs("div",{className:"space-y-2",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),M.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),M.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function a8(t,e){const r=q.useRef(e);q.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function Gme(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const Hme=1;function Wme(t){return Object.freeze({__version:Hme,map:t})}function o8(t,e){return Object.freeze({...t,...e})}const s8=q.createContext(null),l8=s8.Provider;function c_(){const t=q.useContext(s8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function Ume(t){function e(r,n){const{instance:i,context:a}=t(r).current;return q.useImperativeHandle(n,()=>i),r.children==null?null:Ec.createElement(l8,{value:a},r.children)}return q.forwardRef(e)}function Zme(t){function e(r,n){const[i,a]=q.useState(!1),{instance:o}=t(r,a).current;q.useImperativeHandle(n,()=>o),q.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?h3.createPortal(r.children,s):null}return q.forwardRef(e)}function $me(t){function e(r,n){const{instance:i}=t(r).current;return q.useImperativeHandle(n,()=>i),null}return q.forwardRef(e)}function FL(t,e){const r=q.useRef();q.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function f_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function Yme(t,e){return function(n,i){const a=c_(),o=t(f_(n,a),a);return a8(a.map,n.attribution),FL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var QT={exports:{}};/* @preserve +`:"
",y=f.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,h)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Ae(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),v=this._renderMode,p=r.positionDefault,g=Mh([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,f),_=new v1;y.marker=_.makeTooltipMarker("item",ql(y.color),v);var S=uI(u.formatTooltip(c,!1,f)),b=g.get("order"),C=g.get("valueFormatter"),M=S.frag,A=M?pI(C?J({valueFormatter:C},M):M,_,v,b,a.get("useUTC"),g.get("textStyle")):S.text,D="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,D,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Ae(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Wr(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var v=r.positionDefault,p=Mh(f,this._tooltipModel,v?{position:v}:null),g=p.get("content"),m=Math.random()+"",y=new v1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=r.get("formatter");l=l||r.get("position");var v=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(h)if(se(h)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=h,_&&(v=zd(y.axisValue,v,m)),v=iM(v,i,!0)}else if(me(h)){var S=le(function(b,C){b===this._ticket&&(f.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,v=h(i,a,S)}else v=h;f.setContent(v,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var f=o.getSize(),h=r.get("align"),v=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(we(n)){var g=n;g.width=f[0],g.height=f[1];var m=wt(g,{width:u,height:c});i=m.x,a=m.y,h=null,v=null}else if(se(n)&&l){var y=bde(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Sde(i,a,o,u,c,h?null:20,v?null:20);i=y[0],a=y[1]}if(h&&(i-=YO(h)?f[0]/2:h==="right"?f[0]:0),v&&(a-=YO(v)?f[1]/2:v==="bottom"?f[1]:0),BH(r)){var y=wde(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&R(u,function(h,v){var p=f[v]||{},g=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===m.length,o&&R(g,function(y,_){var S=m[_];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&R(h.seriesDataIndices,function(y){var _=y.seriesIndex,S=n[_],b=a[_];S&&b&&b.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Ze.node||!n.getDom()||(td(this,"_updatePosition"),this._tooltipContent.dispose(),NT("itemTooltip",n))},e.type="tooltip",e}(mt);function Mh(t,e,r){var n=e.ecModel,i;r?(i=new We(r,n,n),i=new We(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof We&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new We(o,i,n)))}return i}function $O(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Sde(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function wde(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function bde(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function YO(t){return t==="center"||t==="middle"}function Tde(t,e,r){var n=M2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=vf(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Ae(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function Cde(t){Oe(Zd),t.registerComponentModel(sde),t.registerComponentView(xde),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Mde=["rect","polygon","keep","clear"];function Lde(t,e){var r=gt(t?t.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Ade(s),e&&!s.length&&s.push.apply(s,Mde)}}function Ade(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var XO=R;function qO(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function HT(t,e,r){var n={};return XO(e,function(a){var o=n[a]=i();XO(t[a],function(s,l){if(vr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new vr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new vr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function GH(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&qO(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&qO(e[i])?t[i]=ye(e[i]):delete t[i]})}function Pde(t,e,r,n,i,a){var o={};R(t,function(f){var h=vr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return dM(r,s,f)}function u(f,h){VF(r,s,f,h)}r.each(c);function c(f,h){s=f;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var p=n.call(i,f),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var S=m[y];g[S]&&g[S].applyVisual(f,l,u)}}}function Dde(t,e,r,n){var i={};return R(t,function(a){var o=vr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(C){return dM(s,f,C)}function c(C,M){VF(s,f,C,M)}for(var f,h=s.getStore();(f=o.next())!=null;){var v=s.getRawDataItem(f);if(!(v&&v.visualMap===!1))for(var p=n!=null?h.get(l,f):f,g=r(p),m=e[g],y=i[g],_=0,S=y.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&tz(e)}};function tz(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var zde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new oL(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){HH(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(mt),Bde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&GH(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return rz(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=rz(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:q.color.backgroundTint,borderColor:q.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:q.color.disabled},e}(Fe);function rz(t,e){return Ne({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new We(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Vde=["rect","polygon","lineX","lineY","keep","clear"],Fde=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:Vde.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Kn);function jde(t){t.registerComponentView(zde),t.registerComponentModel(Bde),t.registerPreprocessor(Lde),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Ide),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),rc("brush",Fde)}var Gde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:q.size.m,backgroundColor:q.color.transparent,borderColor:q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:q.color.primary},subtextStyle:{fontSize:12,color:q.color.quaternary}},e}(Fe),Hde=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:pt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=r.get("subtext"),v=new Xe({style:pt(s,{text:h,fill:s.getTextColor(),y:f.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,v.silent=!g&&!m,p&&c.on("click",function(){xy(p,"_"+r.get("target"))}),g&&v.on("click",function(){xy(g,"_"+r.get("subtarget"))}),Ae(c).eventData=Ae(v).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(v);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var S=sr(r,i),b=wt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),v.setStyle(C),y=a.getBoundingRect();var M=b.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var D=new ze({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(D)}},e.type="title",e}(mt);function Wde(t){t.registerComponentModel(Gde),t.registerComponentView(Hde)}var nz=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var f=rr(hf(u),""),h;we(u)?(h=ye(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Zr([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:q.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:q.color.secondary},data:[]},e}(Fe),WH=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=Ms(nz.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:q.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:q.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:q.color.tertiary},itemStyle:{color:q.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:q.color.accent60},itemStyle:{color:q.color.accent60,borderColor:q.color.accent60},controlStyle:{color:q.color.accent70,borderColor:q.color.accent70}},progress:{lineStyle:{color:q.color.accent30},itemStyle:{color:q.color.accent40}},data:[]}),e}(nz);Bt(WH,q0.prototype);var Ude=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(mt),Zde=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(fi),NS=Math.PI,iz=je(),$de=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Xde(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:NS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),v=h.get("show",!0),p=v?h.get("itemSize"):0,g=v?h.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*NS/180;var _,S,b,C=h.get("position",!0),M=v&&h.get("showPlayBtn",!0),A=v&&h.get("showPrevBtn",!0),D=v&&h.get("showNextBtn",!0),E=0,k=f;C==="left"||C==="bottom"?(M&&(_=[0,0],E+=m),A&&(S=[E,0],E+=m),D&&(b=[k-p,0],k-=m)):(M&&(_=[k-p,0],k-=m),A&&(S=[0,0],E+=m),D&&(b=[k-p,0],k-=m));var I=[E,k];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:b,axisExtent:I,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=hr(),l=o.x,u=o.y+o.height;Ii(s,s,[-l,-u]),po(s,s,-NS/2),Ii(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(a.getBoundingRect()),v=[i.x,i.y],p=[a.x,a.y];p[0]=v[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(v,f,c,1,m),S(p,h,c,1,1-m)}else{var m=g>=0?0:1;S(v,f,c,1,m),p[1]=v[1]+g}i.setPosition(v),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function _(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function S(b,C,M,A,D){b[A]+=M[A][D]-C[A][D]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Yde(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Zde("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),v=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=az(f,h,n,g);m.ensureState("emphasis").style=v.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),as(m);var y=Ae(m);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var f=c.tickValue,h=l.getItemModel(f),v=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,f),silent:!1,style:pt(v,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=pt(p),y.ensureState("progress").style=pt(g),n.add(y),as(y),iz(y).dataIndex=f,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",le(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",le(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function h(v,p,g,m){if(v){var y=Ei(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=qde(a,p+"Icon",_,{x:v[0],y:v[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),as(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=le(u._handlePointerDrag,u),f.ondragend=le(u._handlePointerDragend,u),oz(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){oz(f,u._progressLine,s,i,a)}};this._currentPointer=az(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Ln(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,v]}var jg={min:Ie(Fg,"min"),max:Ie(Fg,"max"),average:Ie(Fg,"average"),median:Ie(Fg,"median")};function md(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!rpe(e)&&!ee(e.coord)&&ee(i)){var a=UH(e,r,n,t);if(e=ye(e),e.type&&jg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=jg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&jg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=t0(r,r.mapDimension(c.dim),e.type))}}else for(var f=e.coord,h=0;h<2;h++)jg[f[h]]&&(f[h]=t0(r,r.mapDimension(i[h]),f[h]));return e}}function UH(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(npe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function npe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function yd(t,e){return t&&t.containData&&e.coord&&!UT(e)?t.containData(e.coord):!0}function ipe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!UT(e)&&!UT(r)?t.containZone(e.coord,r.coord):!0}function ZH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ls(o,e[a])}:function(r,n,i,a){return ls(r.value,e[a])}}function t0(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var RS=je(),VL=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=ve()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){RS(s).keep=!1}),n.eachSeries(function(s){var l=Sa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!RS(s).keep&&a.group.remove(s.group)}),ape(n,o,this.type)},e.prototype.markKeep=function(r){RS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Sa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?sV(l):N2(l))})}})},e.type="marker",e}(mt);function ape(t,e,r){t.eachSeries(function(n){var i=Sa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=Xl(i),s=o.z,l=o.zlevel;Z0(a.group,s,l)}})}function lz(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,f=u?o?o.height:0:a,h=u&&o?o.x:0,v=u&&o?o.y:0,p,g=oe(l.get("x"),c)+h,m=oe(l.get("y"),f)+v;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),_=t.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var ope=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markPoint");o&&(lz(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Gd),f=spe(o,r,n);n.setData(f),lz(n.getData(),r,a),f.each(function(h){var v=f.getItemModel(h),p=v.getShallow("symbol"),g=v.getShallow("symbolSize"),m=v.getShallow("symbolRotate"),y=v.getShallow("symbolOffset"),_=v.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(h),b=n.getDataParams(h);me(p)&&(p=p(S,b)),me(g)&&(g=g(S,b)),me(m)&&(m=m(S,b)),me(y)&&(y=y(S,b))}var C=v.getModel("itemStyle").getItemStyle(),M=v.get("z2"),A=Vd(l,"color");C.fill||(C.fill=A),f.setItemVisual(h,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(v){Ae(v).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(VL);function spe(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=re(r.get("data"),Ie(md,e));t&&(a=tt(a,Ie(yd,t)));var o=ZH(!!t,n);return i.initData(a,null,o),i}function lpe(t){t.registerComponentModel(tpe),t.registerComponentView(ope),t.registerPreprocessor(function(e){BL(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var upe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Sa),Gg=je(),cpe=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=wr(n.yAxis,n.xAxis);else{var u=UH(n,i,e,t);s=u.valueAxis;var c=LM(i,u.valueDataDim);l=t0(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,v=ye(n),p={coord:[]};v.type=null,v.coord=[],v.coord[h]=-1/0,p.coord[h]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[f]=p.coord[f]=l,a=[v,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[md(t,a[0]),md(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Ne(m[2],m[0]),Ne(m[2],m[1]),m};function r0(t){return!isNaN(t)&&!isFinite(t)}function uz(t,e,r,n){var i=1-t,a=n.dimensions[t];return r0(e[i])&&r0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function fpe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(uz(1,r,n,t)||uz(0,r,n,t)))return!0}return yd(t,e[0])&&yd(t,e[1])}function OS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,f=t.get(c[0],e),h=t.get(c[1],e);s=a.dataToPoint([f,h])}if(gs(a,"cartesian2d")){var v=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;r0(t.get(c[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):r0(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var hpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Gg(o).from,u=Gg(o).to;l.each(function(c){OS(l,c,!0,a,i),OS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new iL);this.group.add(c.group);var f=vpe(o,r,n),h=f.from,v=f.to,p=f.line;Gg(n).from=h,Gg(n).to=v,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),f.from.each(function(b){S(h,b,!0),S(v,b,!1)}),p.each(function(b){var C=p.getItemModel(b),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(b,[h.getItemLayout(b),v.getItemLayout(b)]);var A=C.get("z2");M.stroke==null&&(M.stroke=h.getItemVisual(b,"style").fill),p.setItemVisual(b,{z2:pe(A,0),fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:v.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(b,"symbolOffset"),toSymbolRotate:v.getItemVisual(b,"symbolRotate"),toSymbolSize:v.getItemVisual(b,"symbolSize"),toSymbol:v.getItemVisual(b,"symbol"),style:M})}),c.updateData(p),f.line.eachItemGraphicEl(function(b){Ae(b).dataModel=n,b.traverse(function(C){Ae(C).dataModel=n})});function S(b,C,M){var A=b.getItemModel(C);OS(b,C,M,r,a);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Vd(l,"color")),b.setItemVisual(C,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[M?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[M?0:1]),symbolSize:pe(A.get("symbolSize"),m[M?0:1]),symbol:pe(A.get("symbol",!0),g[M?0:1]),style:D})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(VL);function vpe(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Zr(n,r),a=new Zr(n,r),o=new Zr([],r),s=re(r.get("data"),Ie(cpe,e,t,r));t&&(s=tt(s,Ie(fpe,t)));var l=ZH(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function dpe(t){t.registerComponentModel(upe),t.registerComponentView(hpe),t.registerPreprocessor(function(e){BL(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var ppe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Sa),Hg=je(),gpe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=md(t,i),s=md(t,a),l=o.coord,u=s.coord;l[0]=wr(l[0],-1/0),l[1]=wr(l[1],-1/0),u[0]=wr(u[0],1/0),u[1]=wr(u[1],1/0);var c=P0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function n0(t){return!isNaN(t)&&!isFinite(t)}function cz(t,e,r,n){var i=1-t;return n0(e[i])&&n0(r[i])}function mpe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return gs(t,"cartesian2d")?r&&n&&(cz(1,r,n)||cz(0,r,n))?!0:ipe(t,i,a):yd(t,i)||yd(t,a)}function fz(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),f=t.getValues(["x1","y1"],e),h=a.clampData(c),v=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>v[0]?f[0]:c[0]:p[0]=h[0]>v[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>v[1]?f[1]:c[1]:p[1]=h[1]>v[1]?c[1]:f[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(gs(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);n0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):n0(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var hz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],ype=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Sa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(hz,function(f){return fz(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var f=_pe(o,r,n);n.setData(f),f.each(function(h){var v=re(hz,function(k){return fz(f,h,k,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],S=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Ln(_),Ln(S);var b=!(m[0]>_[1]||m[1]<_[0]||y[0]>S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:q.size.m,align:"auto",backgroundColor:q.color.transparent,borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:q.color.disabled,inactiveBorderColor:q.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:q.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:q.color.tertiary,borderWidth:1,borderColor:q.color.border},emphasis:{selectorLabel:{show:!0,color:q.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Fe),$u=Ie,$T=R,Wg=_e,$H=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new Wg),this.group.add(this._selectorGroup=new Wg),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=sr(r,i).refContainer,f=r.getBoxLayoutParams(),h=r.get("padding"),v=wt(f,c,h),p=this.layoutInner(r,o,v,a,l,u),g=wt(Se({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=RH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=ve(),f=n.get("selectedMode"),h=n.get("triggerEvent"),v=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&v.push(p.id)}),$T(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` +`)){var _=new Wg;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var b=S.getData(),C=b.getVisual("legendLineStyle")||{},M=b.getVisual("legendIcon"),A=b.getVisual("style"),D=this._createItem(S,y,g,p,n,r,C,A,M,f,a);D.on("click",$u(vz,y,null,a,v)).on("mouseover",$u(YT,S.name,null,a,v)).on("mouseout",$u(XT,S.name,null,a,v)),i.ssr&&D.eachChild(function(E){var k=Ae(E);k.seriesIndex=S.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&D.eachChild(function(E){m.packEventData(E,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(E){var k=this;if(!c.get(y)&&E.legendVisualProvider){var I=E.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),F=I.getItemVisual(z,"legendIcon"),G=Ur(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ti(G,"rgba")}));var j=this._createItem(E,y,g,p,n,r,{},O,F,f,a);j.on("click",$u(vz,null,y,a,v)).on("mouseover",$u(YT,null,y,a,v)).on("mouseout",$u(XT,null,y,a,v)),i.ssr&&j.eachChild(function(U){var V=Ae(U);V.seriesIndex=E.seriesIndex,V.dataIndex=g,V.ssrType="legend"}),h&&j.eachChild(function(U){k.packEventData(U,n,E,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Ae(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();$T(r,function(u){var c=u.type,f=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(f);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);dr(f,{normal:h,emphasis:v},{defaultText:u.title}),as(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){var v=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var b=wpe(c,a,l,u,v,m,h),C=new Wg,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(bpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:b.itemStyle,symbolKeepAspect:_}))}var D=s==="left"?p+5:-5,E=s,k=o.get("formatter"),I=n;se(k)&&k?I=k.replace("{name}",n??""):me(k)&&(I=k(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:pt(M,{text:I,x:D,y:g/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var O=new ze({shape:C.getBoundingRect(),style:{fill:"transparent"}}),F=a.getModel("tooltip");return F.get("show")&&mo({el:O,componentModel:o,itemName:n,itemTooltipOption:F.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!f,this.getContentGroup().add(C),as(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();El(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){El("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?v[g]+=c[m]+p:f[g]+=h[m]+p,v[1-g]+=c[y]/2-h[y]/2,u.x=v[0],u.y=v[1],l.x=f[0],l.y=f[1];var S={x:0,y:0};return S[m]=c[m]+p+h[m],S[y]=Math.max(c[y],h[y]),S[_]=Math.min(0,h[_]+v[1-g]),S}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(mt);function wpe(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),$T(m,function(_,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:Kc(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var h=e.getModel("lineStyle"),v=h.getLineStyle();if(s(v,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function bpe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=q.color.neutral00,r.style.lineWidth=2),r}function vz(t,e,r,n){XT(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),YT(t,e,r,n)}function YH(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-v.x,-v.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var b=r.get("pageButtonPosition",!0);b==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+S}_[1-a]+=v[s]/2-p[s]/2,c.setPosition(m),f.setPosition(y),h.setPosition(_);var C={x:0,y:0};if(C[o]=g?i[o]:v[o],C[s]=Math.max(v[s],p[s]),C[l]=Math.min(0,p[l]+_[1-a]),f.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-S,0),M[s]=C[s],f.setClipPath(new ze({shape:M})),f.__rectSize=M[o]}else h.eachChild(function(D){D.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,v=i.childOfName(c);v&&(v.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=zS[o],l=BS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,v=h?1:0,p={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=b(f);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=h;++m)S=b(c[m]),(!S&&_.e>y.s+a||S&&!C(S,y.s))&&(_.i>y.i?y=_:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=S;for(var m=u-1,y=g,_=g,S=null;m>=-1;--m)S=b(c[m]),(!S||!C(_,S.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=S;return p;function b(M){if(M){var A=M.getBoundingRect(),D=A[l]+M[l];return{s:D,e:D+A[s],i:M.__legendDataIndex}}}function C(M,A){return M.e>=A&&M.s<=A+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}($H);function Ape(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function Ppe(t){Oe(XH),t.registerComponentModel(Mpe),t.registerComponentView(Lpe),Ape(t)}function Dpe(t){Oe(XH),Oe(Ppe)}var kpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=Ms(gd.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(gd),FL=je();function Ipe(t,e,r){FL(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function Epe(t,e){for(var r=FL(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Bpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=FL(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=ve());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=IH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Npe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){qH(i,a);return}var c=zpe(l,a,r);o.enable(c.controlType,c.opt),Tf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Vpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),Ipe(i,r,{pan:le(VS.pan,this),zoom:le(VS.zoom,this),scrollMove:le(VS.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Epe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(IL),VS={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=FS[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ms(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:mz(function(t,e,r,n,i,a){var o=FS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:mz(function(t,e,r,n,i,a){var o=FS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function mz(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(ms(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var FS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function KH(t){EL(t),t.registerComponentModel(kpe),t.registerComponentView(Vpe),Bpe(t)}var Fpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ms(gd.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:q.color.accent10,borderRadius:0,backgroundColor:q.color.transparent,dataBackground:{lineStyle:{color:q.color.accent30,width:.5},areaStyle:{color:q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:q.color.accent40,width:.5},areaStyle:{color:q.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:q.color.neutral00,borderColor:q.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:q.color.tertiary},brushSelect:!0,brushStyle:{color:q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(gd),Ph=ze,jpe=1,jS=30,Gpe=7,Dh="horizontal",yz="vertical",Hpe=5,Wpe=["line","bar","candlestick","scatter"],Upe={easing:"cubicOut",duration:100,delay:0},Zpe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),Tf(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){td(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Gpe:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Dh?{right:o.width-s.x-s.width,top:o.height-jS-l-a,width:s.width,height:jS}:{right:l,top:s.y,width:jS,height:s.height},c=su(r.option);R(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=wt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===yz&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Dh&&!o?{scaleY:l?1:-1,scaleX:1}:i===Dh&&o?{scaleY:l?1:-1,scaleX:-1}:i===yz&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Ph({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Ph({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),S=n[0]/(f[1]-f[0]),b=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,F){if(M>0&&F%M){b||(C+=_);return}C=b?(+z-f[0])*S:C+_;var G=O==null||isNaN(O)||O==="",j=G?0:it(O,h,p,!0);G&&!A&&F?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([C,0]),y.push([C,0])),G||(m.push([C,j]),y.push([C,j])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var D=this.dataZoomModel;function E(z){var O=D.getModel(z?"selectedDataBackground":"dataBackground"),F=new _e,G=new Or({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),j=new Tr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return F.add(G),F.add(j),F}for(var k=0;k<3;k++){var I=E(k===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();R(l,function(u){if(!i&&!(n!==!0&&Ee(Wpe,u.get("type"))<0)){var c=a.getComponent(Zo(o),s).axis,f=$pe(o),h,v=u.coordinateSystem;f!=null&&v.getOtherAxis&&(h=v.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Ph({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Ph({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:jpe,fill:q.color.transparent}})),R([0,1],function(S){var b=l.get("handleIcon");!by[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var C=Ut(b,-1,0,2,2,null,!0);C.attr({cursor:Ype(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var M=C.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,C.setStyle(l.getModel("handleStyle").getItemStyle()),C.style.strokeNoScale=!0,C.rectHover=!0,C.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),as(C);var D=l.get("handleColor");D!=null&&(C.style.fill=D),o.add(i[S]=C);var E=l.getModel("textStyle"),k=l.get("handleLabel")||{},I=k.show||!1;r.add(a[S]=new Xe({silent:!0,invisible:!I,style:pt(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var v=h;if(f){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new ze({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,q.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));v=n.moveZone=new ze({invisible:!0,shape:{y:s[1]-_,height:p+_}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[it(r[0],[0,100],n,!0),it(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ms(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Ln([it(a[0],o,l,!0),it(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Ln(i.slice()),o=this._size;R([0,1],function(v){var p=n.handles[v],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[v]+(v?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ms(0,l,o,0,u.minSpan!=null?it(u.minSpan,s,o,!0):null,u.maxSpan!=null?it(u.maxSpan,s,o,!0):null),this._range=Ln([it(l[0],o,s,!0),it(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(oo(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Ph({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Upe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=IH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(IL);function $pe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Ype(t){return t==="vertical"?"ns-resize":"ew-resize"}function QH(t){t.registerComponentModel(Fpe),t.registerComponentView(Zpe),EL(t)}function Xpe(t){Oe(KH),Oe(QH)}var JH={get:function(t,e,r){var n=ye((qpe[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},qpe={color:{active:["#006edd","#e0ffff"],inactive:[q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},_z=vr.mapVisual,Kpe=vr.eachVisual,Qpe=ee,xz=R,Jpe=Ln,ege=it,i0=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&GH(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=HT(this.option.controller,n,r),this.targetVisuals=HT(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=vf(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[f(r[0]),f(r[1])]:f(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=Jpe([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ne(a,i),Ne(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){Qpe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,v){var p=f[h],g=f[v];p&&!g&&(g=f[v]={},xz(p,function(m,y){if(vr.isValidType(y)){var _=JH.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,v=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";xz(this.stateList,function(y){var _=this.itemSize,S=f[y];S||(S=f[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&ye(h)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=v&&ye(v)||(s?_[0]:[_[0],_[0]])),S.symbol=_z(S.symbol,function(M){return M==="none"?m:M});var b=S.symbolSize;if(b!=null){var C=-1/0;Kpe(b,function(M){M>C&&(C=M)}),S.symbolSize=_z(b,function(M){return ege(M,[0,C],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:q.color.transparent,borderColor:q.color.borderTint,contentColor:q.color.theme[0],inactiveColor:q.color.disabled,borderWidth:0,padding:q.size.m,textGap:10,precision:0,textStyle:{color:q.color.secondary}},e}(Fe),Sz=[20,140],tge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=Sz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=Sz[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Ln((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=wz(this,"outOfRange",this.getExtent()),i=wz(this,"inRange",this.option.range.slice()),a=[];function o(v,p){a.push({value:v,color:r(v,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);rge([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var v=Qi(r[f],[0,l[1]],u,!0),p=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var g=Pi(i.handleLabelPoints[f],os(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},v=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),g=Qi(r,s,u,!0),m=l[0]-p/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var _=Pi(c.indicatorLabelPoint,os(f,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?b:"middle",align:M?"center":b});var A={x:m,y:g,style:{fill:v}},D={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(A,E),S.animateTo(D,E)}else f.attr(A),S.attr(D);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var I=0;Io[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,v=[];(n||Mz(i))&&(v=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=VX(h,v);this._dispatchHighDown("downplay",bm(p[0],i)),this._dispatchHighDown("highlight",bm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Cl(r.target,function(l){var u=Ae(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function cge(t,e,r,n){for(var i=e.targetVisuals[n],a=vr.prepareVisualTypes(i),o={color:Vd(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(sge,lge),R(uge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(fge))}function n8(t){t.registerComponentModel(tge),t.registerComponentView(age),r8(t)}var hge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],vge[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=vr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=JH.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=vr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=vr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var v=r(h,f);c[0]===-1/0?i[0]=v:c[1]===1/0?i[1]=v:n.push({value:c[0],color:v},{value:c[1],color:v})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return R(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ms(i0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(i0),vge={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function Dz(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var dge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=wr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(h){var v=h.piece,p=new _e;p.onclick=le(this._onItemClick,this,v),this._enableHoverLink(p,h.indexInModelPieceList);var g=n.getRepresentValue(v);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],f),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:pt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:v.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:f}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),El(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:bm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return t8(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:pt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(e8);function i8(t){t.registerComponentModel(hge),t.registerComponentView(dge),r8(t)}function pge(t){Oe(n8),Oe(i8)}var gge=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:AV(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),mge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new gge(this);if(this._target=null,this.ecModel.eachSeries(function(i){tR(i,null)}),this.shouldShow()){var n=this.getTarget();tR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:q.color.neutral30,borderColor:q.color.neutral40,opacity:.3},z:10},e}(Fe),yge=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new hu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||q.color.neutral00);var l=sr(r,i).refContainer,u=wt(YV(r,!0),l),c=s.lineWidth||0,f=this._contentRect=Yl(u.clone(),c/2,!0,!0),h=new _e;a.add(h),h.setClipPath(new ze({shape:f.plain()}));var v=this._targetGroup=new _e;h.add(v);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new ze({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);h.add(this._windowRect=new ze({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),Iz(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Iz(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=wt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=oi([],r.targetTrans),i=Li([],this._coordSys.transform,n);this._transThisToTarget=oi([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new fu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(kz(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(kz(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(mt);function kz(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function Iz(t,e){var r=Xl(t);Z0(e.group,r.z,r.zlevel)}function _ge(t){t.registerComponentModel(mge),t.registerComponentView(yge)}var xge={label:{enabled:!0},decal:{show:!1}},Ez=je(),Sge={};function wge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(xge);Ne(n.label,t.getLocaleModel().get("aria"),!1),Ne(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var f=ve();t.eachSeries(function(h){if(!h.isColorBySeries()){var v=f.get(h.type);v||(v={},f.set(h.type,v)),Ez(h).scope=v}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(me(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var _=Rb(h.ecModel,h.name,Sge,t.getSeriesCount()),S=v.getVisual("decal");v.setVisual("decal",b(S,_))}else{var p=h.getRawData(),g={},m=Ez(h).scope;v.each(function(C){var M=v.getRawIndex(C);g[M]=C});var y=p.count();p.each(function(C){var M=g[C],A=p.getName(C)||C+"",D=Rb(h.ecModel,A,m,y),E=v.getItemVisual(M,"decal");v.setItemVisual(M,"decal",b(E,D))})}function b(C,M){var A=C?J(J({},M),C):M;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),f=r.getModel("label");if(f.option=Se(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=t.getSeriesCount(),v=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),m;if(!(h<1)){var y=s();if(y){var _=f.get(["general","withTitle"]);m=o(_,{title:y})}else m=f.get(["general","withoutTitle"]);var S=[],b=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(b,{seriesCount:h}),t.eachSeries(function(D,E){if(E1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>v){var F=f.get(["data","partialData"]);k+=o(F,{displayCnt:v})}else k+=f.get(["data","allData"]);for(var G=f.get(["data","separator","middle"]),j=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),V=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Cge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):Q3(e)?e:null;if(r==null){var n="";at(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),Mge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),Lge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,F]}function c(O,F,G,j){Sc(O,G)&&Sc(F,j)||i.push(O,F,G,j,G,j)}function f(O,F,G,j,U,V){var W=Math.abs(F-O),H=Math.tan(W/4)*4/3,X=FD:I2&&n.push(i),n}function KT(t,e,r,n,i,a,o,s,l,u){if(Sc(t,r)&&Sc(e,n)&&Sc(i,o)&&Sc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-t,v=s-e,p=Math.sqrt(h*h+v*v);h/=p,v/=p;var g=r-t,m=n-e,y=i-o,_=a-s,S=g*g+m*m,b=y*y+_*_;if(S=0&&D=0){l.push(o,s);return}var E=[],k=[];ds(t,r,i,o,.5,E),ds(e,n,a,s,.5,k),KT(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,u),KT(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,u)}function jge(t,e){var r=qT(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=o8([l,u],c?0:1,e),h=(c?s:u)/f.length,v=0;vi,o=o8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=t[s]/o.length,h=0;h1?null:new Te(g*l+t,g*u+e)}function Wge(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function Xu(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function Uge(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),Uge(e,u,c)}function a0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);a0(t,a[0],i,n),a0(t,a[1],r-i,n)}return n}function Zge(t,e){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(t&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function l0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=re(a,function(s,l){return{cp:s,z:tme(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function u8(t){return Xge(t.path,t.count)}function QT(){return{fromIndividuals:[],toIndividuals:[],count:0}}function rme(t,e,r){var n=[];function i(C){for(var M=0;M=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var ime={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;Gz(t)&&(u=t,c=e),Gz(e)&&(u=e,c=t);function f(y,_,S,b,C){var M=y.many,A=y.one;if(M.length===1&&!C){var D=_?M[0]:A,E=_?A:M[0];if(o0(D))f({many:[D],one:E},!0,S,b,!0);else{var k=s?Se({delay:s(S,b)},l):l;GL(D,E,k),a(D,E,D,E,k)}}else for(var I=Se({dividePath:ime[r],individualDelay:s&&function(U,V,W,H){return s(U+S,b)}},l),z=_?rme(M,A,I):nme(A,M,I),O=z.fromIndividuals,F=z.toIndividuals,G=O.length,j=0;je.length,v=u?Hz(c,u):Hz(h?e:t,[h?t:e]),p=0,g=0;gc8))for(var a=n.getIndices(),o=0;o0&&M.group.traverse(function(D){D instanceof Ue&&!D.animators.length&&D.animateFrom({style:{opacity:0}},A)})})}function Yz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Xz(t){return ee(t)?t.sort().join(","):t}function No(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function fme(t,e){var r=ve(),n=ve(),i=ve();return R(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=Yz(a),c=Xz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=Yz(a),u=Xz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:No(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:No(s),data:s}]});else if(ee(l)){var f=[];R(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:No(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:No(s)}]})}else{var h=i.get(l);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:No(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:No(s)})}}}}),r}function qz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:No(e.oldData[s]),groupIdDim:o.dimension})}),R(gt(t.to),function(o){var s=qz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:No(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&f8(i,a,n)}function vme(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){R(gt(n.seriesTransition),function(i){R(gt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=Kz,n=Qz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function pme(){return new dme}var Kz=0,Qz=0;function gme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=HL(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var v=c?"S":"E";a[v][l.type].has=!0,a[v][l.type].span=h,a[v][l.type].inExtFrac=h/(s.vmax-s.vmin),a[v][l.type].val=l.val}else n[l.type].span+=h,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function mme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=HL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=i*3/4;c>s.vmin-f&&ce[0]&&r=0&&o<1-1e-5}R(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Mn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(v){s[v]<0&&(s[v]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function WL(t,e){return eC(e)===eC(t)}function eC(t){return t.start+"_\0_"+t.end}function _me(t,e,r){var n=[];R(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),R(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=bs(n,function(u){return WL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function xme(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=bs(r,function(f){return WL(f.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function Sme(t,e,r){var n={noNegative:!0},i=JT(t,r,n),a=JT(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var wme={vmin:"start",vmax:"end"};function bme(t,e){return e&&(t=t||{},t.break={type:wme[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Tme(){ZK({createScaleBreakContext:pme,pruneTicksByBreak:mme,addBreaksToTicks:yme,parseAxisBreakOption:JT,identifyAxisBreak:WL,serializeAxisBreakIdentifier:eC,retrieveAxisBreakPairs:_me,getTicksLogTransformBreak:xme,logarithmicParseBreaksFromOption:Sme,makeAxisLabelFormatterParamBreak:bme})}var Jz=je();function Cme(t,e){var r=bs(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Mme(t){R(t,function(e){return e.shouldRemove=!0})}function Lme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Ame(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(E){return E.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),h=s.get("zigzagZ"),v=s.getModel("itemStyle"),p=v.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,S=new _e({ignoreModelZ:!0}),b=a.isHorizontal(),C=Jz(e).visualList||(Jz(e).visualList=[]);Mme(C);for(var M=function(E){var k=o[E][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),I[1]=V;de&&(ne=V);var Ge=[],xe=[];Ge[j]=I,xe[j]=z,!ue&&!de&&(Ge[j]+=K?-l:l,xe[j]-=K?l:-l),Ge[U]=ne,xe[U]=ne,H.push(Ge),X.push(xe);var ge=void 0;if(ie_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,v=Math.min(h,h-c.x),p=Math.max(h,h-c.x),g=p<0?p:v>0?v:0;s=(h-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),tT(r[0],m),tT(r[1],y)}function kme(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=bs(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===n_?!0:a===IG?!1:a===EG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function Ime(){Lie({adjustBreakLabelPair:Dme,buildAxisBreakLine:Pme,rectCoordBuildBreakAxis:Ame,updateModelAxisBreak:kme})}function Eme(t){Eie(t),Tme(),Ime()}function Nme(){eae(Rme)}function Rme(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Ome(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function Ome(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof Qc?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Lf(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Jme(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function eye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function tye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Y.useRef(null),[a,o]=Y.useState("connected"),s=Y.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=Y.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>r5.includes(y.role))),m},[t,a,s]),u=Y.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=Y.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),f=Y.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),h=Y.useMemo(()=>{const m=l.map(_=>{const S=Jme(_.latitude),b=t5[S%t5.length],C=r5.includes(_.role),M=_.node_num===r,A=f.has(_.node_num),D=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:eye(_.role),itemStyle:{color:C?b:"#111827",borderColor:b,borderWidth:C?0:2,opacity:D?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:D?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const S=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:Qme(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),v=Y.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:h.nodes,links:h.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[h]),p=Y.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=Y.useMemo(()=>({click:p}),[p]);return Y.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(v,{notMerge:!1,lazyUpdate:!0})},[v]),T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsx(Kme,{ref:i,option:v,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),T.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[T.jsx(o2,{size:14,className:"text-slate-500"}),T.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>T.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),T.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),T.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),T.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),T.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),T.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function d8(t,e){const r=Y.useRef(e);Y.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function rye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const nye=1;function iye(t){return Object.freeze({__version:nye,map:t})}function p8(t,e){return Object.freeze({...t,...e})}const g8=Y.createContext(null),m8=g8.Provider;function p_(){const t=Y.useContext(g8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function aye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return Y.useImperativeHandle(n,()=>i),r.children==null?null:Nc.createElement(m8,{value:a},r.children)}return Y.forwardRef(e)}function oye(t){function e(r,n){const[i,a]=Y.useState(!1),{instance:o}=t(r,a).current;Y.useImperativeHandle(n,()=>o),Y.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?w3.createPortal(r.children,s):null}return Y.forwardRef(e)}function sye(t){function e(r,n){const{instance:i}=t(r).current;return Y.useImperativeHandle(n,()=>i),null}return Y.forwardRef(e)}function YL(t,e){const r=Y.useRef();Y.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function g_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function lye(t,e){return function(n,i){const a=p_(),o=t(g_(n,a),a);return d8(a.map,n.attribution),YL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var nC={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t,e){(function(r,n){n(e)})(zW,function(r){var n="1.9.4";function i(d){var x,w,P,R;for(w=1,P=arguments.length;w"u"||!L||!L.Mixin)){d=S(d)?d:[d];for(var x=0;x0?Math.floor(d):Math.ceil(d)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(d){return this.clone()._add(H(d))},_add:function(d){return this.x+=d.x,this.y+=d.y,this},subtract:function(d){return this.clone()._subtract(H(d))},_subtract:function(d){return this.x-=d.x,this.y-=d.y,this},divideBy:function(d){return this.clone()._divideBy(d)},_divideBy:function(d){return this.x/=d,this.y/=d,this},multiplyBy:function(d){return this.clone()._multiplyBy(d)},_multiplyBy:function(d){return this.x*=d,this.y*=d,this},scaleBy:function(d){return new V(this.x*d.x,this.y*d.y)},unscaleBy:function(d){return new V(this.x/d.x,this.y/d.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(d){d=H(d);var x=d.x-this.x,w=d.y-this.y;return Math.sqrt(x*x+w*w)},equals:function(d){return d=H(d),d.x===this.x&&d.y===this.y},contains:function(d){return d=H(d),Math.abs(d.x)<=Math.abs(this.x)&&Math.abs(d.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(d,x,w){return d instanceof V?d:S(d)?new V(d[0],d[1]):d==null?d:typeof d=="object"&&"x"in d&&"y"in d?new V(d.x,d.y):new V(d,x,w)}function Y(d,x){if(d)for(var w=x?[d,x]:d,P=0,R=w.length;P=this.min.x&&w.x<=this.max.x&&x.y>=this.min.y&&w.y<=this.max.y},intersects:function(d){d=K(d);var x=this.min,w=this.max,P=d.min,R=d.max,B=R.x>=x.x&&P.x<=w.x,Z=R.y>=x.y&&P.y<=w.y;return B&&Z},overlaps:function(d){d=K(d);var x=this.min,w=this.max,P=d.min,R=d.max,B=R.x>x.x&&P.xx.y&&P.y=x.lat&&R.lat<=w.lat&&P.lng>=x.lng&&R.lng<=w.lng},intersects:function(d){d=ie(d);var x=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>=x.lat&&P.lat<=w.lat,Z=R.lng>=x.lng&&P.lng<=w.lng;return B&&Z},overlaps:function(d){d=ie(d);var x=this._southWest,w=this._northEast,P=d.getSouthWest(),R=d.getNorthEast(),B=R.lat>x.lat&&P.latx.lng&&P.lng1,C8=function(){var d=!1;try{var x=Object.defineProperty({},"passive",{get:function(){d=!0}});window.addEventListener("testPassiveEventSupport",f,x),window.removeEventListener("testPassiveEventSupport",f,x)}catch{}return d}(),M8=function(){return!!document.createElement("canvas").getContext}(),d_=!!(document.createElementNS&&rt("svg").createSVGRect),L8=!!d_&&function(){var d=document.createElement("div");return d.innerHTML="",(d.firstChild&&d.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),A8=!d_&&function(){try{var d=document.createElement("div");d.innerHTML='';var x=d.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),P8=navigator.platform.indexOf("Mac")===0,D8=navigator.platform.indexOf("Linux")===0;function Vi(d){return navigator.userAgent.toLowerCase().indexOf(d)>=0}var Ne={ie:pr,ielt9:zr,edge:zi,webkit:Bi,android:vu,android23:GL,androidStock:p8,opera:h_,chrome:HL,gecko:WL,safari:g8,phantom:UL,opera12:ZL,win:m8,ie3d:$L,webkit3d:v_,gecko3d:YL,any3d:y8,mobile:Df,mobileWebkit:_8,mobileWebkit3d:x8,msPointer:XL,pointer:qL,touch:S8,touchNative:KL,mobileOpera:w8,mobileGecko:b8,retina:T8,passiveEvents:C8,canvas:M8,svg:d_,vml:A8,inlineSvg:L8,mac:P8,linux:D8},QL=Ne.msPointer?"MSPointerDown":"pointerdown",JL=Ne.msPointer?"MSPointerMove":"pointermove",eA=Ne.msPointer?"MSPointerUp":"pointerup",tA=Ne.msPointer?"MSPointerCancel":"pointercancel",p_={touchstart:QL,touchmove:JL,touchend:eA,touchcancel:tA},rA={touchstart:O8,touchmove:Wd,touchend:Wd,touchcancel:Wd},du={},nA=!1;function k8(d,x,w){return x==="touchstart"&&N8(),rA[x]?(w=rA[x].bind(this,w),d.addEventListener(p_[x],w,!1),w):(console.warn("wrong event specified:",x),f)}function I8(d,x,w){if(!p_[x]){console.warn("wrong event specified:",x);return}d.removeEventListener(p_[x],w,!1)}function E8(d){du[d.pointerId]=d}function R8(d){du[d.pointerId]&&(du[d.pointerId]=d)}function iA(d){delete du[d.pointerId]}function N8(){nA||(document.addEventListener(QL,E8,!0),document.addEventListener(JL,R8,!0),document.addEventListener(eA,iA,!0),document.addEventListener(tA,iA,!0),nA=!0)}function Wd(d,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var w in du)x.touches.push(du[w]);x.changedTouches=[x],d(x)}}function O8(d,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),Wd(d,x)}function z8(d){var x={},w,P;for(P in d)w=d[P],x[P]=w&&w.bind?w.bind(d):w;return d=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var B8=200;function V8(d,x){d.addEventListener("dblclick",x);var w=0,P;function R(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var Z=uA(B);if(!(Z.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!Z.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=B8?(P++,P===2&&x(z8(B))):P=1,w=Q}}}return d.addEventListener("click",R),{dblclick:x,simDblclick:R}}function F8(d,x){d.removeEventListener("dblclick",x.dblclick),d.removeEventListener("click",x.simDblclick)}var g_=$d(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kf=$d(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),aA=kf==="webkitTransition"||kf==="OTransition"?kf+"End":"transitionend";function oA(d){return typeof d=="string"?document.getElementById(d):d}function If(d,x){var w=d.style[x]||d.currentStyle&&d.currentStyle[x];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(d,null);w=P?P[x]:null}return w==="auto"?null:w}function vt(d,x,w){var P=document.createElement(d);return P.className=x||"",w&&w.appendChild(P),P}function It(d){var x=d.parentNode;x&&x.removeChild(d)}function Ud(d){for(;d.firstChild;)d.removeChild(d.firstChild)}function pu(d){var x=d.parentNode;x&&x.lastChild!==d&&x.appendChild(d)}function gu(d){var x=d.parentNode;x&&x.firstChild!==d&&x.insertBefore(d,x.firstChild)}function m_(d,x){if(d.classList!==void 0)return d.classList.contains(x);var w=Zd(d);return w.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(w)}function et(d,x){if(d.classList!==void 0)for(var w=p(x),P=0,R=w.length;P0?2*window.devicePixelRatio:1;function fA(d){return Ne.edge?d.wheelDeltaY/2:d.deltaY&&d.deltaMode===0?-d.deltaY/H8:d.deltaY&&d.deltaMode===1?-d.deltaY*20:d.deltaY&&d.deltaMode===2?-d.deltaY*60:d.deltaX||d.deltaZ?0:d.wheelDelta?(d.wheelDeltaY||d.wheelDelta)/2:d.detail&&Math.abs(d.detail)<32765?-d.detail*20:d.detail?d.detail/-32765*60:0}function P_(d,x){var w=x.relatedTarget;if(!w)return!0;try{for(;w&&w!==d;)w=w.parentNode}catch{return!1}return w!==d}var W8={__proto__:null,on:Ke,off:Tt,stopPropagation:Ds,disableScrollPropagation:A_,disableClickPropagation:Of,preventDefault:Mr,stop:ks,getPropagationPath:uA,getMousePosition:cA,getWheelDelta:fA,isExternalTarget:P_,addListener:Ke,removeListener:Tt},hA=U.extend({run:function(d,x,w,P){this.stop(),this._el=d,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ps(d),this._offset=x.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(d){var x=+new Date-this._startTime,w=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(d):this},panInsideBounds:function(d,x){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(d));return w.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(d,x){x=x||{};var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),R=this.project(this.getCenter()),B=this.project(d),Z=this.getPixelBounds(),Q=K([Z.min.add(w),Z.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Le=Q.extend(B).getSize().subtract(te);R.x+=ae.x<0?-Le.x:Le.x,R.y+=ae.y<0?-Le.y:Le.y,this.panTo(this.unproject(R),x),this._enforcingBounds=!1}return this},invalidateSize:function(d){if(!this._loaded)return this;d=i({animate:!1,pan:!0},d===!0?{animate:!0}:d);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var w=this.getSize(),P=x.divideBy(2).round(),R=w.divideBy(2).round(),B=P.subtract(R);return!B.x&&!B.y?this:(d.animate&&d.pan?this.panBy(B):(d.pan&&this._rawPanBy(B),this.fire("move"),d.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:w}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(d){if(d=this._locateOptions=i({timeout:1e4,watch:!1},d),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),w=o(this._handleGeolocationError,this);return d.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,w,d):navigator.geolocation.getCurrentPosition(x,w,d),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(d){if(this._container._leaflet_id){var x=d.code,w=d.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+w+"."})}},_handleGeolocationResponse:function(d){if(this._container._leaflet_id){var x=d.coords.latitude,w=d.coords.longitude,P=new ue(x,w),R=P.toBounds(d.coords.accuracy*2),B=this._locateOptions;if(B.setView){var Z=this.getBoundsZoom(R);this.setView(P,B.maxZoom?Math.min(Z,B.maxZoom):Z)}var Q={latlng:P,bounds:R,timestamp:d.timestamp};for(var te in d.coords)typeof d.coords[te]=="number"&&(Q[te]=d.coords[te]);this.fire("locationfound",Q)}},addHandler:function(d,x){if(!x)return this;var w=this[d]=new x(this);return this._handlers.push(w),this.options[d]&&w.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var d;for(d in this._layers)this._layers[d].remove();for(d in this._panes)It(this._panes[d]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(d,x){var w="leaflet-pane"+(d?" leaflet-"+d.replace("Pane","")+"-pane":""),P=vt("div",w,x||this._mapPane);return d&&(this._panes[d]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var d=this.getPixelBounds(),x=this.unproject(d.getBottomLeft()),w=this.unproject(d.getTopRight());return new ne(x,w)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(d,x,w){d=ie(d),w=H(w||[0,0]);var P=this.getZoom()||0,R=this.getMinZoom(),B=this.getMaxZoom(),Z=d.getNorthWest(),Q=d.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(Z,P)).getSize(),Le=Ne.any3d?this.options.zoomSnap:1,Ge=te.x/ae.x,nt=te.y/ae.y,Yr=x?Math.max(Ge,nt):Math.min(Ge,nt);return P=this.getScaleZoom(Yr,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=x?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(R,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(d,x){var w=this._getTopLeftPoint(d,x);return new Y(w,w.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(d){return this.options.crs.getProjectedBounds(d===void 0?this.getZoom():d)},getPane:function(d){return typeof d=="string"?this._panes[d]:d},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(d,x){var w=this.options.crs;return x=x===void 0?this._zoom:x,w.scale(d)/w.scale(x)},getScaleZoom:function(d,x){var w=this.options.crs;x=x===void 0?this._zoom:x;var P=w.zoom(d*w.scale(x));return isNaN(P)?1/0:P},project:function(d,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(de(d),x)},unproject:function(d,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(d),x)},layerPointToLatLng:function(d){var x=H(d).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(d){var x=this.project(de(d))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(d){return this.options.crs.wrapLatLng(de(d))},wrapLatLngBounds:function(d){return this.options.crs.wrapLatLngBounds(ie(d))},distance:function(d,x){return this.options.crs.distance(de(d),de(x))},containerPointToLayerPoint:function(d){return H(d).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(d){return H(d).add(this._getMapPanePos())},containerPointToLatLng:function(d){var x=this.containerPointToLayerPoint(H(d));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(d){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(d)))},mouseEventToContainerPoint:function(d){return cA(d,this._container)},mouseEventToLayerPoint:function(d){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(d))},mouseEventToLatLng:function(d){return this.layerPointToLatLng(this.mouseEventToLayerPoint(d))},_initContainer:function(d){var x=this._container=oA(d);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var d=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ne.any3d,et(d,"leaflet-container"+(Ne.touch?" leaflet-touch":"")+(Ne.retina?" leaflet-retina":"")+(Ne.ielt9?" leaflet-oldie":"")+(Ne.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=If(d,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(d.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var d=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(et(d.markerPane,"leaflet-zoom-hide"),et(d.shadowPane,"leaflet-zoom-hide"))},_resetView:function(d,x,w){Qt(this._mapPane,new V(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var R=this._zoom!==x;this._moveStart(R,w)._move(d,x)._moveEnd(R),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(d,x){return d&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(d,x,w,P){x===void 0&&(x=this._zoom);var R=this._zoom!==x;return this._zoom=x,this._lastCenter=d,this._pixelOrigin=this._getNewPixelOrigin(d),P?w&&w.pinch&&this.fire("zoom",w):((R||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),this},_moveEnd:function(d){return d&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(d){Qt(this._mapPane,this._getMapPanePos().subtract(d))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(d){this._targets={},this._targets[l(this._container)]=this;var x=d?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Ne.any3d&&this.options.transform3DLimit&&(d?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var d=this._getMapPanePos();Math.max(Math.abs(d.x),Math.abs(d.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(d,x){for(var w=[],P,R=x==="mouseout"||x==="mouseover",B=d.target||d.srcElement,Z=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){Z=!0;break}if(P&&P.listens(x,!0)&&(R&&!P_(B,d)||(w.push(P),R))||B===this._container)break;B=B.parentNode}return!w.length&&!Z&&!R&&this.listens(x,!0)&&(w=[this]),w},_isClickDisabled:function(d){for(;d&&d!==this._container;){if(d._leaflet_disable_click)return!0;d=d.parentNode}},_handleDOMEvent:function(d){var x=d.target||d.srcElement;if(!(!this._loaded||x._leaflet_disable_events||d.type==="click"&&this._isClickDisabled(x))){var w=d.type;w==="mousedown"&&b_(x),this._fireDOMEvent(d,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(d,x,w){if(d.type==="click"){var P=i({},d);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var R=this._findEventTargets(d,x);if(w){for(var B=[],Z=0;Z0?Math.round(d-x)/2:Math.max(0,Math.ceil(d))-Math.max(0,Math.floor(x))},_limitZoom:function(d){var x=this.getMinZoom(),w=this.getMaxZoom(),P=Ne.any3d?this.options.zoomSnap:1;return P&&(d=Math.round(d/P)*P),Math.max(x,Math.min(w,d))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(d,x){var w=this._getCenterOffset(d)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,x),!0)},_createAnimProxy:function(){var d=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(d),this.on("zoomanim",function(x){var w=g_,P=this._proxy.style[w];As(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[w]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var d=this.getCenter(),x=this.getZoom();As(this._proxy,this.project(d,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(d){this._animatingZoom&&d.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(d,x,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),R=this._getCenterOffset(d)._divideBy(1-1/P);return w.animate!==!0&&!this.getSize().contains(R)?!1:(I(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(d,x,!0)},this),!0)},_animateZoom:function(d,x,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=d,this._animateToZoom=x,et(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:d,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function U8(d,x){return new ct(d,x)}var hi=F.extend({options:{position:"topright"},initialize:function(d){g(this,d)},getPosition:function(){return this.options.position},setPosition:function(d){var x=this._map;return x&&x.removeControl(this),this.options.position=d,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(d){this.remove(),this._map=d;var x=this._container=this.onAdd(d),w=this.getPosition(),P=d._controlCorners[w];return et(x,"leaflet-control"),w.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(d){this._map&&d&&d.screenX>0&&d.screenY>0&&this._map.getContainer().focus()}}),zf=function(d){return new hi(d)};ct.include({addControl:function(d){return d.addTo(this),this},removeControl:function(d){return d.remove(),this},_initControlPos:function(){var d=this._controlCorners={},x="leaflet-",w=this._controlContainer=vt("div",x+"control-container",this._container);function P(R,B){var Z=x+R+" "+x+B;d[R+B]=vt("div",Z,w)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var d in this._controlCorners)It(this._controlCorners[d]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var vA=hi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(d,x,w,P){return w1,this._baseLayersList.style.display=d?"":"none"),this._separator.style.display=x&&d?"":"none",this},_onLayerChange:function(d){this._handlingClick||this._update();var x=this._getLayer(l(d.target)),w=x.overlay?d.type==="add"?"overlayadd":"overlayremove":d.type==="add"?"baselayerchange":null;w&&this._map.fire(w,x)},_createRadioElement:function(d,x){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(d){var x=document.createElement("label"),w=this._map.hasLayer(d.layer),P;d.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),this._layerControlInputs.push(P),P.layerId=l(d.layer),Ke(P,"click",this._onInputClick,this);var R=document.createElement("span");R.innerHTML=" "+d.name;var B=document.createElement("span");x.appendChild(B),B.appendChild(P),B.appendChild(R);var Z=d.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var d=this._layerControlInputs,x,w,P=[],R=[];this._handlingClick=!0;for(var B=d.length-1;B>=0;B--)x=d[B],w=this._getLayer(x.layerId).layer,x.checked?P.push(w):x.checked||R.push(w);for(B=0;B=0;R--)x=d[R],w=this._getLayer(x.layerId).layer,x.disabled=w.options.minZoom!==void 0&&Pw.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var d=this._section;this._preventClick=!0,Ke(d,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(d,"click",Mr),x._preventClick=!1})}}),Z8=function(d,x,w){return new vA(d,x,w)},D_=hi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(d){var x="leaflet-control-zoom",w=vt("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",w,this._zoomOut),this._updateDisabled(),d.on("zoomend zoomlevelschange",this._updateDisabled,this),w},onRemove:function(d){d.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(d){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(d.shiftKey?3:1))},_createButton:function(d,x,w,P,R){var B=vt("a",w,P);return B.innerHTML=d,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Of(B),Ke(B,"click",ks),Ke(B,"click",R,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var d=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||d._zoom===d.getMinZoom())&&(et(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||d._zoom===d.getMaxZoom())&&(et(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new D_,this.addControl(this.zoomControl))});var $8=function(d){return new D_(d)},dA=hi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(d){var x="leaflet-control-scale",w=vt("div",x),P=this.options;return this._addScales(P,x+"-line",w),d.on(P.updateWhenIdle?"moveend":"move",this._update,this),d.whenReady(this._update,this),w},onRemove:function(d){d.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(d,x,w){d.metric&&(this._mScale=vt("div",x,w)),d.imperial&&(this._iScale=vt("div",x,w))},_update:function(){var d=this._map,x=d.getSize().y/2,w=d.distance(d.containerPointToLatLng([0,x]),d.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(w)},_updateScales:function(d){this.options.metric&&d&&this._updateMetric(d),this.options.imperial&&d&&this._updateImperial(d)},_updateMetric:function(d){var x=this._getRoundNum(d),w=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,w,x/d)},_updateImperial:function(d){var x=d*3.2808399,w,P,R;x>5280?(w=x/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(R=this._getRoundNum(x),this._updateScale(this._iScale,R+" ft",R/x))},_updateScale:function(d,x,w){d.style.width=Math.round(this.options.maxWidth*w)+"px",d.innerHTML=x},_getRoundNum:function(d){var x=Math.pow(10,(Math.floor(d)+"").length-1),w=d/x;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,x*w}}),Y8=function(d){return new dA(d)},X8='',k_=hi.extend({options:{position:"bottomright",prefix:''+(Ne.inlineSvg?X8+" ":"")+"Leaflet"},initialize:function(d){g(this,d),this._attributions={}},onAdd:function(d){d.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Of(this._container);for(var x in d._layers)d._layers[x].getAttribution&&this.addAttribution(d._layers[x].getAttribution());return this._update(),d.on("layeradd",this._addAttribution,this),this._container},onRemove:function(d){d.off("layeradd",this._addAttribution,this)},_addAttribution:function(d){d.layer.getAttribution&&(this.addAttribution(d.layer.getAttribution()),d.layer.once("remove",function(){this.removeAttribution(d.layer.getAttribution())},this))},setPrefix:function(d){return this.options.prefix=d,this._update(),this},addAttribution:function(d){return d?(this._attributions[d]||(this._attributions[d]=0),this._attributions[d]++,this._update(),this):this},removeAttribution:function(d){return d?(this._attributions[d]&&(this._attributions[d]--,this._update()),this):this},_update:function(){if(this._map){var d=[];for(var x in this._attributions)this._attributions[x]&&d.push(x);var w=[];this.options.prefix&&w.push(this.options.prefix),d.length&&w.push(d.join(", ")),this._container.innerHTML=w.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new k_().addTo(this)});var q8=function(d){return new k_(d)};hi.Layers=vA,hi.Zoom=D_,hi.Scale=dA,hi.Attribution=k_,zf.layers=Z8,zf.zoom=$8,zf.scale=Y8,zf.attribution=q8;var ji=F.extend({initialize:function(d){this._map=d},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ji.addTo=function(d,x){return d.addHandler(x,this),this};var K8={Events:j},pA=Ne.touch?"touchstart mousedown":"mousedown",yo=U.extend({options:{clickTolerance:3},initialize:function(d,x,w,P){g(this,P),this._element=d,this._dragStartTarget=x||d,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,pA,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,pA,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(d){if(this._enabled&&(this._moved=!1,!m_(this._element,"leaflet-zoom-anim"))){if(d.touches&&d.touches.length!==1){yo._dragging===this&&this.finishDrag();return}if(!(yo._dragging||d.shiftKey||d.which!==1&&d.button!==1&&!d.touches)&&(yo._dragging=this,this._preventOutline&&b_(this._element),x_(),Ef(),!this._moving)){this.fire("down");var x=d.touches?d.touches[0]:d,w=sA(this._element);this._startPoint=new V(x.clientX,x.clientY),this._startPos=Ps(this._element),this._parentScale=T_(w);var P=d.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(d){if(this._enabled){if(d.touches&&d.touches.length>1){this._moved=!0;return}var x=d.touches&&d.touches.length===1?d.touches[0]:d,w=new V(x.clientX,x.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(Z=Q,B=te);B>w&&(x[Z]=1,E_(d,x,w,P,Z),E_(d,x,w,Z,R))}function tW(d,x){for(var w=[d[0]],P=1,R=0,B=d.length;Px&&(w.push(d[P]),R=P);return Rx.max.x&&(w|=2),d.yx.max.y&&(w|=8),w}function rW(d,x){var w=x.x-d.x,P=x.y-d.y;return w*w+P*P}function Bf(d,x,w,P){var R=x.x,B=x.y,Z=w.x-R,Q=w.y-B,te=Z*Z+Q*Q,ae;return te>0&&(ae=((d.x-R)*Z+(d.y-B)*Q)/te,ae>1?(R=w.x,B=w.y):ae>0&&(R+=Z*ae,B+=Q*ae)),Z=d.x-R,Q=d.y-B,P?Z*Z+Q*Q:new V(R,B)}function Bn(d){return!S(d[0])||typeof d[0][0]!="object"&&typeof d[0][0]<"u"}function wA(d){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Bn(d)}function bA(d,x){var w,P,R,B,Z,Q,te,ae;if(!d||d.length===0)throw new Error("latlngs not passed");Bn(d)||(console.warn("latlngs are not flat! Only the first ring will be used"),d=d[0]);var Le=de([0,0]),Ge=ie(d),nt=Ge.getNorthWest().distanceTo(Ge.getSouthWest())*Ge.getNorthEast().distanceTo(Ge.getNorthWest());nt<1700&&(Le=I_(d));var Yr=d.length,gr=[];for(w=0;wP){te=(B-P)/R,ae=[Q.x-te*(Q.x-Z.x),Q.y-te*(Q.y-Z.y)];break}var sn=x.unproject(H(ae));return de([sn.lat+Le.lat,sn.lng+Le.lng])}var nW={__proto__:null,simplify:yA,pointToSegmentDistance:_A,closestPointOnSegment:J8,clipSegment:SA,_getEdgeIntersection:qd,_getBitCode:Is,_sqClosestPointOnSegment:Bf,isFlat:Bn,_flat:wA,polylineCenter:bA},R_={project:function(d){return new V(d.lng,d.lat)},unproject:function(d){return new ue(d.y,d.x)},bounds:new Y([-180,-90],[180,90])},N_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(d){var x=Math.PI/180,w=this.R,P=d.lat*x,R=this.R_MINOR/w,B=Math.sqrt(1-R*R),Z=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-Z)/(1+Z),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new V(d.lng*x*w,P)},unproject:function(d){for(var x=180/Math.PI,w=this.R,P=this.R_MINOR/w,R=Math.sqrt(1-P*P),B=Math.exp(-d.y/w),Z=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=R*Math.sin(Z),ae=Math.pow((1-ae)/(1+ae),R/2),te=Math.PI/2-2*Math.atan(B*ae)-Z,Z+=te;return new ue(Z*x,d.x*x/w)}},iW={__proto__:null,LonLat:R_,Mercator:N_,SphericalMercator:De},aW=i({},xe,{code:"EPSG:3395",projection:N_,transformation:function(){var d=.5/(Math.PI*N_.R);return Me(d,.5,-d,.5)}()}),TA=i({},xe,{code:"EPSG:4326",projection:R_,transformation:Me(1/180,1,-1/180,.5)}),oW=i({},je,{projection:R_,transformation:Me(1,0,-1,0),scale:function(d){return Math.pow(2,d)},zoom:function(d){return Math.log(d)/Math.LN2},distance:function(d,x){var w=x.lng-d.lng,P=x.lat-d.lat;return Math.sqrt(w*w+P*P)},infinite:!0});je.Earth=xe,je.EPSG3395=aW,je.EPSG3857=st,je.EPSG900913=Ye,je.EPSG4326=TA,je.Simple=oW;var vi=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(d){return d.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(d){return d&&d.removeLayer(this),this},getPane:function(d){return this._map.getPane(d?this.options[d]||d:this.options.pane)},addInteractiveTarget:function(d){return this._map._targets[l(d)]=this,this},removeInteractiveTarget:function(d){return delete this._map._targets[l(d)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(d){var x=d.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var w=this.getEvents();x.on(w,this),this.once("remove",function(){x.off(w,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(d){if(!d._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(d);return this._layers[x]?this:(this._layers[x]=d,d._mapToAdd=this,d.beforeAdd&&d.beforeAdd(this),this.whenReady(d._layerAdd,d),this)},removeLayer:function(d){var x=l(d);return this._layers[x]?(this._loaded&&d.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:d}),d.fire("remove")),d._map=d._mapToAdd=null,this):this},hasLayer:function(d){return l(d)in this._layers},eachLayer:function(d,x){for(var w in this._layers)d.call(x,this._layers[w]);return this},_addLayers:function(d){d=d?S(d)?d:[d]:[];for(var x=0,w=d.length;xthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&x[0]instanceof ue&&x[0].equals(x[w-1])&&x.pop(),x},_setLatLngs:function(d){Ma.prototype._setLatLngs.call(this,d),Bn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Bn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var d=this._renderer._bounds,x=this.options.weight,w=new V(x,x);if(d=new Y(d.min.subtract(w),d.max.add(w)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(d))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,R=this._rings.length,B;Pd.y!=R.y>d.y&&d.x<(R.x-P.x)*(d.y-P.y)/(R.y-P.y)+P.x&&(x=!x);return x||Ma.prototype._containsPoint.call(this,d,!0)}});function dW(d,x){return new _u(d,x)}var La=Ca.extend({initialize:function(d,x){g(this,x),this._layers={},d&&this.addData(d)},addData:function(d){var x=S(d)?d:d.features,w,P,R;if(x){for(w=0,P=x.length;w0&&R.push(R[0].slice()),R}function xu(d,x){return d.feature?i({},d.feature,{geometry:x}):rp(x)}function rp(d){return d.type==="Feature"||d.type==="FeatureCollection"?d:{type:"Feature",properties:{},geometry:d}}var V_={toGeoJSON:function(d){return xu(this,{type:"Point",coordinates:B_(this.getLatLng(),d)})}};Kd.include(V_),O_.include(V_),Qd.include(V_),Ma.include({toGeoJSON:function(d){var x=!Bn(this._latlngs),w=tp(this._latlngs,x?1:0,!1,d);return xu(this,{type:(x?"Multi":"")+"LineString",coordinates:w})}}),_u.include({toGeoJSON:function(d){var x=!Bn(this._latlngs),w=x&&!Bn(this._latlngs[0]),P=tp(this._latlngs,w?2:x?1:0,!0,d);return x||(P=[P]),xu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),mu.include({toMultiPoint:function(d){var x=[];return this.eachLayer(function(w){x.push(w.toGeoJSON(d).geometry.coordinates)}),xu(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(d){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(d);var w=x==="GeometryCollection",P=[];return this.eachLayer(function(R){if(R.toGeoJSON){var B=R.toGeoJSON(d);if(w)P.push(B.geometry);else{var Z=rp(B);Z.type==="FeatureCollection"?P.push.apply(P,Z.features):P.push(Z)}}}),w?xu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function LA(d,x){return new La(d,x)}var pW=LA,np=vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(d,x,w){this._url=d,this._bounds=ie(x),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(et(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(d){return this.options.opacity=d,this._image&&this._updateOpacity(),this},setStyle:function(d){return d.opacity&&this.setOpacity(d.opacity),this},bringToFront:function(){return this._map&&pu(this._image),this},bringToBack:function(){return this._map&&gu(this._image),this},setUrl:function(d){return this._url=d,this._image&&(this._image.src=d),this},setBounds:function(d){return this._bounds=ie(d),this._map&&this._reset(),this},getEvents:function(){var d={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(d.zoomanim=this._animateZoom),d},setZIndex:function(d){return this.options.zIndex=d,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var d=this._url.tagName==="IMG",x=this._image=d?this._url:vt("img");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=f,x.onmousemove=f,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),d){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(d){var x=this._map.getZoomScale(d.zoom),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,d.zoom,d.center).min;As(this._image,w,x)},_reset:function(){var d=this._image,x=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=x.getSize();Qt(d,x.min),d.style.width=w.x+"px",d.style.height=w.y+"px"},_updateOpacity:function(){zn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var d=this.options.errorOverlayUrl;d&&this._url!==d&&(this._url=d,this._image.src=d)},getCenter:function(){return this._bounds.getCenter()}}),gW=function(d,x,w){return new np(d,x,w)},AA=np.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var d=this._url.tagName==="VIDEO",x=this._image=d?this._url:vt("video");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=f,x.onmousemove=f,x.onloadeddata=o(this.fire,this,"load"),d){for(var w=x.getElementsByTagName("source"),P=[],R=0;R0?P:[x.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var B=0;BR?(x.height=R+"px",et(d,B)):Zt(d,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(d){var x=this._map._latLngToNewLayerPoint(this._latlng,d.zoom,d.center),w=this._getAnchor();Qt(this._container,x.add(w))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var d=this._map,x=parseInt(If(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+x,P=this._containerWidth,R=new V(this._containerLeft,-w-this._containerBottom);R._add(Ps(this._container));var B=d.layerPointToContainerPoint(R),Z=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||Z),te=H(this.options.autoPanPaddingBottomRight||Z),ae=d.getSize(),Le=0,Ge=0;B.x+P+te.x>ae.x&&(Le=B.x+P-ae.x+te.x),B.x-Le-Q.x<0&&(Le=B.x-Q.x),B.y+w+te.y>ae.y&&(Ge=B.y+w-ae.y+te.y),B.y-Ge-Q.y<0&&(Ge=B.y-Q.y),(Le||Ge)&&(this.options.keepInView&&(this._autopanning=!0),d.fire("autopanstart").panBy([Le,Ge]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),_W=function(d,x){return new ip(d,x)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(d,x,w){return this._initOverlay(ip,d,x,w).openOn(this),this},closePopup:function(d){return d=arguments.length?d:this._popup,d&&d.close(),this}}),vi.include({bindPopup:function(d,x){return this._popup=this._initOverlay(ip,this._popup,d,x),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(d){return this._popup&&(this instanceof Ca||(this._popup._source=this),this._popup._prepareOpen(d||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(d){return this._popup&&this._popup.setContent(d),this},getPopup:function(){return this._popup},_openPopup:function(d){if(!(!this._popup||!this._map)){ks(d);var x=d.layer||d.target;if(this._popup._source===x&&!(x instanceof _o)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(d.latlng);return}this._popup._source=x,this.openPopup(d.latlng)}},_movePopup:function(d){this._popup.setLatLng(d.latlng)},_onKeyPress:function(d){d.originalEvent.keyCode===13&&this._openPopup(d)}});var ap=Gi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(d){Gi.prototype.onAdd.call(this,d),this.setOpacity(this.options.opacity),d.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(d){Gi.prototype.onRemove.call(this,d),d.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var d=Gi.prototype.getEvents.call(this);return this.options.permanent||(d.preclick=this.close),d},_initLayout:function(){var d="leaflet-tooltip",x=d+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=vt("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(d){var x,w,P=this._map,R=this._container,B=P.latLngToContainerPoint(P.getCenter()),Z=P.layerPointToContainerPoint(d),Q=this.options.direction,te=R.offsetWidth,ae=R.offsetHeight,Le=H(this.options.offset),Ge=this._getAnchor();Q==="top"?(x=te/2,w=ae):Q==="bottom"?(x=te/2,w=0):Q==="center"?(x=te/2,w=ae/2):Q==="right"?(x=0,w=ae/2):Q==="left"?(x=te,w=ae/2):Z.xthis.options.maxZoom||wP?this._retainParent(R,B,Z,P):!1)},_retainChildren:function(d,x,w,P){for(var R=2*d;R<2*d+2;R++)for(var B=2*x;B<2*x+2;B++){var Z=new V(R,B);Z.z=w+1;var Q=this._tileCoordsToKey(Z),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&R1){this._setView(d,w);return}for(var Ge=R.min.y;Ge<=R.max.y;Ge++)for(var nt=R.min.x;nt<=R.max.x;nt++){var Yr=new V(nt,Ge);if(Yr.z=this._tileZoom,!!this._isValidTile(Yr)){var gr=this._tiles[this._tileCoordsToKey(Yr)];gr?gr.current=!0:Z.push(Yr)}}if(Z.sort(function(sn,wu){return sn.distanceTo(B)-wu.distanceTo(B)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Vn=document.createDocumentFragment();for(nt=0;ntw.max.x)||!x.wrapLat&&(d.yw.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(d);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(d){return this._tileCoordsToBounds(this._keyToTileCoords(d))},_tileCoordsToNwSe:function(d){var x=this._map,w=this.getTileSize(),P=d.scaleBy(w),R=P.add(w),B=x.unproject(P,d.z),Z=x.unproject(R,d.z);return[B,Z]},_tileCoordsToBounds:function(d){var x=this._tileCoordsToNwSe(d),w=new ne(x[0],x[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(d){return d.x+":"+d.y+":"+d.z},_keyToTileCoords:function(d){var x=d.split(":"),w=new V(+x[0],+x[1]);return w.z=+x[2],w},_removeTile:function(d){var x=this._tiles[d];x&&(It(x.el),delete this._tiles[d],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(d)}))},_initTile:function(d){et(d,"leaflet-tile");var x=this.getTileSize();d.style.width=x.x+"px",d.style.height=x.y+"px",d.onselectstart=f,d.onmousemove=f,Ne.ielt9&&this.options.opacity<1&&zn(d,this.options.opacity)},_addTile:function(d,x){var w=this._getTilePos(d),P=this._tileCoordsToKey(d),R=this.createTile(this._wrapCoords(d),o(this._tileReady,this,d));this._initTile(R),this.createTile.length<2&&I(o(this._tileReady,this,d,null,R)),Qt(R,w),this._tiles[P]={el:R,coords:d,current:!0},x.appendChild(R),this.fire("tileloadstart",{tile:R,coords:d})},_tileReady:function(d,x,w){x&&this.fire("tileerror",{error:x,tile:w,coords:d});var P=this._tileCoordsToKey(d);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(zn(w.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),x||(et(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.el,coords:d})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ne.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(d){return d.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(d){var x=new V(this._wrapX?c(d.x,this._wrapX):d.x,this._wrapY?c(d.y,this._wrapY):d.y);return x.z=d.z,x},_pxBoundsToTileRange:function(d){var x=this.getTileSize();return new Y(d.min.unscaleBy(x).floor(),d.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var d in this._tiles)if(!this._tiles[d].loaded)return!1;return!0}});function wW(d){return new Ff(d)}var Su=Ff.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(d,x){this._url=d,x=g(this,x),x.detectRetina&&Ne.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(d,x){return this._url===d&&x===void 0&&(x=!0),this._url=d,x||this.redraw(),this},createTile:function(d,x){var w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,x,w)),Ke(w,"error",o(this._tileOnError,this,x,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(d),w},getTileUrl:function(d){var x={r:Ne.retina?"@2x":"",s:this._getSubdomain(d),x:d.x,y:d.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var w=this._globalTileRange.max.y-d.y;this.options.tms&&(x.y=w),x["-y"]=w}return _(this._url,i(x,this.options))},_tileOnLoad:function(d,x){Ne.ielt9?setTimeout(o(d,this,null,x),0):d(null,x)},_tileOnError:function(d,x,w){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),d(w,x)},_onTileRemove:function(d){d.tile.onload=null},_getZoomForUrl:function(){var d=this._tileZoom,x=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(d=x-d),d+P},_getSubdomain:function(d){var x=Math.abs(d.x+d.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var d,x;for(d in this._tiles)if(this._tiles[d].coords.z!==this._tileZoom&&(x=this._tiles[d].el,x.onload=f,x.onerror=f,!x.complete)){x.src=T;var w=this._tiles[d].coords;It(x),delete this._tiles[d],this.fire("tileabort",{tile:x,coords:w})}},_removeTile:function(d){var x=this._tiles[d];if(x)return x.el.setAttribute("src",T),Ff.prototype._removeTile.call(this,d)},_tileReady:function(d,x,w){if(!(!this._map||w&&w.getAttribute("src")===T))return Ff.prototype._tileReady.call(this,d,x,w)}});function kA(d,x){return new Su(d,x)}var IA=Su.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(d,x){this._url=d;var w=i({},this.defaultWmsParams);for(var P in x)P in this.options||(w[P]=x[P]);x=g(this,x);var R=x.detectRetina&&Ne.retina?2:1,B=this.getTileSize();w.width=B.x*R,w.height=B.y*R,this.wmsParams=w},onAdd:function(d){this._crs=this.options.crs||d.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,Su.prototype.onAdd.call(this,d)},getTileUrl:function(d){var x=this._tileCoordsToNwSe(d),w=this._crs,P=K(w.project(x[0]),w.project(x[1])),R=P.min,B=P.max,Z=(this._wmsVersion>=1.3&&this._crs===TA?[R.y,R.x,B.y,B.x]:[R.x,R.y,B.x,B.y]).join(","),Q=Su.prototype.getTileUrl.call(this,d);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(d,x){return i(this.wmsParams,d),x||this.redraw(),this}});function bW(d,x){return new IA(d,x)}Su.WMS=IA,kA.wms=bW;var Aa=vi.extend({options:{padding:.1},initialize:function(d){g(this,d),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),et(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var d={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(d.zoomanim=this._onAnimZoom),d},_onAnimZoom:function(d){this._updateTransform(d.center,d.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(d,x){var w=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),R=this._map.project(this._center,x),B=P.multiplyBy(-w).add(R).subtract(this._map._getNewPixelOrigin(d,x));Ne.any3d?As(this._container,B,w):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var d in this._layers)this._layers[d]._reset()},_onZoomEnd:function(){for(var d in this._layers)this._layers[d]._project()},_updatePaths:function(){for(var d in this._layers)this._layers[d]._update()},_update:function(){var d=this.options.padding,x=this._map.getSize(),w=this._map.containerPointToLayerPoint(x.multiplyBy(-d)).round();this._bounds=new Y(w,w.add(x.multiplyBy(1+d*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),EA=Aa.extend({options:{tolerance:0},getEvents:function(){var d=Aa.prototype.getEvents.call(this);return d.viewprereset=this._onViewPreReset,d},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Aa.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var d=this._container=document.createElement("canvas");Ke(d,"mousemove",this._onMouseMove,this),Ke(d,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(d,"mouseout",this._handleMouseOut,this),d._leaflet_disable_events=!0,this._ctx=d.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var d;this._redrawBounds=null;for(var x in this._layers)d=this._layers[x],d._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,x=this._container,w=d.getSize(),P=Ne.retina?2:1;Qt(x,d.min),x.width=P*w.x,x.height=P*w.y,x.style.width=w.x+"px",x.style.height=w.y+"px",Ne.retina&&this._ctx.scale(2,2),this._ctx.translate(-d.min.x,-d.min.y),this.fire("update")}},_reset:function(){Aa.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(d){this._updateDashArray(d),this._layers[l(d)]=d;var x=d._order={layer:d,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(d){this._requestRedraw(d)},_removePath:function(d){var x=d._order,w=x.next,P=x.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,delete d._order,delete this._layers[l(d)],this._requestRedraw(d)},_updatePath:function(d){this._extendRedrawBounds(d),d._project(),d._update(),this._requestRedraw(d)},_updateStyle:function(d){this._updateDashArray(d),this._requestRedraw(d)},_updateDashArray:function(d){if(typeof d.options.dashArray=="string"){var x=d.options.dashArray.split(/[, ]+/),w=[],P,R;for(R=0;R')}}catch{}return function(d){return document.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),TW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Aa.prototype._update.call(this),this.fire("update"))},_initPath:function(d){var x=d._container=jf("shape");et(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",d._path=jf("path"),x.appendChild(d._path),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){var x=d._container;this._container.appendChild(x),d.options.interactive&&d.addInteractiveTarget(x)},_removePath:function(d){var x=d._container;It(x),d.removeInteractiveTarget(x),delete this._layers[l(d)]},_updateStyle:function(d){var x=d._stroke,w=d._fill,P=d.options,R=d._container;R.stroked=!!P.stroke,R.filled=!!P.fill,P.stroke?(x||(x=d._stroke=jf("stroke")),R.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(R.removeChild(x),d._stroke=null),P.fill?(w||(w=d._fill=jf("fill")),R.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(R.removeChild(w),d._fill=null)},_updateCircle:function(d){var x=d._point.round(),w=Math.round(d._radius),P=Math.round(d._radiusY||w);this._setPath(d,d._empty()?"M0 0":"AL "+x.x+","+x.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(d,x){d._path.v=x},_bringToFront:function(d){pu(d._container)},_bringToBack:function(d){gu(d._container)}},op=Ne.vml?jf:rt,Gf=Aa.extend({_initContainer:function(){this._container=op("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=op("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,x=d.getSize(),w=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,w.setAttribute("width",x.x),w.setAttribute("height",x.y)),Qt(w,d.min),w.setAttribute("viewBox",[d.min.x,d.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(d){var x=d._path=op("path");d.options.className&&et(x,d.options.className),d.options.interactive&&et(x,"leaflet-interactive"),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(d._path),d.addInteractiveTarget(d._path)},_removePath:function(d){It(d._path),d.removeInteractiveTarget(d._path),delete this._layers[l(d)]},_updatePath:function(d){d._project(),d._update()},_updateStyle:function(d){var x=d._path,w=d.options;x&&(w.stroke?(x.setAttribute("stroke",w.color),x.setAttribute("stroke-opacity",w.opacity),x.setAttribute("stroke-width",w.weight),x.setAttribute("stroke-linecap",w.lineCap),x.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?x.setAttribute("stroke-dasharray",w.dashArray):x.removeAttribute("stroke-dasharray"),w.dashOffset?x.setAttribute("stroke-dashoffset",w.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),w.fill?(x.setAttribute("fill",w.fillColor||w.color),x.setAttribute("fill-opacity",w.fillOpacity),x.setAttribute("fill-rule",w.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(d,x){this._setPath(d,ut(d._parts,x))},_updateCircle:function(d){var x=d._point,w=Math.max(Math.round(d._radius),1),P=Math.max(Math.round(d._radiusY),1)||w,R="a"+w+","+P+" 0 1,0 ",B=d._empty()?"M0 0":"M"+(x.x-w)+","+x.y+R+w*2+",0 "+R+-w*2+",0 ";this._setPath(d,B)},_setPath:function(d,x){d._path.setAttribute("d",x)},_bringToFront:function(d){pu(d._path)},_bringToBack:function(d){gu(d._path)}});Ne.vml&&Gf.include(TW);function NA(d){return Ne.svg||Ne.vml?new Gf(d):null}ct.include({getRenderer:function(d){var x=d.options.renderer||this._getPaneRenderer(d.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(d){if(d==="overlayPane"||d===void 0)return!1;var x=this._paneRenderers[d];return x===void 0&&(x=this._createRenderer({pane:d}),this._paneRenderers[d]=x),x},_createRenderer:function(d){return this.options.preferCanvas&&RA(d)||NA(d)}});var OA=_u.extend({initialize:function(d,x){_u.prototype.initialize.call(this,this._boundsToLatLngs(d),x)},setBounds:function(d){return this.setLatLngs(this._boundsToLatLngs(d))},_boundsToLatLngs:function(d){return d=ie(d),[d.getSouthWest(),d.getNorthWest(),d.getNorthEast(),d.getSouthEast()]}});function CW(d,x){return new OA(d,x)}Gf.create=op,Gf.pointsToPath=ut,La.geometryToLayer=Jd,La.coordsToLatLng=z_,La.coordsToLatLngs=ep,La.latLngToCoords=B_,La.latLngsToCoords=tp,La.getFeature=xu,La.asFeature=rp,ct.mergeOptions({boxZoom:!0});var zA=ji.extend({initialize:function(d){this._map=d,this._container=d._container,this._pane=d._panes.overlayPane,this._resetStateTimeout=0,d.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(d){if(!d.shiftKey||d.which!==1&&d.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Ef(),x_(),this._startPoint=this._map.mouseEventToContainerPoint(d),Ke(document,{contextmenu:ks,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(d){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(d);var x=new Y(this._point,this._startPoint),w=x.getSize();Qt(this._box,x.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Rf(),S_(),Tt(document,{contextmenu:ks,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(d){if(!(d.which!==1&&d.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(d){d.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",zA),ct.mergeOptions({doubleClickZoom:!0});var BA=ji.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(d){var x=this._map,w=x.getZoom(),P=x.options.zoomDelta,R=d.originalEvent.shiftKey?w-P:w+P;x.options.doubleClickZoom==="center"?x.setZoom(R):x.setZoomAround(d.containerPoint,R)}});ct.addInitHook("addHandler","doubleClickZoom",BA),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var VA=ji.extend({addHooks:function(){if(!this._draggable){var d=this._map;this._draggable=new yo(d._mapPane,d._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),d.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),d.on("zoomend",this._onZoomEnd,this),d.whenReady(this._onZoomEnd,this))}et(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var d=this._map;if(d._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;d.fire("movestart").fire("dragstart"),d.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(d){if(this._map.options.inertia){var x=this._lastTime=+new Date,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),this._times.push(x),this._prunePositions(x)}this._map.fire("move",d).fire("drag",d)},_prunePositions:function(d){for(;this._positions.length>1&&d-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var d=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(d).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(d,x){return d-(d-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var d=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;d.xx.max.x&&(d.x=this._viscousLimit(d.x,x.max.x)),d.y>x.max.y&&(d.y=this._viscousLimit(d.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(d)}},_onPreDragWrap:function(){var d=this._worldWidth,x=Math.round(d/2),w=this._initialWorldOffset,P=this._draggable._newPos.x,R=(P-x+w)%d+x-w,B=(P+x+w)%d-x-w,Z=Math.abs(R+w)0?B:-B))-x;this._delta=0,this._startTime=null,Z&&(d.options.scrollWheelZoom==="center"?d.setZoom(x+Z):d.setZoomAround(this._lastMousePos,x+Z))}});ct.addInitHook("addHandler","scrollWheelZoom",jA);var MW=600;ct.mergeOptions({tapHold:Ne.touchNative&&Ne.safari&&Ne.mobile,tapTolerance:15});var GA=ji.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(d){if(clearTimeout(this._holdTimeout),d.touches.length===1){var x=d.touches[0];this._startPos=this._newPos=new V(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),MW),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function d(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",d)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(d){var x=d.touches[0];this._newPos=new V(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(d,x){var w=new MouseEvent(d,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});w._simulated=!0,x.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",GA),ct.mergeOptions({touchZoom:Ne.touch,bounceAtZoomLimits:!0});var HA=ji.extend({addHooks:function(){et(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(d){var x=this._map;if(!(!d.touches||d.touches.length!==2||x._animatingZoom||this._zooming)){var w=x.mouseEventToContainerPoint(d.touches[0]),P=x.mouseEventToContainerPoint(d.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(w.add(P)._divideBy(2))),this._startDist=w.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(d)}},_onTouchMove:function(d){if(!(!d.touches||d.touches.length!==2||!this._zooming)){var x=this._map,w=x.mouseEventToContainerPoint(d.touches[0]),P=x.mouseEventToContainerPoint(d.touches[1]),R=w.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(R,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoomx.getMaxZoom()&&R>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,R===1)return}else{var B=w._add(P)._divideBy(2)._subtract(this._centerPoint);if(R===1&&B.x===0&&B.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var Z=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(Z,this,!0),Mr(d)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",HA),ct.BoxZoom=zA,ct.DoubleClickZoom=BA,ct.Drag=VA,ct.Keyboard=FA,ct.ScrollWheelZoom=jA,ct.TapHold=GA,ct.TouchZoom=HA,r.Bounds=Y,r.Browser=Ne,r.CRS=je,r.Canvas=EA,r.Circle=O_,r.CircleMarker=Qd,r.Class=F,r.Control=hi,r.DivIcon=DA,r.DivOverlay=Gi,r.DomEvent=W8,r.DomUtil=G8,r.Draggable=yo,r.Evented=U,r.FeatureGroup=Ca,r.GeoJSON=La,r.GridLayer=Ff,r.Handler=ji,r.Icon=yu,r.ImageOverlay=np,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=vi,r.LayerGroup=mu,r.LineUtil=nW,r.Map=ct,r.Marker=Kd,r.Mixin=K8,r.Path=_o,r.Point=V,r.PolyUtil=Q8,r.Polygon=_u,r.Polyline=Ma,r.Popup=ip,r.PosAnimation=hA,r.Projection=iW,r.Rectangle=OA,r.Renderer=Aa,r.SVG=Gf,r.SVGOverlay=PA,r.TileLayer=Su,r.Tooltip=ap,r.Transformation=he,r.Util=O,r.VideoOverlay=AA,r.bind=o,r.bounds=K,r.canvas=RA,r.circle=hW,r.circleMarker=fW,r.control=zf,r.divIcon=SW,r.extend=i,r.featureGroup=lW,r.geoJSON=LA,r.geoJson=pW,r.gridLayer=wW,r.icon=uW,r.imageOverlay=gW,r.latLng=de,r.latLngBounds=ie,r.layerGroup=sW,r.map=U8,r.marker=cW,r.point=H,r.polygon=dW,r.polyline=vW,r.popup=_W,r.rectangle=CW,r.setOptions=g,r.stamp=l,r.svg=NA,r.svgOverlay=yW,r.tileLayer=kA,r.tooltip=xW,r.transformation=Me,r.version=n,r.videoOverlay=mW;var LW=window.L;r.noConflict=function(){return window.L=LW,this},window.L=r})})(QT,QT.exports);var hu=QT.exports;const u8=eC(hu);function Hd(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function jL(t,e){return e==null?function(n,i){const a=q.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=q.useRef();a.current||(a.current=t(n,i));const o=q.useRef(n),{instance:s}=a.current;return q.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function c8(t,e){q.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function Xme(t){return function(r){const n=c_(),i=t(f_(r,n),n);return a8(n.map,r.attribution),FL(i.current,r.eventHandlers),c8(i.current,n),i}}function qme(t,e){const r=q.useRef();q.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function Kme(t){return function(r){const n=c_(),i=t(f_(r,n),n);return FL(i.current,r.eventHandlers),c8(i.current,n),qme(i.current,r),i}}function f8(t,e){const r=jL(t),n=Yme(r,e);return Zme(n)}function h8(t,e){const r=jL(t,e),n=Kme(r);return Ume(n)}function Qme(t,e){const r=jL(t,e),n=Xme(r);return $me(n)}function Jme(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function eye(){return c_().map}const tye=h8(function({center:e,children:r,...n},i){const a=new hu.CircleMarker(e,n);return Hd(a,o8(i,{overlayContainer:a}))},Gme);function JT(){return JT=Object.assign||function(t){for(var e=1;e(v==null?void 0:v.map)??null,[v]);const g=q.useCallback(y=>{if(y!==null&&v===null){const _=new hu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(Wme(_))}},[]);q.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const m=v?Ec.createElement(l8,{value:v},n):o??null;return Ec.createElement("div",JT({},h,{ref:g}),m)}const nye=q.forwardRef(rye),iye=h8(function({positions:e,...r},n){const i=new hu.Polyline(e,r);return Hd(i,o8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),aye=f8(function(e,r){const n=new hu.Popup(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),oye=Qme(function({url:e,...r},n){const i=new hu.TileLayer(e,f_(r,n));return Hd(i,n)},function(e,r,n){Jme(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),sye=f8(function(e,r){const n=new hu.Tooltip(e,r.overlayContainer);return Hd(n,r)},function(e,r,{position:n},i){q.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",uye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",cye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete u8.Icon.Default.prototype._getIconUrl;u8.Icon.Default.mergeOptions({iconUrl:lye,iconRetinaUrl:uye,shadowUrl:cye});const Yz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],fye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function hye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function vye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function dye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function pye({bounds:t}){const e=eye();return q.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function gye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return M.jsxs("div",{className:"min-w-[200px]",children:[M.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),M.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),M.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[M.jsx("div",{className:"text-slate-500",children:"Role"}),M.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),M.jsx("div",{className:"text-slate-500",children:"Hardware"}),M.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),M.jsx("div",{className:"text-slate-500",children:"Battery"}),M.jsx("div",{className:"text-slate-700",children:r}),M.jsx("div",{className:"text-slate-500",children:"Last Heard"}),M.jsx("div",{className:"text-slate-700",children:dye(t.last_heard)})]}),e&&M.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[M.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[M.jsx(Zm,{size:10}),"Google Maps"]}),M.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[M.jsx(Zm,{size:10}),"OSM"]})]})]})}function mye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=q.useMemo(()=>t.filter(f=>f.latitude!==null&&f.longitude!==null),[t]),a=t.length-i.length,o=q.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=q.useMemo(()=>e.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[e,o]),l=q.useMemo(()=>{if(i.length===0)return null;const f=i.map(v=>v.latitude),h=i.map(v=>v.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=q.useMemo(()=>{const f=new Set;return r!==null&&e.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,e]);return M.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[M.jsxs(nye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[M.jsx(oye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),M.jsx(pye,{bounds:l}),s.map((f,h)=>{const v=o.get(f.from_node),p=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return M.jsx(iye,{positions:[[v.latitude,v.longitude],[p.latitude,p.longitude]],color:hye(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,v=c.has(f.node_num),p=r===null||h||v,g=fye.includes(f.role),m=vye(f.latitude),y=Yz[m%Yz.length];return M.jsxs(tye,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[M.jsx(sye,{direction:"top",offset:[0,-8],children:M.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),M.jsx(aye,{children:M.jsx(gye,{node:f})})]},f.node_num)})]}),M.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[M.jsx(I3,{size:12}),M.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&M.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const Xz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],yye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function qz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function _ye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function xye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Sye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function wye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function bye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Tye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=q.useMemo(()=>{if(!t)return[];const f=new Map(r.map(v=>[v.node_num,v])),h=[];return e.forEach(v=>{if(v.from_node===t.node_num){const p=f.get(v.to_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}else if(v.to_node===t.node_num){const p=f.get(v.from_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}}),h.sort((v,p)=>p.snr-v.snr)},[t,e,r]);if(!t)return M.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[M.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:M.jsx(x0,{size:24,className:"text-slate-500"})}),M.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=yye.includes(t.role),o=xye(t.latitude),s=Xz[o%Xz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return M.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[M.jsxs("div",{className:"p-4 border-b border-border",children:[M.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),M.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),M.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),M.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),M.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),M.jsx("div",{className:"text-sm text-slate-300",children:Sye(o)})]}),M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),M.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&M.jsx(R3,{size:12,className:"text-amber-400"}),u]})]}),M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),M.jsxs("div",{className:"flex items-center gap-1.5",children:[M.jsx("div",{className:`w-2 h-2 rounded-full ${bye(t.last_heard)}`}),M.jsx("span",{className:"text-sm text-slate-300",children:wye(t.last_heard)})]})]}),M.jsxs("div",{className:"col-span-2",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),M.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&M.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[M.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[M.jsx(Zm,{size:10}),"Google Maps"]}),M.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[M.jsx(Zm,{size:10}),"OSM"]})]}),M.jsxs("div",{className:"flex-1 overflow-y-auto",children:[M.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?M.jsx("div",{className:"divide-y divide-border",children:i.map(f=>M.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:qz(f.snr)},children:[M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),M.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),M.jsxs("div",{className:"text-right flex-shrink-0",children:[M.jsxs("div",{className:"text-xs font-mono",style:{color:qz(f.snr)},children:[f.snr.toFixed(1)," dB"]}),M.jsx("div",{className:"text-xs text-slate-500",children:_ye(f.snr)})]})]},f.node.node_num))}):M.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const Kz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Cye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Mye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Lye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function Qz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function Aye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=q.useState(""),[a,o]=q.useState("short_name"),[s,l]=q.useState("asc"),[u,c]=q.useState("all"),f=q.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>Kz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||Qz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),h=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},v=({field:p})=>a!==p?null:s==="asc"?M.jsx(wZ,{size:14,className:"inline ml-1"}):M.jsx(JC,{size:14,className:"inline ml-1"});return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[M.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[M.jsxs("div",{className:"relative flex-1 max-w-xs",children:[M.jsx(zZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),M.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),M.jsxs("div",{className:"flex items-center gap-1",children:[M.jsx(D3,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>M.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),M.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",t.length," nodes"]})]}),M.jsxs("div",{className:"overflow-x-auto",children:[M.jsxs("table",{className:"w-full text-sm",children:[M.jsx("thead",{children:M.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[M.jsx("th",{className:"w-8 px-3 py-2"}),M.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",M.jsx(v,{field:"short_name"})]}),M.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",M.jsx(v,{field:"role"})]}),M.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),M.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",M.jsx(v,{field:"battery_level"})]}),M.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",M.jsx(v,{field:"last_heard"})]}),M.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",M.jsx(v,{field:"hardware"})]})]})}),M.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(p=>{const g=Kz.includes(p.role),m=p.node_num===e;return M.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[M.jsx("td",{className:"px-3 py-2",children:M.jsx("div",{className:`w-2 h-2 rounded-full ${Cye(p.last_heard)}`})}),M.jsxs("td",{className:"px-3 py-2",children:[M.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),M.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),M.jsx("td",{className:"px-3 py-2",children:M.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),M.jsx("td",{className:"px-3 py-2 text-slate-400",children:Qz(p.latitude)}),M.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Lye(p)}),M.jsx("td",{className:"px-3 py-2 text-slate-400",children:Mye(p.last_heard)}),M.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),f.length>100&&M.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&M.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function Pye(){const[t,e]=q.useState([]),[r,n]=q.useState([]),[i,a]=q.useState([]),[o,s]=q.useState(null),[l,u]=q.useState("topo"),[c,f]=q.useState(!0),[h,v]=q.useState(null);q.useEffect(()=>{Promise.all([WZ(),UZ(),i$()]).then(([m,y,_])=>{e(m),n(y),a(_),f(!1)}).catch(m=>{v(m.message),f(!1)})},[]);const p=q.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=q.useCallback(m=>{s(m)},[]);return c?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):M.jsxs("div",{className:"space-y-6",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),M.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[M.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[M.jsx(kZ,{size:14}),"Topology"]}),M.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[M.jsx(AZ,{size:14}),"Geographic"]})]})]}),M.jsxs("div",{className:"flex gap-0",children:[M.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?M.jsx(jme,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):M.jsx(mye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),M.jsx(Tye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),M.jsx(Aye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Dye({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return M.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[M.jsxs("div",{className:"flex items-center justify-between mb-2",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),M.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),M.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),M.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[M.jsxs("div",{children:["Events: ",t.event_count]}),M.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&M.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function kye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:L3,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:S0,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:Bw,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:Bw,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return M.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:M.jsxs("div",{className:"flex items-start gap-3",children:[M.jsx(n,{size:18,className:r.iconColor}),M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[M.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),M.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),M.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&M.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),M.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[M.jsx("span",{className:"uppercase",children:t.source}),t.expires&&M.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function Iye({swpc:t}){var n,i;if(!t||!t.enabled)return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),M.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(fD,{size:14}),"Solar/Geomagnetic Indices"]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),M.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),M.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),M.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),M.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),M.jsxs("div",{className:"flex items-center gap-4",children:[M.jsxs("div",{className:"flex items-center gap-1",children:[M.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),M.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),M.jsxs("div",{className:"flex items-center gap-1",children:[M.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),M.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),M.jsxs("div",{className:"flex items-center gap-1",children:[M.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),M.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),M.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&M.jsxs("div",{className:"space-y-2",children:[M.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>M.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function Eye({ducting:t}){if(!t||!t.enabled)return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(hD,{size:14}),"Tropospheric Ducting"]}),M.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(hD,{size:14}),"Tropospheric Ducting"]}),M.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),M.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),M.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),M.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),M.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),M.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&M.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),M.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),M.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),M.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[M.jsx("div",{children:"dM/dz reference:"}),M.jsxs("div",{className:"mt-1 space-y-0.5",children:[M.jsx("div",{children:">79: Normal propagation"}),M.jsx("div",{children:"0–79: Super-refraction"}),M.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&M.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Rye(){var k;const[t,e]=q.useState(null),[r,n]=q.useState([]),[i,a]=q.useState(null),[o,s]=q.useState(null),[l,u]=q.useState([]),[c,f]=q.useState(null),[h,v]=q.useState([]),[p,g]=q.useState([]),[m,y]=q.useState([]),[_,S]=q.useState([]),[b,T]=q.useState(0),[C,A]=q.useState(!0),[D,E]=q.useState(null);return q.useEffect(()=>{Promise.all([N3().catch(()=>null),YZ().catch(()=>[]),qZ().catch(()=>null),KZ().catch(()=>null),QZ().catch(()=>[]),JZ().catch(()=>null),e$().catch(()=>[]),t$().catch(()=>[]),r$().catch(()=>[]),n$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,F,G,j,U,V,W,H])=>{e(I),n(z),a(O),s(F),u(G),f(j),v(U||[]),g(V||[]),y(W||[]),S((H==null?void 0:H.hotspots)||[]),T((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{E(I.message),A(!1)})},[]),C?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):D?M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsxs("div",{className:"text-red-400",children:["Error: ",D]})}):t!=null&&t.enabled?M.jsxs("div",{className:"space-y-6",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),M.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(QC,{size:14}),"Feed Status"]}),M.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>M.jsx(Dye,{feed:I},I.source))})]}),M.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[M.jsx(Iye,{swpc:i}),M.jsx(Eye,{ducting:o})]}),M.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(MZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?M.jsx("div",{className:"space-y-3",children:l.map(I=>M.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[M.jsxs("div",{className:"flex items-center justify-between mb-1",children:[M.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),M.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),M.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[M.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&M.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):M.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[M.jsx(Jg,{size:16,className:"text-green-500"}),M.jsx("span",{children:"No active wildfires in the area"})]})]}),M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(DZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?M.jsx("div",{className:"text-slate-500 py-4",children:M.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?M.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>M.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[M.jsxs("div",{className:"flex items-center justify-between mb-1",children:[M.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),M.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),M.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&M.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((k=c.advisories[0])==null?void 0:k.center_link)&&M.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):M.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[M.jsx(Jg,{size:16,className:"text-green-500"}),M.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(TZ,{size:14}),"Stream Gauges (",h.length,")"]}),M.jsx("div",{className:"space-y-2",children:h.map(I=>{var z,O,F,G,j;return M.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),M.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(F=(O=I.properties)==null?void 0:O.value)==null?void 0:F.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),M.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(j=I.properties)==null?void 0:j.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(xZ,{size:14}),"Road Conditions"]}),p.length>0&&M.jsxs("div",{className:"mb-4",children:[M.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),M.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,F,G,j,U,V,W,H;return M.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((F=I.properties)==null?void 0:F.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),M.jsx("span",{className:"text-sm font-mono text-slate-300",children:(j=I.properties)!=null&&j.roadClosure?"CLOSED":`${Math.round(((U=I.properties)==null?void 0:U.currentSpeed)||0)}mph`})]}),!((V=I.properties)!=null&&V.roadClosure)&&M.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&M.jsxs("div",{children:[M.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),M.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return M.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[M.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&M.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),M.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),M.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(NZ,{size:14}),"Satellite Hotspots (",_.length,")",b>0&&M.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[b," NEW"]})]}),M.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,F,G,j,U;return M.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&M.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),M.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((F=I.properties)==null?void 0:F.frp)&&M.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),M.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[M.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((j=I.properties)==null?void 0:j.acq_time)&&M.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((U=I.properties)==null?void 0:U.near_fire)&&M.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),M.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[M.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[M.jsx(S0,{size:14}),"Active Events (",r.length,")"]}),r.length>0?M.jsx("div",{className:"space-y-3",children:r.map(I=>M.jsx(kye,{event:I},I.event_id))}):M.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[M.jsx(Jg,{size:16,className:"text-green-500"}),M.jsx("span",{children:"No active environmental events"})]})]})]}):M.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[M.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:M.jsx(e2,{size:32,className:"text-slate-500"})}),M.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),M.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const Jz=[{key:"bot",label:"Bot",icon:yZ},{key:"connection",label:"Connection",icon:jZ},{key:"response",label:"Response",icon:PZ},{key:"history",label:"History",icon:bZ},{key:"memory",label:"Memory",icon:_Z},{key:"context",label:"Context",icon:P3},{key:"commands",label:"Commands",icon:BZ},{key:"llm",label:"LLM",icon:A3},{key:"weather",label:"Weather",icon:e2},{key:"meshmonitor",label:"MeshMonitor",icon:x0},{key:"knowledge",label:"Knowledge",icon:mZ},{key:"mesh_sources",label:"Mesh Sources",icon:LZ},{key:"mesh_intelligence",label:"Intelligence",icon:QC},{key:"environmental",label:"Environmental",icon:VZ},{key:"dashboard",label:"Dashboard",icon:k3}];function dt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a=""}){const[o,s]=q.useState(!1),l=n==="password";return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsxs("div",{className:"relative",children:[M.jsx("input",{type:l&&!o?"password":"text",value:e,onChange:u=>r(u.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),l&&M.jsx("button",{type:"button",onClick:()=>s(!o),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:o?M.jsx(CZ,{size:16}):M.jsx(P3,{size:16})})]}),a&&M.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Be({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o=""}){return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsx("input",{type:"number",value:e,onChange:s=>r(Number(s.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&M.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function Je({label:t,checked:e,onChange:r,helper:n=""}){return M.jsxs("div",{className:"flex items-center justify-between py-2",children:[M.jsxs("div",{children:[M.jsx("span",{className:"text-sm text-slate-300",children:t}),n&&M.jsx("p",{className:"text-xs text-slate-600",children:n})]}),M.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:M.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function eo({label:t,value:e,onChange:r,options:n,helper:i=""}){return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsx("select",{value:e,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(a=>M.jsx("option",{value:a.value,children:a.label},a.value))}),i&&M.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Nye({label:t,value:e,onChange:r,rows:n=4,helper:i=""}){return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsx("textarea",{value:e,onChange:a=>r(a.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&M.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Za({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>l.trim()).filter(Boolean);r(s)};return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&M.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function v8({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=q.useState(e.join(", "));q.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>parseInt(l.trim(),10)).filter(l=>!isNaN(l));r(s)};return M.jsxs("div",{className:"space-y-1",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),M.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&M.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Oye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r})}),M.jsx(dt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r})})]}),M.jsx(Je,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r})}),M.jsx(Je,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r})})]})}function zye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(eo,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial"},{value:"tcp",label:"TCP"}]}),t.type==="serial"?M.jsx(dt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0"}):M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100"}),M.jsx(Be,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535})]})]})}function Bye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1}),M.jsx(Be,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1})]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500}),M.jsx(Be,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10})]})]})}function Vye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(dt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r})}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"0 = unlimited"}),M.jsx(Be,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0})]}),M.jsx(Je,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r})}),t.auto_cleanup&&M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1}),M.jsx(Be,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1})]})]})}function Fye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable Memory Optimization",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs to keep in full"}),M.jsx(Be,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before re-summarizing"})]})]})}function jye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(v8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Empty = all channels"}),M.jsx(Za,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to ignore"}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0}),M.jsx(Be,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1})]})]})]})}function Gye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable Commands",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"Command Prefix",value:t.prefix,onChange:r=>e({...t,prefix:r})}),M.jsx(Za,{label:"Disabled Commands",value:t.disabled_commands,onChange:r=>e({...t,disabled_commands:r}),helper:"Commands to disable"})]})]})}function Hye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(eo,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}]}),M.jsx(dt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini"})]}),M.jsx(dt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax"}),M.jsx(dt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1"}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120}),M.jsx(Be,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100})]}),M.jsx(Je,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r})}),t.use_system_prompt&&M.jsx(Nye,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6}),M.jsx(Je,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Open WebUI feature"}),M.jsx(Je,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Gemini only"})]})}function Wye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(eo,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}]}),M.jsx(eo,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}]})]}),M.jsx(dt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Twin Falls, ID"})]})}function Uye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080"}),M.jsx(Je,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands"}),M.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10}),M.jsx(Je,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduces polling frequency for shared instances"})]})]})}function Zye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(eo,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}]}),(t.backend==="qdrant"||t.backend==="auto")&&M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r})}),M.jsx(Be,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r})})]}),M.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r})}),M.jsx(Je,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r})})]}),M.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r})}),M.jsx(Be,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20})]})]})}function $ye({source:t,onChange:e,onDelete:r}){const[n,i]=q.useState(!1);return M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[M.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[M.jsxs("div",{className:"flex items-center gap-3",children:[n?M.jsx(JC,{size:16}):M.jsx(M3,{size:16}),M.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),M.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),M.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),M.jsx("button",{onClick:a=>{a.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:M.jsx(FZ,{size:14})})]}),n&&M.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Name",value:t.name,onChange:a=>e({...t,name:a})}),M.jsx(eo,{label:"Type",value:t.type,onChange:a=>e({...t,type:a}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}]})]}),t.type!=="mqtt"&&M.jsx(dt,{label:"URL",value:t.url,onChange:a=>e({...t,url:a})}),t.type==="meshmonitor"&&M.jsx(dt,{label:"API Token",value:t.api_token,onChange:a=>e({...t,api_token:a}),type:"password"}),t.type==="mqtt"&&M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Host",value:t.host||"",onChange:a=>e({...t,host:a})}),M.jsx(Be,{label:"Port",value:t.port||1883,onChange:a=>e({...t,port:a}),min:1,max:65535})]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Username",value:t.username||"",onChange:a=>e({...t,username:a})}),M.jsx(dt,{label:"Password",value:t.password||"",onChange:a=>e({...t,password:a}),type:"password"})]}),M.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:a=>e({...t,topic_root:a})}),M.jsx(Je,{label:"Use TLS",checked:t.use_tls||!1,onChange:a=>e({...t,use_tls:a})})]}),M.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:a=>e({...t,refresh_interval:a}),min:10}),M.jsx(Je,{label:"Enabled",checked:t.enabled,onChange:a=>e({...t,enabled:a})}),M.jsx(Je,{label:"Polite Mode",checked:t.polite_mode,onChange:a=>e({...t,polite_mode:a})})]})]})}function Yye({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return M.jsxs("div",{className:"space-y-4",children:[t.map((n,i)=>M.jsx($ye,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),M.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[M.jsx(IZ,{size:16})," Add Source"]})]})}function Xye({data:t,onChange:e}){const[r,n]=q.useState(null);return M.jsxs("div",{className:"space-y-6",children:[M.jsx(Je,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5}),M.jsx(Be,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1})]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Per 24h to flag"}),M.jsx(Be,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100})]}),M.jsx(Za,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical nodes (e.g., MHR, HPR)"}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled"}),M.jsx(Be,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1})]}),M.jsxs("div",{className:"space-y-2",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:"Regions"}),t.regions.map((i,a)=>M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[M.jsx("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:M.jsxs("div",{className:"flex items-center gap-3",children:[r===a?M.jsx(JC,{size:16}):M.jsx(M3,{size:16}),M.jsx("span",{className:"font-medium text-slate-200",children:i.name}),M.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]})}),r===a&&M.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),M.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),M.jsx(Be,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),M.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),M.jsx(Za,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),M.jsx(Za,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a))]}),M.jsxs("div",{className:"space-y-2",children:[M.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide mb-3",children:"Alert Rules"}),M.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1",children:[M.jsx(Je,{label:"Infra Offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),M.jsx(Je,{label:"Infra Recovery",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),M.jsx(Je,{label:"New Router",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),M.jsx(Je,{label:"Battery Warning",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}})}),M.jsx(Je,{label:"Battery Critical",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}})}),M.jsx(Je,{label:"Battery Emergency",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}})}),M.jsx(Je,{label:"Power Source Change",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),M.jsx(Je,{label:"Solar Not Charging",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})}),M.jsx(Je,{label:"High Utilization",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}})}),M.jsx(Je,{label:"Packet Flood",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}})}),M.jsx(Je,{label:"Single Gateway",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),M.jsx(Je,{label:"Region Blackout",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]})]})]})]})}function qye({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,f,h,v,p,g,m,y;return M.jsxs("div",{className:"space-y-6",children:[M.jsx(Je,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_})}),t.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(Za,{label:"NWS Zones",value:t.nws_zones,onChange:_=>e({...t,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030"}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),M.jsx(Je,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"User Agent",value:t.nws.user_agent,onChange:_=>e({...t,nws:{...t.nws,user_agent:_}}),helper:"Required format: (app_name, contact_email)"}),M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30}),M.jsx(eo,{label:"Min Severity",value:t.nws.severity_min,onChange:_=>e({...t,nws:{...t.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}]})]})]})]}),M.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),M.jsx(Je,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),M.jsx(Je,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&M.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[M.jsx(Be,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),M.jsx(Be,{label:"Latitude",value:t.ducting.latitude,onChange:_=>e({...t,ducting:{...t.ducting,latitude:_}}),step:.01}),M.jsx(Be,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),M.jsx(Je,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(Be,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),M.jsx(dt,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),placeholder:"US-ID"})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),M.jsx(Je,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&M.jsxs(M.Fragment,{children:[M.jsx(Be,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),M.jsx(Za,{label:"Center IDs",value:t.avalanche.center_ids,onChange:_=>e({...t,avalanche:{...t.avalanche,center_ids:_}})}),M.jsx(v8,{label:"Season Months",value:t.avalanche.season_months,onChange:_=>e({...t,avalanche:{...t.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4"})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),M.jsx(Je,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,b;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((b=t.usgs)==null?void 0:b.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&M.jsxs(M.Fragment,{children:[M.jsx(Be,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900}),M.jsx(Za,{label:"Site IDs",value:t.usgs.sites,onChange:_=>e({...t,usgs:{...t.usgs,sites:_}}),helper:"Find IDs at waterdata.usgs.gov/nwis"})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),M.jsx(Je,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,b,T;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((b=t.traffic)==null?void 0:b.api_key)||"",corridors:((T=t.traffic)==null?void 0:T.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"API Key",value:t.traffic.api_key,onChange:_=>e({...t,traffic:{...t.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com"}),M.jsx(Be,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),M.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,S)=>M.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[M.jsx(dt,{label:"Name",value:_.name,onChange:b=>{const T=[...t.traffic.corridors];T[S]={..._,name:b},e({...t,traffic:{...t.traffic,corridors:T}})}}),M.jsx(Be,{label:"Lat",value:_.lat,onChange:b=>{const T=[...t.traffic.corridors];T[S]={..._,lat:b},e({...t,traffic:{...t.traffic,corridors:T}})},step:.01}),M.jsx(Be,{label:"Lon",value:_.lon,onChange:b=>{const T=[...t.traffic.corridors];T[S]={..._,lon:b},e({...t,traffic:{...t.traffic,corridors:T}})},step:.01}),M.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((b,T)=>T!==S)}}),className:"px-2 py-1 text-xs text-red-400 hover:text-red-300",children:"Remove"})]},S)),M.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),M.jsx(Je,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,b,T,C,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((b=t.roads511)==null?void 0:b.api_key)||"",base_url:((T=t.roads511)==null?void 0:T.base_url)||"",endpoints:((C=t.roads511)==null?void 0:C.endpoints)||["/get/event"],bbox:((A=t.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"Base URL",value:t.roads511.base_url,onChange:_=>e({...t,roads511:{...t.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2"}),M.jsx(dt,{label:"API Key",value:t.roads511.api_key,onChange:_=>e({...t,roads511:{...t.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),M.jsx(Be,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),M.jsx(Za,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),M.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[M.jsx(Be,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[0]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),M.jsx(Be,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[1]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),M.jsx(Be,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[2]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),M.jsx(Be,{label:"North",value:((f=t.roads511.bbox)==null?void 0:f[3])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[3]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01})]}),M.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),M.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),M.jsx(Je,{label:"",checked:((h=t.firms)==null?void 0:h.enabled)||!1,onChange:_=>{var S,b,T,C,A,D,E;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((S=t.firms)==null?void 0:S.tick_seconds)||1800,map_key:((b=t.firms)==null?void 0:b.map_key)||"",source:((T=t.firms)==null?void 0:T.source)||"VIIRS_SNPP_NRT",bbox:((C=t.firms)==null?void 0:C.bbox)||[],day_range:((A=t.firms)==null?void 0:A.day_range)||1,confidence_min:((D=t.firms)==null?void 0:D.confidence_min)||"nominal",proximity_km:((E=t.firms)==null?void 0:E.proximity_km)||10}})}})]}),((v=t.firms)==null?void 0:v.enabled)&&M.jsxs(M.Fragment,{children:[M.jsx(dt,{label:"MAP Key",value:t.firms.map_key,onChange:_=>e({...t,firms:{...t.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/"}),M.jsx(Be,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300}),M.jsx(eo,{label:"Satellite Source",value:t.firms.source,onChange:_=>e({...t,firms:{...t.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),M.jsx(Be,{label:"Day Range",value:t.firms.day_range,onChange:_=>e({...t,firms:{...t.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),M.jsx(eo,{label:"Minimum Confidence",value:t.firms.confidence_min,onChange:_=>e({...t,firms:{...t.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),M.jsx(Be,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),M.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[M.jsx(Be,{label:"West",value:((p=t.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[0]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),M.jsx(Be,{label:"South",value:((g=t.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[1]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),M.jsx(Be,{label:"East",value:((m=t.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[2]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),M.jsx(Be,{label:"North",value:((y=t.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[3]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01})]}),M.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function Kye({data:t,onChange:e}){return M.jsxs("div",{className:"space-y-4",children:[M.jsx(Je,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&M.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[M.jsx(dt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0"}),M.jsx(Be,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535})]})]})}function Qye(){var E;const[t,e]=q.useState(null),[r,n]=q.useState(null),[i,a]=q.useState("bot"),[o,s]=q.useState(!0),[l,u]=q.useState(!1),[c,f]=q.useState(null),[h,v]=q.useState(null),[p,g]=q.useState(!1),[m,y]=q.useState(!1),_=q.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const I=await k.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);q.useEffect(()=>{_()},[_]),q.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),f(null),v(null);try{const k=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");v(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>v(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},b=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},T=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),v("Restart initiated")}catch{f("Restart failed")}},C=(k,I)=>{t&&e({...t,[k]:I})};if(o)return M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return M.jsx("div",{className:"flex items-center justify-center h-64",children:M.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return M.jsx(Oye,{data:t.bot,onChange:k=>C("bot",k)});case"connection":return M.jsx(zye,{data:t.connection,onChange:k=>C("connection",k)});case"response":return M.jsx(Bye,{data:t.response,onChange:k=>C("response",k)});case"history":return M.jsx(Vye,{data:t.history,onChange:k=>C("history",k)});case"memory":return M.jsx(Fye,{data:t.memory,onChange:k=>C("memory",k)});case"context":return M.jsx(jye,{data:t.context,onChange:k=>C("context",k)});case"commands":return M.jsx(Gye,{data:t.commands,onChange:k=>C("commands",k)});case"llm":return M.jsx(Hye,{data:t.llm,onChange:k=>C("llm",k)});case"weather":return M.jsx(Wye,{data:t.weather,onChange:k=>C("weather",k)});case"meshmonitor":return M.jsx(Uye,{data:t.meshmonitor,onChange:k=>C("meshmonitor",k)});case"knowledge":return M.jsx(Zye,{data:t.knowledge,onChange:k=>C("knowledge",k)});case"mesh_sources":return M.jsx(Yye,{data:t.mesh_sources,onChange:k=>C("mesh_sources",k)});case"mesh_intelligence":return M.jsx(Xye,{data:t.mesh_intelligence,onChange:k=>C("mesh_intelligence",k)});case"environmental":return M.jsx(qye,{data:t.environmental,onChange:k=>C("environmental",k)});case"dashboard":return M.jsx(Kye,{data:t.dashboard,onChange:k=>C("dashboard",k)});default:return null}},D=((E=Jz.find(k=>k.key===i))==null?void 0:E.label)||i;return M.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[M.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Jz.map(({key:k,label:I,icon:z})=>M.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[M.jsx(z,{size:16}),M.jsx("span",{children:I}),m&&i===k&&M.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),M.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[M.jsxs("div",{className:"flex items-center justify-between mb-6",children:[M.jsxs("div",{className:"flex items-center gap-3",children:[M.jsx(E3,{size:20,className:"text-slate-500"}),M.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:D})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[m&&M.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[M.jsx(RZ,{size:14}),"Discard"]}),M.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?M.jsx(EZ,{size:14,className:"animate-spin"}):M.jsx(OZ,{size:14}),"Save"]})]})]}),p&&M.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[M.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[M.jsx(S0,{size:16}),M.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),M.jsx("button",{onClick:T,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&M.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[M.jsx(GZ,{size:16}),M.jsx("span",{className:"text-sm",children:c})]}),h&&M.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[M.jsx(SZ,{size:16}),M.jsx("span",{className:"text-sm",children:h})]}),M.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:M.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}function Jye(){return M.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[M.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:M.jsx(C3,{size:32,className:"text-slate-500"})}),M.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Alerts"}),M.jsx("p",{className:"text-slate-500 max-w-md",children:"Alert history and subscriptions coming in Phase 11"})]})}function e0e(){return M.jsx(s$,{children:M.jsxs(rZ,{children:[M.jsx(Ku,{path:"/",element:M.jsx(h$,{})}),M.jsx(Ku,{path:"/mesh",element:M.jsx(Pye,{})}),M.jsx(Ku,{path:"/environment",element:M.jsx(Rye,{})}),M.jsx(Ku,{path:"/config",element:M.jsx(Qye,{})}),M.jsx(Ku,{path:"/alerts",element:M.jsx(Jye,{})})]})})}GS.createRoot(document.getElementById("root")).render(M.jsx(Ec.StrictMode,{children:M.jsx(uZ,{children:M.jsx(e0e,{})})})); + */(function(t,e){(function(r,n){n(e)})($W,function(r){var n="1.9.4";function i(d){var x,w,P,N;for(w=1,P=arguments.length;w"u"||!L||!L.Mixin)){d=S(d)?d:[d];for(var x=0;x0?Math.floor(d):Math.ceil(d)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(d){return this.clone()._add(H(d))},_add:function(d){return this.x+=d.x,this.y+=d.y,this},subtract:function(d){return this.clone()._subtract(H(d))},_subtract:function(d){return this.x-=d.x,this.y-=d.y,this},divideBy:function(d){return this.clone()._divideBy(d)},_divideBy:function(d){return this.x/=d,this.y/=d,this},multiplyBy:function(d){return this.clone()._multiplyBy(d)},_multiplyBy:function(d){return this.x*=d,this.y*=d,this},scaleBy:function(d){return new V(this.x*d.x,this.y*d.y)},unscaleBy:function(d){return new V(this.x/d.x,this.y/d.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=W(this.x),this.y=W(this.y),this},distanceTo:function(d){d=H(d);var x=d.x-this.x,w=d.y-this.y;return Math.sqrt(x*x+w*w)},equals:function(d){return d=H(d),d.x===this.x&&d.y===this.y},contains:function(d){return d=H(d),Math.abs(d.x)<=Math.abs(this.x)&&Math.abs(d.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function H(d,x,w){return d instanceof V?d:S(d)?new V(d[0],d[1]):d==null?d:typeof d=="object"&&"x"in d&&"y"in d?new V(d.x,d.y):new V(d,x,w)}function X(d,x){if(d)for(var w=x?[d,x]:d,P=0,N=w.length;P=this.min.x&&w.x<=this.max.x&&x.y>=this.min.y&&w.y<=this.max.y},intersects:function(d){d=K(d);var x=this.min,w=this.max,P=d.min,N=d.max,B=N.x>=x.x&&P.x<=w.x,Z=N.y>=x.y&&P.y<=w.y;return B&&Z},overlaps:function(d){d=K(d);var x=this.min,w=this.max,P=d.min,N=d.max,B=N.x>x.x&&P.xx.y&&P.y=x.lat&&N.lat<=w.lat&&P.lng>=x.lng&&N.lng<=w.lng},intersects:function(d){d=ie(d);var x=this._southWest,w=this._northEast,P=d.getSouthWest(),N=d.getNorthEast(),B=N.lat>=x.lat&&P.lat<=w.lat,Z=N.lng>=x.lng&&P.lng<=w.lng;return B&&Z},overlaps:function(d){d=ie(d);var x=this._southWest,w=this._northEast,P=d.getSouthWest(),N=d.getNorthEast(),B=N.lat>x.lat&&P.latx.lng&&P.lng1,R8=function(){var d=!1;try{var x=Object.defineProperty({},"passive",{get:function(){d=!0}});window.addEventListener("testPassiveEventSupport",f,x),window.removeEventListener("testPassiveEventSupport",f,x)}catch{}return d}(),O8=function(){return!!document.createElement("canvas").getContext}(),__=!!(document.createElementNS&&rt("svg").createSVGRect),z8=!!__&&function(){var d=document.createElement("div");return d.innerHTML="",(d.firstChild&&d.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),B8=!__&&function(){try{var d=document.createElement("div");d.innerHTML='';var x=d.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),V8=navigator.platform.indexOf("Mac")===0,F8=navigator.platform.indexOf("Linux")===0;function Vi(d){return navigator.userAgent.toLowerCase().indexOf(d)>=0}var Re={ie:gr,ielt9:zr,edge:zi,webkit:Bi,android:du,android23:qL,androidStock:C8,opera:m_,chrome:KL,gecko:QL,safari:M8,phantom:JL,opera12:eA,win:L8,ie3d:tA,webkit3d:y_,gecko3d:rA,any3d:A8,mobile:If,mobileWebkit:P8,mobileWebkit3d:D8,msPointer:nA,pointer:iA,touch:k8,touchNative:aA,mobileOpera:I8,mobileGecko:E8,retina:N8,passiveEvents:R8,canvas:O8,svg:__,vml:B8,inlineSvg:z8,mac:V8,linux:F8},oA=Re.msPointer?"MSPointerDown":"pointerdown",sA=Re.msPointer?"MSPointerMove":"pointermove",lA=Re.msPointer?"MSPointerUp":"pointerup",uA=Re.msPointer?"MSPointerCancel":"pointercancel",x_={touchstart:oA,touchmove:sA,touchend:lA,touchcancel:uA},cA={touchstart:Z8,touchmove:Yd,touchend:Yd,touchcancel:Yd},pu={},fA=!1;function j8(d,x,w){return x==="touchstart"&&U8(),cA[x]?(w=cA[x].bind(this,w),d.addEventListener(x_[x],w,!1),w):(console.warn("wrong event specified:",x),f)}function G8(d,x,w){if(!x_[x]){console.warn("wrong event specified:",x);return}d.removeEventListener(x_[x],w,!1)}function H8(d){pu[d.pointerId]=d}function W8(d){pu[d.pointerId]&&(pu[d.pointerId]=d)}function hA(d){delete pu[d.pointerId]}function U8(){fA||(document.addEventListener(oA,H8,!0),document.addEventListener(sA,W8,!0),document.addEventListener(lA,hA,!0),document.addEventListener(uA,hA,!0),fA=!0)}function Yd(d,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var w in pu)x.touches.push(pu[w]);x.changedTouches=[x],d(x)}}function Z8(d,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),Yd(d,x)}function $8(d){var x={},w,P;for(P in d)w=d[P],x[P]=w&&w.bind?w.bind(d):w;return d=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var Y8=200;function X8(d,x){d.addEventListener("dblclick",x);var w=0,P;function N(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var Z=mA(B);if(!(Z.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!Z.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=Y8?(P++,P===2&&x($8(B))):P=1,w=Q}}}return d.addEventListener("click",N),{dblclick:x,simDblclick:N}}function q8(d,x){d.removeEventListener("dblclick",x.dblclick),d.removeEventListener("click",x.simDblclick)}var S_=Kd(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ef=Kd(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),vA=Ef==="webkitTransition"||Ef==="OTransition"?Ef+"End":"transitionend";function dA(d){return typeof d=="string"?document.getElementById(d):d}function Nf(d,x){var w=d.style[x]||d.currentStyle&&d.currentStyle[x];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(d,null);w=P?P[x]:null}return w==="auto"?null:w}function vt(d,x,w){var P=document.createElement(d);return P.className=x||"",w&&w.appendChild(P),P}function It(d){var x=d.parentNode;x&&x.removeChild(d)}function Xd(d){for(;d.firstChild;)d.removeChild(d.firstChild)}function gu(d){var x=d.parentNode;x&&x.lastChild!==d&&x.appendChild(d)}function mu(d){var x=d.parentNode;x&&x.firstChild!==d&&x.insertBefore(d,x.firstChild)}function w_(d,x){if(d.classList!==void 0)return d.classList.contains(x);var w=qd(d);return w.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(w)}function et(d,x){if(d.classList!==void 0)for(var w=p(x),P=0,N=w.length;P0?2*window.devicePixelRatio:1;function _A(d){return Re.edge?d.wheelDeltaY/2:d.deltaY&&d.deltaMode===0?-d.deltaY/J8:d.deltaY&&d.deltaMode===1?-d.deltaY*20:d.deltaY&&d.deltaMode===2?-d.deltaY*60:d.deltaX||d.deltaZ?0:d.wheelDelta?(d.wheelDeltaY||d.wheelDelta)/2:d.detail&&Math.abs(d.detail)<32765?-d.detail*20:d.detail?d.detail/-32765*60:0}function N_(d,x){var w=x.relatedTarget;if(!w)return!0;try{for(;w&&w!==d;)w=w.parentNode}catch{return!1}return w!==d}var eW={__proto__:null,on:Ke,off:Tt,stopPropagation:ks,disableScrollPropagation:E_,disableClickPropagation:Bf,preventDefault:Mr,stop:Is,getPropagationPath:mA,getMousePosition:yA,getWheelDelta:_A,isExternalTarget:N_,addListener:Ke,removeListener:Tt},xA=U.extend({run:function(d,x,w,P){this.stop(),this._el=d,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ds(d),this._offset=x.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(d){var x=+new Date-this._startTime,w=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(d):this},panInsideBounds:function(d,x){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(d));return w.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(d,x){x=x||{};var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.project(this.getCenter()),B=this.project(d),Z=this.getPixelBounds(),Q=K([Z.min.add(w),Z.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Le=Q.extend(B).getSize().subtract(te);N.x+=ae.x<0?-Le.x:Le.x,N.y+=ae.y<0?-Le.y:Le.y,this.panTo(this.unproject(N),x),this._enforcingBounds=!1}return this},invalidateSize:function(d){if(!this._loaded)return this;d=i({animate:!1,pan:!0},d===!0?{animate:!0}:d);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var w=this.getSize(),P=x.divideBy(2).round(),N=w.divideBy(2).round(),B=P.subtract(N);return!B.x&&!B.y?this:(d.animate&&d.pan?this.panBy(B):(d.pan&&this._rawPanBy(B),this.fire("move"),d.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:w}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(d){if(d=this._locateOptions=i({timeout:1e4,watch:!1},d),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),w=o(this._handleGeolocationError,this);return d.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,w,d):navigator.geolocation.getCurrentPosition(x,w,d),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(d){if(this._container._leaflet_id){var x=d.code,w=d.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+w+"."})}},_handleGeolocationResponse:function(d){if(this._container._leaflet_id){var x=d.coords.latitude,w=d.coords.longitude,P=new ue(x,w),N=P.toBounds(d.coords.accuracy*2),B=this._locateOptions;if(B.setView){var Z=this.getBoundsZoom(N);this.setView(P,B.maxZoom?Math.min(Z,B.maxZoom):Z)}var Q={latlng:P,bounds:N,timestamp:d.timestamp};for(var te in d.coords)typeof d.coords[te]=="number"&&(Q[te]=d.coords[te]);this.fire("locationfound",Q)}},addHandler:function(d,x){if(!x)return this;var w=this[d]=new x(this);return this._handlers.push(w),this.options[d]&&w.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var d;for(d in this._layers)this._layers[d].remove();for(d in this._panes)It(this._panes[d]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(d,x){var w="leaflet-pane"+(d?" leaflet-"+d.replace("Pane","")+"-pane":""),P=vt("div",w,x||this._mapPane);return d&&(this._panes[d]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var d=this.getPixelBounds(),x=this.unproject(d.getBottomLeft()),w=this.unproject(d.getTopRight());return new ne(x,w)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(d,x,w){d=ie(d),w=H(w||[0,0]);var P=this.getZoom()||0,N=this.getMinZoom(),B=this.getMaxZoom(),Z=d.getNorthWest(),Q=d.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(Z,P)).getSize(),Le=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,nt=te.y/ae.y,Yr=x?Math.max(He,nt):Math.min(He,nt);return P=this.getScaleZoom(Yr,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=x?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(N,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(d,x){var w=this._getTopLeftPoint(d,x);return new X(w,w.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(d){return this.options.crs.getProjectedBounds(d===void 0?this.getZoom():d)},getPane:function(d){return typeof d=="string"?this._panes[d]:d},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(d,x){var w=this.options.crs;return x=x===void 0?this._zoom:x,w.scale(d)/w.scale(x)},getScaleZoom:function(d,x){var w=this.options.crs;x=x===void 0?this._zoom:x;var P=w.zoom(d*w.scale(x));return isNaN(P)?1/0:P},project:function(d,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(de(d),x)},unproject:function(d,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(d),x)},layerPointToLatLng:function(d){var x=H(d).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(d){var x=this.project(de(d))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(d){return this.options.crs.wrapLatLng(de(d))},wrapLatLngBounds:function(d){return this.options.crs.wrapLatLngBounds(ie(d))},distance:function(d,x){return this.options.crs.distance(de(d),de(x))},containerPointToLayerPoint:function(d){return H(d).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(d){return H(d).add(this._getMapPanePos())},containerPointToLatLng:function(d){var x=this.containerPointToLayerPoint(H(d));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(d){return this.layerPointToContainerPoint(this.latLngToLayerPoint(de(d)))},mouseEventToContainerPoint:function(d){return yA(d,this._container)},mouseEventToLayerPoint:function(d){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(d))},mouseEventToLatLng:function(d){return this.layerPointToLatLng(this.mouseEventToLayerPoint(d))},_initContainer:function(d){var x=this._container=dA(d);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var d=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,et(d,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=Nf(d,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(d.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var d=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(et(d.markerPane,"leaflet-zoom-hide"),et(d.shadowPane,"leaflet-zoom-hide"))},_resetView:function(d,x,w){Qt(this._mapPane,new V(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var N=this._zoom!==x;this._moveStart(N,w)._move(d,x)._moveEnd(N),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(d,x){return d&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(d,x,w,P){x===void 0&&(x=this._zoom);var N=this._zoom!==x;return this._zoom=x,this._lastCenter=d,this._pixelOrigin=this._getNewPixelOrigin(d),P?w&&w.pinch&&this.fire("zoom",w):((N||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),this},_moveEnd:function(d){return d&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(d){Qt(this._mapPane,this._getMapPanePos().subtract(d))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(d){this._targets={},this._targets[l(this._container)]=this;var x=d?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(d?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var d=this._getMapPanePos();Math.max(Math.abs(d.x),Math.abs(d.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(d,x){for(var w=[],P,N=x==="mouseout"||x==="mouseover",B=d.target||d.srcElement,Z=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){Z=!0;break}if(P&&P.listens(x,!0)&&(N&&!N_(B,d)||(w.push(P),N))||B===this._container)break;B=B.parentNode}return!w.length&&!Z&&!N&&this.listens(x,!0)&&(w=[this]),w},_isClickDisabled:function(d){for(;d&&d!==this._container;){if(d._leaflet_disable_click)return!0;d=d.parentNode}},_handleDOMEvent:function(d){var x=d.target||d.srcElement;if(!(!this._loaded||x._leaflet_disable_events||d.type==="click"&&this._isClickDisabled(x))){var w=d.type;w==="mousedown"&&A_(x),this._fireDOMEvent(d,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(d,x,w){if(d.type==="click"){var P=i({},d);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var N=this._findEventTargets(d,x);if(w){for(var B=[],Z=0;Z0?Math.round(d-x)/2:Math.max(0,Math.ceil(d))-Math.max(0,Math.floor(x))},_limitZoom:function(d){var x=this.getMinZoom(),w=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(d=Math.round(d/P)*P),Math.max(x,Math.min(w,d))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(d,x){var w=this._getCenterOffset(d)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,x),!0)},_createAnimProxy:function(){var d=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(d),this.on("zoomanim",function(x){var w=S_,P=this._proxy.style[w];Ps(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[w]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var d=this.getCenter(),x=this.getZoom();Ps(this._proxy,this.project(d,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(d){this._animatingZoom&&d.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(d,x,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),N=this._getCenterOffset(d)._divideBy(1-1/P);return w.animate!==!0&&!this.getSize().contains(N)?!1:(I(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(d,x,!0)},this),!0)},_animateZoom:function(d,x,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=d,this._animateToZoom=x,et(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:d,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function tW(d,x){return new ct(d,x)}var hi=F.extend({options:{position:"topright"},initialize:function(d){g(this,d)},getPosition:function(){return this.options.position},setPosition:function(d){var x=this._map;return x&&x.removeControl(this),this.options.position=d,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(d){this.remove(),this._map=d;var x=this._container=this.onAdd(d),w=this.getPosition(),P=d._controlCorners[w];return et(x,"leaflet-control"),w.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(d){this._map&&d&&d.screenX>0&&d.screenY>0&&this._map.getContainer().focus()}}),Vf=function(d){return new hi(d)};ct.include({addControl:function(d){return d.addTo(this),this},removeControl:function(d){return d.remove(),this},_initControlPos:function(){var d=this._controlCorners={},x="leaflet-",w=this._controlContainer=vt("div",x+"control-container",this._container);function P(N,B){var Z=x+N+" "+x+B;d[N+B]=vt("div",Z,w)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var d in this._controlCorners)It(this._controlCorners[d]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var SA=hi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(d,x,w,P){return w1,this._baseLayersList.style.display=d?"":"none"),this._separator.style.display=x&&d?"":"none",this},_onLayerChange:function(d){this._handlingClick||this._update();var x=this._getLayer(l(d.target)),w=x.overlay?d.type==="add"?"overlayadd":"overlayremove":d.type==="add"?"baselayerchange":null;w&&this._map.fire(w,x)},_createRadioElement:function(d,x){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(d){var x=document.createElement("label"),w=this._map.hasLayer(d.layer),P;d.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),this._layerControlInputs.push(P),P.layerId=l(d.layer),Ke(P,"click",this._onInputClick,this);var N=document.createElement("span");N.innerHTML=" "+d.name;var B=document.createElement("span");x.appendChild(B),B.appendChild(P),B.appendChild(N);var Z=d.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var d=this._layerControlInputs,x,w,P=[],N=[];this._handlingClick=!0;for(var B=d.length-1;B>=0;B--)x=d[B],w=this._getLayer(x.layerId).layer,x.checked?P.push(w):x.checked||N.push(w);for(B=0;B=0;N--)x=d[N],w=this._getLayer(x.layerId).layer,x.disabled=w.options.minZoom!==void 0&&Pw.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var d=this._section;this._preventClick=!0,Ke(d,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(d,"click",Mr),x._preventClick=!1})}}),rW=function(d,x,w){return new SA(d,x,w)},R_=hi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(d){var x="leaflet-control-zoom",w=vt("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",w,this._zoomOut),this._updateDisabled(),d.on("zoomend zoomlevelschange",this._updateDisabled,this),w},onRemove:function(d){d.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(d){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(d.shiftKey?3:1))},_createButton:function(d,x,w,P,N){var B=vt("a",w,P);return B.innerHTML=d,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Bf(B),Ke(B,"click",Is),Ke(B,"click",N,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var d=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||d._zoom===d.getMinZoom())&&(et(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||d._zoom===d.getMaxZoom())&&(et(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new R_,this.addControl(this.zoomControl))});var nW=function(d){return new R_(d)},wA=hi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(d){var x="leaflet-control-scale",w=vt("div",x),P=this.options;return this._addScales(P,x+"-line",w),d.on(P.updateWhenIdle?"moveend":"move",this._update,this),d.whenReady(this._update,this),w},onRemove:function(d){d.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(d,x,w){d.metric&&(this._mScale=vt("div",x,w)),d.imperial&&(this._iScale=vt("div",x,w))},_update:function(){var d=this._map,x=d.getSize().y/2,w=d.distance(d.containerPointToLatLng([0,x]),d.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(w)},_updateScales:function(d){this.options.metric&&d&&this._updateMetric(d),this.options.imperial&&d&&this._updateImperial(d)},_updateMetric:function(d){var x=this._getRoundNum(d),w=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,w,x/d)},_updateImperial:function(d){var x=d*3.2808399,w,P,N;x>5280?(w=x/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(N=this._getRoundNum(x),this._updateScale(this._iScale,N+" ft",N/x))},_updateScale:function(d,x,w){d.style.width=Math.round(this.options.maxWidth*w)+"px",d.innerHTML=x},_getRoundNum:function(d){var x=Math.pow(10,(Math.floor(d)+"").length-1),w=d/x;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,x*w}}),iW=function(d){return new wA(d)},aW='',O_=hi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?aW+" ":"")+"Leaflet"},initialize:function(d){g(this,d),this._attributions={}},onAdd:function(d){d.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Bf(this._container);for(var x in d._layers)d._layers[x].getAttribution&&this.addAttribution(d._layers[x].getAttribution());return this._update(),d.on("layeradd",this._addAttribution,this),this._container},onRemove:function(d){d.off("layeradd",this._addAttribution,this)},_addAttribution:function(d){d.layer.getAttribution&&(this.addAttribution(d.layer.getAttribution()),d.layer.once("remove",function(){this.removeAttribution(d.layer.getAttribution())},this))},setPrefix:function(d){return this.options.prefix=d,this._update(),this},addAttribution:function(d){return d?(this._attributions[d]||(this._attributions[d]=0),this._attributions[d]++,this._update(),this):this},removeAttribution:function(d){return d?(this._attributions[d]&&(this._attributions[d]--,this._update()),this):this},_update:function(){if(this._map){var d=[];for(var x in this._attributions)this._attributions[x]&&d.push(x);var w=[];this.options.prefix&&w.push(this.options.prefix),d.length&&w.push(d.join(", ")),this._container.innerHTML=w.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new O_().addTo(this)});var oW=function(d){return new O_(d)};hi.Layers=SA,hi.Zoom=R_,hi.Scale=wA,hi.Attribution=O_,Vf.layers=rW,Vf.zoom=nW,Vf.scale=iW,Vf.attribution=oW;var ji=F.extend({initialize:function(d){this._map=d},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ji.addTo=function(d,x){return d.addHandler(x,this),this};var sW={Events:j},bA=Re.touch?"touchstart mousedown":"mousedown",yo=U.extend({options:{clickTolerance:3},initialize:function(d,x,w,P){g(this,P),this._element=d,this._dragStartTarget=x||d,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,bA,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(yo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,bA,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(d){if(this._enabled&&(this._moved=!1,!w_(this._element,"leaflet-zoom-anim"))){if(d.touches&&d.touches.length!==1){yo._dragging===this&&this.finishDrag();return}if(!(yo._dragging||d.shiftKey||d.which!==1&&d.button!==1&&!d.touches)&&(yo._dragging=this,this._preventOutline&&A_(this._element),C_(),Rf(),!this._moving)){this.fire("down");var x=d.touches?d.touches[0]:d,w=pA(this._element);this._startPoint=new V(x.clientX,x.clientY),this._startPos=Ds(this._element),this._parentScale=P_(w);var P=d.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(d){if(this._enabled){if(d.touches&&d.touches.length>1){this._moved=!0;return}var x=d.touches&&d.touches.length===1?d.touches[0]:d,w=new V(x.clientX,x.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(Z=Q,B=te);B>w&&(x[Z]=1,B_(d,x,w,P,Z),B_(d,x,w,Z,N))}function fW(d,x){for(var w=[d[0]],P=1,N=0,B=d.length;Px&&(w.push(d[P]),N=P);return Nx.max.x&&(w|=2),d.yx.max.y&&(w|=8),w}function hW(d,x){var w=x.x-d.x,P=x.y-d.y;return w*w+P*P}function Ff(d,x,w,P){var N=x.x,B=x.y,Z=w.x-N,Q=w.y-B,te=Z*Z+Q*Q,ae;return te>0&&(ae=((d.x-N)*Z+(d.y-B)*Q)/te,ae>1?(N=w.x,B=w.y):ae>0&&(N+=Z*ae,B+=Q*ae)),Z=d.x-N,Q=d.y-B,P?Z*Z+Q*Q:new V(N,B)}function Bn(d){return!S(d[0])||typeof d[0][0]!="object"&&typeof d[0][0]<"u"}function DA(d){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Bn(d)}function kA(d,x){var w,P,N,B,Z,Q,te,ae;if(!d||d.length===0)throw new Error("latlngs not passed");Bn(d)||(console.warn("latlngs are not flat! Only the first ring will be used"),d=d[0]);var Le=de([0,0]),He=ie(d),nt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());nt<1700&&(Le=z_(d));var Yr=d.length,mr=[];for(w=0;wP){te=(B-P)/N,ae=[Q.x-te*(Q.x-Z.x),Q.y-te*(Q.y-Z.y)];break}var sn=x.unproject(H(ae));return de([sn.lat+Le.lat,sn.lng+Le.lng])}var vW={__proto__:null,simplify:MA,pointToSegmentDistance:LA,closestPointOnSegment:uW,clipSegment:PA,_getEdgeIntersection:ep,_getBitCode:Es,_sqClosestPointOnSegment:Ff,isFlat:Bn,_flat:DA,polylineCenter:kA},V_={project:function(d){return new V(d.lng,d.lat)},unproject:function(d){return new ue(d.y,d.x)},bounds:new X([-180,-90],[180,90])},F_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(d){var x=Math.PI/180,w=this.R,P=d.lat*x,N=this.R_MINOR/w,B=Math.sqrt(1-N*N),Z=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-Z)/(1+Z),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new V(d.lng*x*w,P)},unproject:function(d){for(var x=180/Math.PI,w=this.R,P=this.R_MINOR/w,N=Math.sqrt(1-P*P),B=Math.exp(-d.y/w),Z=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=N*Math.sin(Z),ae=Math.pow((1-ae)/(1+ae),N/2),te=Math.PI/2-2*Math.atan(B*ae)-Z,Z+=te;return new ue(Z*x,d.x*x/w)}},dW={__proto__:null,LonLat:V_,Mercator:F_,SphericalMercator:De},pW=i({},xe,{code:"EPSG:3395",projection:F_,transformation:function(){var d=.5/(Math.PI*F_.R);return Me(d,.5,-d,.5)}()}),IA=i({},xe,{code:"EPSG:4326",projection:V_,transformation:Me(1/180,1,-1/180,.5)}),gW=i({},Ge,{projection:V_,transformation:Me(1,0,-1,0),scale:function(d){return Math.pow(2,d)},zoom:function(d){return Math.log(d)/Math.LN2},distance:function(d,x){var w=x.lng-d.lng,P=x.lat-d.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=pW,Ge.EPSG3857=st,Ge.EPSG900913=Ye,Ge.EPSG4326=IA,Ge.Simple=gW;var vi=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(d){return d.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(d){return d&&d.removeLayer(this),this},getPane:function(d){return this._map.getPane(d?this.options[d]||d:this.options.pane)},addInteractiveTarget:function(d){return this._map._targets[l(d)]=this,this},removeInteractiveTarget:function(d){return delete this._map._targets[l(d)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(d){var x=d.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var w=this.getEvents();x.on(w,this),this.once("remove",function(){x.off(w,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(d){if(!d._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(d);return this._layers[x]?this:(this._layers[x]=d,d._mapToAdd=this,d.beforeAdd&&d.beforeAdd(this),this.whenReady(d._layerAdd,d),this)},removeLayer:function(d){var x=l(d);return this._layers[x]?(this._loaded&&d.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:d}),d.fire("remove")),d._map=d._mapToAdd=null,this):this},hasLayer:function(d){return l(d)in this._layers},eachLayer:function(d,x){for(var w in this._layers)d.call(x,this._layers[w]);return this},_addLayers:function(d){d=d?S(d)?d:[d]:[];for(var x=0,w=d.length;xthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&x[0]instanceof ue&&x[0].equals(x[w-1])&&x.pop(),x},_setLatLngs:function(d){Ma.prototype._setLatLngs.call(this,d),Bn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Bn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var d=this._renderer._bounds,x=this.options.weight,w=new V(x,x);if(d=new X(d.min.subtract(w),d.max.add(w)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(d))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,N=this._rings.length,B;Pd.y!=N.y>d.y&&d.x<(N.x-P.x)*(d.y-P.y)/(N.y-P.y)+P.x&&(x=!x);return x||Ma.prototype._containsPoint.call(this,d,!0)}});function TW(d,x){return new xu(d,x)}var La=Ca.extend({initialize:function(d,x){g(this,x),this._layers={},d&&this.addData(d)},addData:function(d){var x=S(d)?d:d.features,w,P,N;if(x){for(w=0,P=x.length;w0&&N.push(N[0].slice()),N}function Su(d,x){return d.feature?i({},d.feature,{geometry:x}):op(x)}function op(d){return d.type==="Feature"||d.type==="FeatureCollection"?d:{type:"Feature",properties:{},geometry:d}}var W_={toGeoJSON:function(d){return Su(this,{type:"Point",coordinates:H_(this.getLatLng(),d)})}};tp.include(W_),j_.include(W_),rp.include(W_),Ma.include({toGeoJSON:function(d){var x=!Bn(this._latlngs),w=ap(this._latlngs,x?1:0,!1,d);return Su(this,{type:(x?"Multi":"")+"LineString",coordinates:w})}}),xu.include({toGeoJSON:function(d){var x=!Bn(this._latlngs),w=x&&!Bn(this._latlngs[0]),P=ap(this._latlngs,w?2:x?1:0,!0,d);return x||(P=[P]),Su(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),yu.include({toMultiPoint:function(d){var x=[];return this.eachLayer(function(w){x.push(w.toGeoJSON(d).geometry.coordinates)}),Su(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(d){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(d);var w=x==="GeometryCollection",P=[];return this.eachLayer(function(N){if(N.toGeoJSON){var B=N.toGeoJSON(d);if(w)P.push(B.geometry);else{var Z=op(B);Z.type==="FeatureCollection"?P.push.apply(P,Z.features):P.push(Z)}}}),w?Su(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function RA(d,x){return new La(d,x)}var CW=RA,sp=vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(d,x,w){this._url=d,this._bounds=ie(x),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(et(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(d){return this.options.opacity=d,this._image&&this._updateOpacity(),this},setStyle:function(d){return d.opacity&&this.setOpacity(d.opacity),this},bringToFront:function(){return this._map&&gu(this._image),this},bringToBack:function(){return this._map&&mu(this._image),this},setUrl:function(d){return this._url=d,this._image&&(this._image.src=d),this},setBounds:function(d){return this._bounds=ie(d),this._map&&this._reset(),this},getEvents:function(){var d={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(d.zoomanim=this._animateZoom),d},setZIndex:function(d){return this.options.zIndex=d,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var d=this._url.tagName==="IMG",x=this._image=d?this._url:vt("img");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=f,x.onmousemove=f,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),d){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(d){var x=this._map.getZoomScale(d.zoom),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,d.zoom,d.center).min;Ps(this._image,w,x)},_reset:function(){var d=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=x.getSize();Qt(d,x.min),d.style.width=w.x+"px",d.style.height=w.y+"px"},_updateOpacity:function(){zn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var d=this.options.errorOverlayUrl;d&&this._url!==d&&(this._url=d,this._image.src=d)},getCenter:function(){return this._bounds.getCenter()}}),MW=function(d,x,w){return new sp(d,x,w)},OA=sp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var d=this._url.tagName==="VIDEO",x=this._image=d?this._url:vt("video");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=f,x.onmousemove=f,x.onloadeddata=o(this.fire,this,"load"),d){for(var w=x.getElementsByTagName("source"),P=[],N=0;N0?P:[x.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var B=0;BN?(x.height=N+"px",et(d,B)):Zt(d,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(d){var x=this._map._latLngToNewLayerPoint(this._latlng,d.zoom,d.center),w=this._getAnchor();Qt(this._container,x.add(w))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var d=this._map,x=parseInt(Nf(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+x,P=this._containerWidth,N=new V(this._containerLeft,-w-this._containerBottom);N._add(Ds(this._container));var B=d.layerPointToContainerPoint(N),Z=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||Z),te=H(this.options.autoPanPaddingBottomRight||Z),ae=d.getSize(),Le=0,He=0;B.x+P+te.x>ae.x&&(Le=B.x+P-ae.x+te.x),B.x-Le-Q.x<0&&(Le=B.x-Q.x),B.y+w+te.y>ae.y&&(He=B.y+w-ae.y+te.y),B.y-He-Q.y<0&&(He=B.y-Q.y),(Le||He)&&(this.options.keepInView&&(this._autopanning=!0),d.fire("autopanstart").panBy([Le,He]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),PW=function(d,x){return new lp(d,x)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(d,x,w){return this._initOverlay(lp,d,x,w).openOn(this),this},closePopup:function(d){return d=arguments.length?d:this._popup,d&&d.close(),this}}),vi.include({bindPopup:function(d,x){return this._popup=this._initOverlay(lp,this._popup,d,x),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(d){return this._popup&&(this instanceof Ca||(this._popup._source=this),this._popup._prepareOpen(d||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(d){return this._popup&&this._popup.setContent(d),this},getPopup:function(){return this._popup},_openPopup:function(d){if(!(!this._popup||!this._map)){Is(d);var x=d.layer||d.target;if(this._popup._source===x&&!(x instanceof _o)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(d.latlng);return}this._popup._source=x,this.openPopup(d.latlng)}},_movePopup:function(d){this._popup.setLatLng(d.latlng)},_onKeyPress:function(d){d.originalEvent.keyCode===13&&this._openPopup(d)}});var up=Gi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(d){Gi.prototype.onAdd.call(this,d),this.setOpacity(this.options.opacity),d.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(d){Gi.prototype.onRemove.call(this,d),d.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var d=Gi.prototype.getEvents.call(this);return this.options.permanent||(d.preclick=this.close),d},_initLayout:function(){var d="leaflet-tooltip",x=d+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=vt("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(d){var x,w,P=this._map,N=this._container,B=P.latLngToContainerPoint(P.getCenter()),Z=P.layerPointToContainerPoint(d),Q=this.options.direction,te=N.offsetWidth,ae=N.offsetHeight,Le=H(this.options.offset),He=this._getAnchor();Q==="top"?(x=te/2,w=ae):Q==="bottom"?(x=te/2,w=0):Q==="center"?(x=te/2,w=ae/2):Q==="right"?(x=0,w=ae/2):Q==="left"?(x=te,w=ae/2):Z.xthis.options.maxZoom||wP?this._retainParent(N,B,Z,P):!1)},_retainChildren:function(d,x,w,P){for(var N=2*d;N<2*d+2;N++)for(var B=2*x;B<2*x+2;B++){var Z=new V(N,B);Z.z=w+1;var Q=this._tileCoordsToKey(Z),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&N1){this._setView(d,w);return}for(var He=N.min.y;He<=N.max.y;He++)for(var nt=N.min.x;nt<=N.max.x;nt++){var Yr=new V(nt,He);if(Yr.z=this._tileZoom,!!this._isValidTile(Yr)){var mr=this._tiles[this._tileCoordsToKey(Yr)];mr?mr.current=!0:Z.push(Yr)}}if(Z.sort(function(sn,bu){return sn.distanceTo(B)-bu.distanceTo(B)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Vn=document.createDocumentFragment();for(nt=0;ntw.max.x)||!x.wrapLat&&(d.yw.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(d);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(d){return this._tileCoordsToBounds(this._keyToTileCoords(d))},_tileCoordsToNwSe:function(d){var x=this._map,w=this.getTileSize(),P=d.scaleBy(w),N=P.add(w),B=x.unproject(P,d.z),Z=x.unproject(N,d.z);return[B,Z]},_tileCoordsToBounds:function(d){var x=this._tileCoordsToNwSe(d),w=new ne(x[0],x[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(d){return d.x+":"+d.y+":"+d.z},_keyToTileCoords:function(d){var x=d.split(":"),w=new V(+x[0],+x[1]);return w.z=+x[2],w},_removeTile:function(d){var x=this._tiles[d];x&&(It(x.el),delete this._tiles[d],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(d)}))},_initTile:function(d){et(d,"leaflet-tile");var x=this.getTileSize();d.style.width=x.x+"px",d.style.height=x.y+"px",d.onselectstart=f,d.onmousemove=f,Re.ielt9&&this.options.opacity<1&&zn(d,this.options.opacity)},_addTile:function(d,x){var w=this._getTilePos(d),P=this._tileCoordsToKey(d),N=this.createTile(this._wrapCoords(d),o(this._tileReady,this,d));this._initTile(N),this.createTile.length<2&&I(o(this._tileReady,this,d,null,N)),Qt(N,w),this._tiles[P]={el:N,coords:d,current:!0},x.appendChild(N),this.fire("tileloadstart",{tile:N,coords:d})},_tileReady:function(d,x,w){x&&this.fire("tileerror",{error:x,tile:w,coords:d});var P=this._tileCoordsToKey(d);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(zn(w.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),x||(et(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.el,coords:d})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(d){return d.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(d){var x=new V(this._wrapX?c(d.x,this._wrapX):d.x,this._wrapY?c(d.y,this._wrapY):d.y);return x.z=d.z,x},_pxBoundsToTileRange:function(d){var x=this.getTileSize();return new X(d.min.unscaleBy(x).floor(),d.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var d in this._tiles)if(!this._tiles[d].loaded)return!1;return!0}});function IW(d){return new Gf(d)}var wu=Gf.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(d,x){this._url=d,x=g(this,x),x.detectRetina&&Re.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(d,x){return this._url===d&&x===void 0&&(x=!0),this._url=d,x||this.redraw(),this},createTile:function(d,x){var w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,x,w)),Ke(w,"error",o(this._tileOnError,this,x,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(d),w},getTileUrl:function(d){var x={r:Re.retina?"@2x":"",s:this._getSubdomain(d),x:d.x,y:d.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var w=this._globalTileRange.max.y-d.y;this.options.tms&&(x.y=w),x["-y"]=w}return _(this._url,i(x,this.options))},_tileOnLoad:function(d,x){Re.ielt9?setTimeout(o(d,this,null,x),0):d(null,x)},_tileOnError:function(d,x,w){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),d(w,x)},_onTileRemove:function(d){d.tile.onload=null},_getZoomForUrl:function(){var d=this._tileZoom,x=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(d=x-d),d+P},_getSubdomain:function(d){var x=Math.abs(d.x+d.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var d,x;for(d in this._tiles)if(this._tiles[d].coords.z!==this._tileZoom&&(x=this._tiles[d].el,x.onload=f,x.onerror=f,!x.complete)){x.src=C;var w=this._tiles[d].coords;It(x),delete this._tiles[d],this.fire("tileabort",{tile:x,coords:w})}},_removeTile:function(d){var x=this._tiles[d];if(x)return x.el.setAttribute("src",C),Gf.prototype._removeTile.call(this,d)},_tileReady:function(d,x,w){if(!(!this._map||w&&w.getAttribute("src")===C))return Gf.prototype._tileReady.call(this,d,x,w)}});function VA(d,x){return new wu(d,x)}var FA=wu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(d,x){this._url=d;var w=i({},this.defaultWmsParams);for(var P in x)P in this.options||(w[P]=x[P]);x=g(this,x);var N=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();w.width=B.x*N,w.height=B.y*N,this.wmsParams=w},onAdd:function(d){this._crs=this.options.crs||d.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,wu.prototype.onAdd.call(this,d)},getTileUrl:function(d){var x=this._tileCoordsToNwSe(d),w=this._crs,P=K(w.project(x[0]),w.project(x[1])),N=P.min,B=P.max,Z=(this._wmsVersion>=1.3&&this._crs===IA?[N.y,N.x,B.y,B.x]:[N.x,N.y,B.x,B.y]).join(","),Q=wu.prototype.getTileUrl.call(this,d);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(d,x){return i(this.wmsParams,d),x||this.redraw(),this}});function EW(d,x){return new FA(d,x)}wu.WMS=FA,VA.wms=EW;var Aa=vi.extend({options:{padding:.1},initialize:function(d){g(this,d),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),et(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var d={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(d.zoomanim=this._onAnimZoom),d},_onAnimZoom:function(d){this._updateTransform(d.center,d.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(d,x){var w=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),N=this._map.project(this._center,x),B=P.multiplyBy(-w).add(N).subtract(this._map._getNewPixelOrigin(d,x));Re.any3d?Ps(this._container,B,w):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var d in this._layers)this._layers[d]._reset()},_onZoomEnd:function(){for(var d in this._layers)this._layers[d]._project()},_updatePaths:function(){for(var d in this._layers)this._layers[d]._update()},_update:function(){var d=this.options.padding,x=this._map.getSize(),w=this._map.containerPointToLayerPoint(x.multiplyBy(-d)).round();this._bounds=new X(w,w.add(x.multiplyBy(1+d*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),jA=Aa.extend({options:{tolerance:0},getEvents:function(){var d=Aa.prototype.getEvents.call(this);return d.viewprereset=this._onViewPreReset,d},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Aa.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var d=this._container=document.createElement("canvas");Ke(d,"mousemove",this._onMouseMove,this),Ke(d,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(d,"mouseout",this._handleMouseOut,this),d._leaflet_disable_events=!0,this._ctx=d.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var d;this._redrawBounds=null;for(var x in this._layers)d=this._layers[x],d._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,x=this._container,w=d.getSize(),P=Re.retina?2:1;Qt(x,d.min),x.width=P*w.x,x.height=P*w.y,x.style.width=w.x+"px",x.style.height=w.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-d.min.x,-d.min.y),this.fire("update")}},_reset:function(){Aa.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(d){this._updateDashArray(d),this._layers[l(d)]=d;var x=d._order={layer:d,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(d){this._requestRedraw(d)},_removePath:function(d){var x=d._order,w=x.next,P=x.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,delete d._order,delete this._layers[l(d)],this._requestRedraw(d)},_updatePath:function(d){this._extendRedrawBounds(d),d._project(),d._update(),this._requestRedraw(d)},_updateStyle:function(d){this._updateDashArray(d),this._requestRedraw(d)},_updateDashArray:function(d){if(typeof d.options.dashArray=="string"){var x=d.options.dashArray.split(/[, ]+/),w=[],P,N;for(N=0;N')}}catch{}return function(d){return document.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),NW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Aa.prototype._update.call(this),this.fire("update"))},_initPath:function(d){var x=d._container=Hf("shape");et(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",d._path=Hf("path"),x.appendChild(d._path),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){var x=d._container;this._container.appendChild(x),d.options.interactive&&d.addInteractiveTarget(x)},_removePath:function(d){var x=d._container;It(x),d.removeInteractiveTarget(x),delete this._layers[l(d)]},_updateStyle:function(d){var x=d._stroke,w=d._fill,P=d.options,N=d._container;N.stroked=!!P.stroke,N.filled=!!P.fill,P.stroke?(x||(x=d._stroke=Hf("stroke")),N.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(N.removeChild(x),d._stroke=null),P.fill?(w||(w=d._fill=Hf("fill")),N.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(N.removeChild(w),d._fill=null)},_updateCircle:function(d){var x=d._point.round(),w=Math.round(d._radius),P=Math.round(d._radiusY||w);this._setPath(d,d._empty()?"M0 0":"AL "+x.x+","+x.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(d,x){d._path.v=x},_bringToFront:function(d){gu(d._container)},_bringToBack:function(d){mu(d._container)}},cp=Re.vml?Hf:rt,Wf=Aa.extend({_initContainer:function(){this._container=cp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=cp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Aa.prototype._update.call(this);var d=this._bounds,x=d.getSize(),w=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,w.setAttribute("width",x.x),w.setAttribute("height",x.y)),Qt(w,d.min),w.setAttribute("viewBox",[d.min.x,d.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(d){var x=d._path=cp("path");d.options.className&&et(x,d.options.className),d.options.interactive&&et(x,"leaflet-interactive"),this._updateStyle(d),this._layers[l(d)]=d},_addPath:function(d){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(d._path),d.addInteractiveTarget(d._path)},_removePath:function(d){It(d._path),d.removeInteractiveTarget(d._path),delete this._layers[l(d)]},_updatePath:function(d){d._project(),d._update()},_updateStyle:function(d){var x=d._path,w=d.options;x&&(w.stroke?(x.setAttribute("stroke",w.color),x.setAttribute("stroke-opacity",w.opacity),x.setAttribute("stroke-width",w.weight),x.setAttribute("stroke-linecap",w.lineCap),x.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?x.setAttribute("stroke-dasharray",w.dashArray):x.removeAttribute("stroke-dasharray"),w.dashOffset?x.setAttribute("stroke-dashoffset",w.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),w.fill?(x.setAttribute("fill",w.fillColor||w.color),x.setAttribute("fill-opacity",w.fillOpacity),x.setAttribute("fill-rule",w.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(d,x){this._setPath(d,ut(d._parts,x))},_updateCircle:function(d){var x=d._point,w=Math.max(Math.round(d._radius),1),P=Math.max(Math.round(d._radiusY),1)||w,N="a"+w+","+P+" 0 1,0 ",B=d._empty()?"M0 0":"M"+(x.x-w)+","+x.y+N+w*2+",0 "+N+-w*2+",0 ";this._setPath(d,B)},_setPath:function(d,x){d._path.setAttribute("d",x)},_bringToFront:function(d){gu(d._path)},_bringToBack:function(d){mu(d._path)}});Re.vml&&Wf.include(NW);function HA(d){return Re.svg||Re.vml?new Wf(d):null}ct.include({getRenderer:function(d){var x=d.options.renderer||this._getPaneRenderer(d.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(d){if(d==="overlayPane"||d===void 0)return!1;var x=this._paneRenderers[d];return x===void 0&&(x=this._createRenderer({pane:d}),this._paneRenderers[d]=x),x},_createRenderer:function(d){return this.options.preferCanvas&&GA(d)||HA(d)}});var WA=xu.extend({initialize:function(d,x){xu.prototype.initialize.call(this,this._boundsToLatLngs(d),x)},setBounds:function(d){return this.setLatLngs(this._boundsToLatLngs(d))},_boundsToLatLngs:function(d){return d=ie(d),[d.getSouthWest(),d.getNorthWest(),d.getNorthEast(),d.getSouthEast()]}});function RW(d,x){return new WA(d,x)}Wf.create=cp,Wf.pointsToPath=ut,La.geometryToLayer=np,La.coordsToLatLng=G_,La.coordsToLatLngs=ip,La.latLngToCoords=H_,La.latLngsToCoords=ap,La.getFeature=Su,La.asFeature=op,ct.mergeOptions({boxZoom:!0});var UA=ji.extend({initialize:function(d){this._map=d,this._container=d._container,this._pane=d._panes.overlayPane,this._resetStateTimeout=0,d.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(d){if(!d.shiftKey||d.which!==1&&d.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Rf(),C_(),this._startPoint=this._map.mouseEventToContainerPoint(d),Ke(document,{contextmenu:Is,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(d){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(d);var x=new X(this._point,this._startPoint),w=x.getSize();Qt(this._box,x.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Of(),M_(),Tt(document,{contextmenu:Is,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(d){if(!(d.which!==1&&d.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(d){d.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",UA),ct.mergeOptions({doubleClickZoom:!0});var ZA=ji.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(d){var x=this._map,w=x.getZoom(),P=x.options.zoomDelta,N=d.originalEvent.shiftKey?w-P:w+P;x.options.doubleClickZoom==="center"?x.setZoom(N):x.setZoomAround(d.containerPoint,N)}});ct.addInitHook("addHandler","doubleClickZoom",ZA),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $A=ji.extend({addHooks:function(){if(!this._draggable){var d=this._map;this._draggable=new yo(d._mapPane,d._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),d.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),d.on("zoomend",this._onZoomEnd,this),d.whenReady(this._onZoomEnd,this))}et(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var d=this._map;if(d._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;d.fire("movestart").fire("dragstart"),d.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(d){if(this._map.options.inertia){var x=this._lastTime=+new Date,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),this._times.push(x),this._prunePositions(x)}this._map.fire("move",d).fire("drag",d)},_prunePositions:function(d){for(;this._positions.length>1&&d-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var d=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(d).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(d,x){return d-(d-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var d=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;d.xx.max.x&&(d.x=this._viscousLimit(d.x,x.max.x)),d.y>x.max.y&&(d.y=this._viscousLimit(d.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(d)}},_onPreDragWrap:function(){var d=this._worldWidth,x=Math.round(d/2),w=this._initialWorldOffset,P=this._draggable._newPos.x,N=(P-x+w)%d+x-w,B=(P+x+w)%d-x-w,Z=Math.abs(N+w)0?B:-B))-x;this._delta=0,this._startTime=null,Z&&(d.options.scrollWheelZoom==="center"?d.setZoom(x+Z):d.setZoomAround(this._lastMousePos,x+Z))}});ct.addInitHook("addHandler","scrollWheelZoom",XA);var OW=600;ct.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var qA=ji.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(d){if(clearTimeout(this._holdTimeout),d.touches.length===1){var x=d.touches[0];this._startPos=this._newPos=new V(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),OW),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function d(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",d)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(d){var x=d.touches[0];this._newPos=new V(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(d,x){var w=new MouseEvent(d,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});w._simulated=!0,x.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",qA),ct.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var KA=ji.extend({addHooks:function(){et(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(d){var x=this._map;if(!(!d.touches||d.touches.length!==2||x._animatingZoom||this._zooming)){var w=x.mouseEventToContainerPoint(d.touches[0]),P=x.mouseEventToContainerPoint(d.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(w.add(P)._divideBy(2))),this._startDist=w.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(d)}},_onTouchMove:function(d){if(!(!d.touches||d.touches.length!==2||!this._zooming)){var x=this._map,w=x.mouseEventToContainerPoint(d.touches[0]),P=x.mouseEventToContainerPoint(d.touches[1]),N=w.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(N,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoomx.getMaxZoom()&&N>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,N===1)return}else{var B=w._add(P)._divideBy(2)._subtract(this._centerPoint);if(N===1&&B.x===0&&B.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var Z=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(Z,this,!0),Mr(d)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",KA),ct.BoxZoom=UA,ct.DoubleClickZoom=ZA,ct.Drag=$A,ct.Keyboard=YA,ct.ScrollWheelZoom=XA,ct.TapHold=qA,ct.TouchZoom=KA,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=jA,r.Circle=j_,r.CircleMarker=rp,r.Class=F,r.Control=hi,r.DivIcon=BA,r.DivOverlay=Gi,r.DomEvent=eW,r.DomUtil=Q8,r.Draggable=yo,r.Evented=U,r.FeatureGroup=Ca,r.GeoJSON=La,r.GridLayer=Gf,r.Handler=ji,r.Icon=_u,r.ImageOverlay=sp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=vi,r.LayerGroup=yu,r.LineUtil=vW,r.Map=ct,r.Marker=tp,r.Mixin=sW,r.Path=_o,r.Point=V,r.PolyUtil=lW,r.Polygon=xu,r.Polyline=Ma,r.Popup=lp,r.PosAnimation=xA,r.Projection=dW,r.Rectangle=WA,r.Renderer=Aa,r.SVG=Wf,r.SVGOverlay=zA,r.TileLayer=wu,r.Tooltip=up,r.Transformation=he,r.Util=O,r.VideoOverlay=OA,r.bind=o,r.bounds=K,r.canvas=GA,r.circle=wW,r.circleMarker=SW,r.control=Vf,r.divIcon=kW,r.extend=i,r.featureGroup=yW,r.geoJSON=RA,r.geoJson=CW,r.gridLayer=IW,r.icon=_W,r.imageOverlay=MW,r.latLng=de,r.latLngBounds=ie,r.layerGroup=mW,r.map=tW,r.marker=xW,r.point=H,r.polygon=TW,r.polyline=bW,r.popup=PW,r.rectangle=RW,r.setOptions=g,r.stamp=l,r.svg=HA,r.svgOverlay=AW,r.tileLayer=VA,r.tooltip=DW,r.transformation=Me,r.version=n,r.videoOverlay=LW;var zW=window.L;r.noConflict=function(){return window.L=zW,this},window.L=r})})(nC,nC.exports);var vu=nC.exports;const y8=aC(vu);function $d(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function XL(t,e){return e==null?function(n,i){const a=Y.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=Y.useRef();a.current||(a.current=t(n,i));const o=Y.useRef(n),{instance:s}=a.current;return Y.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function _8(t,e){Y.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function uye(t){return function(r){const n=p_(),i=t(g_(r,n),n);return d8(n.map,r.attribution),YL(i.current,r.eventHandlers),_8(i.current,n),i}}function cye(t,e){const r=Y.useRef();Y.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function fye(t){return function(r){const n=p_(),i=t(g_(r,n),n);return YL(i.current,r.eventHandlers),_8(i.current,n),cye(i.current,r),i}}function x8(t,e){const r=XL(t),n=lye(r,e);return oye(n)}function S8(t,e){const r=XL(t,e),n=fye(r);return aye(n)}function hye(t,e){const r=XL(t,e),n=uye(r);return sye(n)}function vye(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function dye(){return p_().map}const pye=S8(function({center:e,children:r,...n},i){const a=new vu.CircleMarker(e,n);return $d(a,p8(i,{overlayContainer:a}))},rye);function iC(){return iC=Object.assign||function(t){for(var e=1;e(v==null?void 0:v.map)??null,[v]);const g=Y.useCallback(y=>{if(y!==null&&v===null){const _=new vu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(iye(_))}},[]);Y.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const m=v?Nc.createElement(m8,{value:v},n):o??null;return Nc.createElement("div",iC({},h,{ref:g}),m)}const mye=Y.forwardRef(gye),yye=S8(function({positions:e,...r},n){const i=new vu.Polyline(e,r);return $d(i,p8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),_ye=x8(function(e,r){const n=new vu.Popup(e,r.overlayContainer);return $d(n,r)},function(e,r,{position:n},i){Y.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),xye=hye(function({url:e,...r},n){const i=new vu.TileLayer(e,g_(r,n));return $d(i,n)},function(e,r,n){vye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Sye=x8(function(e,r){const n=new vu.Tooltip(e,r.overlayContainer);return $d(n,r)},function(e,r,{position:n},i){Y.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),wye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",bye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Tye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete y8.Icon.Default.prototype._getIconUrl;y8.Icon.Default.mergeOptions({iconUrl:wye,iconRetinaUrl:bye,shadowUrl:Tye});const n5=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Cye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Mye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Lye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Aye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Pye({bounds:t}){const e=dye();return Y.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Dye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return T.jsxs("div",{className:"min-w-[200px]",children:[T.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),T.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),T.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[T.jsx("div",{className:"text-slate-500",children:"Role"}),T.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),T.jsx("div",{className:"text-slate-500",children:"Hardware"}),T.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),T.jsx("div",{className:"text-slate-500",children:"Battery"}),T.jsx("div",{className:"text-slate-700",children:r}),T.jsx("div",{className:"text-slate-500",children:"Last Heard"}),T.jsx("div",{className:"text-slate-700",children:Aye(t.last_heard)})]}),e&&T.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[T.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[T.jsx(Km,{size:10}),"Google Maps"]}),T.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[T.jsx(Km,{size:10}),"OSM"]})]})]})}function kye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Y.useMemo(()=>t.filter(f=>f.latitude!==null&&f.longitude!==null),[t]),a=t.length-i.length,o=Y.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=Y.useMemo(()=>e.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[e,o]),l=Y.useMemo(()=>{if(i.length===0)return null;const f=i.map(v=>v.latitude),h=i.map(v=>v.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=Y.useMemo(()=>{const f=new Set;return r!==null&&e.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,e]);return T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsxs(mye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[T.jsx(xye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),T.jsx(Pye,{bounds:l}),s.map((f,h)=>{const v=o.get(f.from_node),p=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return T.jsx(yye,{positions:[[v.latitude,v.longitude],[p.latitude,p.longitude]],color:Mye(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,v=c.has(f.node_num),p=r===null||h||v,g=Cye.includes(f.role),m=Lye(f.latitude),y=n5[m%n5.length];return T.jsxs(pye,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[T.jsx(Sye,{direction:"top",offset:[0,-8],children:T.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),T.jsx(_ye,{children:T.jsx(Dye,{node:f})})]},f.node_num)})]}),T.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[T.jsx(V3,{size:12}),T.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&T.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const i5=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Iye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function a5(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Eye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function Nye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Rye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function Oye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function zye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Bye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=Y.useMemo(()=>{if(!t)return[];const f=new Map(r.map(v=>[v.node_num,v])),h=[];return e.forEach(v=>{if(v.from_node===t.node_num){const p=f.get(v.to_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}else if(v.to_node===t.node_num){const p=f.get(v.from_node);p&&h.push({node:p,snr:v.snr,quality:v.quality})}}),h.sort((v,p)=>p.snr-v.snr)},[t,e,r]);if(!t)return T.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[T.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:T.jsx(Gc,{size:24,className:"text-slate-500"})}),T.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=Iye.includes(t.role),o=Nye(t.latitude),s=i5[o%i5.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return T.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[T.jsxs("div",{className:"p-4 border-b border-border",children:[T.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),T.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),T.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),T.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),T.jsx("div",{className:"text-sm text-slate-300",children:Rye(o)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),T.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&T.jsx(s2,{size:12,className:"text-amber-400"}),u]})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${zye(t.last_heard)}`}),T.jsx("span",{className:"text-sm text-slate-300",children:Oye(t.last_heard)})]})]}),T.jsxs("div",{className:"col-span-2",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),T.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&T.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[T.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[T.jsx(Km,{size:10}),"Google Maps"]}),T.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[T.jsx(Km,{size:10}),"OSM"]})]}),T.jsxs("div",{className:"flex-1 overflow-y-auto",children:[T.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?T.jsx("div",{className:"divide-y divide-border",children:i.map(f=>T.jsxs("button",{onClick:()=>n(f.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:a5(f.snr)},children:[T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),T.jsxs("div",{className:"text-right flex-shrink-0",children:[T.jsxs("div",{className:"text-xs font-mono",style:{color:a5(f.snr)},children:[f.snr.toFixed(1)," dB"]}),T.jsx("div",{className:"text-xs text-slate-500",children:Eye(f.snr)})]})]},f.node.node_num))}):T.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const o5=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Vye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Fye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function jye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function s5(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function Gye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=Y.useState(""),[a,o]=Y.useState("short_name"),[s,l]=Y.useState("asc"),[u,c]=Y.useState("all"),f=Y.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>o5.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||s5(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),h=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},v=({field:p})=>a!==p?null:s==="asc"?T.jsx(IZ,{size:14,className:"inline ml-1"}):T.jsx(i2,{size:14,className:"inline ml-1"});return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[T.jsxs("div",{className:"relative flex-1 max-w-xs",children:[T.jsx($Z,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),T.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx(o2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>T.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),T.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",t.length," nodes"]})]}),T.jsxs("div",{className:"overflow-x-auto",children:[T.jsxs("table",{className:"w-full text-sm",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[T.jsx("th",{className:"w-8 px-3 py-2"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",T.jsx(v,{field:"short_name"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",T.jsx(v,{field:"role"})]}),T.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",T.jsx(v,{field:"battery_level"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",T.jsx(v,{field:"last_heard"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",T.jsx(v,{field:"hardware"})]})]})}),T.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(p=>{const g=o5.includes(p.role),m=p.node_num===e;return T.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[T.jsx("td",{className:"px-3 py-2",children:T.jsx("div",{className:`w-2 h-2 rounded-full ${Vye(p.last_heard)}`})}),T.jsxs("td",{className:"px-3 py-2",children:[T.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),T.jsx("td",{className:"px-3 py-2",children:T.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:s5(p.latitude)}),T.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:jye(p)}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:Fye(p.last_heard)}),T.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),f.length>100&&T.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&T.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function Hye(){const[t,e]=Y.useState([]),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(null),[l,u]=Y.useState("topo"),[c,f]=Y.useState(!0),[h,v]=Y.useState(null);Y.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([e$(),t$(),d$()]).then(([m,y,_])=>{e(m),n(y),a(_),f(!1)}).catch(m=>{v(m.message),f(!1)})},[]);const p=Y.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=Y.useCallback(m=>{s(m)},[]);return c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),T.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[T.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[T.jsx(jZ,{size:14}),"Topology"]}),T.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[T.jsx(BZ,{size:14}),"Geographic"]})]})]}),T.jsxs("div",{className:"flex gap-0",children:[T.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?T.jsx(tye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):T.jsx(kye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),T.jsx(Bye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),T.jsx(Gye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Wye({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center justify-between mb-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),T.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),T.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),T.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[T.jsxs("div",{children:["Events: ",t.event_count]}),T.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&T.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function Uye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:M0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:vs,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:Qm,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:Qm,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:18,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),T.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&T.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),T.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[T.jsx("span",{className:"uppercase",children:t.source}),t.expires&&T.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function Zye({swpc:t}){var n,i;if(!t||!t.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(_D,{size:14}),"Solar/Geomagnetic Indices"]}),T.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(_D,{size:14}),"Solar/Geomagnetic Indices"]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),T.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),T.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&T.jsxs("div",{className:"space-y-2",children:[T.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>T.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function $ye({ducting:t}){if(!t||!t.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(xD,{size:14}),"Tropospheric Ducting"]}),T.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(xD,{size:14}),"Tropospheric Ducting"]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),T.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),T.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[T.jsx("div",{children:"dM/dz reference:"}),T.jsxs("div",{className:"mt-1 space-y-0.5",children:[T.jsx("div",{children:">79: Normal propagation"}),T.jsx("div",{children:"0–79: Super-refraction"}),T.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&T.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Yye(){var k;const[t,e]=Y.useState(null),[r,n]=Y.useState([]),[i,a]=Y.useState(null),[o,s]=Y.useState(null),[l,u]=Y.useState([]),[c,f]=Y.useState(null),[h,v]=Y.useState([]),[p,g]=Y.useState([]),[m,y]=Y.useState([]),[_,S]=Y.useState([]),[b,C]=Y.useState(0),[M,A]=Y.useState(!0),[D,E]=Y.useState(null);return Y.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([W3().catch(()=>null),i$().catch(()=>[]),o$().catch(()=>null),s$().catch(()=>null),l$().catch(()=>[]),u$().catch(()=>null),c$().catch(()=>[]),f$().catch(()=>[]),h$().catch(()=>[]),v$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,F,G,j,U,V,W,H])=>{e(I),n(z),a(O),s(F),u(G),f(j),v(U||[]),g(V||[]),y(W||[]),S((H==null?void 0:H.hotspots)||[]),C((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{E(I.message),A(!1)})},[]),M?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):D?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",D]})}):t!=null&&t.enabled?T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),T.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(n2,{size:14}),"Feed Status"]}),T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>T.jsx(Wye,{feed:I},I.source))})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsx(Zye,{swpc:i}),T.jsx($ye,{ducting:o})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(OZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?T.jsx("div",{className:"space-y-3",children:l.map(I=>T.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),T.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[T.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&T.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(nv,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active wildfires in the area"})]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(FZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?T.jsx("div",{className:"text-slate-500 py-4",children:T.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?T.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>T.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),T.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&T.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((k=c.advisories[0])==null?void 0:k.center_link)&&T.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(nv,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(NZ,{size:14}),"Stream Gauges (",h.length,")"]}),T.jsx("div",{className:"space-y-2",children:h.map(I=>{var z,O,F,G,j;return T.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),T.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(F=(O=I.properties)==null?void 0:O.value)==null?void 0:F.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(j=I.properties)==null?void 0:j.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(PZ,{size:14}),"Road Conditions"]}),p.length>0&&T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),T.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,F,G,j,U,V,W,H;return T.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((F=I.properties)==null?void 0:F.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),T.jsx("span",{className:"text-sm font-mono text-slate-300",children:(j=I.properties)!=null&&j.roadClosure?"CLOSED":`${Math.round(((U=I.properties)==null?void 0:U.currentSpeed)||0)}mph`})]}),!((V=I.properties)!=null&&V.roadClosure)&&T.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),T.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return T.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[T.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),T.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(UZ,{size:14}),"Satellite Hotspots (",_.length,")",b>0&&T.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[b," NEW"]})]}),T.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,F,G,j,U;return T.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),T.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((F=I.properties)==null?void 0:F.frp)&&T.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[T.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((j=I.properties)==null?void 0:j.acq_time)&&T.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((U=I.properties)==null?void 0:U.near_fire)&&T.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(vs,{size:14}),"Active Events (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-3",children:r.map(I=>T.jsx(Uye,{event:I},I.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(nv,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active environmental events"})]})]})]}):T.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[T.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:T.jsx(Fv,{size:32,className:"text-slate-500"})}),T.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),T.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const l5=[{key:"bot",label:"Bot",icon:LZ},{key:"connection",label:"Connection",icon:j3},{key:"response",label:"Response",icon:VZ},{key:"history",label:"History",icon:EZ},{key:"memory",label:"Memory",icon:AZ},{key:"context",label:"Context",icon:z3},{key:"commands",label:"Commands",icon:YZ},{key:"llm",label:"LLM",icon:O3},{key:"weather",label:"Weather",icon:Fv},{key:"meshmonitor",label:"MeshMonitor",icon:Gc},{key:"knowledge",label:"Knowledge",icon:MZ},{key:"mesh_sources",label:"Mesh Sources",icon:zZ},{key:"mesh_intelligence",label:"Intelligence",icon:n2},{key:"environmental",label:"Environmental",icon:XZ},{key:"dashboard",label:"Dashboard",icon:B3}];function dt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a=""}){const[o,s]=Y.useState(!1),l=n==="password";return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsxs("div",{className:"relative",children:[T.jsx("input",{type:l&&!o?"password":"text",value:e,onChange:u=>r(u.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),l&&T.jsx("button",{type:"button",onClick:()=>s(!o),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:o?T.jsx(RZ,{size:16}):T.jsx(z3,{size:16})})]}),a&&T.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Be({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsx("input",{type:"number",value:e,onChange:s=>r(Number(s.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&T.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function Je({label:t,checked:e,onChange:r,helper:n=""}){return T.jsxs("div",{className:"flex items-center justify-between py-2",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm text-slate-300",children:t}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]}),T.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function eo({label:t,value:e,onChange:r,options:n,helper:i=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsx("select",{value:e,onChange:a=>r(a.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(a=>T.jsx("option",{value:a.value,children:a.label},a.value))}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Xye({label:t,value:e,onChange:r,rows:n=4,helper:i=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsx("textarea",{value:e,onChange:a=>r(a.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Za({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=Y.useState(e.join(", "));Y.useEffect(()=>{document.title="Config — MeshAI",a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>l.trim()).filter(Boolean);r(s)};return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function w8({label:t,value:e,onChange:r,helper:n=""}){const[i,a]=Y.useState(e.join(", "));Y.useEffect(()=>{a(e.join(", "))},[e]);const o=()=>{const s=i.split(",").map(l=>parseInt(l.trim(),10)).filter(l=>!isNaN(l));r(s)};return T.jsxs("div",{className:"space-y-1",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),T.jsx("input",{type:"text",value:i,onChange:s=>a(s.target.value),onBlur:o,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function qye({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r})}),T.jsx(dt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r})})]}),T.jsx(Je,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r})}),T.jsx(Je,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r})})]})}function Kye({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(eo,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial"},{value:"tcp",label:"TCP"}]}),t.type==="serial"?T.jsx(dt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0"}):T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100"}),T.jsx(Be,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535})]})]})}function Qye({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1}),T.jsx(Be,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500}),T.jsx(Be,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10})]})]})}function Jye({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(dt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r})}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"0 = unlimited"}),T.jsx(Be,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0})]}),T.jsx(Je,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r})}),t.auto_cleanup&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1}),T.jsx(Be,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1})]})]})}function e0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable Memory Optimization",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs to keep in full"}),T.jsx(Be,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before re-summarizing"})]})]})}function t0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(w8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Empty = all channels"}),T.jsx(Za,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to ignore"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0}),T.jsx(Be,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1})]})]})]})}function r0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable Commands",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"Command Prefix",value:t.prefix,onChange:r=>e({...t,prefix:r})}),T.jsx(Za,{label:"Disabled Commands",value:t.disabled_commands,onChange:r=>e({...t,disabled_commands:r}),helper:"Commands to disable"})]})]})}function n0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(eo,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}]}),T.jsx(dt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini"})]}),T.jsx(dt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax"}),T.jsx(dt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120}),T.jsx(Be,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100})]}),T.jsx(Je,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r})}),t.use_system_prompt&&T.jsx(Xye,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6}),T.jsx(Je,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Open WebUI feature"}),T.jsx(Je,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Gemini only"})]})}function i0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(eo,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}]}),T.jsx(eo,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}]})]}),T.jsx(dt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Twin Falls, ID"})]})}function a0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080"}),T.jsx(Je,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands"}),T.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10}),T.jsx(Je,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduces polling frequency for shared instances"})]})]})}function o0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(eo,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}]}),(t.backend==="qdrant"||t.backend==="auto")&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r})}),T.jsx(Be,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r})})]}),T.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r})}),T.jsx(Je,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r})})]}),T.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r})}),T.jsx(Be,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20})]})]})}function s0e({source:t,onChange:e,onDelete:r}){const[n,i]=Y.useState(!1);return T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[T.jsxs("div",{className:"flex items-center gap-3",children:[n?T.jsx(i2,{size:16}):T.jsx(a2,{size:16}),T.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),T.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),T.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),T.jsx("button",{onClick:a=>{a.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:T.jsx(qZ,{size:14})})]}),n&&T.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Name",value:t.name,onChange:a=>e({...t,name:a})}),T.jsx(eo,{label:"Type",value:t.type,onChange:a=>e({...t,type:a}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}]})]}),t.type!=="mqtt"&&T.jsx(dt,{label:"URL",value:t.url,onChange:a=>e({...t,url:a})}),t.type==="meshmonitor"&&T.jsx(dt,{label:"API Token",value:t.api_token,onChange:a=>e({...t,api_token:a}),type:"password"}),t.type==="mqtt"&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Host",value:t.host||"",onChange:a=>e({...t,host:a})}),T.jsx(Be,{label:"Port",value:t.port||1883,onChange:a=>e({...t,port:a}),min:1,max:65535})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Username",value:t.username||"",onChange:a=>e({...t,username:a})}),T.jsx(dt,{label:"Password",value:t.password||"",onChange:a=>e({...t,password:a}),type:"password"})]}),T.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:a=>e({...t,topic_root:a})}),T.jsx(Je,{label:"Use TLS",checked:t.use_tls||!1,onChange:a=>e({...t,use_tls:a})})]}),T.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:a=>e({...t,refresh_interval:a}),min:10}),T.jsx(Je,{label:"Enabled",checked:t.enabled,onChange:a=>e({...t,enabled:a})}),T.jsx(Je,{label:"Polite Mode",checked:t.polite_mode,onChange:a=>e({...t,polite_mode:a})})]})]})}function l0e({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return T.jsxs("div",{className:"space-y-4",children:[t.map((n,i)=>T.jsx(s0e,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),T.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[T.jsx(GZ,{size:16})," Add Source"]})]})}function u0e({data:t,onChange:e}){const[r,n]=Y.useState(null);return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Je,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5}),T.jsx(Be,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Per 24h to flag"}),T.jsx(Be,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100})]}),T.jsx(Za,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical nodes (e.g., MHR, HPR)"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled"}),T.jsx(Be,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:"Regions"}),t.regions.map((i,a)=>T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsx("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:T.jsxs("div",{className:"flex items-center gap-3",children:[r===a?T.jsx(i2,{size:16}):T.jsx(a2,{size:16}),T.jsx("span",{className:"font-medium text-slate-200",children:i.name}),T.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]})}),r===a&&T.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),T.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),T.jsx(Be,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),T.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),T.jsx(Za,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),T.jsx(Za,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a))]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide mb-3",children:"Alert Rules"}),T.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1",children:[T.jsx(Je,{label:"Infra Offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),T.jsx(Je,{label:"Infra Recovery",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),T.jsx(Je,{label:"New Router",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),T.jsx(Je,{label:"Battery Warning",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}})}),T.jsx(Je,{label:"Battery Critical",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}})}),T.jsx(Je,{label:"Battery Emergency",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}})}),T.jsx(Je,{label:"Power Source Change",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),T.jsx(Je,{label:"Solar Not Charging",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})}),T.jsx(Je,{label:"High Utilization",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}})}),T.jsx(Je,{label:"Packet Flood",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}})}),T.jsx(Je,{label:"Single Gateway",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),T.jsx(Je,{label:"Region Blackout",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]})]})]})]})}function c0e({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,f,h,v,p,g,m,y;return T.jsxs("div",{className:"space-y-6",children:[T.jsx(Je,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_})}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(Za,{label:"NWS Zones",value:t.nws_zones,onChange:_=>e({...t,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030"}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),T.jsx(Je,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"User Agent",value:t.nws.user_agent,onChange:_=>e({...t,nws:{...t.nws,user_agent:_}}),helper:"Required format: (app_name, contact_email)"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30}),T.jsx(eo,{label:"Min Severity",value:t.nws.severity_min,onChange:_=>e({...t,nws:{...t.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}]})]})]})]}),T.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),T.jsx(Je,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),T.jsx(Je,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&T.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[T.jsx(Be,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),T.jsx(Be,{label:"Latitude",value:t.ducting.latitude,onChange:_=>e({...t,ducting:{...t.ducting,latitude:_}}),step:.01}),T.jsx(Be,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),T.jsx(Je,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(Be,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),T.jsx(dt,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),placeholder:"US-ID"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),T.jsx(Je,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(Be,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),T.jsx(Za,{label:"Center IDs",value:t.avalanche.center_ids,onChange:_=>e({...t,avalanche:{...t.avalanche,center_ids:_}})}),T.jsx(w8,{label:"Season Months",value:t.avalanche.season_months,onChange:_=>e({...t,avalanche:{...t.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),T.jsx(Je,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,b;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((b=t.usgs)==null?void 0:b.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(Be,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900}),T.jsx(Za,{label:"Site IDs",value:t.usgs.sites,onChange:_=>e({...t,usgs:{...t.usgs,sites:_}}),helper:"Find IDs at waterdata.usgs.gov/nwis"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),T.jsx(Je,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,b,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((b=t.traffic)==null?void 0:b.api_key)||"",corridors:((C=t.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"API Key",value:t.traffic.api_key,onChange:_=>e({...t,traffic:{...t.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com"}),T.jsx(Be,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),T.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,S)=>T.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[T.jsx(dt,{label:"Name",value:_.name,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,name:b},e({...t,traffic:{...t.traffic,corridors:C}})}}),T.jsx(Be,{label:"Lat",value:_.lat,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,lat:b},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),T.jsx(Be,{label:"Lon",value:_.lon,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,lon:b},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),T.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((b,C)=>C!==S)}}),className:"px-2 py-1 text-xs text-red-400 hover:text-red-300",children:"Remove"})]},S)),T.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),T.jsx(Je,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,b,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((b=t.roads511)==null?void 0:b.api_key)||"",base_url:((C=t.roads511)==null?void 0:C.base_url)||"",endpoints:((M=t.roads511)==null?void 0:M.endpoints)||["/get/event"],bbox:((A=t.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"Base URL",value:t.roads511.base_url,onChange:_=>e({...t,roads511:{...t.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2"}),T.jsx(dt,{label:"API Key",value:t.roads511.api_key,onChange:_=>e({...t,roads511:{...t.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),T.jsx(Be,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),T.jsx(Za,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(Be,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[0]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),T.jsx(Be,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[1]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),T.jsx(Be,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[2]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),T.jsx(Be,{label:"North",value:((f=t.roads511.bbox)==null?void 0:f[3])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[3]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),T.jsx(Je,{label:"",checked:((h=t.firms)==null?void 0:h.enabled)||!1,onChange:_=>{var S,b,C,M,A,D,E;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((S=t.firms)==null?void 0:S.tick_seconds)||1800,map_key:((b=t.firms)==null?void 0:b.map_key)||"",source:((C=t.firms)==null?void 0:C.source)||"VIIRS_SNPP_NRT",bbox:((M=t.firms)==null?void 0:M.bbox)||[],day_range:((A=t.firms)==null?void 0:A.day_range)||1,confidence_min:((D=t.firms)==null?void 0:D.confidence_min)||"nominal",proximity_km:((E=t.firms)==null?void 0:E.proximity_km)||10}})}})]}),((v=t.firms)==null?void 0:v.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(dt,{label:"MAP Key",value:t.firms.map_key,onChange:_=>e({...t,firms:{...t.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/"}),T.jsx(Be,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300}),T.jsx(eo,{label:"Satellite Source",value:t.firms.source,onChange:_=>e({...t,firms:{...t.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),T.jsx(Be,{label:"Day Range",value:t.firms.day_range,onChange:_=>e({...t,firms:{...t.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),T.jsx(eo,{label:"Minimum Confidence",value:t.firms.confidence_min,onChange:_=>e({...t,firms:{...t.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),T.jsx(Be,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(Be,{label:"West",value:((p=t.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[0]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),T.jsx(Be,{label:"South",value:((g=t.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[1]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),T.jsx(Be,{label:"East",value:((m=t.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[2]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),T.jsx(Be,{label:"North",value:((y=t.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[3]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function f0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(Je,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r})}),t.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0"}),T.jsx(Be,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535})]})]})}function h0e(){var E;const[t,e]=Y.useState(null),[r,n]=Y.useState(null),[i,a]=Y.useState("bot"),[o,s]=Y.useState(!0),[l,u]=Y.useState(!1),[c,f]=Y.useState(null),[h,v]=Y.useState(null),[p,g]=Y.useState(!1),[m,y]=Y.useState(!1),_=Y.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const I=await k.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);Y.useEffect(()=>{_()},[_]),Y.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),f(null),v(null);try{const k=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");v(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>v(null),3e3)}catch(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},b=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),v("Restart initiated")}catch{f("Restart failed")}},M=(k,I)=>{t&&e({...t,[k]:I})};if(o)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return T.jsx(qye,{data:t.bot,onChange:k=>M("bot",k)});case"connection":return T.jsx(Kye,{data:t.connection,onChange:k=>M("connection",k)});case"response":return T.jsx(Qye,{data:t.response,onChange:k=>M("response",k)});case"history":return T.jsx(Jye,{data:t.history,onChange:k=>M("history",k)});case"memory":return T.jsx(e0e,{data:t.memory,onChange:k=>M("memory",k)});case"context":return T.jsx(t0e,{data:t.context,onChange:k=>M("context",k)});case"commands":return T.jsx(r0e,{data:t.commands,onChange:k=>M("commands",k)});case"llm":return T.jsx(n0e,{data:t.llm,onChange:k=>M("llm",k)});case"weather":return T.jsx(i0e,{data:t.weather,onChange:k=>M("weather",k)});case"meshmonitor":return T.jsx(a0e,{data:t.meshmonitor,onChange:k=>M("meshmonitor",k)});case"knowledge":return T.jsx(o0e,{data:t.knowledge,onChange:k=>M("knowledge",k)});case"mesh_sources":return T.jsx(l0e,{data:t.mesh_sources,onChange:k=>M("mesh_sources",k)});case"mesh_intelligence":return T.jsx(u0e,{data:t.mesh_intelligence,onChange:k=>M("mesh_intelligence",k)});case"environmental":return T.jsx(c0e,{data:t.environmental,onChange:k=>M("environmental",k)});case"dashboard":return T.jsx(f0e,{data:t.dashboard,onChange:k=>M("dashboard",k)});default:return null}},D=((E=l5.find(k=>k.key===i))==null?void 0:E.label)||i;return T.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[T.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:l5.map(({key:k,label:I,icon:z})=>T.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[T.jsx(z,{size:16}),T.jsx("span",{children:I}),m&&i===k&&T.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),T.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[T.jsxs("div",{className:"flex items-center justify-between mb-6",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx(F3,{size:20,className:"text-slate-500"}),T.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:D})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[m&&T.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[T.jsx(WZ,{size:14}),"Discard"]}),T.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?T.jsx(HZ,{size:14,className:"animate-spin"}):T.jsx(ZZ,{size:14}),"Save"]})]})]}),p&&T.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[T.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[T.jsx(vs,{size:16}),T.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),T.jsx("button",{onClick:C,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&T.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[T.jsx(G3,{size:16}),T.jsx("span",{className:"text-sm",children:c})]}),h&&T.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[T.jsx(DZ,{size:16}),T.jsx("span",{className:"text-sm",children:h})]}),T.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:T.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const u5={infra_offline:QZ,infra_recovery:j3,battery_warning:_x,battery_critical:_x,battery_emergency:_x,hf_blackout:s2,uhf_ducting:Gc,weather_warning:Fv,weather_watch:Fv,new_router:Gc,packet_flood:vs,sustained_high_util:vs,region_blackout:M0,default:Xm};function v0e(t){return u5[t]||u5.default}function b8(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function d0e(t){const e=typeof t=="number"?new Date(t*1e3):new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function p0e(t){return(typeof t=="number"?new Date(t*1e3):new Date(t)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function g0e(t){return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:`${Math.floor(t/86400)}d`}function m0e({alert:t,onAcknowledge:e}){var i;const r=b8(t.severity),n=v0e(t.type);return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:20,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=t.severity)==null?void 0:i.toUpperCase()}),T.jsx("span",{className:"text-xs text-slate-500",children:t.type})]}),T.jsx("div",{className:"text-sm text-slate-200",children:t.message}),T.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx(qm,{size:12}),t.timestamp?d0e(t.timestamp):"Just now"]}),t.scope_value&&T.jsxs("span",{children:[t.scope_type,": ",t.scope_value]})]})]}),T.jsx("button",{onClick:()=>e(t),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function y0e({history:t,typeFilter:e,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[T.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(o2,{size:14,className:"text-slate-400"}),T.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),T.jsx("select",{value:e,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>T.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),T.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>T.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),T.jsx("div",{className:"overflow-x-auto",children:T.jsxs("table",{className:"w-full",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"border-b border-border",children:[T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),T.jsx("tbody",{children:t.length>0?t.map((c,f)=>{const h=b8(c.severity);return T.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:p0e(c.timestamp)}),T.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),T.jsx("td",{className:"p-4",children:T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.badge}`,children:c.severity})}),T.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?g0e(c.duration):"-"})]},c.id||f)}):T.jsx("tr",{children:T.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&T.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[T.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:T.jsx(kZ,{size:16})}),T.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:T.jsx(a2,{size:16})})]})]})]})}function _0e({subscription:t}){const e=()=>{if(t.sub_type==="alerts")return"Real-time";const i=t.schedule_time||"0000",a=parseInt(i.slice(0,2)),o=i.slice(2),s=a>=12?"PM":"AM";let u=`${a%12||12}:${o} ${s}`;return t.sub_type==="weekly"&&t.schedule_day&&(u+=` ${t.schedule_day.charAt(0).toUpperCase()}${t.schedule_day.slice(1)}`),u},n=(()=>{switch(t.sub_type){case"alerts":return Xm;case"daily":return qm;case"weekly":return qm;default:return Xm}})();return T.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:T.jsx(n,{size:18,className:"text-blue-400"})}),T.jsxs("div",{className:"flex-1",children:[T.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[t.sub_type.charAt(0).toUpperCase()+t.sub_type.slice(1),t.scope_type!=="mesh"&&t.scope_value&&T.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",t.scope_type,": ",t.scope_value,")"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[e()," • Node ",t.user_id]})]}),T.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function x0e(){const[t,e]=Y.useState([]),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(!0),[l,u]=Y.useState(null),[c,f]=Y.useState("all"),[h,v]=Y.useState("all"),[p,g]=Y.useState(1),[m,y]=Y.useState(1),_=20,[S,b]=Y.useState(new Set),{lastAlert:C}=l2();Y.useEffect(()=>{document.title="Alerts — MeshAI"},[]),Y.useEffect(()=>{Promise.all([H3().catch(()=>[]),wD(_,0).catch(()=>({items:[],total:0})),n$().catch(()=>[])]).then(([D,E,k])=>{e(D),Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_))),a(k),s(!1)}).catch(D=>{u(D.message),s(!1)})},[]),Y.useEffect(()=>{C&&e(D=>D.some(k=>k.type===C.type&&k.message===C.message)?D:[C,...D])},[C]),Y.useEffect(()=>{const D=(p-1)*_;wD(_,D,c,h).then(E=>{Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_)))}).catch(()=>{})},[p,c,h]);const M=Y.useCallback(D=>{const E=`${D.type}-${D.message}-${D.timestamp}`;b(k=>new Set([...k,E]))},[]),A=t.filter(D=>{const E=`${D.type}-${D.message}-${D.timestamp}`;return!S.has(E)});return o?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):l?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",l]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(vs,{size:14}),"Active Alerts (",A.length,")"]}),A.length>0?T.jsx("div",{className:"space-y-3",children:A.map((D,E)=>T.jsx(m0e,{alert:D,onAcknowledge:M},`${D.type}-${D.timestamp}-${E}`))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[T.jsx(nv,{size:20,className:"text-green-500"}),T.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),T.jsxs("div",{children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(qm,{size:14}),"Alert History"]}),T.jsx(y0e,{history:r,typeFilter:c,severityFilter:h,onTypeFilterChange:D=>{f(D),g(1)},onSeverityFilterChange:D=>{v(D),g(1)},page:p,totalPages:m,onPageChange:g})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(KZ,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(D=>T.jsx(_0e,{subscription:D},D.id))}):T.jsxs("div",{className:"text-slate-500 py-4",children:[T.jsx("p",{children:"No active subscriptions."}),T.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",T.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}function S0e(){return T.jsx(y$,{children:T.jsx(S$,{children:T.jsxs(fZ,{children:[T.jsx(Qu,{path:"/",element:T.jsx(M$,{})}),T.jsx(Qu,{path:"/mesh",element:T.jsx(Hye,{})}),T.jsx(Qu,{path:"/environment",element:T.jsx(Yye,{})}),T.jsx(Qu,{path:"/config",element:T.jsx(h0e,{})}),T.jsx(Qu,{path:"/alerts",element:T.jsx(x0e,{})})]})})})}YS.createRoot(document.getElementById("root")).render(T.jsx(Nc.StrictMode,{children:T.jsx(yZ,{children:T.jsx(S0e,{})})})); diff --git a/meshai/dashboard/static/index.html b/meshai/dashboard/static/index.html index d75992e..b3740ab 100644 --- a/meshai/dashboard/static/index.html +++ b/meshai/dashboard/static/index.html @@ -8,8 +8,8 @@ - - + +